/*
 * Presets globais do painel.
 * Tabler: https://github.com/tabler/tabler (MIT)
 * Bootswatch: https://github.com/thomaspark/bootswatch (MIT)
 * As paletas abaixo foram adaptadas para as variáveis já existentes do projeto,
 * evitando trocar a estrutura HTML ou quebrar componentes administrativos.
 */

html[data-system-theme="tabler"] {
  --food-bg:#f5f7fb; --food-card:#fff; --food-border:#dfe5ec; --food-text:#172033; --food-muted:#65758a;
  --food-sidebar:#111a2a; --food-sidebar-soft:#1b293b; --food-radius:12px;
  --admin-surface:#fff; --admin-surface-soft:#f8fafc; --admin-surface-strong:#eef2f7; --admin-input-bg:#fff;
  --admin-border:#dfe5ec; --admin-border-strong:#cbd5df; --admin-text-strong:#172033; --admin-text-soft:#65758a; --admin-hover:#f3f6fa;
}
html[data-system-theme="flatly"] {
  --food-bg:#f4f7f7; --food-card:#fff; --food-border:#d7e0df; --food-text:#2c3e50; --food-muted:#60747a;
  --food-sidebar:#2c3e50; --food-sidebar-soft:#385168; --food-radius:8px;
  --admin-surface:#fff; --admin-surface-soft:#f5f8f8; --admin-surface-strong:#e9efef; --admin-input-bg:#fff;
  --admin-border:#d7e0df; --admin-border-strong:#bdcbca; --admin-text-strong:#2c3e50; --admin-text-soft:#60747a; --admin-hover:#edf3f2;
}
html[data-system-theme="minty"] {
  --food-bg:#f6faf9; --food-card:#fff; --food-border:#d7e7e1; --food-text:#35524a; --food-muted:#6a817a;
  --food-sidebar:#35524a; --food-sidebar-soft:#456b60; --food-radius:14px;
  --admin-surface:#fff; --admin-surface-soft:#f3f8f6; --admin-surface-strong:#e4f0ec; --admin-input-bg:#fff;
  --admin-border:#d7e7e1; --admin-border-strong:#bed5cd; --admin-text-strong:#35524a; --admin-text-soft:#6a817a; --admin-hover:#ecf5f2;
}
html[data-system-theme="darkly"] {
  --food-bg:#181818; --food-card:#222; --food-border:#3a3a3a; --food-text:#f2f2f2; --food-muted:#b4b4b4;
  --food-sidebar:#111; --food-sidebar-soft:#262626; --food-radius:8px;
  --admin-surface:#222; --admin-surface-soft:#292929; --admin-surface-strong:#333; --admin-input-bg:#1b1b1b;
  --admin-border:#3a3a3a; --admin-border-strong:#505050; --admin-text-strong:#f2f2f2; --admin-text-soft:#b4b4b4; --admin-hover:#303030;
}
html[data-system-theme="slate"] {
  --food-bg:#272b30; --food-card:#32383e; --food-border:#4a5057; --food-text:#f5f5f5; --food-muted:#bbc0c5;
  --food-sidebar:#1c1f22; --food-sidebar-soft:#353b41; --food-radius:8px;
  --admin-surface:#32383e; --admin-surface-soft:#393f45; --admin-surface-strong:#444b52; --admin-input-bg:#2a2f34;
  --admin-border:#4a5057; --admin-border-strong:#5d656d; --admin-text-strong:#f5f5f5; --admin-text-soft:#bbc0c5; --admin-hover:#3d444a;
}
html[data-system-theme="solar"] {
  --food-bg:#002b36; --food-card:#073642; --food-border:#31535b; --food-text:#eee8d5; --food-muted:#93a1a1;
  --food-sidebar:#001f27; --food-sidebar-soft:#0b4654; --food-radius:10px;
  --admin-surface:#073642; --admin-surface-soft:#0a3d49; --admin-surface-strong:#124956; --admin-input-bg:#002b36;
  --admin-border:#31535b; --admin-border-strong:#46666d; --admin-text-strong:#eee8d5; --admin-text-soft:#93a1a1; --admin-hover:#104551;
}

html[data-system-theme="darkly"], html[data-system-theme="slate"], html[data-system-theme="solar"] { color-scheme: dark; }
html[data-system-theme="tabler"], html[data-system-theme="flatly"], html[data-system-theme="minty"] { color-scheme: light; }

html[data-system-theme="darkly"] body, html[data-system-theme="darkly"] .app-layout,
html[data-system-theme="slate"] body, html[data-system-theme="slate"] .app-layout,
html[data-system-theme="solar"] body, html[data-system-theme="solar"] .app-layout,
html[data-system-theme="darkly"] .store-body, html[data-system-theme="slate"] .store-body, html[data-system-theme="solar"] .store-body {
  background: var(--food-bg) !important; color: var(--food-text) !important;
}

html[data-system-theme="darkly"] .panel-card, html[data-system-theme="darkly"] .settings-page-card, html[data-system-theme="darkly"] .order-card, html[data-system-theme="darkly"] .product-card,
html[data-system-theme="slate"] .panel-card, html[data-system-theme="slate"] .settings-page-card, html[data-system-theme="slate"] .order-card, html[data-system-theme="slate"] .product-card,
html[data-system-theme="solar"] .panel-card, html[data-system-theme="solar"] .settings-page-card, html[data-system-theme="solar"] .order-card, html[data-system-theme="solar"] .product-card {
  background:var(--food-card)!important; border-color:var(--food-border)!important; color:var(--food-text)!important;
}

html[data-system-theme] .store-topbar, html[data-system-theme] .store-intro-card, html[data-system-theme] .store-product-card,
html[data-system-theme] .drawer-panel, html[data-system-theme] .checkout-dialog, html[data-system-theme] .theme-dialog-card {
  background:var(--food-card)!important; border-color:var(--food-border)!important; color:var(--food-text)!important;
}

html[data-system-theme] input, html[data-system-theme] select, html[data-system-theme] textarea {
  background:var(--admin-input-bg, var(--food-card)); border-color:var(--food-border); color:var(--food-text);
}

/* --------------------------------------------------------------------------
 * Variantes da loja por família global + preferência do cliente.
 * O administrador escolhe data-system-theme; a loja escolhe data-food-theme.
 * -------------------------------------------------------------------------- */

/* Tabler */
html[data-system-theme="tabler"][data-food-theme="light"] {
  --food-bg:#f5f7fb; --food-card:#ffffff; --food-border:#dfe5ec; --food-text:#172033; --food-muted:#65758a;
  --admin-surface:#ffffff; --admin-surface-soft:#f8fafc; --admin-surface-strong:#eef2f7; --admin-input-bg:#ffffff;
  --admin-border:#dfe5ec; --admin-border-strong:#cbd5df; --admin-text-strong:#172033; --admin-text-soft:#65758a; --admin-hover:#f3f6fa;
}
html[data-system-theme="tabler"][data-food-theme="dark"] {
  --food-bg:#111827; --food-card:#182235; --food-border:#314057; --food-text:#edf2f7; --food-muted:#aab6c5;
  --admin-surface:#182235; --admin-surface-soft:#1d293b; --admin-surface-strong:#26354a; --admin-input-bg:#121c2b;
  --admin-border:#314057; --admin-border-strong:#43546d; --admin-text-strong:#edf2f7; --admin-text-soft:#aab6c5; --admin-hover:#223047;
}

/* Flatly */
html[data-system-theme="flatly"][data-food-theme="light"] {
  --food-bg:#f4f7f7; --food-card:#ffffff; --food-border:#d7e0df; --food-text:#2c3e50; --food-muted:#60747a;
  --admin-surface:#ffffff; --admin-surface-soft:#f5f8f8; --admin-surface-strong:#e9efef; --admin-input-bg:#ffffff;
  --admin-border:#d7e0df; --admin-border-strong:#bdcbca; --admin-text-strong:#2c3e50; --admin-text-soft:#60747a; --admin-hover:#edf3f2;
}
html[data-system-theme="flatly"][data-food-theme="dark"] {
  --food-bg:#17212b; --food-card:#20303d; --food-border:#3b5260; --food-text:#eef5f5; --food-muted:#adc0c3;
  --admin-surface:#20303d; --admin-surface-soft:#263844; --admin-surface-strong:#304653; --admin-input-bg:#182731;
  --admin-border:#3b5260; --admin-border-strong:#506b79; --admin-text-strong:#eef5f5; --admin-text-soft:#adc0c3; --admin-hover:#2b404d;
}

/* Minty */
html[data-system-theme="minty"][data-food-theme="light"] {
  --food-bg:#f6faf9; --food-card:#ffffff; --food-border:#d7e7e1; --food-text:#35524a; --food-muted:#6a817a;
  --admin-surface:#ffffff; --admin-surface-soft:#f3f8f6; --admin-surface-strong:#e4f0ec; --admin-input-bg:#ffffff;
  --admin-border:#d7e7e1; --admin-border-strong:#bed5cd; --admin-text-strong:#35524a; --admin-text-soft:#6a817a; --admin-hover:#ecf5f2;
}
html[data-system-theme="minty"][data-food-theme="dark"] {
  --food-bg:#18312a; --food-card:#214139; --food-border:#3f665a; --food-text:#eff8f4; --food-muted:#b2c8c0;
  --admin-surface:#214139; --admin-surface-soft:#294b42; --admin-surface-strong:#355a50; --admin-input-bg:#19362f;
  --admin-border:#3f665a; --admin-border-strong:#55796e; --admin-text-strong:#eff8f4; --admin-text-soft:#b2c8c0; --admin-hover:#2f5148;
}

/* Darkly - mantém a identidade escura, mas oferece uma variante clara real */
html[data-system-theme="darkly"][data-food-theme="light"] {
  --food-bg:#f4f4f4; --food-card:#ffffff; --food-border:#d7d7d7; --food-text:#252525; --food-muted:#6b6b6b;
  --admin-surface:#ffffff; --admin-surface-soft:#f7f7f7; --admin-surface-strong:#ededed; --admin-input-bg:#ffffff;
  --admin-border:#d7d7d7; --admin-border-strong:#bfbfbf; --admin-text-strong:#252525; --admin-text-soft:#6b6b6b; --admin-hover:#eeeeee;
}
html[data-system-theme="darkly"][data-food-theme="dark"] {
  --food-bg:#181818; --food-card:#222222; --food-border:#3a3a3a; --food-text:#f2f2f2; --food-muted:#b4b4b4;
  --admin-surface:#222222; --admin-surface-soft:#292929; --admin-surface-strong:#333333; --admin-input-bg:#1b1b1b;
  --admin-border:#3a3a3a; --admin-border-strong:#505050; --admin-text-strong:#f2f2f2; --admin-text-soft:#b4b4b4; --admin-hover:#303030;
}

/* Slate */
html[data-system-theme="slate"][data-food-theme="light"] {
  --food-bg:#f2f4f6; --food-card:#ffffff; --food-border:#d4d9de; --food-text:#32383e; --food-muted:#687079;
  --admin-surface:#ffffff; --admin-surface-soft:#f7f8f9; --admin-surface-strong:#e9ecef; --admin-input-bg:#ffffff;
  --admin-border:#d4d9de; --admin-border-strong:#bbc2c8; --admin-text-strong:#32383e; --admin-text-soft:#687079; --admin-hover:#eceff1;
}
html[data-system-theme="slate"][data-food-theme="dark"] {
  --food-bg:#272b30; --food-card:#32383e; --food-border:#4a5057; --food-text:#f5f5f5; --food-muted:#bbc0c5;
  --admin-surface:#32383e; --admin-surface-soft:#393f45; --admin-surface-strong:#444b52; --admin-input-bg:#2a2f34;
  --admin-border:#4a5057; --admin-border-strong:#5d656d; --admin-text-strong:#f5f5f5; --admin-text-soft:#bbc0c5; --admin-hover:#3d444a;
}

/* Solar */
html[data-system-theme="solar"][data-food-theme="light"] {
  --food-bg:#fdf6e3; --food-card:#fffdf5; --food-border:#ded5b8; --food-text:#586e75; --food-muted:#839496;
  --admin-surface:#fffdf5; --admin-surface-soft:#f8f0dc; --admin-surface-strong:#eee6cf; --admin-input-bg:#fffdf5;
  --admin-border:#ded5b8; --admin-border-strong:#c9bea0; --admin-text-strong:#586e75; --admin-text-soft:#839496; --admin-hover:#f4ecd6;
}
html[data-system-theme="solar"][data-food-theme="dark"] {
  --food-bg:#002b36; --food-card:#073642; --food-border:#31535b; --food-text:#eee8d5; --food-muted:#93a1a1;
  --admin-surface:#073642; --admin-surface-soft:#0a3d49; --admin-surface-strong:#124956; --admin-input-bg:#002b36;
  --admin-border:#31535b; --admin-border-strong:#46666d; --admin-text-strong:#eee8d5; --admin-text-soft:#93a1a1; --admin-hover:#104551;
}

/* Na loja, o modo claro/escuro escolhido pelo cliente sempre prevalece sobre
   a classificação histórica do preset global. */
html[data-system-theme][data-food-theme="light"] { color-scheme: light; }
html[data-system-theme][data-food-theme="dark"] { color-scheme: dark; }

html[data-system-theme][data-food-theme="light"] .store-body,
html[data-system-theme][data-food-theme="dark"] .store-body,
html[data-system-theme][data-food-theme="light"] .store-app,
html[data-system-theme][data-food-theme="dark"] .store-app {
  background:var(--food-bg)!important;
  color:var(--food-text)!important;
}

html[data-system-theme][data-food-theme="light"] .store-topbar,
html[data-system-theme][data-food-theme="light"] .store-intro-card,
html[data-system-theme][data-food-theme="light"] .store-product-card,
html[data-system-theme][data-food-theme="light"] .drawer-panel,
html[data-system-theme][data-food-theme="light"] .checkout-dialog,
html[data-system-theme][data-food-theme="light"] .theme-dialog-card,
html[data-system-theme][data-food-theme="dark"] .store-topbar,
html[data-system-theme][data-food-theme="dark"] .store-intro-card,
html[data-system-theme][data-food-theme="dark"] .store-product-card,
html[data-system-theme][data-food-theme="dark"] .drawer-panel,
html[data-system-theme][data-food-theme="dark"] .checkout-dialog,
html[data-system-theme][data-food-theme="dark"] .theme-dialog-card {
  background:var(--food-card)!important;
  border-color:var(--food-border)!important;
  color:var(--food-text)!important;
}

/* Famílias adicionais - todas com variantes clara e escura */
html[data-system-theme="cerulean"] { --food-sidebar:#186a9b; --food-sidebar-soft:#247fae; --food-radius:10px; }
html[data-system-theme="cerulean"][data-food-theme="light"] {
  --food-bg:#f3f8fc; --food-card:#fff; --food-border:#cfe0ec; --food-text:#17324a; --food-muted:#61788a;
  --admin-surface:#fff; --admin-surface-soft:#f3f8fc; --admin-surface-strong:#e4f0f7; --admin-input-bg:#fff;
  --admin-border:#cfe0ec; --admin-border-strong:#adc9dc; --admin-text-strong:#17324a; --admin-text-soft:#61788a; --admin-hover:#eaf4fa;
}
html[data-system-theme="cerulean"][data-food-theme="dark"] {
  --food-bg:#102a43; --food-card:#173a57; --food-border:#365e79; --food-text:#edf7fc; --food-muted:#b2c8d6;
  --admin-surface:#173a57; --admin-surface-soft:#1c4566; --admin-surface-strong:#285471; --admin-input-bg:#112f49;
  --admin-border:#365e79; --admin-border-strong:#4e7590; --admin-text-strong:#edf7fc; --admin-text-soft:#b2c8d6; --admin-hover:#224e6d;
}

html[data-system-theme="cosmo"] { --food-sidebar:#1f6fc1; --food-sidebar-soft:#2b82d6; --food-radius:8px; }
html[data-system-theme="cosmo"][data-food-theme="light"] {
  --food-bg:#f8f9fa; --food-card:#fff; --food-border:#d8dde2; --food-text:#2f3439; --food-muted:#707981;
  --admin-surface:#fff; --admin-surface-soft:#f7f8fa; --admin-surface-strong:#eceff2; --admin-input-bg:#fff;
  --admin-border:#d8dde2; --admin-border-strong:#bac2c9; --admin-text-strong:#2f3439; --admin-text-soft:#707981; --admin-hover:#eff2f4;
}
html[data-system-theme="cosmo"][data-food-theme="dark"] {
  --food-bg:#1d2025; --food-card:#292e34; --food-border:#474f57; --food-text:#f2f4f6; --food-muted:#bac1c8;
  --admin-surface:#292e34; --admin-surface-soft:#30363d; --admin-surface-strong:#3a424a; --admin-input-bg:#20252a;
  --admin-border:#474f57; --admin-border-strong:#5d6771; --admin-text-strong:#f2f4f6; --admin-text-soft:#bac1c8; --admin-hover:#353c43;
}

html[data-system-theme="journal"] { --food-sidebar:#a94b49; --food-sidebar-soft:#c05d59; --food-radius:6px; }
html[data-system-theme="journal"][data-food-theme="light"] {
  --food-bg:#fffaf8; --food-card:#fff; --food-border:#ead9d5; --food-text:#3c3030; --food-muted:#806d6b;
  --admin-surface:#fff; --admin-surface-soft:#fff8f6; --admin-surface-strong:#f6ece9; --admin-input-bg:#fff;
  --admin-border:#ead9d5; --admin-border-strong:#d5bbb5; --admin-text-strong:#3c3030; --admin-text-soft:#806d6b; --admin-hover:#faefec;
}
html[data-system-theme="journal"][data-food-theme="dark"] {
  --food-bg:#241d1d; --food-card:#332929; --food-border:#594444; --food-text:#fff4f2; --food-muted:#cbb4b0;
  --admin-surface:#332929; --admin-surface-soft:#3b3030; --admin-surface-strong:#483939; --admin-input-bg:#281f1f;
  --admin-border:#594444; --admin-border-strong:#725858; --admin-text-strong:#fff4f2; --admin-text-soft:#cbb4b0; --admin-hover:#423434;
}

html[data-system-theme="lumen"] { --food-sidebar:#116c8d; --food-sidebar-soft:#1882a8; --food-radius:10px; }
html[data-system-theme="lumen"][data-food-theme="light"] {
  --food-bg:#f8f9fb; --food-card:#fff; --food-border:#dce2e7; --food-text:#354052; --food-muted:#727d8d;
  --admin-surface:#fff; --admin-surface-soft:#f8fafb; --admin-surface-strong:#edf1f4; --admin-input-bg:#fff;
  --admin-border:#dce2e7; --admin-border-strong:#c1cbd3; --admin-text-strong:#354052; --admin-text-soft:#727d8d; --admin-hover:#f0f4f6;
}
html[data-system-theme="lumen"][data-food-theme="dark"] {
  --food-bg:#1d2733; --food-card:#283645; --food-border:#465b6d; --food-text:#f1f6f8; --food-muted:#bac7d0;
  --admin-surface:#283645; --admin-surface-soft:#2f3f50; --admin-surface-strong:#3a4b5c; --admin-input-bg:#202d39;
  --admin-border:#465b6d; --admin-border-strong:#5c7183; --admin-text-strong:#f1f6f8; --admin-text-soft:#bac7d0; --admin-hover:#344657;
}

html[data-system-theme="sandstone"] { --food-sidebar:#3e3f3a; --food-sidebar-soft:#55574f; --food-radius:8px; }
html[data-system-theme="sandstone"][data-food-theme="light"] {
  --food-bg:#f7f6f1; --food-card:#fff; --food-border:#deddd5; --food-text:#3e3f3a; --food-muted:#74766d;
  --admin-surface:#fff; --admin-surface-soft:#f8f7f2; --admin-surface-strong:#eeede7; --admin-input-bg:#fff;
  --admin-border:#deddd5; --admin-border-strong:#c5c4ba; --admin-text-strong:#3e3f3a; --admin-text-soft:#74766d; --admin-hover:#f0efe9;
}
html[data-system-theme="sandstone"][data-food-theme="dark"] {
  --food-bg:#252922; --food-card:#33382f; --food-border:#51594b; --food-text:#f4f5ef; --food-muted:#bdc2b6;
  --admin-surface:#33382f; --admin-surface-soft:#3b4136; --admin-surface-strong:#474e41; --admin-input-bg:#292e27;
  --admin-border:#51594b; --admin-border-strong:#697260; --admin-text-strong:#f4f5ef; --admin-text-soft:#bdc2b6; --admin-hover:#41483c;
}

html[data-system-theme="zephyr"] { --food-sidebar:#2948c7; --food-sidebar-soft:#3d5ddd; --food-radius:12px; }
html[data-system-theme="zephyr"][data-food-theme="light"] {
  --food-bg:#f7f8fc; --food-card:#fff; --food-border:#dbe0ef; --food-text:#26334d; --food-muted:#6c7790;
  --admin-surface:#fff; --admin-surface-soft:#f7f8fc; --admin-surface-strong:#edf0f8; --admin-input-bg:#fff;
  --admin-border:#dbe0ef; --admin-border-strong:#bec6dc; --admin-text-strong:#26334d; --admin-text-soft:#6c7790; --admin-hover:#f0f2fa;
}
html[data-system-theme="zephyr"][data-food-theme="dark"] {
  --food-bg:#172033; --food-card:#202d46; --food-border:#3d4f70; --food-text:#f1f4fb; --food-muted:#b5bfd4;
  --admin-surface:#202d46; --admin-surface-soft:#26354f; --admin-surface-strong:#30405c; --admin-input-bg:#19243a;
  --admin-border:#3d4f70; --admin-border-strong:#536687; --admin-text-strong:#f1f4fb; --admin-text-soft:#b5bfd4; --admin-hover:#2a3a56;
}

html[data-system-theme][data-food-theme="light"] { color-scheme:light; }
html[data-system-theme][data-food-theme="dark"] { color-scheme:dark; }

/* --------------------------------------------------------------------------
 * Refinamento visual dos presets.
 * Cada família mantém uma identidade própria nas variantes clara e escura.
 * -------------------------------------------------------------------------- */
html[data-system-theme="tabler"] { --food-sidebar:#162033; --food-sidebar-soft:#22314a; --food-radius:12px; }
html[data-system-theme="tabler"][data-food-theme="light"] {
  --food-bg:#f4f6fa; --food-card:#ffffff; --food-border:#dce2ea; --food-text:#182235; --food-muted:#66758b;
  --admin-surface:#ffffff; --admin-surface-soft:#f8fafc; --admin-surface-strong:#edf1f6; --admin-input-bg:#ffffff;
  --admin-border:#dce2ea; --admin-border-strong:#c6d0dc; --admin-text-strong:#182235; --admin-text-soft:#66758b; --admin-hover:#f1f4f8;
}
html[data-system-theme="tabler"][data-food-theme="dark"] {
  --food-bg:#0f1724; --food-card:#172235; --food-border:#2c3a50; --food-text:#edf2f8; --food-muted:#a9b5c5;
  --admin-surface:#172235; --admin-surface-soft:#1d2a3e; --admin-surface-strong:#26364c; --admin-input-bg:#121c2c;
  --admin-border:#2c3a50; --admin-border-strong:#41536c; --admin-text-strong:#edf2f8; --admin-text-soft:#a9b5c5; --admin-hover:#223149;
}

html[data-system-theme="flatly"] { --food-sidebar:#20384b; --food-sidebar-soft:#2b4b60; --food-radius:9px; }
html[data-system-theme="flatly"][data-food-theme="light"] {
  --food-bg:#f3f7f7; --food-card:#ffffff; --food-border:#d4e0df; --food-text:#233b49; --food-muted:#637982;
  --admin-surface:#ffffff; --admin-surface-soft:#f5f9f8; --admin-surface-strong:#e8f0ef; --admin-input-bg:#ffffff;
  --admin-border:#d4e0df; --admin-border-strong:#b9ccca; --admin-text-strong:#233b49; --admin-text-soft:#637982; --admin-hover:#ebf3f2;
}
html[data-system-theme="flatly"][data-food-theme="dark"] {
  --food-bg:#13212a; --food-card:#1b2f3a; --food-border:#35505c; --food-text:#eef6f6; --food-muted:#afc2c4;
  --admin-surface:#1b2f3a; --admin-surface-soft:#223843; --admin-surface-strong:#2c4651; --admin-input-bg:#162832;
  --admin-border:#35505c; --admin-border-strong:#4a6874; --admin-text-strong:#eef6f6; --admin-text-soft:#afc2c4; --admin-hover:#27404b;
}

html[data-system-theme="minty"] { --food-sidebar:#245348; --food-sidebar-soft:#32695c; --food-radius:14px; }
html[data-system-theme="minty"][data-food-theme="light"] {
  --food-bg:#f4faf7; --food-card:#ffffff; --food-border:#d2e7de; --food-text:#28483f; --food-muted:#688078;
  --admin-surface:#ffffff; --admin-surface-soft:#f2f8f5; --admin-surface-strong:#e3f0eb; --admin-input-bg:#ffffff;
  --admin-border:#d2e7de; --admin-border-strong:#b5d4c8; --admin-text-strong:#28483f; --admin-text-soft:#688078; --admin-hover:#eaf5f0;
}
html[data-system-theme="minty"][data-food-theme="dark"] {
  --food-bg:#132923; --food-card:#1d3a32; --food-border:#3a5f54; --food-text:#eff8f4; --food-muted:#b4c9c1;
  --admin-surface:#1d3a32; --admin-surface-soft:#25443b; --admin-surface-strong:#305248; --admin-input-bg:#172f29;
  --admin-border:#3a5f54; --admin-border-strong:#50776b; --admin-text-strong:#eff8f4; --admin-text-soft:#b4c9c1; --admin-hover:#2a4a41;
}

html[data-system-theme="darkly"] { --food-sidebar:#111214; --food-sidebar-soft:#25272b; --food-radius:8px; }
html[data-system-theme="darkly"][data-food-theme="light"] {
  --food-bg:#f5f5f6; --food-card:#ffffff; --food-border:#d9dade; --food-text:#24262b; --food-muted:#6c7078;
  --admin-surface:#ffffff; --admin-surface-soft:#f7f7f8; --admin-surface-strong:#ececef; --admin-input-bg:#ffffff;
  --admin-border:#d9dade; --admin-border-strong:#c0c2c7; --admin-text-strong:#24262b; --admin-text-soft:#6c7078; --admin-hover:#eeeeF0;
}
html[data-system-theme="darkly"][data-food-theme="dark"] {
  --food-bg:#151618; --food-card:#202226; --food-border:#393c42; --food-text:#f2f3f5; --food-muted:#b2b5bc;
  --admin-surface:#202226; --admin-surface-soft:#272a2f; --admin-surface-strong:#32353b; --admin-input-bg:#191b1e;
  --admin-border:#393c42; --admin-border-strong:#50545c; --admin-text-strong:#f2f3f5; --admin-text-soft:#b2b5bc; --admin-hover:#2d3035;
}

html[data-system-theme="slate"] { --food-sidebar:#273241; --food-sidebar-soft:#354357; --food-radius:10px; }
html[data-system-theme="slate"][data-food-theme="light"] {
  --food-bg:#f1f4f7; --food-card:#ffffff; --food-border:#d4dbe3; --food-text:#2f3b4a; --food-muted:#6d7887;
  --admin-surface:#ffffff; --admin-surface-soft:#f6f8fa; --admin-surface-strong:#e9edf2; --admin-input-bg:#ffffff;
  --admin-border:#d4dbe3; --admin-border-strong:#bac5d0; --admin-text-strong:#2f3b4a; --admin-text-soft:#6d7887; --admin-hover:#edf1f5;
}
html[data-system-theme="slate"][data-food-theme="dark"] {
  --food-bg:#202832; --food-card:#2b3643; --food-border:#465566; --food-text:#f3f6f8; --food-muted:#b8c0ca;
  --admin-surface:#2b3643; --admin-surface-soft:#323f4d; --admin-surface-strong:#3d4a59; --admin-input-bg:#242e39;
  --admin-border:#465566; --admin-border-strong:#5b6b7c; --admin-text-strong:#f3f6f8; --admin-text-soft:#b8c0ca; --admin-hover:#374553;
}

html[data-system-theme="solar"] { --food-sidebar:#27464d; --food-sidebar-soft:#365b62; --food-radius:10px; }
html[data-system-theme="solar"][data-food-theme="light"] {
  --food-bg:#f7f1df; --food-card:#fffaf0; --food-border:#ddd1ad; --food-text:#4d5f62; --food-muted:#7d8b8b;
  --admin-surface:#fffaf0; --admin-surface-soft:#f6efdD; --admin-surface-strong:#ece2c7; --admin-input-bg:#fffdf7;
  --admin-border:#ddd1ad; --admin-border-strong:#c7b98f; --admin-text-strong:#4d5f62; --admin-text-soft:#7d8b8b; --admin-hover:#f2ead4;
}
html[data-system-theme="solar"][data-food-theme="dark"] {
  --food-bg:#082a31; --food-card:#103941; --food-border:#335860; --food-text:#eee8d5; --food-muted:#a4b1ae;
  --admin-surface:#103941; --admin-surface-soft:#15434b; --admin-surface-strong:#1f5059; --admin-input-bg:#0b3037;
  --admin-border:#335860; --admin-border-strong:#4b6e75; --admin-text-strong:#eee8d5; --admin-text-soft:#a4b1ae; --admin-hover:#194851;
}

html[data-system-theme="cerulean"] { --food-sidebar:#145b8a; --food-sidebar-soft:#1c74a8; --food-radius:11px; }
html[data-system-theme="cerulean"][data-food-theme="light"] {
  --food-bg:#eef7fc; --food-card:#ffffff; --food-border:#c9deea; --food-text:#18364b; --food-muted:#617c8e;
  --admin-surface:#ffffff; --admin-surface-soft:#f3f9fc; --admin-surface-strong:#e2f0f7; --admin-input-bg:#ffffff;
  --admin-border:#c9deea; --admin-border-strong:#a8c7d9; --admin-text-strong:#18364b; --admin-text-soft:#617c8e; --admin-hover:#e9f4fa;
}
html[data-system-theme="cerulean"][data-food-theme="dark"] {
  --food-bg:#0d2537; --food-card:#14344c; --food-border:#315773; --food-text:#edf7fc; --food-muted:#aec6d5;
  --admin-surface:#14344c; --admin-surface-soft:#1a3f59; --admin-surface-strong:#234c67; --admin-input-bg:#102b40;
  --admin-border:#315773; --admin-border-strong:#486f8a; --admin-text-strong:#edf7fc; --admin-text-soft:#aec6d5; --admin-hover:#1e455f;
}

html[data-system-theme="cosmo"] { --food-sidebar:#3c4f8f; --food-sidebar-soft:#5064a8; --food-radius:10px; }
html[data-system-theme="cosmo"][data-food-theme="light"] {
  --food-bg:#f5f6fb; --food-card:#ffffff; --food-border:#d8dced; --food-text:#2f3548; --food-muted:#737a91;
  --admin-surface:#ffffff; --admin-surface-soft:#f7f8fc; --admin-surface-strong:#eceefa; --admin-input-bg:#ffffff;
  --admin-border:#d8dced; --admin-border-strong:#bec5df; --admin-text-strong:#2f3548; --admin-text-soft:#737a91; --admin-hover:#eff1f9;
}
html[data-system-theme="cosmo"][data-food-theme="dark"] {
  --food-bg:#1c2030; --food-card:#282d42; --food-border:#464e6b; --food-text:#f3f4fa; --food-muted:#bcc0d2;
  --admin-surface:#282d42; --admin-surface-soft:#30364c; --admin-surface-strong:#3b4259; --admin-input-bg:#212639;
  --admin-border:#464e6b; --admin-border-strong:#5e6786; --admin-text-strong:#f3f4fa; --admin-text-soft:#bcc0d2; --admin-hover:#353c53;
}

html[data-system-theme="journal"] { --food-sidebar:#7b403c; --food-sidebar-soft:#95504b; --food-radius:7px; }
html[data-system-theme="journal"][data-food-theme="light"] {
  --food-bg:#f8f3ee; --food-card:#fffdfa; --food-border:#e4d6cc; --food-text:#493a36; --food-muted:#806e68;
  --admin-surface:#fffdfa; --admin-surface-soft:#faf5f1; --admin-surface-strong:#f0e7e1; --admin-input-bg:#fffdfa;
  --admin-border:#e4d6cc; --admin-border-strong:#cdbbb0; --admin-text-strong:#493a36; --admin-text-soft:#806e68; --admin-hover:#f5ece6;
}
html[data-system-theme="journal"][data-food-theme="dark"] {
  --food-bg:#241d1c; --food-card:#332927; --food-border:#594540; --food-text:#fff5ef; --food-muted:#cbb7af;
  --admin-surface:#332927; --admin-surface-soft:#3c302d; --admin-surface-strong:#493a36; --admin-input-bg:#291f1e;
  --admin-border:#594540; --admin-border-strong:#745c55; --admin-text-strong:#fff5ef; --admin-text-soft:#cbb7af; --admin-hover:#433530;
}

html[data-system-theme="lumen"] { --food-sidebar:#17617c; --food-sidebar-soft:#217995; --food-radius:12px; }
html[data-system-theme="lumen"][data-food-theme="light"] {
  --food-bg:#f6f9fb; --food-card:#ffffff; --food-border:#d8e2e8; --food-text:#334657; --food-muted:#718392;
  --admin-surface:#ffffff; --admin-surface-soft:#f7fafb; --admin-surface-strong:#ebf1f4; --admin-input-bg:#ffffff;
  --admin-border:#d8e2e8; --admin-border-strong:#bdcbd4; --admin-text-strong:#334657; --admin-text-soft:#718392; --admin-hover:#edf4f6;
}
html[data-system-theme="lumen"][data-food-theme="dark"] {
  --food-bg:#172632; --food-card:#213542; --food-border:#3f5968; --food-text:#eff6f8; --food-muted:#b7c7ce;
  --admin-surface:#213542; --admin-surface-soft:#293f4c; --admin-surface-strong:#344c59; --admin-input-bg:#1b2c37;
  --admin-border:#3f5968; --admin-border-strong:#567080; --admin-text-strong:#eff6f8; --admin-text-soft:#b7c7ce; --admin-hover:#2e4552;
}

html[data-system-theme="sandstone"] { --food-sidebar:#48493f; --food-sidebar-soft:#5d5f53; --food-radius:9px; }
html[data-system-theme="sandstone"][data-food-theme="light"] {
  --food-bg:#f4f2e9; --food-card:#fffef9; --food-border:#ddd9ca; --food-text:#414239; --food-muted:#76786d;
  --admin-surface:#fffef9; --admin-surface-soft:#f7f5ed; --admin-surface-strong:#ece9de; --admin-input-bg:#fffef9;
  --admin-border:#ddd9ca; --admin-border-strong:#c3bead; --admin-text-strong:#414239; --admin-text-soft:#76786d; --admin-hover:#efede4;
}
html[data-system-theme="sandstone"][data-food-theme="dark"] {
  --food-bg:#24261f; --food-card:#32352c; --food-border:#515548; --food-text:#f3f4ed; --food-muted:#bec1b4;
  --admin-surface:#32352c; --admin-surface-soft:#3a3e33; --admin-surface-strong:#474b3f; --admin-input-bg:#292c25;
  --admin-border:#515548; --admin-border-strong:#696e5e; --admin-text-strong:#f3f4ed; --admin-text-soft:#bec1b4; --admin-hover:#414539;
}

html[data-system-theme="zephyr"] { --food-sidebar:#344b9b; --food-sidebar-soft:#4861b5; --food-radius:14px; }
html[data-system-theme="zephyr"][data-food-theme="light"] {
  --food-bg:#f4f6fc; --food-card:#ffffff; --food-border:#d7ddef; --food-text:#2b3654; --food-muted:#707b98;
  --admin-surface:#ffffff; --admin-surface-soft:#f7f8fd; --admin-surface-strong:#ebeff9; --admin-input-bg:#ffffff;
  --admin-border:#d7ddef; --admin-border-strong:#bcc5df; --admin-text-strong:#2b3654; --admin-text-soft:#707b98; --admin-hover:#eef1fa;
}
html[data-system-theme="zephyr"][data-food-theme="dark"] {
  --food-bg:#171d31; --food-card:#222b47; --food-border:#404d73; --food-text:#f1f3fb; --food-muted:#b7bfd5;
  --admin-surface:#222b47; --admin-surface-soft:#293451; --admin-surface-strong:#34405f; --admin-input-bg:#1b2339;
  --admin-border:#404d73; --admin-border-strong:#56658a; --admin-text-strong:#f1f3fb; --admin-text-soft:#b7bfd5; --admin-hover:#2e3957;
}

/* Aplicação consistente nos dois modos, sem forçar dimensões dos controles. */
html[data-system-theme][data-food-theme] body,
html[data-system-theme][data-food-theme] .app-layout { background:var(--food-bg) !important; color:var(--food-text) !important; }
html[data-system-theme][data-food-theme] .panel-card,
html[data-system-theme][data-food-theme] .settings-page-card,
html[data-system-theme][data-food-theme] .order-card,
html[data-system-theme][data-food-theme] .product-card,
html[data-system-theme][data-food-theme] .topbar {
  background:var(--food-card) !important; border-color:var(--food-border) !important; color:var(--food-text) !important;
}
html[data-system-theme][data-food-theme] input:not([type="checkbox"]):not([type="radio"]),
html[data-system-theme][data-food-theme] select,
html[data-system-theme][data-food-theme] textarea {
  background:var(--admin-input-bg,var(--food-card)); border-color:var(--food-border); color:var(--food-text);
}
