/* Admin Module Styles — Scholly design language */

:root {
    --navy:   #1A2C42;
    --teal:   #00A7A8;
    --coral:  #FF7F50;
    --teal-light: rgba(0, 167, 168, 0.12);
    --coral-light: rgba(255, 127, 80, 0.12);
    --bg:     #F9FAFB;
    --bg-alt: #F3F4F6;
    --border: #E5E7EB;
    --text:   #111827;
    --muted:  #6B7280;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.10);
    --success: #10b981;
    --warning: #f59e0b;
    --danger:  #ef4444;
}

* { font-family: 'Inter', system-ui, sans-serif; }

/* ── Login Page ─────────────────────────────────────────── */
.admin-login-body {
    background: var(--navy);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.admin-login-container {
    width: 100%;
    max-width: 420px;
}

.admin-login-card {
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
}

.admin-logo-circle {
    width: 72px;
    height: 72px;
    background: var(--teal-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 28px;
    color: var(--teal);
    border: 2px solid rgba(0, 167, 168, 0.25);
}

.admin-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 6px;
}

.form-label {
    font-weight: 500;
    color: var(--text);
    margin-bottom: 6px;
    font-size: 14px;
}

.form-control {
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    background: #fff;
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(0, 167, 168, 0.15);
    outline: none;
}

.btn-primary {
    background: var(--teal);
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    color: #fff;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.btn-primary:hover, .btn-primary:focus {
    background: #009899;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 167, 168, 0.35);
    color: #fff;
}

/* ── Dashboard Shell ────────────────────────────────────── */
.admin-dashboard-body {
    background: var(--bg);
    min-height: 100vh;
}

/* Header */
.admin-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    height: 56px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.admin-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.admin-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.admin-brand img { display: block; }

.sidebar-toggle-btn {
    background: transparent;
    border: none;
    color: var(--navy);
    font-size: 18px;
    padding: 6px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}
.sidebar-toggle-btn:hover { background: var(--bg-alt); }

.admin-user-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.admin-username {
    font-weight: 500;
    color: var(--muted);
    font-size: 14px;
}

.btn-logout {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    padding: 7px 16px;
    border-radius: 10px;
    color: var(--muted);
    font-weight: 500;
    font-size: 13px;
    transition: all 0.2s;
    cursor: pointer;
}
.btn-logout:hover { background: var(--border); color: var(--navy); }

/* ── Sidebar Layout ─────────────────────────────────────── */
.admin-layout {
    display: flex;
    min-height: calc(100vh - 56px);
}

.admin-sidebar {
    width: 240px;
    min-width: 240px;
    background: var(--navy);
    position: sticky;
    top: 56px;
    height: calc(100vh - 56px);
    overflow-y: auto;
    flex-shrink: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.15) transparent;
}

.sidebar-nav {
    padding: 16px 0 24px;
}

.sidebar-group-label {
    text-transform: uppercase;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.35);
    padding: 18px 20px 6px;
}
.sidebar-group-label:first-child { padding-top: 8px; }

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.65);
    font-size: 13.5px;
    font-weight: 500;
    padding: 9px 20px;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    border-radius: 0;
    position: relative;
}
.sidebar-item i { font-size: 13px; width: 16px; text-align: center; flex-shrink: 0; }
.sidebar-item span { flex: 1; }
.sidebar-item:hover { background: rgba(255,255,255,0.07); color: #fff; }
.sidebar-item.active {
    background: rgba(0,167,168,0.18);
    color: #fff;
    border-left: 3px solid var(--teal);
    padding-left: 17px;
}
.sidebar-item.active i { color: var(--teal); }

.sidebar-badge {
    background: var(--coral);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 999px;
    padding: 2px 7px;
    min-width: 20px;
    text-align: center;
    flex-shrink: 0;
}

/* Mobile sidebar overlay */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 990;
}

/* ── Main content area ──────────────────────────────────── */
.admin-main {
    flex: 1;
    min-width: 0;
    padding: 28px 28px 48px;
}

.section-header { margin-bottom: 24px; }

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 4px;
}

.page-subtitle {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 0;
}

/* ── Tabs (keep for inside-modal use) ───────────────────── */
.admin-tabs {
    background: #fff;
    border-radius: 16px;
    padding: 14px 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.nav-tabs {
    border-bottom: none;
    gap: 6px;
}

.nav-tabs .nav-link {
    border: none;
    background: transparent;
    color: var(--muted);
    font-weight: 500;
    font-size: 14px;
    padding: 9px 18px;
    border-radius: 10px;
    transition: all 0.2s;
}
.nav-tabs .nav-link:hover { background: var(--bg-alt); color: var(--navy); }
.nav-tabs .nav-link.active { background: var(--teal); color: #fff; }

.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 28px 24px;
}

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

.stat-card {
    background: #fff;
    border-radius: 16px;
    padding: 22px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.stat-icon.success  { background: rgba(16, 185, 129, 0.12); color: var(--success); }
.stat-icon.danger   { background: var(--coral-light);        color: var(--coral); }
.stat-icon.warning  { background: rgba(245, 158, 11, 0.12);  color: var(--warning); }
.stat-icon.info     { background: var(--teal-light);          color: var(--teal); }
.stat-icon.primary  { background: rgba(26, 44, 66, 0.10);    color: var(--navy); }

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--navy);
}

.stat-label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}

.stat-change { font-size: 12px; margin-top: 6px; }
.stat-change.positive { color: var(--success); }
.stat-change.negative { color: var(--coral); }

/* ── Tabs ───────────────────────────────────────────────── */
.admin-tabs {
    background: #fff;
    border-radius: 16px;
    padding: 14px 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.nav-tabs {
    border-bottom: none;
    gap: 6px;
}

.nav-tabs .nav-link {
    border: none;
    background: transparent;
    color: var(--muted);
    font-weight: 500;
    font-size: 14px;
    padding: 9px 18px;
    border-radius: 10px;
    transition: all 0.2s;
}

.nav-tabs .nav-link:hover {
    background: var(--bg-alt);
    color: var(--navy);
}

.nav-tabs .nav-link.active {
    background: var(--teal);
    color: #fff;
}

/* ── Data Table Card ────────────────────────────────────── */
.data-table-card {
    background: #fff;
    border-radius: 16px;
    padding: 22px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.table-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--navy);
}

.table-actions { display: flex; gap: 10px; }

.btn-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--bg-alt);
    color: var(--navy);
}

.search-box { position: relative; width: 100%; max-width: 280px; }

.search-box input {
    width: 100%;
    padding: 8px 12px 8px 34px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    color: var(--text);
    transition: border-color 0.2s;
}

.search-box input:focus {
    border-color: var(--teal);
    outline: none;
}

.search-box i {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 13px;
}

.table { margin-bottom: 0; }

.table thead th {
    background: var(--bg);
    color: var(--muted);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 11px 14px;
    border-bottom: 1.5px solid var(--border);
}

.table tbody td {
    padding: 14px;
    vertical-align: middle;
    border-bottom: 1px solid var(--bg-alt);
    color: var(--text);
    font-size: 14px;
}

.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--bg); }

/* ── Badges ─────────────────────────────────────────────── */
.badge {
    padding: 5px 11px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.02em;
}

.badge-success   { background: rgba(16, 185, 129, 0.12); color: var(--success); }
.badge-danger    { background: var(--coral-light);        color: var(--coral); }
.badge-warning   { background: rgba(245, 158, 11, 0.12);  color: var(--warning); }
.badge-info      { background: var(--teal-light);          color: var(--teal); }
.badge-secondary { background: var(--bg-alt);             color: var(--muted); }

/* ── Buttons ─────────────────────────────────────────────── */
.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 8px;
    font-weight: 500;
}

.btn-success  { background: var(--success); border: none; color: #fff; }
.btn-success:hover { background: #059669; color: #fff; }

.btn-danger   { background: var(--coral);   border: none; color: #fff; }
.btn-danger:hover { background: #e8622a; color: #fff; }

.btn-secondary { background: var(--bg-alt); border: 1px solid var(--border); color: var(--muted); }
.btn-secondary:hover { background: var(--border); color: var(--navy); }

.btn-outline-primary {
    border: 1.5px solid var(--teal);
    color: var(--teal);
    background: transparent;
    border-radius: 10px;
}
.btn-outline-primary:hover { background: var(--teal); color: #fff; }

/* ── Modals ─────────────────────────────────────────────── */
.modal-content  { border-radius: 20px; border: none; }
.modal-header   { background: var(--bg); border-bottom: 1px solid var(--border); border-radius: 20px 20px 0 0; }
.modal-title    { font-weight: 600; color: var(--navy); font-size: 17px; }
.modal-footer   { background: var(--bg); border-top: 1px solid var(--border); border-radius: 0 0 20px 20px; }

/* ── Misc ────────────────────────────────────────────────── */
.spinner-container { display: flex; justify-content: center; align-items: center; padding: 60px 20px; }
.spinner-border    { width: 2.5rem; height: 2.5rem; color: var(--teal); }

.empty-state       { text-align: center; padding: 60px 20px; }
.empty-state i     { font-size: 56px; color: var(--border); margin-bottom: 14px; }
.empty-state h5    { color: var(--muted); margin-bottom: 6px; }
.empty-state p     { color: var(--muted); font-size: 14px; }

.url-list  { list-style: none; padding: 0; margin: 0; }
.url-item  { padding: 8px 12px; background: var(--bg-alt); border-radius: 8px; margin-bottom: 6px; font-size: 13px; word-break: break-all; }
.url-item.success { background: rgba(16, 185, 129, 0.10); border-left: 3px solid var(--success); }

.holiday-list { max-height: 300px; overflow-y: auto; }
.holiday-item { padding: 11px; border-bottom: 1px solid var(--bg-alt); }
.holiday-item:last-child { border-bottom: none; }
.holiday-name  { font-weight: 600; color: var(--navy); font-size: 14px; }
.holiday-dates { font-size: 13px; color: var(--muted); }

.progress     { border-radius: 999px; background: var(--bg-alt); }
.progress-bar { background: var(--teal); font-weight: 600; font-size: 13px; border-radius: 999px; }

.list-group-item { border-left: 3px solid transparent; }
.list-group-item-success { border-left-color: var(--success); background-color: rgba(16, 185, 129, 0.08); }

.table-borderless th { font-weight: 600; color: var(--muted); }
.table-striped tbody tr:nth-of-type(odd) { background-color: var(--bg); }
.table-light { background-color: var(--bg); border-bottom: 1.5px solid var(--border); }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
    .admin-sidebar {
        position: fixed;
        top: 56px;
        left: -240px;
        height: calc(100vh - 56px);
        z-index: 995;
        transition: left 0.25s ease;
    }
    .admin-sidebar.open { left: 0; }
    .sidebar-overlay { display: none; }
    .sidebar-overlay.open { display: block !important; }
    .admin-main { padding: 20px 16px 40px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .table-header { flex-direction: column; gap: 12px; }
    .table-actions { width: 100%; flex-direction: column; }
    .search-box { max-width: 100%; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .admin-main { padding: 16px 12px 32px; }
}
