/* =============================================
   CareerBridge - Admin Panel Stylesheet
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@700;800&family=DM+Sans:wght@400;500;600&display=swap');

:root {
    --primary: #0f172a;
    --secondary: #1e293b;
    --accent: #f97316;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --sidebar-width: 260px;
    --topbar-height: 64px;
    --border: #e2e8f0;
    --text: #334155;
    --text-light: #64748b;
    --bg: #f1f5f9;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'DM Sans', sans-serif; background: var(--bg); color: var(--text); }
a { text-decoration: none; color: inherit; }

/* ---- SIDEBAR ---- */
.sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: var(--sidebar-width);
    background: var(--primary);
    z-index: 100;
    overflow-y: auto;
    transition: transform 0.3s;
}

.sidebar-logo {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex; align-items: center; gap: 10px;
    font-family: 'Syne', sans-serif; font-size: 18px; font-weight: 800; color: white;
}
.sidebar-logo span { color: var(--accent); }
.sidebar-logo .logo-icon { background: var(--accent); width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 16px; }

.sidebar-section { padding: 20px 16px 8px; }
.sidebar-label { font-size: 10px; text-transform: uppercase; letter-spacing: 2px; color: rgba(255,255,255,0.35); font-weight: 700; margin-bottom: 8px; padding: 0 8px; }

.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: rgba(255,255,255,0.7);
    font-size: 14px; font-weight: 500;
    transition: all 0.2s;
    margin-bottom: 2px;
}
.nav-item:hover { background: rgba(255,255,255,0.08); color: white; }
.nav-item.active { background: var(--accent); color: white; }
.nav-item .icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
.nav-badge { margin-left: auto; background: var(--danger); color: white; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 100px; }

/* ---- TOPBAR ---- */
.topbar {
    position: fixed; top: 0; left: var(--sidebar-width); right: 0;
    height: var(--topbar-height);
    background: white; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 28px; z-index: 99;
    box-shadow: 0 1px 8px rgba(0,0,0,0.05);
}

.topbar-left h2 { font-size: 18px; font-weight: 700; color: var(--primary); }
.topbar-left p { font-size: 12px; color: var(--text-light); }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.admin-user { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.admin-avatar { width: 36px; height: 36px; background: var(--accent); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; color: white; font-size: 14px; }

/* ---- MAIN CONTENT ---- */
.main-content {
    margin-left: var(--sidebar-width);
    padding-top: var(--topbar-height);
    min-height: 100vh;
}

.page-content { padding: 28px; }

/* ---- STAT CARDS ---- */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 28px; }

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--border);
    display: flex; align-items: center; gap: 16px;
    transition: all 0.3s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.stat-icon { width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.stat-icon.orange { background: rgba(249,115,22,0.12); }
.stat-icon.blue { background: rgba(59,130,246,0.12); }
.stat-icon.green { background: rgba(34,197,94,0.12); }
.stat-icon.purple { background: rgba(168,85,247,0.12); }
.stat-icon.red { background: rgba(239,68,68,0.12); }
.stat-num { font-family: 'Syne', sans-serif; font-size: 28px; font-weight: 800; color: var(--primary); }
.stat-label { font-size: 13px; color: var(--text-light); }

/* ---- TABLE ---- */
.admin-card { background: white; border-radius: 12px; border: 1px solid var(--border); overflow: hidden; margin-bottom: 24px; }
.admin-card-header { padding: 18px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.admin-card-header h3 { font-size: 16px; font-weight: 700; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead { background: var(--bg); }
th { padding: 12px 16px; text-align: left; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-light); border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 14px 16px; font-size: 14px; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafbfc; }

/* ---- BADGES ---- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 100px; font-size: 11px; font-weight: 700; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-orange { background: rgba(249,115,22,0.1); color: var(--accent); }
.badge-gray { background: #f1f5f9; color: var(--text-light); }

/* ---- BUTTONS ---- */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 20px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; border: none; font-family: 'DM Sans', sans-serif; transition: all 0.2s; text-decoration: none; }
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: #ea6c10; }
.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-info { background: var(--info); color: white; }
.btn-dark { background: var(--primary); color: white; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { background: var(--bg); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-xs { padding: 4px 8px; font-size: 11px; border-radius: 5px; }

/* ---- FORMS ---- */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--primary); margin-bottom: 6px; }
.form-control { width: 100%; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: 8px; font-size: 14px; font-family: 'DM Sans', sans-serif; color: var(--text); background: white; transition: all 0.2s; outline: none; }
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(249,115,22,0.1); }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* ---- ALERTS ---- */
.alert { padding: 12px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-danger { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info { background: #dbeafe; color: #1e40af; }

/* ---- PAGINATION ---- */
.pagination { display: flex; gap: 6px; align-items: center; margin-top: 16px; }
.pag-btn { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer; text-decoration: none; transition: all 0.2s; }
.pag-btn:hover, .pag-btn.active { background: var(--accent); color: white; border-color: var(--accent); }

/* ---- MODAL ---- */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal { background: white; border-radius: 16px; width: 100%; max-width: 640px; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.2); }
.modal-header { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; background: white; z-index: 1; }
.modal-header h3 { font-size: 18px; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--text-light); padding: 4px 8px; }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

/* ---- SEARCH ---- */
.search-box { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }

/* ---- STATUS ACTIONS ---- */
.action-btns { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---- LOGIN PAGE ---- */
.login-page { min-height: 100vh; background: var(--primary); display: flex; align-items: center; justify-content: center; position: relative; }
.login-page::before { content: ''; position: absolute; top: -20%; right: -5%; width: 400px; height: 400px; background: radial-gradient(circle, rgba(249,115,22,0.15) 0%, transparent 70%); pointer-events: none; }
.login-card { background: white; border-radius: 20px; padding: 48px 40px; width: 100%; max-width: 420px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); position: relative; z-index: 1; }
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo .icon { font-size: 48px; }
.login-logo h2 { font-family: 'Syne', sans-serif; font-size: 24px; font-weight: 800; margin-top: 8px; }
.login-logo p { font-size: 13px; color: var(--text-light); margin-top: 4px; }

/* EDITOR */
.rich-editor { border: 1.5px solid var(--border); border-radius: 8px; overflow: hidden; }
.editor-toolbar { background: var(--bg); padding: 8px 12px; border-bottom: 1px solid var(--border); display: flex; gap: 4px; flex-wrap: wrap; }
.editor-toolbar button { background: white; border: 1px solid var(--border); border-radius: 4px; padding: 4px 8px; font-size: 13px; cursor: pointer; }
.editor-toolbar button:hover { background: var(--accent); color: white; border-color: var(--accent); }
.editor-content { padding: 12px; min-height: 200px; outline: none; font-size: 14px; line-height: 1.7; }

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: none; }
    .main-content { margin-left: 0; }
    .topbar { left: 0; }
    .form-row, .form-row-3 { grid-template-columns: 1fr; }
}
