html {
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Outfit, sans-serif;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  background: #111827;
  color: rgba(255, 255, 255, 0.9);
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  text-decoration: none;
}

.ds-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.ds-brand-copy {
  display: flex;
  flex-direction: column;
}

.ds-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: #6366f1;
  color: var(--color-white);
  font-weight: 700;
  letter-spacing: 0.08em;
  box-shadow: var(--shadow-theme-lg);
}

.ds-body {
  min-height: 100vh;
}

.ds-app-shell {
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 20px 18px;
}

.ds-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid rgba(208, 213, 221, 0.9);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  border-radius: 30px;
  padding: 24px 28px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}

.ds-topbar-main {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  min-width: 0;
}

.ds-topbar-copy {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.ds-topbar-copy h1 {
  margin: 0;
  color: #111827;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.02;
}

.ds-topbar-copy p {
  margin: 0;
  max-width: 62ch;
  color: var(--color-gray-600);
  font-size: 15px;
  line-height: 1.55;
}

.ds-topbar-meta {
  display: grid;
  gap: 14px;
  justify-items: end;
  min-width: 220px;
}

.ds-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  border-radius: 999px;
  background: rgba(70, 95, 255, 0.08);
  padding: 8px 12px;
  color: var(--color-brand-600);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ds-context-card {
  display: grid;
  gap: 4px;
  min-width: 210px;
  border-radius: 22px;
  border: 1px solid var(--color-gray-200);
  background: #fff;
  padding: 14px 16px;
  text-align: right;
}

.ds-context-card span {
  color: var(--color-gray-500);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ds-context-card strong {
  color: var(--color-gray-800);
  font-size: 18px;
  line-height: 1.2;
}

.ds-mini-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 132px;
  border-radius: 16px;
  background: #6366f1;
  padding: 12px 16px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 12px 28px rgba(70, 95, 255, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ds-mini-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(70, 95, 255, 0.24);
}

.ds-page-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
  padding: 4px;
}

.ds-page-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  border: 1px solid rgba(208, 213, 221, 0.9);
  background: rgba(255, 255, 255, 0.9);
  padding: 13px 18px;
  color: var(--color-gray-700);
  font-size: 14px;
  font-weight: 600;
  transition: 0.2s ease;
}

.ds-page-tab:hover {
  border-color: rgba(70, 95, 255, 0.28);
  color: var(--color-brand-600);
}

.ds-page-tab.is-active {
  border-color: transparent;
  background: #6366f1;
  color: #fff;
  box-shadow: 0 12px 28px rgba(70, 95, 255, 0.2);
}

.ds-main {
  padding-top: 24px;
}

.flash-stack {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.flash-message {
  border-radius: 16px;
  border: 1px solid rgba(208, 213, 221, 0.9);
  background: rgba(255, 255, 255, 0.92);
  padding: 14px 16px;
  font-size: 14px;
}

.flash-message.is-success {
  border-color: rgba(18, 183, 106, 0.18);
  background: var(--color-success-50);
  color: var(--color-success-700);
}

.flash-message.is-error {
  border-color: rgba(240, 68, 56, 0.18);
  background: var(--color-error-50);
  color: var(--color-error-700);
}

.dark .flash-message.is-success {
  background: rgba(18, 183, 106, 0.12);
}

.dark .flash-message.is-error {
  background: rgba(240, 68, 56, 0.12);
}

.ds-page-stack {
  display: grid;
  gap: 24px;
}

.ds-link-grid,
.ds-page-two-column,
.ds-dashboard-hero {
  display: grid;
  gap: 24px;
}

.ds-link-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ds-primary-only {
  display: grid;
}

.ds-page-two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ds-dashboard-hero {
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.95fr);
}

.ds-hero-panel,
.ds-quick-link {
  display: grid;
  gap: 12px;
  border-radius: 24px;
  border: 1px solid var(--color-gray-200);
  background: rgba(255, 255, 255, 0.96);
  padding: 24px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.ds-hero-panel h2 {
  margin: 0;
  color: var(--color-gray-900);
  font-size: clamp(2rem, 3vw, 2.5rem);
  font-weight: 700;
  line-height: 1.05;
}

.ds-hero-panel > p:last-child {
  margin: 0;
  color: var(--color-gray-600);
  font-size: 15px;
  line-height: 1.6;
}

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

.ds-stat-pill {
  border-radius: 18px;
  border: 1px solid rgba(208, 213, 221, 0.92);
  background: rgba(255, 255, 255, 0.9);
  padding: 16px;
}

.ds-stat-pill span {
  display: block;
  color: var(--color-gray-500);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ds-stat-pill strong {
  display: block;
  margin-top: 8px;
  color: var(--color-gray-900);
  font-size: 26px;
  line-height: 1.05;
}

.ds-quick-links {
  display: grid;
  gap: 14px;
}

.ds-quick-link {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.ds-quick-link:hover {
  transform: translateY(-1px);
  border-color: rgba(70, 95, 255, 0.24);
  box-shadow: var(--shadow-theme-md);
}

.ds-quick-link h3 {
  margin: 0 0 6px;
  color: var(--color-gray-900);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.1;
}

.ds-quick-link p:last-child {
  margin: 0;
  color: var(--color-gray-600);
  font-size: 14px;
  line-height: 1.55;
}

.ds-quick-link-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  border-radius: 999px;
  background: rgba(70, 95, 255, 0.08);
  padding: 10px 12px;
  color: var(--color-brand-600);
  font-size: 13px;
  font-weight: 700;
}

.ds-scroll-target {
  scroll-margin-top: 24px;
}

.ds-shell-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(320px, 0.9fr);
  gap: 24px;
}

.ds-side-column,
.ds-log-groups,
.ds-manage-grid,
.ds-analysis-grid {
  display: grid;
  gap: 24px;
}

.ds-manage-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ds-analysis-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.ds-analysis-grid > * {
  grid-column: span 4;
}

.ds-analysis-grid > .ds-wide-panel {
  grid-column: span 8;
}

.ds-primary-panel,
.ds-panel-head,
.ds-card-body,
.ds-panel-actions {
  width: 100%;
}

.ds-panel-head,
.ds-panel-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 24px;
}

.ds-panel-actions {
  flex-wrap: wrap;
}

.ds-card-body {
  padding: 20px 24px 24px;
}

.ds-kicker {
  margin: 0 0 6px;
  color: var(--color-brand-500);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ds-head-actions,
.ds-inline-form,
.ds-form-actions,
.ds-record-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ds-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid transparent;
  background: var(--color-brand-500);
  padding: 12px 18px;
  color: var(--color-white);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  transition: 0.2s ease;
}

.ds-action:hover {
  background: var(--color-brand-600);
}

.ds-action-secondary {
  border-color: var(--color-gray-200);
  background: var(--color-white);
  color: var(--color-gray-700);
}

.ds-action-secondary:hover {
  background: var(--color-gray-50);
}

.dark .ds-action-secondary {
  border-color: var(--color-gray-800);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.9);
}

.ds-calendar-wrap {
  padding: 20px 24px 24px;
}

.ds-calendar-footer {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.ds-inline-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ds-legend-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  border: 1px solid rgba(208, 213, 221, 0.92);
  background: rgba(255, 255, 255, 0.9);
  padding: 10px 14px;
  color: var(--color-gray-700);
  font-size: 13px;
  font-weight: 600;
}

.ds-calendar-labels {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
  color: var(--color-gray-500);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ds-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
}

.ds-day-card {
  min-height: 118px;
  border-radius: 20px;
  border: 1px solid var(--color-gray-200);
  background: #fff;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.ds-day-card:hover {
  transform: translateY(-1px);
  border-color: rgba(70, 95, 255, 0.25);
  box-shadow: var(--shadow-theme-md);
}

.ds-day-card.is-selected {
  border-color: var(--color-brand-500);
  box-shadow: var(--shadow-focus-ring);
}

.ds-day-card.is-dimmed {
  opacity: 0.55;
}

.ds-day-card.tone-strong {
  background: rgba(238, 242, 255, 1);
}

.ds-day-card.tone-mixed {
  background: rgba(255, 247, 237, 1);
}

.ds-day-card.tone-missed {
  background: rgba(255, 243, 242, 1);
}

.ds-day-card.tone-future {
  background: rgba(249, 250, 251, 1);
}

.dark .ds-day-card {
  border-color: var(--color-gray-800);
  background: rgba(255, 255, 255, 0.03);
}

.dark .ds-day-card.tone-strong {
  background: rgba(70, 95, 255, 0.09);
}

.dark .ds-day-card.tone-mixed {
  background: rgba(247, 144, 9, 0.1);
}

.dark .ds-day-card.tone-missed {
  background: rgba(240, 68, 56, 0.08);
}

.ds-day-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  color: var(--color-gray-500);
  font-size: 12px;
  font-weight: 600;
}

.ds-day-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: var(--color-white);
  color: var(--color-gray-800);
  font-size: 15px;
  font-weight: 700;
  box-shadow: var(--shadow-theme-xs);
}

.dark .ds-day-number {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.9);
}

.ds-day-number.is-today {
  background: var(--color-brand-500);
  color: var(--color-white);
}

.ds-dot-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ds-dot {
  --dot-color: var(--color-brand-500);
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--dot-color);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--dot-color) 12%, transparent);
}

.ds-dot.large {
  width: 14px;
  height: 14px;
}

.ds-dot-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 28px;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--color-gray-100);
  color: var(--color-gray-600);
  box-shadow: none;
  font-size: 11px;
  font-weight: 700;
}

.dark .ds-dot-more {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
}

.ds-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ds-summary-pill-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.ds-summary-pill {
  border-radius: 18px;
  border: 1px solid var(--color-gray-200);
  background: var(--color-gray-50);
  padding: 16px;
}

.ds-summary-pill span {
  display: block;
  color: var(--color-gray-500);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ds-summary-pill strong {
  display: block;
  margin-top: 8px;
  color: var(--color-gray-800);
  font-size: 24px;
  line-height: 1.1;
}

.dark .ds-summary-pill {
  border-color: var(--color-gray-800);
  background: rgba(255, 255, 255, 0.03);
}

.dark .ds-summary-pill strong {
  color: rgba(255, 255, 255, 0.9);
}

.ds-metric-card {
  border-radius: 18px;
  border: 1px solid var(--color-gray-200);
  background: var(--color-gray-50);
  padding: 16px;
}

.dark .ds-metric-card {
  border-color: var(--color-gray-800);
  background: rgba(255, 255, 255, 0.03);
}

.ds-metric-card span {
  display: block;
  color: var(--color-gray-500);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ds-metric-card strong {
  display: block;
  margin-top: 8px;
  color: var(--color-gray-800);
  font-size: 24px;
  line-height: 1.1;
}

.dark .ds-metric-card strong {
  color: rgba(255, 255, 255, 0.9);
}

.ds-legend-list,
.ds-goal-stack,
.ds-warning-list,
.ds-goal-analysis-list {
  display: grid;
  gap: 14px;
}

.ds-legend-row,
.ds-goal-analysis-item,
.ds-warning-item {
  display: grid;
  gap: 10px;
  border-radius: 16px;
  border: 1px solid var(--color-gray-200);
  background: var(--color-gray-50);
  padding: 14px 16px;
}

.dark .ds-legend-row,
.dark .ds-goal-analysis-item,
.dark .ds-warning-item {
  border-color: var(--color-gray-800);
  background: rgba(255, 255, 255, 0.03);
}

.ds-legend-meta,
.ds-goal-meta,
.ds-record-meta {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.ds-legend-meta strong,
.ds-goal-meta strong,
.ds-record-meta strong,
.ds-warning-item strong,
.ds-health-row strong {
  color: var(--color-gray-800);
  font-weight: 600;
}

.dark .ds-legend-meta strong,
.dark .ds-goal-meta strong,
.dark .ds-record-meta strong,
.dark .ds-warning-item strong,
.dark .ds-health-row strong {
  color: rgba(255, 255, 255, 0.9);
}

.ds-legend-meta p,
.ds-warning-item p,
.ds-goal-analysis-item p,
.ds-record-meta p,
.ds-health-row p {
  margin: 2px 0 0;
  color: var(--color-gray-500);
  font-size: 13px;
}

.ds-progress {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: var(--color-gray-200);
}

.dark .ds-progress {
  background: rgba(255, 255, 255, 0.08);
}

.ds-progress-fill {
  --track-color: var(--color-brand-500);
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--track-color);
}

.ds-callout {
  margin: 0 24px;
  border-radius: 16px;
  border: 1px solid rgba(247, 144, 9, 0.18);
  background: var(--color-warning-50);
  padding: 14px 16px;
  color: var(--color-warning-700);
  font-size: 14px;
}

.dark .ds-callout {
  background: rgba(247, 144, 9, 0.12);
}

.ds-callout-inline {
  margin: 16px 0 0;
}

.ds-log-groups {
  padding: 20px 24px 24px;
}

.ds-log-group {
  display: grid;
  gap: 16px;
}

.ds-log-group-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ds-log-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.ds-log-card {
  border-radius: 20px;
  border: 1px solid var(--color-gray-200);
  background: #fff;
  padding: 18px;
  box-shadow: inset 3px 0 0 var(--habit-color, var(--color-brand-500));
  display: grid;
  gap: 14px;
}

.dark .ds-log-card {
  border-color: var(--color-gray-800);
  background: rgba(255, 255, 255, 0.03);
}

.ds-log-card-top,
.ds-check {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.ds-check {
  align-items: center;
  justify-content: flex-start;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-gray-700);
}

.dark .ds-check {
  color: rgba(255, 255, 255, 0.75);
}

.ds-check input {
  accent-color: var(--color-brand-500);
  width: 18px;
  height: 18px;
}

.ds-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ds-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(70, 95, 255, 0.08);
  padding: 8px 12px;
  color: var(--color-brand-600);
  font-size: 12px;
  font-weight: 700;
}

.dark .ds-chip {
  background: rgba(70, 95, 255, 0.16);
  color: var(--color-brand-300);
}

.ds-form-grid,
.ds-half-grid {
  display: grid;
  gap: 12px;
}

.ds-form-grid {
  grid-template-columns: 140px minmax(0, 1fr);
}

.ds-note-field {
  min-width: 0;
}

.ds-goal-mini {
  display: grid;
  gap: 8px;
  border-radius: 16px;
  border: 1px solid var(--color-gray-200);
  background: rgba(255, 255, 255, 0.6);
  padding: 12px 14px;
}

.dark .ds-goal-mini {
  border-color: var(--color-gray-800);
  background: rgba(255, 255, 255, 0.03);
}

.ds-goal-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.ds-card-body {
  display: grid;
  gap: 18px;
}

.ds-app-form {
  display: grid;
  gap: 14px;
}

.ds-app-form label {
  display: grid;
  gap: 8px;
  color: var(--color-gray-700);
  font-size: 14px;
  font-weight: 500;
}

.dark .ds-app-form label {
  color: rgba(255, 255, 255, 0.85);
}

.app-input,
.app-textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--color-gray-200);
  background: transparent;
  padding: 12px 14px;
  color: var(--color-gray-800);
  font-size: 14px;
  outline: none;
}

.app-input:focus,
.app-textarea:focus {
  border-color: var(--color-brand-300);
  box-shadow: var(--shadow-focus-ring);
}

.dark .app-input,
.dark .app-textarea {
  border-color: var(--color-gray-800);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.9);
}

.app-textarea {
  resize: vertical;
  min-height: 96px;
}

.app-color-input {
  min-height: 48px;
  padding: 6px;
}

.app-input-small {
  min-height: 48px;
}

.ds-record-list {
  display: grid;
  gap: 12px;
  max-height: 340px;
  overflow: auto;
  padding-right: 4px;
}

.ds-empty-state {
  display: grid;
  gap: 8px;
  border-radius: 18px;
  border: 1px dashed var(--color-gray-300);
  background: rgba(249, 250, 251, 0.9);
  padding: 18px;
}

.ds-empty-state strong {
  color: var(--color-gray-800);
}

.ds-empty-state p {
  margin: 0;
  color: var(--color-gray-500);
  font-size: 14px;
  line-height: 1.5;
}

.ds-record-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 16px;
  border: 1px solid var(--color-gray-200);
  background: var(--color-gray-50);
  padding: 14px 16px;
}

.ds-record-row.stacked {
  align-items: flex-start;
}

.ds-record-actions form {
  margin: 0;
}

.dark .ds-record-row {
  border-color: var(--color-gray-800);
  background: rgba(255, 255, 255, 0.03);
}

.ds-text-link {
  color: var(--color-brand-600);
  font-size: 14px;
  font-weight: 600;
  background: none;
  border: 0;
  padding: 0;
}

.ds-text-link:hover {
  color: var(--color-brand-700);
}

.ds-text-danger {
  color: var(--color-error-600);
}

.ds-text-danger:hover {
  color: var(--color-error-700);
}

.ds-week-bars {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  min-height: 240px;
}

.ds-week-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ds-week-bar strong,
.ds-warning-item span {
  color: var(--color-gray-800);
  font-size: 14px;
  font-weight: 700;
}

.dark .ds-week-bar strong,
.dark .ds-warning-item span {
  color: rgba(255, 255, 255, 0.9);
}

.ds-week-bar span {
  color: var(--color-gray-500);
  font-size: 12px;
}

.ds-week-bar-track {
  width: 100%;
  height: 180px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(228, 231, 236, 0.6);
}

.dark .ds-week-bar-track {
  background: rgba(255, 255, 255, 0.06);
}

.ds-week-bar-fill {
  width: 100%;
  min-height: 16px;
  border-radius: 999px;
  background: var(--color-brand-500);
}

.ds-warning-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.ds-goal-analysis-item {
  gap: 8px;
}

.ds-health-table {
  display: grid;
  gap: 12px;
}

.ds-health-head,
.ds-health-row {
  display: grid;
  grid-template-columns: 1.6fr 0.8fr 0.8fr 0.8fr 1.4fr;
  gap: 16px;
  align-items: center;
}

.ds-health-head {
  padding: 0 4px;
  color: var(--color-gray-500);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ds-health-row {
  border-radius: 18px;
  border: 1px solid var(--color-gray-200);
  background: var(--color-gray-50);
  padding: 16px;
}

.dark .ds-health-row {
  border-color: var(--color-gray-800);
  background: rgba(255, 255, 255, 0.03);
}

.ds-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 6px 12px;
  color: var(--color-gray-500);
  font-size: 13px;
}

@media (max-width: 1380px) {
  .ds-link-grid,
  .ds-dashboard-hero,
  .ds-page-two-column,
  .ds-shell-grid {
    grid-template-columns: 1fr;
  }

  .ds-manage-grid {
    grid-template-columns: 1fr;
  }

  .ds-analysis-grid > *,
  .ds-analysis-grid > .ds-wide-panel {
    grid-column: span 12;
  }
}

@media (max-width: 1100px) {
  .ds-topbar {
    flex-direction: column;
  }

  .ds-topbar-meta {
    width: 100%;
    justify-items: stretch;
  }

  .ds-context-card {
    text-align: left;
  }

  .ds-log-grid {
    grid-template-columns: 1fr;
  }

  .ds-form-grid,
  .ds-health-head,
  .ds-health-row {
    grid-template-columns: 1fr;
  }

  .ds-health-head {
    display: none;
  }
}

@media (max-width: 900px) {
  .ds-stat-ribbon {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ds-calendar-labels,
  .ds-calendar-grid {
    gap: 8px;
  }

  .ds-day-card {
    min-height: 92px;
    padding: 10px;
  }

  .ds-day-number {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    font-size: 13px;
  }

  .ds-metric-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .ds-app-shell {
    padding: 18px 14px 14px;
  }

  .ds-topbar {
    padding: 20px 18px;
    border-radius: 24px;
  }

  .ds-topbar-main {
    flex-direction: column;
  }

  .ds-brand {
    width: 100%;
  }

  .ds-panel-head,
  .ds-panel-actions,
  .ds-log-card-top,
  .ds-record-row,
  .ds-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .ds-inline-form,
  .ds-head-actions {
    width: 100%;
  }

  .ds-inline-form .app-input,
  .ds-inline-form .ds-action,
  .ds-head-actions .ds-action,
  .ds-form-actions .ds-action,
  .ds-mini-action {
    width: 100%;
  }

  .ds-metric-grid,
  .ds-summary-pill-grid,
  .ds-stat-ribbon {
    grid-template-columns: 1fr;
  }

  .ds-calendar-grid,
  .ds-calendar-labels {
    grid-template-columns: repeat(7, minmax(42px, 1fr));
    overflow-x: auto;
  }

  .ds-calendar-wrap {
    overflow-x: auto;
  }

  .ds-log-groups,
  .ds-calendar-wrap,
  .ds-card-body,
  .ds-panel-head,
  .ds-panel-actions {
    padding-left: 16px;
    padding-right: 16px;
  }

  .ds-quick-link {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Navigation Bar
   ═══════════════════════════════════════════════════════════════════════════ */

.ds-nav {
  background: rgba(17, 24, 39, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.ds-nav-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 20px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.ds-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
}

.ds-nav-brand svg {
  color: var(--color-brand-400, #818cf8);
}

.ds-nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ds-nav-user {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s;
}

.ds-nav-user:hover {
  color: #fff;
}

.ds-nav-logout {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: 0.2s;
}

.ds-nav-logout:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Auth Pages (Login / Register) — Senior-Level Split-Pane Design
   Desktop ≥900px: hero showcase | form  |  Mobile <900px: form-only
   ═══════════════════════════════════════════════════════════════════════════ */

/* Auth shell is a fixed, full-viewport surface. The inner uses full width
   (no max cap) so the hero and form panes extend to the screen edges —
   no awkward gutters on wide monitors. Content within each pane is
   bounded by its own max-width and horizontally centered, so the two
   sides read as balanced columns regardless of viewport size. */
.auth-shell {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  background: radial-gradient(120% 100% at 0% 0%, #1a1f33 0%, #0a0e1a 55%);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  color: rgba(255, 255, 255, 0.9);
}
.auth-shell-inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100%;
}
@media (min-width: 900px) {
  .auth-shell-inner {
    flex-direction: row;
    align-items: stretch;
  }
}

/* ─────────────────────────────────────────────────────────────────────
   LEFT — Hero / Product Showcase (desktop only)
   The inner wrapper caps the overall layout at 1240px, so the hero
   pane is naturally narrower on wide screens. Content sits in a
   reasonable column without needing extreme alignment tricks.
   ───────────────────────────────────────────────────────────────────── */
.auth-hero {
  flex: 1;
  position: relative;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;        /* center all three sections horizontally */
  padding: 56px 64px;
  background:
    radial-gradient(80% 60% at 20% 10%, rgba(99, 102, 241, 0.22), transparent 60%),
    radial-gradient(60% 50% at 90% 90%, rgba(34, 197, 94, 0.12), transparent 60%),
    linear-gradient(180deg, #131a2c 0%, #0d1220 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
  min-width: 0;
}
@media (min-width: 900px) {
  .auth-hero { display: flex; }
}
@media (min-width: 1200px) {
  .auth-hero { padding: 64px 72px; }
}
/* Brand / body / foot share the same 520px column so they line up as a
   single composition when centered in a wide hero pane. */
.auth-hero-brand,
.auth-hero-body,
.auth-hero-foot {
  width: 100%;
  max-width: 520px;
  position: relative;
  z-index: 1;
}

/* Floating background orbs */
.auth-hero-orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.auth-hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
}
.auth-hero-orb-1 {
  width: 360px;
  height: 360px;
  top: -80px;
  left: -80px;
  background: #6366f1;
  animation: orbFloat 14s ease-in-out infinite;
}
.auth-hero-orb-2 {
  width: 280px;
  height: 280px;
  bottom: -60px;
  right: -60px;
  background: #22c55e;
  opacity: 0.3;
  animation: orbFloat 18s ease-in-out infinite reverse;
}
.auth-hero-orb-3 {
  width: 200px;
  height: 200px;
  top: 50%;
  right: 20%;
  background: #a855f7;
  opacity: 0.22;
  animation: orbFloat 22s ease-in-out infinite;
}
@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(40px, -30px); }
}

.auth-hero-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.auth-hero-mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: #6366f1;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.02em;
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.45);
}
.auth-hero-name {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.auth-hero-body {
  display: flex;
  flex-direction: column;
}
.auth-hero-title {
  margin: 0 0 20px;
  font-size: 44px;
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.03em;
  color: #fff;
  background: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0.72) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
@media (min-width: 1200px) {
  .auth-hero-title { font-size: 50px; }
}
.auth-hero-sub {
  margin: 0 0 40px;
  font-size: 16.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.62);
  max-width: 480px;
}

/* Single refined product artifact — bounded, no floating elements */
.auth-hero-mock {
  max-width: 460px;
  margin-bottom: 36px;
}
.auth-mock-card {
  background: linear-gradient(180deg, #1a2032 0%, #131826 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  padding: 20px;
  box-shadow:
    0 30px 60px -20px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}
.auth-mock-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.auth-mock-month {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.015em;
}
.auth-mock-sub {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 2px;
}
.auth-mock-ring {
  position: relative;
  width: 42px;
  height: 42px;
}
.auth-mock-ring-pct {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
}
.auth-mock-cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.auth-mock-cell {
  aspect-ratio: 1;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 2px;
}
.auth-mock-cell.is-today {
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}
.auth-mock-cell i {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--d, transparent);
}

/* Stat strip — three metrics with hairline dividers, replaces the
   chip row + features list with a single confident proof element. */
.auth-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  max-width: 460px;
  margin: 0;
  padding: 18px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.auth-hero-stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 16px;
}
.auth-hero-stat:first-child { padding-left: 0; }
.auth-hero-stat:last-child  { padding-right: 0; }
.auth-hero-stat + .auth-hero-stat {
  border-left: 1px solid rgba(255, 255, 255, 0.07);
}
.auth-hero-stat-key {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.42);
}
.auth-hero-stat-val {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
}
.auth-hero-stat-val span {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0;
}

.auth-hero-foot {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
}
.auth-hero-foot a {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
}
.auth-hero-foot a:hover { color: #818cf8; }

/* ─────────────────────────────────────────────────────────────────────
   RIGHT — Form Pane
   Form is centered within its half. With the 1240px cap on the outer
   wrapper, the pane is a comfortable ~600px on a 1920px monitor and the
   form (max 400px) sits with even breathing room on both sides.
   ───────────────────────────────────────────────────────────────────── */
.auth-pane {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  position: relative;
  min-width: 0;
}
@media (min-width: 900px) {
  .auth-pane { padding: 56px 48px; }
}
@media (min-width: 1200px) {
  .auth-pane { padding: 64px 64px; }
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
  animation: authCardIn 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
/* On desktop the form becomes a properly-anchored card so it reads as the
   destination. Mobile keeps it open/borderless for an unobstructed flow. */
@media (min-width: 900px) {
  .auth-card {
    max-width: 432px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 40px 36px;
    box-shadow:
      0 30px 60px -20px rgba(0, 0, 0, 0.55),
      0 0 0 1px rgba(255, 255, 255, 0.015) inset;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
}

@keyframes authCardIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Mobile-only brand mark — shown when the hero pane is hidden */
.auth-mobile-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 36px;
}
@media (min-width: 900px) {
  .auth-mobile-brand { display: none; }
}

.auth-card-head { margin-bottom: 32px; }
.auth-form-title {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.auth-form-sub {
  margin: 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.5;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Input with placeholder-style label that fades out on focus or typing */
.auth-input {
  position: relative;
  display: block;
}
.auth-input input {
  width: 100%;
  height: 52px;
  padding: 0 14px 0 42px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 13px;
  color: #fff;
  font-size: 14.5px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.auth-input input::placeholder { color: transparent; }
.auth-input input:focus {
  border-color: rgba(99, 102, 241, 0.6);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}
.auth-input label {
  position: absolute;
  left: 42px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  background: transparent;
  padding: 0;
  max-width: calc(100% - 60px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* The moment the field is focused OR has any content, hide the label
   so the user can concentrate on what they're typing. */
.auth-input input:focus + label,
.auth-input input:not(:placeholder-shown) + label {
  opacity: 0;
  transform: translateY(-50%) translateX(-4px);
}
.auth-input-hint-inline {
  color: rgba(255, 255, 255, 0.32);
  font-weight: 500;
}
.auth-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.35);
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.auth-input input:focus ~ .auth-input-icon { color: #a5b4fc; }

.auth-toggle-pw {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  padding: 6px;
  display: inline-flex;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
  z-index: 2;
}
.auth-toggle-pw:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }

/* Captcha — image on top, input below. Never overflows. */
.auth-captcha {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 13px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  box-sizing: border-box;
}
.auth-captcha-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.auth-captcha-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.5);
}
.auth-captcha-refresh {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: 0.2s;
  flex-shrink: 0;
}
.auth-captcha-refresh:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.auth-captcha-img {
  display: block;
  width: 100%;
  height: 60px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #1e293b;
  object-fit: contain;
  box-sizing: border-box;
}
.auth-captcha-input {
  display: block;
  width: 100%;
  height: 46px;
  padding: 0 14px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  color: #fff;
  font-size: 15px;
  outline: none;
  font-family: inherit;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  box-sizing: border-box;
}
.auth-captcha-input::placeholder { color: rgba(255, 255, 255, 0.35); letter-spacing: normal; }
.auth-captcha-input:focus {
  border-color: rgba(99, 102, 241, 0.55);
  background: rgba(0, 0, 0, 0.3);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* Submit */
.auth-submit {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 22px;
  min-height: 52px;
  border: none;
  border-radius: 13px;
  background: #6366f1;
  color: #fff;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
  box-shadow: 0 10px 26px rgba(99, 102, 241, 0.38);
  margin-top: 10px;
  -webkit-tap-highlight-color: transparent;
}
.auth-submit svg { transition: transform 0.2s; }
.auth-submit:hover {
  background: #5253e6;
  box-shadow: 0 14px 32px rgba(99, 102, 241, 0.48);
}
.auth-submit:hover svg { transform: translateX(2px); }
.auth-submit:active { transform: scale(0.99); }

/* Divider with label */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 28px 0 18px;
  color: rgba(255, 255, 255, 0.3);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
}

/* Try demo (secondary) */
.auth-demo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  transition: 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.auth-demo svg { color: #818cf8; }
.auth-demo:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.14);
  color: #fff;
}

/* Switch link at bottom */
.auth-switch {
  text-align: center;
  margin: 26px 0 0;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.5);
}
.auth-switch a {
  color: #a5b4fc;
  font-weight: 700;
  text-decoration: none;
}
.auth-switch a:hover { color: #c7d2fe; text-decoration: underline; }

/* Mobile tweaks — tightened vertical rhythm for a more professional feel */
@media (max-width: 768px) {
  .auth-pane { padding: 36px 22px 48px; }
  .auth-mobile-brand { margin-bottom: 32px; }
  .auth-card-head { margin-bottom: 28px; }
  .auth-form { gap: 12px; }
  .auth-submit { margin-top: 12px; }
  .auth-divider { margin: 24px 0 16px; }
  .auth-switch { margin-top: 24px; }
}

@media (max-width: 480px) {
  .auth-pane { padding: 28px 20px 44px; }
  .auth-mobile-brand { margin-bottom: 28px; gap: 9px; }
  .auth-mobile-brand .auth-hero-mark { width: 32px; height: 32px; font-size: 15px; border-radius: 10px; }
  .auth-mobile-brand .auth-hero-name { font-size: 15px; }
  .auth-card-head { margin-bottom: 24px; }
  .auth-form-title { font-size: 22px; }
  .auth-form-sub { font-size: 13.5px; }
  .auth-form { gap: 12px; }
  .auth-input input { font-size: 16px; }   /* prevent iOS zoom */
  .auth-input label { font-size: 16px; }
  .auth-input { /* keep height comfy */ }
  .auth-input input { height: 50px; }
  .auth-captcha { padding: 12px; }
  .auth-captcha-img { height: 56px; }
  .auth-submit { min-height: 50px; margin-top: 14px; }
  .auth-divider { margin: 22px 0 14px; }
  .auth-demo { min-height: 46px; font-size: 13px; }
  .auth-switch { margin-top: 22px; font-size: 13px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Account Settings Page
   ═══════════════════════════════════════════════════════════════════════════ */

.account-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 0 40px;
}

.account-header {
  margin-bottom: 24px;
}

.account-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px 6px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 18px;
  transition: 0.2s;
}

.account-back:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.account-header h1 {
  margin: 0 0 6px;
  font-size: 30px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.account-header p {
  margin: 0;
  color: rgba(255, 255, 255, 0.45);
  font-size: 14px;
  line-height: 1.5;
}

/* ── Profile hero ───────────────────────────────────────────────────── */
.account-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
  background: rgba(99, 102, 241, 0.05);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 22px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.account-hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, rgba(99, 102, 241, 0) 70%);
  pointer-events: none;
}

.account-hero-avatar {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #6366f1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.02em;
  box-shadow: 0 8px 22px rgba(99, 102, 241, 0.4);
  position: relative;
  z-index: 1;
}
.account-hero-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
  z-index: 1;
}
.account-hero-name {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-hero-handle {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
}
.account-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.14);
  color: #4ade80;
  font-size: 11.5px;
  font-weight: 700;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.account-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.account-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 22px;
  padding: 26px;
  transition: border-color 0.2s;
}
.account-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
}

.account-card-danger {
  background: rgba(239, 68, 68, 0.04);
  border-color: rgba(239, 68, 68, 0.18);
}
.account-card-danger:hover {
  border-color: rgba(239, 68, 68, 0.28);
}

.account-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.account-card-danger .account-card-head {
  border-bottom-color: rgba(239, 68, 68, 0.1);
}

.account-card-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.18);
  color: #a5b4fc;
}
.account-card-danger .account-card-icon {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.account-card-head-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.account-card-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
}
.account-card-head-sub {
  font-size: 12.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.4;
}

.account-card-body {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.account-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.account-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.account-field label {
  color: rgba(255, 255, 255, 0.5);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.account-input {
  width: 100%;
  padding: 13px 16px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: #fff;
  font-size: 14.5px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  min-height: 48px;
}

.account-input:focus {
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
  background: rgba(0, 0, 0, 0.32);
}

.account-input-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.account-hint {
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
  line-height: 1.45;
  margin-top: 2px;
}

.account-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin: 4px 0;
}

.account-btn {
  align-self: flex-start;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 13px;
  font-weight: 700;
  font-size: 14px;
}

/* Danger zone row layout */
.account-danger-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.account-danger-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 220px;
}
.account-danger-copy strong {
  font-size: 14.5px;
  font-weight: 700;
  color: #fff;
}
.account-danger-copy span {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.5;
}

.account-btn-danger {
  align-self: flex-start;
  padding: 12px 20px;
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
  min-height: 46px;
  white-space: nowrap;
  font-family: inherit;
}
.account-btn-danger:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.45);
}

.account-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: 0.2s;
  min-height: 44px;
}

.account-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
}

.ds-dialog {
  background: #1f2937;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 28px;
  color: white;
  width: min(420px, calc(100vw - 32px));
  max-width: 420px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Slide-in animation for flash messages
   ═══════════════════════════════════════════════════════════════════════════ */

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Enhanced Mobile Responsiveness
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 480px) {
  .ds-app-shell {
    padding: 14px 14px 96px;
  }

  .ds-nav-inner {
    padding: 0 12px;
    height: 50px;
  }

  .ds-nav-user {
    display: none;
  }

  .ds-nav-brand span {
    font-size: 14px;
  }

  .ds-day-card {
    min-height: 70px;
    padding: 6px;
    border-radius: 12px;
  }

  .ds-day-number {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    font-size: 12px;
  }

  .ds-day-top small {
    font-size: 10px;
  }

  .ds-dot {
    width: 8px;
    height: 8px;
  }

  .ds-dot-stack {
    gap: 4px;
  }

  .ds-calendar-labels,
  .ds-calendar-grid {
    gap: 4px;
  }

  .ds-calendar-labels span {
    font-size: 10px;
  }

  .ds-dialog {
    padding: 20px 16px;
    border-radius: 16px;
  }

  .ds-panel-head {
    padding: 16px !important;
    gap: 12px !important;
  }

  .ds-calendar-footer {
    padding: 16px !important;
  }

  .account-card {
    padding: 20px 16px;
    border-radius: 16px;
  }

  .account-header h1 {
    font-size: 22px;
  }

  .account-btn,
  .account-btn-danger {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 360px) {
  .ds-calendar-labels,
  .ds-calendar-grid {
    grid-template-columns: repeat(7, minmax(36px, 1fr));
  }

  .ds-day-card {
    min-height: 56px;
    padding: 4px;
  }

  .ds-dot-stack {
    display: none;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Mobile Navigation — Hamburger Menu
   ═══════════════════════════════════════════════════════════════════════════ */

.ds-nav-hamburger {
  display: none;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: 0.2s;
}

.ds-nav-hamburger:active {
  background: rgba(255, 255, 255, 0.08);
}

/* Backdrop behind the profile drawer */
.ds-mobile-menu-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  z-index: 1001;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.ds-mobile-menu-backdrop.open {
  display: block;
  opacity: 1;
}

/* Profile drawer — slides in from the right */
.ds-mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 86vw);
  background: rgba(17, 24, 39, 0.99);
  backdrop-filter: blur(20px);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: -24px 0 60px rgba(0, 0, 0, 0.45);
  z-index: 1002;
  display: flex;
  flex-direction: column;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  gap: 6px;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  visibility: hidden;
}

.ds-mobile-menu.open {
  transform: translateX(0);
  visibility: visible;
}

.ds-mobile-menu-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 6px 18px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.ds-mobile-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 14px;
  background: #6366f1;
  color: #fff;
  font-weight: 800;
  font-size: 18px;
}

.ds-mobile-menu-id {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.ds-mobile-menu-name {
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ds-mobile-menu-user {
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
  font-weight: 500;
}

.ds-mobile-menu-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: 0.2s;
}

.ds-mobile-menu-close:active {
  background: rgba(255, 255, 255, 0.12);
}

.ds-mobile-menu-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ds-mobile-menu a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 14px;
  transition: 0.2s;
}

.ds-mobile-menu a svg {
  color: rgba(255, 255, 255, 0.45);
  transition: color 0.2s;
}

.ds-mobile-menu a:hover,
.ds-mobile-menu a:active {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.ds-mobile-menu a.is-active {
  background: rgba(99, 102, 241, 0.14);
  color: #c7d2fe;
}

.ds-mobile-menu a.is-active svg {
  color: #818cf8;
}

.ds-mobile-menu-logout-form {
  margin: auto 0 0;
  padding-top: 12px;
}

.ds-mobile-menu .mobile-logout {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  color: #f87171;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.18);
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}

.ds-mobile-menu .mobile-logout:active {
  background: rgba(239, 68, 68, 0.16);
}

/* Lock background scroll while the drawer is open */
body.ds-menu-open {
  overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Tablet & Mobile — 768px
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .ds-nav-hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .ds-nav-right {
    gap: 8px;
  }

  .ds-nav-user,
  .ds-nav-logout {
    display: none;
  }

  .ds-nav-brand span {
    font-size: 14px;
  }

  .ds-nav-inner {
    padding: 0 14px;
  }

  .ds-app-shell {
    padding: 16px 16px 96px;
  }

  .ds-calendar-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
  }

  .ds-calendar-labels,
  .ds-calendar-grid {
    min-width: 700px;
    gap: 4px;
  }

  .ds-calendar-labels span {
    font-size: 11px;
  }

  .ds-day-card {
    min-height: 78px;
    padding: 8px 6px;
  }

  .ds-panel-head {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 16px !important;
    padding: 18px !important;
  }

  .ds-panel-head > div:last-child {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .account-page {
    max-width: 100%;
    padding: 0 4px 120px;
  }

  .account-card {
    padding: 20px 16px;
    border-radius: 16px;
  }

  .account-header h1 {
    font-size: 22px;
  }

  .account-field > div {
    flex-direction: column;
  }

  .account-btn,
  .account-btn-danger,
  .account-btn-secondary {
    width: 100%;
    justify-content: center;
  }

  .ds-dialog {
    width: calc(100vw - 24px);
    max-width: none;
    padding: 24px 18px;
    border-radius: 20px;
  }

  dialog {
    margin: 0;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    transform: none;
    width: 100%;
    max-width: 100%;
    border-radius: 20px 20px 0 0;
    max-height: 90vh;
    overflow-y: auto;
  }

  .flash-stack {
    bottom: 90px !important;
    right: 12px !important;
    left: 12px !important;
  }

  .flash-message {
    font-size: 13px;
    padding: 12px 16px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Small Mobile — 480px (extends existing 480px breakpoint)
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 480px) {
  .ds-nav-inner {
    height: 48px;
  }

  .ds-nav-logout {
    display: none;
  }

  .ds-nav-right {
    gap: 4px;
  }

  .auth-submit {
    min-height: 50px;
    font-size: 16px;
  }

  .account-card {
    border-radius: 14px;
  }

  .account-input {
    font-size: 16px;
    min-height: 48px;
  }

  input[type="month"].app-input {
    width: 100%;
    min-height: 44px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Mobile Bottom Navigation Bar
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .ds-mobile-bottom-nav {
    display: grid;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.97);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 998;
    padding: 6px 8px;
    padding-bottom: max(6px, env(safe-area-inset-bottom));
    align-items: center;
    justify-items: center;
    height: 64px;
  }
  .ds-mobile-bottom-nav.is-tri {
    grid-template-columns: repeat(3, 1fr);
  }
  .ds-mobile-bottom-nav.is-duo {
    grid-template-columns: repeat(2, 1fr);
  }

  .ds-mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 4px;
    color: rgba(255, 255, 255, 0.45);
    text-decoration: none;
    font-size: 10.5px;
    font-weight: 600;
    border-radius: 14px;
    transition: 0.2s;
    width: 100%;
    max-width: 84px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
  }

  .ds-mobile-nav-item svg {
    width: 22px;
    height: 22px;
  }

  .ds-mobile-nav-item { position: relative; }
  .ds-mobile-nav-item.active {
    color: #818cf8;
  }
  .ds-mobile-nav-item.active::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 26px;
    height: 3px;
    border-radius: 0 0 4px 4px;
    background: #818cf8;
  }

  .ds-mobile-nav-item:active {
    transform: scale(0.94);
  }

}

@media (min-width: 769px) {
  .ds-mobile-bottom-nav {
    display: none;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Touch Target & Usability Improvements
   ═══════════════════════════════════════════════════════════════════════════ */

@media (pointer: coarse) {
  .ds-day-card {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
  }

  .ds-day-card:active {
    transform: scale(0.96);
    transition: transform 0.1s;
  }

  button,
  .ds-action,
  .auth-submit,
  .account-btn,
  .account-btn-danger,
  .account-btn-secondary,
  a[role="button"] {
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
  }

  input[type="checkbox"] {
    min-width: 24px;
    min-height: 24px;
  }

  input[type="radio"] {
    min-width: 22px;
    min-height: 22px;
  }

  .status-btn {
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  select,
  input[type="month"] {
    min-height: 44px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Prevent horizontal overflow
   ═══════════════════════════════════════════════════════════════════════════ */

body {
  overflow-x: hidden;
  max-width: 100vw;
}

img, svg, video, canvas {
  max-width: 100%;
  height: auto;
}

.ds-calendar-wrap::-webkit-scrollbar {
  height: 4px;
}

.ds-calendar-wrap::-webkit-scrollbar-track {
  background: transparent;
}

.ds-calendar-wrap::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Mobile Dashboard Layout — Efficiency-Focused
   ═══════════════════════════════════════════════════════════════════════════ */

/* Show/hide desktop vs mobile layouts */
.ds-desktop-layout { display: block; }
.ds-mobile-layout { display: none; }

@media (max-width: 767px) {
  .ds-desktop-layout { display: none; }
  .ds-mobile-layout { display: block; }
}

/* ── Month Selector Bar ─────────────────────────────────────────────── */

.mob-month-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 0 0 16px;
}

.mob-month-label {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  min-width: 130px;
  text-align: center;
}

.mob-month-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 18px;
  font-weight: 600;
  transition: 0.2s;
}

.mob-month-arrow:active {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

/* ── Efficiency Score Card ──────────────────────────────────────────── */

/* ── Efficiency Score Card ──────────────────────────────────────────── */

.mob-efficiency-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 22px;
  padding: 24px 20px 20px;
  margin-bottom: 14px;
}

/* Ring */
.mob-eff-ring-wrap {
  position: relative;
  width: 130px;
  height: 130px;
  margin: 0 auto 16px;
}

.mob-eff-ring {
  width: 130px;
  height: 130px;
  filter: drop-shadow(0 0 20px rgba(99,102,241,0.15));
}

.mob-eff-ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.mob-eff-pct {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.02em;
}

.mob-eff-pct small {
  font-size: 16px;
  font-weight: 600;
  opacity: 0.6;
  margin-left: 1px;
}

.mob-eff-sub {
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  font-weight: 600;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Stats row */
.mob-eff-stats {
  display: flex;
  gap: 0;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 16px;
}

.mob-eff-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 4px 6px;
}

.mob-eff-stat + .mob-eff-stat {
  border-left: 1px solid rgba(255,255,255,0.06);
}

.mob-eff-stat strong {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.mob-eff-stat span {
  font-size: 10px;
  color: rgba(255,255,255,0.35);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── Today Quick-Log Card ───────────────────────────────────────────── */

.mob-today-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 16px;
}

.mob-today-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.mob-today-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.mob-today-date-badge {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.05);
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
}

/* Smooth dialog animation — uses keyframes since display:none→block kills transitions */
@keyframes dialogIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.ds-dialog[open] {
  animation: dialogIn 0.2s ease forwards;
}

dialog::backdrop {
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Habit toggle rows */
.mob-habit-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 18px;
}

.mob-habit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255,255,255,0.02);
  border: 1.5px solid rgba(255,255,255,0.05);
  cursor: pointer;
  transition: 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.mob-habit-row.is-done {
  background: rgba(99,102,241,0.08);
  border-color: rgba(99,102,241,0.25);
  box-shadow: 0 0 12px rgba(99,102,241,0.06);
}

.mob-habit-row:active {
  background: rgba(255,255,255,0.06);
  transform: scale(0.985);
}

.mob-habit-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mob-habit-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.mob-habit-name {
  font-size: 15px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
}

/* Custom toggle switch replacing native checkbox */
.mob-toggle {
  position: relative;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mob-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.mob-toggle-knob {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 14px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  transition: 0.25s;
  position: relative;
}

.mob-toggle-knob::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255,255,255,0.6);
  transition: 0.25s;
}

.mob-toggle input:checked + .mob-toggle-knob {
  background: rgba(99,102,241,0.3);
  border-color: rgba(99,102,241,0.5);
}

.mob-toggle input:checked + .mob-toggle-knob::after {
  left: 23px;
  background: #818cf8;
  box-shadow: 0 2px 8px rgba(99,102,241,0.4);
}

/* Empty state */
.mob-empty-state {
  text-align: center;
  padding: 24px;
  color: rgba(255,255,255,0.3);
  font-size: 14px;
}

.mob-empty-state p {
  margin: 8px 0 0;
}

/* Day status chips */
.mob-status-chips {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.mob-status-chip {
  flex: 1;
  min-width: 60px;
  text-align: center;
  padding: 8px 4px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  cursor: pointer;
  transition: 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.mob-status-chip input { display: none; }

.mob-status-chip.is-active,
.mob-status-chip:has(input:checked) {
  color: #fff;
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
}

.mob-status-chip.chip-green:has(input:checked) {
  background: rgba(34,197,94,0.2);
  border-color: rgba(34,197,94,0.4);
  color: #4ade80;
}

.mob-status-chip.chip-yellow:has(input:checked) {
  background: rgba(234,179,8,0.2);
  border-color: rgba(234,179,8,0.4);
  color: #facc15;
}

.mob-status-chip.chip-red:has(input:checked) {
  background: rgba(239,68,68,0.2);
  border-color: rgba(239,68,68,0.4);
  color: #f87171;
}

/* Save button */
.mob-save-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 14px;
  background: #6366f1;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.mob-save-btn:active {
  opacity: 0.85;
}

/* ── Week Strip ─────────────────────────────────────────────────────── */

.mob-section {
  margin-bottom: 20px;
}

.mob-section-title {
  font-size: 14px;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mob-week-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}

.mob-week-day {
  flex: 1;
  min-width: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px;
  border-radius: 14px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  cursor: pointer;
  transition: 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.mob-week-day:active {
  background: rgba(255,255,255,0.08);
}

.mob-week-day.is-today {
  background: rgba(99,102,241,0.15);
  border-color: rgba(99,102,241,0.3);
}

.mob-week-day.tone-strong {
  border-color: rgba(34,197,94,0.2);
}

.mob-week-day-name {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
}

.mob-week-day-num {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

/* Week progress bars */
.mob-week-bar-wrap {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}
.mob-week-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: #4ade80;
  transition: width 0.4s;
}

/* ── Month Heatmap (GitHub-style) ──────────────────────────────────── */

.mob-heatmap {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.mob-heat-cell {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.15s;
  -webkit-tap-highlight-color: transparent;
  min-width: 32px;
  min-height: 32px;
}

.mob-heat-num {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.55);
  line-height: 1;
}

.mob-heat-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px;
  max-width: 100%;
  padding: 0 2px;
}

.mob-heat-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.25);
}

/* Cell states — category dots convey activity (no more less/more scale) */
.mob-heat-cell { background: rgba(255,255,255,0.05); }
.mob-heat-cell.is-empty  { background: rgba(255,255,255,0.035); }
.mob-heat-cell.has-dots  { background: rgba(255,255,255,0.07); }
.mob-heat-cell.is-future { background: rgba(255,255,255,0.012); }
.mob-heat-cell.is-future .mob-heat-num { color: rgba(255,255,255,0.16); }

/* Day status background fills — like desktop calendar */
.mob-heat-cell.status-green  { background: rgba(34,197,94,0.16); }
.mob-heat-cell.status-yellow { background: rgba(234,179,8,0.16); }
.mob-heat-cell.status-red    { background: rgba(239,68,68,0.16); }

/* Today highlight */
.mob-heat-cell.is-today {
  outline: 2px solid #818cf8;
  outline-offset: 2px;
}
.mob-heat-cell.is-today .mob-heat-num { color: #fff; font-weight: 700; }

/* ── Category Progress Bars ─────────────────────────────────────────── */

.mob-cat-progress-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mob-cat-progress-item {
  background: rgba(255,255,255,0.02);
  border-radius: 14px;
  padding: 12px 14px;
}

.mob-cat-progress-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.mob-cat-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.mob-cat-name {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.8);
}

.mob-cat-pct {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
}

.mob-cat-bar-bg {
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}

.mob-cat-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

/* ── Category Edit/Delete on Mobile ─────────────────────────────────── */

.mob-cat-actions {
  display: flex;
  gap: 6px;
  margin-left: 8px;
}

.mob-cat-edit-btn,
.mob-cat-del-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 13px;
  transition: 0.2s;
  -webkit-tap-highlight-color: transparent;
  vertical-align: middle;
  line-height: 1;
  padding: 0;
}

.mob-cat-edit-btn {
  background: rgba(99,102,241,0.12);
  border-color: rgba(99,102,241,0.15);
  color: #818cf8;
}

.mob-cat-edit-btn:active {
  background: rgba(99,102,241,0.25);
}

.mob-cat-del-btn {
  background: rgba(239,68,68,0.1);
  border-color: rgba(239,68,68,0.15);
  color: #f87171;
}

.mob-cat-del-btn:active {
  background: rgba(239,68,68,0.25);
}

/* ── Password Modal Centering ───────────────────────────────────────── */

.password-modal {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  bottom: auto !important;
  right: auto !important;
  width: min(420px, calc(100vw - 32px)) !important;
  max-width: 420px !important;
  border-radius: 20px !important;
  max-height: 90vh !important;
  overflow-y: auto !important;
  margin: 0 !important;
}

/* ── Danger Zone ──────────────────────────────────────────────────── */

/* ── General Mobile Button Polish ───────────────────────────────────── */

@media (max-width: 767px) {
  .mob-save-btn,
  .auth-submit {
    border-radius: 14px;
    font-weight: 600;
    letter-spacing: 0.01em;
  }

  .mob-cat-progress-item {
    padding: 14px 14px;
    border: 1px solid rgba(255,255,255,0.04);
  }

  .mob-status-chips {
    gap: 6px;
  }

  .mob-status-chip {
    border-radius: 10px;
    padding: 10px 6px;
    font-size: 11px;
  }
}

/* ── Category Modal ────────────────────────────────────────────────── */

.cat-modal {
  padding: 28px 24px 24px;
  width: min(380px, calc(100vw - 32px));
}

.cat-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.cat-field span {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
}

.cat-field input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  color: #fff;
  font-size: 14px;
  outline: none;
  min-height: 46px;
  transition: border-color 0.2s;
}

.cat-field input[type="text"]:focus {
  border-color: #818cf8;
}

.cat-field input[type="color"] {
  width: 100%;
  height: 42px;
  cursor: pointer;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: transparent;
  padding: 3px;
}

.cat-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.cat-btn-cancel {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}

.cat-btn-cancel:hover { background: rgba(255,255,255,0.08); color: #fff; }

.cat-btn-save {
  flex: 2;
  padding: 12px;
  border-radius: 12px;
  border: none;
  background: #6366f1;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.cat-btn-save:hover { background: #5558e6; }

/* ── Toast Notifications (non-intrusive) ────────────────────────────── */

.toast-msg {
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s, transform 0.3s;
  animation: toastIn 0.25s ease-out;
  max-width: 320px;
  text-align: center;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.toast-info  { background: rgba(99,102,241,0.9); }
.toast-error { background: rgba(239,68,68,0.9); }
.toast-success { background: rgba(34,197,94,0.9); }

/* ── Custom Confirm Dialog ──────────────────────────────────────────── */

.toast-dialog {
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px;
  background: #1f2937;
  padding: 0;
  width: min(340px, calc(100vw - 40px));
  box-shadow: 0 25px 50px rgba(0,0,0,0.5);
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  margin: 0 !important;
  bottom: auto !important;
  right: auto !important;
}

.toast-dialog::backdrop {
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
}

.toast-dialog-inner {
  padding: 24px 20px;
  text-align: center;
}

.toast-btn-cancel,
.toast-btn-ok {
  flex: 1;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: 0.2s;
}

.toast-btn-cancel {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.7);
}

.toast-btn-cancel:hover {
  background: rgba(255,255,255,0.12);
}

.toast-btn-ok {
  background: rgba(239,68,68,0.15);
  color: #f87171;
}

.toast-btn-ok:hover {
  background: rgba(239,68,68,0.25);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Professional Mobile Polish (≤767px)
   Layered refinements on top of the base mobile rules + new components.
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 767px) {
  .ds-mobile-layout { padding-bottom: 8px; }

  /* ── Greeting header ─────────────────────────────────────────────── */
  .mob-greeting {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 2px 2px 16px;
  }
  .mob-greeting-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .mob-greet-hi {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.45);
  }
  .mob-greet-name {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .mob-streak-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    padding: 8px 13px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
    color: #fb923c;
    background: rgba(249, 115, 22, 0.15);
    border: 1px solid rgba(249, 115, 22, 0.32);
  }
  .mob-streak-chip svg { width: 15px; height: 15px; }
  .mob-streak-chip.is-zero {
    color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
  }

  /* ── Month selector → contained pill ─────────────────────────────── */
  .mob-month-bar {
    justify-content: space-between;
    gap: 12px;
    padding: 7px 7px 7px 16px;
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
  }
  .mob-month-label { flex: 1; min-width: 0; font-size: 15px; }
  .mob-month-arrow { width: 34px; height: 34px; background: rgba(255, 255, 255, 0.05); }

  /* ── Efficiency card ─────────────────────────────────────────────── */
  .mob-efficiency-card {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
    border-radius: 22px;
  }
  .mob-eff-pct { font-size: 34px; }
  .mob-eff-stat strong { font-size: 20px; }

  /* ── Today quick-log card ────────────────────────────────────────── */
  .mob-today-card {
    background: rgba(255, 255, 255, 0.035);
    border-color: rgba(255, 255, 255, 0.09);
    border-radius: 22px;
    padding: 20px 18px;
  }
  .mob-today-head { align-items: flex-start; margin-bottom: 14px; }
  .mob-today-head-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
  .mob-today-sub { font-size: 13px; font-weight: 500; color: rgba(255, 255, 255, 0.45); }
  .mob-today-sub strong { color: #818cf8; font-weight: 800; }
  .mob-today-bar-track {
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    overflow: hidden;
    margin-bottom: 18px;
  }
  .mob-today-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: #6366f1;
    transition: width 0.45s ease;
  }
  .mob-habit-row { padding: 15px 16px; border-radius: 16px; }
  .mob-habit-name { font-size: 15px; }
  .mob-habit-dot { width: 11px; height: 11px; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.04); }

  /* Field label above the day-status chips */
  .mob-field-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: rgba(255, 255, 255, 0.35);
    margin-bottom: 8px;
  }

  /* ── Week strip ──────────────────────────────────────────────────── */
  .mob-week-strip { gap: 7px; scroll-snap-type: x proximity; }
  .mob-week-day {
    min-width: 46px;
    padding: 11px 6px;
    border-radius: 16px;
    scroll-snap-align: start;
  }
  .mob-week-day.is-today { box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.4); }
  .mob-week-day-num { font-size: 17px; }
  .mob-week-bar-fill { background: #22c55e; }

  /* ── Month heatmap ───────────────────────────────────────────────── */
  .mob-heatmap { gap: 4px; }
  .mob-heat-cell {
    border-radius: 9px;
    gap: 2px;
    padding: 3px 0;
  }
  .mob-heat-num { font-size: 11px; }
  .mob-heat-cell.has-dots .mob-heat-num { color: rgba(255,255,255,0.85); }

  /* Category color legend — identify what each dot means */
  .mob-heat-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin-top: 12px;
  }
  .mob-heat-cat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.55);
  }
  .mob-heat-cat i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.25);
  }

  /* ── Category progress ───────────────────────────────────────────── */
  .mob-cat-progress-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
  }
  .mob-cat-count {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    font-variant-numeric: tabular-nums;
  }
  .mob-cat-pct { min-width: 40px; text-align: right; color: #fff; }


  /* ── Day-status chips & section titles ───────────────────────────── */
  .mob-status-chip { padding: 10px 6px; border-radius: 12px; font-size: 12px; }
  .mob-section-title { font-size: 13px; color: rgba(255, 255, 255, 0.55); }

  /* ── Auth & account entrance + comfort ───────────────────────────── */
  .auth-card { animation: mobFadeUp 0.45s ease both; }
  .account-hero { animation: mobFadeUp 0.45s ease both; }
  .account-grid > * { animation: mobFadeUp 0.45s ease both; }
  .account-grid > *:nth-child(1) { animation-delay: 0.06s; }
  .account-grid > *:nth-child(2) { animation-delay: 0.12s; }
  .account-grid > *:nth-child(3) { animation-delay: 0.18s; }

  /* ── Staggered dashboard entrance ────────────────────────────────── */
  .ds-mobile-layout > * { animation: mobFadeUp 0.5s ease both; }
  .ds-mobile-layout > *:nth-child(1) { animation-delay: 0.03s; }
  .ds-mobile-layout > *:nth-child(2) { animation-delay: 0.07s; }
  .ds-mobile-layout > *:nth-child(3) { animation-delay: 0.11s; }
  .ds-mobile-layout > *:nth-child(4) { animation-delay: 0.15s; }
  .ds-mobile-layout > *:nth-child(5) { animation-delay: 0.19s; }
  .ds-mobile-layout > *:nth-child(6) { animation-delay: 0.23s; }
  .ds-mobile-layout > *:nth-child(7) { animation-delay: 0.27s; }
}

@keyframes mobFadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Account Settings — Professional Mobile Polish (mobile only)
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 767px) {
  .account-page {
    padding: 4px 2px 120px;
  }

  .account-header {
    margin-bottom: 18px;
    padding: 0 4px;
  }
  .account-back {
    padding: 7px 14px 7px 10px;
    margin-bottom: 18px;
  }
  .account-header h1 {
    font-size: 26px;
    letter-spacing: -0.02em;
  }
  .account-header p {
    font-size: 13.5px;
  }

  /* Profile hero on mobile */
  .account-hero {
    padding: 18px 18px;
    gap: 14px;
    border-radius: 20px;
    margin-bottom: 18px;
  }
  .account-hero-avatar {
    width: 56px;
    height: 56px;
    font-size: 22px;
  }
  .account-hero-name { font-size: 17px; }
  .account-hero-handle { font-size: 12.5px; }
  .account-hero-badge {
    font-size: 10.5px;
    padding: 4px 8px;
  }

  .account-grid { gap: 16px; }

  .account-card {
    padding: 22px 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  }
  .account-card-danger {
    background: rgba(239, 68, 68, 0.05);
    border-color: rgba(239, 68, 68, 0.2);
  }

  /* Card head — tighter on mobile */
  .account-card-head {
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 16px;
  }
  .account-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
  }
  .account-card-icon svg { width: 18px; height: 18px; }
  .account-card-head h2 { font-size: 15.5px; }
  .account-card-head-sub { font-size: 11.5px; }

  .account-card-body { gap: 20px; }

  /* Fields */
  .account-field label {
    font-size: 11px;
    letter-spacing: 0.06em;
  }
  .account-input {
    min-height: 50px;
    font-size: 16px;
    border-radius: 13px;
  }
  .account-hint {
    font-size: 11.5px;
    line-height: 1.5;
  }
  .account-divider { margin: 6px 0; }

  /* Primary action — full-width pill on mobile */
  .account-btn {
    align-self: stretch;
    width: 100%;
    min-height: 50px;
    border-radius: 13px;
    font-size: 14.5px;
    justify-content: center;
  }
  .account-btn.ds-action {
    background: #6366f1;
    border: none;
    color: #fff;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.32);
  }

  /* Danger row stacks vertically on mobile */
  .account-danger-row {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  .account-danger-copy { min-width: 0; }
  .account-danger-copy strong { font-size: 14px; }
  .account-danger-copy span { font-size: 12.5px; }
  .account-btn-danger {
    width: 100%;
    align-self: stretch;
    min-height: 50px;
    border-radius: 13px;
    font-size: 14.5px;
    justify-content: center;
    display: flex;
    align-items: center;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Categories — Slide-Up Bottom Sheet (mobile only)
   z-index sits ABOVE the bottom nav (998) so the sheet isn't occluded
   ═══════════════════════════════════════════════════════════════════════════ */

/* Hard hide on desktop — the sheet markup is rendered for all viewports */
.mob-sheet,
.mob-sheet-backdrop { display: none; }

@media (max-width: 767px) {
  .mob-sheet-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.25s;
  }
  .mob-sheet-backdrop.is-open {
    display: block;
    opacity: 1;
  }

  .mob-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1001;
    background: #131826;
    border-radius: 24px 24px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 -18px 60px rgba(0, 0, 0, 0.6);
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .mob-sheet.is-open {
    transform: translateY(0);
  }

  .mob-sheet-handle {
    width: 44px;
    height: 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.14);
    margin: 12px auto 0;
    flex-shrink: 0;
  }

  .mob-sheet-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px 14px;
    flex-shrink: 0;
  }
  .mob-sheet-head-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
  }
  .mob-sheet-head-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
  }
  .mob-sheet-head-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.6);
    padding: 0;
    transition: 0.2s;
    -webkit-tap-highlight-color: transparent;
  }
  .mob-sheet-head-btn:active { transform: scale(0.94); }
  .mob-sheet-head-btn.is-active {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.35);
    color: #c7d2fe;
  }

  /* Reorder hint banner */
  .mob-sheet-reorder-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 18px 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.22);
    color: #c7d2fe;
    font-size: 12px;
    font-weight: 500;
  }
  .mob-sheet-reorder-hint svg { flex-shrink: 0; color: #a5b4fc; }
  .mob-sheet-reorder-done {
    margin-left: auto;
    background: rgba(99, 102, 241, 0.25);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 10px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .mob-sheet-reorder-done:active { transform: scale(0.95); }

  /* Reorder arrows on each category row — hidden unless reorder mode */
  .mob-cat-reorder {
    display: none;
    align-items: center;
    gap: 4px;
    margin-left: 4px;
  }
  .mob-cat-reorder-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(99, 102, 241, 0.14);
    border: 1px solid rgba(99, 102, 241, 0.22);
    color: #c7d2fe;
    cursor: pointer;
    padding: 0;
    transition: 0.15s;
    -webkit-tap-highlight-color: transparent;
  }
  .mob-cat-reorder-btn:active {
    transform: scale(0.92);
    background: rgba(99, 102, 241, 0.22);
  }
  .mob-cat-reorder-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
  }
  /* When reorder mode is on, show arrows + hide edit/delete buttons */
  .mob-cat-progress-list.is-reordering .mob-cat-reorder { display: inline-flex; }
  .mob-cat-progress-list.is-reordering .mob-cat-actions { display: none; }
  .mob-cat-progress-list.is-reordering .mob-cat-progress-item {
    background: rgba(99, 102, 241, 0.06);
    border-color: rgba(99, 102, 241, 0.15);
    transition: background 0.2s;
  }
  .mob-sheet-head h3 {
    margin: 0;
    font-size: 19px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
  }
  .mob-sheet-head-sub {
    font-size: 12.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.45);
  }

  .mob-sheet-close {
    background: rgba(255, 255, 255, 0.07);
    border: none;
    border-radius: 10px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.55);
    padding: 0;
    transition: background 0.2s;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
  }
  .mob-sheet-close:active {
    background: rgba(255, 255, 255, 0.14);
  }

  /* Sticky action bar — "+ Add Category" */
  .mob-sheet-actions {
    padding: 0 20px 14px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }
  .mob-sheet-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 46px;
    padding: 0 16px;
    border-radius: 14px;
    border: none;
    background: #6366f1;
    color: #fff;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 700;
    letter-spacing: -0.01em;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.32);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    -webkit-tap-highlight-color: transparent;
  }
  .mob-sheet-add-btn:active {
    transform: scale(0.98);
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.25);
  }
  .mob-sheet-add-btn svg { color: #fff; }

  .mob-sheet-body {
    overflow-y: auto;
    padding: 16px 18px 32px;
    flex: 1;
    -webkit-overflow-scrolling: touch;
  }

  /* Empty state */
  .mob-sheet-empty {
    text-align: center;
    padding: 40px 20px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }
  .mob-sheet-empty-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.12);
    color: #a5b4fc;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
  }
  .mob-sheet-empty-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
  }
  .mob-sheet-empty-sub {
    margin: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.5;
    max-width: 260px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   First-Run Onboarding — Senior-Level Polish
   In-product styled illustrations, slim progress bar, brand header,
   smooth slide transitions, final CTA opens Add Category modal.
   ═══════════════════════════════════════════════════════════════════════════ */

.ob-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: radial-gradient(120% 90% at 50% 0%, rgba(99, 102, 241, 0.18) 0%, rgba(8, 11, 22, 0.85) 60%);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: obFade 0.3s ease both;
  -webkit-tap-highlight-color: transparent;
}
.ob-overlay.is-leaving { animation: obFade 0.2s ease reverse both; }

@keyframes obFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.ob-card {
  width: 100%;
  max-width: 460px;
  background: linear-gradient(180deg, #1a2032 0%, #141928 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 26px;
  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  overflow: hidden;
  position: relative;
  animation: obPop 0.42s cubic-bezier(0.18, 0.89, 0.32, 1.28) both;
  display: flex;
  flex-direction: column;
}

@keyframes obPop {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Header — brand + close */
.ob-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 14px;
}
.ob-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ob-brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: #6366f1;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.02em;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}
.ob-brand-text {
  font-size: 13.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: -0.01em;
}
.ob-close {
  background: rgba(255, 255, 255, 0.06);
  border: none;
  border-radius: 8px;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: 0.2s;
}
.ob-close:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

/* Slim progress bar */
.ob-progress-track {
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  margin: 0 20px;
  border-radius: 2px;
  overflow: hidden;
}
.ob-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #818cf8);
  border-radius: 2px;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Steps container */
.ob-steps {
  padding: 24px 28px 8px;
  min-height: 340px;
  display: flex;
  flex-direction: column;
}
.ob-step {
  display: none;
  text-align: center;
  flex: 1;
  flex-direction: column;
  align-items: center;
}
.ob-step.is-active {
  display: flex;
  animation: obSlide 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@keyframes obSlide {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: translateX(0); }
}

.ob-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #818cf8;
  margin-bottom: 8px;
}
.ob-step h3 {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.ob-step p {
  margin: 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  line-height: 1.55;
  max-width: 340px;
}

/* Visual canvas — sits above the title text */
.ob-visual {
  width: 100%;
  height: 160px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Welcome step — avatar + subtle confetti */
.ob-visual-welcome { padding-top: 16px; }
.ob-welcome-avatar {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  box-shadow:
    0 12px 30px rgba(99, 102, 241, 0.5),
    0 0 0 8px rgba(99, 102, 241, 0.1);
  position: relative;
  z-index: 1;
}
.ob-confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.ob-confetti span {
  position: absolute;
  top: 60%;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--c);
  opacity: 0;
  transform: translate(-50%, 0);
  animation: obConfettiBurst 1.1s ease-out var(--d, 0s) forwards;
}
@keyframes obConfettiBurst {
  0% { opacity: 0; transform: translate(-50%, 0) scale(0.5) rotate(0deg); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--x)), -90px) scale(1) rotate(180deg); }
}

/* Categories mock — looks like an in-product card */
.ob-visual-cats { padding: 0; }
.ob-mock-card {
  width: 280px;
  background: #131726;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35);
  text-align: left;
}
.ob-mock-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.ob-mock-card-icon {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: rgba(99, 102, 241, 0.18);
  color: #a5b4fc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ob-mock-card-title {
  font-size: 12.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
}
.ob-mock-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  border-radius: 8px;
}
.ob-mock-row + .ob-mock-row { margin-top: 2px; }
.ob-mock-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.04);
  flex-shrink: 0;
}
.ob-mock-label {
  flex: 1;
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
}
.ob-mock-pct {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.45);
  font-variant-numeric: tabular-nums;
}

/* Week strip mock */
.ob-visual-week { padding: 0; }
.ob-mock-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  width: 320px;
}
.ob-mock-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  min-height: 64px;
  justify-content: space-between;
}
.ob-mock-day.is-today {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.18);
}
.ob-mock-dow {
  font-size: 9px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.ob-mock-num {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}
.ob-mock-day.is-today .ob-mock-num { color: #c7d2fe; }
.ob-mock-dots {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 2px;
}
.ob-mock-dots i {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
}

/* Status chips mock */
.ob-visual-status { padding: 0; }
.ob-mock-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  max-width: 320px;
}
.ob-mock-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid transparent;
}
.ob-mock-chip i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.2);
}
.ob-mock-chip-green {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.32);
  color: #86efac;
}
.ob-mock-chip-green i { background: #22c55e; }
.ob-mock-chip-yellow {
  background: rgba(234, 179, 8, 0.14);
  border-color: rgba(234, 179, 8, 0.32);
  color: #fde047;
}
.ob-mock-chip-yellow i { background: #eab308; }
.ob-mock-chip-red {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.32);
  color: #fca5a5;
}
.ob-mock-chip-red i { background: #ef4444; }

/* Footer */
.ob-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 16px;
}
.ob-step-count {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  font-variant-numeric: tabular-nums;
}
.ob-step-divider { padding: 0 2px; color: rgba(255, 255, 255, 0.2); }
.ob-step-total { color: rgba(255, 255, 255, 0.4); }

.ob-foot-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ob-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 10px 8px;
  border-radius: 8px;
  transition: 0.2s;
}
.ob-back:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }

.ob-next {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #6366f1;
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 0 18px;
  min-height: 42px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(99, 102, 241, 0.4);
  transition: transform 0.15s, box-shadow 0.15s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.ob-next:hover {
  transform: translateY(-1px);
  background: #5253e6;
  box-shadow: 0 12px 28px rgba(99, 102, 241, 0.5);
}
.ob-next:active { transform: translateY(0) scale(0.97); }

/* Mobile tweaks */
@media (max-width: 480px) {
  .ob-overlay { padding: 12px; }
  .ob-card { border-radius: 22px; }
  .ob-card-head { padding: 14px 18px 12px; }
  .ob-progress-track { margin: 0 18px; }
  .ob-steps { padding: 20px 22px 4px; min-height: 320px; }
  .ob-visual { height: 140px; margin-bottom: 18px; }
  .ob-welcome-avatar { width: 72px; height: 72px; font-size: 28px; }
  .ob-mock-card { width: 100%; max-width: 280px; }
  .ob-mock-week { width: 100%; max-width: 320px; gap: 4px; }
  .ob-mock-day { min-height: 56px; padding: 6px 2px; }
  .ob-mock-num { font-size: 12px; }
  .ob-step h3 { font-size: 19px; }
  .ob-step p { font-size: 13.5px; }
  .ob-card-foot { padding: 14px 18px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .ds-mobile-layout > *,
  .auth-card,
  .account-grid > *,
  .ds-dialog[open],
  .mob-today-bar-fill,
  .mob-cat-bar-fill,
  .mob-week-bar-fill,
  .mob-eff-ring circle,
  .ob-overlay,
  .ob-card,
  .ob-step {
    animation: none !important;
    transition: none !important;
  }
}
