/* ==========================================================
   SwiftTopUpGh School Management System — App Stylesheet
   Brand: Teal #0072BC / Orange #F7941E / Purple #662D91
   ========================================================== */

:root {
    --brand-teal: #0072BC;
    --brand-teal-dark: #00548a;
    --brand-orange: #F7941E;
    --brand-purple: #662D91;
    --ink: #1F2937;
    --ink-muted: #6B7280;
    --bg: #F5F7FA;
    --panel: #FFFFFF;
    --border: #E4E8EE;
}

* { box-sizing: border-box; }

body {
    background: var(--bg);
    color: var(--ink);
    font-family: "Segoe UI", "Helvetica Neue", Arial, system-ui, sans-serif;
    font-size: 14.5px;
}

a { text-decoration: none; }

/* ---------- Layout shell ---------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: 240px;
    flex-shrink: 0;
    background: linear-gradient(180deg, var(--brand-teal) 0%, var(--brand-teal-dark) 100%);
    color: #eaf4fb;
    position: fixed;
    top: 0; bottom: 0; left: 0;
    overflow-y: auto;
    z-index: 40;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 18px;
    border-bottom: 1px solid rgba(255,255,255,.14);
}

.sidebar-brand .mark {
    width: 34px; height: 34px; border-radius: 8px;
    background: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; color: var(--brand-orange); font-size: 15px;
    flex-shrink: 0;
    padding: 3px;
    overflow: hidden;
}
.sidebar-brand .mark img { max-width: 100%; max-height: 100%; object-fit: contain; }

.sidebar-brand .name { font-weight: 600; font-size: 14.5px; line-height: 1.25; color: #fff; }
.sidebar-brand .sub { font-size: 11px; color: rgba(255,255,255,.7); }

.sidebar-section-label {
    font-size: 10.5px;
    letter-spacing: .04em;
    color: rgba(255,255,255,.55);
    padding: 16px 18px 6px;
}

.sidebar-nav { padding: 4px 10px 20px; }

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 12px;
    border-radius: 8px;
    color: rgba(255,255,255,.88);
    font-size: 13.7px;
    margin-bottom: 2px;
    transition: background .12s ease;
}

.sidebar-nav a:hover { background: rgba(255,255,255,.1); color: #fff; }

.sidebar-nav a.active {
    background: rgba(255,255,255,.16);
    color: #fff;
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--brand-orange);
}

.sidebar-nav .icon { width: 18px; text-align: center; font-size: 15px; }

.main {
    margin-left: 240px;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.topbar {
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    padding: 12px 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 30;
}

.topbar .term-pill {
    font-size: 12px;
    color: var(--brand-purple);
    background: #f4ecf9;
    border: 1px solid #e5d3f0;
    padding: 3px 10px;
    border-radius: 999px;
    font-weight: 600;
}

.topbar .user-chip {
    display: flex; align-items: center; gap: 10px;
}

.topbar .user-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--brand-teal);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px;
}

.content { padding: 24px 26px 50px; }

.page-title { font-size: 20px; font-weight: 700; color: var(--ink); margin-bottom: 2px; }
.page-subtitle { color: var(--ink-muted); font-size: 13px; margin-bottom: 20px; }

/* ---------- Stat tiles ---------- */
.stat-tile {
    background: var(--panel);
    border: 1px solid var(--border);
    border-left: 4px solid var(--brand-teal);
    border-radius: 8px;
    padding: 16px 18px;
    height: 100%;
}
.stat-tile.accent-orange { border-left-color: var(--brand-orange); }
.stat-tile.accent-purple { border-left-color: var(--brand-purple); }
.stat-tile.accent-teal { border-left-color: var(--brand-teal); }
.stat-tile .stat-label { font-size: 12px; color: var(--ink-muted); text-transform: uppercase; letter-spacing: .03em; }
.stat-tile .stat-value { font-size: 26px; font-weight: 700; margin-top: 4px; color: var(--ink); }
.stat-tile .stat-foot { font-size: 12px; color: var(--ink-muted); margin-top: 6px; }

/* ---------- Panels / cards ---------- */
.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
}
.panel-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 14.5px;
}
.panel-body { padding: 18px; }

/* ---------- Tables ---------- */
.table-app { width: 100%; border-collapse: collapse; font-size: 13.6px; }
.table-app thead th {
    text-align: left;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--ink-muted);
    border-bottom: 1px solid var(--border);
    padding: 10px 12px;
    white-space: nowrap;
}
.table-app tbody td {
    padding: 11px 12px;
    border-bottom: 1px solid #EFF2F6;
    vertical-align: middle;
}
.table-app tbody tr:hover { background: #FAFBFD; }

/* ---------- Buttons (brand) ---------- */
.btn-brand {
    background: var(--brand-teal);
    border-color: var(--brand-teal);
    color: #fff;
}
.btn-brand:hover { background: var(--brand-teal-dark); border-color: var(--brand-teal-dark); color: #fff; }

.btn-brand-orange {
    background: var(--brand-orange);
    border-color: var(--brand-orange);
    color: #fff;
}
.btn-brand-orange:hover { filter: brightness(.93); color: #fff; }

.btn-brand-purple {
    background: var(--brand-purple);
    border-color: var(--brand-purple);
    color: #fff;
}
.btn-brand-purple:hover { filter: brightness(.93); color: #fff; }

.bg-orange { background: var(--brand-orange) !important; }
.bg-purple { background: var(--brand-purple) !important; }
.text-brand-teal { color: var(--brand-teal); }
.text-brand-purple { color: var(--brand-purple); }

.avatar-initial {
    width: 32px; height: 32px; border-radius: 50%;
    background: #eaf3fb; color: var(--brand-teal);
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 12.5px;
}

/* ---------- Login page ---------- */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 12% 18%, rgba(102,45,145,.14), transparent 40%),
        radial-gradient(circle at 88% 82%, rgba(247,148,30,.14), transparent 42%),
        var(--brand-teal);
    padding: 24px;
}
.login-card {
    width: 100%;
    max-width: 380px;
    background: #fff;
    border-radius: 12px;
    padding: 34px 30px;
    box-shadow: 0 20px 50px rgba(0,20,40,.25);
}
.login-mark {
    width: 46px; height: 46px; border-radius: 10px;
    background: var(--brand-orange);
    color: #fff; font-weight: 700; font-size: 19px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 14px;
}
.login-demo-box {
    background: #F3F8FC;
    border: 1px dashed #c9dfee;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 12px;
    color: var(--ink-muted);
    margin-top: 16px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); transition: transform .2s ease; }
    .sidebar.open { transform: translateX(0); }
    .main { margin-left: 0; }
    .sidebar-toggle { display: inline-flex !important; }
}

.sidebar-toggle {
    display: none;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 6px;
    width: 34px; height: 34px;
    align-items: center; justify-content: center;
}

.badge-soft { font-weight: 600; font-size: 11px; padding: 4px 9px; border-radius: 999px; }
