/*
 * ─────────────────────────────────────────────────────────────
 *  TEMA PREMIUM v3 — Dark Mode completo
 *  Sidebar: dourada · Página: escura · Acentos: gold
 *  SUBSTITUI o styles.css original por completo
 * ─────────────────────────────────────────────────────────────
 */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=DM+Mono:wght@300;400;500&display=swap');

:root {
    /* ── Sidebar dourada ────────────────────────────────────── */
    --theme-sidebar-start:  #7A5C1E;
    --theme-sidebar-end:    #B8962E;

    /* ── Gold ───────────────────────────────────────────────── */
    --theme-primary:        #D4AE50;
    --theme-primary-soft:   rgba(237,217,138,0.15);
    --theme-primary-strong: #B8962E;
    --theme-primary-accent: #7A5C1E;

    /* ── Página escura ──────────────────────────────────────── */
    --theme-page-start:     #0D0F14;
    --theme-page-end:       #141720;

    /* ── Neutras dark ───────────────────────────────────────── */
    --white:          #FAF8F2;
    --text:           #F2F3F5;
    --muted:          #8C95A6;
    --secondary-text: #C8CEDB;
    --line:           rgba(200,206,219,0.12);

    /* ── Derivadas ───────────────────────────────────────────── */
    --bg-start:              #0D0F14;
    --bg-end:                #141720;
    --bg:                    #0D0F14;
    --panel:                 #1E2330;
    --panel-alt:             #141720;
    --primary:               var(--theme-primary);
    --primary-soft:          rgba(237,217,138,0.12);
    --primary-dark:          var(--theme-primary-strong);
    --primary-gradient-end:  var(--theme-primary-accent);
    --secondary:             rgba(200,206,219,0.08);
    --danger:                #e05c6a;
    --danger-soft:           rgba(224,92,106,0.15);
    --success:               #3aad6e;
    --success-soft:          rgba(58,173,110,0.15);
    --warning:               #d4884a;
    --warning-soft:          rgba(212,136,74,0.15);
    --orange:                #d4884a;

    --hero-glow:    rgba(212,174,80,0.20);
    --hero-start:   #080A0D;
    --hero-mid:     #1E2330;
    --hero-end:     #0D0F14;
    --sidebar-start: var(--theme-sidebar-start);
    --sidebar-end:   var(--theme-sidebar-end);

    --on-primary:      #0D0F14;
    --on-dark:         #FAF8F2;
    --on-dark-soft:    rgba(242,243,245,0.82);
    --on-dark-muted:   rgba(242,243,245,0.50);

    --surface-soft:         #1E2330;
    --surface-head:         #1A1E2A;
    --surface-info:         rgba(237,217,138,0.10);
    --surface-card-alt:     #252B3B;
    --surface-input:        #1A1E2A;
    --surface-empty:        #1A1E2A;
    --surface-summary:      #1E2330;
    --surface-kanban:       #1A1E2A;
    --surface-document:     #1E2330;
    --surface-glass:        rgba(20,23,32,0.88);
    --surface-glass-strong: rgba(20,23,32,0.96);
    --surface-dark-soft:    rgba(255,255,255,0.06);
    --surface-dark-hover:   rgba(212,174,80,0.14);
    --surface-dark-strong:  rgba(255,255,255,0.10);

    --line-soft:    rgba(200,206,219,0.10);
    --line-strong:  rgba(200,206,219,0.16);
    --line-card:    rgba(200,206,219,0.12);
    --line-table:   rgba(200,206,219,0.09);

    --focus-border: #B8962E;
    --focus-ring:   rgba(212,174,80,0.22);

    --accent-blue-bg:     rgba(212,174,80,0.12);
    --accent-blue-text:   #D4AE50;
    --accent-green-bg:    rgba(58,173,110,0.15);
    --accent-green-text:  #3aad6e;
    --accent-orange-bg:   rgba(212,136,74,0.15);
    --accent-orange-text: #d4884a;
    --accent-slate-bg:    rgba(200,206,219,0.10);
    --accent-slate-text:  #C8CEDB;

    --badge-neutral-bg:   rgba(200,206,219,0.12);
    --badge-neutral-text: #C8CEDB;
    --badge-success-bg:   rgba(58,173,110,0.18);
    --badge-success-text: #3aad6e;
    --badge-danger-bg:    rgba(224,92,106,0.18);
    --badge-danger-text:  #e05c6a;
    --badge-warning-bg:   rgba(212,136,74,0.18);
    --badge-warning-text: #d4884a;
    --badge-info-bg:      rgba(212,174,80,0.15);
    --badge-info-text:    #D4AE50;

    --alert-success-border: rgba(58,173,110,0.30);
    --alert-danger-border:  rgba(224,92,106,0.30);
    --alert-warning-border: rgba(212,136,74,0.30);
    --alert-info-border:    rgba(212,174,80,0.30);
    --alert-info-text:      #D4AE50;

    --shadow:          0 18px 40px rgba(0,0,0,0.40);
    --shadow-soft:     0 12px 24px rgba(0,0,0,0.25);
    --shadow-lift:     0 20px 34px rgba(0,0,0,0.45);
    --shadow-sidebar:  0 22px 46px rgba(0,0,0,0.60);
    --overlay-modal:   rgba(0,0,0,0.70);
    --overlay-sidebar: rgba(0,0,0,0.65);

    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
}

/* ══════════════════════════════════════════════════════════════
   BASE
══════════════════════════════════════════════════════════════ */
* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: 'DM Mono', 'Menlo', ui-monospace, monospace;
    font-size: 14px;
    font-weight: 300;
    background-color: var(--bg-start); 
    background: linear-gradient(180deg, var(--bg-start) 0%, var(--bg-end) 100%);
    background-attachment: fixed; /* O segredo para o fundo não acabar */
    min-height: 100vh;
    color: var(--text);
    letter-spacing: 0.01em;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 300;
    letter-spacing: -0.01em;
    color: var(--white);
}

.eyebrow, .stat-label, .form-label, .table th, .badge {
    font-family: 'DM Mono', monospace;
    font-weight: 400;
}

a { color: inherit; text-decoration: none; }

code {
    padding: 2px 6px;
    border-radius: 8px;
    background: var(--primary-soft);
    color: var(--primary);
    font-family: 'DM Mono', ui-monospace, monospace;
}

button, input, select, textarea {
    font: inherit;
    font-size: 14px;
}

body.login-page,
body.error-page {
    min-height: 100vh;
}

/* ══════════════════════════════════════════════════════════════
   EYEBROW
══════════════════════════════════════════════════════════════ */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}

/* ══════════════════════════════════════════════════════════════
   LOGIN
══════════════════════════════════════════════════════════════ */
.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(340px, 460px);
    gap: 28px;
    padding: 32px;
}

.login-hero,
.login-card,
.error-card {
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}

.login-hero {
    background:
        radial-gradient(circle at top right, var(--hero-glow), transparent 36%),
        linear-gradient(135deg, var(--hero-start) 0%, var(--hero-mid) 48%, var(--hero-end) 100%);
    color: var(--on-dark);
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 640px;
}

.login-hero .eyebrow,
.login-hero p { color: var(--on-dark-soft); }

.login-hero h1 {
    margin: 12px 0 18px;
    font-size: clamp(38px, 4vw, 62px);
    line-height: 1;
    max-width: 420px;
}

.login-hero p {
    max-width: 560px;
    font-size: 16px;
    line-height: 1.7;
}

.login-points {
    display: grid;
    gap: 14px;
    margin-top: 32px;
}

.login-point {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 18px;
    background: var(--surface-dark-soft);
    border: 1px solid var(--surface-dark-strong);
}

.login-card {
    background: var(--surface-glass-strong);
    backdrop-filter: blur(12px);
    padding: 30px;
    align-self: center;
    border: 1px solid var(--line-strong);
}

.login-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 22px;
}

.login-card-header h2,
.error-card h1 {
    margin: 6px 0 0;
    font-size: 30px;
}

.brand-badge {
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(212,174,80,0.15);
    color: #D4AE50;
    font-weight: 700;
}

.password-field { position: relative; }

.password-toggle {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.login-footer-notes {
    margin-top: 24px;
    display: grid;
    gap: 8px;
    padding: 18px;
    border-radius: 16px;
    background: var(--panel-alt);
    color: var(--secondary-text);
    font-size: 13px;
}

.login-footer-notes span { font-family: monospace; }

/* ══════════════════════════════════════════════════════════════
   APP SHELL
══════════════════════════════════════════════════════════════ */
.app-shell {
    min-height: 100vh;
    display: flex;
    gap: 16px;
    padding: 12px;
}

/* ── Sidebar escura ──────────────────────────────────────── */
.app-sidebar {

    width: 80px !important;
    position: fixed; 
    top: 00px; /* Distância do topo da tela */
    left: 5px;
    height: calc(100vh - 40px); /* Ocupa a tela toda menos as margens */
    z-index: 9999;

    background: linear-gradient(180deg, var(--sidebar-start) 0%, var(--sidebar-end) 100%);
    border-radius: 40px; /* Deixa bem arredondada nas pontas */
    color: #FAF8F2;
    padding: 10px 10px; /* Respiro interno */
    display: flex;
    flex-direction: column;
    align-items: center; /* Centraliza os ícones */
    gap: 25px;
    box-shadow: var(--shadow-sidebar);
    
}

.sidebar-brand,
.sidebar-user-card {
    display: flex;
    align-items: center;
    gap: 14px;
}

.sidebar-brand-mark,
.sidebar-user-avatar,
.header-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.sidebar-brand-mark {
    background: rgba(0,0,0,0.20);
    color: #FAF8F2;
}

.sidebar-brand strong,
.sidebar-user-card strong {
    display: block;
    font-size: 15px;
    color: #FAF8F2;
}

.sidebar-brand span,
.sidebar-user-card span {
    color: rgba(250,248,242,0.60);
    font-size: 12px;
}

.sidebar-user-card {
    padding: 14px;
    border-radius: 20px;
    background: rgba(0,0,0,0.18);
    border: 1px solid rgba(250,248,242,0.12);
}

/* ── Avatar sidebar: gold sólido, texto escuro ───────────── */
.sidebar-user-avatar {
    background: #B8962E !important;
    color: #0D0F14 !important;
}

.header-user-avatar {
    background: #B8962E !important;
    color: #0D0F14 !important;
}

/* ── Ícones da sidebar: mais brilhantes ─────────────────── */
.nav-link svg, .nav-link i,
.nav-group-button svg, .nav-group-button i,
.nav-group-label svg, .nav-group-label i {
    opacity: 1 !important;
    color: rgba(250,248,242,0.90) !important;
    fill: rgba(250,248,242,0.90) !important;
}

.nav-link:hover svg, .nav-link:hover i,
.nav-link.active svg, .nav-link.active i,
.nav-group.open > .nav-group-button svg,
.nav-group.open > .nav-group-button i {
    color: #D4AE50 !important;
    fill: #D4AE50 !important;
}

/* ── Submenu flutuante: B8962E ───────────────────────────── */
.nav-group-children {
    background: #B8962E;
    border: 1px solid rgba(237,217,138,0.20);
    border-radius: 18px;
    padding: 8px;
    margin-top: 4px;
}

/* ── Item ativo no submenu:  ───────────────────────── */
.nav-group-children .nav-link.active {
    background: #0D0F14 !important;
    border-left: none !important;
    color: #FAF8F2 !important;
    font-weight: 500;
}

.sidebar-nav {
    flex: 1;
    overflow: auto;
    display: grid;
    gap: 8px;
    padding-right: 4px;
}

.nav-link,
.nav-group-button {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border-radius: 16px;
    color: rgba(250,248,242,0.72);
    background: transparent;
    border: 0;
    cursor: pointer;
    text-align: left;
    transition: 0.2s ease;
}

.nav-link:hover,
.nav-group-button:hover,
.nav-link.active,
.nav-group.open > .nav-group-button {
    background: rgba(0,0,0,0.20);
    color: #FAF8F2;
}

.nav-link.active {
    border-left: 2px solid rgba(250,248,242,0.60);
    padding-left: 12px;
}

.nav-link.child {
    margin-left: 10px;
    width: calc(100% - 10px);
}

.nav-group-button { justify-content: space-between; }

.nav-group-label {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.nav-group-children { display: none; padding-top: 4px; }

.nav-group.open .nav-group-children {
    display: grid;
    gap: 8px;
}

.sidebar-footer {
    padding-top: 10px;
    border-top: 1px solid rgba(250,248,242,0.15);
}

/* ══════════════════════════════════════════════════════════════
   APP MAIN
══════════════════════════════════════════════════════════════ */
.app-main {
    flex: 1;
    min-width: 0;
    margin-left: 5px; /* Abre espaço exato para a sidebar de 80px + respiro */
}

/* ── Ajuste do Cabeçalho Slim ───────────────────────────── */
.app-header {
    background: var(--surface-glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--line-soft);
    border-radius: 20px; /* Reduzi um pouco o raio para ficar mais discreto */
    
    /* Forçamos uma altura fixa elegante */
    height: 100px !important; 
    min-height: 75px !important;
    
    /* Removemos paddings excessivos que empurram o frame */
    padding: 0 24px !important; 
    
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-soft);
    margin-bottom: 12px;
}

/* Garante que o H1 não tenha margens que estiquem o frame */
.app-header h1 {
    margin: 0 !important;
    font-size: 24px !important;
    line-height: 1;
}

/* Ajuste fino no container do logo */
.app-header-right {
    height: 100%;
    display: flex;
    align-items: center;
}

.app-header p {
    margin: 0;
    color: var(--muted);
    line-height: 1;
}

.app-header-left,
.app-header-right,
.header-user {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 !important;
    padding: 0 !important;
}

.app-header-right img {
    /* Garante que o logo não tenha margens fantasmas */
    display: block;
    margin: 0;
}

.header-user {
    background: var(--surface-soft);
    border-radius: 18px;
    padding: 10px 14px;
    border: 1px solid var(--line-strong);
}

.header-user strong,
.header-user span { display: block; }

.header-user span {
    font-size: 12px;
    color: var(--muted);
}

.content-area {
    padding-top: 0 !important; /* Removemos o padding do topo para não somar com a margem */
    gap: 12px !important;
    padding: 18px 0 24px;
    display: grid;
}

.panel-page-form { width: 100%; }

/* ══════════════════════════════════════════════════════════════
   PANELS & CARDS
══════════════════════════════════════════════════════════════ */
.panel,
.stat-card,
.card,
.error-card {
    background: var(--panel);
    border: 1px solid var(--line-strong);
    border-radius: 26px;
    box-shadow: var(--shadow);
}

.panel,
.error-card { padding: 24px; }

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

.panel-header h2,
.panel-header h3,
.section-title {
    margin: 0 0 6px;
    font-size: 22px;
}

.panel-header p,
.panel-intro,
.muted {
    margin: 0;
    color: var(--muted);
}

/* ══════════════════════════════════════════════════════════════
   GRIDS
══════════════════════════════════════════════════════════════ */
.stats-grid,
.module-grid,
.form-grid,
.dashboard-grid,
.two-col-grid,
.three-col-grid,
.feature-list {
    display: grid;
    gap: 18px;
}

.stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.module-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.feature-list { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.feature-item,
.module-card {
    border-radius: 22px;
    padding: 18px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, var(--panel) 0%, var(--surface-card-alt) 100%);
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.module-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.module-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lift);
}

.module-card-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.color-blue .module-card-icon  { background: var(--accent-blue-bg);   color: var(--accent-blue-text); }
.color-green .module-card-icon { background: var(--accent-green-bg);  color: var(--accent-green-text); }
.color-orange .module-card-icon{ background: var(--accent-orange-bg); color: var(--accent-orange-text); }
.color-slate .module-card-icon { background: var(--accent-slate-bg);  color: var(--accent-slate-text); }

.module-card h3,
.stat-card strong,
.card h3 { margin: 0; }

.module-card p,
.stat-card p,
.card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

/* ══════════════════════════════════════════════════════════════
   STAT CARDS
══════════════════════════════════════════════════════════════ */
.stat-card { padding: 20px; }

.stat-label {
    display: block;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stat-card strong { font-size: 28px; }

/* ══════════════════════════════════════════════════════════════
   FORMULÁRIOS
══════════════════════════════════════════════════════════════ */
.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.form-group { display: grid; gap: 8px; }

.form-group.full,
.form-grid .full { grid-column: 1 / -1; }

.form-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--secondary-text);
}

.form-control,
.form-select,
.form-textarea {
    width: 100%;
    padding: 13px 15px;
    border-radius: 14px;
    border: 1px solid var(--line-strong);
    background: var(--surface-input);
    color: var(--text);
}

.form-control:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--focus-border);
    box-shadow: 0 0 0 4px var(--focus-ring);
}

.form-textarea {
    min-height: 130px;
    resize: vertical;
}

.stack,
.stack-lg { display: grid; gap: 14px; }

/* ══════════════════════════════════════════════════════════════
   BOTÕES
══════════════════════════════════════════════════════════════ */
.actions,
.toolbar,
.inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.toolbar {
    justify-content: space-between;
    margin-bottom: 18px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 14px;
    padding: 12px 18px;
    cursor: pointer;
    font-weight: 700;
    transition: 0.18s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-gradient-end) 100%);
    color: #0D0F14;
    font-weight: 500;
    letter-spacing: 0.04em;
}

.btn-secondary {
    background: var(--secondary);
    color: var(--secondary-text);
    border: 1px solid var(--line-strong);
}

.btn-danger  { background: var(--danger-soft);  color: var(--danger); }
.btn-success { background: var(--success-soft); color: var(--success); }

.btn-small {
    padding: 9px 12px;
    border-radius: 12px;
    font-size: 13px;
}

.btn-block { width: 100%; }

/* ══════════════════════════════════════════════════════════════
   ALERTS
══════════════════════════════════════════════════════════════ */
.alert {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid transparent;
    margin-bottom: 18px;
}

.alert-success { background: var(--success-soft); color: var(--success); border-color: var(--alert-success-border); }
.alert-danger  { background: var(--danger-soft);  color: var(--danger);  border-color: var(--alert-danger-border); }
.alert-warning { background: var(--warning-soft); color: var(--warning); border-color: var(--alert-warning-border); }
.alert-info    { background: var(--surface-info); color: var(--alert-info-text); border-color: var(--alert-info-border); }

/* ══════════════════════════════════════════════════════════════
   TABELAS
══════════════════════════════════════════════════════════════ */
.table-wrapper {
    width: 100%;
    overflow: auto;
    border: 1px solid var(--line-strong);
    border-radius: 20px;
}

.table {
    width: 100%;
    min-width: 860px;
    border-collapse: collapse;
    background: var(--panel);
}

.table th,
.table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line-table);
    text-align: left;
    vertical-align: top;
}

.table th {
    background: var(--surface-head);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.table tr:last-child td { border-bottom: 0; }
.table .actions-cell { white-space: nowrap; }

/* ══════════════════════════════════════════════════════════════
   BADGES
══════════════════════════════════════════════════════════════ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.badge-neutral { background: var(--badge-neutral-bg); color: var(--badge-neutral-text); }
.badge-success { background: var(--badge-success-bg); color: var(--badge-success-text); }
.badge-danger  { background: var(--badge-danger-bg);  color: var(--badge-danger-text); }
.badge-warning { background: var(--badge-warning-bg); color: var(--badge-warning-text); }
.badge-info    { background: var(--badge-info-bg);    color: var(--badge-info-text); }

/* ══════════════════════════════════════════════════════════════
   EMPTY STATE
══════════════════════════════════════════════════════════════ */
.empty-state {
    padding: 28px;
    border-radius: 20px;
    text-align: center;
    border: 1px dashed var(--line-strong);
    color: var(--muted);
    background: var(--surface-empty);
}

/* ══════════════════════════════════════════════════════════════
   TABS
══════════════════════════════════════════════════════════════ */
.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 0px !important; /* Diminuído para colar no frame de baixo */
}

.tab-chip {
    padding: 10px 14px;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--secondary-text);
    font-weight: 700;
    border: 1px solid var(--line);
}

.tab-chip.active {
    background: rgba(212,174,80,0.15);
    color: #D4AE50;
    border-color: rgba(212,174,80,0.30);
}

/* ══════════════════════════════════════════════════════════════
   SUMMARY GRID
══════════════════════════════════════════════════════════════ */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.summary-item {
    padding: 18px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: var(--surface-summary);
}

.summary-item span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 6px;
}

.summary-item strong { font-size: 22px; }

/* ══════════════════════════════════════════════════════════════
   KANBAN
══════════════════════════════════════════════════════════════ */
.section-grid { display: grid; gap: 22px; }

.kanban-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.kanban-column {
    background: var(--surface-kanban);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 16px;
}

.kanban-column h3 {
    margin-top: 0;
    margin-bottom: 14px;
}

.kanban-card {
    background: var(--panel);
    border: 1px solid var(--line-card);
    border-radius: 16px;
    padding: 14px;
    display: grid;
    gap: 10px;
    box-shadow: var(--shadow-soft);
}

/* ══════════════════════════════════════════════════════════════
   CODE / DOCUMENT PREVIEW
══════════════════════════════════════════════════════════════ */
.code-preview,
.document-preview {
    padding: 18px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: var(--surface-document);
    overflow: auto;
}

.document-preview { line-height: 1.7; }

/* ══════════════════════════════════════════════════════════════
   FILTERS
══════════════════════════════════════════════════════════════ */
.filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

/* ══════════════════════════════════════════════════════════════
   MODAIS
══════════════════════════════════════════════════════════════ */
.sidebar-backdrop,
.session-modal { display: none; }

.session-modal.active { display: flex; }

.session-modal {
    position: fixed;
    inset: 0;
    background: var(--overlay-modal);
    align-items: center;
    justify-content: center;
    z-index: 40;
    padding: 20px;
}

.session-modal-card {
    width: min(100%, 420px);
    background: var(--panel);
    padding: 24px;
    border-radius: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--line-strong);
}

.session-modal-card h3 { margin-top: 0; }

.session-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 18px;
}

/* ══════════════════════════════════════════════════════════════
   MISC
══════════════════════════════════════════════════════════════ */
.icon-button {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 0;
    background: var(--secondary);
    color: var(--secondary-text);
    cursor: pointer;
}

.mobile-only { display: none; }

.error-card {
    max-width: 520px;
    margin: 12vh auto;
    text-align: center;
}

.content-wrapper .panel:first-child, 
.content-wrapper section:first-child .panel {
    margin-top: 0 !important;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════════ */
@media (max-width: 1220px) {
    .stats-grid,
    .summary-grid,
    .filters,
    .kanban-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
    .login-shell,
    .app-shell {
        grid-template-columns: 1fr;
        display: grid;
    }

    .app-shell { padding: 14px; }

    .app-sidebar {
        position: fixed;
        top: 14px;
        left: 14px;
        bottom: 14px;
        transform: translateX(-110%);
        z-index: 30;
        height: auto;
    }

    .app-sidebar.active { transform: translateX(0); }

    .sidebar-backdrop.active {
        display: block;
        position: fixed;
        inset: 0;
        background: var(--overlay-sidebar);
        z-index: 20;
    }

    .mobile-only { display: inline-flex; }
}

@media (max-width: 760px) {
    .login-shell,
    .login-card,
    .login-hero,
    .panel,
    .error-card { padding: 20px; }

    .app-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-grid,
    .stats-grid,
    .summary-grid,
    .filters,
    .kanban-grid { grid-template-columns: 1fr; }
}