:root {
  --bg: #07111f;
  --panel: #0f172a;
  --panel-2: #111c2f;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8edf7;
  --muted: #90a0bc;
  --accent: #7c9cff;
  --accent-soft: rgba(124, 156, 255, 0.16);
  --urgent: #ff6b6b;
  --warning: #ffca5a;
  --success: #41d59f;
  --shadow: 0 20px 45px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #142338 0%, var(--bg) 45%, #050a12 100%);
  color: var(--text);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 270px 1fr;
}

.sidebar {
  background: rgba(7, 17, 31, 0.95);
  border-right: 1px solid var(--border);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), #4ed3ff);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 18px;
  color: white;
}

.brand h1 {
  margin: 0;
  font-size: 18px;
}

.brand p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-item {
  border: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  transition: all 180ms ease;
}

.nav-item:hover,
.nav-item.active {
  background: var(--accent-soft);
  color: var(--text);
}

.sidebar-footer {
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(140deg, rgba(124, 156, 255, 0.16), rgba(255, 255, 255, 0.04));
  border: 1px solid var(--border);
}

.sidebar-footer h3 {
  margin: 4px 0 6px;
  font-size: 16px;
}

.sidebar-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.main-panel {
  padding: 24px 28px 32px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.topbar h2,
.hero-card h3,
.card h3 {
  margin: 0;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 14px;
  min-width: 240px;
}

.search-box input {
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  width: 100%;
}

.icon-btn,
.text-btn,
.action-btn {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 12px;
}

.icon-btn {
  width: 42px;
  height: 42px;
}

.profile-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 999px;
}

.profile-pill p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), #4ed3ff);
  font-weight: 700;
}

.hero-card {
  background: linear-gradient(135deg, rgba(124, 156, 255, 0.2), rgba(255, 255, 255, 0.04));
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 20px;
}

.hero-card p {
  color: var(--muted);
  margin: 8px 0 0;
  max-width: 560px;
}

.hero-kpi {
  display: flex;
  gap: 16px;
}

.hero-kpi > div {
  min-width: 96px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-kpi strong {
  font-size: 24px;
}

.hero-kpi span {
  color: var(--muted);
  font-size: 12px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 20px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.card-wide {
  grid-column: 1 / -1;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.text-btn {
  padding: 8px 12px;
}

.pill {
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
}

.timeline-list,
.reminder-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.timeline-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 8px;
  flex-shrink: 0;
}

.dot.urgent {
  background: var(--urgent);
}

.dot.warning {
  background: var(--warning);
}

.dot.neutral {
  background: #5c7de9;
}

.timeline-item p,
.reminder-list p,
.task-copy p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.task-item {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 14px;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  color: var(--text);
  transition: transform 180ms ease, border-color 180ms ease;
}

.task-item:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.16);
}

.task-item.urgent {
  border-color: rgba(255, 107, 107, 0.3);
}

.task-item.warning {
  border-color: rgba(255, 202, 90, 0.25);
}

.task-item.success {
  border-color: rgba(65, 213, 159, 0.25);
}

.task-item.is-done {
  opacity: 0.7;
  text-decoration: line-through;
}

.task-badge {
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.reminder-list li {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.reminder-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.budget-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.budget-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  width: 71%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #4ed3ff);
}

.progress-fill.alt {
  width: 72%;
  background: linear-gradient(90deg, var(--warning), #ffb454);
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.action-btn {
  padding: 14px 12px;
  min-height: 56px;
  transition: transform 180ms ease;
}

.action-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.2);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: rgba(15, 23, 42, 0.98);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: all 220ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
