:root {
    --bg-main: #0b1220;
    --bg-card: #111827;
    --bg-input: #020617;
    --border: #1f2937;

    --green: #22c55e;
    --red: #ef4444;
    --yellow: #facc15;
    --gray: #64748b;

    --text-main: #e5e7eb;
    --text-muted: #9ca3af;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', sans-serif;
}

body {
    background: radial-gradient(circle at top, #0f172a, #020617);
    color: var(--text-main);
    min-height: 100vh;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
}

/* ===== CARD ===== */
.card {
    background: linear-gradient(180deg, #020617, #020617);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 25px 50px rgba(0,0,0,.55);
}

/* ===== HEADER ===== */
.card h1 {
    font-size: 26px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: .5px;
}

/* ===== FORM ===== */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full {
    grid-column: span 2;
}

label {
    font-size: 13px;
    margin-bottom: 6px;
    color: var(--text-muted);
}

/* ===== INPUTS ===== */
select,
textarea {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    color: var(--text-main);
    font-size: 14px;
    transition: .2s;
}

textarea {
    min-height: 220px;
    resize: vertical;
}

select:focus,
textarea:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 2px rgba(34,197,94,.15);
}

/* ===== BUTTON ===== */
.actions {
    margin-top: 25px;
    display: flex;
    justify-content: flex-end;
}

button {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #020617;
    border: none;
    border-radius: 14px;
    padding: 14px 26px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: .5px;
    transition: .25s;
}

button:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
}

/* ===== TABLE ===== */
.table {
    width: 100%;
    margin-top: 30px;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: 14px;
}

.table th {
    text-align: left;
    padding: 14px;
    font-size: 13px;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

.table td {
    padding: 14px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.table tr:hover {
    background: rgba(255,255,255,.03);
}

/* ===== BADGES ===== */
.badge {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    display: inline-block;
}

.presente {
    background: var(--green);
    color: #020617;
}

.ausente {
    background: var(--red);
}

.atencao {
    background: var(--yellow);
    color: #020617;
}

.nao_respondeu {
    background: var(--gray);
}

/* ===== MODAL ===== */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: linear-gradient(180deg, #020617, #020617);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 24px;
    width: 420px;
    box-shadow: 0 30px 60px rgba(0,0,0,.6);
}

.modal-content h3 {
    margin-bottom: 15px;
}

.modal-content ul {
    list-style: none;
    margin-bottom: 20px;
}

.modal-content li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

input[type="text"],
input[type="date"] {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    color: var(--text-main);
    font-size: 14px;
}

input[type="text"]:focus,
input[type="date"]:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 2px rgba(34,197,94,.15);
}

/* ===== AÇÕES DA TABELA ===== */
.table-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
}

.table-actions .action {
    font-size: 18px;
    text-decoration: none;
    cursor: pointer;
}

.table-actions .action.edit {
    color: #facc15;
}

.table-actions .action.delete {
    color: #ef4444;
}

.table-actions .action:hover {
    transform: scale(1.15);
    opacity: 0.85;
}

/* PAINEL NOVO MEMBRO */
.form-panel {
    margin-top: 20px;
    background: linear-gradient(145deg, #0f172a, #020617);
    border-radius: 16px;
    overflow: hidden;

    max-height: 0;
    opacity: 0;
    transition: all .35s ease;
    padding: 0 24px;
}

.form-panel.active {
    max-height: 500px;
    opacity: 1;
    padding: 24px;
}

/* HEADER */
.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.form-header h2 {
    font-size: 20px;
    font-weight: 600;
}

/* BOTÃO FECHAR */
.close-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 26px;
    cursor: pointer;
}

/* GRID */
.form-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full {
    grid-column: span 2;
}

/* INPUTS */
.form-group input,
.form-group select {
    background: #020617;
    border: 1px solid #1e293b;
    color:
    
/* adicionado UX aqui */
/* =========================
   BOTÕES
========================= */

.btn-primary,
.btn-secondary {
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all .2s ease;
    text-decoration: none;
}

.btn-primary {
    background: #111;
    color: #fff;
}

.btn-primary:hover {
    background: #000;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #e5e5e5;
    color: #333;
}

.btn-secondary:hover {
    background: #d4d4d4;
}

/* ÍCONES DE AÇÃO */
.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all .2s ease;
}

.btn-icon.edit {
    background: #2563eb;
    color: #fff;
}

.btn-icon.edit:hover {
    background: #1e40af;
}

.btn-icon.delete {
    background: #dc2626;
    color: #fff;
}

.btn-icon.delete:hover {
    background: #991b1b;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.table th {
    background: #f5f5f5;
    text-align: left;
    font-size: 14px;
    padding: 12px;
    color: #333;
}

.table td {
    padding: 12px;
    border-bottom: 1px solid #e5e5e5;
}

.table tr:hover {
    background: #fafafa;
}

.actions {
    display: flex;
    gap: 8px;
}

.form-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #444;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #111;
}
.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.card {
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
}

.card-header {
    margin-bottom: 20px;
}

.card-header h1 {
    font-size: 22px;
    display: flex;
    align-items: center;
    gap: 10px;
}
/* =========================
   TOAST MESSAGES
========================= */

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 280px;
    padding: 14px 18px;
    border-radius: 10px;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0,0,0,.15);
    z-index: 9999;
    animation: slideIn .3s ease, fadeOut .3s ease 4s forwards;
}

.toast.success {
    background: #16a34a;
}

.toast.error {
    background: #dc2626;
}

.toast i {
    margin-right: 8px;
}

/* animações */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(30px);
    }
}

/* Cancelar edição (mesmo tamanho do salvar) */

}
.btn-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 16px;
    text-decoration: none;
    cursor: pointer;
}

.btn-icon.cancel {
    background: #6b7280;
    color: #fff;
}

.btn-icon.cancel:hover {
    background: #4b5563;
}
.actions .btn-icon {
    width: 38px !important;
    height: 38px !important;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(180px,1fr));
    gap: 16px;
    margin: 20px 0;
}

.stat {
    text-align: center;
}

.stat strong {
    font-size: 28px;
}

.stat.success { border-left: 5px solid #22c55e; }
.stat.danger  { border-left: 5px solid #ef4444; }
.stat.warning { border-left: 5px solid #f59e0b; }

.dashboard-graphs {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(320px,1fr));
    gap: 20px;
}
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.dashboard-grid-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.subtitle {
    opacity: .7;
    margin-bottom: 20px;
}
/* ===============================
   LAYOUT DASHBOARD
================================ */

body {
    margin: 0;
    background: #0f172a;
    color: #e5e7eb;
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

/* Wrapper geral */
body {
    display: flex;
}

/* SIDEBAR */
.sidebar {
    width: 240px;
    min-height: 100vh;
    background: #020617;
    position: fixed;
    left: 0;
    top: 0;
    padding: 20px 15px;
    box-shadow: 4px 0 15px rgba(0,0,0,.5);
    z-index: 100;
}

.sidebar .logo {
    text-align: center;
    margin-bottom: 30px;
}

.sidebar .logo img {
    max-width: 160px;
}

.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    margin-bottom: 8px;
    color: #cbd5f5;
    text-decoration: none;
    border-radius: 10px;
    transition: .3s;
    font-weight: 500;
}

.sidebar nav a i {
    width: 20px;
    text-align: center;
}

.sidebar nav a:hover,
.sidebar nav a.active {
    background: #1e293b;
    color: #38bdf8;
}

/* CONTEÚDO */
.main-content {
    margin-left: 240px;
    width: calc(100% - 240px);
    padding: 25px;
}

/* TOPBAR */
.topbar {
    background: #020617;
    padding: 18px 25px;
    border-radius: 14px;
    margin-bottom: 25px;
    box-shadow: 0 8px 20px rgba(0,0,0,.4);
}

/* RESPONSIVO */
@media (max-width: 900px) {
    .sidebar {
        width: 80px;
        padding: 20px 10px;
    }

    .sidebar .logo img {
        max-width: 50px;
    }

    .sidebar nav a span {
        display: none;
    }

    .main-content {
        margin-left: 80px;
        width: calc(100% - 80px);
    }
}

