/* Education Network - Admin Dashboard Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --adm-bg: #f8fafc;
    --adm-sidebar: #0f172a;
    --adm-sidebar-hover: #1e293b;
    --adm-sidebar-active: #1e88e5;
    --adm-card-bg: #ffffff;
    --adm-text-main: #0f172a;
    --adm-text-muted: #64748b;
    --adm-border: #e2e8f0;
    --adm-primary: #1e88e5;
    --adm-primary-dark: #0d47a1;
    --adm-accent: #f59e0b;
    --adm-success: #10b981;
    --adm-danger: #ef4444;
    --adm-radius: 12px;
    --adm-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --adm-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    background-color: var(--adm-bg);
    color: var(--adm-text-main);
    line-height: 1.5;
    min-height: 100vh;
}

/* Admin Wrapper Layout */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    width: 260px;
    background-color: var(--adm-sidebar);
    color: #f8fafc;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logo-icon {
    font-size: 26px;
    background: linear-gradient(135deg, var(--adm-primary), var(--adm-primary-dark));
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-header-text h2 {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}

.sidebar-header-text span {
    font-size: 12px;
    color: #94a3b8;
}

.sidebar-menu {
    list-style: none;
    padding: 18px 12px;
    flex-grow: 1;
    overflow-y: auto;
}

.menu-category {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    padding: 12px 12px 6px;
}

.sidebar-menu li {
    margin-bottom: 4px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.sidebar-menu a:hover {
    background-color: var(--adm-sidebar-hover);
    color: #ffffff;
}

.sidebar-menu a.active {
    background-color: var(--adm-primary);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(30, 136, 229, 0.35);
}

.sidebar-menu a i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.badge {
    margin-left: auto;
    background: var(--adm-accent);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 12px;
}

.badge-danger {
    background: var(--adm-danger);
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.user-avatar-pill {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #334155;
    color: #38bdf8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.user-name-text {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
}

.user-role-text {
    font-size: 11px;
    color: #94a3b8;
}

/* Main Content Area */
.admin-main {
    margin-left: 260px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Top Navbar */
.admin-topbar {
    background: #ffffff;
    height: 70px;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--adm-border);
    position: sticky;
    top: 0;
    z-index: 90;
}

.topbar-title h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--adm-text-main);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-view-site {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f1f5f9;
    color: var(--adm-text-main);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s;
}

.btn-view-site:hover {
    background: #e2e8f0;
    color: var(--adm-primary);
}

.btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fee2e2;
    color: var(--adm-danger);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: #fecaca;
}

.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--adm-text-main);
    cursor: pointer;
}

/* Content Container */
.admin-content {
    padding: 32px;
    flex-grow: 1;
}

/* Flash Messages */
.alert {
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: fadeIn 0.3s ease;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--adm-success);
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--adm-danger);
}

.alert-info {
    background-color: #e0f2fe;
    color: #075985;
    border-left: 4px solid var(--adm-primary);
}

/* Cards & Grid */
.adm-grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.adm-stat-card {
    background: var(--adm-card-bg);
    padding: 22px;
    border-radius: var(--adm-radius);
    box-shadow: var(--adm-shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--adm-border);
}

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

.stat-content h3 {
    font-size: 28px;
    font-weight: 800;
    color: var(--adm-text-main);
    line-height: 1.1;
}

.stat-content p {
    font-size: 13px;
    font-weight: 500;
    color: var(--adm-text-muted);
    margin-top: 4px;
}

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

.stat-icon.blue { background: #e0f2fe; color: #0284c7; }
.stat-icon.green { background: #d1fae5; color: #059669; }
.stat-icon.amber { background: #fef3c7; color: #d97706; }
.stat-icon.purple { background: #ede9fe; color: #7c3aed; }

/* Content Card */
.adm-card {
    background: var(--adm-card-bg);
    border-radius: var(--adm-radius);
    box-shadow: var(--adm-shadow);
    border: 1px solid var(--adm-border);
    margin-bottom: 28px;
    overflow: hidden;
}

.adm-card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--adm-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
}

.adm-card-header h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--adm-text-main);
}

.adm-card-body {
    padding: 24px;
}

/* Forms */
.adm-form-group {
    margin-bottom: 20px;
}

.adm-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
}

.adm-form-control {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    border: 1px solid var(--adm-border);
    border-radius: 8px;
    background: #ffffff;
    color: var(--adm-text-main);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.adm-form-control:focus {
    outline: none;
    border-color: var(--adm-primary);
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.15);
}

textarea.adm-form-control {
    min-height: 100px;
    resize: vertical;
}

.adm-help-text {
    font-size: 12px;
    color: var(--adm-text-muted);
    margin-top: 6px;
}

.adm-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

/* Buttons */
.btn-adm {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-adm-primary {
    background: var(--adm-primary);
    color: #ffffff;
}

.btn-adm-primary:hover {
    background: var(--adm-primary-dark);
}

.btn-adm-secondary {
    background: #e2e8f0;
    color: #334155;
}

.btn-adm-secondary:hover {
    background: #cbd5e1;
}

.btn-adm-danger {
    background: var(--adm-danger);
    color: #ffffff;
}

.btn-adm-danger:hover {
    background: #dc2626;
}

.btn-adm-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
}

/* Tables */
.adm-table-container {
    overflow-x: auto;
}

.adm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}

.adm-table th {
    background: #f8fafc;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.05em;
    padding: 12px 16px;
    border-bottom: 1px solid var(--adm-border);
}

.adm-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--adm-border);
    vertical-align: middle;
}

.adm-table tbody tr:hover {
    background: #f8fafc;
}

/* Status Pill */
.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.status-active {
    background: #d1fae5;
    color: #065f46;
}

.status-inactive {
    background: #f1f5f9;
    color: #64748b;
}

.status-unread {
    background: #fef3c7;
    color: #92400e;
    font-weight: 700;
}

/* Tabs */
.adm-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--adm-border);
    margin-bottom: 24px;
    overflow-x: auto;
}

.adm-tab-btn {
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    color: var(--adm-text-muted);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.adm-tab-btn:hover {
    color: var(--adm-primary);
}

.adm-tab-btn.active {
    color: var(--adm-primary);
    border-bottom-color: var(--adm-primary);
}

.adm-tab-content {
    display: none;
}

.adm-tab-content.active {
    display: block;
    animation: fadeIn 0.2s ease;
}

/* Login Page Styling */
.login-body {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: #ffffff;
    width: 100%;
    max-width: 420px;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, var(--adm-primary), var(--adm-primary-dark));
    color: #ffffff;
    padding: 32px 24px;
    text-align: center;
}

.login-header .logo-badge {
    font-size: 36px;
    margin-bottom: 10px;
    display: inline-block;
}

.login-header h1 {
    font-size: 20px;
    font-weight: 800;
}

.login-header p {
    font-size: 13px;
    opacity: 0.85;
    margin-top: 4px;
}

.login-body-content {
    padding: 32px 24px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 900px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }
    .admin-sidebar.open {
        transform: translateX(0);
    }
    .admin-main {
        margin-left: 0;
    }
    .mobile-nav-toggle {
        display: block;
    }
    .admin-content {
        padding: 20px 16px;
    }
}
