/* ════════════════════════════════════════════
   SENTINELS — Application Management System
   Global Stylesheet
   ════════════════════════════════════════════ */

/* ── CSS Variables / Theming ── */
:root {
    --bg: #0a0a0a;
    --bg-subtle: #111111;
    --surface: #161616;
    --surface-hover: #1e1e1e;
    --border: #2a2a2a;
    --border-light: #333333;
    --fg: #f0f0f0;
    --fg-secondary: #a0a0a0;
    --muted: #666666;
    --accent: #dc2626;
    --accent-hover: #b91c1c;
    --accent-muted: rgba(220, 38, 38, 0.12);
    --accent-glow: rgba(220, 38, 38, 0.25);
    --green: #16a34a;
    --green-muted: rgba(22, 163, 74, 0.12);
    --blue: #3b82f6;
    --blue-muted: rgba(59, 130, 246, 0.12);
    --yellow: #ca8a04;
    --yellow-muted: rgba(234, 179, 8, 0.12);
    --radius: 10px;
    --radius-lg: 14px;
    --shadow: 0 4px 24px rgba(0,0,0,0.3);
    --shadow-lg: 0 12px 48px rgba(0,0,0,0.4);
    --transition: 0.15s ease;
    --font: 'Plus Jakarta Sans', system-ui, sans-serif;
}

[data-theme="light"] {
    --bg: #f8f8f8;
    --bg-subtle: #f2f2f2;
    --surface: #ffffff;
    --surface-hover: #f5f5f5;
    --border: #e5e5e5;
    --border-light: #d4d4d4;
    --fg: #111111;
    --fg-secondary: #555555;
    --muted: #888888;
    --accent-muted: rgba(220, 38, 38, 0.07);
    --accent-glow: rgba(220, 38, 38, 0.12);
    --green-muted: rgba(22, 163, 74, 0.08);
    --blue-muted: rgba(59, 130, 246, 0.08);
    --yellow-muted: rgba(234, 179, 8, 0.08);
    --shadow: 0 4px 24px rgba(0,0,0,0.06);
    --shadow-lg: 0 12px 48px rgba(0,0,0,0.08);
}

/* ── Selection Highlight ── */
::selection {
    background: rgba(220, 38, 38, 0.25);
    color: var(--fg);
}

/* ── Reset ── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--fg);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

button, input, select, textarea {
    font-family: inherit;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ══════════════════════════════════════
   NAVBAR
   ══════════════════════════════════════ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    backdrop-filter: blur(12px);
}

[data-theme="light"] .navbar {
    background: rgba(255,255,255,0.85);
}

.nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 800;
    color: var(--fg);
    letter-spacing: -0.3px;
}

.nav-logo-text {
    background: linear-gradient(135deg, var(--fg), var(--fg-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--fg-secondary);
    border-radius: 8px;
    transition: all var(--transition);
}

.nav-link:hover {
    color: var(--fg);
    background: var(--surface-hover);
}

.nav-link.active {
    color: var(--accent);
    background: var(--accent-muted);
}

.theme-toggle {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--fg-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all var(--transition);
}

.theme-toggle:hover {
    background: var(--surface-hover);
    color: var(--fg);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
}

.nav-user:hover {
    background: var(--surface-hover);
}

.nav-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--accent-muted);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
}

.nav-user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--fg);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 200px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 110;
    display: none;
    overflow: hidden;
}

.user-dropdown.open {
    display: block;
    animation: dropIn 0.15s ease;
}

@keyframes dropIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--fg-secondary);
    transition: all var(--transition);
}

.user-dropdown a:hover {
    background: var(--surface-hover);
    color: var(--fg);
}

/* ── Mobile Nav ── */
.nav-hamburger {
    display: none;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--fg);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.mobile-nav {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--surface);
    z-index: 95;
    padding: 24px;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
}

.mobile-nav.open {
    display: flex;
    animation: dropIn 0.2s ease;
}

.mobile-nav .nav-link {
    padding: 14px 16px;
    font-size: 16px;
    border-radius: var(--radius);
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-hamburger { display: inline-flex; }
    .nav-user-name { display: none; }
}

/* ══════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    font-family: inherit;
    line-height: 1.4;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-secondary {
    background: var(--surface-hover);
    color: var(--fg);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--border-light);
    background: var(--border);
}

.btn-ghost {
    background: transparent;
    color: var(--fg-secondary);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    background: var(--surface-hover);
    color: var(--fg);
}

.btn-danger {
    background: var(--accent-muted);
    color: var(--accent);
}

.btn-danger:hover {
    background: rgba(220, 38, 38, 0.2);
}

.btn-sm {
    padding: 7px 14px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
    border-radius: var(--radius-lg);
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--fg-secondary);
    cursor: pointer;
    transition: all var(--transition);
    font-size: 14px;
}

.btn-icon:hover {
    background: var(--surface-hover);
    color: var(--fg);
}

/* ══════════════════════════════════════
   FORMS
   ══════════════════════════════════════ */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--fg);
    margin-bottom: 6px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--fg);
    font-size: 14px;
    font-family: inherit;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--muted);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

.form-hint {
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px;
}

.form-error {
    font-size: 12px;
    color: var(--accent);
    margin-top: 4px;
    display: none;
}

.form-error.visible {
    display: block;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ══════════════════════════════════════
   CARDS & PANELS
   ══════════════════════════════════════ */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: border-color var(--transition);
}

.card:hover {
    border-color: var(--border-light);
}

.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 12px;
}

.panel-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--fg);
}

.panel-body {
    padding: 24px;
}

.panel-body.no-pad {
    padding: 0;
}

/* ══════════════════════════════════════
   TABLES
   ══════════════════════════════════════ */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--muted);
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.data-table td {
    padding: 14px 20px;
    font-size: 14px;
    color: var(--fg-secondary);
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr:hover td {
    background: var(--surface-hover);
}

.table-wrap {
    overflow-x: auto;
}

/* ══════════════════════════════════════
   BADGES & TAGS
   ══════════════════════════════════════ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-pending { background: var(--yellow-muted); color: var(--yellow); }
.badge-review { background: var(--blue-muted); color: var(--blue); }
.badge-accepted { background: var(--green-muted); color: var(--green); }
.badge-rejected { background: var(--accent-muted); color: var(--accent); }
.badge-submitted { background: var(--blue-muted); color: var(--blue); }

.badge .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.role-badge.admin { background: var(--accent-muted); color: var(--accent); }
.role-badge.applicant { background: var(--surface-hover); color: var(--muted); }

.cat-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    background: var(--surface-hover);
    color: var(--fg-secondary);
}

/* ══════════════════════════════════════
   MODALS
   ══════════════════════════════════════ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.open {
    display: flex;
}

.modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 520px;
    max-height: 85vh;
    overflow-y: auto;
    animation: modalIn 0.2s ease;
}

.modal-lg { max-width: 680px; }

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.96) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
}

.modal-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--fg);
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 16px;
    transition: all var(--transition);
}

.modal-close:hover {
    background: var(--surface-hover);
    color: var(--fg);
}

.modal-body { padding: 24px; }

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
}

/* ══════════════════════════════════════
   TOAST NOTIFICATIONS
   ══════════════════════════════════════ */
.toast-container {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    font-size: 13px;
    font-weight: 500;
    color: var(--fg);
    min-width: 280px;
    max-width: 400px;
    animation: toastIn 0.3s ease;
    pointer-events: auto;
}

.toast.out {
    animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(40px); }
}

.toast-icon { font-size: 16px; flex-shrink: 0; }
.toast.success .toast-icon { color: var(--green); }
.toast.error .toast-icon { color: var(--accent); }
.toast.info .toast-icon { color: var(--blue); }

/* ══════════════════════════════════════
   SKELETON LOADING
   ══════════════════════════════════════ */
.skeleton {
    background: linear-gradient(90deg, var(--surface-hover) 25%, var(--border) 50%, var(--surface-hover) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 6px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text { height: 14px; margin-bottom: 10px; }
.skeleton-text.w-75 { width: 75%; }
.skeleton-text.w-50 { width: 50%; }
.skeleton-title { height: 22px; width: 40%; margin-bottom: 20px; }
.skeleton-card { height: 120px; border-radius: var(--radius-lg); }
.skeleton-circle { width: 36px; height: 36px; border-radius: 8px; }
.skeleton-row { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }

/* ══════════════════════════════════════
   SEARCH BOX
   ══════════════════════════════════════ */
.search-box {
    position: relative;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 14px;
    pointer-events: none;
}

.search-box .form-input {
    padding-left: 38px;
}

/* ══════════════════════════════════════
   FILTER CHIPS
   ══════════════════════════════════════ */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-chip {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--fg-secondary);
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}

.filter-chip:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.filter-chip.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* ══════════════════════════════════════
   EMPTY STATE
   ══════════════════════════════════════ */
.empty-state {
    text-align: center;
    padding: 60px 24px;
}

.empty-state i {
    font-size: 42px;
    color: var(--muted);
    margin-bottom: 16px;
    display: block;
}

.empty-state h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--fg);
    margin-bottom: 6px;
}

.empty-state p {
    font-size: 13px;
    color: var(--muted);
    max-width: 320px;
    margin: 0 auto;
}

/* ══════════════════════════════════════
   TIMELINE (Status Page)
   ══════════════════════════════════════ */
.timeline {
    position: relative;
    padding-left: 32px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--border);
    border-radius: 1px;
}

.timeline-item {
    position: relative;
    padding-bottom: 28px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -32px;
    top: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.timeline-dot i {
    font-size: 10px;
    color: var(--muted);
}

.timeline-item.active .timeline-dot {
    border-color: var(--accent);
    background: var(--accent-muted);
}

.timeline-item.active .timeline-dot i {
    color: var(--accent);
}

.timeline-item.done .timeline-dot {
    border-color: var(--green);
    background: var(--green-muted);
}

.timeline-item.done .timeline-dot i {
    color: var(--green);
}

.timeline-item.rejected .timeline-dot {
    border-color: var(--accent);
    background: var(--accent-muted);
}

.timeline-item.rejected .timeline-dot i {
    color: var(--accent);
}

.timeline-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--fg);
    margin-bottom: 2px;
}

.timeline-item:not(.active):not(.done):not(.rejected) .timeline-title {
    color: var(--muted);
}

.timeline-desc {
    font-size: 13px;
    color: var(--fg-secondary);
}

.timeline-item:not(.active):not(.done):not(.rejected) .timeline-desc {
    color: var(--muted);
}

.timeline-time {
    font-size: 11px;
    color: var(--muted);
    margin-top: 4px;
}

/* ══════════════════════════════════════
   FILE UPLOAD
   ══════════════════════════════════════ */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 24px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    background: var(--bg);
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--accent);
    background: var(--accent-muted);
}

.upload-zone i {
    font-size: 32px;
    color: var(--muted);
    margin-bottom: 12px;
    display: block;
}

.upload-zone p {
    font-size: 14px;
    color: var(--fg-secondary);
    margin-bottom: 4px;
}

.upload-zone span {
    font-size: 12px;
    color: var(--muted);
}

.upload-zone input[type="file"] {
    display: none;
}

.upload-file-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--surface-hover);
    border-radius: 8px;
    margin-top: 12px;
}

.upload-file-preview i {
    font-size: 20px;
    color: var(--accent);
}

.upload-file-preview .file-name {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: var(--fg);
}

.upload-file-preview .file-size {
    font-size: 12px;
    color: var(--muted);
}

.upload-file-preview .file-remove {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    transition: color var(--transition);
}

.upload-file-preview .file-remove:hover {
    color: var(--accent);
}

/* ══════════════════════════════════════
   AI SCORE RING
   ══════════════════════════════════════ */
.ai-score {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
}

.ai-score.high { background: var(--green-muted); color: var(--green); }
.ai-score.mid { background: var(--yellow-muted); color: var(--yellow); }
.ai-score.low { background: var(--accent-muted); color: var(--accent); }

/* ══════════════════════════════════════
   STAT CARDS
   ══════════════════════════════════════ */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: border-color var(--transition);
}

.stat-card:hover { border-color: var(--border-light); }

.stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 16px;
}

.stat-value {
    font-size: 30px;
    font-weight: 800;
    color: var(--fg);
    line-height: 1;
    margin-bottom: 6px;
}

.stat-label {
    font-size: 13px;
    color: var(--muted);
    font-weight: 500;
}

/* ══════════════════════════════════════
   DASHBOARD SIDEBAR
   ══════════════════════════════════════ */
.dash-wrapper {
    display: flex;
    min-height: 100vh;
    padding-top: 64px;
}

.dash-sidebar {
    width: 256px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    position: fixed;
    top: 64px;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 40;
    transition: transform 0.3s ease;
}

.sidebar-section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--muted);
    padding: 20px 20px 8px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--fg-secondary);
    cursor: pointer;
    transition: all var(--transition);
    border-left: 3px solid transparent;
}

.sidebar-link:hover {
    color: var(--fg);
    background: var(--surface-hover);
}

.sidebar-link.active {
    color: var(--accent);
    background: var(--accent-muted);
    border-left-color: var(--accent);
}

.sidebar-link i { width: 20px; text-align: center; font-size: 15px; }

.sidebar-link .count-badge {
    margin-left: auto;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

.dash-main {
    flex: 1;
    margin-left: 256px;
    padding: 32px;
    min-height: calc(100vh - 64px);
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 39;
}

.sidebar-backdrop.open { display: block; }

.mobile-sidebar-btn {
    display: none;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--fg);
    cursor: pointer;
    font-size: 16px;
}

@media (max-width: 768px) {
    .mobile-sidebar-btn { display: inline-flex; }
    .dash-sidebar { transform: translateX(-100%); }
    .dash-sidebar.open { transform: translateX(0); }
    .dash-main { margin-left: 0; padding: 20px; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
    .stat-grid { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════
   TAB PANELS
   ══════════════════════════════════════ */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ══════════════════════════════════════
   PAGE HEADER
   ══════════════════════════════════════ */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-header h1 {
    font-size: 24px;
    font-weight: 800;
    color: var(--fg);
}

.page-header p {
    font-size: 14px;
    color: var(--muted);
    margin-top: 2px;
}

/* ══════════════════════════════════════
   TWO COLUMN LAYOUT
   ══════════════════════════════════════ */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 900px) {
    .two-col { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════
   NOTIFICATION DROPDOWN
   ══════════════════════════════════════ */
.notif-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 360px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 110;
    display: none;
}

.notif-dropdown.open {
    display: block;
    animation: dropIn 0.15s ease;
}

.notif-item {
    display: flex;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.1s;
}

.notif-item:hover { background: var(--surface-hover); }
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { background: var(--accent-muted); }

.notif-icon-wrap {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 13px;
}

.notif-text { font-size: 13px; color: var(--fg-secondary); line-height: 1.4; }
.notif-time { font-size: 11px; color: var(--muted); margin-top: 3px; }

@media (max-width: 768px) {
    .notif-dropdown { width: calc(100vw - 40px); right: -60px; }
}

/* ══════════════════════════════════════
   MESSAGES
   ══════════════════════════════════════ */
.msg-bubble {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 10px;
}

.msg-bubble.admin-msg {
    background: var(--accent-muted);
    color: var(--fg);
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.msg-bubble.user-msg {
    background: var(--surface-hover);
    color: var(--fg-secondary);
    border-bottom-left-radius: 4px;
}

.msg-meta {
    font-size: 10px;
    color: var(--muted);
    margin-top: 3px;
}

.msg-input-bar {
    display: flex;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid var(--border);
}

.msg-input-bar .form-input { flex: 1; }

/* ══════════════════════════════════════
   ACTIVITY FEED
   ══════════════════════════════════════ */
.activity-item {
    display: flex;
    gap: 14px;
    padding: 14px 24px;
    border-bottom: 1px solid var(--border);
    transition: background 0.1s;
}

.activity-item:last-child { border-bottom: none; }
.activity-item:hover { background: var(--surface-hover); }

.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}

.activity-text {
    font-size: 13px;
    color: var(--fg-secondary);
    line-height: 1.5;
}

.activity-text strong { color: var(--fg); font-weight: 600; }
.activity-time { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ══════════════════════════════════════
   MINI BAR CHART
   ══════════════════════════════════════ */
.mini-bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 140px;
    padding-top: 10px;
}

.mini-bar {
    flex: 1;
    border-radius: 4px 4px 0 0;
    background: var(--accent-muted);
    position: relative;
    min-width: 0;
    transition: height 0.5s ease, background 0.15s;
    cursor: default;
}

.mini-bar:hover { background: var(--accent); }

.mini-bar-label {
    position: absolute;
    bottom: -22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: var(--muted);
    white-space: nowrap;
}

.mini-bar-value {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    font-weight: 700;
    color: var(--fg);
    opacity: 0;
    transition: opacity 0.15s;
}

.mini-bar:hover .mini-bar-value { opacity: 1; }

/* ══════════════════════════════════════
   LANDING PAGE
   ══════════════════════════════════════ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 80px 24px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.hero-bg .orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    animation: orbFloat 20s ease-in-out infinite;
}

.hero-bg .orb:nth-child(1) {
    width: 600px; height: 600px;
    background: var(--accent);
    top: -200px; right: -100px;
    animation-delay: 0s;
}

.hero-bg .orb:nth-child(2) {
    width: 400px; height: 400px;
    background: var(--accent);
    bottom: -150px; left: -100px;
    animation-delay: -7s;
    opacity: 0.08;
}

.hero-bg .orb:nth-child(3) {
    width: 300px; height: 300px;
    background: #f97316;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
    opacity: 0.05;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 720px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: 13px;
    font-weight: 500;
    color: var(--fg-secondary);
    margin-bottom: 28px;
}

.hero-badge i { color: var(--accent); font-size: 12px; }

.hero-title {
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 800;
    color: var(--fg);
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero-title .glow-text {
    color: var(--accent);
    text-shadow: 0 0 40px var(--accent-glow), 0 0 80px rgba(220,38,38,0.1);
}

.hero-subtitle {
    font-size: 18px;
    color: var(--fg-secondary);
    line-height: 1.6;
    margin-bottom: 36px;
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 48px;
    margin-top: 64px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.hero-stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--fg);
}

.hero-stat-label {
    font-size: 13px;
    color: var(--muted);
    margin-top: 2px;
}

/* ── Landing Sections ── */
.landing-section {
    padding: 100px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    color: var(--fg);
    line-height: 1.15;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.section-desc {
    font-size: 16px;
    color: var(--fg-secondary);
    max-width: 560px;
    line-height: 1.6;
    margin-bottom: 48px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: border-color var(--transition), transform var(--transition);
}

.feature-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
}

.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 18px;
}

.feature-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--fg);
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 14px;
    color: var(--fg-secondary);
    line-height: 1.5;
}

/* ── Steps ── */
.steps-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 600px;
}

.step-item {
    display: flex;
    gap: 20px;
    padding: 28px 0;
    border-bottom: 1px solid var(--border);
}

.step-item:last-child { border-bottom: none; }

.step-num {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--accent-muted);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    flex-shrink: 0;
}

.step-item h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--fg);
    margin-bottom: 4px;
}

.step-item p {
    font-size: 14px;
    color: var(--fg-secondary);
    line-height: 1.5;
}

/* ── Footer ── */
.landing-footer {
    border-top: 1px solid var(--border);
    padding: 40px 24px;
    text-align: center;
}

.landing-footer p {
    font-size: 13px;
    color: var(--muted);
}

.landing-footer a {
    color: var(--accent);
    font-weight: 600;
}

/* ══════════════════════════════════════
   LOGIN PAGE
   ══════════════════════════════════════ */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.login-wrapper .hero-bg {
    opacity: 0.4;
}

.login-card {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 420px;
}

.login-card .panel { box-shadow: var(--shadow-lg); }

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo i {
    font-size: 28px;
    color: var(--accent);
    margin-bottom: 10px;
    display: block;
}

.login-logo span {
    font-size: 22px;
    font-weight: 800;
    color: var(--fg);
    letter-spacing: -0.3px;
}

.login-hint {
    margin-top: 20px;
    padding: 14px 16px;
    background: var(--surface-hover);
    border-radius: 8px;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.6;
}

.login-hint code {
    background: var(--border);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 12px;
    color: var(--fg-secondary);
}

/* ══════════════════════════════════════
   PROFILE PAGE
   ══════════════════════════════════════ */
.profile-header-card {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 32px;
    flex-wrap: wrap;
}

.profile-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    background: var(--accent-muted);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 800;
    flex-shrink: 0;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.profile-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar-large .avatar-edit {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition);
    font-size: 16px;
    color: #fff;
}

.profile-avatar-large:hover .avatar-edit {
    opacity: 1;
}

.profile-info h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--fg);
    margin-bottom: 4px;
}

.profile-info p {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 2px;
}

/* ══════════════════════════════════════
   APPLY PAGE
   ══════════════════════════════════════ */
.app-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: border-color var(--transition), transform var(--transition);
    cursor: pointer;
}

.app-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
}

.app-card h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--fg);
    margin-bottom: 8px;
}

.app-card p {
    font-size: 13px;
    color: var(--fg-secondary);
    line-height: 1.5;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.app-card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.app-card-meta span {
    font-size: 12px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

.app-card-meta .deadline-warn { color: var(--accent); font-weight: 600; }

/* ── Confirmation Preview ── */
.confirm-preview {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
}

.confirm-preview h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--fg);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.confirm-field {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
}

.confirm-field:last-child { border-bottom: none; }

.confirm-field .label {
    color: var(--muted);
    font-weight: 500;
}

.confirm-field .value {
    color: var(--fg);
    font-weight: 600;
    text-align: right;
    max-width: 60%;
}

/* ══════════════════════════════════════
   ACTION MENU (Dropdown)
   ══════════════════════════════════════ */
.action-menu {
    position: relative;
    display: inline-block;
}

.action-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 60;
    min-width: 170px;
    display: none;
    overflow: hidden;
}

.action-dropdown.open {
    display: block;
    animation: dropIn 0.12s ease;
}

.action-dropdown button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: transparent;
    font-size: 13px;
    font-weight: 500;
    color: var(--fg-secondary);
    cursor: pointer;
    transition: background 0.1s;
    font-family: inherit;
    text-align: left;
}

.action-dropdown button:hover { background: var(--surface-hover); }
.action-dropdown button.danger { color: var(--accent); }
.action-dropdown button i { width: 16px; text-align: center; }

/* ══════════════════════════════════════
   CONVERSATION LIST ITEM
   ══════════════════════════════════════ */
.conv-item {
    display: flex;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.1s;
}

.conv-item:hover { background: var(--surface-hover); }
.conv-item.active { background: var(--accent-muted); }

.conv-avatar {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--accent-muted);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.conv-info { flex: 1; min-width: 0; }
.conv-name { font-size: 14px; font-weight: 600; color: var(--fg); }
.conv-preview { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.conv-time { font-size: 11px; color: var(--muted); flex-shrink: 0; }

/* ══════════════════════════════════════
   UTILITY
   ══════════════════════════════════════ */
.text-accent { color: var(--accent); }
.text-muted { color: var(--muted); }
.text-green { color: var(--green); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.fw-700 { font-weight: 700; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }

/* ══════════════════════════════════════
   REDUCED MOTION
   ══════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}