/* ============================================================
   HMC USINAGEM — Design System
   Paleta reduzida, tipografia consistente, componentes reusáveis
   ============================================================ */

:root {
    /* Brand */
    --hmc-blue:        #1e40af;
    --hmc-blue-light:  #3b82f6;
    --hmc-blue-dark:   #1e3a8a;
    --hmc-blue-50:     #eff6ff;
    --hmc-blue-100:    #dbeafe;
    --hmc-blue-200:    #bfdbfe;

    /* Neutros */
    --hmc-slate-900:   #0f172a;
    --hmc-slate-800:   #1e293b;
    --hmc-slate-700:   #334155;
    --hmc-slate-500:   #64748b;
    --hmc-slate-400:   #94a3b8;
    --hmc-slate-300:   #cbd5e1;
    --hmc-slate-200:   #e2e8f0;
    --hmc-slate-100:   #f1f5f9;
    --hmc-slate-50:    #f8fafc;
    --hmc-white:       #ffffff;

    /* Semânticas (uso restrito) */
    --hmc-success:     #059669;
    --hmc-success-50:  #f0fdf4;
    --hmc-warning:     #d97706;
    --hmc-warning-50:  #fffbeb;
    --hmc-danger:      #dc2626;
    --hmc-danger-50:   #fef2f2;

    /* Layout */
    --hmc-radius-sm:   6px;
    --hmc-radius:      8px;
    --hmc-radius-lg:   12px;
    --hmc-radius-xl:   16px;

    --hmc-shadow-sm:   0 1px 2px rgba(15, 23, 42, 0.04);
    --hmc-shadow:      0 4px 12px rgba(15, 23, 42, 0.06);
    --hmc-shadow-lg:   0 12px 32px rgba(30, 64, 175, 0.10);
}

/* ============================================================
   DARK MODE — redefine tokens
   Aplicado via <html data-theme="dark">
   ============================================================ */
[data-theme="dark"] {
    /* Surface principal (era branco em light) */
    --hmc-white:       #111827;
    /* Body bg (mais escuro que surface, dá profundidade) */
    --hmc-slate-50:    #0a0f1c;
    /* Divisores leves */
    --hmc-slate-100:   #1f2937;
    /* Borders */
    --hmc-slate-200:   #1f2937;
    --hmc-slate-300:   #334155;
    /* Texto muted/placeholder */
    --hmc-slate-400:   #64748b;
    --hmc-slate-500:   #94a3b8;
    /* Texto principal */
    --hmc-slate-700:   #cbd5e1;
    --hmc-slate-800:   #e2e8f0;
    /* Headings */
    --hmc-slate-900:   #f1f5f9;

    /* Brand — azul mais claro pra contraste em fundo escuro */
    --hmc-blue:        #3b82f6;
    --hmc-blue-light:  #60a5fa;
    --hmc-blue-dark:   #2563eb;
    --hmc-blue-50:     rgba(59, 130, 246, 0.12);
    --hmc-blue-100:    rgba(59, 130, 246, 0.20);
    --hmc-blue-200:    rgba(59, 130, 246, 0.35);

    /* Semânticas — backgrounds translúcidos */
    --hmc-success:     #34d399;
    --hmc-success-50:  rgba(52, 211, 153, 0.12);
    --hmc-warning:     #fbbf24;
    --hmc-warning-50:  rgba(251, 191, 36, 0.12);
    --hmc-danger:      #f87171;
    --hmc-danger-50:   rgba(248, 113, 113, 0.12);

    /* Shadows mais opacas com preto puro */
    --hmc-shadow-sm:   0 1px 2px rgba(0, 0, 0, 0.3);
    --hmc-shadow:      0 4px 12px rgba(0, 0, 0, 0.35);
    --hmc-shadow-lg:   0 12px 32px rgba(0, 0, 0, 0.5);
}

/* ---------- Reset / base ---------- */
* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    color-scheme: light;
}

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

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--hmc-slate-700);
    background: var(--hmc-white);
    -webkit-font-smoothing: antialiased;
    margin: 0;
    min-height: 100vh;
    transition: background-color 0.2s ease, color 0.2s ease;
}

[data-theme="dark"] body {
    background: var(--hmc-slate-50);
}

h1, h2, h3, h4, h5, h6, .font-heading {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--hmc-slate-900);
    letter-spacing: -0.01em;
    margin: 0;
}

a { color: var(--hmc-blue); text-decoration: none; }
a:hover { color: var(--hmc-blue-dark); }

/* ---------- Layout ---------- */
.hmc-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

@media (max-width: 640px) {
    .hmc-container { padding: 0 16px; }
}

/* ---------- Header global ---------- */
.hmc-header {
    background: var(--hmc-white);
    border-bottom: 1px solid var(--hmc-slate-200);
    position: sticky;
    top: 0;
    z-index: 50;
}

.hmc-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    gap: 16px;
    min-width: 0;
}

.hmc-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 1 auto;
    min-width: 0;
}

.hmc-logo img { height: 32px; width: auto; display: block; }

/* Breadcrumb */
.hmc-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--hmc-slate-500);
    flex-wrap: nowrap;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

.hmc-breadcrumb a {
    color: var(--hmc-slate-500);
    font-weight: 500;
}

.hmc-breadcrumb a:hover { color: var(--hmc-blue); }

.hmc-breadcrumb .sep {
    color: var(--hmc-slate-300);
    font-size: 0.75rem;
}

.hmc-breadcrumb .current {
    color: var(--hmc-slate-900);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hmc-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    min-width: 0;
}

@media (max-width: 640px) {
    .hmc-header-inner {
        gap: 8px;
        padding: 10px 0;
    }

    .hmc-logo img {
        height: 26px;
        max-width: 112px;
        object-fit: contain;
    }

    .hmc-breadcrumb {
        gap: 5px;
        font-size: 0.78rem;
    }

    .hmc-breadcrumb a {
        max-width: 84px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .hmc-header-actions {
        gap: 6px;
        max-width: 50%;
    }

    .hmc-header-actions .hmc-theme-btn {
        display: none;
    }
}

/* ---------- Buttons ---------- */
.hmc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 10px 18px;
    border-radius: var(--hmc-radius);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.05s ease;
    white-space: nowrap;
    line-height: 1.2;
}

.hmc-btn:active { transform: translateY(1px); }
.hmc-btn:focus-visible {
    outline: 2px solid var(--hmc-blue-light);
    outline-offset: 2px;
}

.hmc-btn-primary {
    background: var(--hmc-blue);
    color: var(--hmc-white);
}
.hmc-btn-primary:hover { background: var(--hmc-blue-dark); color: var(--hmc-white); }

.hmc-btn-secondary {
    background: var(--hmc-white);
    color: var(--hmc-slate-700);
    border-color: var(--hmc-slate-200);
}
.hmc-btn-secondary:hover {
    border-color: var(--hmc-blue-light);
    color: var(--hmc-blue);
    background: var(--hmc-blue-50);
}

.hmc-btn-ghost {
    background: transparent;
    color: var(--hmc-slate-500);
}
.hmc-btn-ghost:hover { color: var(--hmc-blue); background: var(--hmc-blue-50); }

.hmc-btn-icon {
    padding: 8px;
    width: 36px;
    height: 36px;
}

/* ---------- Cards ---------- */
.hmc-card {
    background: var(--hmc-white);
    border: 1px solid var(--hmc-slate-200);
    border-radius: var(--hmc-radius-lg);
    padding: 20px;
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.hmc-card-clickable {
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.hmc-card-clickable:hover {
    box-shadow: var(--hmc-shadow-lg);
    transform: translateY(-2px);
    border-color: var(--hmc-blue-200);
    color: inherit;
}

.hmc-card-clickable:focus-visible {
    outline: 2px solid var(--hmc-blue-light);
    outline-offset: 2px;
}

/* ---------- Inputs ---------- */
.hmc-input,
.hmc-select,
.hmc-textarea {
    width: 100%;
    padding: 10px 14px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--hmc-slate-900);
    background: var(--hmc-white);
    border: 1px solid var(--hmc-slate-200);
    border-radius: var(--hmc-radius);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.hmc-input::placeholder { color: var(--hmc-slate-400); }

.hmc-input:focus,
.hmc-select:focus,
.hmc-textarea:focus {
    outline: none;
    border-color: var(--hmc-blue-light);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.hmc-input[readonly] {
    background: var(--hmc-slate-50);
    color: var(--hmc-slate-700);
}

.hmc-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--hmc-slate-700);
    margin-bottom: 6px;
}

.hmc-help {
    display: block;
    font-size: 0.8rem;
    color: var(--hmc-slate-500);
    margin-top: 4px;
}

/* Search input */
.hmc-search {
    position: relative;
}

.hmc-search input {
    width: 100%;
    padding: 14px 16px 14px 46px;
    font-size: 1rem;
    background: var(--hmc-white);
    border: 1px solid var(--hmc-slate-200);
    border-radius: var(--hmc-radius-lg);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.hmc-search input:focus {
    outline: none;
    border-color: var(--hmc-blue-light);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.10);
}

.hmc-search .icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--hmc-slate-400);
    pointer-events: none;
}

.hmc-search .clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--hmc-slate-400);
    padding: 4px;
    border-radius: 4px;
    display: none;
}
.hmc-search .clear:hover { color: var(--hmc-slate-700); background: var(--hmc-slate-100); }
.hmc-search.has-text .clear { display: block; }

/* ---------- Chips / filter pills ---------- */
.hmc-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.hmc-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--hmc-slate-700);
    background: var(--hmc-white);
    border: 1px solid var(--hmc-slate-200);
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.hmc-chip:hover {
    border-color: var(--hmc-blue-200);
    color: var(--hmc-blue);
}

.hmc-chip.active {
    background: var(--hmc-blue);
    color: var(--hmc-white);
    border-color: var(--hmc-blue);
}

.hmc-chip .count {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* ---------- Tag (categoria do card) ---------- */
.hmc-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 999px;
    background: var(--hmc-slate-100);
    color: var(--hmc-slate-700);
}

.hmc-tag-blue   { background: var(--hmc-blue-50);    color: var(--hmc-blue); }
.hmc-tag-green  { background: var(--hmc-success-50); color: var(--hmc-success); }
.hmc-tag-amber  { background: var(--hmc-warning-50); color: var(--hmc-warning); }

/* ---------- Star (favorito) ---------- */
.hmc-fav {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--hmc-slate-300);
    font-size: 1rem;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.15s, transform 0.1s;
    z-index: 2;
}
.hmc-fav:hover { color: var(--hmc-warning); transform: scale(1.15); }
.hmc-fav.active { color: var(--hmc-warning); }

/* ---------- Theme toggle ---------- */
.hmc-theme-btn {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--hmc-white);
    border: 1px solid var(--hmc-slate-200);
    color: var(--hmc-slate-700);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
    font-size: 0.95rem;
}
.hmc-theme-btn:hover {
    background: var(--hmc-blue-50);
    border-color: var(--hmc-blue-200);
    color: var(--hmc-blue);
}
.hmc-theme-btn:active {
    transform: scale(0.94);
}
.hmc-theme-btn:focus-visible {
    outline: 2px solid var(--hmc-blue-light);
    outline-offset: 2px;
}

/* Card precisa de leve sombra em light pra destacar do body branco */
.hmc-card {
    box-shadow: var(--hmc-shadow-sm);
}

[data-theme="dark"] .hmc-card {
    box-shadow: none;
}

/* Footer fica sempre escuro mas ajustado em dark mode */
[data-theme="dark"] .hmc-footer {
    background: #050810;
    border-top: 1px solid var(--hmc-slate-200);
}

/* Header em dark fica com leve diferença */
[data-theme="dark"] .hmc-header {
    background: var(--hmc-white);
}

/* Search input em dark */
[data-theme="dark"] .hmc-search input {
    background: var(--hmc-white);
    color: var(--hmc-slate-900);
}

/* Card icon-box bg em dark */
[data-theme="dark"] .calc-card .icon-box {
    background: var(--hmc-blue-50);
}

/* ---------- User menu compacto ---------- */
.hmc-user-menu {
    position: relative;
}

.hmc-user-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 4px 4px;
    background: var(--hmc-white);
    border: 1px solid var(--hmc-slate-200);
    border-radius: 999px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.hmc-user-trigger:hover {
    border-color: var(--hmc-blue-200);
    background: var(--hmc-blue-50);
}

.hmc-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--hmc-blue);
    color: var(--hmc-white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.hmc-user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: var(--hmc-white);
    border: 1px solid var(--hmc-slate-200);
    border-radius: var(--hmc-radius);
    box-shadow: var(--hmc-shadow);
    padding: 6px;
    z-index: 60;
}

.hmc-user-info {
    padding: 8px 10px 10px;
    border-bottom: 1px solid var(--hmc-slate-100);
    margin-bottom: 4px;
}
.hmc-user-info .label {
    font-size: 0.7rem;
    color: var(--hmc-slate-400);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.hmc-user-info .email {
    font-size: 0.85rem;
    color: var(--hmc-slate-900);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

.hmc-user-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    background: transparent;
    border: none;
    border-radius: var(--hmc-radius-sm);
    font-family: inherit;
    font-size: 0.875rem;
    color: var(--hmc-slate-700);
    text-align: left;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.1s;
}
.hmc-user-item:hover {
    background: var(--hmc-slate-50);
    color: var(--hmc-slate-900);
}

/* ---------- Auth inline no header ---------- */
.hmc-auth-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.hmc-auth-email {
    min-width: 0;
    max-width: 220px;
    text-align: right;
}

.hmc-auth-email-label {
    font-size: 11px;
    color: var(--hmc-slate-500);
    line-height: 1.2;
}

.hmc-auth-email-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--hmc-slate-700);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hmc-auth-logout {
    flex: 0 0 auto;
    background: var(--hmc-slate-100);
    color: var(--hmc-slate-700);
    border: 1px solid var(--hmc-slate-300);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

@media (max-width: 640px) {
    .hmc-auth-actions {
        gap: 6px;
        max-width: 100%;
    }

    .hmc-auth-email {
        max-width: 118px;
    }

    .hmc-auth-email-label {
        font-size: 10px;
    }

    .hmc-auth-email-value {
        font-size: 11px;
    }

    .hmc-auth-logout {
        padding: 8px 10px;
        font-size: 13px;
    }
}

/* ---------- Footer ---------- */
.hmc-footer {
    background: var(--hmc-slate-900);
    color: var(--hmc-slate-400);
    padding: 32px 0;
    text-align: center;
    font-size: 0.85rem;
    margin-top: auto;
}

/* ---------- Empty state ---------- */
.hmc-empty {
    text-align: center;
    padding: 64px 24px;
    color: var(--hmc-slate-500);
}

.hmc-empty i {
    font-size: 2rem;
    color: var(--hmc-slate-300);
    margin-bottom: 12px;
}

/* ---------- Utility ---------- */
.hmc-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ============================================================
   COMPAT TAILWIND → DARK MODE
   Páginas legadas usam Tailwind CDN com classes hardcoded.
   Em dark mode, sobrescrevemos as cores mais comuns.
   (light mode: deixa o Tailwind original, já é branco/cinza)
   ============================================================ */
[data-theme="dark"] body {
    background: var(--hmc-slate-50) !important;
    color: var(--hmc-slate-700) !important;
}

/* Backgrounds */
[data-theme="dark"] .bg-white          { background-color: #111827 !important; }
[data-theme="dark"] .bg-gray-50        { background-color: #0f1623 !important; }
[data-theme="dark"] .bg-gray-100       { background-color: #1f2937 !important; }
[data-theme="dark"] .bg-slate-50       { background-color: #0f1623 !important; }
[data-theme="dark"] .bg-slate-100      { background-color: #1f2937 !important; }

/* Accent backgrounds claros (-50 / -100) → translúcidos por hue */
[data-theme="dark"] .bg-blue-50,
[data-theme="dark"] .bg-blue-100       { background-color: rgba(59,130,246,0.13) !important; }
[data-theme="dark"] .bg-green-50,
[data-theme="dark"] .bg-green-100,
[data-theme="dark"] .bg-emerald-50,
[data-theme="dark"] .bg-emerald-100    { background-color: rgba(52,211,153,0.13) !important; }
[data-theme="dark"] .bg-amber-50,
[data-theme="dark"] .bg-amber-100,
[data-theme="dark"] .bg-yellow-50,
[data-theme="dark"] .bg-yellow-100     { background-color: rgba(251,191,36,0.13) !important; }
[data-theme="dark"] .bg-orange-50,
[data-theme="dark"] .bg-orange-100     { background-color: rgba(251,146,60,0.13) !important; }
[data-theme="dark"] .bg-red-50,
[data-theme="dark"] .bg-red-100        { background-color: rgba(248,113,113,0.13) !important; }
[data-theme="dark"] .bg-rose-50,
[data-theme="dark"] .bg-rose-100       { background-color: rgba(251,113,133,0.13) !important; }
[data-theme="dark"] .bg-pink-50,
[data-theme="dark"] .bg-pink-100       { background-color: rgba(244,114,182,0.13) !important; }
[data-theme="dark"] .bg-fuchsia-50,
[data-theme="dark"] .bg-fuchsia-100    { background-color: rgba(232,121,249,0.13) !important; }
[data-theme="dark"] .bg-purple-50,
[data-theme="dark"] .bg-purple-100,
[data-theme="dark"] .bg-violet-50,
[data-theme="dark"] .bg-violet-100     { background-color: rgba(167,139,250,0.13) !important; }
[data-theme="dark"] .bg-indigo-50,
[data-theme="dark"] .bg-indigo-100     { background-color: rgba(129,140,248,0.13) !important; }
[data-theme="dark"] .bg-cyan-50,
[data-theme="dark"] .bg-cyan-100,
[data-theme="dark"] .bg-sky-50,
[data-theme="dark"] .bg-sky-100        { background-color: rgba(56,189,248,0.13) !important; }
[data-theme="dark"] .bg-teal-50,
[data-theme="dark"] .bg-teal-100       { background-color: rgba(45,212,191,0.13) !important; }
[data-theme="dark"] .bg-stone-50,
[data-theme="dark"] .bg-stone-100,
[data-theme="dark"] .bg-neutral-50,
[data-theme="dark"] .bg-neutral-100,
[data-theme="dark"] .bg-zinc-50,
[data-theme="dark"] .bg-zinc-100       { background-color: #1f2937 !important; }

/* Texto */
[data-theme="dark"] .text-gray-900,
[data-theme="dark"] .text-slate-900    { color: #f1f5f9 !important; }
[data-theme="dark"] .text-gray-800,
[data-theme="dark"] .text-slate-800    { color: #e2e8f0 !important; }
[data-theme="dark"] .text-gray-700,
[data-theme="dark"] .text-slate-700    { color: #cbd5e1 !important; }
[data-theme="dark"] .text-gray-600,
[data-theme="dark"] .text-slate-600    { color: #b6c2d4 !important; }
[data-theme="dark"] .text-gray-500,
[data-theme="dark"] .text-slate-500    { color: #94a3b8 !important; }
[data-theme="dark"] .text-gray-400,
[data-theme="dark"] .text-slate-400    { color: #748196 !important; }

/* Borders */
[data-theme="dark"] .border-gray-200,
[data-theme="dark"] .border-slate-200,
[data-theme="dark"] .border-gray-300,
[data-theme="dark"] .border-slate-300  { border-color: #1f2937 !important; }

/* Inputs / selects nativos */
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    background-color: #0f1623 !important;
    color: #f1f5f9 !important;
    border-color: #1f2937 !important;
}
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder { color: #64748b !important; }

[data-theme="dark"] select option   { background-color: #111827 !important; color: #f1f5f9 !important; }
[data-theme="dark"] select optgroup { background-color: #0f1623 !important; color: #60a5fa !important; }

/* Inputs verdes "auto" (resultado readonly) */
[data-theme="dark"] .bg-green-50 input,
[data-theme="dark"] input.bg-green-50,
[data-theme="dark"] .border-green-200 { border-color: rgba(52,211,153,0.3) !important; }

/* Header/footer legados */
[data-theme="dark"] header.bg-white    { background-color: #111827 !important; }
[data-theme="dark"] .border-b          { border-bottom-color: #1f2937 !important; }
[data-theme="dark"] .border-t          { border-top-color: #1f2937 !important; }

/* Cards de fórmula / divider */
[data-theme="dark"] .divide-gray-200 > * + * { border-color: #1f2937 !important; }

/* Classes custom recorrentes nas páginas legadas (definidas em <style> inline) */
[data-theme="dark"] .glass-card {
    background: #111827 !important;
    border-color: #1f2937 !important;
}
[data-theme="dark"] .result-card {
    background: #0f1623 !important;
    border-color: #1f2937 !important;
}
[data-theme="dark"] .preset-card {
    background: rgba(59,130,246,0.12) !important;
    border-color: rgba(59,130,246,0.3) !important;
}
[data-theme="dark"] .preset-card:hover {
    background: rgba(59,130,246,0.2) !important;
}
[data-theme="dark"] .popular-badge { background-color: var(--hmc-blue) !important; }

/* Modais com overlay já usam bg-black/50, ok */
