/* Dashboard home — person -> operation -> activity -> plan -> shortcuts. */
#sec-dashboard {
  --home-bg: transparent;
  --home-surface: rgba(255, 255, 255, 0.045);
  --home-surface-strong: rgba(255, 255, 255, 0.065);
  --home-surface-soft: rgba(148, 163, 184, 0.07);
  --home-border: rgba(255, 255, 255, 0.09);
  --home-border-strong: rgba(255, 255, 255, 0.14);
  --home-heading: #f8fafc;
  --home-text: #cbd5e1;
  --home-muted: #94a3b8;
  --home-soft: #64748b;
  --home-positive: #34d399;
  --home-positive-rgb: 52, 211, 153;
  --home-warning: #fbbf24;
  --home-warning-rgb: 251, 191, 36;
  --home-danger: #fb7185;
  --home-danger-rgb: 251, 113, 133;
  --home-shadow: 0 1px 2px rgba(2, 6, 23, 0.12), 0 14px 34px rgba(2, 6, 23, 0.08);
  --home-shadow-hover: 0 16px 34px rgba(2, 6, 23, 0.18);
}

[data-theme="light"] #sec-dashboard {
  --home-surface: #ffffff;
  --home-surface-strong: #ffffff;
  --home-surface-soft: #f5f7fa;
  --home-border: #e2e8f0;
  --home-border-strong: #d5dee9;
  --home-heading: #111827;
  --home-text: #334155;
  --home-muted: #64748b;
  --home-soft: #94a3b8;
  --home-positive: #059669;
  --home-positive-rgb: 5, 150, 105;
  --home-warning: #b45309;
  --home-warning-rgb: 180, 83, 9;
  --home-danger: #dc2626;
  --home-danger-rgb: 220, 38, 38;
  --home-shadow: 0 1px 2px rgba(15, 23, 42, 0.035), 0 12px 30px rgba(15, 23, 42, 0.035);
  --home-shadow-hover: 0 16px 34px rgba(15, 23, 42, 0.085);
}

/* Personal hero */
#sec-dashboard .dashboard-section-hero {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 380px);
  align-items: center;
  gap: 48px;
  margin-bottom: 34px;
  padding: 34px 36px;
  overflow: hidden;
  border: 1px solid var(--home-border);
  border-radius: 20px;
  background: var(--home-surface);
  box-shadow: var(--home-shadow);
}

[data-theme="light"] #sec-dashboard .dashboard-section-hero {
  background: #ffffff;
}

#sec-dashboard .dashboard-section-hero::before,
#sec-dashboard .dashboard-section-hero::after {
  display: none;
  content: none;
}

#sec-dashboard .dashboard-hero-profile {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

#sec-dashboard .dashboard-profile-avatar {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid rgba(var(--accent-rgb, 139, 92, 246), 0.20);
  border-radius: 16px;
  background: rgba(var(--accent-rgb, 139, 92, 246), 0.09);
  color: var(--accent-light, #a78bfa);
  font-size: 15px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#sec-dashboard .dashboard-profile-copy {
  min-width: 0;
}

#sec-dashboard .dashboard-profile-greeting {
  margin: 0 0 4px;
  color: var(--accent-light, #a78bfa);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 750;
  letter-spacing: 0.13em;
}

[data-theme="light"] #sec-dashboard .dashboard-profile-greeting {
  color: var(--accent, #7c3aed);
}

#sec-dashboard .dashboard-profile-copy h1 {
  margin: 0;
  color: var(--home-heading);
  font-size: clamp(36px, 3vw, 44px);
  line-height: 1.03;
  font-weight: 720;
  letter-spacing: -0.04em;
}

#sec-dashboard .dashboard-profile-subtitle {
  max-width: 670px;
  margin: 8px 0 0;
  color: var(--home-muted);
  font-size: 13.5px;
  line-height: 1.55;
  font-weight: 500;
}

#sec-dashboard .dashboard-profile-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 13px;
}

#sec-dashboard .dashboard-profile-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--home-muted);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 600;
}

#sec-dashboard .dashboard-profile-meta svg {
  width: 14px;
  height: 14px;
  color: var(--home-soft);
}

#sec-dashboard .dashboard-hero-aside {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

#sec-dashboard .dashboard-hero-status {
  min-width: 0;
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 0 0 0 20px;
  border: 0;
  border-left: 1px solid var(--home-border);
  border-radius: 0;
  background: transparent;
}

#sec-dashboard .dashboard-hero-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--home-soft);
  box-shadow: 0 0 0 4px rgba(100, 116, 139, 0.11);
}

#sec-dashboard .dashboard-hero-status[data-tone="ok"] .dashboard-hero-status-dot {
  background: var(--home-positive);
  box-shadow: 0 0 0 4px rgba(var(--home-positive-rgb), 0.11);
}

#sec-dashboard .dashboard-hero-status[data-tone="warn"] .dashboard-hero-status-dot {
  background: var(--home-warning);
  box-shadow: 0 0 0 4px rgba(var(--home-warning-rgb), 0.11);
}

#sec-dashboard .dashboard-hero-status[data-tone="danger"] .dashboard-hero-status-dot {
  background: var(--home-danger);
  box-shadow: 0 0 0 4px rgba(var(--home-danger-rgb), 0.11);
}

#sec-dashboard .dashboard-hero-status[data-tone="loading"] .dashboard-hero-status-dot {
  animation: dashboard-home-pulse 1.4s ease-in-out infinite;
}

#sec-dashboard .dashboard-hero-status-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

#sec-dashboard .dashboard-hero-status-copy small {
  color: var(--home-soft);
  font-size: 10px;
  line-height: 1.2;
  font-weight: 750;
  letter-spacing: 0.11em;
}

#sec-dashboard .dashboard-hero-status-copy strong {
  color: var(--home-heading);
  font-size: 14.5px;
  line-height: 1.3;
  font-weight: 700;
}

#sec-dashboard .dashboard-hero-status-copy > span {
  color: var(--home-muted);
  font-size: 12px;
  line-height: 1.4;
  font-weight: 500;
}

#sec-dashboard .dashboard-hero-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
}

#sec-dashboard .dashboard-hero-actions button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  border-radius: 11px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

#sec-dashboard .dashboard-hero-actions svg {
  width: 15px;
  height: 15px;
}

#sec-dashboard .dashboard-hero-primary {
  border: 1px solid var(--accent, #8b5cf6);
  background: var(--accent, #8b5cf6);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(var(--accent-rgb, 139, 92, 246), 0.16);
}

#sec-dashboard .dashboard-hero-secondary {
  border: 1px solid var(--home-border-strong);
  background: var(--home-surface);
  color: var(--home-text);
}

#sec-dashboard .dashboard-hero-actions button:hover {
  transform: translateY(-1px);
}

#sec-dashboard .dashboard-hero-primary:hover {
  box-shadow: 0 12px 24px rgba(var(--accent-rgb, 139, 92, 246), 0.23);
}

#sec-dashboard .dashboard-hero-secondary:hover {
  border-color: var(--home-soft);
}

/* The optional onboarding checklist follows the same quiet visual language. */
#sec-dashboard #dashGettingStarted {
  margin-bottom: 34px;
  border: 1px solid var(--home-border) !important;
  border-radius: 17px;
  background: var(--home-surface) !important;
  box-shadow: none;
}

#sec-dashboard #dashGettingStarted > :first-child {
  border-color: var(--home-border) !important;
  background: var(--home-surface-soft) !important;
}

#sec-dashboard #dashGettingStarted > :first-child .w-9.h-9 {
  background: rgba(var(--accent-rgb, 139, 92, 246), 0.10) !important;
  color: var(--accent, #8b5cf6) !important;
}

#sec-dashboard #dashGettingStarted > :first-child .w-9.h-9 svg {
  color: var(--accent, #8b5cf6) !important;
}

#sec-dashboard #dashGettingStarted h3,
#sec-dashboard #dashGettingStarted .gs-title {
  color: var(--home-heading) !important;
  font-weight: 700;
}

#sec-dashboard #dashGettingStarted > :first-child p,
#sec-dashboard #dashGettingStarted .gs-desc {
  color: var(--home-muted) !important;
  font-weight: 500;
}

#sec-dashboard #dashGettingStarted .gs-step {
  border: 1px solid var(--home-border);
  border-radius: 14px;
  background: transparent;
}

#sec-dashboard #dashGettingStarted .gs-step:hover {
  border-color: var(--home-border-strong);
  background: var(--home-surface-soft);
}

/* Main dashboard narrative */
#sec-dashboard .dashboard-home-hub {
  margin: 0;
}

#sec-dashboard .home-command {
  display: flex;
  flex-direction: column;
  gap: 38px;
}

#sec-dashboard .home-section {
  min-width: 0;
}

#sec-dashboard .home-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 17px;
}

#sec-dashboard .home-section-heading > div {
  min-width: 0;
}

#sec-dashboard .home-section-eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--home-soft);
  font-size: 10px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#sec-dashboard .home-section-heading h2,
#sec-dashboard .home-surface-heading h2 {
  margin: 0;
  color: var(--home-heading);
  font-size: 20px;
  line-height: 1.25;
  font-weight: 720;
  letter-spacing: -0.015em;
}

#sec-dashboard .home-section-heading p,
#sec-dashboard .home-surface-heading p {
  margin: 4px 0 0;
  color: var(--home-muted);
  font-size: 12.5px;
  line-height: 1.45;
  font-weight: 500;
}

#sec-dashboard .home-section-note {
  color: var(--home-soft);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

/* Operation */
#sec-dashboard .home-operation-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

#sec-dashboard .home-operation-card {
  position: relative;
  min-width: 0;
  min-height: 148px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--home-border);
  border-radius: 17px;
  background: var(--home-surface);
  color: var(--home-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: none;
  transition: transform 0.17s ease, border-color 0.17s ease, box-shadow 0.17s ease;
}

#sec-dashboard .home-operation-card:hover {
  transform: translateY(-2px);
  border-color: var(--home-border-strong);
  box-shadow: var(--home-shadow-hover);
}

#sec-dashboard .home-operation-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

#sec-dashboard .home-operation-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--home-surface-soft);
  color: var(--home-muted);
}

#sec-dashboard .home-operation-icon svg,
#sec-dashboard .home-operation-arrow svg {
  width: 16px;
  height: 16px;
}

#sec-dashboard .home-operation-card[data-tone="ok"] .home-operation-icon {
  background: rgba(var(--home-positive-rgb), 0.10);
  color: var(--home-positive);
}

#sec-dashboard .home-operation-card[data-tone="warn"] .home-operation-icon {
  background: rgba(var(--home-warning-rgb), 0.10);
  color: var(--home-warning);
}

#sec-dashboard .home-operation-card[data-tone="danger"] .home-operation-icon {
  background: rgba(var(--home-danger-rgb), 0.10);
  color: var(--home-danger);
}

#sec-dashboard .home-operation-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--home-muted);
  font-size: 11px;
  font-weight: 650;
}

#sec-dashboard .home-operation-state::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--home-soft);
}

#sec-dashboard .home-operation-card[data-tone="ok"] .home-operation-state::before {
  background: var(--home-positive);
}

#sec-dashboard .home-operation-card[data-tone="warn"] .home-operation-state::before {
  background: var(--home-warning);
}

#sec-dashboard .home-operation-card[data-tone="danger"] .home-operation-state::before {
  background: var(--home-danger);
}

#sec-dashboard .home-operation-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

#sec-dashboard .home-operation-label {
  color: var(--home-muted);
  font-size: 12.5px;
  line-height: 1.2;
  font-weight: 650;
}

#sec-dashboard .home-operation-value {
  color: var(--home-heading);
  font-size: 28px;
  line-height: 1;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.025em;
}

#sec-dashboard .home-operation-value small {
  color: var(--home-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
}

#sec-dashboard .home-operation-context {
  overflow: hidden;
  color: var(--home-muted);
  font-size: 12px;
  line-height: 1.4;
  font-weight: 500;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#sec-dashboard .home-operation-arrow {
  position: absolute;
  right: 18px;
  bottom: 18px;
  opacity: 0;
  color: var(--home-soft);
  transform: translateX(-3px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

#sec-dashboard .home-operation-card:hover .home-operation-arrow,
#sec-dashboard .home-operation-card:focus-visible .home-operation-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* Activity */
#sec-dashboard .home-activity-surface,
#sec-dashboard .home-plan-surface {
  overflow: hidden;
  border: 1px solid var(--home-border);
  border-radius: 17px;
  background: var(--home-surface);
  box-shadow: none;
}

#sec-dashboard .home-activity-surface {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  min-height: 240px;
}

#sec-dashboard .home-activity-main {
  min-width: 0;
  padding: 22px 24px 18px;
}

#sec-dashboard .home-surface-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

#sec-dashboard .home-activity-period {
  flex: 0 0 auto;
  color: var(--home-soft);
  font-size: 11.5px;
  font-weight: 600;
}

#sec-dashboard .home-activity-chart {
  height: 132px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: end;
  gap: clamp(8px, 2vw, 24px);
  margin-top: 18px;
  padding-top: 8px;
  border-bottom: 1px solid var(--home-border);
}

#sec-dashboard .home-activity-bar {
  min-width: 0;
  height: 100%;
  display: grid;
  grid-template-rows: 15px minmax(0, 1fr) 14px;
  align-items: center;
  justify-items: center;
  gap: 4px;
}

#sec-dashboard .home-activity-bar-value {
  color: var(--home-muted);
  font-size: 11px;
  line-height: 1;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

#sec-dashboard .home-activity-bar-column {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

#sec-dashboard .home-activity-bar-track {
  width: min(34px, 100%);
  min-height: 4px;
  border-radius: 8px 8px 3px 3px;
  background: rgba(var(--accent-rgb, 139, 92, 246), 0.62);
  transition: background 0.16s ease, transform 0.16s ease;
}

#sec-dashboard .home-activity-bar[data-peak="true"] .home-activity-bar-track,
#sec-dashboard .home-activity-bar:hover .home-activity-bar-track {
  background: var(--accent, #8b5cf6);
  transform: scaleX(1.06);
}

#sec-dashboard .home-activity-bar strong {
  color: var(--home-soft);
  font-size: 11px;
  line-height: 1;
  font-weight: 650;
}

#sec-dashboard .home-activity-empty {
  min-height: 132px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  border: 1px dashed var(--home-border-strong);
  border-radius: 12px;
  color: var(--home-muted);
  font-size: 12px;
  font-weight: 550;
}

#sec-dashboard .home-activity-summary {
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  border-left: 1px solid var(--home-border);
  background: var(--home-surface-soft);
}

#sec-dashboard .home-activity-stat {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--home-border);
}

#sec-dashboard .home-activity-stat:last-child {
  border-bottom: 0;
}

#sec-dashboard .home-activity-stat span {
  color: var(--home-muted);
  font-size: 12px;
  line-height: 1.25;
  font-weight: 550;
}

#sec-dashboard .home-activity-stat strong {
  flex: 0 0 auto;
  color: var(--home-heading);
  font-size: 24px;
  line-height: 1;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

/* Plan usage: one surface, internal bars */
#sec-dashboard .home-plan-surface {
  padding: 22px 24px;
}

#sec-dashboard .home-plan-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 19px;
}

#sec-dashboard .home-plan-heading-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

#sec-dashboard .home-plan-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 12px;
  background: var(--home-surface-soft);
  color: var(--home-muted);
}

#sec-dashboard .home-plan-icon svg {
  width: 16px;
  height: 16px;
}

#sec-dashboard .home-plan-heading h2 {
  margin: 0;
  color: var(--home-heading);
  font-size: 16.5px;
  line-height: 1.25;
  font-weight: 700;
}

#sec-dashboard .home-plan-heading p {
  margin: 3px 0 0;
  color: var(--home-muted);
  font-size: 11.5px;
  line-height: 1.3;
  font-weight: 500;
}

#sec-dashboard .home-plan-action {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--home-border-strong);
  border-radius: 9px;
  background: transparent;
  color: var(--home-text);
  font-size: 11.5px;
  font-weight: 650;
  text-decoration: none;
}

#sec-dashboard .home-plan-action svg {
  width: 13px;
  height: 13px;
}

#sec-dashboard .home-plan-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
}

#sec-dashboard .home-plan-limit {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 4px 18px;
  border: 0;
  border-right: 1px solid var(--home-border);
  background: transparent;
  color: var(--home-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

#sec-dashboard .home-plan-limit:first-child {
  padding-left: 0;
}

#sec-dashboard .home-plan-limit:last-child {
  padding-right: 0;
  border-right: 0;
}

#sec-dashboard .home-plan-limit-label {
  overflow: hidden;
  color: var(--home-muted);
  font-size: 11.5px;
  line-height: 1.2;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#sec-dashboard .home-plan-limit-value {
  overflow: hidden;
  color: var(--home-heading);
  font-size: 14px;
  line-height: 1.2;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#sec-dashboard .home-plan-limit-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
}

[data-theme="light"] #sec-dashboard .home-plan-limit-track {
  background: #e8edf3;
}

#sec-dashboard .home-plan-limit-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent, #8b5cf6);
}

#sec-dashboard .home-plan-limit[data-tone="warn"] .home-plan-limit-track span {
  background: var(--home-warning);
}

#sec-dashboard .home-plan-limit[data-tone="danger"] .home-plan-limit-track span {
  background: var(--home-danger);
}

#sec-dashboard .home-plan-limit[data-unlimited="true"] .home-plan-limit-track span {
  display: none;
}

#sec-dashboard .home-plan-limit[data-unlimited="true"] .home-plan-limit-track {
  border: 1px dashed var(--home-border-strong);
  background: transparent;
}

/* Quick access */
#sec-dashboard .home-shortcut-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

#sec-dashboard .home-shortcut {
  min-width: 0;
  min-height: 84px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  border: 1px solid var(--home-border);
  border-radius: 16px;
  background: var(--home-surface);
  color: var(--home-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

#sec-dashboard .home-shortcut:hover {
  transform: translateY(-1px);
  border-color: var(--home-border-strong);
  box-shadow: var(--home-shadow-hover);
}

#sec-dashboard .home-shortcut-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--home-surface-soft);
  color: var(--home-muted);
}

#sec-dashboard .home-shortcut-icon svg,
#sec-dashboard .home-shortcut-arrow svg {
  width: 15px;
  height: 15px;
}

#sec-dashboard .home-shortcut-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#sec-dashboard .home-shortcut-copy strong,
#sec-dashboard .home-shortcut-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#sec-dashboard .home-shortcut-copy strong {
  color: var(--home-heading);
  font-size: 13.5px;
  line-height: 1.2;
  font-weight: 700;
}

#sec-dashboard .home-shortcut-copy span {
  color: var(--home-muted);
  font-size: 11.5px;
  line-height: 1.25;
  font-weight: 500;
}

#sec-dashboard .home-shortcut-arrow {
  opacity: 0;
  color: var(--home-soft);
  transform: translateX(-3px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

#sec-dashboard .home-shortcut:hover .home-shortcut-arrow,
#sec-dashboard .home-shortcut:focus-visible .home-shortcut-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* Loading state follows the final hierarchy instead of flashing six quota cards. */
#sec-dashboard .home-command-loading .home-operation-card,
#sec-dashboard .home-command-loading .home-activity-surface,
#sec-dashboard .home-command-loading .home-plan-surface {
  position: relative;
  overflow: hidden;
}

#sec-dashboard .home-command-loading .home-operation-card::after,
#sec-dashboard .home-command-loading .home-activity-surface::after,
#sec-dashboard .home-command-loading .home-plan-surface::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.08), transparent);
  transform: translateX(-100%);
  animation: dashboard-home-shimmer 1.35s ease-in-out infinite;
}

#sec-dashboard .home-loading-line {
  display: block;
  height: 9px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
}

#sec-dashboard .home-loading-line.is-value {
  width: 42%;
  height: 23px;
}

#sec-dashboard .home-loading-line.is-copy {
  width: 72%;
}

#sec-dashboard .home-operation-card:focus-visible,
#sec-dashboard .home-plan-limit:focus-visible,
#sec-dashboard .home-shortcut:focus-visible,
#sec-dashboard .dashboard-hero-actions button:focus-visible,
#sec-dashboard .home-plan-action:focus-visible {
  outline: 2px solid rgba(var(--accent-rgb, 139, 92, 246), 0.46);
  outline-offset: 2px;
}

@keyframes dashboard-home-shimmer {
  to { transform: translateX(100%); }
}

@keyframes dashboard-home-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

@media (max-width: 1180px) {
  #sec-dashboard .dashboard-section-hero {
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 32px;
  }

  #sec-dashboard .home-plan-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 16px;
  }

  #sec-dashboard .home-plan-limit:nth-child(3) {
    border-right: 0;
  }

  #sec-dashboard .home-plan-limit:nth-child(4) {
    padding-left: 0;
  }
}

@media (max-width: 920px) {
  #sec-dashboard .dashboard-section-hero {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  #sec-dashboard .dashboard-hero-aside {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  #sec-dashboard .home-operation-grid,
  #sec-dashboard .home-shortcut-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #sec-dashboard .home-activity-surface {
    grid-template-columns: minmax(0, 1fr) 210px;
  }
}

@media (max-width: 680px) {
  #sec-dashboard .dashboard-section-hero {
    margin-bottom: 24px;
    padding: 24px;
    border-radius: 16px;
  }

  #sec-dashboard .dashboard-hero-profile {
    align-items: flex-start;
  }

  #sec-dashboard .dashboard-profile-avatar {
    width: 48px;
    height: 48px;
    border-radius: 15px;
  }

  #sec-dashboard .dashboard-profile-copy h1 {
    font-size: 32px;
  }

  #sec-dashboard .dashboard-hero-aside {
    display: flex;
    width: 100%;
    align-items: stretch;
  }

  #sec-dashboard .dashboard-hero-actions {
    width: 100%;
    grid-template-columns: 1fr 1fr;
  }

  #sec-dashboard .home-command {
    gap: 32px;
  }

  #sec-dashboard .home-activity-surface {
    grid-template-columns: 1fr;
  }

  #sec-dashboard .home-activity-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: none;
    border-top: 1px solid var(--home-border);
    border-left: 0;
  }

  #sec-dashboard .home-activity-stat {
    min-height: 68px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 5px;
    border-right: 1px solid var(--home-border);
    border-bottom: 0;
  }

  #sec-dashboard .home-activity-stat:last-child {
    border-right: 0;
  }

  #sec-dashboard .home-plan-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #sec-dashboard .home-plan-limit:nth-child(2n) {
    border-right: 0;
  }

  #sec-dashboard .home-plan-limit:nth-child(3),
  #sec-dashboard .home-plan-limit:nth-child(5) {
    padding-left: 0;
    border-right: 1px solid var(--home-border);
  }

  #sec-dashboard .home-plan-limit:nth-child(4) {
    padding-left: 14px;
  }
}

@media (max-width: 480px) {
  #sec-dashboard .dashboard-section-hero {
    gap: 18px;
    padding: 20px;
  }

  #sec-dashboard .dashboard-hero-profile {
    display: flex;
    gap: 14px;
  }

  #sec-dashboard .dashboard-profile-avatar {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 13px;
  }

  #sec-dashboard .dashboard-profile-copy h1 {
    font-size: 28px;
  }

  #sec-dashboard .dashboard-profile-meta {
    gap: 8px 12px;
    margin-top: 10px;
  }

  #sec-dashboard .dashboard-profile-subtitle {
    font-size: 12px;
  }

  #sec-dashboard .dashboard-hero-status {
    min-height: 0;
    padding: 18px 0 0;
    border-top: 1px solid var(--home-border);
    border-left: 0;
  }

  #sec-dashboard #dashGettingStarted > :first-child {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 13px;
    padding: 16px;
  }

  #sec-dashboard #dashGettingStarted > :first-child > :last-child {
    width: 100%;
  }

  #sec-dashboard #dashGettingStarted > :first-child > :last-child > :first-child {
    width: auto;
    flex: 1;
  }

  #sec-dashboard .dashboard-hero-actions,
  #sec-dashboard .home-operation-grid,
  #sec-dashboard .home-shortcut-grid {
    grid-template-columns: 1fr;
  }

  #sec-dashboard .home-section-heading,
  #sec-dashboard .home-plan-heading {
    align-items: flex-start;
  }

  #sec-dashboard .home-section-note {
    display: none;
  }

  #sec-dashboard .home-surface-heading {
    gap: 10px;
  }

  #sec-dashboard .home-activity-main,
  #sec-dashboard .home-plan-surface {
    padding: 16px;
  }

  #sec-dashboard .home-activity-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #sec-dashboard .home-activity-stat:nth-child(2) {
    border-right: 0;
  }

  #sec-dashboard .home-activity-stat:last-child {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--home-border);
  }

  #sec-dashboard .home-activity-chart {
    gap: 6px;
  }

  #sec-dashboard .home-plan-heading {
    flex-wrap: wrap;
  }

  #sec-dashboard .home-plan-action {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  #sec-dashboard .dashboard-hero-status-dot,
  #sec-dashboard .home-command-loading .home-operation-card::after,
  #sec-dashboard .home-command-loading .home-activity-surface::after,
  #sec-dashboard .home-command-loading .home-plan-surface::after {
    animation: none;
  }

  #sec-dashboard .home-operation-card,
  #sec-dashboard .home-shortcut,
  #sec-dashboard .dashboard-hero-actions button,
  #sec-dashboard .home-operation-arrow,
  #sec-dashboard .home-shortcut-arrow {
    transition: none;
  }
}

/* Shared plan-overage strip.
   Lives here instead of adding more CSS to the already large admin shell. */
.plan-overage-banner-thin {
  width: 100%;
  min-height: 78px;
  display: grid;
  grid-template-columns: minmax(360px, 1.65fr) minmax(210px, 0.8fr) auto 32px;
  align-items: center;
  gap: 22px;
  position: relative;
  padding: 13px 16px;
  overflow: hidden;
  border: 1px solid rgba(251, 146, 60, 0.25);
  border-radius: 14px;
  background:
    linear-gradient(90deg, rgba(244, 63, 94, 0.06), rgba(245, 158, 11, 0.035) 52%, rgba(255, 255, 255, 0.025));
  color: #e2e8f0;
  box-shadow: none;
}

.plan-overage-copy {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.plan-overage-icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid rgba(251, 113, 133, 0.24);
  border-radius: 999px;
  background: rgba(244, 63, 94, 0.055);
  color: #fb7185;
}

.plan-overage-icon i,
.plan-overage-icon svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.9;
}

.plan-overage-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.plan-overage-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.plan-overage-title-row strong {
  color: #f8fafc;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}

.plan-overage-status {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(244, 63, 94, 0.13);
  color: #fda4af;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.plan-overage-sub {
  color: #aeb8ca;
  font-size: 11.5px;
  line-height: 1.45;
}

.plan-overage-sub b,
.plan-overage-sub .plan-overage-num {
  color: #fb7185;
  font-weight: 800;
}

.plan-overage-meter {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.plan-overage-meter-value {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  font-size: 11px;
  white-space: nowrap;
}

.plan-overage-meter-value strong {
  color: #fb7185;
  font-size: 13px;
  font-weight: 850;
}

.plan-overage-meter-value span {
  overflow: hidden;
  color: #94a3b8;
  font-weight: 700;
  text-overflow: ellipsis;
}

.plan-overage-track {
  width: 100%;
  height: 7px;
  display: block;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
}

.plan-overage-fill {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, #e11d48, #f43f5e);
}

.plan-overage-cta {
  min-width: 142px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 17px;
  border: 1px solid color-mix(in srgb, var(--accent, #8b5cf6) 76%, white 24%);
  border-radius: 9px;
  background: var(--accent, #8b5cf6);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: none;
  transition: filter 150ms ease, transform 150ms ease;
}

.plan-overage-cta:hover {
  color: #fff;
  text-decoration: none;
  filter: brightness(1.07);
  transform: translateY(-1px);
}

.plan-overage-cta:focus-visible,
.plan-overage-close:focus-visible {
  outline: 2px solid var(--accent, #8b5cf6);
  outline-offset: 2px;
}

.plan-overage-cta i,
.plan-overage-cta svg,
.plan-overage-close i,
.plan-overage-close svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.plan-overage-close {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}

.plan-overage-close:hover {
  border-color: transparent;
  background: rgba(148, 163, 184, 0.1);
  color: #f8fafc;
}

[data-theme="light"] .plan-overage-banner-thin {
  border-color: rgba(251, 146, 60, 0.28);
  background: linear-gradient(90deg, #fff9f7, #fffdfa 55%, #fff);
  color: #334155;
}

[data-theme="light"] .plan-overage-icon {
  border-color: rgba(248, 113, 113, 0.2);
  background: #fff7f5;
  color: #ef4444;
}

[data-theme="light"] .plan-overage-title-row strong {
  color: #172033;
}

[data-theme="light"] .plan-overage-status {
  background: #ffe4e6;
  color: #dc2626;
}

[data-theme="light"] .plan-overage-sub {
  color: #64748b;
}

[data-theme="light"] .plan-overage-sub b,
[data-theme="light"] .plan-overage-sub .plan-overage-num,
[data-theme="light"] .plan-overage-meter-value strong {
  color: #e11d48;
}

[data-theme="light"] .plan-overage-meter-value span {
  color: #64748b;
}

[data-theme="light"] .plan-overage-track {
  background: #f3e8e8;
}

[data-theme="light"] .plan-overage-close {
  color: #94a3b8;
}

[data-theme="light"] .plan-overage-close:hover {
  background: #f1f5f9;
  color: #475569;
}

@media (max-width: 1080px) {
  .plan-overage-banner-thin {
    grid-template-columns: minmax(300px, 1.45fr) minmax(190px, 0.75fr) auto 32px;
    gap: 16px;
  }

  .plan-overage-sub {
    font-size: 11px;
  }
}

@media (max-width: 880px) {
  .plan-overage-banner-thin {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px 18px;
    padding: 15px 16px;
  }

  .plan-overage-copy {
    grid-column: 1 / -1;
    padding-right: 34px;
  }

  .plan-overage-meter {
    grid-column: 1;
  }

  .plan-overage-cta {
    grid-column: 2;
  }

  .plan-overage-close {
    position: absolute;
    top: 10px;
    right: 10px;
  }
}

@media (max-width: 560px) {
  .plan-overage-banner-thin {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .plan-overage-copy {
    align-items: flex-start;
    padding-right: 28px;
  }

  .plan-overage-icon {
    width: 42px;
    height: 42px;
  }

  .plan-overage-meter {
    width: 100%;
  }

  .plan-overage-cta {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .plan-overage-cta,
  .plan-overage-close {
    transition: none;
  }
}
