
/* Edupplies Admin — shared styles */
:root {
    --primary: #d35c56;
    --primary-dark: #b94b45;
    --sidebar-bg: #1e2a38;
    --sidebar-text: #a0aec0;
    --sidebar-hover: #2d3f52;
    --sidebar-active: #d35c56;
    --topbar-bg: #ffffff;
    --body-bg: #f4f6f9;
    --card-bg: #ffffff;
    --font: 'Poppins', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--body-bg); color: #3f3f47; }
a { text-decoration: none; }

/* ── Layout ── */
.admin-wrapper { display: flex; min-height: 100vh; }

/* ── Sidebar ── */
.admin-sidebar {
    width: 240px; height: 100vh; background: var(--sidebar-bg);
    position: fixed; top: 0; left: 0; z-index: 100;
    display: flex; flex-direction: column; transition: width .3s;
    overflow-y: auto; overflow-x: hidden;
}
.admin-sidebar::-webkit-scrollbar { width: 4px; }
.admin-sidebar::-webkit-scrollbar-track { background: transparent; }
.admin-sidebar::-webkit-scrollbar-thumb { background: #3d5068; border-radius: 4px; }
.admin-sidebar::-webkit-scrollbar-thumb:hover { background: #4a5f7a; }
.sidebar-logo {
    padding: 20px 18px; border-bottom: 1px solid #2d3f52;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    flex-direction: column;
}
.sidebar-logo span { font-size: 18px; font-weight: 700; color: #fff; }
.sidebar-logo small { font-size: 11px; color: #a0aec0; display: block; }
.sidebar-nav { flex: 1; padding: 12px 0; }
.nav-section { padding: 14px 18px 6px; font-size: 10px; font-weight: 700;
    color: #4a5568; text-transform: uppercase; letter-spacing: .08em; }
.nav-item a {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 18px; color: var(--sidebar-text);
    font-size: 13.5px; transition: all .2s;
}
.nav-item a:hover, .nav-item a.active {
    background: var(--sidebar-hover); color: #fff;
    border-left: 3px solid var(--primary);
}
.nav-item a i { width: 18px; text-align: center; font-size: 14px; }
.nav-group-toggle {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 18px; color: var(--sidebar-text); font-size: 13.5px;
    cursor: pointer; justify-content: space-between; transition: all .2s;
}
.nav-group-toggle:hover { background: var(--sidebar-hover); color: #fff; }
.nav-group-children { display: none; background: rgba(0,0,0,.15); }
.nav-group-children.open { display: block; }
.nav-group-children .nav-item a { padding-left: 46px; font-size: 13px; }

/* ── Topbar ── */
.admin-topbar {
    position: fixed; top: 0; left: 240px; right: 0; height: 60px;
    background: var(--topbar-bg); border-bottom: 1px solid #e2e8f0;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px; z-index: 99; box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.topbar-title { font-size: 15px; font-weight: 600; color: #1e2a38; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-user { font-size: 13px; color: #4a5568; }
.topbar-logout {
    background: var(--primary); color: #fff; border: none;
    padding: 6px 14px; border-radius: 6px; font-size: 13px; font-weight: 600;
    font-family: var(--font); cursor: pointer;
}
.topbar-logout:hover { background: var(--primary-dark); }

/* ── Main Content ── */
.admin-main { margin-left: 240px; padding-top: 60px; flex: 1; }
.admin-content { padding: 28px 28px; }
.page-header { margin-bottom: 22px; }
.page-header h1 { font-size: 20px; font-weight: 700; color: #1e2a38; }
.page-header p { font-size: 13px; color: #6d6d7a; margin-top: 4px; }

/* ── Stat Cards ── */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; margin-bottom: 24px; }
.stat-card {
    background: var(--card-bg); border-radius: 10px; padding: 22px;
    box-shadow: 0 1px 6px rgba(0,0,0,.06); display: flex; align-items: center; gap: 16px;
}
.stat-icon {
    width: 50px; height: 50px; border-radius: 10px; background: #fdf0ef;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; color: var(--primary); flex-shrink: 0;
}
.stat-info .label { font-size: 12px; color: #6d6d7a; font-weight: 500; }
.stat-info .value { font-size: 24px; font-weight: 700; color: #1e2a38; margin-top: 2px; }

/* ── Cards ── */
.card {
    background: var(--card-bg); border-radius: 10px;
    box-shadow: 0 1px 6px rgba(0,0,0,.06); margin-bottom: 22px; overflow: hidden;
}
.card-header {
    padding: 16px 20px; border-bottom: 1px solid #e2e8f0;
    display: flex; align-items: center; justify-content: space-between;
}
.card-header h5 { font-size: 14px; font-weight: 600; color: #1e2a38; }
.card-body { padding: 20px; }

/* ── Tables ── */
.table-responsive { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th {
    background: #f8fafc; padding: 11px 14px; text-align: left;
    font-weight: 600; color: #4a5568; font-size: 12px;
    text-transform: uppercase; letter-spacing: .04em;
    border-bottom: 2px solid #e2e8f0;
}
tbody td { padding: 12px 14px; border-bottom: 1px solid #f0f4f8; color: #3f3f47; }
tbody tr:hover { background: #f8fafc; }
tbody tr:last-child td { border-bottom: none; }

/* ── Badges ── */
.badge {
    display: inline-block; padding: 3px 10px; border-radius: 20px;
    font-size: 11px; font-weight: 600;
}
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger  { background: #fee2e2; color: #991b1b; }
.badge-info    { background: #dbeafe; color: #1e40af; }
.badge-secondary { background: #e2e8f0; color: #4a5568; }

/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: 6px; font-size: 13px;
    font-weight: 600; font-family: var(--font); cursor: pointer; border: none; transition: all .2s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-secondary { background: #e2e8f0; color: #4a5568; }
.btn-secondary:hover { background: #cbd5e0; }
.btn-sm { padding: 5px 11px; font-size: 12px; }
.btn-danger { background: #fee2e2; color: #991b1b; }
.btn-danger:hover { background: #fca5a5; }
.btn-info { background: #dbeafe; color: #1e40af; }
.btn-info:hover { background: #bfdbfe; }

/* ── Forms ── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 500; color: #4a5568; margin-bottom: 6px; }
.form-control {
    width: 100%; padding: 10px 14px; border: 1px solid #e2e8f0;
    border-radius: 7px; font-size: 14px; font-family: var(--font);
    transition: border .2s; background: #fff;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(211,92,86,.1); }
select.form-control { cursor: pointer; }

/* ── Form Layout (Settings Pages) ── */
.form-row { display: flex; gap: 16px; margin-bottom: 18px; }
.form-row .form-group { flex: 1; margin-bottom: 0; }
.form-section { margin-bottom: 24px; }
.form-section-title {
    font-size: 15px; font-weight: 600; color: #1e2a38;
    margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px solid #e2e8f0;
    display: flex; align-items: center; gap: 8px;
}
.form-section-title i { color: var(--primary); }
.form-actions { padding-top: 16px; border-top: 1px solid #e2e8f0; margin-top: 8px; }
.form-error { display: block; color: #991b1b; font-size: 12px; margin-top: 4px; }
.content-card { background: var(--card-bg); border-radius: 10px; box-shadow: 0 1px 6px rgba(0,0,0,.06); padding: 24px; }
.btn-outline { background: transparent; border: 1px solid #d1d5db; color: #4a5568; }
.btn-outline:hover { background: #f3f4f6; border-color: #9ca3af; }
.required { color: #ef4444; margin-left: 2px; }

/* ── Login Page ── */
.login-wrapper {
    min-height: 100vh; background: var(--body-bg);
    display: flex; align-items: center; justify-content: center;
}
.login-card {
    background: #fff; border-radius: 14px; padding: 44px 40px;
    width: 100%; max-width: 420px; box-shadow: 0 4px 24px rgba(0,0,0,.10);
}
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo .brand { font-size: 24px; font-weight: 700; color: var(--primary); }
.login-logo .portal-name { font-size: 13px; color: #6d6d7a; margin-top: 4px; }
.login-card h2 { font-size: 20px; font-weight: 700; color: #1e2a38; margin-bottom: 6px; }
.login-card p { font-size: 13px; color: #6d6d7a; margin-bottom: 24px; }
.btn-login {
    width: 100%; padding: 12px; background: var(--primary); color: #fff;
    border: none; border-radius: 8px; font-size: 15px; font-weight: 600;
    cursor: pointer; transition: background .2s; font-family: var(--font);
}
.btn-login:hover { background: var(--primary-dark); }
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; font-size: 13px; }
.alert-danger { background: #fee2e2; color: #991b1b; }
.alert-success { background: #d1fae5; color: #065f46; }

/* ── Stub section ── */
.coming-soon {
    text-align: center; padding: 60px 20px; color: #6d6d7a;
}
.coming-soon .icon { font-size: 48px; margin-bottom: 16px; }
.coming-soon h3 { font-size: 18px; font-weight: 600; color: #1e2a38; margin-bottom: 8px; }

@media (max-width: 768px) {
    .admin-sidebar { width: 0; overflow: hidden; }
    .admin-topbar, .admin-main { left: 0; margin-left: 0; }
}

/* ── Pagination ────────────────────────────────────────────────── */
nav .pagination {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 16px 0 0;
    gap: 4px;
    flex-wrap: wrap;
}
nav .pagination .page-item .page-link,
nav .pagination .page-item > span.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: #fff;
    color: #495057;
    font-size: 14px;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: all .15s ease;
}
nav .pagination .page-item .page-link:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #212529;
}
nav .pagination .page-item.active .page-link,
nav .pagination .page-item.active > span.page-link {
    background: #4a6cf7;
    border-color: #4a6cf7;
    color: #fff;
    font-weight: 600;
    cursor: default;
}
nav .pagination .page-item.disabled .page-link,
nav .pagination .page-item.disabled > span.page-link {
    background: #f8f9fa;
    border-color: #dee2e6;
    color: #adb5bd;
    cursor: not-allowed;
}
/* Hide the "Showing 1 to 25 of 77 results" text */
nav > div > div:first-child {
    display: none;
}
nav[role="navigation"] > div {
    display: flex;
    justify-content: flex-end;
}

