:root {
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --primary: #22c55e;
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
    --sidebar-w: 260px;
}

/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

body {
    background: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

/* SIDEBAR */
.sidebar {
    width: var(--sidebar-w);
    height: 100vh;
    background: #020617;
    padding: 25px;
    position: fixed;
    top: 0;
    left: -260px;
    transition: 0.3s ease;
    z-index: 1000;
}

.sidebar.active {
    left: 0;
}

.sidebar h2 {
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 30px;
    text-align: center;
}

.sidebar a {
    display: flex;
    align-items: center;
    color: var(--text-dim);
    text-decoration: none;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 8px;
    font-weight: 500;
    transition: 0.2s;
}

.sidebar a:hover,
.sidebar a.active {
    background: var(--primary);
    color: #000;
}

/* MAIN */
.main {
    width: 100%;
    padding: 20px;
    transition: 0.3s;
}

/* TOPBAR */
.topbar {
    background: var(--bg-card);
    padding: 15px 20px;
    border-radius: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

#menu-toggle {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 1.5rem;
    cursor: pointer;
}

#dark-mode {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* CARDS */
.card {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    overflow-x: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

/* TABELAS */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    min-width: 500px;
}

th {
    text-align: left;
    color: var(--text-dim);
    padding: 12px;
    border-bottom: 1px solid #334155;
}

td {
    padding: 12px;
    border-bottom: 1px solid #334155;
}

/* INPUTS */
input,
select {
    width: 100%;
    padding: 12px;
    background: #0f172a;
    border: 1px solid #334155;
    color: white;
    border-radius: 8px;
    margin: 8px 0 15px;
}

/* BOTÕES */
.btn {
    display: inline-block;
    padding: 8px 15px;
    border-radius: 8px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.btn-primary {
    background: var(--primary);
    color: #000;
    width: 100%;
}

/* OVERLAY (MENU MOBILE) */
.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 900;
}

.overlay.active {
    display: block;
}

/* DESKTOP */
@media (min-width: 992px) {
    .sidebar {
        left: 0;
    }

    .main {
        margin-left: var(--sidebar-w);
        width: calc(100% - var(--sidebar-w));
    }

    #menu-toggle {
        display: none;
    }
}

/* MOBILE */
@media (max-width: 991px) {
    .main {
        margin-left: 0;
    }
}

/* MODO CLARO */
body.light {
    background: #f1f5f9;
    color: #0f172a;
}

body.light .card,
body.light .topbar,
body.light .sidebar {
    background: #ffffff;
    color: #0f172a;
}

.agenda-futura {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
}

.dia-box {
    background: #0f172a;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
}

.horarios {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
}

.hora-livre {
    background: #22c55e;
    color: #000;
    padding: 5px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
}

.sem-vaga {
    color: #ef4444;
    font-size: 12px;
}