/* ============================================
   CareerKraft - Admin Panel (Professional)
   ============================================ */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #60a5fa;
    --primary-rgb: 37, 99, 235;
    --secondary: #7c3aed;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --dark: #0f172a;
    --dark-2: #1e293b;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --white: #ffffff;
    --radius-sm: 8px;
    --radius: 12px;
    --radius-md: 16px;
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 24px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.15);
    --transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
    --font-heading: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Inter', sans-serif;
    --gradient-primary: linear-gradient(135deg, #2563eb, #7c3aed);
    --sidebar-width: 264px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: var(--font-body);
    background: var(--gray-50);
    color: var(--gray-600);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); color: var(--gray-900); }
a { text-decoration: none; color: var(--primary); transition: var(--transition); }
a:hover { color: var(--primary-dark); }
button { font-family: inherit; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* ============ LOGIN PAGE ============ */
.login-page {
    background: var(--dark);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}
.login-page::before, .login-page::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    filter: blur(80px);
}
.login-page::before { top: -100px; right: -100px; background: rgba(37,99,235,0.3); }
.login-page::after { bottom: -100px; left: -100px; background: rgba(124,58,237,0.25); }
.login-container { width: 100%; max-width: 430px; position: relative; z-index: 2; }
.login-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 44px;
    box-shadow: var(--shadow-xl);
    animation: loginFade 0.5s ease-out;
}
@keyframes loginFade { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.login-header { text-align: center; margin-bottom: 32px; }
.login-logo {
    width: 68px;
    height: 68px;
    background: var(--gradient-primary);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    font-size: 30px;
    color: white;
    box-shadow: 0 8px 24px rgba(37,99,235,0.35);
}
.login-header h1 { font-size: 24px; color: var(--gray-900); font-weight: 800; }
.login-header p { color: var(--gray-400); font-size: 14px; margin-top: 4px; }
.login-form .form-group { margin-bottom: 20px; }
.login-form label { display: block; font-size: 13px; font-weight: 600; color: var(--gray-700); margin-bottom: 7px; }
.login-form label i { color: var(--primary); margin-right: 6px; }
.password-input { position: relative; }
.password-input input { padding-right: 46px; }
.toggle-password {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-400);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}
.toggle-password:hover { color: var(--primary); background: var(--gray-50); }
.login-footer { text-align: center; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--gray-100); }
.login-footer a { color: var(--gray-400); font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.login-footer a:hover { color: var(--primary); }

/* ============ ALERTS ============ */
.alert {
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: alertIn 0.3s ease-out;
    gap: 12px;
}
@keyframes alertIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #6ee7b7; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-info { background: #eff6ff; color: #1e40af; border: 1px solid #93c5fd; }
.alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fcd34d; }
.alert-dismissible { position: relative; }
.alert-close { background: none; border: none; cursor: pointer; font-size: 16px; opacity: 0.6; color: inherit; flex-shrink: 0; }
.alert-close:hover { opacity: 1; }

/* ============ ADMIN LAYOUT ============ */
.admin-layout { display: flex; min-height: 100vh; }

/* ============ SIDEBAR ============ */
.sidebar {
    width: var(--sidebar-width);
    background: var(--dark);
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 200;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    overflow-y: auto;
    overflow-x: hidden;
}
.sidebar-header {
    padding: 22px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-size: 17px;
    font-weight: 800;
    font-family: var(--font-heading);
}
.sidebar-logo i {
    background: var(--gradient-primary);
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    box-shadow: 0 4px 12px rgba(37,99,235,0.4);
}
.sidebar-close { display: none; background: none; border: none; color: white; font-size: 20px; cursor: pointer; padding: 4px; }
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-avatar {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: white;
    flex-shrink: 0;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name { display: block; color: white; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { font-size: 11px; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.5px; }
.sidebar-nav { padding: 16px 12px; flex: 1; }
.nav-section-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.3);
    padding: 12px 12px 8px;
    font-family: var(--font-heading);
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    font-weight: 500;
    border-radius: 10px;
    margin-bottom: 2px;
    transition: var(--transition);
    position: relative;
}
.nav-item i { width: 20px; text-align: center; font-size: 15px; }
.nav-item .nav-badge {
    margin-left: auto;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 50px;
    min-width: 20px;
    text-align: center;
}
.nav-item:hover {
    background: rgba(255,255,255,0.06);
    color: white;
    transform: translateX(3px);
}
.nav-item.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(37,99,235,0.4);
}
.nav-item.active:hover { transform: none; }
.nav-divider { height: 1px; background: rgba(255,255,255,0.08); margin: 12px 8px; }
.nav-item.logout { color: #fca5a5; }
.nav-item.logout:hover { background: rgba(239,68,68,0.15); color: #fecaca; }
.sidebar-footer { padding: 16px; border-top: 1px solid rgba(255,255,255,0.08); }
.sidebar-footer-text { font-size: 11px; color: rgba(255,255,255,0.3); text-align: center; }

/* ============ ADMIN MAIN ============ */
.admin-main { flex: 1; margin-left: var(--sidebar-width); min-height: 100vh; display: flex; flex-direction: column; }

/* Header */
.admin-header {
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(16px);
    padding: 0 28px;
    height: 68px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--gray-100);
}
.sidebar-toggle {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--gray-500);
    cursor: pointer;
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
}
.sidebar-toggle:hover { background: var(--gray-100); color: var(--gray-700); }
.admin-header-right { display: flex; align-items: center; gap: 16px; }
.header-search {
    position: relative;
}
.header-search input {
    padding: 10px 16px 10px 40px;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 13px;
    outline: none;
    width: 240px;
    background: var(--gray-50);
    transition: var(--transition);
}
.header-search input:focus { border-color: var(--primary); width: 300px; background: white; box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.1); }
.header-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 14px;
}
.header-notif {
    position: relative;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--gray-100);
    border-radius: 10px;
    color: var(--gray-500);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: var(--transition);
}
.header-notif:hover { background: var(--primary); color: white; }
.notif-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid white;
}
.admin-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}
.admin-user:hover { background: var(--gray-50); border-color: var(--gray-100); }
.admin-user-icon {
    width: 36px;
    height: 36px;
    background: var(--gradient-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 14px;
}
.admin-user-info { line-height: 1.2; }
.admin-user-name { display: block; font-size: 13px; font-weight: 600; color: var(--gray-800); }
.admin-user-role { font-size: 11px; color: var(--gray-400); }
.admin-user .fa-chevron-down { font-size: 10px; color: var(--gray-400); }

/* Content */
.admin-content { padding: 28px; flex: 1; }
.page-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
}
.page-title i { color: var(--primary); }
.page-subtitle { color: var(--gray-400); font-size: 14px; margin-bottom: 24px; }
.page-header-admin {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 16px;
}

/* ============ BUTTONS ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-body);
    text-decoration: none;
    white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-sm { padding: 7px 14px; font-size: 12px; border-radius: 8px; }
.btn-lg { padding: 13px 28px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white !important;
    box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.4); filter: brightness(1.05); }
.btn-outline { background: transparent !important; border: 2px solid var(--gray-200); color: var(--gray-600); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary) !important; background: rgba(var(--primary-rgb), 0.05) !important; }
.btn-success { background: var(--success); color: white !important; }
.btn-success:hover { background: #059669; }
.btn-danger { background: var(--danger); color: white !important; }
.btn-danger:hover { background: #dc2626; }
.btn-warning { background: var(--warning); color: white !important; }
.btn-info { background: var(--info); color: white !important; }
.btn-edit { background: #eff6ff; color: #1d4ed8; }
.btn-edit:hover { background: var(--info); color: white; }
.btn-view { background: var(--gray-100); color: var(--gray-600); }
.btn-view:hover { background: var(--gray-300); color: var(--gray-800); }
.btn-delete { background: #fef2f2; color: #dc2626; }
.btn-delete:hover { background: #fee2e2; color: #b91c1c; }

/* ============ STATS GRID ============ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}
.stat-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    gap: 18px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--stat-color, var(--primary));
    border-radius: 0 4px 4px 0;
}
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.stat-icon {
    width: 56px;
    height: 56px;
    background: rgba(var(--stat-rgb, 37,99,235), 0.1);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: rgb(var(--stat-rgb, 37,99,235));
    flex-shrink: 0;
}
.stat-info { flex: 1; }
.stat-number { font-size: 28px; font-weight: 800; color: var(--gray-900); line-height: 1.1; display: block; font-family: var(--font-heading); }
.stat-label { font-size: 13px; color: var(--gray-500); font-weight: 500; margin-top: 2px; }
.stat-badge {
    font-size: 11px;
    font-weight: 700;
    color: var(--success);
    background: #ecfdf5;
    padding: 3px 10px;
    border-radius: 50px;
    white-space: nowrap;
    margin-top: 6px;
    display: inline-block;
}
.stat-badge.warning { color: #b45309; background: #fffbeb; }
.stat-badge.danger { color: #b91c1c; background: #fef2f2; }
.stat-card.blue { --stat-color: var(--info); --stat-rgb: 59, 130, 246; }
.stat-card.green { --stat-color: var(--success); --stat-rgb: 16, 185, 129; }
.stat-card.orange { --stat-color: var(--warning); --stat-rgb: 245, 158, 11; }
.stat-card.purple { --stat-color: var(--secondary); --stat-rgb: 124, 58, 237; }
.stat-card.teal { --stat-color: #14b8a6; --stat-rgb: 20, 184, 166; }
.stat-card.red { --stat-color: var(--danger); --stat-rgb: 239, 68, 68; }
.stat-card.dark { --stat-color: var(--gray-800); --stat-rgb: 30, 41, 59; }

/* ============ QUICK ACTIONS ============ */
.quick-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.quick-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--gray-600);
    text-decoration: none;
    transition: var(--transition);
    box-shadow: var(--shadow-xs);
}
.quick-action-btn i { color: var(--primary); font-size: 16px; }
.quick-action-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.05);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.quick-action-btn.danger i { color: var(--danger); }
.quick-action-btn.danger:hover { border-color: var(--danger); color: var(--danger); background: #fef2f2; }

/* ============ TABLE CARDS ============ */
.tables-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.table-card {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
    overflow: hidden;
    margin-bottom: 24px;
}
.table-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid var(--gray-100);
}
.table-card-header h3 {
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
}
.table-card-header h3 i { color: var(--primary); }
.view-all { font-size: 13px; font-weight: 600; color: var(--primary); }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
    text-align: left;
    padding: 13px 16px;
    font-size: 11px;
    font-weight: 700;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-100);
    white-space: nowrap;
}
.data-table td {
    padding: 13px 16px;
    font-size: 13.5px;
    border-bottom: 1px solid var(--gray-50);
    vertical-align: middle;
}
.data-table tbody tr { transition: var(--transition); }
.data-table tbody tr:hover { background: var(--gray-50); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table a { color: var(--gray-700); font-weight: 500; }
.data-table a:hover { color: var(--primary); }
.data-table code { background: var(--gray-100); padding: 2px 8px; border-radius: 6px; font-size: 12px; }
.data-table .actions { white-space: nowrap; }
.data-table .actions .btn { margin-right: 4px; }
.data-table .cell-strong { font-weight: 600; color: var(--gray-800); }

/* ============ STATUS BADGES ============ */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}
.status-published, .status-approved, .status-active { background: #ecfdf5; color: #065f46; }
.status-draft, .status-pending { background: #fffbeb; color: #92400e; }
.status-archived { background: #f1f5f9; color: #475569; }
.status-spam, .status-inactive { background: #fef2f2; color: #991b1b; }

/* ============ FILTER BAR ============ */
.filter-bar {
    background: white;
    padding: 16px 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
    margin-bottom: 24px;
}
.filter-form { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.filter-group input, .filter-group select {
    padding: 9px 14px;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    font-size: 13px;
    font-family: var(--font-body);
    outline: none;
    min-width: 160px;
    background: var(--gray-50);
    transition: var(--transition);
    color: var(--gray-600);
}
.filter-group input:focus, .filter-group select:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.1);
}

/* ============ FILTER TABS ============ */
.filter-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    background: white;
    padding: 6px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    width: fit-content;
    border: 1px solid var(--gray-100);
    flex-wrap: wrap;
}
.filter-tab {
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-500);
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.filter-tab:hover { color: var(--gray-800); background: var(--gray-50); }
.filter-tab.active { background: var(--gradient-primary); color: white; box-shadow: var(--shadow-primary); }
.filter-tab span { font-size: 11px; opacity: 0.7; background: rgba(255,255,255,0.2); padding: 0 6px; border-radius: 50px; }
.filter-tab:not(.active) span { background: var(--gray-100); color: var(--gray-500); }

/* ============ BULK ACTIONS ============ */
.bulk-actions { display: flex; gap: 8px; align-items: center; }
.bulk-select {
    padding: 7px 12px;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    font-size: 13px;
    font-family: var(--font-body);
    outline: none;
    color: var(--gray-600);
}
.bulk-select:focus { border-color: var(--primary); }

/* ============ FORM LAYOUT ============ */
.form-layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: flex-start; }
.form-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
    margin-bottom: 24px;
}
.form-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--gray-100);
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
}
.form-card-title i { color: var(--primary); }

.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--gray-700); margin-bottom: 7px; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 11px 14px;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--gray-700);
    outline: none;
    transition: var(--transition);
    background: var(--gray-50);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.1);
}
.form-group textarea { resize: vertical; min-height: 120px; background: white; }
.form-group select { background: white; cursor: pointer; }
.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500 !important;
    color: var(--gray-600) !important;
    padding: 8px;
    border-radius: 8px;
    transition: var(--transition);
    background: var(--gray-50);
}
.checkbox-label:hover { background: rgba(var(--primary-rgb), 0.06); }
.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}
.help-text { font-size: 12px; color: var(--gray-400); margin-top: 6px; }

/* Image Upload */
.image-upload { text-align: center; }
.current-image { margin-bottom: 14px; }
.current-image img {
    max-width: 100%;
    max-height: 220px;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    margin: 0 auto;
    box-shadow: var(--shadow-sm);
}
.file-input {
    width: 100%;
    padding: 16px;
    border: 2px dashed var(--gray-300);
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    color: var(--gray-500);
    transition: var(--transition);
    background: var(--gray-50);
}
.file-input:hover { border-color: var(--primary); background: rgba(var(--primary-rgb), 0.04); }

/* ============ NO RESULTS ============ */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-400);
}
.no-results i { font-size: 48px; margin-bottom: 16px; display: block; }
.no-results p { font-size: 16px; font-weight: 500; }

/* ============ STATS INLINE ============ */
.stats-inline { display: flex; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.stat-mini {
    background: white;
    padding: 16px 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
    font-size: 14px;
    color: var(--gray-500);
}
.stat-mini-number { font-weight: 800; color: var(--gray-900); margin-right: 4px; font-size: 20px; font-family: var(--font-heading); }

/* ============ UNREAD ROW ============ */
.unread-row { background: rgba(var(--primary-rgb), 0.04) !important; }
.unread-row td:first-child { font-weight: 700; }

/* ============ MODAL ============ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15,23,42,0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.modal.active { display: flex; }
.modal-content {
    background: white;
    border-radius: var(--radius-md);
    width: 90%;
    max-width: 620px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: modalIn 0.3s ease-out;
}
@keyframes modalIn { from { opacity: 0; transform: scale(0.95) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-100);
}
.modal-header h3 { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.modal-header h3 i { color: var(--primary); }
.modal-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--gray-400);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.modal-close:hover { background: var(--gray-100); color: var(--gray-800); }
.modal-body { padding: 24px; }
.message-detail p { margin-bottom: 10px; font-size: 14px; }
.message-detail strong { color: var(--gray-700); }
.message-detail hr { margin: 18px 0; border: none; border-top: 1px solid var(--gray-100); }
.message-detail .message-content {
    background: var(--gray-50);
    padding: 16px;
    border-radius: 10px;
    line-height: 1.7;
    font-size: 14px;
    color: var(--gray-700);
}

/* ============ PAGINATION ============ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
}
.page-link {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 2px solid var(--gray-200);
    color: var(--gray-600);
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    transition: var(--transition);
}
.page-link:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }
.page-link.active { background: var(--gradient-primary); color: white; border-color: transparent; box-shadow: var(--shadow-primary); }

/* ============ EDIT FORM PUBLISH BOX ============ */
.publish-box {
    background: white;
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
    position: sticky;
    top: 88px;
}
.publish-box-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gray-100);
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
}
.publish-box-title i { color: var(--primary); }
.publish-actions { display: flex; flex-direction: column; gap: 8px; }

/* ============ DASHBOARD WELCOME ============ */
.dashboard-welcome {
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    padding: 28px 32px;
    color: white;
    margin-bottom: 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(37,99,235,0.3);
}
.dashboard-welcome::before {
    content: '';
    position: absolute;
    right: -40px;
    top: -40px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
}
.dashboard-welcome::after {
    content: '';
    position: absolute;
    right: 40px;
    bottom: -60px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
}
.welcome-content, .welcome-actions { position: relative; z-index: 2; }
.welcome-content h2 { color: white; font-size: 22px; font-weight: 800; margin-bottom: 6px; font-family: var(--font-heading); }
.welcome-content p { color: rgba(255,255,255,0.8); font-size: 14px; }
.welcome-content .welcome-date { font-size: 12px; color: rgba(255,255,255,0.6); display: block; margin-top: 4px; text-transform: uppercase; letter-spacing: 1px; }
.welcome-actions .btn { background: white; color: var(--primary); }

/* ============ DASHBOARD CHART ============ */
.chart-bars { display: flex; align-items: flex-end; gap: 12px; height: 200px; padding: 0 10px; }
.chart-bar-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.chart-bar-value { font-size: 12px; font-weight: 700; color: #94a3b8; }
.chart-bar-value.hot { color: #2563eb; }
.chart-bar {
    width: 100%;
    max-width: 44px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    border-radius: 8px 8px 0 0;
    transition: all 0.3s;
    min-height: 4px;
}
.chart-bar.empty { background: #e2e8f0; }
.chart-bar-label { font-size: 11px; color: #94a3b8; font-weight: 600; }
/* ============ TOP POSTS ============ */
.top-post-row { margin-bottom: 18px; }
.top-post-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.top-post-title { font-size: 13px; font-weight: 600; color: #334155; max-width: 70%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-post-title a { color: #334155; }
.top-post-title a:hover { color: var(--primary); }
.top-post-views { font-size: 12px; font-weight: 700; color: #2563eb; }
.top-post-track { background: #f1f5f9; border-radius: 50px; height: 8px; overflow: hidden; }
.top-post-fill { height: 100%; background: linear-gradient(135deg, #2563eb, #7c3aed); border-radius: 50px; transition: width 0.5s; }

/* ============ POSTS TABLE ============ */
.thumb-img { width: 72px; height: 48px; object-fit: cover; border-radius: 8px; border: 1px solid var(--gray-100); display: block; }
.thumb-cover {
    width: 72px; height: 48px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 16px; border: 1px solid rgba(255,255,255,0.2);
}
.featured-tag { margin-left: 6px; font-size: 11px; background: #fff7ed; color: #ea580c; padding: 2px 8px; border-radius: 50px; font-weight: 600; }
.cat-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: #475569; }
.cat-pill i { color: #2563eb; font-size: 12px; }

/* ============ CATEGORIES TABLE ============ */
.cat-icon-tile {
    width: 36px; height: 36px; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
}
input[type="color"].cat-color-input { width: 44px; height: 44px; padding: 4px; border: 1px solid var(--gray-200); border-radius: 8px; background: white; cursor: pointer; }

/* ============ RESPONSIVE ============ */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
@media (max-width: 1200px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1024px) {
    .tables-row { grid-template-columns: 1fr; }
    .form-layout { grid-template-columns: 1fr; }
    .publish-box { position: static; }
}
@media (max-width: 768px) {
    .sidebar { left: calc(-1 * var(--sidebar-width)); }
    .sidebar.active { left: 0; box-shadow: var(--shadow-xl); }
    .sidebar-close { display: block; }
    .sidebar-toggle { display: flex; }
    .admin-main { margin-left: 0; }
    .header-search { display: none; }
    .stats-grid { grid-template-columns: 1fr; }
    .filter-form { flex-direction: column; }
    .filter-group input, .filter-group select { min-width: auto; width: 100%; }
    .admin-content { padding: 16px; }
    .dashboard-welcome { flex-direction: column; gap: 16px; text-align: left; align-items: flex-start; padding: 24px 20px; }
    .admin-user-info, .admin-user .fa-chevron-down { display: none; }
    .card-header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .card-header .btn { width: 100%; justify-content: center; }
    .pagination { justify-content: center; flex-wrap: wrap; }
    .chart-bars { gap: 6px; padding: 0 4px; height: 160px; }
    .top-post-title { max-width: 60%; }
}
@media (max-width: 480px) {
    .admin-content { padding: 12px; }
    .admin-header { padding: 0 14px; }
    .card-body { padding: 14px; }
    .login-card { padding: 24px 18px; }
}

