/* ============================================================
   Skilluence Portal — Main Stylesheet
   ============================================================ */

:root {
    --sidebar-bg:               #1a2332;
    --sidebar-item-hover:       rgba(255,255,255,0.07);
    --sidebar-item-active:      #2563eb;
    --sidebar-text:             #94a3b8;
    --sidebar-border:           rgba(255,255,255,0.08);
    --sidebar-w-collapsed:      64px;
    --sidebar-w-expanded:       240px;

    --main-bg:                  #f1f5f9;
    --card-bg:                  #ffffff;
    --header-bg:                #ffffff;
    --header-border:            #e2e8f0;
    --border-color:             #e2e8f0;
    --text-primary:             #1e293b;
    --text-secondary:           #64748b;
    --text-muted:               #94a3b8;

    --blue:                     #2563eb;
    --blue-hover:               #1d4ed8;
    --blue-light:               #eff6ff;
    --blue-text:                #2563eb;
    --green-light:              #f0fdf4;
    --green-text:               #16a34a;
    --orange-light:             #fff7ed;
    --orange-text:              #ea580c;
    --purple-light:             #faf5ff;
    --purple-text:              #9333ea;
    --red-light:                #fef2f2;
    --red-text:                 #dc2626;
    --yellow-light:             #fffbeb;
    --yellow-text:              #d97706;

    --input-bg:                 #ffffff;
    --input-border:             #cbd5e1;
    --input-focus:              #2563eb;
    --transition:               0.28s ease;
    --radius:                   10px;
    --radius-sm:                7px;
}

[data-theme="dark"] {
    --main-bg:                  #0f172a;
    --card-bg:                  #1e293b;
    --header-bg:                #1e293b;
    --header-border:            #334155;
    --border-color:             #334155;
    --text-primary:             #f1f5f9;
    --text-secondary:           #94a3b8;
    --text-muted:               #64748b;
    --blue-light:               #1e3a5f;
    --blue-text:                #60a5fa;
    --green-light:              #052e16;
    --green-text:               #4ade80;
    --orange-light:             #431407;
    --orange-text:              #fb923c;
    --purple-light:             #2e1065;
    --purple-text:              #c084fc;
    --red-light:                #450a0a;
    --red-text:                 #f87171;
    --yellow-light:             #422006;
    --yellow-text:              #fbbf24;
    --input-bg:                 #0f172a;
    --input-border:             #334155;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--main-bg);
    color: var(--text-primary);
    transition: background var(--transition), color var(--transition);
    min-height: 100vh;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

.brand-logo-rect { display: inline-flex; align-items: center; line-height: 0; }
.brand-logo-rect img { display: block; width: 100%; height: auto; object-fit: contain; }
.brand-logo-rect .logo-dark { display: none; }
[data-theme="dark"] .brand-logo-rect .logo-light { display: none; }
[data-theme="dark"] .brand-logo-rect .logo-dark { display: block; }

/* ============================================================ SIDEBAR ============================================================ */
.sidebar {
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    width: var(--sidebar-w-collapsed);
    background: var(--sidebar-bg);
    z-index: 1000;
    overflow: hidden;
    transition: width var(--transition);
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 12px rgba(0,0,0,0.18);
}
.sidebar:not(.locked):hover { width: var(--sidebar-w-expanded); }
.sidebar.locked              { width: var(--sidebar-w-expanded); }

.sidebar-header {
    display: flex;
    align-items: center;
    padding: 0 14px;
    height: 64px;
    border-bottom: 1px solid var(--sidebar-border);
    min-width: var(--sidebar-w-expanded);
    flex-shrink: 0;
    gap: 10px;
}
.sidebar-logo {
    display: flex; align-items: center; gap: 10px;
    flex: 1; overflow: hidden; text-decoration: none; min-width: 0;
}
.sidebar-logo img { width: 36px; height: 36px; border-radius: 8px; flex-shrink: 0; object-fit: contain; }
.sidebar-logo-text {
    font-size: 15px; font-weight: 700; color: #ffffff;
    white-space: nowrap; opacity: 0; transition: opacity var(--transition); overflow: hidden;
}
.sidebar:hover .sidebar-logo-text,
.sidebar.locked .sidebar-logo-text { opacity: 1; }

.sidebar-toggle {
    width: 28px; height: 28px; border-radius: 6px; border: none;
    background: rgba(255,255,255,0.1); color: var(--sidebar-text);
    display: flex; align-items: center; justify-content: center; font-size: 14px;
    flex-shrink: 0; opacity: 0;
    transition: opacity var(--transition), background var(--transition), color var(--transition);
}
.sidebar:hover .sidebar-toggle,
.sidebar.locked .sidebar-toggle { opacity: 1; }
.sidebar-toggle:hover { background: rgba(255,255,255,0.2); color: #fff; }

.sidebar-toggle .icon-unlock { display: inline-block; }
.sidebar-toggle .icon-lock   { display: none; }
.sidebar.locked .sidebar-toggle .icon-unlock { display: none; }
.sidebar.locked .sidebar-toggle .icon-lock   { display: inline-block; }

.sidebar-nav {
    flex: 1; overflow-y: auto; overflow-x: hidden;
    padding: 10px 0; min-width: var(--sidebar-w-expanded);
}
.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }

.nav-section-label {
    font-size: 10px; font-weight: 600; letter-spacing: 0.08em;
    text-transform: uppercase; color: rgba(255,255,255,0.3);
    padding: 12px 20px 4px; white-space: nowrap;
    opacity: 0; transition: opacity var(--transition);
}
.sidebar:hover .nav-section-label,
.sidebar.locked .nav-section-label { opacity: 1; }

.nav-item {
    display: flex; align-items: center; padding: 0 8px;
    margin: 2px 8px; height: 42px; border-radius: var(--radius-sm);
    color: var(--sidebar-text); gap: 12px; white-space: nowrap;
    transition: background var(--transition), color var(--transition);
    min-width: var(--sidebar-w-expanded);
}
.nav-item:hover  { background: var(--sidebar-item-hover); color: #ffffff; }
.nav-item.active { background: var(--sidebar-item-active); color: #ffffff; }
.nav-item i { font-size: 17px; flex-shrink: 0; width: 20px; text-align: center; }
.nav-text {
    font-size: 13px; font-weight: 500;
    opacity: 0; transition: opacity var(--transition); overflow: hidden;
}
.sidebar:hover .nav-text,
.sidebar.locked .nav-text { opacity: 1; }

.sidebar-footer {
    border-top: 1px solid var(--sidebar-border);
    padding: 10px 8px; min-width: var(--sidebar-w-expanded); flex-shrink: 0;
}
.sidebar-user {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 8px; border-radius: var(--radius-sm);
    transition: background var(--transition);
}
.sidebar-user:hover { background: var(--sidebar-item-hover); }
.user-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--sidebar-item-active); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700; flex-shrink: 0; text-transform: uppercase;
}
.user-info { flex: 1; min-width: 0; opacity: 0; transition: opacity var(--transition); }
.sidebar:hover .user-info,
.sidebar.locked .user-info { opacity: 1; }
.user-name  { font-size: 12.5px; font-weight: 600; color: #ffffff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-email { font-size: 11px; color: var(--sidebar-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.user-settings-btn {
    width: 28px; height: 28px; border-radius: 6px; border: none;
    background: transparent; color: var(--sidebar-text);
    display: flex; align-items: center; justify-content: center; font-size: 15px;
    opacity: 0; transition: opacity var(--transition), background var(--transition), color var(--transition);
    flex-shrink: 0;
}
.sidebar:hover .user-settings-btn,
.sidebar.locked .user-settings-btn { opacity: 1; }
.user-settings-btn:hover { background: rgba(255,255,255,0.2); color: #fff; }

/* ============================================================ MAIN LAYOUT ============================================================ */
.main-wrapper {
    margin-left: var(--sidebar-w-collapsed);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition);
}
/* When sidebar is locked/pinned — push content right */
.sidebar.locked ~ .main-wrapper { margin-left: var(--sidebar-w-expanded); }

.main-header {
    position: sticky; top: 0; z-index: 999;
    height: 64px; background: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
    padding: 0 20px; display: flex; align-items: center; gap: 12px;
    transition: background var(--transition), border-color var(--transition);
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

/* Hamburger toggle in main header */
.header-sidebar-toggle {
    width: 36px; height: 36px; border-radius: var(--radius-sm);
    border: 1px solid var(--border-color); background: var(--card-bg);
    color: var(--text-secondary); flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 18px;
    transition: all var(--transition);
}
.header-sidebar-toggle:hover { background: var(--main-bg); color: var(--text-primary); border-color: var(--text-muted); }
/* Active/pinned state */
.sidebar.locked ~ .main-wrapper .header-sidebar-toggle {
    background: var(--blue-light); color: var(--blue); border-color: var(--blue);
}
.header-info { flex: 1; min-width: 0; }
.header-title       { font-size: 15px; font-weight: 700; color: var(--text-primary); line-height: 1.2; }
.header-description { font-size: 11.5px; color: var(--text-secondary); margin-top: 2px; }
.header-actions     { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.theme-toggle {
    width: 36px; height: 36px; border-radius: var(--radius-sm);
    border: 1px solid var(--border-color); background: var(--card-bg);
    color: var(--text-secondary);
    display: flex; align-items: center; justify-content: center; font-size: 16px;
    transition: all var(--transition);
}
.theme-toggle:hover { background: var(--main-bg); color: var(--text-primary); }

.icon-sun  { display: none; }
.icon-moon { display: inline-block; }
[data-theme="dark"] .icon-sun  { display: inline-block; }
[data-theme="dark"] .icon-moon { display: none; }

.main-content { flex: 1; padding: 24px; }

/* ============================================================ CARDS ============================================================ */
.card {
    background: var(--card-bg); border-radius: var(--radius);
    border: 1px solid var(--border-color); padding: 20px;
    transition: background var(--transition), border-color var(--transition);
}
.card + .card { margin-top: 16px; }
.card-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border-color);
}
.card-title    { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.card-subtitle { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

.stats-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px; margin-bottom: 24px;
}
.stat-card {
    background: var(--card-bg); border-radius: var(--radius);
    border: 1px solid var(--border-color); padding: 18px 20px;
    display: flex; align-items: flex-start; gap: 14px;
    transition: background var(--transition), border-color var(--transition);
}
.stat-icon {
    width: 44px; height: 44px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; flex-shrink: 0;
}
.stat-icon.blue   { background: var(--blue-light);   color: var(--blue-text); }
.stat-icon.green  { background: var(--green-light);  color: var(--green-text); }
.stat-icon.orange { background: var(--orange-light); color: var(--orange-text); }
.stat-icon.purple { background: var(--purple-light); color: var(--purple-text); }
.stat-value { font-size: 26px; font-weight: 700; color: var(--text-primary); line-height: 1; }
.stat-label { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }

.content-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
@media (max-width: 900px) { .content-grid { grid-template-columns: 1fr; } }

/* ============================================================ TABLES ============================================================ */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-sm); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
    background: var(--main-bg); color: var(--text-secondary);
    font-weight: 600; font-size: 11px; text-transform: uppercase;
    letter-spacing: 0.05em; padding: 10px 16px; text-align: left;
    border-bottom: 1px solid var(--border-color); white-space: nowrap;
}
tbody tr { border-bottom: 1px solid var(--border-color); transition: background var(--transition); }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--main-bg); }
tbody td { padding: 12px 16px; color: var(--text-primary); vertical-align: middle; }

/* ============================================================ FORMS ============================================================ */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 12.5px; font-weight: 500; color: var(--text-primary); margin-bottom: 6px; }
.form-control {
    width: 100%; padding: 9px 12px;
    border-radius: var(--radius-sm); border: 1px solid var(--input-border);
    background: var(--input-bg); color: var(--text-primary); font-size: 13px;
    outline: none; transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}
.form-control:focus { border-color: var(--input-focus); box-shadow: 0 0 0 3px rgba(37,99,235,0.12); }
.form-control::placeholder { color: var(--text-muted); }
.form-control:disabled,.form-control[disabled] {
    background: var(--main-bg); color: var(--text-muted);
    cursor: not-allowed; opacity: 1; border-style: dashed;
}
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 90px; }

.input-with-icon { position: relative; }
.input-with-icon .form-control { padding-right: 40px; }
.input-with-icon .stp-input { padding-right: 40px; }
.input-eye-btn {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: var(--text-muted);
    font-size: 15px; padding: 4px; display: flex; align-items: center;
    transition: color var(--transition);
}
.input-eye-btn:hover { color: var(--text-primary); }

.password-verify-wrap { position: relative; }
.password-verify-tooltip {
    position: absolute; right: 0; top: calc(100% + 8px); z-index: 30;
    width: min(320px, 92vw); padding: 12px;
    border-radius: var(--radius-sm); border: 1px solid var(--border-color);
    background: var(--card-bg); box-shadow: 0 10px 34px rgba(2, 6, 23, 0.2);
    display: none;
}
.password-verify-tooltip.open { display: block; }
.password-verify-title {
    font-size: 12px; font-weight: 600; color: var(--text-primary);
    margin-bottom: 8px;
}
.password-verify-actions {
    margin-top: 8px; display: flex; align-items: center; justify-content: flex-end; gap: 8px;
}
.password-verify-error {
    min-height: 16px; margin-top: 6px; font-size: 11.5px; color: var(--red-text);
}

/* ============================================================ BUTTONS ============================================================ */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: var(--radius-sm); border: none;
    font-size: 13px; font-weight: 500; cursor: pointer;
    transition: all var(--transition); text-decoration: none; white-space: nowrap;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-hover); }
.btn-outline { background: transparent; border: 1px solid var(--border-color); color: var(--text-primary); }
.btn-outline:hover { background: var(--main-bg); }
.btn-danger  { background: var(--red-light); color: var(--red-text); border: 1px solid transparent; }
.btn-danger:hover { background: #fee2e2; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-block { width: 100%; justify-content: center; }

/* ============================================================ BADGES ============================================================ */
.badge {
    display: inline-flex; align-items: center;
    padding: 3px 9px; border-radius: 20px;
    font-size: 11px; font-weight: 500; white-space: nowrap;
}
.badge-primary { background: var(--blue-light);   color: var(--blue-text); }
.badge-success { background: var(--green-light);  color: var(--green-text); }
.badge-warning { background: var(--yellow-light); color: var(--yellow-text); }
.badge-danger  { background: var(--red-light);    color: var(--red-text); }
.badge-info    { background: var(--purple-light); color: var(--purple-text); }
.badge-neutral { background: #f1f5f9; color: #475569; }

/* ============================================================ AUTH PAGE ============================================================ */
.auth-page {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: var(--main-bg); padding: 24px; transition: background var(--transition);
}
.auth-wrap { width: 100%; max-width: 440px; }
.auth-card {
    background: var(--card-bg); border-radius: 16px;
    border: 1px solid var(--border-color); padding: 40px 36px;
    box-shadow: 0 4px 32px rgba(0,0,0,0.08);
    transition: background var(--transition), border-color var(--transition);
}
.auth-logo { display: flex; align-items: center; justify-content: center; margin-bottom: 28px; }
.auth-wordmark { width: min(240px, 100%); }
.auth-logo-name { font-size: 20px; font-weight: 800; color: var(--text-primary); letter-spacing: -0.3px; }

.auth-tabs { display: flex; background: var(--main-bg); border-radius: 9px; padding: 4px; margin-bottom: 24px; gap: 2px; }
.auth-tab {
    flex: 1; padding: 8px; text-align: center; font-size: 13px; font-weight: 500;
    color: var(--text-secondary); border-radius: 6px; border: none;
    background: transparent; transition: all var(--transition);
}
.auth-tab.active { background: var(--card-bg); color: var(--text-primary); box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
.auth-tab:disabled { opacity: 0.5; cursor: not-allowed; }
.auth-form        { display: none; }
.auth-form.active { display: block; }
.auth-submit {
    width: 100%; padding: 11px; background: var(--blue); color: #fff;
    border: none; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600;
    transition: background var(--transition); margin-top: 6px;
}
.auth-submit:hover { background: var(--blue-hover); }

.auth-theme-btn {
    position: fixed; top: 20px; right: 20px;
    width: 38px; height: 38px; border-radius: 50%;
    border: 1px solid var(--border-color); background: var(--card-bg);
    color: var(--text-secondary);
    display: flex; align-items: center; justify-content: center; font-size: 16px;
    transition: all var(--transition); box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.auth-theme-btn:hover { color: var(--text-primary); }

/* ============================================================ IMPORT/EXPORT ============================================================ */
.ie-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 700px) { .ie-grid { grid-template-columns: 1fr; } }

/* New IE layout */
.ie-section-title {
    font-size: 13px; font-weight: 700; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: 0.07em;
    margin-bottom: 14px;
}
.ie-row {
    display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
@media (max-width: 800px) { .ie-row { grid-template-columns: 1fr; } }

.ie-section-header {
    display: flex; align-items: flex-start; gap: 14px;
    margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--border-color);
}
.ie-section-icon {
    width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.ie-icon-down { background: var(--blue-light);   color: var(--blue-text); }
.ie-icon-up   { background: var(--green-light);  color: var(--green-text); }
.ie-section-name { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 2px; }
.ie-section-desc { font-size: 12px; color: var(--text-secondary); }

/* Export link row */
.ie-export-link {
    display: block; border: 1px solid var(--border-color); border-radius: var(--radius-sm);
    padding: 12px 14px; text-decoration: none;
    transition: background var(--transition), border-color var(--transition);
}
.ie-export-link:hover { background: var(--main-bg); border-color: var(--blue); }
.ie-export-link-inner { display: flex; align-items: center; justify-content: space-between; }
.ie-export-link-left  { display: flex; align-items: center; gap: 10px; }
.ie-link-title { font-size: 13px; font-weight: 600; color: var(--blue-text); }
.ie-link-sub   { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

/* Steps */
.ie-step {
    display: flex; gap: 14px; margin-bottom: 18px;
    padding-bottom: 18px; border-bottom: 1px solid var(--border-color);
}
.ie-step:last-of-type { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.ie-step-num {
    width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
    background: var(--blue); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; margin-top: 1px;
}
.ie-step-title { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.ie-step-desc  { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
.ie-step-body  { flex: 1; min-width: 0; }
.ie-file-row   { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Tips box */
.ie-tips {
    background: var(--blue-light); border-radius: var(--radius-sm);
    padding: 12px 14px; margin-top: 18px;
    border: 1px solid rgba(37,99,235,0.12);
}
.ie-tips-title { font-size: 12px; font-weight: 600; color: var(--blue-text); margin-bottom: 6px; }
.ie-tips ul { margin-left: 14px; }
.ie-tips li { font-size: 12px; color: var(--text-secondary); margin-bottom: 3px; line-height: 1.5; }

/* Legacy upload zone (keep for fallback) */
.upload-zone {
    border: 2px dashed var(--border-color); border-radius: var(--radius);
    padding: 36px 24px; text-align: center;
    transition: border-color var(--transition), background var(--transition);
}
.upload-zone:hover { border-color: var(--blue); background: var(--blue-light); }
.upload-zone i { font-size: 32px; color: var(--text-muted); display: block; margin-bottom: 10px; }
.upload-zone p { font-size: 13px; color: var(--text-secondary); }
.upload-zone span { font-size: 11px; color: var(--text-muted); }

/* ============================================================ PROFILE ============================================================ */
.profile-hero {
    display: flex; align-items: center; gap: 20px;
    margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--border-color);
}
.profile-avatar-lg {
    width: 72px; height: 72px; border-radius: 50%;
    background: var(--blue); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; font-weight: 700; flex-shrink: 0; text-transform: uppercase;
}
.profile-name { font-size: 18px; font-weight: 700; color: var(--text-primary); }
.profile-role { font-size: 12.5px; color: var(--text-secondary); margin-top: 3px; }

/* ============================================================ EMPTY STATE ============================================================ */
.page-empty { text-align: center; padding: 48px 24px; color: var(--text-muted); }
.page-empty i { font-size: 36px; display: block; margin-bottom: 10px; }
.page-empty p { font-size: 13px; }

/* ============================================================ UTILITIES ============================================================ */
.d-flex           { display: flex; }
.align-center     { align-items: center; }
.justify-between  { justify-content: space-between; }
.gap-4  { gap: 4px; }
.gap-6  { gap: 6px; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mb-0   { margin-bottom: 0 !important; }
.mb-6   { margin-bottom: 6px; }
.mb-8   { margin-bottom: 8px; }
.mb-14  { margin-bottom: 14px; }
.mb-16  { margin-bottom: 16px; }
.mb-20  { margin-bottom: 20px; }
.mb-24  { margin-bottom: 24px; }
.mt-16  { margin-top: 16px; }
.mt-24  { margin-top: 24px; }
.text-muted  { color: var(--text-muted); }
.text-sm     { font-size: 12px; }
.font-600    { font-weight: 600; }
.w-full      { width: 100%; }

@media (max-width: 768px) {
    .stats-grid { grid-template-columns: 1fr 1fr; }
    /* On mobile sidebar always overlays — never push content */
    .sidebar.locked ~ .main-wrapper { margin-left: var(--sidebar-w-collapsed); }
}
@media (max-width: 480px) { .stats-grid { grid-template-columns: 1fr; } .main-content { padding: 16px; } .auth-card { padding: 28px 20px; } }

/* ============================================================ MODALS ============================================================ */
.modal-overlay {
    position: fixed; inset: 0; z-index: 2000;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(2px);
    display: flex; align-items: center; justify-content: center;
    padding: 16px; opacity: 0; pointer-events: none;
    transition: opacity 0.2s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal {
    background: var(--card-bg); border-radius: var(--radius);
    border: 1px solid var(--border-color);
    width: 100%; max-width: 560px; max-height: 90vh;
    display: flex; flex-direction: column;
    overflow: hidden;
    transform: scale(0.96) translateY(8px);
    transition: transform 0.2s ease, background var(--transition), border-color var(--transition);
    box-shadow: 0 8px 48px rgba(0,0,0,0.18);
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }
.modal-lg { max-width: 760px; }
.modal-sm { max-width: 380px; }
.modal > form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}
.modal-header {
    padding: 16px 20px 14px; border-bottom: 1px solid var(--border-color);
    display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--card-bg);
}
.modal-title { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.modal-close {
    width: 30px; height: 30px; border-radius: 6px; border: none;
    background: transparent; color: var(--text-secondary);
    display: flex; align-items: center; justify-content: center; font-size: 20px; line-height: 1;
    transition: all var(--transition);
}
.modal-close:hover { background: var(--main-bg); color: var(--text-primary); }
.modal-body {
    padding: 20px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
}
.modal-footer {
    padding: 14px 20px; border-top: 1px solid var(--border-color);
    display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-shrink: 0;
    position: sticky;
    bottom: 0;
    z-index: 2;
    background: var(--card-bg);
}

/* ============================================================ PAGINATION ============================================================ */
.pagination-wrap {
    padding: 14px 20px 6px;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    border-top: 1px solid var(--border-color); flex-wrap: wrap;
}
.pagination-info { font-size: 12px; color: var(--text-secondary); }
.pagination { display: flex; gap: 3px; list-style: none; flex-wrap: wrap; }
.pagination li a,
.pagination li span {
    display: flex; align-items: center; justify-content: center;
    min-width: 32px; height: 32px; padding: 0 6px; border-radius: var(--radius-sm);
    font-size: 12.5px; border: 1px solid var(--border-color);
    background: var(--card-bg); color: var(--text-primary);
    transition: all var(--transition); white-space: nowrap;
}
.pagination li a:hover { background: var(--blue-light); border-color: var(--blue); color: var(--blue); }
.pagination li.active span { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 600; }
.pagination li.disabled span { color: var(--text-muted); background: var(--main-bg); cursor: not-allowed; }

/* ============================================================ TOAST ============================================================ */
.toast-container {
    position: fixed; top: 20px; right: 20px; z-index: 9999;
    display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px; border-radius: var(--radius-sm);
    background: var(--card-bg); border: 1px solid var(--border-color);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    font-size: 13px; color: var(--text-primary);
    min-width: 240px; max-width: 360px;
    animation: toastIn 0.3s ease; pointer-events: all;
    transition: opacity 0.4s ease;
}
@keyframes toastIn {
    from { opacity: 0; transform: translateX(28px); }
    to   { opacity: 1; transform: translateX(0); }
}
.toast-success { border-left: 3px solid var(--green-text); }
.toast-error   { border-left: 3px solid var(--red-text); }
.toast-success i { color: var(--green-text); }
.toast-error   i { color: var(--red-text); }

/* ============================================================ PROGRESS BAR ============================================================ */
.progress-wrap { background: var(--border-color); border-radius: 99px; height: 6px; flex: 1; min-width: 60px; }
.progress-bar { height: 6px; border-radius: 99px; background: var(--blue); min-width: 3px; max-width: 100%; }
.progress-bar.green  { background: var(--green-text); }
.progress-bar.orange { background: var(--orange-text); }
.progress-bar.purple { background: var(--purple-text); }

/* ============================================================ AVATAR ============================================================ */
.avatar-sm {
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--blue); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; text-transform: uppercase; flex-shrink: 0;
}
.avatar-row { display: flex; align-items: center; gap: 8px; }
.avatar-name { font-weight: 500; color: var(--text-primary); font-size: 13px; }
.avatar-sub  { font-size: 11px; color: var(--text-secondary); margin-top: 1px; }

/* ============================================================ DELETE MODAL ============================================================ */
.delete-icon {
    width: 52px; height: 52px; border-radius: 50%;
    background: var(--red-light); color: var(--red-text);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; margin: 0 auto 14px;
}

/* ============================================================ ALERT / ERRORS ============================================================ */
.alert {
    padding: 12px 16px; border-radius: var(--radius-sm);
    margin-bottom: 16px; font-size: 13px; display: flex; align-items: flex-start; gap: 10px;
}
.alert-error { background: var(--red-light); color: var(--red-text); border: 1px solid rgba(220,38,38,0.2); }
.alert ul { margin: 6px 0 0 16px; }
.alert li { margin-bottom: 2px; }
.sp-field-error { font-size: 12px; color: var(--red-text); margin-top: 4px; }
.is-invalid { border-color: var(--red-text) !important; box-shadow: 0 0 0 3px rgba(220,38,38,0.12) !important; }

/* ============================================================ ADMIN — HEADER USER CHIP & PROFILE PAGE ============================================================ */
.header-user-chip {
    display: flex; align-items: center; gap: 8px;
    padding: 4px 12px 4px 4px; border-radius: 20px;
    border: 1px solid var(--border-color); background: var(--card-bg);
    transition: all var(--transition); cursor: default;
}
.header-avatar {
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--blue); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; text-transform: uppercase; flex-shrink: 0;
}
.header-user-name { font-size: 12.5px; font-weight: 600; color: var(--text-primary); }

.header-logout-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; border-radius: var(--radius-sm);
    border: 1px solid var(--border-color); background: transparent;
    color: var(--red-text); font-size: 12.5px; font-weight: 500;
    cursor: pointer; font-family: inherit;
    transition: all var(--transition);
}
.header-logout-btn:hover { background: var(--red-light); border-color: rgba(220,38,38,0.3); }

.profile-hero-card {
    display: flex; align-items: center; gap: 20px;
    padding: 24px; background: var(--card-bg);
    border-radius: var(--radius); border: 1px solid var(--border-color);
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    transition: background var(--transition), border-color var(--transition);
}
.profile-avatar-xl {
    width: 72px; height: 72px; border-radius: 50%; flex-shrink: 0;
    background: linear-gradient(135deg, #2563eb, #3b82f6); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; font-weight: 700; text-transform: uppercase;
    box-shadow: 0 4px 16px rgba(37,99,235,0.3);
}
.profile-hero-name  { font-size: 20px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.profile-hero-email { font-size: 13px; color: var(--text-secondary); }

/* ============================================================ STUDENT PORTAL — LAYOUT & SIDEBAR ============================================================ */
.sp-body    { background: #f1f5f9; }
.sp-layout  { display: flex; min-height: 100vh; }

.sp-sidebar {
    width: 260px; flex-shrink: 0;
    background: linear-gradient(180deg, #0f1f3d 0%, #1a3461 55%, #0f1f3d 100%);
    display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
    box-shadow: 3px 0 20px rgba(0,0,0,0.22);
}
.sp-sidebar-header {
    display: flex; align-items: center; gap: 10px;
    padding: 20px 20px 16px; flex-shrink: 0;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}
.sp-sidebar-header img  { width: 34px; height: 34px; border-radius: 8px; object-fit: contain; }
.sp-sidebar-wordmark { width: min(176px, 100%); height: auto !important; border-radius: 0 !important; }
.sp-sidebar-header span { font-size: 16px; font-weight: 700; color: #fff; letter-spacing: -0.3px; }

.sp-profile-block {
    display: flex; flex-direction: column; align-items: center;
    padding: 20px 16px 16px; text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.07); flex-shrink: 0;
}
.sp-avatar-lg {
    width: 56px; height: 56px; border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff;
    font-size: 22px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 10px; box-shadow: 0 4px 14px rgba(37,99,235,0.45);
    text-transform: uppercase;
}
.sp-sidebar-name { font-size: 13.5px; font-weight: 600; color: #fff; margin-bottom: 5px; }
.sp-sidebar-tag  {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 11px; color: rgba(255,255,255,0.5);
}
.sp-status-dot            { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.sp-status-dot.active     { background: #4ade80; }
.sp-status-dot.enrolled   { background: #38bdf8; }
.sp-status-dot.interview  { background: #f59e0b; }
.sp-status-dot.offer      { background: #8b5cf6; }
.sp-status-dot.inactive   { background: #f87171; }
.sp-status-dot.pending    { background: #fbbf24; }
.sp-status-dot.placed     { background: #60a5fa; }
.sp-status-dot.onhold     { background: #94a3b8; }

.sp-nav { flex: 1; padding: 12px 10px; }
.sp-nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: 9px; margin-bottom: 4px;
    color: rgba(255,255,255,0.55); font-size: 13px; font-weight: 500;
    text-decoration: none; transition: all 0.22s ease;
}
.sp-nav-item i { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
.sp-nav-item:hover  { background: rgba(255,255,255,0.08); color: #fff; }
.sp-nav-item.active {
    background: linear-gradient(135deg, rgba(59,130,246,0.65), rgba(37,99,235,0.45));
    color: #fff; box-shadow: 0 2px 10px rgba(37,99,235,0.35);
}

.sp-sidebar-footer { padding: 12px 10px; border-top: 1px solid rgba(255,255,255,0.07); flex-shrink: 0; }
.sp-logout-btn {
    display: flex; align-items: center; gap: 10px;
    width: 100%; padding: 10px 12px; border-radius: 9px;
    border: none; background: rgba(239,68,68,0.1); color: #fca5a5;
    font-size: 13px; font-weight: 500; cursor: pointer; font-family: inherit;
    transition: all 0.22s ease;
}
.sp-logout-btn:hover { background: rgba(239,68,68,0.2); }

/* ── Main Content ── */
.sp-main    { flex: 1; min-width: 0; overflow-x: hidden; background: #f1f5f9; }
.sp-content { padding: 24px; }

/* ============================================================ STUDENT PORTAL — HERO BANNER ============================================================ */
.sp-hero {
    background: linear-gradient(135deg, #1a3461 0%, #2563eb 55%, #3b82f6 100%);
    border-radius: 14px; padding: 24px; margin-bottom: 20px; color: #fff;
    box-shadow: 0 6px 28px rgba(37,99,235,0.28);
}
.sp-hero-top    { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.sp-hero-avatar {
    width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0;
    background: rgba(255,255,255,0.18); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; font-weight: 700; text-transform: uppercase;
    border: 2px solid rgba(255,255,255,0.3);
}
.sp-hero-info       { flex: 1; min-width: 0; }
.sp-hero-greeting   { font-size: 12px; color: rgba(255,255,255,0.65); margin-bottom: 4px; }
.sp-hero-name       { font-size: 21px; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.3px; }
.sp-hero-meta       { display: flex; gap: 14px; flex-wrap: wrap; }
.sp-hero-meta span  { font-size: 12px; color: rgba(255,255,255,0.65); display: flex; align-items: center; gap: 5px; }
.sp-hero-status     { flex-shrink: 0; padding-top: 4px; }

.sp-status-badge          { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.sp-status-badge.active   { background: rgba(74,222,128,0.18);  color: #4ade80;  border: 1px solid rgba(74,222,128,0.3); }
.sp-status-badge.enrolled { background: rgba(56,189,248,0.18);  color: #0ea5e9;  border: 1px solid rgba(56,189,248,0.3); }
.sp-status-badge.interview { background: rgba(245,158,11,0.18); color: #f59e0b; border: 1px solid rgba(245,158,11,0.3); }
.sp-status-badge.offer    { background: rgba(139,92,246,0.18);  color: #8b5cf6;  border: 1px solid rgba(139,92,246,0.3); }
.sp-status-badge.inactive { background: rgba(248,113,113,0.18); color: #f87171;  border: 1px solid rgba(248,113,113,0.3); }
.sp-status-badge.pending  { background: rgba(251,191,36,0.18);  color: #fbbf24;  border: 1px solid rgba(251,191,36,0.3); }
.sp-status-badge.placed   { background: rgba(96,165,250,0.18);  color: #60a5fa;  border: 1px solid rgba(96,165,250,0.3); }
.sp-status-badge.onhold   { background: rgba(148,163,184,0.18); color: #94a3b8; border: 1px solid rgba(148,163,184,0.3); }

.sp-hero-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.12); }
.sp-hstat      { display: flex; align-items: center; gap: 10px; }
.sp-hstat-icon {
    width: 36px; height: 36px; border-radius: 8px; flex-shrink: 0;
    background: rgba(255,255,255,0.14); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.sp-hstat-val { font-size: 15px; font-weight: 700; color: #fff; }
.sp-hstat-lbl { font-size: 11px; color: rgba(255,255,255,0.58); margin-top: 1px; }

/* ── Grid ── */
.sp-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 860px) { .sp-grid-2 { grid-template-columns: 1fr; } .sp-hero-stats { grid-template-columns: repeat(2,1fr); } }

/* ============================================================ STUDENT PORTAL — CARDS ============================================================ */
.sp-card {
    background: #fff; border-radius: 12px;
    border: 1px solid #e2e8f0; padding: 20px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.04);
}
.sp-card-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #e2e8f0;
}
.sp-card-title { font-size: 14px; font-weight: 600; color: #1e293b; display: flex; align-items: center; gap: 6px; }
.sp-card-title i { color: #2563eb; }
.sp-card-sub   { font-size: 12px; color: #64748b; margin-top: 2px; }

/* ── Info List ── */
.sp-info-list  { display: flex; flex-direction: column; gap: 12px; }
.sp-info-item  { display: flex; align-items: flex-start; gap: 12px; }
.sp-ii-icon    {
    width: 36px; height: 36px; border-radius: 8px; flex-shrink: 0;
    background: #eff6ff; color: #2563eb;
    display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.sp-ii-label { font-size: 11px; color: #64748b; font-weight: 500; margin-bottom: 2px; }
.sp-ii-val   { font-size: 13px; color: #1e293b; font-weight: 500; }

/* ── Profile/Notes ── */
.sp-profile-text { font-size: 13px; color: #475569; line-height: 1.65; }
.sp-notes-box {
    background: #fffbeb; border: 1px solid #fef3c7; border-radius: 8px;
    padding: 12px 14px; margin-top: 14px;
}
.sp-notes-label { font-size: 12px; font-weight: 600; color: #d97706; margin-bottom: 6px; display: flex; align-items: center; gap: 5px; }
.sp-notes-box p { font-size: 13px; color: #78350f; line-height: 1.55; }
.sp-empty { text-align: center; padding: 32px 16px; color: #94a3b8; }
.sp-empty i { font-size: 32px; display: block; margin-bottom: 10px; }
.sp-empty p { font-size: 13px; }
.sp-empty a { color: #2563eb; text-decoration: underline; }

/* ── Edit / Submit buttons ── */
.sp-edit-btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 12px; border-radius: 6px;
    background: #eff6ff; color: #2563eb;
    font-size: 12px; font-weight: 600; text-decoration: none;
    transition: background 0.2s ease; flex-shrink: 0;
}
.sp-edit-btn:hover { background: #dbeafe; }

.sp-submit-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 20px; border-radius: 8px; border: none;
    background: linear-gradient(135deg, #2563eb, #3b82f6); color: #fff;
    font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit;
    transition: all 0.22s ease; box-shadow: 0 2px 10px rgba(37,99,235,0.3);
}
.sp-submit-btn:hover { background: linear-gradient(135deg, #1d4ed8, #2563eb); box-shadow: 0 4px 14px rgba(37,99,235,0.4); }

/* ── Page header (info page) ── */
.sp-page-header {
    display: flex; align-items: center; gap: 14px;
    margin-bottom: 20px; padding: 16px 20px;
    background: #fff; border-radius: 12px; border: 1px solid #e2e8f0;
    box-shadow: 0 1px 6px rgba(0,0,0,0.04);
}
.sp-page-icon {
    width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0;
    background: linear-gradient(135deg, #eff6ff, #dbeafe); color: #2563eb;
    display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.sp-page-title { font-size: 16px; font-weight: 700; color: #1e293b; }
.sp-page-sub   { font-size: 12px; color: #64748b; margin-top: 2px; }

/* ============================================================ STUDENT PORTAL — LOGIN PAGE ============================================================ */
.sp-login-body   { background: linear-gradient(145deg, #0b1527 0%, #1a3461 45%, #0f1f3d 100%); min-height: 100vh; }
.sp-login-layout { display: flex; min-height: 100vh; }

.sp-login-left {
    flex: 1; display: flex; flex-direction: column; justify-content: center;
    padding: 60px 52px;
}
.sp-login-right {
    width: 480px; flex-shrink: 0;
    background: #f8fafc; display: flex; align-items: center; justify-content: center; padding: 40px;
}
@media (max-width: 860px) { .sp-login-left { display: none; } .sp-login-right { width: 100%; } }

.sp-login-brand      { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 52px; }
.sp-login-brand-wordmark { width: min(280px, 100%); height: auto; object-fit: contain; }
.sp-login-brand-name { font-size: 26px; font-weight: 800; color: #fff; letter-spacing: -0.5px; }
.sp-login-brand-tag  { font-size: 12px; color: rgba(255,255,255,0.45); margin-top: 0; }

.sp-features, .sp-login-features { display: flex; flex-direction: column; gap: 4px; }
.sp-feature-item  { display: flex; align-items: flex-start; gap: 14px; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.sp-feature-item:last-child { border-bottom: none; }
.sp-feature-icon  {
    width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0;
    background: rgba(255,255,255,0.07); color: #60a5fa;
    display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.sp-feature-title { font-size: 15px; font-weight: 600; color: #fff; margin-bottom: 4px; }
.sp-feature-desc  { font-size: 13px; color: rgba(255,255,255,0.5); line-height: 1.55; }

.sp-login-card {
    width: 100%; max-width: 390px;
    background: #fff; border-radius: 16px;
    border: 1px solid #e2e8f0; padding: 36px 32px;
    box-shadow: 0 10px 48px rgba(0,0,0,0.12);
}
.sp-login-logo-sm    { display: flex; align-items: center; gap: 8px; margin-bottom: 22px; }
.sp-login-logo-sm img { width: 36px; height: 36px; border-radius: 9px; object-fit: contain; }
.sp-login-logo-sm span { font-size: 15px; font-weight: 700; color: #1e293b; }
.sp-login-title      { font-size: 22px; font-weight: 800; color: #1e293b; letter-spacing: -0.4px; margin-bottom: 6px; }
.sp-login-subtitle   { font-size: 13px; color: #64748b; margin-bottom: 24px; }

.sp-input-wrap { position: relative; display: flex; align-items: center; }
.sp-input-icon {
    position: absolute; left: 12px; color: #94a3b8;
    font-size: 15px; pointer-events: none; z-index: 1;
}
.sp-input { padding-left: 38px !important; }
.sp-eye-btn {
    position: absolute; right: 10px; background: none; border: none;
    color: #94a3b8; font-size: 15px; padding: 4px;
    display: flex; align-items: center; cursor: pointer;
    transition: color 0.2s ease;
}
.sp-eye-btn:hover { color: #475569; }

.sp-login-btn {
    width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 20px; border-radius: 8px; border: none;
    background: linear-gradient(135deg, #2563eb, #3b82f6); color: #fff;
    font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit;
    transition: all 0.22s ease; box-shadow: 0 3px 12px rgba(37,99,235,0.32); margin-top: 6px;
}
.sp-login-btn:hover { background: linear-gradient(135deg, #1d4ed8, #2563eb); box-shadow: 0 5px 18px rgba(37,99,235,0.42); }

.sp-login-footer-note {
    display: flex; align-items: flex-start; gap: 6px;
    font-size: 12px; color: #94a3b8; margin-top: 16px; padding-top: 16px;
    border-top: 1px solid #e2e8f0; line-height: 1.55;
}

/* ── Portal Login Password field indicator ── */
.portal-pass-hint {
    font-size: 11.5px; color: var(--text-muted); margin-top: 4px;
    display: flex; align-items: center; gap: 4px;
}

/* ============================================================
   DROPZONE FILE UPLOAD
   ============================================================ */
.dropzone-wrap {
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    padding: 18px 14px;
    text-align: center;
    background: var(--main-bg);
    transition: border-color 0.2s ease, background 0.2s ease;
    cursor: pointer;
    position: relative;
    user-select: none;
}
.dropzone-wrap:hover,
.dropzone-wrap.dz-drag  { border-color: var(--blue); background: var(--blue-light); }
.dropzone-wrap.dz-has-file { border-color: var(--green); background: rgba(22,163,74,0.04); border-style: solid; }

.dz-input-hidden {
    position: absolute; inset: 0; opacity: 0;
    cursor: pointer; width: 100%; height: 100%; z-index: 2;
}
.dropzone-inner  { pointer-events: none; }
.dropzone-icon   { font-size: 26px; color: var(--text-muted); margin-bottom: 6px; display: block; }
.dropzone-wrap.dz-drag  .dropzone-icon,
.dropzone-wrap:hover    .dropzone-icon  { color: var(--blue); }
.dropzone-wrap.dz-has-file .dropzone-icon { color: var(--green); }
.dropzone-text   { font-size: 13px; color: var(--text-secondary); }
.dropzone-browse { color: var(--blue); font-weight: 600; }
.dropzone-hint   { font-size: 11px; color: var(--text-muted); margin-top: 3px; }
.dropzone-fname  { font-size: 12px; font-weight: 600; color: var(--green); margin-top: 6px; word-break: break-all; }
.dropzone-fname:empty { display: none; }

/* ============================================================
   INLINE STATUS PICKER (double-click on table status cell)
   ============================================================ */
/* Standardized action button container for all tables */
.tbl-actions { display: flex; gap: 6px; align-items: center; flex-wrap: nowrap; }

.td-status-cell { cursor: pointer; white-space: nowrap; }
.td-status-hint {
    font-size: 9px; color: var(--text-muted);
    opacity: 0; margin-left: 4px;
    transition: opacity 0.15s ease;
    vertical-align: middle;
}
.td-status-cell:hover .td-status-hint { opacity: 1; }

.inline-status-picker {
    position: absolute;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    z-index: 9999;
    padding: 5px;
    min-width: 148px;
    display: none;
}
.inline-status-picker.open { display: block; }
.isp-btn {
    display: flex; align-items: center;
    width: 100%; padding: 5px 7px;
    background: none; border: none; cursor: pointer;
    border-radius: 7px; transition: background 0.15s;
    font-family: inherit;
}
.isp-btn:hover    { background: var(--main-bg); }
.isp-btn.isp-current { background: var(--blue-light); }
.isp-btn .badge   { font-size: 11.5px; }

/* ============================================================
   FLATPICKR OVERRIDES
   ============================================================ */
.flatpickr-calendar {
    font-family: 'Inter', sans-serif !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15) !important;
    border: 1px solid var(--border-color) !important;
    background: var(--card-bg) !important;
}
.flatpickr-day.selected,
.flatpickr-day.selected:hover {
    background: var(--blue) !important;
    border-color: var(--blue) !important;
    color: #fff !important;
}
.flatpickr-day:hover { background: var(--blue-light) !important; color: var(--blue) !important; }
.flatpickr-months   { background: var(--blue) !important; border-radius: 11px 11px 0 0 !important; }
.flatpickr-month    { color: #fff !important; }
.flatpickr-current-month .cur-month,
.flatpickr-current-month .numInput { color: #fff !important; }
.flatpickr-prev-month svg,
.flatpickr-next-month svg { fill: #fff !important; }
.flatpickr-weekday  { color: var(--text-muted) !important; font-weight: 600 !important; }
.flatpickr-day.today { border-color: var(--blue) !important; }
[data-theme="dark"] .flatpickr-calendar { background: var(--card-bg) !important; }
[data-theme="dark"] .flatpickr-day      { color: var(--text-primary) !important; }
[data-theme="dark"] .flatpickr-day.flatpickr-disabled { color: var(--text-muted) !important; }

/* ============================================================
   STUDENT PORTAL v2 — TOPBAR LAYOUT (stp-*)
   ============================================================ */

/* Body */
.stp-body { margin: 0; padding: 0; font-family: 'Inter', sans-serif; background: #f1f5f9; min-height: 100vh; color: #1e293b; }

/* ── Topbar ── */
.stp-topbar {
    position: sticky; top: 0; z-index: 100;
    background: linear-gradient(135deg, #1e3a6e 0%, #2563eb 100%);
    box-shadow: 0 2px 16px rgba(37,99,235,0.25);
}
.stp-topbar-inner {
    display: flex; align-items: center; gap: 0;
    max-width: 1280px; margin: 0 auto;
    padding: 0 24px; height: 60px;
}
.stp-topbar-brand { display: flex; align-items: center; margin-right: 32px; flex-shrink: 0; }
.stp-topbar-logo  { height: 30px; width: auto; object-fit: contain; filter: brightness(0) invert(1); }

.stp-topnav { display: flex; align-items: center; gap: 4px; flex: 1; }
.stp-nav-link {
    display: flex; align-items: center; gap: 7px;
    padding: 7px 14px; border-radius: 8px; text-decoration: none;
    font-size: 13.5px; font-weight: 500; color: rgba(255,255,255,0.7);
    transition: all 0.2s ease;
}
.stp-nav-link i  { font-size: 15px; }
.stp-nav-link:hover { background: rgba(255,255,255,0.1); color: #fff; }
.stp-nav-link.active { background: rgba(255,255,255,0.18); color: #fff; font-weight: 600; }

.stp-topbar-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.stp-user-pill    { display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; background: rgba(255,255,255,0.12); border-radius: 50px; }
.stp-user-avatar  {
    width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
    background: rgba(255,255,255,0.25); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700;
}
.stp-user-info   { display: flex; flex-direction: column; }
.stp-user-name   { font-size: 13px; font-weight: 600; color: #fff; line-height: 1.2; white-space: nowrap; max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.stp-user-status { font-size: 11px; color: rgba(255,255,255,0.65); display: flex; align-items: center; gap: 4px; }

.stp-status-dot {
    display: inline-block; width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}
.stp-status-dot.active    { background: #4ade80; }
.stp-status-dot.enrolled  { background: #60a5fa; }
.stp-status-dot.interview { background: #fbbf24; }
.stp-status-dot.offer     { background: #a78bfa; }
.stp-status-dot.placed    { background: #34d399; }
.stp-status-dot.onhold    { background: #f97316; }
.stp-status-dot.inactive  { background: #94a3b8; }

.stp-logout-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 7px 14px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.3);
    background: transparent; color: rgba(255,255,255,0.85);
    font-size: 13px; font-weight: 500; cursor: pointer; font-family: inherit;
    transition: all 0.2s ease;
}
.stp-logout-btn:hover { background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.5); }

/* ── Main content area ── */
.stp-main    { min-height: calc(100vh - 60px); padding: 28px 0 40px; }
.stp-content { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* ── Hero banner ── */
.stp-hero {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
    background: linear-gradient(135deg, #1e3a6e 0%, #2563eb 100%);
    border-radius: 16px; padding: 28px 32px; margin-bottom: 24px;
    box-shadow: 0 4px 24px rgba(37,99,235,0.22);
}
.stp-hero-left  { display: flex; align-items: center; gap: 20px; }
.stp-hero-avatar {
    width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0;
    background: rgba(255,255,255,0.2); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 26px; font-weight: 800; border: 3px solid rgba(255,255,255,0.3);
}
.stp-hero-greeting { font-size: 13px; color: rgba(255,255,255,0.65); margin-bottom: 4px; }
.stp-hero-name     { font-size: 22px; font-weight: 800; color: #fff; letter-spacing: -0.4px; margin-bottom: 8px; }
.stp-hero-meta     { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: rgba(255,255,255,0.7); }
.stp-hero-meta span { display: flex; align-items: center; gap: 5px; }
.stp-hero-right { flex-shrink: 0; }
.stp-hero-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 16px; border-radius: 50px; font-size: 13px; font-weight: 600;
    background: rgba(255,255,255,0.18); color: #fff; border: 1px solid rgba(255,255,255,0.25);
    letter-spacing: 0.2px;
}

/* ── Stats row ── */
.stp-stats-row {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px;
}

.stp-stat-card {
    background: #fff; border-radius: 12px; border: 1px solid #e2e8f0;
    padding: 20px; display: flex; align-items: center; gap: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.stp-stat-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.09); transform: translateY(-1px); }
.stp-stat-icon {
    width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.stp-stat-val   { font-size: 22px; font-weight: 800; color: #1e293b; letter-spacing: -0.5px; }
.stp-stat-lbl   { font-size: 12px; color: #64748b; margin-top: 2px; }

/* ── Two-column grid ── */
.stp-grid-2 {
    display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
@media (max-width: 860px) { .stp-grid-2 { grid-template-columns: 1fr; } }

/* ── Profile page grid ── */
.stp-profile-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start;
}
@media (max-width: 860px) { .stp-profile-grid { grid-template-columns: 1fr; } }
.stp-profile-col-left, .stp-profile-col-right { display: flex; flex-direction: column; }

/* ── Cards ── */
.stp-card {
    background: #fff; border-radius: 14px; border: 1px solid #e2e8f0;
    padding: 20px 22px; box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.stp-card-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px; gap: 8px;
}
.stp-card-title { font-size: 14.5px; font-weight: 700; color: #1e293b; display: flex; align-items: center; gap: 7px; }
.stp-card-title i { color: #2563eb; }
.stp-card-hint  { font-size: 12px; color: #94a3b8; }
.stp-card-action {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 12px; border-radius: 7px; font-size: 12.5px; font-weight: 500;
    background: #eff6ff; color: #2563eb; text-decoration: none; border: 1px solid #dbeafe;
    transition: all 0.2s ease; white-space: nowrap;
}
.stp-card-action:hover { background: #dbeafe; color: #1d4ed8; }

/* ── Info list (dashboard & profile) ── */
.stp-info-list { display: flex; flex-direction: column; gap: 0; }
.stp-info-row  {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 0; border-bottom: 1px solid #f1f5f9;
}
.stp-info-row:last-child  { border-bottom: none; padding-bottom: 0; }
.stp-info-icon {
    width: 36px; height: 36px; border-radius: 9px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.stp-info-label { font-size: 11px; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 2px; }
.stp-info-val   { font-size: 13.5px; color: #1e293b; font-weight: 500; }

/* ── Document list ── */
.stp-doc-list  { display: flex; flex-direction: column; gap: 8px; }
.stp-doc-item  {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px; border-radius: 10px; border: 1px solid #e2e8f0;
    background: #f8fafc; text-decoration: none; color: #1e293b;
    transition: all 0.2s ease;
}
.stp-doc-item:hover { border-color: #93c5fd; background: #eff6ff; }
.stp-doc-icon  {
    width: 38px; height: 38px; border-radius: 9px; flex-shrink: 0;
    background: #fff0f0; color: #ef4444;
    display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.stp-doc-body  { flex: 1; min-width: 0; }
.stp-doc-name  { font-size: 13.5px; font-weight: 600; color: #1e293b; }
.stp-doc-hint  { font-size: 11.5px; color: #94a3b8; margin-top: 2px; }
.stp-doc-arrow { font-size: 13px; color: #94a3b8; flex-shrink: 0; }
.stp-empty-docs {
    display: flex; flex-direction: column; align-items: center;
    padding: 24px 0; color: #94a3b8; font-size: 13px; text-align: center;
}

/* ── Divider ── */
.stp-divider { border: none; border-top: 1px solid #f1f5f9; margin: 14px 0; }

/* ── Activity feed ── */
.stp-activity-title { font-size: 12px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.stp-activity-list  { display: flex; flex-direction: column; gap: 0; }
.stp-activity-item  { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f8fafc; }
.stp-activity-item:last-child { border-bottom: none; }
.stp-activity-dot   { width: 8px; height: 8px; border-radius: 50%; background: #2563eb; flex-shrink: 0; margin-top: 5px; }
.stp-activity-action { font-size: 13px; color: #475569; font-weight: 500; }
.stp-activity-time   { font-size: 11px; color: #94a3b8; margin-top: 2px; }
.stp-activity-empty  { font-size: 13px; color: #94a3b8; padding: 8px 0; }

/* ── Page header ── */
.stp-page-header {
    display: flex; align-items: center; gap: 14px; margin-bottom: 24px;
}
.stp-page-icon  {
    width: 48px; height: 48px; border-radius: 12px; flex-shrink: 0;
    background: linear-gradient(135deg, #1e3a6e, #2563eb); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 20px;
    box-shadow: 0 4px 14px rgba(37,99,235,0.28);
}
.stp-page-title { font-size: 20px; font-weight: 800; color: #1e293b; letter-spacing: -0.3px; }
.stp-page-sub   { font-size: 13px; color: #64748b; margin-top: 2px; }

/* ── Alert / error box ── */
.stp-alert-error {
    display: flex; align-items: flex-start; gap: 10px;
    background: #fef2f2; border: 1px solid #fecaca; border-radius: 10px;
    padding: 12px 16px; margin-bottom: 18px; color: #dc2626; font-size: 13.5px;
}
.stp-alert-error i { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

/* ── Enrollment info list ── */
.stp-enroll-list  { display: flex; flex-direction: column; gap: 0; }
.stp-enroll-item  { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f1f5f9; }
.stp-enroll-item:last-child { border-bottom: none; padding-bottom: 0; }
.stp-enroll-icon  { width: 36px; height: 36px; border-radius: 9px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.stp-enroll-label { font-size: 11px; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 2px; }
.stp-enroll-val   { font-size: 13.5px; color: #1e293b; font-weight: 500; }

/* ── Form elements ── */
.stp-form-grid    { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin-bottom: 12px; }
@media (max-width: 640px) { .stp-form-grid { grid-template-columns: 1fr; } }
.stp-form-group   { display: flex; flex-direction: column; gap: 5px; }
.stp-label        { font-size: 12.5px; font-weight: 600; color: #374151; }
.stp-required     { color: #ef4444; }
.stp-input        {
    width: 100%; padding: 9px 12px; border-radius: 8px;
    border: 1.5px solid #e2e8f0; background: #f8fafc;
    font-size: 13.5px; color: #1e293b; font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}
.stp-input:focus  { outline: none; border-color: #2563eb; background: #fff; box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.select2-container--default .select2-selection--single.stp-select2-selection {
    min-height: 42px;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 8px !important;
    background: #f8fafc;
}
.select2-container--default .stp-select2-selection .select2-selection__rendered {
    line-height: 40px !important;
    color: #1e293b;
    font-size: 13.5px;
    padding-left: 12px;
}
.select2-container--default .stp-select2-selection .select2-selection__arrow { height: 40px !important; }
.stp-textarea     { resize: vertical; min-height: 70px; line-height: 1.5; }
.stp-file-input   { padding: 6px 10px; cursor: pointer; }
.stp-file-hint    { font-size: 11.5px; color: #94a3b8; margin-top: 4px; }

/* ── Buttons ── */
.stp-btn-primary {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 10px 20px; border-radius: 8px; border: none;
    background: linear-gradient(135deg, #1e3a6e, #2563eb); color: #fff;
    font-size: 13.5px; font-weight: 600; cursor: pointer; font-family: inherit;
    transition: all 0.22s ease; box-shadow: 0 3px 12px rgba(37,99,235,0.28);
}
.stp-btn-primary:hover { background: linear-gradient(135deg, #1d4ed8, #3b82f6); box-shadow: 0 5px 18px rgba(37,99,235,0.36); transform: translateY(-1px); }
.stp-btn-secondary {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 10px 20px; border-radius: 8px; border: 1.5px solid #2563eb;
    background: #eff6ff; color: #2563eb;
    font-size: 13.5px; font-weight: 600; cursor: pointer; font-family: inherit;
    transition: all 0.22s ease;
}
.stp-btn-secondary:hover { background: #dbeafe; border-color: #1d4ed8; color: #1d4ed8; }

/* ============================================================
   STUDENT PORTAL — RESPONSIVE (all breakpoints)
   ============================================================ */

/* Prevent horizontal scroll on any mobile device */
.stp-body { overflow-x: hidden; }

/* Tab bar — always scrollable, never wraps */
.sdb-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; flex-wrap: nowrap; }
.sdb-tabs::-webkit-scrollbar { display: none; }
.sdb-tab  { flex-shrink: 0; }

/* ── 1024px: large tablet ─────────────────────────────────── */
@media (max-width: 1024px) {
    .stp-topbar-inner { padding: 0 20px; }
    .stp-content      { padding: 0 20px; }
}

/* ── 860px: small desktop / tablet landscape ─────────────── */
@media (max-width: 860px) {
    .stp-profile-grid { grid-template-columns: 1fr; }
    .stp-grid-2       { grid-template-columns: 1fr; }
}

/* ── 768px: tablet portrait ──────────────────────────────── */
@media (max-width: 768px) {
    .stp-hero      { padding: 22px 24px; }
    .stp-hero-name { font-size: 20px; }
    .stp-hero-meta { gap: 10px; font-size: 12.5px; }
    .stp-card-head { flex-wrap: wrap; gap: 4px; }
}

/* ── 700px: stats → 2 columns ────────────────────────────── */
@media (max-width: 700px) {
    .stp-stats-row { grid-template-columns: repeat(2, 1fr) !important; gap: 12px; }
}

/* ── 640px: mobile ───────────────────────────────────────── */
@media (max-width: 640px) {
    /* Topbar: keep logo, shrink it, hide user name text */
    .stp-topbar-inner    { padding: 0 14px; }
    .stp-topbar-brand    { margin-right: 8px; }
    .stp-topbar-logo     { height: 24px; }
    .stp-user-info       { display: none; }
    .stp-user-pill       { padding: 4px 6px; }
    .stp-nav-link span   { display: none; }
    .stp-nav-link        { padding: 8px 10px; }
    .stp-logout-btn span { display: none; }
    .stp-logout-btn      { padding: 7px 10px; }
    /* Content */
    .stp-content         { padding: 0 14px; }
    /* Hero */
    .stp-hero            { padding: 20px; }
    .stp-hero-avatar     { width: 52px; height: 52px; font-size: 21px; }
    .stp-hero-name       { font-size: 18px; }
    /* Profile / form */
    .stp-profile-grid    { grid-template-columns: 1fr; }
    .stp-form-grid       { grid-template-columns: 1fr; }
    /* Interview + app-log cards handled by inline styles in dashboard.blade.php */
}

/* ── 520px: small phones — hero stacks ───────────────────── */
@media (max-width: 520px) {
    .stp-hero       { flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px; }
    .stp-hero-left  { width: 100%; }
    .stp-hero-right { align-self: flex-start; }
    .stp-hero-meta  { gap: 8px; font-size: 12px; flex-wrap: wrap; }
    .stp-hero-name  { font-size: 17px; margin-bottom: 6px; }
    .sdb-tab        { padding: 10px 14px; font-size: 12.5px; gap: 5px; }
    .sdb-tab-body   { padding: 16px 12px; }
}

/* ── 480px: compact phone ────────────────────────────────── */
@media (max-width: 480px) {
    .stp-main        { padding: 14px 0 28px; }
    .stp-content     { padding: 0 12px; }
    .stp-card        { padding: 14px; }
    .stp-stat-card   { padding: 14px 12px; gap: 12px; }
    .stp-stat-icon   { width: 38px; height: 38px; font-size: 17px; }
    .stp-stat-val    { font-size: 19px; }
    .stp-page-header { gap: 10px; margin-bottom: 14px; }
    .stp-page-icon   { width: 38px; height: 38px; font-size: 17px; border-radius: 10px; }
    .stp-page-title  { font-size: 17px; }
    .stp-page-sub    { font-size: 12px; }
    .stp-form-grid   { grid-template-columns: 1fr !important; }
    .stp-card-head   { flex-direction: column; align-items: flex-start; }
    /* Buttons full-width */
    .stp-btn-primary, .stp-btn-secondary { width: 100%; justify-content: center; }
    /* Toast full-width bar */
    #sdbToast { bottom: 16px !important; right: 12px !important; left: 12px !important; font-size: 12.5px !important; }
}

/* ── 420px: tiny phone ───────────────────────────────────── */
@media (max-width: 420px) {
    .stp-stats-row   { grid-template-columns: 1fr !important; gap: 10px; }
    .sdb-table th    { padding: 8px 10px; font-size: 10px; }
    .sdb-table td    { padding: 10px; }
    .stp-enroll-icon { width: 32px; height: 32px; font-size: 13px; border-radius: 8px; }
    .stp-enroll-val  { font-size: 13px; }
    .sdb-doc-row     { gap: 10px; }
    .sdb-doc-icon    { width: 34px; height: 34px; font-size: 15px; }
    .sdb-doc-name    { font-size: 13px; }
    .sdb-view-btn    { padding: 5px 10px; font-size: 11.5px; }
}

/* ── 360px: very small phone ─────────────────────────────── */
@media (max-width: 360px) {
    .stp-topbar-logo { height: 20px; }
    .stp-hero-avatar { width: 44px; height: 44px; font-size: 18px; }
    .iv-toggle-btn   { padding: 5px 8px; font-size: 11px; gap: 3px; }
}

/* ============================================================
   Modal XL + Modal Tabs
   ============================================================ */
.modal-xl {
    max-width: 940px;
    width: 96vw;
}

/* Tab navigation bar */
.modal-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 1px solid var(--border-color);
    background: var(--card-bg);
    border-radius: var(--radius) var(--radius) 0 0;
    flex-shrink: 0;
    overflow: hidden;
}
.modal-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 11px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
    transition: color 0.2s, border-color 0.2s;
    margin-bottom: -1px;
}
.modal-tab-btn:hover { color: var(--blue); }
.modal-tab-btn.active {
    color: var(--blue);
    border-bottom-color: var(--blue);
    font-weight: 600;
}

/* Tab panels */
.modal-tab-panel { display: none; }
.modal-tab-panel.active { display: block; }

/* Section title within form tabs */
.form-section-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    padding: 14px 0 8px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 14px;
}

/* 3-column form grid */
.form-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 640px) {
    .form-grid-3 { grid-template-columns: 1fr; }
}

/* Document replace hint */
.doc-replace-hint { margin-bottom: 6px; }
.doc-replace-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12.5px;
    color: var(--blue);
    text-decoration: none;
    font-weight: 500;
}
.doc-replace-link:hover { text-decoration: underline; }
.doc-replace-warn {
    display: inline-block;
    margin-left: 8px;
    font-size: 11.5px;
    color: var(--orange-text);
    font-weight: 500;
}

/* ── Chart date range buttons ────────────────────────────── */
.range-btn-group {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.range-btn {
    padding: 6px 14px;
    font-size: 12.5px;
    font-weight: 500;
    background: var(--card-bg);
    color: var(--text-secondary);
    border: none;
    border-right: 1px solid var(--border-color);
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, color 0.15s;
}
.range-btn:last-child { border-right: none; }
.range-btn:hover { background: var(--blue-light); color: var(--blue); }
.range-btn.active { background: var(--blue); color: #fff; font-weight: 600; }

/* Utility */
.hidden { display: none !important; }
.align-center { align-items: center; }

/* ── Sub-domain badge system ──────────────────────────────── */
.subdomain-badge-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 38px;
    padding: 5px 12px;
    border: 1px solid var(--input-border);
    border-radius: var(--radius-sm);
    background: var(--input-bg);
    cursor: text;
    align-items: center;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.subdomain-badge-wrap:focus-within {
    border-color: var(--blue);
    box-shadow: 0 0 0 2px rgba(37,99,235,0.12);
}
.subdomain-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    background: var(--blue-light);
    color: var(--blue-text);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}
.subdomain-badge-x {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--blue-text);
    font-size: 14px;
    line-height: 1;
    opacity: 0.7;
    display: flex;
    align-items: center;
}
.subdomain-badge-x:hover { opacity: 1; }
.subdomain-text-input {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 2px 4px !important;
    min-width: 140px;
    flex: 1;
    background: transparent;
    font-size: 13px;
}

/* ── Resume read-only note ────────────────────────────────── */
.resume-readonly-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 14px;
    background: var(--blue-light);
    border: 1px solid rgba(37,99,235,0.15);
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    color: var(--blue-text);
    margin-bottom: 14px;
}

/* ── Searchable select ────────────────────────────────────── */
.ss-wrap { position: relative; }
.ss-trigger {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    cursor: pointer;
    user-select: none;
    gap: 8px;
}
.ss-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss-chevron { transition: transform 0.15s; flex-shrink: 0; font-size: 11px; color: var(--text-muted); }
.ss-wrap.ss-open .ss-chevron { transform: rotate(180deg); }
.ss-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 3px);
    left: 0; right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: 0 6px 20px rgba(0,0,0,0.13);
    z-index: 300;
}
.ss-wrap.ss-open .ss-dropdown { display: block; }
.ss-search { padding: 8px; border-bottom: 1px solid var(--border-color); }
.ss-search-input {
    width: 100%; padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--input-bg, var(--bg-secondary));
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
    box-sizing: border-box;
}
.ss-search-input:focus { border-color: var(--blue); }
.ss-options { max-height: 200px; overflow-y: auto; }
.ss-option {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13.5px;
    color: var(--text-primary);
}
.ss-option:hover { background: var(--blue-light); color: var(--blue-text); }
.ss-group-label {
    padding: 5px 12px 3px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    margin-top: 2px;
    pointer-events: none;
    user-select: none;
}
.ss-group-label:first-child { border-top: none; margin-top: 0; }
.ss-role-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--border-color);
    border-radius: 4px;
    padding: 1px 5px;
    margin-left: 6px;
    vertical-align: middle;
    line-height: 1.4;
}
.ss-option:hover .ss-role-badge { background: rgba(255,255,255,0.25); color: #fff; }
.ss-assignee-role { font-size: 11px; color: var(--text-muted); font-weight: 400; margin-left: 4px; }

/* ── PCC — Phone Country Code custom dropdown ─────────────────── */
.pcc-wrap {
    display: flex;
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--input-bg, var(--bg-secondary));
    transition: border-color var(--transition), box-shadow var(--transition);
}
.pcc-wrap:focus-within { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(37,99,235,0.12); }
.pcc-trigger {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    border: none;
    border-right: 1px solid var(--border-color);
    background: var(--main-bg);
    padding: 0 8px 0 8px;
    cursor: pointer;
    min-width: 82px;
    color: var(--text-primary);
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    white-space: nowrap;
}
.pcc-trigger:hover { background: rgba(0,0,0,0.04); }
[data-theme="dark"] .pcc-trigger { background: var(--bg-tertiary, var(--bg-secondary)); }
[data-theme="dark"] .pcc-trigger:hover { background: rgba(255,255,255,0.06); }
.pcc-trigger-flag { font-size: 19px; line-height: 1; }
.pcc-trigger-code { font-weight: 600; font-size: 12px; }
.pcc-chevron { font-size: 9px; color: var(--text-muted); transition: transform 0.15s; }
.pcc-wrap.pcc-open .pcc-chevron { transform: rotate(180deg); }
.pcc-number-input {
    flex: 1;
    min-width: 0;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important;
    background: transparent !important;
}
.pcc-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 3px);
    left: 0;
    min-width: 300px;
    max-height: 330px;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 24px rgba(0,0,0,0.14);
    z-index: 9999;
    overflow: hidden;
    flex-direction: column;
}
.pcc-wrap.pcc-open .pcc-dropdown { display: flex; }
.pcc-search-wrap {
    padding: 8px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}
.pcc-search-input {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    font-size: 13px;
    background: var(--input-bg, var(--bg-secondary));
    color: var(--text-primary);
    outline: none;
    box-sizing: border-box;
}
.pcc-search-input:focus { border-color: var(--blue); }
.pcc-options { overflow-y: auto; flex: 1; }
.pcc-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-primary);
    transition: background 0.1s;
}
.pcc-option:hover { background: rgba(37,99,235,0.06); }
.pcc-option.pcc-selected { background: rgba(37,99,235,0.08); color: var(--blue); font-weight: 500; }
.pcc-option-flag { font-size: 19px; flex-shrink: 0; }
.pcc-option-country { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcc-option-code { flex-shrink: 0; color: var(--text-muted); font-size: 11px; font-weight: 700; }
[data-theme="dark"] .pcc-dropdown { background: var(--card-bg); }
[data-theme="dark"] .pcc-option:hover { background: rgba(255,255,255,0.06); }
[data-theme="dark"] .pcc-option.pcc-selected { background: rgba(37,99,235,0.14); }

/* ── Geo searchable-select wrapper ────────────────────────────── */
.geo-search-wrap { display: flex; flex-direction: column; }
.geo-filter-input {
    border-bottom: none !important;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0 !important;
    font-size: 12px !important;
    padding: 6px 10px !important;
    color: var(--text-muted);
    background: var(--main-bg) !important;
    height: auto !important;
}
.geo-filter-input:focus { border-color: var(--blue) !important; z-index: 1; position: relative; }
.geo-search-wrap .geo-select {
    border-radius: 0 0 var(--radius-sm) var(--radius-sm) !important;
    border-top-color: var(--border-color) !important;
    margin-top: -1px;
}

/* Select2 inside candidate modals */
.select2-field-parent {
    position: relative;
}
.select2-container { width: 100% !important; font-family: inherit; }
.select2-container--default .select2-selection--single {
    height: 40px;
    min-height: 40px;
    border: 1px solid var(--input-border, var(--border-color)) !important;
    border-radius: 9px !important;
    background: var(--input-bg, var(--bg-secondary));
    display: flex !important;
    align-items: center;
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
    -webkit-border-radius: 9px !important;
    -moz-border-radius: 9px !important;
    -ms-border-radius: 9px !important;
    -o-border-radius: 9px !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--text-primary);
    line-height: 38px !important;
    padding-left: 12px;
    padding-right: 34px;
    font-size: 13px;
    font-weight: 500;
}
.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: var(--text-muted);
}
.select2-selection__clear{
    display: none !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 38px !important;
    right: 7px !important;
}
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--blue);
    box-shadow: 0 0 0 2px rgba(37,99,235,0.12);
}
.select2-field-parent > .select2-container--open {
    width: 100% !important;
}
.select2-dropdown {
    border-color: var(--border-color);
    border-radius: 9px;
    background: var(--card-bg);
    color: var(--text-primary);
    overflow: hidden;
    box-shadow: 0 14px 34px rgba(15,23,42,0.16);
    z-index: 4000;
}
body > .select2-container--open {
    z-index: 10050 !important;
}
.candidate-select2-dropdown {
    width: var(--candidate-select2-width, 280px) !important;
    min-width: 0 !important;
    max-width: var(--candidate-select2-width, 280px) !important;
    margin-top: 4px;
    max-height: 250px;
    z-index: 10050 !important;
}
.select2-container--default .select2-dropdown--above,
.select2-container--default .select2-dropdown--below {
    border-radius: 9px;
}
.select2-container--default .select2-results > .select2-results__options {
    max-height: 168px;
    overflow-y: auto;
}
.select2-search--dropdown {
    padding: 8px;
    border-bottom: 1px solid var(--border-color);
    background: var(--card-bg);
}
.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid var(--input-border, var(--border-color));
    border-radius: 8px;
    background: var(--input-bg, var(--bg-secondary));
    color: var(--text-primary);
    outline: none;
    height: 34px;
    padding: 6px 10px;
    font-size: 13px;
    box-shadow: none;
}
.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 2px rgba(37,99,235,0.12);
}
.select2-container--default .select2-results__option {
    font-size: 13px;
    padding: 8px 11px;
    color: var(--text-primary);
}
.select2-container--default .select2-results__option--selected {
    background: var(--bg-secondary);
}
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background: var(--blue);
    color: #fff;
}
.select2-container--default.select2-container--disabled .select2-selection--single {
    background: var(--main-bg);
    cursor: wait;
    opacity: 0.85;
}
.geo-select.is-loading + .select2-container .select2-selection--single .select2-selection__rendered {
    padding-right: 46px;
}
.geo-select.is-loading + .select2-container .select2-selection--single::after {
    content: "";
    width: 15px;
    height: 15px;
    position: absolute;
    right: 34px;
    top: 50%;
    margin-top: -8px;
    border: 2px solid rgba(37,99,235,0.2);
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.iti {
    width: 100%;
    display: block;
    --iti-border-color: var(--border-color);
}
.iti .form-control {
    width: 100%;
    height: 40px;
    min-height: 40px;
    padding-left: 95px !important;
}
.iti__tel-input {
    letter-spacing: 0;
}
.iti__country-container {
    width: 100px;
}
.iti__selected-country {
    width: 100px;
    justify-content: flex-start;
    gap: 7px;
    padding: 0 10px;
    border-right: 1px solid var(--border-color);
    background: var(--bg-secondary);
    border-radius: 9px 0 0 9px;
}
.iti__selected-dial-code {
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    margin-left: 3px;
}
.iti__arrow {
    margin-left: auto;
}
.iti__country-list {
    z-index: 5000;
    border: 1px solid var(--border-color);
    border-radius: 9px;
    background: var(--card-bg);
    color: var(--text-primary);
    box-shadow: 0 14px 34px rgba(15,23,42,0.16);
    margin-top: 4px;
    max-height: 250px;
    min-width: 100%;
    overflow-x: hidden;
}
body .iti__search-input {
    height: 40px;
    border: 1px solid var(--input-border, var(--border-color));
    border-radius: 9px;
    background: var(--input-bg, var(--bg-secondary));
    color: var(--text-primary);
    padding: 8px 12px;
    outline: none;
    margin: 8px 10px;
    width: calc(100% - 20px) !important;
    font-size: 13px;
    box-sizing: border-box;
}
.iti__search-input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 2px rgba(37,99,235,0.12);
}
.iti__country { padding: 8px 11px; font-size: 13px; }
.iti__country-name { margin-left: 7px; }
.iti__country.iti__highlight { background: var(--bg-secondary); }
.iti__dial-code { color: var(--text-muted); margin-left: 9px; }
[data-theme="dark"] .select2-dropdown,
[data-theme="dark"] .iti__country-list {
    box-shadow: 0 16px 36px rgba(0,0,0,0.42);
}

/* ── Resume entry blocks ──────────────────────────────────── */
.resume-entry-block {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px 12px 14px;
    margin-bottom: 10px;
    background: var(--bg-secondary, var(--card-bg));
}
.resume-entry-top {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
}
.resume-entry-top .form-control { flex: 1; margin-bottom: 0; }
.resume-del-btn {
    width: 26px; height: 26px;
    border-radius: 50%;
    border: 1.5px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-muted);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 15px;
    line-height: 1;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    padding: 0;
}
.resume-del-btn:hover {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fca5a5;
}

/* ── Manager scope cards (candidates index) ───────────────── */
.manager-scope-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 14px 20px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--card-bg);
    text-decoration: none;
    color: var(--text-primary);
    min-width: 160px;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
    cursor: pointer;
}
.manager-scope-card:hover {
    border-color: var(--blue);
    box-shadow: 0 2px 8px rgba(37,99,235,0.10);
}
.manager-scope-card.scope-active {
    border-color: var(--blue);
    background: var(--blue-light);
}
.scope-num {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
}
.scope-lbl {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 2px;
}
.scope-sub {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ============================================================
   ADMIN THEME REFRESH (admin-only)
   ============================================================ */
body.admin-theme {
    --blue: #1264d6;
    --blue-hover: #0f53b0;
    --blue-light: #ebf3ff;
    --blue-text: #17457f;
    --main-bg: #eef3f9;
    --card-bg: #ffffff;
    --border-color: #d5dfec;
    --text-primary: #13263f;
    --text-secondary: #5a738f;
    --text-muted: #8ea1b8;
    --green: #16a34a;
    --green-light: #eaf8ef;
    --green-text: #15803d;
    --yellow: #f59e0b;
    --yellow-light: #fff5df;
    --yellow-text: #b45309;
    --red: #ef4444;
    --red-light: #fff1f2;
    --red-text: #be123c;
    --input-bg: #ffffff;
    --input-border: #c9d7e8;
    --input-focus: #1264d6;
    font-family: 'Plus Jakarta Sans', 'Manrope', sans-serif;
    background:
        radial-gradient(1100px 480px at -8% -18%, #dbeafe 0%, transparent 55%),
        radial-gradient(900px 420px at 108% -12%, #e0f2fe 0%, transparent 54%),
        var(--main-bg);
    color: var(--text-primary);
}

body.admin-theme .sidebar {
    background: linear-gradient(180deg, #0f172a 0%, #16345e 62%, #102747 100%);
    border-right: 0;
    box-shadow: 10px 0 36px rgba(15, 23, 42, 0.26);
}
body.admin-theme .sidebar-header { border-bottom-color: rgba(148, 163, 184, 0.18); }
body.admin-theme .sidebar-logo img { border-radius: 10px; }
body.admin-theme .nav-item {
    border-radius: 12px;
    margin-bottom: 5px;
    border: 1px solid transparent;
}
body.admin-theme .nav-item.active {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    border-color: rgba(191, 219, 254, 0.35);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
}
body.admin-theme .nav-item:hover:not(.active) {
    background: rgba(148, 197, 255, 0.15);
    border-color: rgba(191, 219, 254, 0.24);
}

body.admin-theme .main-wrapper { background: transparent; }
body.admin-theme .main-content { padding: 24px; }

body.admin-theme .main-header {
    border-radius: 0;
    border-color: #d8e3ef;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
    -webkit-border-radius: 0;
    -moz-border-radius: 0;
    -ms-border-radius: 0;
    -o-border-radius: 0;
}
body.admin-theme .header-title {
    letter-spacing: -0.02em;
    font-weight: 800;
}
body.admin-theme .header-description { color: #6b819a; }
body.admin-theme .header-user-chip,
body.admin-theme .theme-toggle,
body.admin-theme .header-logout-btn {
    border-radius: 12px;
}

body.admin-theme .card,
body.admin-theme .stat-card {
    border-radius: 18px;
    border: 1px solid #d8e3ef;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}
body.admin-theme .card-header { padding: 18px 22px; }
body.admin-theme .card-title {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.01em;
}
body.admin-theme .card-subtitle {
    font-size: 12.5px;
    color: #6f879f;
}

body.admin-theme .table-wrapper {
    border: 1px solid #dbe4ef;
    border-radius: 14px;
    background: #ffffff;
}
body.admin-theme table { font-size: 13.5px; }
body.admin-theme th {
    background: #f3f7fd;
    color: #6a829b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}
body.admin-theme td {
    color: #1f3653;
    border-bottom-color: #e6edf5;
}
body.admin-theme tbody tr:hover { background: #f8fbff; }

body.admin-theme .form-label {
    color: #35516f;
    font-weight: 700;
    font-size: 12.5px;
}
body.admin-theme .form-control {
    min-height: 42px;
    border-radius: 10px;
    border: 1px solid var(--input-border);
    background: #ffffff;
    color: #1a3453;
    font-weight: 500;
}
body.admin-theme .form-control::placeholder { color: #9ab0c7; }
body.admin-theme .form-control:focus {
    border-color: var(--input-focus);
    box-shadow: 0 0 0 3px rgba(18, 100, 214, 0.14);
}
body.admin-theme textarea.form-control { min-height: 96px; }

body.admin-theme .btn {
    border-radius: 10px;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: none;
}
body.admin-theme .btn-primary {
    background: linear-gradient(135deg, #1f6fe5, #1264d6);
    border: 1px solid transparent;
    box-shadow: 0 8px 20px rgba(18, 100, 214, 0.22);
}
body.admin-theme .btn-primary:hover {
    background: linear-gradient(135deg, #155fcf, #0e4ea9);
    box-shadow: 0 10px 24px rgba(18, 100, 214, 0.3);
}
body.admin-theme .btn-outline {
    background: #ffffff;
    border: 1px solid #c8d8ea;
    color: #315172;
}
body.admin-theme .btn-outline:hover {
    border-color: #9fc0e5;
    background: #f4f8fe;
    color: #143d70;
}
body.admin-theme .btn-danger {
    border: 1px solid #fecdd3;
    background: #fff1f2;
    color: #be123c;
}
body.admin-theme .btn-danger:hover {
    border-color: #fda4af;
    background: #ffe4e6;
    color: #9f1239;
}
body.admin-theme .btn-sm {
    min-height: 32px;
    padding: 6px 11px;
    font-size: 12px;
}

body.admin-theme .tbl-actions .btn {
    width: 34px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
body.admin-theme .tbl-actions .btn i { font-size: 14px; }

body.admin-theme .badge {
    border-radius: 999px;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.02em;
    padding: 4px 9px;
}

body.admin-theme .modal {
    border-radius: 18px;
    border: 1px solid #d4e0ee;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.24);
}
body.admin-theme .modal-header,
body.admin-theme .modal-footer {
    background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
}
body.admin-theme .modal-header { border-bottom: 1px solid #e1e9f3; }
body.admin-theme .modal-footer { border-top: 1px solid #e1e9f3; }
body.admin-theme .modal-title {
    font-size: 16px;
    font-weight: 800;
}

body.admin-theme .manager-scope-card {
    border-width: 1.5px;
    border-color: #d2deec;
    border-radius: 14px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
}
body.admin-theme .manager-scope-card.scope-active {
    border-color: #93c5fd;
    background: #eef5ff;
}

html[data-theme="dark"] body.admin-theme {
    --main-bg: #0b1220;
    --card-bg: #111b2f;
    --border-color: #22324a;
    --text-primary: #e2e8f0;
    --text-secondary: #95a6bf;
    --text-muted: #7f94af;
    --input-bg: #0f1a2c;
    --input-border: #2a3b56;
    --blue-light: #102c52;
    --blue-text: #9fc8ff;
    background:
        radial-gradient(1100px 480px at -8% -18%, rgba(30, 64, 175, 0.24) 0%, transparent 55%),
        radial-gradient(900px 420px at 108% -12%, rgba(8, 145, 178, 0.2) 0%, transparent 54%),
        var(--main-bg);
}
html[data-theme="dark"] body.admin-theme .sidebar {
    background: linear-gradient(180deg, #070b14 0%, #0f1c34 58%, #0b1326 100%);
}
html[data-theme="dark"] body.admin-theme .main-header {
    background: rgba(17, 27, 47, 0.86);
    border-color: #26374f;
}
html[data-theme="dark"] body.admin-theme .card,
html[data-theme="dark"] body.admin-theme .stat-card,
html[data-theme="dark"] body.admin-theme .table-wrapper {
    border-color: #26374f;
    background: #111b2f;
    box-shadow: 0 10px 30px rgba(2, 6, 23, 0.34);
}
html[data-theme="dark"] body.admin-theme th { background: #17253d; color: #9cb2cc; }
html[data-theme="dark"] body.admin-theme td { border-bottom-color: #1f2f47; color: #d7e2f0; }
html[data-theme="dark"] body.admin-theme tbody tr:hover { background: #13233a; }
html[data-theme="dark"] body.admin-theme .btn-outline {
    background: #101a2d;
    border-color: #2a3a53;
    color: #d6e1ef;
}
html[data-theme="dark"] body.admin-theme .form-control {
    background: #0f1a2c;
    border-color: #2b3b56;
    color: #dce7f5;
}
html[data-theme="dark"] body.admin-theme .modal {
    border-color: #2c3c56;
    background: #111b2f;
}
html[data-theme="dark"] body.admin-theme .modal-header,
html[data-theme="dark"] body.admin-theme .modal-footer {
    background: linear-gradient(180deg, #111b2f 0%, #0f172a 100%);
    border-color: #273750;
}

@media (max-width: 1024px) {
    body.admin-theme .main-content { padding: 18px; }
    body.admin-theme .main-header {
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 12px;
    }
    body.admin-theme .header-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 768px) {
    body.admin-theme .main-content { padding: 14px; }
    body.admin-theme .card,
    body.admin-theme .stat-card { border-radius: 14px; }
    body.admin-theme .table-wrapper { border-radius: 12px; }
    body.admin-theme .form-control { min-height: 40px; }
}

/* ============================================================
   ADMIN MINIMAL UX POLISH v2
   ============================================================ */
body.admin-theme {
    --blue: #1d4ed8;
    --blue-hover: #1e40af;
    --blue-light: #eef4ff;
    --blue-text: #1e3a8a;
    --main-bg: #f5f7fb;
    --card-bg: #ffffff;
    --border-color: #dde5f0;
    --text-primary: #14253d;
    --text-secondary: #607790;
    --text-muted: #8da0b6;
    --input-border: #cfdaea;
    --input-focus: #1d4ed8;
    background: #f5f7fb;
}

body.admin-theme .main-content {
    width: 100%;
    max-width: 1560px;
    margin: 0 auto;
    padding: 22px;
}

body.admin-theme .sidebar {
    background: #0f172a;
    box-shadow: 6px 0 24px rgba(15, 23, 42, 0.18);
}
body.admin-theme .nav-item.active {
    background: #1d4ed8;
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: none;
}
body.admin-theme .nav-item:hover:not(.active) {
    background: rgba(148, 163, 184, 0.18);
    border-color: transparent;
}

body.admin-theme .main-header {
    border-radius: 0;
    border-color: #dde5f0;
    background: #ffffff;
    backdrop-filter: none;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
    margin-bottom: 2px;
    -webkit-border-radius: 0;
    -moz-border-radius: 0;
    -ms-border-radius: 0;
    -o-border-radius: 0;
}
body.admin-theme .header-title {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.015em;
}
body.admin-theme .header-description {
    color: #7389a2;
    font-size: 12px;
}

body.admin-theme .card,
body.admin-theme .stat-card {
    border-radius: 14px;
    border: 1px solid #dde5f0;
    box-shadow: 0 1px 6px rgba(15, 23, 42, 0.04);
}
body.admin-theme .card-header {
    margin-bottom: 14px;
    padding: 16px 18px;
    border-bottom-color: #e5ebf4;
}
body.admin-theme .card-title {
    font-size: 15px;
    font-weight: 800;
}
body.admin-theme .card-subtitle {
    color: #7890a9;
}

body.admin-theme .table-wrapper {
    border: 1px solid #e0e7f1;
    border-radius: 12px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
body.admin-theme .ag-table-wrapper {
    overflow: visible !important;
    max-height: none !important;
    padding: 0;
}
body.admin-theme .ag-source-table {
    display: none;
}
body.admin-theme .skilluence-ag-grid {
    width: 100%;
    min-height: 0;
    --ag-font-family: "Manrope", "Plus Jakarta Sans", system-ui, sans-serif;
    --ag-font-size: 13px;
    --ag-background-color: #ffffff;
    --ag-foreground-color: #1f3653;
    --ag-header-background-color: #f7f9fd;
    --ag-header-foreground-color: #6f879f;
    --ag-border-color: #e0e7f1;
    --ag-row-border-color: #e6edf5;
    --ag-odd-row-background-color: rgba(248, 250, 253, 0.55);
    --ag-row-hover-color: #eef4ff;
    --ag-selected-row-background-color: #eaf3ff;
    --ag-wrapper-border-radius: 12px;
    --ag-grid-size: 7px;
    --ag-cell-horizontal-padding: 14px;
    --ag-header-column-separator-display: block;
    --ag-header-column-separator-color: #dce5f1;
}
body.admin-theme .skilluence-ag-grid .ag-root-wrapper {
    border: 0;
    border-radius: 12px;
    overflow: visible !important;
}
body.admin-theme .skilluence-ag-grid,
body.admin-theme .skilluence-ag-grid .ag-root,
body.admin-theme .skilluence-ag-grid .ag-root-wrapper-body,
body.admin-theme .skilluence-ag-grid .ag-layout-auto-height,
body.admin-theme .skilluence-ag-grid .ag-body,
body.admin-theme .skilluence-ag-grid .ag-body-viewport,
body.admin-theme .skilluence-ag-grid .ag-center-cols-container,
body.admin-theme .skilluence-ag-grid .ag-row {
    overflow: visible !important;
}
/* Center cols viewport keeps its own overflow so AG Grid can scroll
   center columns horizontally — pinned-right Actions column stays put */
body.admin-theme .skilluence-ag-grid .ag-center-cols-viewport {
    overflow-x: auto !important;
    overflow-y: hidden !important;
}
body.admin-theme .skilluence-ag-grid .ag-layout-auto-height .ag-center-cols-viewport,
body.admin-theme .skilluence-ag-grid .ag-layout-auto-height .ag-center-cols-container {
    min-height: 96px;
}
body.admin-theme .skilluence-ag-grid .ag-header {
    z-index: 40;
    border-bottom: 1px solid #dfe7f2;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}
body.admin-theme .skilluence-ag-grid .ag-header-cell,
body.admin-theme .skilluence-ag-grid .ag-header-group-cell {
    padding-left: 14px;
    padding-right: 14px;
}
body.admin-theme .skilluence-ag-grid .ag-header-cell-label {
    color: #6f879f;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
body.admin-theme .skilluence-ag-grid .ag-cell {
    display: flex;
    align-items: center;
    line-height: 1.35;
    color: #1f3653;
    overflow: hidden;
    white-space: nowrap;
}
body.admin-theme .skilluence-ag-grid .ag-cell-value,
body.admin-theme .skilluence-ag-grid .ag-html-cell {
    min-width: 0;
}
body.admin-theme .skilluence-ag-grid .ag-html-cell {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}
body.admin-theme .skilluence-ag-grid .ag-cell-center {
    justify-content: center;
    text-align: center;
}
body.admin-theme .skilluence-ag-grid .ag-cell-wrap-clean {
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
}
body.admin-theme .skilluence-ag-grid .avatar-row {
    min-width: 0;
    width: 100%;
}
body.admin-theme .skilluence-ag-grid .avatar-row > div:last-child {
    min-width: 0;
}
body.admin-theme .skilluence-ag-grid .avatar-name,
body.admin-theme .skilluence-ag-grid .avatar-sub {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
body.admin-theme .skilluence-ag-grid .badge {
    white-space: nowrap;
}
body.admin-theme .skilluence-ag-grid .td-status-cell {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    cursor: pointer;
}
body.admin-theme .skilluence-ag-grid .ag-status-dropdown {
    position: relative;
    width: 100%;
    z-index: 5;
}
body.admin-theme .skilluence-ag-grid .ag-cell:has(.ag-status-dropdown) {
    overflow: visible;
}
body.admin-theme .skilluence-ag-grid .ag-status-trigger {
    width: min(132px, 100%);
    height: 32px;
    border: 0;
    border-radius: 999px;
    padding: 0 10px 0 14px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.015em;
    outline: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
body.admin-theme .skilluence-ag-grid .ag-status-trigger:disabled {
    opacity: 0.65;
    cursor: wait;
}
body.admin-theme .skilluence-ag-grid .ag-status-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 158px;
    padding: 6px;
    border: 1px solid #cfdcec;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16);
    display: none;
    z-index: 200;
}
body.admin-theme .skilluence-ag-grid .ag-status-dropdown.open .ag-status-menu {
    display: grid;
    gap: 4px;
}
body.admin-theme .skilluence-ag-grid .ag-status-option {
    min-height: 30px;
    border: 0;
    border-radius: 8px;
    padding: 0 10px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
body.admin-theme .skilluence-ag-grid .ag-status-option.active {
    box-shadow: inset 0 0 0 1px currentColor;
}
body.admin-theme .skilluence-ag-grid .ag-status-option:hover {
    filter: brightness(0.97);
}
body.admin-theme .skilluence-ag-grid .ag-status-trigger.badge-success,
body.admin-theme .skilluence-ag-grid .ag-status-option.badge-success {
    background-color: #dcfce7;
    color: #15803d;
}
body.admin-theme .skilluence-ag-grid .ag-status-trigger.badge-info,
body.admin-theme .skilluence-ag-grid .ag-status-option.badge-info {
    background-color: #f3e8ff;
    color: #9333ea;
}
body.admin-theme .skilluence-ag-grid .ag-status-trigger.badge-warning,
body.admin-theme .skilluence-ag-grid .ag-status-option.badge-warning {
    background-color: #fef3c7;
    color: #b45309;
}
body.admin-theme .skilluence-ag-grid .ag-status-trigger.badge-primary,
body.admin-theme .skilluence-ag-grid .ag-status-option.badge-primary {
    background-color: #dbeafe;
    color: #1d4ed8;
}
body.admin-theme .skilluence-ag-grid .ag-status-trigger.badge-danger,
body.admin-theme .skilluence-ag-grid .ag-status-option.badge-danger {
    background-color: #ffe4e6;
    color: #be123c;
}
body.admin-theme .skilluence-ag-grid .ag-cell .tbl-actions {
    min-height: 34px;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 8px;
    overflow: visible;
}
body.admin-theme .skilluence-ag-grid .ag-cell .tbl-actions .btn {
    width: 32px;
    height: 32px;
    min-height: 32px;
}
body.admin-theme .skilluence-ag-grid .ag-pinned-left-cols-container .ag-cell,
body.admin-theme .skilluence-ag-grid .ag-pinned-right-cols-container .ag-cell {
    background: inherit;
}
/* Pinned-right Actions column — clean left separator + flush justify */
body.admin-theme .skilluence-ag-grid .ag-pinned-right-header {
    border-left: 1px solid #dfe7f2;
}
body.admin-theme .skilluence-ag-grid .ag-pinned-right-cols-container .ag-cell {
    border-left: 1px solid #e6edf5;
    justify-content: center;
}
body.admin-theme .skilluence-ag-grid .ag-body-horizontal-scroll {
    display: none;
    min-height: 0;
}
body.admin-theme .skilluence-ag-grid .ag-body-horizontal-scroll-viewport {
    scrollbar-width: thin;
}
body.admin-theme .skilluence-ag-grid .ag-body-vertical-scroll {
    display: none;
}
body.admin-theme .skilluence-ag-grid * {
    scrollbar-width: none;
}
body.admin-theme .skilluence-ag-grid *::-webkit-scrollbar {
    width: 0;
    height: 0;
}
body.admin-theme .skilluence-ag-grid .ag-overlay-no-rows-wrapper {
    align-items: center;
    padding: 20px;
}
body.admin-theme .skilluence-ag-grid .ag-empty-state {
    border: 0;
    background: transparent;
}
body.admin-theme table {
    border-collapse: separate;
    border-spacing: 0;
}
body.admin-theme thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f7f9fd;
    color: #6f879f;
    border-bottom: 1px solid #dfe7f2;
    font-size: 11px;
    font-weight: 700;
}
body.admin-theme tbody td {
    padding-top: 11px;
    padding-bottom: 11px;
}
body.admin-theme tbody tr:nth-child(even) td {
    background: rgba(248, 250, 253, 0.55);
}
body.admin-theme tbody tr:hover td {
    background: #eef4ff;
}

body.admin-theme .form-group { margin-bottom: 14px; }
body.admin-theme .form-label {
    font-size: 12px;
    letter-spacing: 0.01em;
    color: #3f5875;
}
body.admin-theme .form-control {
    min-height: 40px;
    border-radius: 9px;
    border-color: #cfdaea;
    background: #ffffff;
    font-size: 13px;
    box-shadow: none;
}
body.admin-theme .form-control:focus {
    border-color: #1d4ed8;
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

body.admin-theme .btn {
    min-height: 36px;
    border-radius: 9px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.01em;
}
body.admin-theme .btn-primary {
    background: #1d4ed8;
    border: 1px solid #1d4ed8;
    box-shadow: none;
}
body.admin-theme .btn-primary:hover {
    background: #1e40af;
    border-color: #1e40af;
    box-shadow: none;
}
body.admin-theme .btn-outline {
    background: #ffffff;
    border: 1px solid #ced9e9;
    color: #3a5370;
}
body.admin-theme .btn-outline:hover {
    background: #f3f7fd;
    border-color: #b9cae0;
    color: #203b59;
}
body.admin-theme .btn-danger {
    border: 1px solid #fecdd3;
    background: #fff1f2;
}

body.admin-theme .tbl-actions {
    gap: 7px;
}
body.admin-theme .tbl-actions .btn {
    width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
}

body.admin-theme .badge {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.015em;
}

body.admin-theme .modal {
    border-radius: 14px;
    border: 1px solid #dbe4f1;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.2);
}
body.admin-theme .modal-header,
body.admin-theme .modal-footer {
    background: #ffffff;
}
body.admin-theme .modal-header { border-bottom-color: #e4ebf5; }
body.admin-theme .modal-footer { border-top-color: #e4ebf5; }
body.admin-theme .modal-title { font-size: 15px; }

body.admin-theme .pagination-wrap {
    border-top-color: #e5ebf4;
    padding: 12px 16px 4px;
}
body.admin-theme .pagination li a,
body.admin-theme .pagination li span {
    min-width: 30px;
    height: 30px;
    border-radius: 8px;
}

body.admin-theme .toast {
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
}
body.admin-theme .alert {
    border-radius: 10px;
}

/* Dashboard-specific clean/minimal refinements */
body.admin-theme .dw-stat-card {
    border-radius: 14px;
    border: 1px solid #dde5f0;
    box-shadow: 0 1px 6px rgba(15, 23, 42, 0.03);
}
body.admin-theme .dw-stat-card:hover {
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}
body.admin-theme .dw-table th {
    background: #f7f9fd;
    color: #6f879f;
    border-bottom: 1px solid #dde6f2;
}
body.admin-theme .dw-table td {
    border-bottom: 1px solid #e5ecf5;
}
body.admin-theme .dw-table tr:hover td {
    background: #eff4fb;
}
body.admin-theme .dw-day-tab {
    border-radius: 8px 8px 0 0;
    margin-right: 2px;
}

@media (max-width: 1024px) {
    body.admin-theme .main-content {
        padding: 16px;
    }
    body.admin-theme .main-header {
        gap: 10px;
    }
}

@media (max-width: 768px) {
    body.admin-theme .main-content {
        padding: 12px;
    }
    body.admin-theme .card,
    body.admin-theme .stat-card,
    body.admin-theme .modal {
        border-radius: 12px;
    }
    body.admin-theme .card-header {
        padding: 14px 14px;
    }
    body.admin-theme .tbl-actions .btn {
        width: 32px;
        height: 32px;
        min-height: 32px;
    }
}

html[data-theme="dark"] body.admin-theme {
    --main-bg: #0f172a;
    --card-bg: #111b2f;
    --border-color: #26374f;
    --text-primary: #e5edf7;
    --text-secondary: #9fb1c7;
    --text-muted: #8095af;
    --input-border: #334861;
    --blue-light: #132843;
    background: #0f172a;
}
html[data-theme="dark"] body.admin-theme .sidebar {
    background: #090f1d;
}
html[data-theme="dark"] body.admin-theme .main-header,
html[data-theme="dark"] body.admin-theme .card,
html[data-theme="dark"] body.admin-theme .stat-card,
html[data-theme="dark"] body.admin-theme .table-wrapper {
    background: #111b2f;
    border-color: #26374f;
    box-shadow: none;
}
html[data-theme="dark"] body.admin-theme .skilluence-ag-grid {
    --ag-background-color: #111b2f;
    --ag-foreground-color: #d8e4f2;
    --ag-header-background-color: #17263d;
    --ag-header-foreground-color: #a9bdd4;
    --ag-border-color: #26374f;
    --ag-row-border-color: #21324a;
    --ag-odd-row-background-color: rgba(20, 34, 56, 0.45);
    --ag-row-hover-color: #17263d;
    --ag-selected-row-background-color: #173257;
}
html[data-theme="dark"] body.admin-theme .skilluence-ag-grid .ag-cell {
    color: #d8e4f2;
}
html[data-theme="dark"] body.admin-theme .skilluence-ag-grid .ag-header-cell-label {
    color: #a9bdd4;
}
html[data-theme="dark"] body.admin-theme .skilluence-ag-grid .ag-pinned-right-header {
    border-left-color: #26374f;
}
html[data-theme="dark"] body.admin-theme .skilluence-ag-grid .ag-pinned-right-cols-container .ag-cell {
    border-left-color: #21324a;
}
html[data-theme="dark"] body.admin-theme thead th,
html[data-theme="dark"] body.admin-theme .dw-table th {
    background: #17263d;
    color: #a9bdd4;
    border-bottom-color: #26374f;
}
html[data-theme="dark"] body.admin-theme tbody td,
html[data-theme="dark"] body.admin-theme .dw-table td {
    border-bottom-color: #21324a;
    color: #d8e4f2;
}
html[data-theme="dark"] body.admin-theme tbody tr:nth-child(even) td {
    background: rgba(20, 34, 56, 0.45);
}
html[data-theme="dark"] body.admin-theme tbody tr:hover td,
html[data-theme="dark"] body.admin-theme .dw-table tr:hover td {
    background: #15263f;
}
html[data-theme="dark"] body.admin-theme .btn-outline {
    background: #111d30;
    border-color: #31455f;
    color: #d5e2f0;
}
html[data-theme="dark"] body.admin-theme .form-control {
    background: #101a2d;
    border-color: #334861;
    color: #e2eaf5;
}
html[data-theme="dark"] body.admin-theme .modal {
    border-color: #2d4059;
}

/* ============================================================
   ADMIN CLARITY + MOTION PASS
   Scoped to the admin shell so student/candidate portal pages keep
   their existing visual language.
   ============================================================ */
body.admin-theme {
    --admin-page-gutter: clamp(14px, 1.7vw, 28px);
    --admin-soft-shadow: 0 8px 26px rgba(15, 23, 42, 0.06);
    --admin-focus-ring: 0 0 0 4px rgba(29, 78, 216, 0.12);
    --radius: 8px;
    --radius-sm: 7px;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

body.admin-theme * {
    scrollbar-width: thin;
    scrollbar-color: #b8c7d9 transparent;
}

body.admin-theme *::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

body.admin-theme *::-webkit-scrollbar-track {
    background: transparent;
}

body.admin-theme *::-webkit-scrollbar-thumb {
    background: #c8d4e3;
    border: 3px solid transparent;
    border-radius: 999px;
    background-clip: content-box;
}

body.admin-theme *::-webkit-scrollbar-thumb:hover {
    background-color: #aabbd0;
}

body.admin-theme .main-content {
    max-width: none;
    padding: var(--admin-page-gutter);
}

body.admin-theme .main-header {
    min-height: 68px;
    height: auto;
    padding: 12px var(--admin-page-gutter);
}

body.admin-theme .header-actions {
    gap: 10px;
}

body.admin-theme .header-user-chip,
body.admin-theme .theme-toggle,
body.admin-theme .header-logout-btn {
    min-height: 40px;
    border-radius: 8px;
    transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

body.admin-theme .header-user-chip:hover,
body.admin-theme .theme-toggle:hover,
body.admin-theme .header-logout-btn:hover,
body.admin-theme .btn:hover {
    transform: translateY(-1px);
}

body.admin-theme .card,
body.admin-theme .stat-card,
body.admin-theme .dw-stat-card {
    border-radius: 8px;
    box-shadow: var(--admin-soft-shadow);
}

body.admin-theme .card {
    padding: clamp(16px, 1.5vw, 24px);
}

body.admin-theme .card + .card {
    margin-top: 18px;
}

body.admin-theme .card-header {
    margin: -2px 0 18px;
    padding: 0 0 16px;
    align-items: center;
    gap: 16px;
}

body.admin-theme .card-title {
    font-size: 16px;
    line-height: 1.25;
}

body.admin-theme .card-subtitle {
    margin-top: 4px;
    line-height: 1.4;
}

body.admin-theme .table-wrapper {
    border-radius: 8px;
    overflow: auto;
    max-height: calc(100vh - 275px);
}

body.admin-theme table {
    min-width: 980px;
}

body.admin-theme thead th {
    top: 0;
    padding: 12px 18px;
    box-shadow: 0 1px 0 #dfe7f2;
}

body.admin-theme tbody td {
    padding: 14px 18px;
    line-height: 1.35;
}

body.admin-theme tbody tr {
    transition: background 160ms ease, box-shadow 160ms ease;
}

body.admin-theme tbody tr:hover td {
    background: #f2f7ff;
}

body.admin-theme .avatar-row {
    gap: 10px;
    min-width: 0;
}

body.admin-theme .avatar-sm,
body.admin-theme .user-avatar,
body.admin-theme .header-avatar {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

body.admin-theme .avatar-name {
    font-weight: 700;
    line-height: 1.25;
}

body.admin-theme .avatar-sub {
    line-height: 1.25;
    color: #6f849d;
}

body.admin-theme .form-grid {
    gap: 4px 18px;
}

body.admin-theme .form-group {
    margin-bottom: 16px;
}

body.admin-theme .form-label {
    margin-bottom: 7px;
}

body.admin-theme .form-control,
body.admin-theme .select2-container--default .select2-selection--single {
    min-height: 42px;
    border-radius: 8px !important;
    transition: border-color 170ms ease, box-shadow 170ms ease, background 170ms ease;
}

body.admin-theme .form-control:focus,
body.admin-theme .select2-container--default.select2-container--focus .select2-selection--single,
body.admin-theme .select2-container--default.select2-container--open .select2-selection--single {
    box-shadow: var(--admin-focus-ring);
}

body.admin-theme .btn {
    min-height: 38px;
    border-radius: 8px;
    transition: background 170ms ease, border-color 170ms ease, color 170ms ease, transform 170ms ease, box-shadow 170ms ease;
}

body.admin-theme .btn-sm {
    min-height: 34px;
}

body.admin-theme .tbl-actions {
    gap: 8px;
}

body.admin-theme .tbl-actions .btn {
    border-radius: 8px;
}

body.admin-theme .badge {
    min-height: 24px;
    padding: 4px 10px;
}

body.admin-theme .modal-overlay {
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(6px);
    transition: opacity 220ms ease;
}

body.admin-theme .modal {
    border-radius: 8px;
    max-height: min(90vh, 860px);
    transform: translateY(16px) scale(0.985);
    transition: transform 240ms ease, opacity 220ms ease, background var(--transition), border-color var(--transition);
    opacity: 0;
}

body.admin-theme .modal-overlay.open .modal {
    transform: translateY(0) scale(1);
    opacity: 1;
}

body.admin-theme .modal-header,
body.admin-theme .modal-footer {
    padding: 16px 22px;
}

body.admin-theme .modal-body {
    padding: 22px;
    scroll-behavior: smooth;
}

body.admin-theme .modal-xl {
    max-width: min(1120px, 96vw);
}

body.admin-theme .modal-tabs {
    padding: 8px 10px 0;
    gap: 4px;
    overflow-x: auto;
    flex-wrap: nowrap;
}

body.admin-theme .modal-tab-btn {
    border: 1px solid transparent;
    border-bottom: 2px solid transparent;
    border-radius: 8px 8px 0 0;
    padding: 10px 14px;
    transition: background 170ms ease, border-color 170ms ease, color 170ms ease;
}

body.admin-theme .modal-tab-btn:hover {
    background: #f4f8fe;
}

body.admin-theme .modal-tab-btn.active {
    background: #ffffff;
    border-color: #dfe7f2;
    border-bottom-color: var(--blue);
}

body.admin-theme .modal-tab-panel.active {
    animation: adminPanelIn 180ms ease both;
}

@keyframes adminPanelIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

body.admin-theme .form-section-title {
    padding: 16px 0 9px;
    margin-bottom: 16px;
    color: #536b86;
}

body.admin-theme .page-empty {
    border-radius: 8px;
    background: #f8fbff;
}

body.admin-theme .candidate-offcanvas-backdrop {
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(4px);
    transition: opacity 220ms ease;
}

body.admin-theme .candidate-offcanvas {
    width: min(500px, 100vw);
    border-left-color: #dbe4ef;
    box-shadow: -24px 0 60px rgba(15, 23, 42, 0.18);
    transition: transform 260ms ease;
}

body.admin-theme .candidate-offcanvas-header,
body.admin-theme .candidate-offcanvas-footer {
    padding: 18px 24px;
}

body.admin-theme .candidate-offcanvas-body {
    padding: 20px 24px;
    gap: 16px;
    scroll-behavior: smooth;
}

body.admin-theme .candidate-action-card,
body.admin-theme .candidate-range-row,
body.admin-theme .resume-entry-block {
    border-radius: 8px;
    border-color: #dce6f2;
    background: #fbfdff;
}

body.admin-theme .candidate-segmented span {
    border-radius: 8px;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

body.admin-theme .ss-dropdown,
body.admin-theme .select2-dropdown,
body.admin-theme .flatpickr-calendar {
    border-radius: 8px !important;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16) !important;
}

body.admin-theme .dropzone-wrap,
body.admin-theme .subdomain-badge-wrap {
    border-radius: 8px;
}

body.admin-theme .is-smooth-toggling {
    will-change: max-height, opacity, transform;
}

@media (max-width: 1100px) {
    body.admin-theme .card-header > .d-flex,
    body.admin-theme .card-header form {
        width: 100%;
    }

    body.admin-theme .card-header input.form-control,
    body.admin-theme .card-header select.form-control {
        flex: 1 1 220px;
        width: auto !important;
    }
}

@media (max-width: 768px) {
    body.admin-theme .main-header {
        padding: 12px 14px;
    }

    body.admin-theme .header-info {
        width: 100%;
    }

    body.admin-theme .header-actions {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    body.admin-theme .main-content {
        padding: 14px;
    }

    body.admin-theme .card {
        padding: 14px;
    }

    body.admin-theme .modal-overlay {
        align-items: flex-end;
        padding: 10px;
    }

    body.admin-theme .modal {
        width: 100%;
        max-height: 92vh;
    }

    body.admin-theme .modal-header,
    body.admin-theme .modal-footer,
    body.admin-theme .modal-body {
        padding-left: 16px;
        padding-right: 16px;
    }

    body.admin-theme .modal-footer {
        flex-wrap: wrap;
    }

    body.admin-theme .modal-footer .btn {
        flex: 1 1 auto;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.admin-theme *,
    body.admin-theme *::before,
    body.admin-theme *::after {
        animation-duration: 1ms !important;
        transition-duration: 1ms !important;
        scroll-behavior: auto !important;
    }
}

html[data-theme="dark"] body.admin-theme * {
    scrollbar-color: #41546f transparent;
}

html[data-theme="dark"] body.admin-theme *::-webkit-scrollbar-thumb {
    background-color: #40536d;
}

html[data-theme="dark"] body.admin-theme tbody tr:hover td,
html[data-theme="dark"] body.admin-theme .modal-tab-btn:hover,
html[data-theme="dark"] body.admin-theme .page-empty,
html[data-theme="dark"] body.admin-theme .candidate-action-card,
html[data-theme="dark"] body.admin-theme .candidate-range-row,
html[data-theme="dark"] body.admin-theme .resume-entry-block {
    background: #14243b;
}

html[data-theme="dark"] body.admin-theme .modal-tab-btn.active {
    background: #111b2f;
    border-color: #2b3d56;
    border-bottom-color: var(--blue);
}

/* Final AG Grid table corrections */
body.admin-theme .ag-table-wrapper {
    overflow: visible !important;
    max-height: none !important;
}

body.admin-theme .card:has(.skilluence-ag-grid),
body.admin-theme .main-content {
    overflow: visible !important;
}

/* Outer grid wrapper — no clipping so autoHeight rows are never cut off */
body.admin-theme .skilluence-ag-grid {
    min-height: 0 !important;
    overflow: visible !important;
}

/* ── Stacking context isolation so .ag-header z-index beats rows ── */
/* Create an isolated SC on the root wrapper; all z-index comparisons
   for header vs rows happen inside this SC. */
body.admin-theme .skilluence-ag-grid .ag-root-wrapper {
    isolation: isolate !important;
    position: relative !important;
}

/* Body container gets z-index: 1 — row content lives inside this SC */
body.admin-theme .skilluence-ag-grid .ag-body-viewport {
    position: relative !important;
    z-index: 1 !important;
}

/* Header gets z-index above the body-viewport (2 > 1) so it always
   paints on top of rows that scroll behind it */
body.admin-theme .skilluence-ag-grid .ag-header {
    z-index: 2 !important;
    background: #f7f9fd !important;  /* solid bg covers rows scrolling behind */
}
html[data-theme="dark"] body.admin-theme .skilluence-ag-grid .ag-header {
    background: #17263d !important;
}

/* Pinned-right header needs the same background cover */
body.admin-theme .skilluence-ag-grid .ag-pinned-right-header {
    background: #f7f9fd !important;
}
html[data-theme="dark"] body.admin-theme .skilluence-ag-grid .ag-pinned-right-header {
    background: #17263d !important;
}

/* Prevent browser-level x-overflow on outer wrapper layers only.
   ag-center-cols-viewport is intentionally excluded — it handles its
   own horizontal scroll so center columns can be swiped on small screens. */
body.admin-theme .skilluence-ag-grid .ag-root-wrapper-body,
body.admin-theme .skilluence-ag-grid .ag-root,
body.admin-theme .skilluence-ag-grid .ag-layout-auto-height,
body.admin-theme .skilluence-ag-grid .ag-body {
    overflow-x: hidden !important;
    overflow-y: visible !important;
}

/* Container must not be width-capped — it is the full scroll canvas.
   Rows use visible overflow so cell decorations (shadows, badges) show. */
body.admin-theme .skilluence-ag-grid .ag-center-cols-container {
    max-width: none !important;
    overflow: visible !important;
}

body.admin-theme .skilluence-ag-grid .ag-layout-auto-height .ag-center-cols-viewport,
body.admin-theme .skilluence-ag-grid .ag-layout-auto-height .ag-center-cols-container {
    min-height: 0 !important;
}

body.admin-theme .skilluence-ag-grid .ag-header-cell[col-id="selectedHtml"],
body.admin-theme .skilluence-ag-grid .ag-cell[col-id="selectedHtml"],
body.admin-theme .skilluence-ag-grid .ag-checkbox-cell {
    justify-content: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    text-align: center;
}

body.admin-theme .skilluence-ag-grid .ag-checkbox-header,
body.admin-theme .skilluence-ag-grid .ag-checkbox-cell .ag-html-cell {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.admin-theme .skilluence-ag-grid input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
}

body.admin-theme .skilluence-ag-grid .ag-cell[col-id="actions"] .ag-html-cell,
body.admin-theme .skilluence-ag-grid .ag-cell[col-id="actionsHtml"] .ag-html-cell,
body.admin-theme .skilluence-ag-grid .tbl-actions {
    overflow: visible;
}

body.admin-theme .skilluence-ag-grid .tbl-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 8px;
}

body.admin-theme .skilluence-ag-grid .tbl-actions form {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
}

body.admin-theme .skilluence-ag-grid .tbl-actions .btn,
body.admin-theme .skilluence-ag-grid .tbl-actions form .btn {
    width: 36px !important;
    min-width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
}

body.admin-theme .ag-status-menu {
    position: fixed;
    padding: 6px;
    border: 1px solid #cfdcec;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16);
    display: none;
    z-index: 5000;
}

body.admin-theme .ag-status-menu.open {
    display: grid;
    gap: 4px;
}

body.admin-theme .ag-status-option {
    min-height: 30px;
    border: 0;
    border-radius: 8px;
    padding: 0 10px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

body.admin-theme .ag-status-option.active {
    box-shadow: inset 0 0 0 1px currentColor;
}

body.admin-theme .ag-status-option:hover {
    filter: brightness(0.97);
}

body.admin-theme .ag-status-option.badge-success { background-color: #dcfce7; color: #15803d; }
body.admin-theme .ag-status-option.badge-info { background-color: #f3e8ff; color: #9333ea; }
body.admin-theme .ag-status-option.badge-warning { background-color: #fef3c7; color: #b45309; }
body.admin-theme .ag-status-option.badge-primary { background-color: #dbeafe; color: #1d4ed8; }
body.admin-theme .ag-status-option.badge-danger { background-color: #ffe4e6; color: #be123c; }

html[data-theme="dark"] body.admin-theme .ag-status-menu {
    background: #111b2f;
    border-color: #334861;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.34);
}
html[data-theme="dark"] body.admin-theme .ag-status-option.badge-success { background-color: #14532d; color: #86efac; }
html[data-theme="dark"] body.admin-theme .ag-status-option.badge-info    { background-color: #3b0764; color: #d8b4fe; }
html[data-theme="dark"] body.admin-theme .ag-status-option.badge-warning { background-color: #451a03; color: #fcd34d; }
html[data-theme="dark"] body.admin-theme .ag-status-option.badge-primary { background-color: #1e3a5f; color: #93c5fd; }
html[data-theme="dark"] body.admin-theme .ag-status-option.badge-danger  { background-color: #4c0519; color: #fca5a5; }

body.admin-theme,
body.admin-theme .main-wrapper {
    overflow-x: hidden;
}


/* ══════════════════════════════════════════════════════════════════
   Skeleton loader  —  shows before AG Grid initialises on page load
   ══════════════════════════════════════════════════════════════════ */
.ag-skeleton-wrap {
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e0e7f1;
}
html[data-theme="dark"] .ag-skeleton-wrap {
    background: #17263d;
    border-color: #26374f;
}

.ag-skel-header {
    height: 44px;
    background: #f7f9fd;
    border-bottom: 1px solid #dfe7f2;
    border-radius: 12px 12px 0 0;
}
html[data-theme="dark"] .ag-skel-header {
    background: #17263d;
    border-bottom-color: #26374f;
}

.ag-skel-row {
    height: 64px;
    border-bottom: 1px solid #e6edf5;
    background: linear-gradient(100deg, #f0f4fb 30%, #e2eaf6 50%, #f0f4fb 70%);
    background-size: 350% 100%;
    animation: ag-shimmer 1.6s ease-in-out infinite;
}
.ag-skel-row:last-child { border-bottom: 0; border-radius: 0 0 12px 12px; }
html[data-theme="dark"] .ag-skel-row {
    background: linear-gradient(100deg, #1a2c44 30%, #223655 50%, #1a2c44 70%);
    background-size: 350% 100%;
    border-bottom-color: #26374f;
}

@keyframes ag-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Grid is invisible until onGridReady fires */
.ag-grid-initializing { display: none !important; }

/* ══════════════════════════════════════════════════════════════════
   Infinite-scroll  —  loading indicator at the bottom of each grid
   ══════════════════════════════════════════════════════════════════ */
.ag-load-more-wrap {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 16px;
    color: #6f879f;
    font-size: 13px;
}
.ag-load-more-wrap.is-loading { display: flex; }
html[data-theme="dark"] .ag-load-more-wrap { color: #8faac4; }

.ag-load-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #c5d4e8;
    border-top-color: #1d6ef6;
    border-radius: 50%;
    flex-shrink: 0;
    animation: ag-spin 0.75s linear infinite;
}
html[data-theme="dark"] .ag-load-spinner {
    border-color: #2d4a6a;
    border-top-color: #4b90f5;
}
@keyframes ag-spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════════════════════════
   AG Grid — Unified admin theme for .ag-theme-quartz
   All grids (users, candidates, dashboard) share this base style.
   ══════════════════════════════════════════════════════════════════ */
body.admin-theme .ag-theme-quartz {
    --ag-font-family: "Manrope", "Plus Jakarta Sans", system-ui, sans-serif;
    --ag-font-size: 13px;
    --ag-border-radius: 0;
    --ag-wrapper-border-radius: 0;
    --ag-cell-horizontal-padding: 16px;
    --ag-row-height: 68px;
    --ag-header-height: 60px;
    --ag-background-color: var(--card-bg, #fff);
    --ag-foreground-color: var(--text-primary, #1e293b);
    --ag-header-background-color: var(--main-bg, #f8fafc);
    --ag-border-color: var(--border-color, #e2e8f0);
    --ag-row-border-color: var(--border-color, #e2e8f0);
    --ag-odd-row-background-color: rgba(248, 250, 253, 0.55);
    --ag-row-hover-color: rgba(37, 99, 235, 0.04);
    --ag-selected-row-background-color: transparent;
    --ag-checkbox-border-radius: 4px;
    --ag-checkbox-border-width: 2px;
    --ag-checkbox-border-color: #cbd5e1;
    --ag-checkbox-checked-color: var(--blue, #2563eb);
    --ag-checkbox-indeterminate-color: var(--blue, #2563eb);
    --ag-checkbox-background-color: #fff;
    --ag-checkbox-checked-background-color: var(--blue, #2563eb);
}

body.admin-theme .ag-theme-quartz .ag-root-wrapper {
    border: none;
    overflow: visible;
}

/* Checkbox — single clean border, SVG checkmark */
body.admin-theme .ag-theme-quartz .ag-checkbox-input-wrapper {
    position: relative;
    box-shadow: none !important;
    outline: none !important;
    width: 16px !important;
    height: 16px !important;
    min-width: 16px;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    background: #fff no-repeat center/10px 10px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: border-color 0.15s, background-color 0.15s;
}
body.admin-theme .ag-theme-quartz .ag-checkbox-input-wrapper.ag-checked {
    border-color: var(--blue, #2563eb) !important;
    background-color: var(--blue, #2563eb) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpolyline points='2,6 5,9 10,3' stroke='white' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}
body.admin-theme .ag-theme-quartz .ag-checkbox-input-wrapper.ag-indeterminate {
    border-color: var(--blue, #2563eb) !important;
    background-color: var(--blue, #2563eb) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Crect x='2' y='5' width='8' height='2' rx='1' fill='white'/%3E%3C/svg%3E") !important;
}
/* Native input — visually hidden but fully clickable, overlays the visual wrapper */
body.admin-theme .ag-theme-quartz .ag-checkbox-input-wrapper input[type="checkbox"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    width: 100% !important;
    height: 100% !important;
    margin: 0;
    padding: 0;
    cursor: pointer;
    border: none;
    background: none;
    appearance: none;
    -webkit-appearance: none;
}
/* Hide any ::after content so it doesn't conflict with background-image */
body.admin-theme .ag-theme-quartz .ag-checkbox-input-wrapper::after {
    display: none !important;
}

/* Horizontal scroll: allow center cols to scroll when columns exceed grid width */
body.admin-theme .ag-theme-quartz .ag-center-cols-viewport {
    overflow-x: auto;
}
body.admin-theme .ag-theme-quartz .ag-body-horizontal-scroll {
    display: flex !important;
    overflow-x: auto;
}
body.admin-theme .ag-theme-quartz .ag-body-horizontal-scroll-viewport {
    overflow-x: auto;
}

body.admin-theme .ag-theme-quartz .ag-header {
    background: var(--main-bg, #f8fafc);
    border-bottom: 2px solid var(--border-color, #e2e8f0);
}

body.admin-theme .ag-theme-quartz .ag-header-cell {
    padding: 0 16px;
}

body.admin-theme .ag-theme-quartz .ag-header-cell-text {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary, #64748b);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    white-space: nowrap;
}

body.admin-theme .ag-theme-quartz .ag-row {
    border-bottom: 1px solid var(--border-color, #e2e8f0);
}

body.admin-theme .ag-theme-quartz .ag-cell {
    display: flex !important;
    align-items: center !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: 1.4;
}

/* Stacked date/time text inside cells */
body.admin-theme .ag-theme-quartz .cell-date-stack {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
body.admin-theme .ag-theme-quartz .cell-date-stack .date-main {
    font-size: 13px;
    color: var(--text-primary, #1e293b);
    font-weight: 500;
}
body.admin-theme .ag-theme-quartz .cell-date-stack .date-sub {
    font-size: 11px;
    color: var(--text-muted, #94a3b8);
}

/* Sort icon: always right of header text (AG Grid reverses for numeric/right-aligned cols) */
body.admin-theme .ag-theme-quartz .ag-right-aligned-header .ag-header-cell-label {
    flex-direction: row !important;
}

/* Resize handle — always visible, blue on hover */
body.admin-theme .ag-theme-quartz .ag-header-cell-resize {
    width: 10px;
    cursor: col-resize;
    z-index: 2;
}
body.admin-theme .ag-theme-quartz .ag-header-cell-resize::after {
    content: '';
    display: block;
    width: 4px;
    height: 18px;
    background: #94a3b8;
    margin: 0 auto;
    position: relative;
    top: 0;
    border-radius: 2px;
    transition: background 0.15s, width 0.1s;
}
body.admin-theme .ag-theme-quartz .ag-header-cell-resize:hover::after {
    background: var(--blue, #2563eb);
    width: 3px;
}

/* Avatar rows */
body.admin-theme .ag-theme-quartz .avatar-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
body.admin-theme .ag-theme-quartz .avatar-name {
    font-weight: 500;
    font-size: 13px;
    color: var(--text-primary, #1e293b);
}

/* Action buttons */
body.admin-theme .ag-theme-quartz .tbl-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}
body.admin-theme .ag-theme-quartz .tbl-actions .btn {
    height: 34px !important;
    min-width: 34px !important;
    padding: 0 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
    box-sizing: border-box;
    border-radius: 8px !important;
}

/* ── Pagination Panel ────────────────────────────────────────────── */
body.admin-theme .ag-theme-quartz .ag-paging-panel {
    height: 56px;
    padding: 0 16px;
    gap: 12px;
    border-top: 2px solid var(--border-color, #e2e8f0);
    background: var(--main-bg, #f8fafc);
    font-size: 13px;
    color: var(--text-secondary, #64748b);
    flex-wrap: wrap;
}

body.admin-theme .ag-theme-quartz .ag-paging-page-size {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted, #94a3b8);
}

/* Page size selector — AG Grid v33 custom .ag-select component */
body.admin-theme .ag-theme-quartz .ag-paging-panel .ag-picker-field-wrapper {
    height: 32px !important;
    min-width: 66px;
    border: 1px solid var(--border-color, #e2e8f0) !important;
    border-radius: 8px !important;
    background: var(--card-bg, #fff) !important;
    color: var(--text-primary, #1e293b);
    font-size: 13px;
    padding: 0 10px;
    cursor: pointer;
    box-shadow: none !important;
    transition: border-color .15s, box-shadow .15s;
}
body.admin-theme .ag-theme-quartz .ag-paging-panel .ag-picker-field-wrapper:hover {
    border-color: var(--blue, #2563eb) !important;
}
body.admin-theme .ag-theme-quartz .ag-paging-panel .ag-select.ag-has-focus .ag-picker-field-wrapper {
    border-color: var(--blue, #2563eb) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
}
body.admin-theme .ag-theme-quartz .ag-paging-panel .ag-picker-field-display {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary, #1e293b);
}

/* Navigation icon buttons — first/prev/next/last */
body.admin-theme .ag-theme-quartz .ag-paging-button {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 8px;
    border: 1px solid var(--border-color, #e2e8f0);
    background: var(--card-bg, #fff);
    color: var(--text-secondary, #64748b);
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
body.admin-theme .ag-theme-quartz .ag-paging-button:not(.ag-paging-button--disabled):hover {
    background: var(--blue, #2563eb);
    color: #fff;
    border-color: var(--blue, #2563eb);
}
body.admin-theme .ag-theme-quartz .ag-paging-button.ag-paging-button--disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

body.admin-theme .ag-theme-quartz .ag-paging-page-summary-panel {
    display: flex;
    align-items: center;
    gap: 6px;
}
body.admin-theme .ag-theme-quartz .ag-paging-description {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary, #64748b);
    padding: 0 4px;
    white-space: nowrap;
}
body.admin-theme .ag-theme-quartz .ag-paging-row-summary-panel {
    font-size: 13px;
    color: var(--text-secondary, #64748b);
    white-space: nowrap;
}

/* ── Dark mode ───────────────────────────────────────────────────── */
html[data-theme="dark"] body.admin-theme .ag-theme-quartz {
    --ag-background-color: var(--card-bg, #1e293b);
    --ag-foreground-color: var(--text-primary, #f1f5f9);
    --ag-header-background-color: var(--main-bg, #0f172a);
    --ag-border-color: var(--border-color, #334155);
    --ag-row-border-color: var(--border-color, #334155);
    --ag-odd-row-background-color: rgba(20, 34, 56, 0.4);
    --ag-row-hover-color: rgba(37, 99, 235, 0.08);
    --ag-selected-row-background-color: transparent;
    --ag-checkbox-border-color: #4b6183;
    --ag-checkbox-background-color: #1e293b;
}
html[data-theme="dark"] body.admin-theme .ag-theme-quartz .ag-checkbox-input-wrapper:not(.ag-checked):not(.ag-indeterminate) {
    border-color: #4b6183;
    background-color: #1e293b;
}
html[data-theme="dark"] body.admin-theme .ag-theme-quartz .ag-header {
    background: var(--main-bg, #0f172a);
    border-bottom-color: var(--border-color, #334155);
}
html[data-theme="dark"] body.admin-theme .ag-theme-quartz .ag-header-cell-text {
    color: var(--text-secondary, #94a3b8);
}
html[data-theme="dark"] body.admin-theme .ag-theme-quartz .ag-paging-panel {
    background: var(--main-bg, #0f172a);
    border-top-color: var(--border-color, #334155);
    color: var(--text-secondary, #94a3b8);
}
html[data-theme="dark"] body.admin-theme .ag-theme-quartz .ag-paging-button {
    background: var(--card-bg, #1e293b);
    border-color: var(--border-color, #334155);
    color: var(--text-secondary, #94a3b8);
}
html[data-theme="dark"] body.admin-theme .ag-theme-quartz .ag-paging-panel .ag-picker-field-wrapper {
    background: var(--card-bg, #1e293b) !important;
    border-color: var(--border-color, #334155) !important;
}
html[data-theme="dark"] body.admin-theme .ag-theme-quartz .ag-paging-panel .ag-picker-field-display {
    color: var(--text-primary, #f1f5f9);
}
html[data-theme="dark"] body.admin-theme .ag-theme-quartz .cell-date-stack .date-main {
    color: var(--text-primary, #f1f5f9);
}
html[data-theme="dark"] body.admin-theme .ag-theme-quartz .avatar-name {
    color: var(--text-primary, #f1f5f9);
}
