:root {
    /* ── Paleta principal (ADM) ── */
    --unz-primary:       #393A3F;
    --unz-primary-dark:  #17181c;
    --unz-secondary:     #2C2F33;
    --unz-accent:        #ffd48e;
    --unz-highlight:     #c38f51;

    /* ── Cores de estado ── */
    --unz-success:       #059669;
    --unz-warning:       #d97706;
    --unz-danger:        #dc2626;
    --unz-info:          #0284c7;

    /* ── Fundos ── */
    --unz-bg-page:       #e8eaef;
    --unz-bg-content:    #ffffff;
    --unz-bg-sidebar:    #393A3F;
    --unz-bg-topbar:     #ffffff;
    --unz-bg-panel:      #f9fafc;

    /* ── Sidebar ── */
    --unz-sidebar-text:          #a8a8a8;
    --unz-sidebar-text-hover:    #4a4a4a;
    --unz-sidebar-hover:         #ffd48e;
    --unz-sidebar-border:        rgba(242,244,248,0.1);

    /* ── Textos ── */
    --unz-text-primary:   #28292d;
    --unz-text-secondary: #4a4a4a;
    --unz-text-light:     #a8a8a8;

    /* ── Bordas ── */
    --unz-border:         #d0d7e2;
    --unz-border-light:   #e8eaef;

    /* ── Botões ── */
    --unz-btn-primary-bg:     #393A3F;
    --unz-btn-primary-border: #393A3F;
    --unz-btn-primary-hover:  #2C2F33;

    /* ── Cores auxiliares ── */
    --unz-white:              #ffffff;
    --unz-black:              #000000;
    --unz-purple:             #7c3aed;

    /* ── Texto/ícone sobre fundos de identidade ── */
    --unz-on-primary:         #ffffff;
    --unz-on-accent:          #28292d;

    /* ── Status badge backgrounds/text ── */
    --unz-success-bg:         #d1fae5;
    --unz-success-text:       #065f46;
    --unz-warning-bg:         #fef3c7;
    --unz-warning-text:       #92400e;
    --unz-danger-bg:          #fee2e2;
    --unz-danger-text:        #991b1b;
    --unz-info-bg:            #dbeafe;
    --unz-info-text:          #1e40af;

    /* ── Visualizações (views) ── */
    --unz-view-bg:                 #f8fafc;
    --unz-view-border:             #c8d0dc;
    --unz-view-item-border:        #d7dde6;
    --unz-view-item-hover-bg:      #edf3ff;
    --unz-view-item-hover-border:  #9fb5d7;
    --unz-view-item-hover-text:    #102030;
    --unz-view-item-active-bg:     #e8f1ff;
    --unz-view-item-active-border: #6f8fb4;
    --unz-view-item-active-shadow: #2f5f9b;
    --unz-view-item-text:          #243447;
    --unz-view-divider:            #e2e8f0;
    --unz-view-title-text:         #333333;
    --unz-view-empty-text:         #667587;
    --unz-view-gradient-player:    linear-gradient(180deg, #fdfefe 0%, #eef3f8 100%);

    /* ── Botão voltar das views ── */
    --unz-view-back-border:        #FFFAFA;
    --unz-view-back-bg:            linear-gradient(180deg, #ffffff 0%, #edf2f7 100%);
    --unz-view-back-hover-bg:      linear-gradient(180deg, #f6f9fc 0%, #e3ebf5 100%);
    --unz-view-back-hover-border:  #7f93aa;
    --unz-view-back-focus-outline: rgba(86,119,168,0.35);

    /* ── Placeholder / empty states ── */
    --unz-placeholder-text:        #5b6573;
    --unz-placeholder-icon:        #7f8da3;
    --unz-placeholder-title:       #34465a;
    --unz-placeholder-subtitle:    #6d7584;

    /* ── Vencimento (warning light) ── */
    --unz-warning-light-bg:        #fffbeb;
    --unz-warning-light-border:    #fde68a;

    /* ── Scrollbar ── */
    --unz-scrollbar-thumb:         #ccc;

    /* ── Input ── */
    --unz-input-border:            #ccc;
    --unz-input-bg:                #ffffff;

    /* ── Trilha status ── */
    --unz-status-ativo-bg:         #dcfce7;
    --unz-status-ativo-text:       #166534;
    --unz-status-inativo-bg:       #fee2e2;
    --unz-status-inativo-text:     #991b1b;

    /* ── Curso card tag tema ── */
    --unz-tag-tema-bg:             #dbeafe;
    --unz-tag-tema-text:           #1e40af;

    /* ── Datatable (zebrado) ── */
    --unz-datatable-stripe:        rgba(230, 230, 230, 0.1);

    /* ── Thumbnail placeholder (vídeos/materiais) ── */
    --unz-thumb-bg:                #f0f0f0;
    --unz-thumb-icon:              #d0d0d0;

    /* ── Log vivo ── */
    --unz-log-conclusao:           #4ade80;

    /* ── Realces internos das views ── */
    --unz-view-inset-highlight:    rgba(255, 255, 255, 0.85);
    --unz-view-empty-bg:           rgba(255, 255, 255, 0.7);

    /* ── Layout ── */
    --unz-sidebar-width:      250px;
    --unz-sidebar-collapsed:  70px;
    --unz-topbar-height:      50px;

    /* ── Arredondamento ── */
    --unz-radius:             6px;
    --unz-radius-lg:          12px;
}

/* ============================================================
   TEMA ESCURO (data-theme="dark")
   Preserva as cores de identidade visual: --unz-accent (#ffd48e)
   e --unz-highlight (#c38f51), que passam a assumir o papel de
   destaque principal sobre os fundos escuros.
   ============================================================ */
[data-theme="dark"] {
    /* ── Paleta principal (identidade preservada) ── */
    --unz-primary:       #ffd48e;
    --unz-primary-dark:  #c38f51;
    --unz-secondary:     #6b7280;
    --unz-accent:        #ffd48e;
    --unz-highlight:     #c38f51;

    /* ── Cores de estado ── */
    --unz-success:       #34d399;
    --unz-warning:       #fbbf24;
    --unz-danger:        #f87171;
    --unz-info:          #38bdf8;

    /* ── Fundos ── */
    --unz-bg-page:       #17181c;
    --unz-bg-content:    #1f2126;
    --unz-bg-sidebar:    #232529;
    --unz-bg-topbar:     #1f2126;
    --unz-bg-panel:      #26282e;

    /* ── Sidebar ── */
    --unz-sidebar-text:          #a8abb3;
    --unz-sidebar-text-hover:    #28292d;
    --unz-sidebar-hover:         #ffd48e;
    --unz-sidebar-border:        rgba(242, 244, 248, 0.08);

    /* ── Textos ── */
    --unz-text-primary:   #e8eaef;
    --unz-text-secondary: #a8abb3;
    --unz-text-light:     #6f7480;

    /* ── Bordas ── */
    --unz-border:         #3a3d44;
    --unz-border-light:   #2e3138;

    /* ── Botões ── */
    --unz-btn-primary-bg:     #ffd48e;
    --unz-btn-primary-border: #ffd48e;
    --unz-btn-primary-hover:  #c38f51;

    /* ── Texto/ícone sobre fundos de identidade ── */
    --unz-on-primary:         #28292d;
    --unz-on-accent:          #28292d;

    /* ── Status badge backgrounds/text ── */
    --unz-success-bg:         rgba(52, 211, 153, 0.15);
    --unz-success-text:       #6ee7b7;
    --unz-warning-bg:         rgba(251, 191, 36, 0.15);
    --unz-warning-text:       #fcd34d;
    --unz-danger-bg:          rgba(248, 113, 113, 0.15);
    --unz-danger-text:        #fca5a5;
    --unz-info-bg:            rgba(56, 189, 248, 0.15);
    --unz-info-text:          #7dd3fc;

    /* ── Visualizações (views) ── */
    --unz-view-bg:                 #1a1c20;
    --unz-view-border:             #34373e;
    --unz-view-item-border:        #3a3d44;
    --unz-view-item-hover-bg:      rgba(255, 212, 142, 0.12);
    --unz-view-item-hover-border:  #c38f51;
    --unz-view-item-hover-text:    #ffd48e;
    --unz-view-item-active-bg:     rgba(255, 212, 142, 0.18);
    --unz-view-item-active-border: #c38f51;
    --unz-view-item-active-shadow: #c38f51;
    --unz-view-item-text:          #d4d7dd;
    --unz-view-divider:            #2e3138;
    --unz-view-title-text:         #e8eaef;
    --unz-view-empty-text:         #9aa0aa;
    --unz-view-gradient-player:    linear-gradient(180deg, #1f2126 0%, #17181c 100%);

    /* ── Botão voltar das views ── */
    --unz-view-back-border:        #3a3d44;
    --unz-view-back-bg:            linear-gradient(180deg, #26282e 0%, #1f2126 100%);
    --unz-view-back-hover-bg:      linear-gradient(180deg, #2e3138 0%, #26282e 100%);
    --unz-view-back-hover-border:  #c38f51;
    --unz-view-back-focus-outline: rgba(195, 143, 81, 0.35);

    /* ── Placeholder / empty states ── */
    --unz-placeholder-text:        #9aa0aa;
    --unz-placeholder-icon:        #6f7480;
    --unz-placeholder-title:       #d4d7dd;
    --unz-placeholder-subtitle:    #8a8f98;

    /* ── Vencimento (warning light) ── */
    --unz-warning-light-bg:        rgba(251, 191, 36, 0.12);
    --unz-warning-light-border:    rgba(251, 191, 36, 0.4);

    /* ── Scrollbar ── */
    --unz-scrollbar-thumb:         #4a4d55;

    /* ── Input ── */
    --unz-input-border:            #3a3d44;
    --unz-input-bg:                #26282e;

    /* ── Trilha status ── */
    --unz-status-ativo-bg:         rgba(52, 211, 153, 0.15);
    --unz-status-ativo-text:       #6ee7b7;
    --unz-status-inativo-bg:       rgba(248, 113, 113, 0.15);
    --unz-status-inativo-text:     #fca5a5;

    /* ── Curso card tag tema ── */
    --unz-tag-tema-bg:             rgba(56, 189, 248, 0.15);
    --unz-tag-tema-text:           #7dd3fc;

    /* ── Datatable (zebrado) ── */
    --unz-datatable-stripe:        rgba(255, 255, 255, 0.04);

    /* ── Thumbnail placeholder (vídeos/materiais) ── */
    --unz-thumb-bg:                #26282e;
    --unz-thumb-icon:              #4a4d55;

    /* ── Realces internos das views ── */
    --unz-view-inset-highlight:    rgba(255, 255, 255, 0.05);
    --unz-view-empty-bg:           rgba(255, 255, 255, 0.04);
}

/* ============================================================
   DESIGN TOKENS NOVOS — Atualizza (modelo-ui, Fase 1)
   Prefixo --atz-*, com o mesmo mecanismo de tema [data-theme] já
   usado pelos tokens --unz-* acima. Coexistem no mesmo arquivo:
   --unz-* segue usado por unz.css (páginas ainda não redesenhadas),
   --atz-* pelo novo template/telas redesenhadas (Fases 1-6).

   Valores padrão (sem [data-theme]) são os do tema CLARO, para
   bater com o mesmo padrão já usado pelos tokens --unz-* acima
   (claro por padrão, [data-theme="dark"] como override) e com o
   modelo-ui, cujas páginas usam data-theme="light" por padrão.
   Isso evita o flash/estado confuso na primeira visita, quando
   ainda não há preferência salva em localStorage e a página
   carrega sem nenhum atributo data-theme definido.
   ============================================================ */
:root {
    /* ── Tipografia ── */
    --atz-serif: 'Montserrat', -apple-system, sans-serif;
    --atz-sans:  'Inter', -apple-system, sans-serif;

    /* ── Arredondamento ── */
    --atz-radius-s: 6px;
    --atz-radius-m: 10px;
    --atz-radius-l: 16px;

    /* ── Paleta padrão (tema CLARO) ── */
    --atz-bg:            #FAF7EF;
    --atz-bg-soft:       #F1EAD8;
    --atz-surface:       #FFFFFF;
    --atz-surface-raised:#FFFFFF;
    --atz-ink:           #1C1912;
    --atz-ink-soft:      #6B6252;
    --atz-ink-faint:     #9A8F79;
    --atz-border:        #E7DFC9;
    --atz-border-strong: #D8CBA8;
    --atz-gold:          #A87C33;
    --atz-gold-bright:   #C79A4C;
    --atz-gold-soft:     #EFE1BE;
    --atz-gold-ink:      #4A3A16;
    --atz-shadow:        0 1px 2px rgba(28,25,18,.04), 0 8px 24px -8px rgba(28,25,18,.10);
    --atz-shadow-hover:  0 2px 4px rgba(28,25,18,.06), 0 16px 32px -8px rgba(28,25,18,.16);
    --atz-overlay-mountain: .05;
    --atz-danger:        #B3492F;
    --atz-ok:            #4B7A4E;
}

[data-theme="dark"] {
    --atz-bg:            #131110;
    --atz-bg-soft:       #1B1815;
    --atz-surface:       #1D1A16;
    --atz-surface-raised:#221E19;
    --atz-ink:           #F3EEE2;
    --atz-ink-soft:      #B8AE99;
    --atz-ink-faint:     #837962;
    --atz-border:        #34302A;
    --atz-border-strong: #453F35;
    --atz-gold:          #D9AF6C;
    --atz-gold-bright:   #F0CD8E;
    --atz-gold-soft:     #3A2F1C;
    --atz-gold-ink:      #F0CD8E;
    --atz-shadow:        0 1px 2px rgba(0,0,0,.3), 0 8px 24px -8px rgba(0,0,0,.5);
    --atz-shadow-hover:  0 2px 4px rgba(0,0,0,.35), 0 16px 40px -8px rgba(0,0,0,.6);
    --atz-overlay-mountain: .07;
    --atz-danger:        #D97A63;
    --atz-ok:            #7FAE82;
}
