/* =====================================================================
   Infoiles Ed — Admin panel shell.
   A clean modern take on the legacy fixed-left-sidebar layout
   (legacy: 17% sidebar / 83% content, no topbar, no active state).
   We keep the same structure but add a fixed sidebar, active highlighting,
   the school/org name, and icons.
   ===================================================================== */

:root {
    --ie-sidebar-width: 260px;
    --ie-sidebar-bg: #1f2937;       /* slate-800 */
    --ie-sidebar-fg: #cbd5e1;       /* slate-300 */
    --ie-sidebar-fg-muted: #94a3b8; /* slate-400 */
    --ie-sidebar-active-bg: #2563eb;/* blue-600  */
    --ie-content-bg: #f1f3f6;
}

body.ie-admin {
    background: var(--ie-content-bg);
    min-height: 100vh;
}

/* ---- Sidebar ---- */
.ie-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--ie-sidebar-width);
    height: 100vh;
    background: var(--ie-sidebar-bg);
    color: var(--ie-sidebar-fg);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    z-index: 1030;
}

.ie-sidebar .ie-brand {
    padding: 18px 20px;
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: .04em;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.ie-sidebar .ie-welcome {
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.ie-sidebar .ie-welcome .ie-welcome-label {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--ie-sidebar-fg-muted);
    margin: 0;
}
.ie-sidebar .ie-welcome .ie-welcome-user {
    font-size: .92rem;
    font-weight: 600;
    color: #fff;
    margin: 2px 0 0;
    word-break: break-word;
}
.ie-sidebar .ie-welcome .ie-welcome-org {
    font-size: .78rem;
    color: var(--ie-sidebar-fg-muted);
    margin: 2px 0 0;
}

.ie-sidebar .ie-nav {
    list-style: none;
    margin: 0;
    padding: 10px 0;
    flex: 1 1 auto;
}
.ie-sidebar .ie-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: var(--ie-sidebar-fg);
    text-decoration: none;
    font-size: .9rem;
    border-left: 3px solid transparent;
    transition: background .12s ease, color .12s ease;
}
.ie-sidebar .ie-nav a .bi {
    font-size: 1.05rem;
    width: 1.1em;
    text-align: center;
    color: var(--ie-sidebar-fg-muted);
}
.ie-sidebar .ie-nav a:hover {
    background: rgba(255, 255, 255, .06);
    color: #fff;
}
.ie-sidebar .ie-nav a:hover .bi { color: #fff; }
.ie-sidebar .ie-nav a.active {
    background: var(--ie-sidebar-active-bg);
    color: #fff;
    border-left-color: #93c5fd;
    font-weight: 600;
}
.ie-sidebar .ie-nav a.active .bi { color: #fff; }

.ie-sidebar .ie-nav .ie-logout {
    margin-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    padding-top: 8px;
}
.ie-sidebar .ie-nav .ie-logout button {
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: var(--ie-sidebar-fg);
    font-size: .9rem;
    cursor: pointer;
}
.ie-sidebar .ie-nav .ie-logout button:hover { background: rgba(239, 68, 68, .15); color: #fecaca; }

/* ---- Content ---- */
.ie-content {
    margin-left: var(--ie-sidebar-width);
    min-height: 100vh;
}
.ie-page-heading {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 22px 32px;
}
.ie-page-heading h1 {
    font-size: 1.6rem;
    font-weight: 600;
    margin: 0;
    color: #1e293b;
}
.ie-page-body {
    padding: 28px 32px;
}

/* ---- Dashboard stat cards ---- */
.ie-stat-card .ie-stat-value {
    font-size: 2.1rem;
    font-weight: 700;
    line-height: 1;
    color: #1e293b;
}
.ie-stat-card .ie-stat-label {
    color: #64748b;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.ie-module-tile {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}
.ie-module-tile .card { transition: transform .12s ease, box-shadow .12s ease; }
.ie-module-tile:hover .card {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
}
.ie-module-tile .bi { font-size: 1.5rem; color: #2563eb; }

@media (max-width: 768px) {
    .ie-sidebar { position: static; width: 100%; height: auto; }
    .ie-content { margin-left: 0; }
}
