@keyframes page-slide-in {
  from { transform: translateX(30px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
/* ==========================================================================
   HeroUI Design System — CSS Variables, BEM Components & Utilities
   Based on HeroUI v3 design tokens and BEM methodology
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Theme Variables (Light Mode)
   -------------------------------------------------------------------------- */
:root {
  color-scheme: light;

  /* Primitive Colors */
  --white: oklch(100% 0 0);
  --black: oklch(0% 0 0);
  --snow: oklch(0.9911 0 0);
  --eclipse: oklch(0.2103 0.0059 285.89);

  /* Spacing */
  --spacing: 0.25rem;

  /* Border & Radius */
  --border-width: 1px;
  --field-border-width: 0px;
  --disabled-opacity: 0.5;
  --ring-offset-width: 2px;
  --radius: 0.5rem;
  --field-radius: calc(var(--radius) * 1.5);

  /* Cursors */
  --cursor-interactive: pointer;
  --cursor-disabled: not-allowed;

  /* Base Colors */
  --background: oklch(0.9702 0 0);
  --foreground: var(--eclipse);

  /* Surface Colors */
  --surface: var(--white);
  --surface-foreground: var(--foreground);
  --surface-secondary: oklch(0.9524 0.0013 286.37);
  --surface-tertiary: oklch(0.9373 0.0013 286.37);

  /* Overlay Colors */
  --overlay: var(--white);
  --overlay-foreground: var(--foreground);

  /* Muted & Scrollbar */
  --muted: oklch(0.5517 0.0138 285.94);
  --scrollbar: oklch(87.1% 0.006 286.286);

  /* Default & Accent */
  --default: oklch(94% 0.001 286.375);
  --default-foreground: var(--eclipse);
  --accent: oklch(0.6204 0.195 253.83);
  --accent-foreground: var(--snow);

  /* Form Fields */
  --field-background: var(--white);
  --field-foreground: oklch(0.2103 0.0059 285.89);
  --field-placeholder: var(--muted);
  --field-border: transparent;

  /* Status Colors */
  --success: oklch(0.7329 0.1935 150.81);
  --success-foreground: var(--eclipse);
  --warning: oklch(0.7819 0.1585 72.33);
  --warning-foreground: var(--eclipse);
  --danger: oklch(0.6532 0.2328 25.74);
  --danger-foreground: var(--snow);

  /* Component Colors */
  --segment: var(--white);
  --segment-foreground: var(--eclipse);
  --border: oklch(90% 0.004 286.32);
  --separator: oklch(92% 0.004 286.32);
  --focus: var(--accent);
  --link: var(--foreground);
  --backdrop: rgba(0, 0, 0, 0.5);

  /* Status Soft */
  --accent-soft: color-mix(in oklab, var(--accent) 15%, transparent);
  --danger-soft: color-mix(in oklab, var(--danger) 15%, transparent);
  --warning-soft: color-mix(in oklab, var(--warning) 15%, transparent);
  --success-soft: color-mix(in oklab, var(--success) 15%, transparent);

  /* Hover States */
  --surface-hover: color-mix(in oklab, var(--surface) 92%, var(--surface-foreground) 8%);
  --accent-hover: color-mix(in oklab, var(--accent) 90%, var(--accent-foreground) 10%);
  --default-hover: color-mix(in oklab, var(--default) 96%, var(--default-foreground) 4%);
  --danger-hover: color-mix(in oklab, var(--danger) 90%, var(--danger-foreground) 10%);
  --success-hover: color-mix(in oklab, var(--success) 90%, var(--success-foreground) 10%);

  /* Soft Hover */
  --accent-soft-hover: color-mix(in oklab, var(--accent) 20%, transparent);
  --danger-soft-hover: color-mix(in oklab, var(--danger) 20%, transparent);

  /* Shadows */
  --surface-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.04), 0 1px 2px 0 rgba(0, 0, 0, 0.06), 0 0 1px 0 rgba(0, 0, 0, 0.06);
  --overlay-shadow: 0 4px 16px 0 rgba(24, 24, 27, 0.08), 0 8px 24px 0 rgba(24, 24, 27, 0.09);
  --field-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.04), 0 1px 2px 0 rgba(0, 0, 0, 0.06), 0 0 1px 0 rgba(0, 0, 0, 0.06);

  /* Radius Levels */
  --radius-xs: calc(var(--radius) * 0.25);
  --radius-sm: calc(var(--radius) * 0.5);
  --radius-md: calc(var(--radius) * 0.75);
  --radius-lg: calc(var(--radius) * 1);
  --radius-xl: calc(var(--radius) * 1.5);
  --radius-2xl: calc(var(--radius) * 2);
  --radius-3xl: calc(var(--radius) * 3);
  --radius-4xl: calc(var(--radius) * 4);

  /* Separator Levels */
  --separator-secondary: color-mix(in oklab, var(--surface) 85%, var(--surface-foreground) 15%);
  --separator-tertiary: color-mix(in oklab, var(--surface) 81%, var(--surface-foreground) 19%);

  /* background-inverse */
  --background-inverse: var(--foreground);
}

/* --------------------------------------------------------------------------
   2. Base / Reset
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-y: scroll; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif; }
body { background: var(--background); color: var(--foreground); min-height: 100vh; -webkit-tap-highlight-color: transparent; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* --------------------------------------------------------------------------
   3. Surface
   -------------------------------------------------------------------------- */
.surface { background: var(--surface); color: var(--surface-foreground); }
.surface--transparent { background: transparent; }
.surface--default { background: var(--surface); color: var(--surface-foreground); }
.surface--secondary { background: var(--surface-secondary); color: var(--surface-secondary-foreground); }
.surface--tertiary { background: var(--surface-tertiary); color: var(--surface-tertiary-foreground); }

/* --------------------------------------------------------------------------
   4. Typography
   -------------------------------------------------------------------------- */
.typography { color: var(--foreground); }
.typography--h1 { font-size: 2.25rem; font-weight: 600; letter-spacing: -0.025em; line-height: 1.2; }
.typography--h2 { font-size: 1.875rem; font-weight: 600; letter-spacing: -0.025em; line-height: 1.3; }
.typography--h3 { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.025em; }
.typography--h4 { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.025em; }
.typography--h5 { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.025em; }
.typography--h6 { font-size: 1rem; font-weight: 600; }
.typography--body { font-size: 1rem; line-height: 1.75; }
.typography--body-sm { font-size: 0.875rem; line-height: 1.5; }
.typography--body-xs { font-size: 0.75rem; line-height: 1.25; }
.typography--muted { color: var(--muted); }
.typography--mono { font-family: "SF Mono", "Fira Code", "Fira Mono", Menlo, Consolas, monospace; font-size: 0.875rem; }

/* --------------------------------------------------------------------------
   5. Navigation
   -------------------------------------------------------------------------- */
.nav { background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--surface-shadow); position: sticky; top: 0; z-index: 40; }
.nav__inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 1rem; padding: 0.75rem 1.5rem; }
.nav__brand { font-size: 1.125rem; font-weight: 600; color: var(--foreground); display: flex; align-items: center; gap: 0.5rem; text-decoration: none; }
.nav__brand:hover { text-decoration: none; opacity: 0.8; }
.nav__links { display: flex; align-items: center; gap: 0.25rem; margin-left: auto; }
.nav__link { display: inline-flex; align-items: center; padding: 0.375rem 0.75rem; font-size: 0.875rem; font-weight: 500; color: var(--muted); border-radius: var(--radius-2xl); transition: background-color 100ms, color 100ms; text-decoration: none; }
.nav__link:hover { background: var(--default); color: var(--foreground); text-decoration: none; }
.nav__link--active { background: var(--default); color: var(--foreground); }

/* --------------------------------------------------------------------------
   6. Container / Layout
   -------------------------------------------------------------------------- */
.container { max-width: 1200px; margin: 0 auto; padding: 1.5rem; }

/* --------------------------------------------------------------------------
   7. Button
   -------------------------------------------------------------------------- */
.button {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  height: 2.5rem; padding: 0 1rem; border-radius: var(--radius-3xl);
  font-size: 0.875rem; font-weight: 500; white-space: nowrap;
  border: none; outline: none; cursor: var(--cursor-interactive);
  transition: transform 250ms, background-color 100ms, box-shadow 100ms;
  transform: translateZ(0);
  text-decoration: none; line-height: 1;
}
.button:hover { text-decoration: none; }
.button:active { transform: scale(0.97); }
.button:disabled, .button[disabled] { opacity: var(--disabled-opacity); cursor: var(--cursor-disabled); transform: none; }

.button--primary { background: var(--accent); color: var(--accent-foreground); }
.button--primary:hover:not(:disabled) { background: var(--accent-hover); }

.button--secondary { background: var(--default); color: var(--accent-soft-foreground); }
.button--secondary:hover:not(:disabled) { background: var(--default-hover); }

.button--tertiary { background: var(--default); color: var(--foreground); }
.button--tertiary:hover:not(:disabled) { background: var(--default-hover); }

.button--outline { background: transparent; color: var(--default-foreground); border: 1px solid var(--border); }
.button--outline:hover:not(:disabled) { background: var(--default); }

.button--ghost { background: transparent; color: var(--default-foreground); }
.button--ghost:hover:not(:disabled) { background: var(--default); }

.button--danger { background: var(--danger); color: var(--danger-foreground); }
.button--danger:hover:not(:disabled) { background: var(--danger-hover); }

.button--sm { height: 2.25rem; padding: 0 0.75rem; font-size: 0.8125rem; }
.button--lg { height: 2.75rem; padding: 0 1.25rem; font-size: 1rem; }
.button--full { width: 100%; }

/* --------------------------------------------------------------------------
   8. Card
   -------------------------------------------------------------------------- */
.card {
  position: relative; display: flex; flex-direction: column; gap: 0.75rem;
  padding: 1rem; border-radius: min(32px, var(--radius-3xl));
  background: var(--surface); color: var(--surface-foreground);
  box-shadow: var(--surface-shadow);
}
.card--transparent { background: transparent; box-shadow: none; border: none; }
.card--secondary { background: var(--surface-secondary); }
.card--tertiary { background: var(--surface-tertiary); }
.card__header { display: flex; flex-direction: column; gap: 0.25rem; }
.card__title { font-size: 0.875rem; font-weight: 500; line-height: 1.5; color: var(--foreground); }
.card__description { font-size: 0.875rem; line-height: 1.25; color: var(--muted); }
.card__content { flex: 1; display: flex; flex-direction: column; gap: 0.25rem; }
.card__footer { display: flex; align-items: center; gap: 0.5rem; }

/* --------------------------------------------------------------------------
   9. Table
   -------------------------------------------------------------------------- */
.table-root { display: grid; width: 100%; overflow: clip; }
.table__scroll-container { overflow-x: auto; }
.table__content { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.875rem; }
.table__header { border-bottom: 1px solid var(--separator); background: var(--surface-secondary); }
.table__column { padding: 0.625rem 1rem; text-align: left; font-size: 0.75rem; font-weight: 500; color: var(--muted); white-space: nowrap; }
.table__body { }
.table__row { border-bottom: 1px solid var(--separator); transition: background-color 100ms; }
.table__row:last-child { border-bottom: none; }
.table__row:hover { background: var(--default); }
.table__cell { padding: 0.75rem 1rem; vertical-align: middle; color: var(--foreground); background: var(--surface); border-bottom: 1px solid var(--separator-tertiary); }
.table__row:last-child .table__cell { border-bottom: none; }
.table__cell--muted { color: var(--muted); }

/* --------------------------------------------------------------------------
   10. Modal
   -------------------------------------------------------------------------- */
.modal__backdrop {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  background: var(--backdrop);
}
.modal__container { position: relative; width: 100%; max-width: 28rem; margin: 1rem; }
.modal__dialog {
  background: var(--overlay); border-radius: var(--radius-2xl);
  box-shadow: var(--overlay-shadow); padding: 1.5rem;
  position: relative; max-height: 90vh; overflow-y: auto;
}
.modal__header { margin-bottom: 1rem; display: flex; align-items: center; justify-content: space-between; }
.modal__title { font-size: 1.125rem; font-weight: 600; }
.modal__close { background: none; border: none; cursor: var(--cursor-interactive); color: var(--muted); padding: 0.25rem; border-radius: var(--radius-sm); }
.modal__close:hover { color: var(--foreground); background: var(--default); }
.modal__body { margin-bottom: 1rem; }
.modal__footer { display: flex; align-items: center; justify-content: flex-end; gap: 0.5rem; }

/* --------------------------------------------------------------------------
   11. Chip / Badge
   -------------------------------------------------------------------------- */
.chip {
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 0.125rem 0.625rem; border-radius: var(--radius-3xl);
  font-size: 0.75rem; font-weight: 500; line-height: 1.5;
  white-space: nowrap;
}
.chip--accent { background: var(--accent-soft); color: var(--accent); }
.chip--success { background: var(--success-soft); color: var(--success); }
.chip--warning { background: var(--warning-soft); color: var(--warning); }
.chip--danger { background: var(--danger-soft); color: var(--danger); }
.chip--default { background: var(--default); color: var(--default-foreground); }

/* Solid variant */
.chip--solid.chip--accent { background: var(--accent); color: var(--accent-foreground); }
.chip--solid.chip--success { background: var(--success); color: var(--success-foreground); }
.chip--solid.chip--warning { background: var(--warning); color: var(--warning-foreground); }
.chip--solid.chip--danger { background: var(--danger); color: var(--danger-foreground); }

/* --------------------------------------------------------------------------
   12. Progress Bar
   -------------------------------------------------------------------------- */
.progress-bar { display: grid; width: 100%; gap: 0.25rem; }
.progress-bar__label { font-size: 0.875rem; font-weight: 500; }
.progress-bar__track { position: relative; overflow: hidden; border-radius: var(--radius-sm); background: var(--default); height: 0.5rem; }
.progress-bar__fill { position: absolute; top: 0; left: 0; height: 100%; border-radius: var(--radius-sm); background: var(--accent); transition: width 300ms; }
.progress-bar--success .progress-bar__fill { background: var(--success); }
.progress-bar--warning .progress-bar__fill { background: var(--warning); }
.progress-bar--danger .progress-bar__fill { background: var(--danger); }
.progress-bar--sm .progress-bar__track { height: 0.25rem; }
.progress-bar--lg .progress-bar__track { height: 0.75rem; }

/* --------------------------------------------------------------------------
   13. Form Elements
   -------------------------------------------------------------------------- */
.form-group { display: flex; flex-direction: column; gap: 0.375rem; margin-bottom: 1rem; }
.form-group label { font-size: 0.875rem; font-weight: 500; color: var(--foreground); }
.form-group small { font-size: 0.75rem; color: var(--muted); }

.input {
  display: flex; align-items: center; gap: 0.5rem;
  width: 100%; height: 2.5rem; padding: 0 0.75rem;
  background: var(--field-background); color: var(--field-foreground);
  border: var(--field-border-width) solid var(--field-border);
  border-radius: var(--field-radius); outline: none;
  font-size: 0.875rem; line-height: 1;
  box-shadow: var(--field-shadow);
  transition: border-color 150ms, box-shadow 150ms;
}
.input:focus { border-color: var(--focus); box-shadow: 0 0 0 2px var(--accent-soft); }
.input::placeholder { color: var(--field-placeholder); }
.input--with-border { --field-border: var(--border); --field-border-width: 1px; }

select.input { cursor: var(--cursor-interactive); appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.75rem center; padding-right: 2rem; }
select.input option { color: var(--foreground); background: var(--overlay); }

textarea.input { height: auto; min-height: 5rem; padding: 0.75rem; line-height: 1.5; resize: vertical; }

/* --------------------------------------------------------------------------
   14. Stats Cards (Dashboard)
   -------------------------------------------------------------------------- */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; margin-bottom: 1.5rem; }
@media (max-width: 640px) { .stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; } .stat-card { background: none; padding: 0.625rem; } .stat-card__value { font-size: 1.375rem; } }
@media (max-width: 768px) {
  .stats-grid::-webkit-scrollbar,
  .filter-row::-webkit-scrollbar {
    display: none;
  }
  .stats-grid,
  .filter-row {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
}

.stat-card { display: flex; flex-direction: column; gap: 0.25rem; padding: 1rem; }
.stat-card__value { font-size: 1.75rem; font-weight: 600; line-height: 1; }
.stat-card__label { font-size: 0.8125rem; color: var(--muted); }

/* --------------------------------------------------------------------------
   15. Account/Task Cards
   -------------------------------------------------------------------------- */
.card-grid { display: grid; gap: 0.75rem; }

/* --------------------------------------------------------------------------
   16. Status & Membership Badges (existing styles enhanced)
   -------------------------------------------------------------------------- */
.status-dot { display: inline-block; width: 0.5rem; height: 0.5rem; border-radius: 50%; margin-right: 0.25rem; vertical-align: middle; }
.status-dot.status-ok { background: var(--success); }
.status-dot.status-missing { background: var(--danger); }
.status-dot.status-empty { background: var(--warning); }
.status-dot.status-invalid { background: var(--danger); }
.status-dot.status-no_account { background: var(--muted); }

.type-badge { display: inline-flex; align-items: center; padding: 0.125rem 0.5rem; border-radius: var(--radius-3xl); font-size: 0.6875rem; font-weight: 500; }
.type-badge--enterprise { background: var(--accent-soft); color: var(--accent); }
.type-badge--personal { background: color-mix(in oklab, #7c3aed 15%, transparent); color: #7c3aed; }

/* --------------------------------------------------------------------------
   17. Alert / Notification
   -------------------------------------------------------------------------- */
.alert { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; border-radius: var(--radius-xl); font-size: 0.875rem; }
.alert--warning { background: var(--warning-soft); color: var(--warning); }
.alert--danger { background: var(--danger-soft); color: var(--danger); }
.alert--success { background: var(--success-soft); color: var(--success); }

/* --------------------------------------------------------------------------
   18. Flex / Grid Utility
   -------------------------------------------------------------------------- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* --------------------------------------------------------------------------
   19. Spacing Utility
   -------------------------------------------------------------------------- */
.p-0 { padding: 0; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.m-0 { margin: 0; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.ml-auto { margin-left: auto; }
.mr-2 { margin-right: 0.5rem; }

/* --------------------------------------------------------------------------
   20. Text Utility
   -------------------------------------------------------------------------- */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-muted { color: var(--muted); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-accent { color: var(--accent); }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.word-break { word-break: break-all; }

/* --------------------------------------------------------------------------
   21. Width / Height Utility
   -------------------------------------------------------------------------- */
.w-full { width: 100%; }
.max-w-xs { max-width: 20rem; }
.max-w-sm { max-width: 24rem; }
.max-w-md { max-width: 28rem; }
.max-w-lg { max-width: 32rem; }
.max-w-2xl { max-width: 42rem; }

/* --------------------------------------------------------------------------
   22. Border Utility
   -------------------------------------------------------------------------- */
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-2xl { border-radius: var(--radius-2xl); }
.border { border: 1px solid var(--border); }
.border-b { border-bottom: 1px solid var(--border); }

/* --------------------------------------------------------------------------
   23. Shadow Utility
   -------------------------------------------------------------------------- */
.shadow-surface { box-shadow: var(--surface-shadow); }
.shadow-overlay { box-shadow: var(--overlay-shadow); }

/* --------------------------------------------------------------------------
   24. Overflow
   -------------------------------------------------------------------------- */
.overflow-auto { overflow: auto; }
.overflow-hidden { overflow: hidden; }

/* --------------------------------------------------------------------------
   25. Hidden / Display
   -------------------------------------------------------------------------- */
.hidden { display: none; }
.block { display: block; }

/* --------------------------------------------------------------------------
   26. Info Grid (Account cards)
   -------------------------------------------------------------------------- */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.375rem; margin: 0.5rem 0; font-size: 0.8125rem; }
.info-grid > div { line-height: 1.6; }

/* --------------------------------------------------------------------------
   27. Task List
   -------------------------------------------------------------------------- */
.task-list { display: flex; flex-direction: column; gap: 0.5rem; }
.task-card { display: flex; flex-direction: column; gap: 0.25rem; padding: 1rem; border-radius: var(--radius-xl); background: var(--surface); box-shadow: var(--surface-shadow); text-decoration: none; color: var(--foreground); transition: box-shadow 150ms; }
.task-card:hover { box-shadow: var(--overlay-shadow); text-decoration: none; }
.task-card__main { display: flex; align-items: center; gap: 0.75rem; }
.task-card__name { font-size: 0.9375rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 65%; flex-shrink: 1; min-width: 0; }
.task-card__mode { font-size: 0.75rem; color: var(--muted); padding: 0.125rem 0.5rem; background: var(--default); border-radius: var(--radius-3xl); flex-shrink: 0; }
.task-card__status { font-size: 0.75rem; padding: 0.125rem 0.5rem; border-radius: var(--radius-3xl); font-weight: 500; flex-shrink: 0; }
.task-card__mode { font-size: 0.75rem; color: var(--muted); padding: 0.125rem 0.5rem; background: var(--default); border-radius: var(--radius-3xl); }
.task-card__status { font-size: 0.75rem; padding: 0.125rem 0.5rem; border-radius: var(--radius-3xl); font-weight: 500; }
.task-card__status.status-pending { background: var(--default); color: var(--muted); }
.task-card__status.status-running { background: var(--accent-soft); color: var(--accent); }
.task-card__status.status-completed { background: var(--success-soft); color: var(--success); }
.task-card__status.status-failed { background: var(--danger-soft); color: var(--danger); }
.task-card__status.status-cancelled { background: var(--default); color: var(--muted); }
.task-card__meta { display: flex; gap: 0.75rem; font-size: 0.75rem; color: var(--muted); flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   28. Header Bar
   -------------------------------------------------------------------------- */
.header-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }

/* --------------------------------------------------------------------------
   29. Cookie / Status Bar
   -------------------------------------------------------------------------- */
.status-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; margin-bottom: 1.5rem; background: var(--surface); border-radius: var(--radius-xl); box-shadow: var(--surface-shadow); font-size: 0.875rem; }

/* --------------------------------------------------------------------------
   30. Progress Area
   -------------------------------------------------------------------------- */
.progress-area { margin-top: 1rem; }

/* --------------------------------------------------------------------------
   31. Batch Controls
   -------------------------------------------------------------------------- */
.batch-controls { background: var(--surface); border-radius: var(--radius-xl); padding: 1.25rem; margin-bottom: 1.25rem; box-shadow: var(--surface-shadow); max-width: 37.5rem; }

/* --------------------------------------------------------------------------
   32. Login Help & Instructions
   -------------------------------------------------------------------------- */
.login-help { margin-top: 1.25rem; background: var(--surface); border-radius: var(--radius-xl); padding: 1rem; font-size: 0.8125rem; color: var(--muted); box-shadow: var(--surface-shadow); }

/* --------------------------------------------------------------------------
   33. Account Card Login
   -------------------------------------------------------------------------- */
.login-cards { display: grid; gap: 0.75rem; }
.login-card { display: flex; flex-direction: column; gap: 0.5rem; padding: 1rem; border-radius: var(--radius-xl); background: var(--surface); box-shadow: var(--surface-shadow); }
.login-card h3 { font-size: 1rem; font-weight: 600; }
.login-email { font-size: 0.875rem; color: var(--foreground); }
.login-msg { font-size: 0.8125rem; }

/* --------------------------------------------------------------------------
   34. Card Actions
   -------------------------------------------------------------------------- */
.card-actions { display: flex; gap: 0.375rem; margin-top: 0.5rem; flex-wrap: wrap; }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }

/* --------------------------------------------------------------------------
   35. Radio Label (Modal type selector)
   -------------------------------------------------------------------------- */
.radio-label { display: flex; align-items: center; gap: 0.375rem; cursor: var(--cursor-interactive); padding: 0.5rem 1rem; border: 2px solid var(--border); border-radius: var(--radius-xl); transition: border-color 150ms, background-color 150ms; }
.radio-label.selected { border-color: var(--accent); background: var(--accent-soft); }

/* --------------------------------------------------------------------------
   36. Membership / Status Badges
   -------------------------------------------------------------------------- */
.membership-badge { display: inline-block; padding: 0.125rem 0.5rem; border-radius: var(--radius-3xl); font-size: 0.75rem; font-weight: 500; }
.membership-vip-enterprise { background: #fffbe6; color: #d48806; border: 1px solid #ffe58f; }
.membership-novip-enterprise { background: #fff7e6; color: #d46b08; border: 1px solid #ffd591; }
.membership-pro { background: #f9f0ff; color: #531dab; border: 1px solid #d3adf7; }
.membership-member { background: #e6f7ff; color: #096dd9; border: 1px solid #91d5ff; }
.membership-none { background: #f5f5f5; color: #8c8c8c; border: 1px solid #d9d9d9; }

.status-badge { display: inline-block; padding: 0.125rem 0.5rem; border-radius: var(--radius-3xl); font-size: 0.75rem; font-weight: 500; }
.status-normal { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; }
.status-frozen { background: #fff1f0; color: #cf1322; border: 1px solid #ffa39e; }
.status-expired { background: #fff7e6; color: #d46b08; border: 1px solid #ffd591; }
/* Avatar & Dropdown */
.avatar-wrap { position: relative; display: inline-flex; padding: 0.25rem 0.5rem; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 0.875rem; font-weight: 600; cursor: pointer; user-select: none; }
.avatar:hover { background: var(--accent); color: #fff; }
.dropdown-menu { display: none; position: absolute; right: 0; top: 100%; margin-top: 8px; min-width: 200px; background: var(--surface); border-radius: var(--radius-xl); box-shadow: 0 8px 32px rgba(0,0,0,0.15); z-index: 1000; overflow: hidden; }
.avatar:hover { background: var(--accent); color: #fff; }
.dropdown-menu { display: none; position: absolute; right: 0; top: 100%; margin-top: 8px; min-width: 200px; background: var(--surface); border-radius: var(--radius-xl); box-shadow: 0 8px 32px rgba(0,0,0,0.15); z-index: 1000; overflow: hidden; }
.dropdown-header { padding: 0.875rem 1rem; }
.dropdown-username { font-size: 0.875rem; font-weight: 500; }
.dropdown-points { font-size: 0.75rem; color: var(--muted); margin-top: 0.375rem; }
.dropdown-sep { height: 1px; background: var(--border); margin: 0; }
.dropdown-item { padding: 0.625rem 1rem; font-size: 0.8125rem; cursor: pointer; transition: background 100ms; color: var(--foreground); white-space: nowrap; }
.dropdown-item:hover { background: var(--default); }
/* Modal */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.4); z-index: 2000; overflow: auto; }
.modal-card { max-width: 400px; margin: 12vh auto; }
/* Task card spacing */
#taskList > .task-card { margin-bottom: 0.5rem; display: block; }


/* Bottom Navigation (Mobile) */
@media (max-width: 768px) { .header-bar .flex.gap-1 { display: none; } }
@media (max-width: 768px) { .table-root { overflow-x: auto; } }
@media (max-width: 640px) { .form-group { width: 100%; } .form-group select, .form-group .input--with-border { width: 100% !important; max-width: none !important; min-width: 0; box-sizing: border-box; } }
@media (min-width: 769px) { .retry-bottom { display: none; } }
.bottom-nav { display: none; }
@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__inner { justify-content: center; }
  .filter-row { overflow-x: auto; flex-wrap: nowrap !important; -webkit-overflow-scrolling: touch; gap: 0.375rem; }
  .filter-row > * { flex: 0 0 auto; }
  .bottom-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--surface); border-top: 1px solid var(--border);
    z-index: 50; box-shadow: 0 -2px 8px rgba(0,0,0,0.08);
    padding-bottom: env(safe-area-inset-bottom, 0.75rem);
  }
  .bottom-nav__link {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    gap: 0.15rem; padding: 0.45rem 0; font-size: 0.65rem;
    color: var(--muted); text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; outline: none;
  }
  .bottom-nav__link:hover,
  .bottom-nav__link:focus,
  .bottom-nav__link:active,
  .bottom-nav__link:visited { text-decoration: none !important; }
.bottom-nav__link svg { width: 1.25rem; height: 1.25rem; }
@media (max-width: 640px) { .task-card__main { flex-wrap: wrap; gap: 0.375rem; } .task-card__name { width: 100%; max-width: none; } }
@media (max-width: 768px) { .card.card--secondary .flex.flex-wrap > div { width: 100%; } }
  .bottom-nav__link--active,
  .bottom-nav__link--active svg { color: var(--accent); stroke: var(--accent); }
  .container { animation: page-slide-in 0.25s ease-out; padding-bottom: calc(4rem + env(safe-area-inset-bottom, 0.75rem)); }
}

.task-type-radios { display: flex; gap: 0.5rem; flex-wrap: wrap; }
@media (max-width: 768px) { .hide-mobile { display: none; } }
.task-type-select { display: none; }
@media (max-width: 768px) { .task-type-radios { display: none !important; } .task-type-select { display: block; } }


.task-delete-btn { color: var(--danger); cursor: pointer; font-size: 0.7rem; padding: 0.1rem 0.3rem; border: 1px solid var(--danger); border-radius: 3px; background: transparent; margin-left: 0.3rem; white-space: nowrap; }
.task-delete-btn:hover { background: var(--danger); color: #fff; }

/* ===== Dark Mode ===== */
[data-theme="dark"] {
  --background: oklch(0.147 0.004 285.89);
  --foreground: oklch(0.91 0.005 285.89);

  --surface: oklch(0.185 0.005 285.89);
  --surface-foreground: var(--foreground);
  --surface-secondary: oklch(0.21 0.005 285.89);
  --surface-tertiary: oklch(0.24 0.005 285.89);

  --overlay: oklch(0.19 0.005 285.89);
  --overlay-foreground: var(--foreground);

  --muted: oklch(0.6 0.013 285.89);
  --scrollbar: oklch(0.3 0.005 285.89);

  --default: oklch(0.25 0.004 285.89);
  --default-foreground: var(--foreground);
  --accent: oklch(0.62 0.195 253.83);
  --accent-foreground: var(--foreground);

  --field-background: oklch(0.22 0.005 285.89);
  --field-foreground: var(--foreground);
  --field-placeholder: var(--muted);
  --field-border: oklch(0.3 0.005 285.89);

  --success: oklch(0.65 0.19 150.81);
  --success-foreground: oklch(0.15 0.005 285.89);
  --warning: oklch(0.7 0.15 72.33);
  --warning-foreground: oklch(0.15 0.005 285.89);
  --danger: oklch(0.6 0.23 25.74);
  --danger-foreground: var(--foreground);

  --segment: oklch(0.22 0.005 285.89);
  --segment-foreground: var(--foreground);

  --border: oklch(0.3 0.005 285.89);
  --separator: oklch(0.28 0.005 285.89);

  --nav-background: oklch(0.13 0.004 285.89);
  --nav-border: oklch(0.25 0.005 285.89);

  --input-background: oklch(0.22 0.005 285.89);
  --input-border: oklch(0.32 0.005 285.89);
  --input-foreground: var(--foreground);

  --chip-default: oklch(0.28 0.005 285.89);
  --chip-default-foreground: var(--foreground);

  --card-shadow: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
}

[data-theme="dark"] .table__header { background: var(--surface-secondary); }
[data-theme="dark"] .table__row:not(:last-child) td { border-bottom-color: var(--separator); }
[data-theme="dark"] .table__row:hover { background: var(--surface-tertiary); }
[data-theme="dark"] .dropdown-menu { box-shadow: 0 8px 32px rgba(0,0,0,0.5); }
[data-theme="dark"] .bottom-nav { box-shadow: 0 -2px 8px rgba(0,0,0,0.3); }

/* Theme toggle button */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; border: none; background: transparent;
  color: var(--muted); cursor: pointer; border-radius: var(--radius);
  transition: color 150ms, background 150ms; margin-right: 0.25rem;
}
.theme-toggle:hover { color: var(--foreground); background: var(--default); }
.theme-toggle svg { width: 1.15rem; height: 1.15rem; }
