/* ============================================================
   Admin CSS — Sistema de Gestão Integrada
   Alves & Fonseca Transportes
   Redesign Premium — Outfit + DM Sans, Palette Cobre/Neutro
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&family=DM+Mono:wght@400;500&display=swap');

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

:root {
    --sidebar-w: 264px;

    /* Palette — Carvão + Cobre */
    --color-bg:            #F4F4F1;       /* warm off-white — nunca pure white */
    --color-surface:       #FAFAF8;       /* ligeiramente mais quente que bg */
    --color-surface-2:     #EFEDE9;       /* fundo secundário */
    --color-border:        #E4E2DC;       /* warm gray border */
    --color-border-strong: #C8C5BC;

    /* Sidebar */
    --color-sidebar:        #1C1C1A;      /* off-black quente, não azulado */
    --color-sidebar-hover:  #2A2A27;
    --color-sidebar-active: #323230;

    /* Accent — Cobre / Âmbar escuro */
    --color-accent:        #B5813C;       /* cobre envelhecido */
    --color-accent-h:      #9A6B2E;       /* hover mais escuro */
    --color-accent-light:  #F5ECD8;       /* fundo suave do accent */
    --color-accent-border: #DEC08A;

    /* Semânticas */
    --color-success:       #3A7D44;
    --color-success-bg:    #EBF5ED;
    --color-warning:       #B5811A;
    --color-warning-bg:    #FDF4E3;
    --color-danger:        #C0392B;
    --color-danger-bg:     #FDECEA;
    --color-info:          #2B6CB0;
    --color-info-bg:       #EBF4FF;

    /* Texto */
    --color-text:          #1A1A17;       /* quente, não azulado */
    --color-text-2:        #4A4A44;       /* secundário */
    --color-muted:         #7A7A72;       /* terciário */
    --color-placeholder:   #ABABAA;

    /* Raios — variados (não tudo igual) */
    --radius-xs:  4px;
    --radius-sm:  6px;
    --radius-md:  10px;
    --radius-lg:  14px;
    --radius-xl:  20px;

    /* Sombras tintadas com hue cálido */
    --shadow-sm:  0 1px 3px rgba(28,22,10,.07), 0 1px 2px rgba(28,22,10,.04);
    --shadow-md:  0 4px 14px rgba(28,22,10,.09), 0 1px 4px rgba(28,22,10,.05);
    --shadow-lg:  0 12px 40px rgba(28,22,10,.12), 0 3px 10px rgba(28,22,10,.06);
    --shadow-xl:  0 24px 64px rgba(28,22,10,.16);
    --shadow-inset: inset 0 1px 2px rgba(28,22,10,.06);

    --transition: 0.18s ease;
    --transition-slow: 0.32s ease;
}

html, body {
    height: 100%;
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 15px;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Grain overlay sutil sobre o body */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: .018;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
    background-repeat: repeat;
}

a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Números tabulares em dados */
.tabular { font-variant-numeric: tabular-nums; font-family: 'DM Mono', monospace; }

/* ── Layout ──────────────────────────────────────────────── */
.app-layout {
    display: flex;
    min-height: 100dvh;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-w);
    background: var(--color-sidebar);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: fixed;
    top: 0; left: 0;
    height: 100dvh;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 1px 0 0 rgba(255,255,255,.04);
}

.sidebar-brand {
    padding: 1.875rem 1.5rem 1.375rem;
    border-bottom: 1px solid rgba(255,255,255,.07);
    display: flex;
    align-items: center;
    gap: .875rem;
}

.sidebar-brand .logo-icon {
    width: 36px;
    height: 36px;
    background: var(--color-accent);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(181,129,60,.35);
}

.sidebar-brand .logo-icon svg { width: 20px; height: 20px; fill: #FFF8EC; }

.sidebar-brand-text { min-width: 0; }

.sidebar-brand h1 {
    font-family: 'Outfit', sans-serif;
    font-size: .875rem;
    font-weight: 700;
    color: #F5F0E8;
    line-height: 1.25;
    letter-spacing: -.01em;
}

.sidebar-brand p {
    font-size: .68rem;
    color: rgba(255,255,255,.35);
    margin-top: .1rem;
    font-weight: 400;
    letter-spacing: .01em;
}

.sidebar-nav {
    padding: 1rem 0;
    flex: 1;
}

.nav-label {
    font-size: .63rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255,255,255,.25);
    padding: .875rem 1.375rem .375rem;
    display: block;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .55rem 1.375rem;
    color: rgba(255,255,255,.6);
    font-size: .84rem;
    font-weight: 500;
    transition: background var(--transition), color var(--transition);
    cursor: pointer;
    text-decoration: none;
    border-radius: 0;
    position: relative;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 3px;
    height: 60%;
    background: var(--color-accent);
    border-radius: 0 3px 3px 0;
    transition: transform var(--transition);
}

.nav-item:hover {
    background: var(--color-sidebar-hover);
    color: rgba(255,255,255,.9);
    text-decoration: none;
}

.nav-item.active {
    background: var(--color-sidebar-active);
    color: #F5E8CF;
}

.nav-item.active::before {
    transform: translateY(-50%) scaleY(1);
}

.nav-item svg { 
    width: 16px; height: 16px; flex-shrink: 0; 
    opacity: .6; 
    transition: opacity var(--transition);
}
.nav-item:hover svg, .nav-item.active svg { opacity: 1; }

/* Subitens */
.nav-subitem {
    padding-left: 2.5rem;
    font-size: .81rem;
}

.sidebar-footer {
    padding: 1rem 1.375rem;
    border-top: 1px solid rgba(255,255,255,.06);
}

.sidebar-footer form button {
    width: 100%;
    padding: .5rem .75rem;
    background: transparent;
    border: 1px solid rgba(255,255,255,.1);
    color: rgba(255,255,255,.45);
    border-radius: var(--radius-sm);
    font-size: .78rem;
    font-family: 'DM Sans', inherit;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition), color var(--transition);
    text-align: left;
    letter-spacing: .01em;
}

.sidebar-footer form button:hover {
    background: rgba(255,255,255,.07);
    border-color: rgba(255,255,255,.18);
    color: rgba(255,255,255,.75);
}

/* ── Main Content ─────────────────────────────────────────── */
.main-content {
    margin-left: var(--sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
}

.topbar {
    background: var(--color-surface);
    padding: 1.125rem 2rem;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-sm);
}

.topbar-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: -.02em;
    line-height: 1.2;
}

.topbar-sub {
    font-size: .78rem;
    color: var(--color-muted);
    margin-top: .15rem;
    font-weight: 400;
}

.page-body {
    padding: 2rem;
    flex: 1;
    max-width: 1440px;
}

/* ── Alerts (flash) ──────────────────────────────────────── */
.alert {
    padding: .875rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: .875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: .625rem;
    border-left: 3px solid transparent;
}

.alert svg { width: 17px; height: 17px; flex-shrink: 0; }

.alert-success {
    background: var(--color-success-bg);
    color: var(--color-success);
    border-left-color: var(--color-success);
    border: 1px solid #C3DCC8;
    border-left-width: 3px;
}

.alert-error {
    background: var(--color-danger-bg);
    color: var(--color-danger);
    border: 1px solid #F0C3BF;
    border-left-width: 3px;
    border-left-color: var(--color-danger);
}

/* ── Cards ───────────────────────────────────────────────── */
.card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.card-title {
    font-family: 'Outfit', sans-serif;
    font-size: .975rem;
    font-weight: 600;
    color: var(--color-text);
    letter-spacing: -.01em;
}

.card-body { padding: 1.5rem; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .5rem 1.05rem;
    border-radius: var(--radius-sm);
    font-size: .845rem;
    font-weight: 600;
    font-family: 'DM Sans', inherit;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background var(--transition), transform 0.12s ease, box-shadow var(--transition), color var(--transition);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.4;
    letter-spacing: .005em;
}

.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(.97); }
.btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

.btn svg { width: 14px; height: 14px; }

.btn-primary {
    background: var(--color-accent);
    color: #FFF8EC;
    border-color: var(--color-accent);
    box-shadow: 0 1px 3px rgba(181,129,60,.3);
}
.btn-primary:hover { 
    background: var(--color-accent-h); 
    border-color: var(--color-accent-h);
    box-shadow: 0 3px 10px rgba(181,129,60,.35);
}

.btn-success {
    background: var(--color-success);
    color: white;
    box-shadow: 0 1px 3px rgba(58,125,68,.25);
}
.btn-success:hover { background: #306938; box-shadow: 0 3px 10px rgba(58,125,68,.3); }

.btn-danger {
    background: var(--color-danger);
    color: white;
}
.btn-danger:hover { background: #A93226; }

.btn-outline {
    background: transparent;
    color: var(--color-text-2);
    border-color: var(--color-border-strong);
}
.btn-outline:hover { background: var(--color-surface-2); border-color: var(--color-border-strong); color: var(--color-text); }

.btn-ghost {
    background: transparent;
    color: var(--color-muted);
    border: none;
}
.btn-ghost:hover { color: var(--color-danger); background: var(--color-danger-bg); }

.btn-sm {
    padding: .3rem .65rem;
    font-size: .775rem;
}
.btn-sm svg { width: 12px; height: 12px; }

.btn-copy {
    background: var(--color-surface-2);
    color: var(--color-text-2);
    border: 1px solid var(--color-border);
    font-size: .78rem;
}
.btn-copy:hover { background: var(--color-border); }
.btn-copy.copied { background: var(--color-success-bg); color: var(--color-success); border-color: #C3DCC8; }

/* ── Badges / Status ─────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .2rem .55rem;
    border-radius: var(--radius-xs);   /* quadrados, não pills */
    font-size: .71rem;
    font-weight: 600;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.badge-andamento {
    background: var(--color-warning-bg);
    color: var(--color-warning);
    border: 1px solid #EDD696;
}

.badge-completo {
    background: var(--color-success-bg);
    color: var(--color-success);
    border: 1px solid #C3DCC8;
}

.badge-count {
    background: var(--color-surface-2);
    color: var(--color-muted);
    border: 1px solid var(--color-border);
}

/* ── Dashboard Grid ──────────────────────────────────────── */
.months-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.month-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-slow), transform var(--transition-slow), border-color var(--transition);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
}

.month-card::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 1.5rem;
    right: 1.5rem;
    height: 2px;
    background: linear-gradient(90deg, var(--color-accent), transparent);
    border-radius: 2px;
    opacity: 0;
    transition: opacity var(--transition-slow);
}

.month-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--color-border-strong);
}

.month-card:hover::after { opacity: 1; }

.month-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .5rem;
}

.month-card-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: -.02em;
}

.month-card-meta {
    font-size: .77rem;
    color: var(--color-muted);
    margin-top: .15rem;
    font-weight: 400;
}

.month-card-actions {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.month-link-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xs);
    padding: .4rem .75rem;
    font-size: .73rem;
    color: var(--color-muted);
    word-break: break-all;
    flex: 1;
    min-width: 0;
    font-family: 'DM Mono', monospace;
}

.month-link-row span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

/* ── Empty State ─────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 4.5rem 2rem;
    color: var(--color-muted);
}

.empty-state svg {
    width: 52px;
    height: 52px;
    color: var(--color-border-strong);
    margin-bottom: 1.125rem;
}

.empty-state h3 { 
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem; 
    font-weight: 600;
    color: var(--color-text-2); 
    margin-bottom: .5rem;
    letter-spacing: -.01em;
}
.empty-state p { font-size: .865rem; margin-bottom: 1.5rem; line-height: 1.65; }

/* ── Form ─────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.125rem; }

.form-label {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    color: var(--color-text-2);
    margin-bottom: .4rem;
    letter-spacing: .005em;
}

.form-control {
    width: 100%;
    padding: .6rem .875rem;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-sm);
    font-family: 'DM Sans', inherit;
    font-size: .875rem;
    color: var(--color-text);
    background: var(--color-surface);
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
    appearance: none;
    box-shadow: var(--shadow-inset);
}

.form-control::placeholder { color: var(--color-placeholder); }

.form-control:hover { border-color: var(--color-border-strong); }

.form-control:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(181,129,60,.15), var(--shadow-inset);
    background: var(--color-surface);
}

.form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%237A7A72'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .75rem center;
    background-size: .95rem;
    padding-right: 2.5rem;
}

.form-hint {
    font-size: .76rem;
    color: var(--color-muted);
    margin-top: .35rem;
    line-height: 1.5;
}

/* ── Section titles ──────────────────────────────────────── */
.section-title {
    font-family: 'Outfit', sans-serif;
    font-size: .8rem;
    font-weight: 700;
    color: var(--color-text-2);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 1rem;
    margin-top: 1.75rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    gap: .5rem;
}

.section-title svg { width: 15px; height: 15px; }

/* ── Badge prazo ─────────────────────────────────────────── */
.badge-prazo {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .25rem .65rem;
    background: var(--color-warning-bg);
    border: 1px solid #EDD696;
    color: var(--color-warning);
    border-radius: var(--radius-xs);
    font-size: .73rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: normal;
}

.badge-prazo strong {
    font-weight: 700;
    color: #8A6010;
}

.badge-prazo svg {
    width: 13px;
    height: 13px;
}

/* ── Document slots ──────────────────────────────────────── */
.doc-slot {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-bottom: .625rem;
    overflow: hidden;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.doc-slot:hover { 
    border-color: var(--color-border-strong);
    box-shadow: var(--shadow-sm);
}

.doc-slot-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .875rem 1.25rem;
}

.doc-slot-status {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: var(--radius-xs);
    display: flex;
    align-items: center;
    justify-content: center;
}

.doc-slot-status.filled {
    background: var(--color-success-bg);
}

.doc-slot-status.pending {
    background: var(--color-warning-bg);
}

.doc-slot-status svg { width: 14px; height: 14px; }

.doc-slot-name {
    flex: 1;
    font-size: .865rem;
    font-weight: 500;
    color: var(--color-text);
}

.doc-slot-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.doc-slot-files {
    border-top: 1px solid var(--color-border);
    background: var(--color-surface-2);
}

.doc-file-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .55rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
    font-size: .785rem;
}

.doc-file-row:last-child { border-bottom: none; }

.doc-file-icon { flex-shrink: 0; color: var(--color-muted); }
.doc-file-icon svg { width: 14px; height: 14px; }

.doc-file-name {
    flex: 1;
    color: var(--color-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.doc-file-meta { color: var(--color-muted); white-space: nowrap; font-size: .72rem; }

/* ── Upload ───────────────────────────────────────────────── */
.upload-form-inline {
    padding: .75rem 1.25rem;
    background: var(--color-surface-2);
    border-top: 1px dashed var(--color-border);
    display: none;
}

.upload-form-inline.open { display: block; }

.upload-drop-area {
    border: 2px dashed var(--color-border-strong);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    text-align: center;
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition);
}

.upload-drop-area:hover, .upload-drop-area.drag-over {
    border-color: var(--color-accent);
    background: var(--color-accent-light);
}

.upload-drop-area input[type="file"] { display: none; }

.upload-drop-area p {
    font-size: .79rem;
    color: var(--color-muted);
    margin-top: .5rem;
}

.upload-drop-area svg { width: 26px; height: 26px; color: var(--color-border-strong); }

.upload-file-list {
    margin-top: .75rem;
    font-size: .79rem;
    color: var(--color-text);
}

.upload-file-list li {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .25rem 0;
    color: var(--color-muted);
}

.upload-actions {
    display: flex;
    gap: .5rem;
    margin-top: .75rem;
    justify-content: flex-end;
}

/* ── Outros documentos ────────────────────────────────────── */
.outros-section {
    background: var(--color-surface);
    border: 1px dashed var(--color-border-strong);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-top: 1rem;
}

/* ── Login page ──────────────────────────────────────────── */
.login-page {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #18180F;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

/* Fundo com ruído e gradiente radial cálido */
.login-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(181,129,60,.12) 0%, transparent 70%);
    pointer-events: none;
}

.login-page::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .04;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

.login-card {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255,255,255,.08);
    padding: 2.75rem 2.5rem 2.5rem;
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 1;
    border: 1px solid var(--color-border);
}

.login-logo {
    text-align: center;
    margin-bottom: 2.25rem;
}

.login-logo .icon {
    width: 48px;
    height: 48px;
    background: var(--color-accent);
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.125rem;
    box-shadow: 0 4px 14px rgba(181,129,60,.4);
}

.login-logo .icon svg { width: 26px; height: 26px; fill: #FFF8EC; }

.login-logo h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.25;
    letter-spacing: -.02em;
}

.login-logo p {
    font-size: .79rem;
    color: var(--color-muted);
    margin-top: .3rem;
    font-weight: 400;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .sidebar { display: none; }
    .main-content { margin-left: 0; }
    .months-grid { grid-template-columns: 1fr; }
    .page-body { padding: 1rem; }
    .topbar { padding: .875rem 1rem; }
}

/* ── Animations ──────────────────────────────────────────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeInUp .22s ease; }

/* ── Confirm modal ───────────────────────────────────────── */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(18,16,10,.55);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
}

.modal-backdrop.open {
    opacity: 1;
    pointer-events: all;
}

.modal {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 420px;
    width: 90%;
    box-shadow: var(--shadow-xl);
    transform: scale(.95) translateY(8px);
    transition: transform .22s ease;
    border: 1px solid var(--color-border);
}

.modal-backdrop.open .modal { transform: scale(1) translateY(0); }

.modal h3 { 
    font-family: 'Outfit', sans-serif;
    font-size: 1rem; 
    font-weight: 700; 
    margin-bottom: .5rem;
    letter-spacing: -.01em;
}
.modal p { font-size: .865rem; color: var(--color-muted); margin-bottom: 1.5rem; line-height: 1.6; }
.modal-actions { display: flex; gap: .75rem; justify-content: flex-end; }

/* ── Badge anexo ─────────────────────────────────────────── */
.badge-anexo {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .2rem .5rem;
    background: var(--color-accent-light);
    border: 1px solid var(--color-accent-border);
    color: var(--color-accent-h);
    border-radius: var(--radius-xs);
    font-size: .71rem;
    font-weight: 600;
    text-decoration: none;
    transition: background var(--transition);
}

.badge-anexo:hover {
    background: var(--color-accent-border);
    text-decoration: none;
}
