/* ============================================================
   Contana Web — tema noua (redesign vizual)

   Se incarca in toate paginile care extind base.html (clasa `tema-noua` pe <html>),
   pentru toate rolurile. Nu schimba nicio functionalitate si
   niciun layout de pagina — doar culori, fundal, meniu, titluri, butoane.

   Cum e construita:
   - variabilele din :root (style.css) sunt redefinite pe .tema-noua, deci
     tot ce foloseste var(--primary) & co. se muta singur pe paleta noua;
   - regulile de mai jos au prefixul `.tema-noua`, ca sa bata si stilurile
     scrise in <style>-ul fiecarei pagini (acelea vin mai tarziu in pagina);
   - ce tine de dimensiuni (latimea meniului, celulele tabelelor) sta in
     @media (min-width: 769px): pe mobil raman regulile existente, care
     transforma tabelele in carduri si meniul in sertar.

   Contrast (WCAG, text normal >= 4.5), verificat prin calcul:
     alb pe capetele gradientului de buton  #4f46e5 6.3 · #7c3aed 5.7
     text meniu #b9c3d9 pe #0b1220 10.6 (9.8 jos) · titlu sectiune #8492b3 6.0 (5.6 jos)
     text #0f172a pe fundal #f3f5fb 16.3 · text secundar #55607a pe #f3f5fb 5.8
   ============================================================ */

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/inter-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                   U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                   U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                   U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                   U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

.tema-noua {
    --primary: #4f46e5;
    --primary-dark: #3730a3;
    --primary-light: #818cf8;
    --accent: #4f46e5;
    --bg: #f3f5fb;
    --bg-card: #ffffff;
    --text: #0f172a;
    --text-muted: #55607a;
    --border: #e1e5ef;
    --danger: #dc2626;
    --warning: #d97706;
    --success: #16a34a;
    --info: #2563eb;
    --sidebar-bg: #0b1220;
    --sidebar-text: #b9c3d9;
    --sidebar-active: #a5b4fc;

    --titlu: #0f172a;
    --grad: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --inel: 0 0 0 4px rgba(79, 70, 229, .16);
    --umbra-card: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 28px -14px rgba(15, 23, 42, .14);
    --umbra-sus: 0 2px 4px rgba(15, 23, 42, .05), 0 18px 36px -16px rgba(79, 70, 229, .32);
}

.tema-noua body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    background:
        radial-gradient(1100px 520px at 88% -8%, rgba(99, 102, 241, .13), transparent 62%),
        radial-gradient(900px 460px at 8% 0%, rgba(14, 165, 233, .08), transparent 58%),
        var(--bg);
    background-attachment: fixed;
}
/* Campurile si butoanele scrise in paginile aplicatiei nu mostenesc fontul.
   :where() tine specificitatea la zero, ca fonturile monospace puse pe
   clase (IBAN, analitice) sa ramana cum sunt. */
:where(.tema-noua) input, :where(.tema-noua) select,
:where(.tema-noua) textarea, :where(.tema-noua) button { font-family: inherit; }

/* ============================================================
   Bara de sus
   ============================================================ */
.tema-noua .topbar {
    background: linear-gradient(90deg, #0b1220 0%, #111a33 100%);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .06), 0 8px 24px -16px rgba(2, 6, 23, .8);
}
/* Sigla Contana (static/img/logo-contana*.svg, de pe contana.ro): varianta
   cu litere albe pe bara inchisa, originalul pe cardul alb de autentificare. */
.tema-noua .topbar-brand { display: flex; align-items: center; gap: 9px; }
.tema-noua .brand-logo { display: block; height: 21px; width: auto; }
.tema-noua .brand-web {
    font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
    padding: 3px 7px; border-radius: 6px;
    background: rgba(18, 150, 210, .2); color: #7dd3fc;
}
.tema-noua .login-logo { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 10px; }
.tema-noua .login-logo .brand-logo { width: min(240px, 66%); height: auto; }
.tema-noua .login-logo .brand-web { background: rgba(18, 150, 210, .12); color: #0b6a96; }
@media (max-width: 768px) {
    .tema-noua .brand-logo { height: 15px; }
    .tema-noua .topbar .brand-web { display: none; }
}
.tema-noua .topbar-user > strong { font-weight: 600; color: #e6eaf5; }
.tema-noua .firm-chip {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 10px;
}
.tema-noua .firm-chip-cui { letter-spacing: .06em; }
.tema-noua .firm-chip-none { background: rgba(220, 38, 38, .2); border-color: rgba(248, 113, 113, .35); }
.tema-noua .role-badge { letter-spacing: .06em; }
.tema-noua .role-badge.client { background: rgba(129, 140, 248, .2); color: #c7d2fe; }
.tema-noua .role-badge.contabil { background: rgba(251, 191, 36, .18); color: #fde68a; }
.tema-noua .role-badge.admin { background: rgba(248, 113, 113, .2); color: #fecaca; }
.tema-noua .btn-logout,
.tema-noua .btn-parola {
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 9px;
    transition: background .15s, border-color .15s;
}
.tema-noua .btn-logout:hover,
.tema-noua .btn-parola:hover { background: rgba(255, 255, 255, .13); border-color: rgba(255, 255, 255, .28); }

/* ============================================================
   Meniul lateral
   ============================================================ */
.tema-noua .sidebar {
    background: linear-gradient(180deg, #0b1220 0%, #101935 100%);
    border-right: 1px solid rgba(255, 255, 255, .05);
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .18) transparent;
}
.tema-noua .side-link,
.tema-noua .side-sub {
    display: flex; align-items: center; gap: 11px;
    margin: 2px 10px; padding: 9px 12px;
    border-left: 0; border-radius: 10px;
    font-size: .88rem; font-weight: 500;
    transition: background .15s, color .15s;
}
.tema-noua .side-link:hover,
.tema-noua .side-sub:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.tema-noua .side-link.active,
.tema-noua .side-sub.active {
    background: var(--grad);
    color: #fff; font-weight: 600;
    box-shadow: 0 8px 18px -10px rgba(99, 102, 241, .95), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.tema-noua .side-sub.disabled:hover { background: none; color: var(--sidebar-text); }
.tema-noua .side-section { margin-bottom: 0; }
.tema-noua .side-section-header {
    padding: 16px 22px 7px;
    font-size: .68rem; letter-spacing: .1em;
    color: #8492b3;
}
.tema-noua .side-section-header:hover { background: none; color: #dbe2f1; }
.tema-noua .side-section-header .chevron { color: inherit; }
.tema-noua .side-necitite { margin-left: auto; }
/* Contabilul fara firma aleasa: indemnul din locul meniului */
.tema-noua .side-hint { padding: 16px 22px; color: #8492b3; font-size: .82rem; line-height: 1.5; }

/* Iconitele din meniu: desenate ca masca peste culoarea textului, deci isi
   schimba singure culoarea la hover si pe elementul curent. */
.tema-noua .side-link::before,
.tema-noua .side-sub::before {
    content: ""; width: 18px; height: 18px; flex: none;
    background: currentColor; opacity: .85;
    -webkit-mask: var(--ico) center / contain no-repeat;
            mask: var(--ico) center / contain no-repeat;
}
.tema-noua .side-link.active::before,
.tema-noua .side-sub.active::before { opacity: 1; }
.tema-noua .side-link[href$="/"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='9' rx='1.5'/%3E%3Crect x='14' y='3' width='7' height='5' rx='1.5'/%3E%3Crect x='14' y='12' width='7' height='9' rx='1.5'/%3E%3Crect x='3' y='16' width='7' height='5' rx='1.5'/%3E%3C/svg%3E"); }
.tema-noua .side-sub[href$="/documents"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 3v5h5M9 13h6M9 17h6'/%3E%3C/svg%3E"); }
.tema-noua .side-sub[href$="/billing/"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 3v18l2.5-1.5L10 21l2-1.5 2 1.5 2.5-1.5L19 21V3z'/%3E%3Cpath d='M9 8h6M9 12h6'/%3E%3C/svg%3E"); }
.tema-noua .side-sub[href$="/parteneri/"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3.5'/%3E%3Cpath d='M2.5 20a6.5 6.5 0 0 1 13 0M16 4.6a3.5 3.5 0 0 1 0 6.8M21.5 20a6.5 6.5 0 0 0-4-6'/%3E%3C/svg%3E"); }
.tema-noua .side-sub[href$="/billing/articole"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l8 4.5v9L12 21l-8-4.5v-9z'/%3E%3Cpath d='M4 7.5l8 4.5 8-4.5M12 12v9'/%3E%3C/svg%3E"); }
.tema-noua .side-sub[href$="/autovehicule/"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 11l1.6-4.2a2 2 0 0 1 1.9-1.3h7a2 2 0 0 1 1.9 1.3L19 11'/%3E%3Crect x='3' y='11' width='18' height='6' rx='2'/%3E%3Cpath d='M6.5 17v2M17.5 17v2M7 14h.01M17 14h.01'/%3E%3C/svg%3E"); }
.tema-noua .side-sub[href$="/salarizare/salariati"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Ccircle cx='9' cy='11' r='2'/%3E%3Cpath d='M6 16a3 3 0 0 1 6 0M15 10h3M15 14h3'/%3E%3C/svg%3E"); }
.tema-noua .side-sub[href$="/salarizare/pontaj"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4M9 15.5l2 2 4-4'/%3E%3C/svg%3E"); }
.tema-noua .side-sub.disabled { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='4'/%3E%3Cpath d='M12 8v8M8 12h8'/%3E%3C/svg%3E"); }
.tema-noua .side-sub[href$="/salarizare/documente"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7a2 2 0 0 1 2-2h4l2 2.5h8a2 2 0 0 1 2 2V17a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3C/svg%3E"); }
.tema-noua .side-sub[href$="/administrare/date-firma"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='3' width='14' height='18' rx='1.5'/%3E%3Cpath d='M9 7.5h1.5M13.5 7.5H15M9 11.5h1.5M13.5 11.5H15M10 21v-4h4v4'/%3E%3C/svg%3E"); }
.tema-noua .side-sub[href$="/administrare/conturi-bancare"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9.5L12 4l9 5.5M4 20h16M6 10v7M10 10v7M14 10v7M18 10v7'/%3E%3C/svg%3E"); }
.tema-noua .side-sub[href*="/mesagerie/client/"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 4h14a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-7l-5 4v-4H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z'/%3E%3C/svg%3E"); }
.tema-noua .side-sub[href$="/mesagerie/client/admin"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Ccircle cx='12' cy='12' r='3.5'/%3E%3Cpath d='M5.7 5.7l3.8 3.8M14.5 14.5l3.8 3.8M18.3 5.7l-3.8 3.8M9.5 14.5l-3.8 3.8'/%3E%3C/svg%3E"); }
.tema-noua .side-link[href*="/mesagerie/"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 4h14a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-7l-5 4v-4H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z'/%3E%3C/svg%3E"); }
.tema-noua .side-sub[href$="/efactura/"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 3v5h5M9 15l2 2 4-4'/%3E%3C/svg%3E"); }
.tema-noua .side-sub[href$="/bonuri/"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 8V3h10v5'/%3E%3Crect x='3' y='8' width='18' height='9' rx='2'/%3E%3Cpath d='M7 14h10v7H7z'/%3E%3C/svg%3E"); }
.tema-noua .side-sub[href$="/plan-conturi/"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 5h8M7 5v14M7 12h4M7 19h4M15 5h6M15 12h6M15 19h6'/%3E%3C/svg%3E"); }
.tema-noua .side-sub[href$="/admin/firms"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='3' width='14' height='18' rx='1.5'/%3E%3Cpath d='M9 7.5h1.5M13.5 7.5H15M9 11.5h1.5M13.5 11.5H15M10 21v-4h4v4'/%3E%3C/svg%3E"); }
.tema-noua .side-sub[href$="/admin/users"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3.5'/%3E%3Cpath d='M2.5 20a6.5 6.5 0 0 1 13 0M16 4.6a3.5 3.5 0 0 1 0 6.8M21.5 20a6.5 6.5 0 0 0-4-6'/%3E%3C/svg%3E"); }
.tema-noua .side-sub[href$="/admin/accountants"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='3' width='14' height='18' rx='2'/%3E%3Cpath d='M8.5 7.5h7M8.5 12h.01M12 12h.01M15.5 12h.01M8.5 16h.01M12 16h.01M15.5 16h.01'/%3E%3C/svg%3E"); }
.tema-noua .side-sub[href$="/admin/sesiuni"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='12' rx='2'/%3E%3Cpath d='M8 20h8M12 16v4'/%3E%3C/svg%3E"); }
.tema-noua .side-sub[href$="/admin/notificari/"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 16v-5a6 6 0 0 1 12 0v5l1.5 2h-15z'/%3E%3Cpath d='M10 21h4'/%3E%3C/svg%3E"); }
.tema-noua .side-sub[href$="/admin/monitorizare"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12h4l3-8 4 16 3-8h4'/%3E%3C/svg%3E"); }
.tema-noua .side-sub[href$="/admin/server/"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='7' rx='2'/%3E%3Crect x='3' y='13' width='18' height='7' rx='2'/%3E%3Cpath d='M7 7.5h.01M7 16.5h.01'/%3E%3C/svg%3E"); }
.tema-noua .side-sub[href$="/admin/config"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6h10M18 6h2M4 12h4M12 12h8M4 18h12'/%3E%3Ccircle cx='16' cy='6' r='2'/%3E%3Ccircle cx='10' cy='12' r='2'/%3E%3Ccircle cx='18' cy='18' r='2'/%3E%3C/svg%3E"); }
.tema-noua .side-sub[href$="/efactura/jurnal"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 6h12M8 12h12M8 18h12M4 6h.01M4 12h.01M4 18h.01'/%3E%3C/svg%3E"); }

@media (min-width: 769px) {
    .tema-noua .sidebar { width: 236px; padding: 12px 0 20px; }
    .tema-noua .content { padding: 28px 36px; }
}

/* ============================================================
   Titluri
   ============================================================ */
.tema-noua h2,
.tema-noua .hr-title,
.tema-noua .pj-title,
.tema-noua .d-name {
    color: var(--titlu);
    font-weight: 700;
    letter-spacing: -.022em;
}
.tema-noua h2 { font-size: 1.55rem; }
.tema-noua .card h3,
.tema-noua .sectiune h3,
.tema-noua .add-box h3,
.tema-noua .modal-content h3,
.tema-noua .modal-card h3 { letter-spacing: -.005em; }
.tema-noua .stats-section h3 {
    font-size: .72rem; font-weight: 700; letter-spacing: .1em;
    margin-bottom: 10px;
}

/* ============================================================
   Carduri
   ============================================================ */
.tema-noua .card,
.tema-noua .sectiune,
.tema-noua .month-group,
.tema-noua .tbl-wrap,
.tema-noua .grid-wrap {
    border-radius: 16px;
    box-shadow: var(--umbra-card);
}

/* Cifrele din dashboard */
.tema-noua .stat-card {
    position: relative; overflow: hidden;
    display: flex; flex-direction: column-reverse; gap: 6px;
    text-align: left;
    padding: 22px 26px;
    border-radius: 18px;
    box-shadow: var(--umbra-card);
    --nuanta: 79, 70, 229;
}
/* Accentul cardului urmeaza culoarea cifrei (pusa in pagina, pe semnificatie) */
.tema-noua .stat-card:has(.stat-number[style*="--info"]) { --nuanta: 37, 99, 235; }
.tema-noua .stat-card:has(.stat-number[style*="--warning"]) { --nuanta: 217, 119, 6; }
.tema-noua .stat-card:has(.stat-number[style*="--success"]) { --nuanta: 22, 163, 74; }
.tema-noua .stat-card::before {
    content: ""; position: absolute; inset: 0 auto 0 0; width: 4px;
    background: rgb(var(--nuanta));
}
.tema-noua .stat-card::after {
    content: ""; position: absolute; right: -46px; top: -56px;
    width: 180px; height: 180px; border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--nuanta), .16), rgba(var(--nuanta), 0) 68%);
    pointer-events: none;
}
.tema-noua .stat-number {
    font-size: 2.7rem; font-weight: 700; line-height: 1;
    letter-spacing: -.035em; font-variant-numeric: tabular-nums;
}
.tema-noua .stat-label { font-size: .72rem; font-weight: 700; letter-spacing: .1em; margin-top: 0; }

.tema-noua .quick-link-card {
    display: flex; align-items: center; gap: 10px;
    text-align: left; padding: 18px 22px;
    border-radius: 16px;
    box-shadow: var(--umbra-card);
    transition: transform .15s, box-shadow .15s, border-color .15s;
}
.tema-noua .quick-link-card::after {
    content: "→"; margin-left: auto;
    color: var(--primary); font-size: 1.15rem;
    transition: transform .15s;
}
.tema-noua .quick-link-card:hover {
    transform: translateY(-2px);
    border-color: #c7d2fe;
    box-shadow: var(--umbra-sus);
}
.tema-noua .quick-link-card:hover::after { transform: translateX(4px); }

/* ============================================================
   Butoane
   ============================================================ */
.tema-noua .btn {
    border-radius: 10px;
    text-decoration: none;
    letter-spacing: .005em;
    transition: transform .12s, box-shadow .15s, background .15s, border-color .15s, color .15s, filter .15s;
}
.tema-noua .btn-sm { border-radius: 8px; }
.tema-noua .btn:focus-visible,
.tema-noua .btn-p:focus-visible,
.tema-noua .btn-s:focus-visible { outline: none; box-shadow: var(--inel); }
.tema-noua .btn:disabled { opacity: .5; cursor: not-allowed; }

.tema-noua .btn-primary,
.tema-noua .btn-p,
.tema-noua .pw-btn-p,
.tema-noua .up-btn-cam {
    background: var(--grad);
    color: #fff;
    box-shadow: 0 8px 18px -10px rgba(79, 70, 229, .9), inset 0 1px 0 rgba(255, 255, 255, .2);
}
.tema-noua .btn-primary:hover:not(:disabled),
.tema-noua .btn-p:hover:not(:disabled),
.tema-noua .pw-btn-p:hover:not(:disabled) {
    background: var(--grad);
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 12px 22px -10px rgba(79, 70, 229, .95), inset 0 1px 0 rgba(255, 255, 255, .2);
}
.tema-noua .btn-primary:active:not(:disabled),
.tema-noua .btn-p:active:not(:disabled) { transform: translateY(0); filter: brightness(.97); }

.tema-noua .btn-secondary {
    background: #fff; color: #334155;
    box-shadow: inset 0 0 0 1px #d5dbe8, 0 1px 2px rgba(15, 23, 42, .05);
}
.tema-noua .btn-secondary:hover:not(:disabled) {
    background: #f7f8ff; color: var(--primary-dark);
    box-shadow: inset 0 0 0 1px #a5b4fc, 0 1px 2px rgba(15, 23, 42, .05);
}
/* Actiunile secundare din liste („Deschide”, „Vezi”): tonal, nu plin */
.tema-noua .btn-info {
    background: #eef2ff; color: var(--primary-dark);
    box-shadow: inset 0 0 0 1px #c7d2fe;
}
.tema-noua .btn-info:hover:not(:disabled) { background: #e0e7ff; }
.tema-noua .btn-warning { background: #f59e0b; color: #422006; }
.tema-noua .btn-warning:hover:not(:disabled) { background: #fbbf24; }
.tema-noua .btn-danger { background: linear-gradient(135deg, #dc2626, #b91c1c); }
.tema-noua .btn-danger:hover:not(:disabled) { background: #b91c1c; }

.tema-noua .filter-btn,
.tema-noua .hr-filter { border-radius: 999px; transition: border-color .15s, background .15s, color .15s; }
.tema-noua .filter-btn.active,
.tema-noua .hr-filter.active { box-shadow: 0 8px 16px -10px rgba(79, 70, 229, .9); }
.tema-noua .up-btn-file { color: var(--primary-dark); border-color: #c7d2fe; }

/* ============================================================
   Campuri
   ============================================================ */
.tema-noua .form-control { border-radius: 10px; border-color: #d5dbe8; }
.tema-noua .content input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):focus,
.tema-noua .content select:focus,
.tema-noua .content textarea:focus,
.tema-noua .login-card .form-control:focus,
.tema-noua .pw-fld input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--inel);
}
/* Grila de pontaj: celule lipite, inelul lat s-ar intinde peste vecine */
.tema-noua table.pj td.zi input:focus { outline: 2px solid var(--primary); box-shadow: none; }
.tema-noua input[type=checkbox], .tema-noua input[type=radio] { accent-color: var(--primary); }

/* ============================================================
   Tabele
   ============================================================ */
.tema-noua .table {
    border-collapse: separate; border-spacing: 0;
    border-radius: 14px;
    box-shadow: var(--umbra-card);
}
.tema-noua .table th {
    background: #f6f8fc; color: #475569;
    border-bottom: 1px solid var(--border);
    font-size: .72rem; font-weight: 700; letter-spacing: .05em;
}
.tema-noua table.hr-table thead th,
.tema-noua table.pj thead th { color: #475569; }
@media (min-width: 769px) {
    .tema-noua .table tr:hover td { background: #f7f8ff; }
    /* Celule ceva mai stranse pe orizontala: tabelele late (facturile
       contabilului au 12 coloane) ieseau din ecran la 1440px. */
    .tema-noua .table th { padding: 11px 12px; }
    .tema-noua .table td { padding: 10px 12px; }
}
.tema-noua .invoice-row:hover { background: #f5f6ff !important; }
.tema-noua table.hr-table tbody tr:hover { background: #f5f6ff; }

.tema-noua .badge,
.tema-noua .status-badge,
.tema-noua .st-badge { border-radius: 999px; }

/* ============================================================
   Mesaje, ferestre
   ============================================================ */
.tema-noua .flash { border-radius: 12px; }
.tema-noua .toast { border-radius: 12px; box-shadow: 0 16px 32px -14px rgba(15, 23, 42, .5); }

.tema-noua .modal,
.tema-noua .modal-overlay,
.tema-noua .modal-bg,
.tema-noua .pw-overlay,
.tema-noua .af-overlay {
    background: rgba(15, 23, 42, .55);
    -webkit-backdrop-filter: blur(4px);
            backdrop-filter: blur(4px);
}
.tema-noua .modal-content,
.tema-noua .modal-card,
.tema-noua .pw-modal,
.tema-noua .af-modal {
    border-radius: 18px;
    box-shadow: 0 30px 70px -24px rgba(2, 6, 23, .6);
}
.tema-noua .pw-tab.activ { color: var(--primary); border-bottom-color: var(--primary); }
.tema-noua .pw-info { background: #eef2ff; border-color: #c7d2fe; color: var(--primary-dark); }

/* ============================================================
   Casete colorate din pagini (aveau nuante de albastru-petrol scrise direct)
   ============================================================ */
.tema-noua .firm-info { background: #eef2ff; border-radius: 999px; }
.tema-noua .upload-zone { border: 2px dashed #c7d2fe; background: #f8f9ff; border-radius: 16px; }
.tema-noua .upload-zone:hover,
.tema-noua .upload-zone.dragover { background: #eef2ff; }
.tema-noua .add-box,
.tema-noua .ded-box { background: #f6f7ff; border-color: #dfe3fb; border-radius: 14px; }
.tema-noua .ded-manual { border-top-color: #c7d2fe; }
.tema-noua .hr-hint { background: #eef2ff; }
.tema-noua .item-card { background: #fafbff; border-radius: 12px; }
.tema-noua .month-header { background: #f6f8fc; }
.tema-noua .month-header:hover { background: #eef1f9; }
.tema-noua .month-header .count { border-radius: 999px; }
.tema-noua .doc-card { border-radius: 12px; }
.tema-noua .vm-btn.download { border-color: #c7d2fe; }
.tema-noua .vm-btn.download:hover { background: #eef2ff; }
.tema-noua .act-btn:hover,
.tema-noua .search-item:hover,
.tema-noua .art-dropdown .ai:hover,
.tema-noua .search-dropdown .sd-item:hover { background: #f1f3ff; }
.tema-noua .search-manual { background: #eef2ff; }
.tema-noua .search-manual:hover { background: #e0e7ff; }

.tema-noua .chat-box { background: #eef1f8; border-radius: 16px; }
.tema-noua .mine .msg-bubble { background: var(--grad); }
.tema-noua .chat-attach-preview { background: #eef2ff; }

/* Planul de conturi, bonuri (contabil) */
.tema-noua .pc-arbore,
.tema-noua .pc-panou { border-radius: 16px; box-shadow: var(--umbra-card); }
.tema-noua .pc-clasa > .cap:hover,
.tema-noua .pc-cont:hover,
.tema-noua .btn-mic:hover { background: #f5f6ff; }
.tema-noua .pc-cont.sel,
.tema-noua .nr { background: #eef2ff; }
.tema-noua .nr.z { background: transparent; }
.tema-noua .btn-mic:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.tema-noua .bn-tabs { background: #e8ecf6; border-radius: 12px; }
.tema-noua .bn-tab { border-radius: 9px; }
.tema-noua tr.bn-luna td { background: #f6f8fc; }
.tema-noua tr.bn-luna:hover td { background: #eef1f9; }

/* ============================================================
   Autentificare
   ============================================================ */
.tema-noua .login-wrapper {
    padding: 24px;
    background:
        radial-gradient(820px 560px at 12% 8%, rgba(99, 102, 241, .42), transparent 62%),
        radial-gradient(760px 560px at 92% 94%, rgba(124, 58, 237, .36), transparent 62%),
        radial-gradient(560px 380px at 84% 6%, rgba(14, 165, 233, .2), transparent 60%),
        #0a0f1f;
}
.tema-noua .login-card {
    width: 410px;
    padding: 40px 38px 34px;
    border-radius: 22px;
    box-shadow: 0 40px 90px -30px rgba(2, 6, 23, .9), 0 0 0 1px rgba(255, 255, 255, .5);
}
.tema-noua .login-subtitle { margin-bottom: 28px; }
.tema-noua .login-card .form-control { padding: 11px 14px; }
.tema-noua .login-card .btn-block { padding: 12px 20px; font-size: .95rem; margin-top: 4px; }

@media (prefers-reduced-motion: reduce) {
    .tema-noua .btn, .tema-noua .quick-link-card, .tema-noua .quick-link-card::after { transition: none; }
    .tema-noua .btn-primary:hover:not(:disabled),
    .tema-noua .btn-p:hover:not(:disabled),
    .tema-noua .quick-link-card:hover { transform: none; }
}
