/* ================================================================
   SCA — Sistema de Controlo de Assiduidade
   Design v3 — Professional Institutional
   Fonts: Inter (body) + Plus Jakarta Sans (display)
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

/* ── CSS Variables ─────────────────────────────────────────────── */
:root {
    /* Surfaces */
    --bg:        #07090f;
    --bg2:       #0d1117;
    --bg3:       #161c26;
    --bg4:       #1d2535;
    --bg5:       #232d40;

    /* Borders */
    --border:       rgba(255,255,255,0.07);
    --border-hover: rgba(255,255,255,0.14);
    --border-focus: var(--accent);

    /* Text */
    --text:       #f1f4f9;
    --text-2:     #9aa5ba;
    --text-3:     #5a6680;
    --text-inv:   #0d1117;

    /* Accent — overridable by JS from settings */
    --accent:         #3b82f6;
    --accent-light:   rgba(59,130,246,0.12);
    --accent-hover:   #60a5fa;

    /* Semantic */
    --green:      #22c55e;
    --green-light:rgba(34,197,94,0.12);
    --red:        #ef4444;
    --red-light:  rgba(239,68,68,0.12);
    --amber:      #f59e0b;
    --amber-light:rgba(245,158,11,0.12);
    --purple:     #a78bfa;
    --purple-light:rgba(167,139,250,0.12);
    --teal:       #2dd4bf;
    --teal-light: rgba(45,212,191,0.12);

    /* Layout */
    --sidebar-w:  260px;
    --topbar-h:   60px;
    --radius:     10px;
    --radius-sm:  6px;
    --radius-lg:  16px;

    /* Typography */
    --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Plus Jakarta Sans', 'Inter', sans-serif;

    /* Shadows */
    --shadow-sm:  0 1px 3px rgba(0,0,0,0.4);
    --shadow:     0 4px 16px rgba(0,0,0,0.5);
    --shadow-lg:  0 8px 32px rgba(0,0,0,0.6);

    --transition: 0.18s ease;
}

/* ── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; -webkit-font-smoothing: antialiased; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ── Scrollbar ─────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg5); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ================================================================
   SIDEBAR
   ================================================================ */
.sidebar {
    width: var(--sidebar-w);
    height: 100vh;
    position: fixed;
    left: 0; top: 0;
    background: var(--bg2);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 200;
    transition: width var(--transition), transform var(--transition);
    overflow: hidden;
}
.sidebar.collapsed { width: 64px; }
.sidebar.collapsed .logo-text,
.sidebar.collapsed .menu-label span,
.sidebar.collapsed .menu-group-label,
.sidebar.collapsed .sidebar-footer-content { display: none; }
.sidebar.collapsed .sidebar-logo { justify-content: center; }
.sidebar.collapsed .menu-item { justify-content: center; }
.sidebar.collapsed .menu-item span { display: none; }

/* Logo area */
.sidebar-header {
    padding: 0 16px;
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    overflow: hidden;
    white-space: nowrap;
}

.logo-mark {
    width: 32px; height: 32px;
    background: var(--accent);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
    color: #fff;
}

.logo-text { overflow: hidden; }
.logo-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
    color: var(--text);
    line-height: 1.2;
    letter-spacing: .2px;
}
.logo-sub {
    font-size: 11px;
    color: var(--text-3);
    letter-spacing: .3px;
    line-height: 1;
}

/* Menu */
.sidebar-menu {
    flex: 1;
    padding: 12px 10px;
    overflow-y: auto;
    overflow-x: hidden;
}

.menu-group-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--text-3);
    padding: 12px 8px 5px;
    white-space: nowrap;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    color: var(--text-2);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 400;
    transition: all var(--transition);
    white-space: nowrap;
    margin-bottom: 1px;
    position: relative;
}
.menu-item i {
    font-size: 15px;
    flex-shrink: 0;
    width: 18px;
    text-align: center;
}
.menu-item:hover {
    background: var(--bg3);
    color: var(--text);
}
.menu-item.active {
    background: var(--accent-light);
    color: var(--accent);
    font-weight: 500;
}
.menu-item.active::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 3px; height: 18px;
    background: var(--accent);
    border-radius: 0 3px 3px 0;
}

/* Sidebar footer */
.sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}
.sidebar-footer-content {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-3);
}
.sidebar-footer-content i { font-size: 13px; }

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

/* ── Topbar ─────────────────────────────────────────────────────── */
.topbar {
    height: var(--topbar-h);
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 14px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.sidebar-toggle {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-2);
    width: 32px; height: 32px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 16px;
    display: flex; align-items: center; justify-content: center;
    transition: all var(--transition);
    flex-shrink: 0;
}
.sidebar-toggle:hover { border-color: var(--accent); color: var(--accent); }

.topbar-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    overflow: hidden;
}
.breadcrumb-home {
    font-size: 12px;
    color: var(--text-3);
    text-decoration: none;
    flex-shrink: 0;
}
.breadcrumb-sep { color: var(--text-3); font-size: 11px; }
.breadcrumb-current {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.pill-badge {
    background: var(--bg4);
    border: 1px solid var(--border);
    padding: 4px 11px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 500;
    color: var(--text-2);
    letter-spacing: .2px;
    white-space: nowrap;
}

.topbar-icon-btn {
    width: 32px; height: 32px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-2);
    display: flex; align-items: center; justify-content: center;
    font-size: 15px;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition);
}
.topbar-icon-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }

/* ── Main content ───────────────────────────────────────────────── */
.main-content {
    flex: 1;
    padding: 28px 32px;
}

/* ── Page header ────────────────────────────────────────────────── */
.page-header {
    margin-bottom: 24px;
}
.page-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 22px;
    line-height: 1.25;
    color: var(--text);
    margin-bottom: 3px;
}
.page-subtitle {
    font-size: 13px;
    color: var(--text-3);
}

/* ================================================================
   CARDS
   ================================================================ */
.card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: border-color var(--transition);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 12px;
    flex-wrap: wrap;
}

.card-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--text);
}
.card-title i { color: var(--accent); font-size: 15px; }

/* ── Stat Cards ─────────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    position: relative;
    overflow: hidden;
    transition: border-color var(--transition), transform var(--transition);
}
.stat-card:hover { transform: translateY(-1px); border-color: var(--border-hover); }

.stat-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    border-radius: var(--radius) var(--radius) 0 0;
}
.stat-card.blue::after   { background: var(--accent); }
.stat-card.green::after  { background: var(--green); }
.stat-card.red::after    { background: var(--red); }
.stat-card.amber::after  { background: var(--amber); }
.stat-card.purple::after { background: var(--purple); }
.stat-card.teal::after   { background: var(--teal); }

.stat-icon-bg {
    position: absolute;
    right: 16px; top: 50%;
    transform: translateY(-50%);
    font-size: 36px;
    opacity: 0.06;
}

.stat-label {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-3);
    font-weight: 600;
    margin-bottom: 8px;
}
.stat-value {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 32px;
    line-height: 1;
    margin-bottom: 4px;
}
.stat-card.blue .stat-value   { color: var(--accent); }
.stat-card.green .stat-value  { color: var(--green); }
.stat-card.red .stat-value    { color: var(--red); }
.stat-card.amber .stat-value  { color: var(--amber); }
.stat-card.purple .stat-value { color: var(--purple); }
.stat-card.teal .stat-value   { color: var(--teal); }

.stat-sub { font-size: 12px; color: var(--text-3); }

/* ================================================================
   GRID LAYOUTS
   ================================================================ */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* ================================================================
   TABLES
   ================================================================ */
.table-wrap { overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

thead th {
    background: var(--bg3);
    padding: 9px 13px;
    text-align: left;
    font-weight: 600;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-3);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}
tbody tr:hover { background: var(--bg3); }
tbody tr:last-child { border-bottom: none; }
td { padding: 10px 13px; vertical-align: middle; }

/* ================================================================
   BADGES
   ================================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 500;
    white-space: nowrap;
    line-height: 1.6;
}
.badge-green  { background: var(--green-light);  color: var(--green);  border: 1px solid rgba(34,197,94,.2); }
.badge-red    { background: var(--red-light);    color: var(--red);    border: 1px solid rgba(239,68,68,.2); }
.badge-amber  { background: var(--amber-light);  color: var(--amber);  border: 1px solid rgba(245,158,11,.2); }
.badge-blue   { background: var(--accent-light); color: var(--accent); border: 1px solid rgba(59,130,246,.2); }
.badge-purple { background: var(--purple-light); color: var(--purple); border: 1px solid rgba(167,139,250,.2); }
.badge-teal   { background: var(--teal-light);   color: var(--teal);   border: 1px solid rgba(45,212,191,.2); }
.badge-gray   { background: var(--bg4);          color: var(--text-2); border: 1px solid var(--border); }

/* ================================================================
   BUTTONS
   ================================================================ */
.btn, button.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all var(--transition);
    white-space: nowrap;
    line-height: 1.4;
}
.btn-primary  { background: var(--accent);        color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--bg3); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--border-hover); background: var(--bg4); }
.btn-success  { background: var(--green-light);  color: var(--green);  border: 1px solid rgba(34,197,94,.25); }
.btn-success:hover  { background: rgba(34,197,94,.2); }
.btn-danger   { background: var(--red-light);    color: var(--red);    border: 1px solid rgba(239,68,68,.25); }
.btn-danger:hover   { background: rgba(239,68,68,.2); }
.btn-amber    { background: var(--amber-light);  color: var(--amber);  border: 1px solid rgba(245,158,11,.25); }
.btn-amber:hover    { background: rgba(245,158,11,.2); }
.btn-sm  { padding: 5px 11px; font-size: 12px; }
.btn-icon { padding: 6px 8px; }

/* ================================================================
   FORMS
   ================================================================ */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.full { grid-column: 1 / -1; }

label {
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .7px;
    color: var(--text-3);
}

input, select, textarea {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    padding: 8px 12px;
    font-family: var(--font-body);
    font-size: 13.5px;
    width: 100%;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
    line-height: 1.4;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}
input::placeholder, textarea::placeholder { color: var(--text-3); }
select option { background: var(--bg2); }
textarea { resize: vertical; min-height: 80px; }
input[type="color"] { padding: 3px 6px; height: 36px; cursor: pointer; }

.form-hint { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }
.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    align-items: center;
    flex-wrap: wrap;
}

/* Settings section */
.settings-section {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 20px;
    overflow: hidden;
}
.settings-section-header {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg3);
}
.settings-section-header i { color: var(--accent); font-size: 16px; }
.settings-section-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 13.5px;
}
.settings-section-desc { font-size: 12px; color: var(--text-3); margin-left: auto; }
.settings-body { padding: 20px; }

/* ================================================================
   SEARCH BAR
   ================================================================ */
.search-bar {
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    min-width: 220px;
    transition: border-color var(--transition);
}
.search-bar:focus-within { border-color: var(--accent); }
.search-bar i { color: var(--text-3); font-size: 14px; flex-shrink: 0; }
.search-bar input { background: none; border: none; padding: 0; flex: 1; font-size: 13.5px; }

/* ================================================================
   DOCENTE CARDS
   ================================================================ */
.docente-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.docente-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    transition: all var(--transition);
}
.docente-card:hover { border-color: var(--border-hover); transform: translateY(-1px); box-shadow: var(--shadow); }

.docente-avatar {
    width: 40px; height: 40px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}
.av-blue   { background: var(--accent-light);  color: var(--accent); }
.av-green  { background: var(--green-light);   color: var(--green); }
.av-purple { background: var(--purple-light);  color: var(--purple); }
.av-amber  { background: var(--amber-light);   color: var(--amber); }
.av-red    { background: var(--red-light);     color: var(--red); }
.av-teal   { background: var(--teal-light);    color: var(--teal); }

.docente-name { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.docente-dept { font-size: 12px; color: var(--text-3); margin-bottom: 8px; }

/* ================================================================
   PRESENCE ROWS
   ================================================================ */
.presence-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 0;
    border-bottom: 1px solid var(--border);
    gap: 12px;
    flex-wrap: wrap;
}
.presence-row:last-child { border-bottom: none; }
.presence-info { display: flex; align-items: center; gap: 11px; flex: 1; min-width: 0; }
.presence-name { font-weight: 500; font-size: 13.5px; }
.presence-time { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.presence-actions { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }

/* ── Status toggle ────────────────────────────────────────────── */
.status-toggle {
    display: flex;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border);
}
.status-toggle button {
    border: none; border-radius: 0;
    padding: 5px 12px;
    font-size: 12px; font-weight: 500;
    background: var(--bg3); color: var(--text-2);
    cursor: pointer;
    transition: all var(--transition);
    display: flex; align-items: center; gap: 5px;
    font-family: var(--font-body);
}
.status-toggle button + button { border-left: 1px solid var(--border); }
.status-toggle button:hover { background: var(--bg4); color: var(--text); }
.status-toggle button.active-presente  { background: var(--green-light);  color: var(--green); }
.status-toggle button.active-falta     { background: var(--red-light);    color: var(--red); }
.status-toggle button.active-justificado { background: var(--amber-light); color: var(--amber); }

/* ================================================================
   DATE NAV
   ================================================================ */
.date-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.date-nav input[type="date"],
.date-nav input[type="month"] {
    background: var(--bg3);
    border: 1px solid var(--border);
    width: auto;
    color-scheme: dark;
}
.date-nav-btn {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-2);
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: all var(--transition);
    text-decoration: none;
}
.date-nav-btn:hover { border-color: var(--accent); color: var(--accent); }

.date-label {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 15px;
}

/* ================================================================
   MODALS
   ================================================================ */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.75);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(6px);
}
.modal-box {
    background: var(--bg2);
    border: 1px solid var(--border-hover);
    border-radius: var(--radius-lg);
    padding: 28px;
    width: 90%;
    max-width: 460px;
    box-shadow: var(--shadow-lg);
    animation: modal-in .18s ease;
}
@keyframes modal-in { from { transform: scale(.95) translateY(8px); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-lg { max-width: 620px; }
.modal-box h4 { font-family: var(--font-display); font-weight: 700; font-size: 17px; }
.modal-icon { font-size: 40px; color: var(--amber); margin-bottom: 12px; }
.modal-actions { display: flex; gap: 10px; justify-content: center; margin-top: 20px; }

/* ================================================================
   TABS
   ================================================================ */
.tab-bar {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
    gap: 0;
}
.tab-item {
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    color: var(--text-2);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all var(--transition);
    text-decoration: none;
    display: flex; align-items: center; gap: 6px;
}
.tab-item:hover { color: var(--text); }
.tab-item.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ================================================================
   ALERTS
   ================================================================ */
.alert {
    padding: 11px 15px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-bottom: 14px;
    line-height: 1.5;
}
.alert i { flex-shrink: 0; margin-top: 1px; }
.alert-info    { background: var(--accent-light); border: 1px solid rgba(59,130,246,.25); color: #93c5fd; }
.alert-warning { background: var(--amber-light);  border: 1px solid rgba(245,158,11,.25); color: #fcd34d; }
.alert-success { background: var(--green-light);  border: 1px solid rgba(34,197,94,.25);  color: #86efac; }
.alert-danger  { background: var(--red-light);    border: 1px solid rgba(239,68,68,.25);  color: #fca5a5; }

/* ================================================================
   TOAST
   ================================================================ */
.toast-container {
    position: fixed;
    bottom: 24px; right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.toast {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 11px 16px;
    font-size: 13.5px;
    display: flex;
    align-items: center;
    gap: 9px;
    opacity: 0;
    transform: translateX(16px);
    transition: all .3s ease;
    box-shadow: var(--shadow);
    max-width: 340px;
}
.toast.show { opacity: 1; transform: translateX(0); }
.toast-success { border-left: 3px solid var(--green); }
.toast-success i { color: var(--green); }
.toast-error   { border-left: 3px solid var(--red); }
.toast-error i { color: var(--red); }
.toast-info    { border-left: 3px solid var(--accent); }
.toast-info i  { color: var(--accent); }

/* ================================================================
   PROGRESS BAR
   ================================================================ */
.progress-bar-wrap { background: var(--bg4); border-radius: 20px; height: 5px; overflow: hidden; }
.progress-bar-fill { height: 100%; border-radius: 20px; background: linear-gradient(90deg, var(--accent), var(--teal)); transition: width .4s ease; }

.pct-bar { display: flex; align-items: center; gap: 8px; }
.pct-bar-track { flex: 1; background: var(--bg4); border-radius: 10px; height: 4px; overflow: hidden; }
.pct-bar-fill  { height: 100%; border-radius: 10px; }

/* ================================================================
   REPORT SPECIFIC
   ================================================================ */
.report-header {
    background: linear-gradient(135deg, var(--bg3) 0%, var(--bg4) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 24px;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.report-header-text { font-family: var(--font-display); font-weight: 700; font-size: 20px; }
.report-header-sub  { color: var(--text-3); font-size: 12.5px; margin-top: 2px; }
.report-table tfoot td { font-weight: 700; border-top: 2px solid var(--border); background: var(--bg3); }

/* ================================================================
   UPLOAD AREA
   ================================================================ */
.upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    background: var(--bg3);
}
.upload-area:hover, .upload-area.dragover {
    border-color: var(--accent);
    background: var(--accent-light);
}
.upload-area i { font-size: 32px; color: var(--text-3); margin-bottom: 10px; display: block; }
.upload-area p { font-size: 13.5px; color: var(--text-2); }

/* ================================================================
   STEP BAR
   ================================================================ */
.step-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 22px; flex-wrap: wrap; }
.step {
    display: flex; align-items: center; gap: 8px;
    padding: 7px 14px;
    font-size: 12.5px; font-weight: 500;
    cursor: default;
    color: var(--text-2);
    border-bottom: 2px solid transparent;
    transition: all var(--transition);
}
.step.active   { color: var(--accent); border-bottom-color: var(--accent); }
.step.done     { color: var(--green);  border-bottom-color: var(--green); }
.step-num {
    width: 18px; height: 18px;
    border-radius: 50%;
    background: currentColor;
    color: var(--bg2);
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 800; flex-shrink: 0;
}
.step-arrow { color: var(--text-3); font-size: 18px; }

/* ================================================================
   REP CARD
   ================================================================ */
.rep-card {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    transition: border-color var(--transition);
}
.rep-card:hover { border-color: var(--border-hover); }

/* ================================================================
   EMPTY STATE
   ================================================================ */
.empty-state {
    text-align: center;
    padding: 44px 20px;
    color: var(--text-3);
}
.empty-state i  { font-size: 36px; margin-bottom: 12px; display: block; opacity: 0.35; }
.empty-state p  { font-size: 13.5px; color: var(--text-3); }
.empty-state .empty-title { font-size: 15px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }

/* ================================================================
   UTILS
   ================================================================ */
.d-flex        { display: flex; }
.align-center  { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap     { flex-wrap: wrap; }
.gap-1 { gap: 6px; }
.gap-2 { gap: 10px; }
.mt-1  { margin-top: 8px; }
.mt-2  { margin-top: 14px; }
.mt-3  { margin-top: 22px; }
.mb-2  { margin-bottom: 14px; }
.text-muted { color: var(--text-3); }
.text-sm    { font-size: 12px; }
.text-xs    { font-size: 11px; }
.fw-600     { font-weight: 600; }
.fw-700     { font-weight: 700; }
.section-title    { font-family: var(--font-display); font-weight: 700; font-size: 21px; margin-bottom: 3px; }
.section-subtitle { font-size: 13px; color: var(--text-3); margin-bottom: 22px; }

/* Toggle switch */
.toggle-wrap { display: flex; align-items: center; gap: 10px; }
.toggle-switch { position: relative; width: 40px; height: 22px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-track {
    position: absolute; inset: 0;
    background: var(--bg5);
    border: 1px solid var(--border);
    border-radius: 20px;
    cursor: pointer;
    transition: all var(--transition);
}
.toggle-track::after {
    content: '';
    position: absolute;
    left: 3px; top: 3px;
    width: 14px; height: 14px;
    background: var(--text-2);
    border-radius: 50%;
    transition: all var(--transition);
}
.toggle-switch input:checked + .toggle-track { background: var(--accent); border-color: var(--accent); }
.toggle-switch input:checked + .toggle-track::after { left: 21px; background: #fff; }

/* Color swatch preview */
.color-preview { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--border); display: inline-block; vertical-align: middle; }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.mobile-open { transform: translateX(0); }
    .main-wrapper { margin-left: 0; }
    .main-content { padding: 16px; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .docente-grid { grid-template-columns: 1fr; }
    .topbar { padding: 0 14px; }
}
