/* ZTech SchoolSuite — Admin Styles */
:root {
    --zs-primary: #22C55E;
    --zs-primary-dark: #16A34A;
    --zs-accent: #0EA5E9;
    --zs-dark: #0F172A;
    --zs-sidebar-bg: #1E293B;
    --zs-sidebar-text: rgba(255,255,255,.75);
    --zs-sidebar-hover: rgba(255,255,255,.08);
    --zs-bg: #F8FAFC;
    --zs-card-bg: #FFFFFF;
    --zs-border: #E2E8F0;
    --zs-text: #0F172A;
    --zs-text-muted: #64748B;
    --zs-radius: 12px;
}

* { box-sizing: border-box; }
body.admin-body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--zs-bg);
    color: var(--zs-text);
    font-size: 14px;
    min-height: 100vh;
}

.admin-body.support-mode { padding-top: 56px; }

/* Support banner */
.support-banner {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1050;
    background: linear-gradient(135deg, #B91C1C, #991B1B);
    color: white; padding: 10px 14px; font-size: .88rem;
    box-shadow: 0 4px 14px rgba(185, 28, 28, .3);
}
.support-banner code { background: rgba(255,255,255,.2); padding: 2px 8px; border-radius: 4px; color: white; }
.support-banner .btn-light { border-radius: 8px; }

/* Sidebar */
.sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: 250px;
    background: var(--zs-sidebar-bg);
    color: white;
    padding: 20px 0;
    overflow-y: auto;
    z-index: 100;
    transition: transform .3s;
}
body.support-mode .sidebar { top: 56px; }
.sidebar-brand {
    display: flex; align-items: center; gap: 12px;
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    margin-bottom: 14px;
}
.brand-icon {
    width: 40px; height: 40px; border-radius: 10px;
    background: linear-gradient(135deg, var(--zs-primary), var(--zs-accent));
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
}
.brand-name { font-weight: 700; font-size: .95rem; line-height: 1.2; }
.brand-sub { font-size: .72rem; color: rgba(255,255,255,.5); }
.sidebar-nav { padding: 0 10px; }
.nav-section {
    font-size: .7rem;
    color: rgba(255,255,255,.4);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: .5px;
    margin: 16px 12px 6px;
}
.sidebar .nav-link {
    display: flex; align-items: center; gap: 12px;
    padding: 9px 14px;
    border-radius: 8px;
    color: var(--zs-sidebar-text);
    text-decoration: none;
    font-size: .88rem;
    transition: background .15s;
}
.sidebar .nav-link:hover { background: var(--zs-sidebar-hover); color: white; }
.sidebar .nav-link.active {
    background: linear-gradient(135deg, var(--zs-primary), var(--zs-primary-dark));
    color: white;
    box-shadow: 0 4px 12px rgba(34, 197, 94, .3);
}
.sidebar .nav-link i { font-size: 1.05rem; width: 22px; }
.sidebar-footer {
    padding: 20px;
    font-size: .72rem;
    color: rgba(255,255,255,.4);
    border-top: 1px solid rgba(255,255,255,.08);
    margin-top: 30px;
}

.main-wrapper { margin-left: 250px; min-height: 100vh; }

.topbar {
    background: white;
    border-bottom: 1px solid var(--zs-border);
    padding: 14px 24px;
    display: flex; align-items: center; gap: 18px;
    position: sticky; top: 0; z-index: 50;
}
body.support-mode .topbar { top: 56px; }
.page-title { font-size: 1.1rem; font-weight: 600; flex-grow: 1; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.topbar-user { display: flex; align-items: center; gap: 10px; }
.avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, var(--zs-primary), var(--zs-accent));
    color: white;
    display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: .82rem;
}

.main-content { padding: 24px; padding-bottom: 90px; }

/* Cards */
.card { border: 1px solid var(--zs-border); border-radius: var(--zs-radius); box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.stat-card {
    background: white; border: 1px solid var(--zs-border); border-radius: var(--zs-radius);
    padding: 20px; display: flex; align-items: center; gap: 16px;
    transition: transform .15s, box-shadow .15s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(0,0,0,.06); }
.stat-icon {
    width: 56px; height: 56px; border-radius: 14px;
    background: linear-gradient(135deg, var(--zs-primary), var(--zs-accent));
    color: white; display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem;
}
.stat-value { font-size: 1.8rem; font-weight: 700; color: var(--zs-text); line-height: 1; }
.stat-label { color: var(--zs-text-muted); font-size: .82rem; margin-top: 4px; }

/* License status badges */
.license-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px; border-radius: 999px;
    font-size: .75rem; font-weight: 600;
}
.license-badge.active   { background: #DCFCE7; color: #14532D; }
.license-badge.trial    { background: #DBEAFE; color: #1E3A8A; }
.license-badge.grace    { background: #FEF3C7; color: #78350F; }
.license-badge.expired,
.license-badge.suspended,
.license-badge.revoked,
.license-badge.invalid,
.license-badge.offline  { background: #FEE2E2; color: #7F1D1D; }

.btn-primary-zs {
    background: linear-gradient(135deg, var(--zs-primary), var(--zs-primary-dark));
    color: white; border: none;
    padding: .55rem 1.1rem; border-radius: 10px; font-weight: 500;
}
.btn-primary-zs:hover { color: white; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(34, 197, 94, .3); }

/* Mobile */
.mobile-footer-nav { display: none; }

@media (max-width: 992px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-wrapper { margin-left: 0; }
    .mobile-footer-nav {
        display: flex; justify-content: space-around;
        position: fixed; bottom: 0; left: 0; right: 0;
        background: white; border-top: 1px solid var(--zs-border);
        z-index: 100; padding: 6px 0;
        box-shadow: 0 -4px 14px rgba(0,0,0,.05);
    }
    .mobile-footer-nav a {
        flex: 1; text-align: center;
        color: var(--zs-text-muted);
        text-decoration: none;
        font-size: .68rem;
        padding: 6px 0;
    }
    .mobile-footer-nav a i { font-size: 1.1rem; display: block; margin-bottom: 2px; }
    .mobile-footer-nav a.active { color: var(--zs-primary); }
}

/* Login */
.login-wrap {
    min-height: 100vh;
    background: linear-gradient(135deg, #0F172A 0%, #1E3A8A 50%, #22C55E 100%);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.login-card {
    background: white; padding: 40px; border-radius: 20px;
    box-shadow: 0 30px 60px rgba(0,0,0,.3);
    max-width: 420px; width: 100%;
}
.login-card .logo {
    width: 70px; height: 70px; border-radius: 18px;
    background: linear-gradient(135deg, var(--zs-primary), var(--zs-accent));
    color: white; font-size: 2rem;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 18px;
    box-shadow: 0 14px 30px rgba(34, 197, 94, .3);
}
.form-control { border-radius: 10px; padding: .65rem .9rem; border: 1.5px solid var(--zs-border); }
.form-control:focus { border-color: var(--zs-primary); box-shadow: 0 0 0 3px rgba(34,197,94,.15); }

.fw-500 { font-weight: 500; }
.text-muted-sm { color: var(--zs-text-muted); font-size: .8rem; }
