/* ============================================================
   EvenTual – Design System v2
   Layout: sidebar esquerda fixa + área principal
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap');

/* ===== Variáveis ===== */
:root {
    /* Paleta */
    --blue-50:  #eff6ff;
    --blue-100: #dbeafe;
    --blue-600: #2563eb;
    --blue-700: #1d4ed8;

    --slate-50:  #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;

    --green-50:  #f0fdf4;
    --green-100: #dcfce7;
    --green-600: #16a34a;
    --green-700: #15803d;

    --red-50:  #fef2f2;
    --red-100: #fee2e2;
    --red-400: #f87171;
    --red-600: #dc2626;

    --purple-100: #f3e8ff;
    --purple-600: #9333ea;

    --amber-50:  #fffbeb;
    --amber-500: #f59e0b;

    /* Semânticas */
    --primary:       var(--blue-600);
    --primary-hover: var(--blue-700);
    --primary-light: var(--blue-50);
    --primary-ring:  rgba(37, 99, 235, 0.2);

    --success:        var(--green-600);
    --success-bg:     var(--green-50);
    --success-border: var(--green-100);

    --error:        var(--red-600);
    --error-bg:     var(--red-50);
    --error-border: var(--red-100);

    /* Atividades */
    --cor-curso:    var(--green-600);
    --cor-palestra: var(--purple-600);
    --cor-outro:    #0ea5e9;

    /* Sidebar */
    --sidebar-w:           252px;
    --sidebar-bg:          var(--slate-900);
    --sidebar-border:      rgba(255, 255, 255, 0.07);
    --sidebar-item-hover:  rgba(255, 255, 255, 0.06);
    --sidebar-item-active: rgba(59, 130, 246, 0.2);
    --sidebar-text:        rgba(255, 255, 255, 0.55);
    --sidebar-text-active: #ffffff;

    /* Superfícies */
    --bg:           var(--slate-50);
    --surface:      #ffffff;
    --border:       var(--slate-200);
    --border-light: var(--slate-100);

    /* Texto */
    --text:       var(--slate-900);
    --text-muted: var(--slate-500);
    --text-light: var(--slate-400);

    /* Sombras */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow:    0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),  0 4px  6px -4px rgba(0, 0, 0, 0.06);

    /* Radii */
    --r:    8px;
    --r-md: 10px;
    --r-lg: 14px;
    --r-xl: 20px;

    --font:       'DM Sans', system-ui, -apple-system, sans-serif;
    --transition: 0.15s ease;

    /* Compat com classes legadas */
    --cor-primaria:         var(--primary);
    --cor-primaria-hover:   var(--primary-hover);
    --cor-primaria-light:   var(--primary-light);
    --cor-secundaria:       var(--slate-500);
    --cor-secundaria-hover: var(--slate-600);
    --cor-erro:             var(--error);
    --cor-erro-light:       var(--error-bg);
    --cor-sucesso:          var(--success);
    --fundo:                var(--bg);
    --fundo-card:           var(--surface);
    --borda:                var(--border);
    --borda-suave:          var(--border-light);
    --texto:                var(--text);
    --texto-suave:          var(--text-muted);
    --texto-muito-suave:    var(--text-light);
    --sombra-sm:            var(--shadow-sm);
    --sombra:               var(--shadow);
    --sombra-hover:         var(--shadow-md);
    --sombra-lg:            var(--shadow-lg);
    --raio:                 var(--r);
    --raio-lg:              var(--r-lg);
    --raio-xl:              var(--r-xl);
    --fonte:                var(--font);
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

/* ===== App Layout Shell ===== */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* ===================================================
   SIDEBAR
   =================================================== */
.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    z-index: 200;
    overflow: hidden;
    transition: transform var(--transition);
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.15);
}

/* Brand / Logo */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1rem 0.875rem;
    border-bottom: 1px solid var(--sidebar-border);
    flex-shrink: 0;
    text-decoration: none;
}

.sidebar-logo {
    height: 34px;
    width: auto;
    border-radius: 6px;
    flex-shrink: 0;
}

.sidebar-brand-name {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.sidebar-brand-sub {
    display: block;
    font-size: 0.68rem;
    color: var(--sidebar-text);
    line-height: 1.4;
    margin-top: 1px;
}

/* Nav */
.sidebar-nav {
    flex: 1;
    padding: 0.625rem 0.625rem;
    display: flex;
    flex-direction: column;
    gap: 1px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.08) transparent;
}

.sidebar-label {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--sidebar-text);
    padding: 0.75rem 0.625rem 0.3rem;
    opacity: 0.7;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--r);
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background var(--transition), color var(--transition);
    white-space: nowrap;
}

.sidebar-item:hover {
    background: var(--sidebar-item-hover);
    color: var(--sidebar-text-active);
}

.sidebar-item.active {
    background: var(--sidebar-item-active);
    color: #93c5fd;
}

.sidebar-item.active svg { opacity: 1; }

.sidebar-item svg {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.7;
    transition: opacity var(--transition);
}

.sidebar-item:hover svg { opacity: 1; }

.sidebar-divider {
    height: 1px;
    background: var(--sidebar-border);
    margin: 0.5rem 0;
}

/* Footer / User */
.sidebar-footer {
    padding: 0.625rem;
    border-top: 1px solid var(--sidebar-border);
    flex-shrink: 0;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.5rem;
    border-radius: var(--r);
}

.sidebar-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    letter-spacing: 0;
}

.sidebar-user-info { flex: 1; min-width: 0; }

.sidebar-user-name {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.sidebar-user-role {
    display: block;
    font-size: 0.68rem;
    color: var(--sidebar-text);
    line-height: 1.3;
}

.sidebar-logout {
    flex-shrink: 0;
    color: var(--sidebar-text);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--r);
    transition: background var(--transition), color var(--transition);
    text-decoration: none;
}

.sidebar-logout:hover {
    background: rgba(239, 68, 68, 0.15);
    color: var(--red-400);
}

.sidebar-logout svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ===================================================
   OVERLAY MOBILE
   =================================================== */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 150;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

/* ===================================================
   MAIN WRAPPER
   =================================================== */
.main-wrapper {
    flex: 1;
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
}

/* ===================================================
   TOPBAR (visível apenas no mobile)
   =================================================== */
.topbar {
    display: none;
    height: 56px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    align-items: center;
    padding: 0 1rem;
    gap: 0.75rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.topbar-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: var(--r);
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
    transition: background var(--transition);
}

.topbar-menu-btn:hover { background: var(--slate-100); }

.topbar-menu-btn svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: var(--text);
    stroke-width: 2;
    stroke-linecap: round;
}

.topbar-brand {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.01em;
}

/* ===================================================
   CONTEÚDO (mantém compatibilidade)
   =================================================== */
.conteudo {
    flex: 1;
    padding: 1.75rem 2rem;
    width: 100%;
    max-width: 1240px;
}

/* ===== Seção ===== */
.secao { margin-bottom: 2rem; }

.secao > h2 {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
}

.secao > h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin: 1.5rem 0 1rem;
}

/* ===== Page Header ===== */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.page-header-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}

.page-header-sub {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.page-header-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

/* ===== Stat Cards ===== */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.stat-card {
    background: var(--surface);
    border-radius: var(--r-md);
    border: 1px solid var(--border);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.stat-card-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--r);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.875rem;
}

.stat-card-icon svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.stat-icon-blue   { background: var(--blue-50);   color: var(--blue-600);   }
.stat-icon-green  { background: var(--green-50);  color: var(--green-600);  }
.stat-icon-purple { background: var(--purple-100); color: var(--purple-600); }
.stat-icon-amber  { background: var(--amber-50);  color: var(--amber-500);  }

.stat-card-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
    letter-spacing: -0.04em;
}

.stat-card-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
    font-weight: 500;
}

/* ===================================================
   CARDS
   =================================================== */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 1rem;
}

.card {
    background: var(--surface);
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    padding: 1.25rem;
    transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
    display: flex;
    flex-direction: column;
}

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

.card-cabecalho {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
    line-height: 1.35;
}

.card .descricao {
    color: var(--text-muted);
    font-size: 0.875rem;
    flex: 1;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.card-acoes {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: auto;
}

/* ===================================================
   BADGES
   =================================================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 9999px;
    background: var(--blue-100);
    color: var(--blue-700);
    white-space: nowrap;
    line-height: 1.4;
}

.badge-curso        { background: var(--green-100);   color: var(--green-700);    }
.badge-palestra     { background: var(--purple-100);  color: var(--purple-600);   }
.badge-outro        { background: #e0f2fe;             color: #0369a1;             }
.badge-master       { background: #fef3c7;             color: #92400e;             }
.badge-admin        { background: var(--blue-100);    color: #1e40af;             }
.badge-participante { background: var(--green-100);   color: var(--green-700);    }
.badge-info         { background: var(--slate-100);   color: var(--slate-600);    }
.badge-cheio        { background: var(--red-100);     color: var(--red-600);      }
.badge-disponivel   { background: var(--green-100);   color: var(--green-700);    }
.badge-inscrito     { background: var(--blue-100);    color: #1e40af;             }
.badge-presente     { background: var(--green-100);   color: var(--green-700);    }
.badge-ausente      { background: var(--red-100);     color: var(--red-600);      }

/* ===================================================
   BOTÕES
   =================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--r);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition);
    font-family: inherit;
    white-space: nowrap;
    line-height: 1.25;
}

.btn:active { transform: scale(0.98); }

.btn-primario,
.btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.btn-primario:hover,
.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: 0 0 0 3px var(--primary-ring);
}

.btn-secundario,
.btn-secondary {
    background: var(--surface);
    color: var(--text-muted);
    border-color: var(--border);
}
.btn-secundario:hover,
.btn-secondary:hover {
    background: var(--slate-50);
    color: var(--text);
    border-color: var(--slate-300);
}

.btn-sair,
.btn-danger {
    background: transparent;
    color: var(--error);
    border-color: var(--red-100);
}
.btn-sair:hover,
.btn-danger:hover {
    background: var(--error-bg);
    border-color: #fca5a5;
}

.btn-success {
    background: var(--green-600);
    color: #fff;
    border-color: var(--green-600);
}
.btn-success:hover {
    background: var(--green-700);
    border-color: var(--green-700);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}
.btn-outline:hover {
    background: var(--primary-light);
}

.btn-sm        { padding: 0.3rem 0.7rem;  font-size: 0.8rem; }
.btn-lg        { padding: 0.7rem 1.375rem; font-size: 0.9375rem; }
.btn-grande,
.btn-block     { width: 100%; padding: 0.75rem; font-size: 1rem; }

/* btn-icon pode ser usado como wrapper ou diretamente no SVG */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.1em;
    height: 1.1em;
    flex-shrink: 0;
    /* Quando aplicado direto no SVG, estas propriedades se aplicam
       ao SVG e são herdadas pelos filhos (fill/stroke são herdáveis em SVG) */
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: middle;
}

.btn-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ===================================================
   FORMULÁRIOS
   =================================================== */
.formulario {
    background: var(--surface);
    padding: 1.75rem;
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.campo { margin-bottom: 1.125rem; }

.campo label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text);
}

.campo input:not([type="checkbox"]):not([type="radio"]),
.campo select,
.campo textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
    font-family: inherit;
    border: 1px solid var(--border);
    border-radius: var(--r);
    background: var(--surface);
    color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.campo input:focus,
.campo select:focus,
.campo textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-ring);
}

.campo textarea   { resize: vertical; min-height: 100px; }

.campos-grid   { display: grid; grid-template-columns: 1fr 1fr;       gap: 1rem; }
.campos-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr;   gap: 1rem; }

.botoes {
    display: flex;
    gap: 0.625rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.formulario-inline {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.formulario-filtros { margin-bottom: 1.5rem; }

.filtros-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    align-items: end;
}

.checkbox-mostrar-senha {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    cursor: pointer;
    font-weight: normal;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: normal;
}

.checkboxes-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.checkboxes-grid .checkbox-label {
    flex-direction: row;
    padding: 0.5rem 0.75rem;
    border-radius: var(--r);
    background: var(--bg);
    border: 1px solid var(--border-light);
    transition: background var(--transition);
}

.checkboxes-grid .checkbox-label:hover { background: var(--border-light); }

.checkbox-presenca {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
}

.checkbox-presenca input[type="checkbox"] {
    width: 1.125rem;
    height: 1.125rem;
    cursor: pointer;
    accent-color: var(--primary);
}

/* ===================================================
   MENSAGENS
   =================================================== */
.erros {
    list-style: none;
    background: var(--error-bg);
    border: 1px solid var(--error-border);
    color: var(--error);
    padding: 1rem 1.125rem;
    border-radius: var(--r);
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
}

.erros li + li { margin-top: 0.25rem; }

.sucesso {
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    color: var(--success);
    padding: 1rem 1.125rem;
    border-radius: var(--r);
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
}

/* ===================================================
   DETALHE EVENTO
   =================================================== */
.detalhe-evento {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.25rem;
}

.detalhe-evento h2 { margin-bottom: 0.375rem; }
.detalhe-evento .meta { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0.75rem; }
.detalhe-evento .descricao { margin-bottom: 1rem; line-height: 1.7; }

/* ===================================================
   TABELAS
   =================================================== */
.tabela-container {
    overflow-x: auto;
    background: var(--surface);
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    -webkit-overflow-scrolling: touch;
}

.tabela { width: 100%; border-collapse: collapse; min-width: 400px; }

.tabela th,
.tabela td {
    padding: 0.875rem 1.125rem;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.tabela th {
    background: var(--slate-50);
    font-weight: 600;
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.tabela tbody tr                     { transition: background var(--transition); }
.tabela tbody tr:hover               { background: var(--slate-50); }
.tabela tbody tr:last-child td       { border-bottom: none; }

/* ===================================================
   ESTADO VAZIO
   =================================================== */
.vazio {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--surface);
    border-radius: var(--r-lg);
    border: 1px dashed var(--border);
}

.vazio p { color: var(--text-muted); margin-bottom: 1.25rem; }

/* ===================================================
   BREADCRUMB
   =================================================== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-bottom: 1.25rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.breadcrumb a { color: var(--primary); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ===================================================
   MISC
   =================================================== */
.subtitulo { color: var(--text-muted); margin-bottom: 1.25rem; font-size: 0.9375rem; }

.link-inscritos {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
}

.link-inscritos:hover { text-decoration: underline; }

.texto-acento { margin-top: 0.75rem; font-size: 0.9rem; }
.texto-acento a { color: var(--primary); text-decoration: none; }
.texto-acento a:hover { text-decoration: underline; }

.link-acento { margin-top: 0.875rem; font-size: 0.875rem; text-align: center; }
.link-acento a { color: var(--primary); text-decoration: none; }
.link-acento a:hover { text-decoration: underline; }

.secao-central    { max-width: 420px; margin: 2rem auto; }
.secao-boas-vindas { text-align: center; padding: 2rem 1rem; }

.botoes-centro {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===================================================
   QR CODE
   =================================================== */
.qr-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--surface);
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

#qrcode-canvas,
.qr-wrapper canvas {
    display: block;
    border-radius: var(--r);
    border: 6px solid #fff;
    box-shadow: var(--shadow);
}

.qr-label { font-size: 0.85rem; color: var(--text-muted); }

/* Confirm card após inscrição */
.confirm-card {
    background: var(--surface);
    border-radius: var(--r-xl);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    padding: 2rem;
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
}

.confirm-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--green-50);
    border: 1px solid var(--green-100);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
}

.confirm-icon svg {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: var(--green-600);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.confirm-card h2 {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
    margin-bottom: 0.375rem;
}

.confirm-card .confirm-sub {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

.confirm-meta {
    background: var(--slate-50);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 1rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.confirm-meta p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.confirm-meta strong { color: var(--text); font-weight: 600; }

/* Scanner */
.scanner-box {
    background: var(--surface);
    border-radius: var(--r-xl);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

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

.scanner-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

.scanner-camera-area {
    position: relative;
    background: #111827;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#qr-reader { width: 100%; }
#qr-reader video { width: 100%; border-radius: 0; }

.scanner-feedback {
    padding: 1.25rem 1.5rem;
}

.scan-result {
    padding: 1rem 1.25rem;
    border-radius: var(--r-md);
    border: 1px solid;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.scan-result.success {
    background: var(--success-bg);
    border-color: var(--success-border);
    color: var(--success);
}

.scan-result.error {
    background: var(--error-bg);
    border-color: var(--error-border);
    color: var(--error);
}

.scan-result svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.scan-result-info { flex: 1; }
.scan-result-nome { font-weight: 700; font-size: 1rem; }
.scan-result-det  { font-size: 0.825rem; margin-top: 0.125rem; opacity: 0.8; }

/* Modal */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal-backdrop.hidden { display: none; }

.modal {
    background: var(--surface);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 380px;
    padding: 1.75rem;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.modal-title { font-size: 1.05rem; font-weight: 700; color: var(--text); }

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0.25rem;
    border-radius: var(--r);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition), color var(--transition);
}

.modal-close:hover { background: var(--slate-100); color: var(--text); }

.modal-close svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

/* ===================================================
   PÁGINA LOGIN (standalone, sem sidebar)
   =================================================== */
.pagina-inicial {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1rem 3rem;
    background: linear-gradient(155deg, #0f172a 0%, #1e293b 45%, #1e3a8a 100%);
    color: white;
    text-align: center;
}

.hero-logo-coditech {
    display: block;
    height: 80px;
    width: auto;
    max-width: 200px;
    margin: 0 auto 1.25rem;
    border-radius: var(--r-md);
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}

.hero-conteudo { margin-bottom: 2rem; }

.hero-titulo {
    font-size: clamp(2.25rem, 5vw, 3.25rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.375rem;
    background: linear-gradient(135deg, #fff 0%, #93c5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitulo {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    opacity: 0.85;
    margin-bottom: 0.375rem;
}

.hero-descricao {
    font-size: 0.9rem;
    opacity: 0.65;
    max-width: 300px;
    margin: 0 auto;
}

.login-card {
    background: var(--surface);
    color: var(--text);
    padding: 2rem;
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
}

.login-card h2 {
    margin-bottom: 1.5rem;
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.rodape-inicial {
    text-align: center;
    padding: 1rem;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.8rem;
}

.rodape-inicial .rodape-dev a { color: rgba(255,255,255,0.75); text-decoration: none; }
.rodape-inicial .rodape-dev a:hover { text-decoration: underline; }

/* ===================================================
   RODAPÉ
   =================================================== */
.rodape {
    padding: 0.875rem 2rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: auto;
}

.rodape-dev a { color: var(--primary); text-decoration: none; }
.rodape-dev a:hover { text-decoration: underline; }

/* ===================================================
   CABEÇALHO legado (escondido no novo layout, mantido
   para compatibilidade em páginas que ainda o usam)
   =================================================== */
.cabecalho { display: none; }
.navegacao  { display: none; }

/* ===================================================
   RESPONSIVO
   =================================================== */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay.open { display: block; }

    .main-wrapper { margin-left: 0; }
    .topbar       { display: flex; }

    .conteudo { padding: 1.25rem 1rem; }

    .campos-grid,
    .campos-grid-3 { grid-template-columns: 1fr; }

    .botoes             { flex-direction: column; }
    .botoes .btn        { width: 100%; justify-content: center; }

    .cards              { grid-template-columns: 1fr; }
    .card-acoes         { flex-direction: column; }
    .card-acoes .btn    { width: 100%; justify-content: center; }

    .stat-cards         { grid-template-columns: repeat(2, 1fr); }

    .formulario         { padding: 1.25rem; }

    .page-header        { flex-direction: column; align-items: flex-start; }
    .page-header-actions { width: 100%; }
    .page-header-actions .btn { flex: 1; justify-content: center; }

    .rodape             { flex-direction: column; text-align: center; padding: 0.875rem 1rem; }

    .tabela th,
    .tabela td          { padding: 0.75rem 0.875rem; font-size: 0.875rem; }
}

@media (max-width: 480px) {
    .stat-cards { grid-template-columns: 1fr; }
    .hero       { padding: 1.5rem 1rem 2rem; }
    .login-card { padding: 1.5rem; }
}

@media (min-width: 1024px) {
    .conteudo { padding: 2rem 2.5rem; }
    .cards    { gap: 1.25rem; }
}
