/* ======================================
   DESIGN TOKENS
   ====================================== */
:root {
    --font: 'Plus Jakarta Sans', system-ui, sans-serif;
    --sidebar-bg: #0F172A;
    --sidebar-w: 240px;
    --sidebar-hover: rgba(255, 255, 255, .06);
    --sidebar-active: rgba(99, 102, 241, .18);
    --accent: #4F46E5;
    --accent-hover: #6366F1;
    --accent-light: rgba(79, 70, 229, .07);
    --bg: #F1F5F9;
    --bg-white: #fff;
    --text: #0F172A;
    --text-secondary: #475569;
    --text-muted: #94A3B8;
    --border: #E2E8F0;
    --radius: 12px;
    --radius-lg: 18px;
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, .04), 0 1px 2px rgba(15, 23, 42, .02);
    --shadow-md: 0 4px 20px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .04);
    --shadow-lg: 0 10px 40px rgba(15, 23, 42, .08), 0 2px 6px rgba(15, 23, 42, .04);
    --transition: .25s cubic-bezier(.4,0,.2,1);
}

/* ======================================
   KEYFRAME ANIMATIONS
   ====================================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.96); }
    to   { opacity: 1; transform: scale(1); }
}

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

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(79, 70, 229, .3); }
    50%      { box-shadow: 0 0 0 8px rgba(79, 70, 229, 0); }
}

/* ======================================
   RESET & GLOBALS
   ====================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html,
body {
    height: 100%;
    font-family: var(--font);
    font-size: 15px;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ======================================
   BOTTOM TAB BAR (base – hidden on desktop)
   ====================================== */
.btab-bar,
.btab-more-sheet,
.btab-more-overlay {
    display: none;
}

/* ======================================
   SIDEBAR
   ====================================== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-w);
    background: linear-gradient(180deg, #0F172A 0%, #1E293B 100%);
    display: flex;
    flex-direction: column;
    z-index: 500;
    transition: transform .3s ease;
    border-right: 1px solid rgba(255, 255, 255, .04);
}

.sidebar-top {
    padding: 24px 20px 16px;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -.03em;
    background: linear-gradient(135deg, #fff 0%, #94A3B8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-help {
    background: none;
    border: none;
    color: rgba(255, 255, 255, .35);
    font-size: 1.1rem;
    cursor: pointer;
    transition: color .15s;
}

.sidebar-help:hover {
    color: #fff;
}

.sidebar-new-btn {
    width: 100%;
    padding: 12px 0;
    background: linear-gradient(135deg, var(--accent) 0%, #7C3AED 100%);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: .92rem;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: all .25s;
    box-shadow: 0 4px 14px rgba(79, 70, 229, .35);
    position: relative;
    overflow: hidden;
}

.sidebar-new-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,.15) 0%, transparent 60%);
    opacity: 0;
    transition: opacity .25s;
}

.sidebar-new-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, .45);
}

.sidebar-new-btn:hover::before {
    opacity: 1;
}

/* ── Nav Links ── */
.sidebar-nav {
    flex: 1;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    color: rgba(255, 255, 255, .55);
    font-size: .88rem;
    font-weight: 500;
    text-decoration: none;
    transition: all .2s;
    border-radius: 10px;
    position: relative;
}

.nav-item:hover {
    background: var(--sidebar-hover);
    color: rgba(255, 255, 255, .9);
}

.nav-item.active {
    background: var(--sidebar-active);
    color: #fff;
    font-weight: 600;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--accent);
    border-radius: 0 3px 3px 0;
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: .9rem;
}

/* ── Sidebar Bottom ── */
.sidebar-bottom {
    padding: 14px 18px;
    border-top: 1px solid rgba(255, 255, 255, .06);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0 14px;
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, .5);
    font-size: .8rem;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: .8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, .85);
}

.user-email {
    font-size: .7rem;
    color: rgba(255, 255, 255, .4);
}

.sidebar-bottom .nav-item {
    padding: 10px 14px;
}

/* ======================================
   MOBILE TOPBAR
   ====================================== */
.mobile-topbar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    z-index: 600;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    border-bottom: 1px solid rgba(255,255,255,.06);
}

.mobile-topbar .topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.mobile-topbar .topbar-logo {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #fff 0%, #94A3B8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mobile-topbar .topbar-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255,255,255,.85);
    background: linear-gradient(135deg, rgba(99,102,241,.35), rgba(139,92,246,.25));
    border: 1px solid rgba(255,255,255,.1);
}

.mobile-topbar .topbar-hamburger {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.1);
    color: rgba(255,255,255,.8);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.mobile-topbar .topbar-hamburger:active {
    background: rgba(255,255,255,.25);
}

/* Legacy hamburger (hidden when topbar present) */
.mobile-hamburger {
    display: none;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 640;
    opacity: 0;
    transition: opacity 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* ======================================
   MAIN CONTENT
   ====================================== */
.main-content {
    margin-left: var(--sidebar-w);
    padding: 36px 48px 60px;
    min-height: 100vh;
    max-width: 1280px;
    animation: fadeIn .4s ease;
}

/* ======================================
   WELCOME HERO
   ====================================== */
.welcome-hero {
    background:
        radial-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
        linear-gradient(135deg, #0F172A 0%, #1E1B4B 30%, #312E81 55%, #4338CA 80%, #6366F1 100%);
    background-size: 22px 22px, 100% 100%;
    border-radius: var(--radius-lg);
    padding: 48px 52px 44px;
    margin-bottom: 40px;
    color: #fff;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.08);
    animation: fadeInUp .5s ease;
}

.welcome-hero::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -60px;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(139, 92, 246, .25) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.welcome-hero::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: 20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(99, 102, 241, .2) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite 1s;
}

.welcome-text {
    position: relative;
    z-index: 1;
}

.welcome-text h1 {
    font-size: 2.1rem;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -.03em;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(135deg, #93C5FD 0%, #818CF8 40%, #C084FC 80%, #F0ABFC 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 4s linear infinite;
}

.welcome-text p {
    font-size: .95rem;
    color: rgba(255, 255, 255, .6);
    max-width: 520px;
    line-height: 1.7;
}

.welcome-actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
    position: relative;
    z-index: 1;
}

.welcome-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 26px;
    border-radius: var(--radius);
    font-size: .88rem;
    font-weight: 600;
    font-family: var(--font);
    text-decoration: none;
    transition: all .25s;
    cursor: pointer;
    border: none;
}

.welcome-btn.primary {
    background: #fff;
    color: var(--sidebar-bg);
    box-shadow: 0 2px 12px rgba(0, 0, 0, .15);
}

.welcome-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, .2);
}

.welcome-btn.secondary {
    background: rgba(255, 255, 255, .1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .15);
    backdrop-filter: blur(8px);
}

.welcome-btn.secondary:hover {
    background: rgba(255, 255, 255, .18);
    border-color: rgba(255, 255, 255, .25);
}

.welcome-stats {
    display: flex;
    gap: 16px;
    margin-top: 32px;
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    position: relative;
    z-index: 1;
}

.stat-item {
    text-align: center;
    background: rgba(255,255,255,.07);
    padding: 16px 24px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .06);
    backdrop-filter: blur(8px);
    transition: all .25s;
    min-width: 90px;
}

.stat-item:hover {
    background: rgba(255,255,255,.12);
    transform: translateY(-2px);
}

.stat-number {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -.02em;
}

.stat-label {
    font-size: .7rem;
    color: rgba(255, 255, 255, .45);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 600;
    margin-top: 2px;
}

/* ======================================
   SECTIONS
   ====================================== */
.dash-section {
    margin-bottom: 40px;
    animation: fadeInUp .5s ease backwards;
}

.dash-section:nth-child(2) { animation-delay: .1s; }
.dash-section:nth-child(3) { animation-delay: .15s; }
.dash-section:nth-child(4) { animation-delay: .2s; }

.section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-title-row h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-icon {
    color: var(--accent);
    font-size: 1.05rem;
}

.section-arrow {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-white);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    transition: all .25s;
}

.section-arrow:hover {
    border-color: var(--accent);
    color: #fff;
    background: var(--accent);
    transform: translateX(2px);
}

/* ======================================
   ROLE BADGES (Sidebar)
   ====================================== */
.recruiter-badge-logo {
    font-size: 0.55rem;
    background: #7E22CE;
    color: white;
    padding: 2px 7px;
    border-radius: 4px;
    margin-left: 8px;
    vertical-align: super;
    font-weight: 700;
    letter-spacing: 0.05em;
}

/* ======================================
   SHARED FORM CONTROLS
   ====================================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-white);
    color: var(--text);
    font-family: var(--font);
    font-size: 0.95rem;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

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

.btn-submit {
    padding: 12px 24px;
    background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: all .25s;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.25);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.35);
}

/* ======================================
   SHARED TABLE ACTION BUTTONS
   ====================================== */
.tbl-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid #E4E8F1;
    background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFD 100%);
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: all 0.2s;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06);
}

.tbl-btn:hover {
    background: #fff;
    color: var(--text);
    border-color: #CBD5E1;
    transform: translateY(-1px);
}

.tbl-btn.warn:hover {
    background: #FEF3C7;
    color: #D97706;
    border-color: #FCD34D;
}

.tbl-btn.danger:hover {
    background: #FEF2F2;
    color: #DC2626;
    border-color: #FECACA;
}

/* ======================================
   BREADCRUMB
   ====================================== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 0.82rem;
}

.breadcrumb-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.breadcrumb-link:hover {
    color: var(--accent);
}

.breadcrumb-sep {
    color: #CBD5E1;
    font-size: 0.7rem;
}

.breadcrumb-current {
    color: var(--text);
    font-weight: 600;
}

/* ======================================
   CARD GRID
   ====================================== */
.card-grid {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: #CBD5E1 transparent;
}

.card-grid::-webkit-scrollbar {
    height: 4px;
}

.card-grid::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 2px;
}

.doc-card {
    flex-shrink: 0;
    width: 210px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--bg-white);
    overflow: hidden;
    cursor: pointer;
    transition: all .3s cubic-bezier(.4,0,.2,1);
    text-decoration: none;
    color: inherit;
}

.doc-card:hover {
    box-shadow: 0 12px 40px rgba(15, 23, 42, .1);
    border-color: transparent;
    transform: translateY(-4px);
}

/* Create card */
.doc-card-create {
    border: 2px dashed #CBD5E1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    background: linear-gradient(180deg, rgba(79, 70, 229, .01), rgba(79, 70, 229, .04));
}

.doc-card-create:hover {
    border-color: var(--accent);
    background: linear-gradient(180deg, rgba(79, 70, 229, .03), rgba(79, 70, 229, .08));
    box-shadow: 0 8px 30px rgba(79, 70, 229, .08);
}

.create-inner {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.create-label {
    font-size: .9rem;
    color: var(--text);
    font-weight: 600;
}

.create-sub {
    font-size: .75rem;
    color: var(--text-muted);
}

.create-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.1rem;
    transition: all .3s;
    margin-bottom: 4px;
}

.doc-card-create:hover .create-icon {
    background: var(--accent);
    color: #fff;
    transform: scale(1.05) rotate(90deg);
    box-shadow: 0 4px 16px rgba(79, 70, 229, .3);
}

/* Existing doc card */
.doc-card-existing {
    position: relative;
}

.doc-card-thumb {
    width: 100%;
    height: 196px;
    background: linear-gradient(180deg, #F8FAFC 0%, #EEF2FF 100%);
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    position: relative;
}

.doc-card-thumb .cv-mini {
    width: 120px;
    margin-top: 14px;
    border-radius: 3px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
    overflow: hidden;
    background: #fff;
}

.cv-mini-header {
    background: var(--accent);
    height: 30px;
    position: relative;
}

.cv-mini-header-label {
    position: absolute;
    top: 5px;
    left: 7px;
    font-size: .28rem;
    color: rgba(255, 255, 255, .8);
    font-weight: 600;
    letter-spacing: .03em;
}

.cv-mini-body {
    padding: 7px 9px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.cv-mini-line {
    height: 2px;
    background: #e0e0e0;
    border-radius: 1px;
}

.cv-mini-line.w60 {
    width: 60%;
}

.cv-mini-line.w80 {
    width: 80%;
}

.cv-mini-line.w40 {
    width: 40%;
}

.cv-mini-line.w30 {
    width: 30%;
}

.cv-mini-line.w90 {
    width: 90%;
}

.cv-mini-line.w100 {
    width: 100%;
}

.cv-mini-wave {
    height: 7px;
    background: var(--accent);
    clip-path: ellipse(55% 100% at 10% 100%);
    margin-top: auto;
}

.doc-card-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .92);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    color: var(--text-muted);
    opacity: 0;
    transition: all .2s;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(4px);
}

.doc-card-existing:hover .doc-card-actions {
    opacity: 1;
}

.doc-card-actions:hover {
    background: #fff;
    color: var(--text);
}

.doc-card-footer {
    padding: 14px 16px 14px;
}

.doc-card-name {
    font-size: .88rem;
    font-weight: 650;
    color: var(--text);
    margin-bottom: 4px;
}

.doc-card-date {
    font-size: .73rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Action Menu */
.card-action-menu {
    display: none;
    position: absolute;
    top: 44px;
    right: 10px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    padding: 6px 0;
    z-index: 100;
    min-width: 160px;
}

.card-action-menu.open {
    display: block;
}

.card-action-menu button {
    width: 100%;
    border: none;
    background: none;
    padding: 10px 16px;
    text-align: left;
    font-size: .85rem;
    font-family: var(--font);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background .1s;
}

.card-action-menu button:hover {
    background: #f5f5f5;
}

.card-action-menu button.danger {
    color: #DC2626;
}

.card-action-menu button.danger:hover {
    background: #FEF2F2;
}

/* ======================================
   DASH ROW
   ====================================== */
.dash-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    animation: fadeInUp .5s ease backwards;
    animation-delay: .25s;
}

.dash-section-half {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 24px 28px;
    transition: all .25s;
}

.dash-section-half:hover {
    box-shadow: var(--shadow-md);
    border-color: #CBD5E1;
}

.dash-section-half .section-title-row {
    margin-bottom: 14px;
}

/* ======================================
   SHARED ENTITY BLOCKS
   ====================================== */
.entity-block {
    min-width: 0;
}

.entity-title {
    display: block;
    font-size: .92rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.35;
}

.entity-sub {
    display: block;
    font-size: .76rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.entity-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid #E6EAF3;
    background: #F8FAFD;
    color: var(--text-secondary);
    font-size: .72rem;
    font-weight: 500;
}

.meta-chip i {
    font-size: .68rem;
    color: var(--text-muted);
    flex-shrink: 0;
    width: 14px;
    text-align: center;
}

.table-value {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    text-align: left;
}

.table-note {
    font-size: .74rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.table-metric {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -.02em;
}

.document-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 600;
    white-space: nowrap;
}

.document-chip.success {
    background: #ECFDF5;
    color: #047857;
}

.document-chip.accent {
    background: #F5F3FF;
    color: #7C3AED;
}

.document-chip.muted {
    background: #F3F4F6;
    color: #6B7280;
}

.app-status-badge {
    padding: 6px 10px;
    border-radius: 999px;
    white-space: nowrap;
    font-size: .72rem;
    font-weight: 600;
}

.app-status-badge.is-submitted {
    background: #EFF6FF;
    color: #2563EB;
}

.app-status-badge.is-reviewed {
    background: #EEF2FF;
    color: #4F46E5;
}

.app-status-badge.is-shortlisted {
    background: #F5F3FF;
    color: #7C3AED;
}

.app-status-badge.is-rejected {
    background: #FEF2F2;
    color: #DC2626;
}

/* ======================================
   JOBS
   ====================================== */
.job-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.job-item {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 16px;
    padding: 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--bg-white);
    cursor: default;
    transition: all .25s cubic-bezier(.4,0,.2,1);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.job-item::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: linear-gradient(180deg, var(--job-accent, #4F46E5), rgba(79, 70, 229, 0));
    border-radius: 0 2px 2px 0;
}

.job-item::after {
    content: '';
    position: absolute;
    top: -30px;
    right: -24px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, var(--job-accent-soft, rgba(79, 70, 229, 0.06)) 0%, rgba(255, 255, 255, 0) 72%);
    pointer-events: none;
}

.job-item:hover {
    border-color: #CBD5E1;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .08);
    transform: translateY(-2px);
}

.job-avatar {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.18);
    position: relative;
    z-index: 1;
}

.job-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.job-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.job-heading {
    min-width: 0;
}

.job-kicker {
    display: block;
    margin-bottom: 6px;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--job-accent, #3B4BA6);
}

.job-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.job-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .74rem;
    font-weight: 600;
    color: #334155;
    background: rgba(255, 255, 255, 0.86);
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #E5EAF5;
    white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.job-meta-pill i {
    font-size: .68rem;
    color: var(--text-muted);
    flex-shrink: 0;
    width: 14px;
    text-align: center;
}

.job-insights {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.job-insight {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: .76rem;
    color: var(--text-secondary);
}

.job-insight i {
    color: var(--job-accent, #3B4BA6);
    flex-shrink: 0;
    width: 14px;
    text-align: center;
}

.job-insight strong {
    color: var(--text);
}

.job-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.job-footnote {
    font-size: .75rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.job-apply-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    font-size: .8rem;
    font-weight: 700;
    font-family: var(--font);
    background: linear-gradient(135deg, var(--accent) 0%, #7C3AED 100%);
    color: #fff;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition: all .25s;
    box-shadow: 0 4px 14px rgba(79, 70, 229, .25);
}

.job-apply-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(79, 70, 229, .35);
}

.job-applied-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .8rem;
    font-weight: 700;
    color: #059669;
}

.job-badge {
    font-size: .68rem;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: .06em;
    flex-shrink: 0;
    border: 1px solid transparent;
    align-self: flex-start;
    white-space: nowrap;
}

.job-badge.new {
    background: #DBEAFE;
    color: #2563EB;
}

.job-badge.hot {
    background: #FEE2E2;
    color: #DC2626;
}

.job-badge.is-open {
    background: #F8FAFC;
    border-color: #E2E8F0;
    color: #475569;
}

.job-badge.is-applied {
    background: #ECFDF5;
    color: #059669;
}

.job-badge.is-submitted {
    background: #EFF6FF;
    color: #2563EB;
}

.job-badge.is-reviewed {
    background: #EEF2FF;
    color: #4F46E5;
}

.job-badge.is-shortlisted {
    background: #F5F3FF;
    color: #7C3AED;
}

.job-badge.is-rejected {
    background: #FEF2F2;
    color: #DC2626;
}

.job-item-application {
    grid-template-columns: 46px minmax(0, 1fr);
    padding: 16px 18px;
}

.job-item-application .job-avatar {
    width: 38px;
    height: 38px;
    font-size: 0.82rem;
    border-radius: 12px;
}

.job-empty-state {
    padding: 28px 20px;
    border: 1px dashed #D9DFED;
    border-radius: 18px;
    background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFD 100%);
    text-align: center;
    color: var(--text-muted);
}

.job-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    margin-bottom: 12px;
    border-radius: 16px;
    background: #EEF2FF;
    color: #4F46E5;
    font-size: 1.25rem;
}

.job-empty-state p {
    font-size: .92rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.job-empty-state span {
    font-size: .76rem;
    line-height: 1.5;
}

/* ======================================
   APPLICATIONS
   ====================================== */
.app-list {
    min-height: 80px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.app-empty {
    text-align: center;
    padding: 32px 16px 20px;
    color: var(--text-muted);
}

.app-empty-icon {
    font-size: 2.2rem;
    color: #CBD5E1;
    margin-bottom: 10px;
}

.app-empty p {
    font-size: .9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.app-empty span {
    font-size: .78rem;
    color: var(--text-muted);
}

.add-app-btn {
    width: 100%;
    padding: 14px;
    border: 2px dashed #CBD5E1;
    border-radius: var(--radius);
    background: none;
    color: var(--text-muted);
    font-size: .85rem;
    font-family: var(--font);
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all .25s;
    margin-top: 12px;
}

.add-app-btn:hover {
    border-color: var(--accent);
    color: #fff;
    background: var(--accent);
    box-shadow: 0 4px 14px rgba(79, 70, 229, .2);
}

/* ======================================
   APPLICATION MODAL
   ====================================== */
.app-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.app-modal {
    background: #fff;
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 92%;
    padding: 2rem;
    box-shadow: 0 24px 64px rgba(15, 23, 42, .2);
    animation: scaleIn .25s ease;
}

.app-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.app-modal-header h2 {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text);
}

.app-modal-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
}

.app-modal-close:hover {
    background: #F1F5F9;
    color: var(--text);
}

.app-modal-job-info {
    background: #F8FAFC;
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
}

.app-modal-title {
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 4px;
    color: var(--text);
}

.app-modal-company {
    color: var(--text-muted);
    font-size: 0.88rem;
}

.app-modal-field {
    margin-bottom: 1.25rem;
}

.app-modal-field label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.app-modal-select {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 0.92rem;
    color: var(--text);
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
}

select.app-modal-select {
    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='%2394A3B8' 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 12px center;
    padding-right: 36px;
}

.app-modal-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.app-modal-notice {
    padding: 0.75rem 1rem;
    background: #FFFBEB;
    border: 1px solid #FEF3C7;
    border-radius: var(--radius);
    color: #92400E;
    font-size: 0.83rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.app-modal-notice i {
    margin-right: 4px;
}

.app-modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.app-modal-cancel {
    padding: 0.7rem 1.5rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font);
    font-size: .9rem;
    color: var(--text-secondary);
    transition: all .2s;
}

.app-modal-cancel:hover {
    background: #F8FAFC;
    border-color: #CBD5E1;
}

.app-modal-submit {
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--accent) 0%, #7C3AED 100%);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font);
    font-size: .9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all .25s;
    box-shadow: 0 4px 14px rgba(79, 70, 229, .25);
}

.app-modal-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, .35);
}

/* ── Application Modal: Scrollable + Wider ── */
.app-modal {
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

/* ── Job Details Expandable ── */
.app-modal-details {
    margin-bottom: 1.25rem;
}

.app-modal-details-toggle {
    background: none;
    border: none;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    font-family: var(--font);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 0;
    transition: color .2s;
}

.app-modal-details-toggle:hover {
    color: #7C3AED;
}

.app-modal-details-body {
    margin-top: 12px;
    padding: 16px;
    background: #F8FAFC;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-height: 280px;
    overflow-y: auto;
}

.app-detail-block {
    margin-bottom: 14px;
}

.app-detail-block:last-child {
    margin-bottom: 0;
}

.app-detail-block h4 {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.app-detail-block h4 i {
    font-size: 0.78rem;
    color: var(--accent);
}

.app-detail-block p {
    font-size: 0.85rem;
    color: var(--text-secondary, #475569);
    line-height: 1.6;
    white-space: pre-line;
}

.app-detail-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.app-detail-chip {
    display: inline-block;
    padding: 4px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 20px;
    background: #EEF2FF;
    color: #4338CA;
}

.app-detail-chip.benefit {
    background: #F0FDF4;
    color: #166534;
}

/* ── Document Source Tabs ── */
.app-doc-source-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 10px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.app-doc-tab {
    flex: 1;
    padding: 8px 12px;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: var(--font);
    border: none;
    background: #fff;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all .2s;
}

.app-doc-tab + .app-doc-tab {
    border-left: 1.5px solid var(--border);
}

.app-doc-tab.active {
    background: var(--accent);
    color: #fff;
}

.app-doc-tab:not(.active):hover {
    background: #F1F5F9;
}

/* ── File Upload Box ── */
.app-file-upload-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 28px 20px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: border-color .25s, background .25s, box-shadow .25s, transform .15s;
    text-align: center;
    color: var(--text-muted);
    background: #F8FAFC;
    position: relative;
}

.app-file-upload-box i {
    font-size: 2rem;
    color: var(--accent);
    transition: transform .25s, color .25s;
}

.app-file-upload-box span {
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.4;
}

.app-file-upload-box .upload-hint {
    font-size: 0.72rem;
    color: var(--text-muted);
    opacity: .7;
}

.app-file-upload-box:hover {
    border-color: var(--accent);
    background: #EEF2FF;
    box-shadow: 0 0 0 4px rgba(99,102,241,.08);
    transform: translateY(-1px);
}

.app-file-upload-box:hover i {
    transform: translateY(-2px);
    color: #4F46E5;
}

.app-file-upload-box:active {
    transform: translateY(0);
    box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}

.app-file-upload-box.has-file {
    border-color: #059669;
    border-style: solid;
    background: #F0FDF4;
    box-shadow: 0 0 0 3px rgba(5,150,105,.08);
}

.app-file-upload-box.has-file i {
    color: #059669;
}

.app-file-name {
    margin-top: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #059669;
    display: flex;
    align-items: center;
    gap: 6px;
}

.app-file-name::before {
    content: '\f058';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.9rem;
}

/* ── Multi-Document Checklist ── */
.app-docs-checklist {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 4px;
}

.app-doc-check-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 10px;
    cursor: pointer;
    transition: background .15s, border-color .15s, box-shadow .15s;
    background: #fff;
    font-size: 0.84rem;
}

.app-doc-check-item:hover {
    background: #F8FAFC;
    border-color: var(--accent, #4F46E5);
}

.app-doc-check-item input[type="checkbox"] {
    accent-color: var(--accent, #4F46E5);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.app-doc-check-item .doc-icon {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
    color: #fff;
}

.app-doc-check-item .doc-icon.cv { background: linear-gradient(135deg, #4F46E5, #818cf8); }
.app-doc-check-item .doc-icon.cl { background: linear-gradient(135deg, #7E22CE, #c084fc); }

.app-doc-check-item .doc-name {
    flex: 1;
    font-weight: 600;
    color: var(--text, #1e293b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-doc-check-item .doc-type-label {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    flex-shrink: 0;
}

.app-doc-check-item .doc-type-label.cv { background: #EEF2FF; color: #4F46E5; }
.app-doc-check-item .doc-type-label.cl { background: #F5F3FF; color: #7E22CE; }

.app-doc-check-item.checked {
    border-color: var(--accent, #4F46E5);
    background: #EEF2FF;
    box-shadow: 0 0 0 2px rgba(79,70,229,0.08);
}

/* ── Uploaded Files List ── */
.app-uploaded-files {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.app-uploaded-file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 500;
    color: #16a34a;
}

.app-uploaded-file-item .file-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-uploaded-file-item .file-remove {
    background: none;
    border: none;
    color: #DC2626;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 2px 6px;
    border-radius: 6px;
    transition: background .15s;
}

.app-uploaded-file-item .file-remove:hover {
    background: rgba(220,38,38,0.1);
}

/* ======================================
   RESPONSIVE
   ====================================== */
@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
        border-radius: 0 18px 18px 0;
        z-index: 650;
        box-shadow: 4px 0 30px rgba(0,0,0,0.25);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .mobile-topbar {
        display: flex;
    }

    .main-content {
        margin-left: 0;
        padding: 72px 20px 100px;
    }

    /* ── Bottom Tab Bar (seeker dashboard) ── */
    .btab-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 64px;
        background: linear-gradient(180deg, #0F172A 0%, #1E293B 100%);
        border-top: 1px solid rgba(255,255,255,.06);
        z-index: 800;
        align-items: center;
        justify-content: space-around;
        padding: 0 8px;
        padding-bottom: env(safe-area-inset-bottom, 0);
    }

    .btab-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3px;
        padding: 8px 12px;
        color: rgba(255,255,255,.45);
        text-decoration: none;
        font-size: 0.62rem;
        font-weight: 600;
        border-radius: 10px;
        transition: all .2s;
        border: none;
        background: none;
        cursor: pointer;
        font-family: var(--font);
        -webkit-tap-highlight-color: transparent;
    }

    .btab-item i {
        font-size: 1.1rem;
    }

    .btab-item.btab-active {
        color: #818CF8;
    }

    .btab-item.btab-active i {
        filter: drop-shadow(0 0 6px rgba(129,140,248,.4));
    }

    /* More sheet */
    .btab-more-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.45);
        z-index: 850;
    }

    .btab-more-overlay.btab-overlay-active {
        display: block;
    }

    .btab-more-sheet {
        display: block;
        position: fixed;
        bottom: -100%;
        left: 0;
        right: 0;
        background: #1E293B;
        border-radius: 20px 20px 0 0;
        z-index: 860;
        padding: 20px 20px 32px;
        transition: bottom .3s cubic-bezier(.4,0,.2,1);
    }

    .btab-more-sheet.btab-sheet-open {
        bottom: 0;
    }

    .btab-more-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 16px;
        color: rgba(255,255,255,.85);
        font-weight: 700;
        font-size: 1rem;
    }

    .btab-more-close {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background: rgba(255,255,255,.08);
        border: none;
        color: rgba(255,255,255,.6);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: .9rem;
    }

    .btab-more-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .btab-more-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        padding: 16px 8px;
        background: rgba(255,255,255,.06);
        border-radius: 14px;
        color: rgba(255,255,255,.6);
        text-decoration: none;
        font-size: .75rem;
        font-weight: 600;
        transition: all .2s;
    }

    .btab-more-item i {
        font-size: 1.2rem;
    }

    .btab-more-item.btab-more-active {
        background: rgba(129,140,248,.15);
        color: #818CF8;
    }

    .dash-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .welcome-hero {
        padding: 28px 24px 26px;
        border-radius: 16px;
        margin-bottom: 28px;
    }

    .welcome-text h1 {
        font-size: 1.45rem;
    }

    .welcome-text p {
        font-size: 0.88rem;
    }

    .welcome-stats {
        gap: 10px;
        flex-wrap: wrap;
    }

    .stat-item {
        padding: 12px 16px;
        min-width: 0;
        flex: 1;
    }

    .welcome-actions {
        flex-wrap: wrap;
        gap: 10px;
    }

    .welcome-btn {
        padding: 12px 20px;
        font-size: 0.85rem;
        border-radius: 12px;
    }

    .doc-card {
        width: 180px;
    }

    .doc-card-create {
        min-height: 240px;
    }

    .card-grid {
        gap: 14px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .card-grid > * {
        scroll-snap-align: start;
    }

    .section-title-row {
        gap: 10px;
    }

    .job-item {
        grid-template-columns: 46px minmax(0, 1fr);
        padding: 16px;
        border-radius: 16px;
        gap: 14px;
    }

    .job-avatar {
        width: 46px;
        height: 46px;
        border-radius: 14px;
    }

    .job-header,
    .job-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .dash-section-half {
        border-radius: 16px;
        padding: 20px 18px;
    }

    .dash-section {
        margin-bottom: 24px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 66px 14px 30px;
    }

    .breadcrumb {
        margin-bottom: 16px;
        font-size: 0.78rem;
    }

    .welcome-hero {
        padding: 22px 18px 20px;
        border-radius: 14px;
        margin-bottom: 20px;
    }

    .welcome-hero::before,
    .welcome-hero::after {
        display: none;
    }

    .welcome-text h1 {
        font-size: 1.2rem;
        line-height: 1.3;
    }

    .welcome-text p {
        font-size: 0.82rem;
        line-height: 1.5;
    }

    .welcome-actions {
        flex-direction: column;
        gap: 8px;
    }

    .welcome-btn {
        justify-content: center;
        padding: 13px 20px;
        font-size: 0.85rem;
        border-radius: 12px;
    }

    .welcome-stats {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .stat-item {
        padding: 12px 10px;
        border-radius: 12px;
    }

    .stat-number {
        font-size: 1.25rem;
    }

    .stat-label {
        font-size: 0.62rem;
    }

    .card-grid {
        gap: 10px;
        padding-bottom: 4px;
    }

    .doc-card {
        width: 155px;
    }

    .doc-card-create {
        min-height: 220px;
    }

    .doc-card-thumb {
        height: 150px;
    }

    .doc-card-footer {
        padding: 12px 14px;
    }

    .doc-card-name {
        font-size: 0.84rem;
    }

    .dash-section {
        margin-bottom: 20px;
    }

    .section-title-row h2 {
        font-size: 1.05rem;
    }

    .dash-section-half {
        padding: 18px 16px;
        border-radius: 14px;
    }

    .job-item {
        grid-template-columns: 42px minmax(0, 1fr);
        gap: 12px;
        padding: 16px;
        border-radius: 14px;
    }

    .job-avatar {
        width: 42px;
        height: 42px;
        font-size: 0.82rem;
        border-radius: 12px;
    }

    .job-kicker {
        font-size: 0.62rem;
    }

    .job-title {
        font-size: 0.9rem;
    }

    .job-meta-pill {
        font-size: 0.68rem;
        padding: 5px 9px;
    }

    .job-badge {
        font-size: 0.62rem;
        padding: 5px 8px;
    }

    .job-insights {
        gap: 10px;
        flex-direction: column;
        align-items: flex-start;
    }

    .job-apply-btn {
        width: 100%;
        justify-content: center;
        padding: 9px 14px;
        font-size: 0.78rem;
    }

    .job-applied-label,
    .job-footnote,
    .table-note,
    .entity-sub {
        font-size: 0.72rem;
    }

    /* Sidebar user info truncation */
    .user-email {
        max-width: 140px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Section arrow on mobile */
    .section-arrow {
        width: 36px;
        height: 36px;
    }

    /* Modal responsive */
    .app-modal {
        width: 95%;
        padding: 1.5rem;
        margin: 12px;
    }

    .app-modal-header h2 {
        font-size: 1.15rem;
    }

    .app-modal-actions {
        flex-direction: column-reverse;
    }

    .app-modal-cancel,
    .app-modal-submit {
        width: 100%;
        justify-content: center;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* Safe-area (notch) support */
@supports (padding: env(safe-area-inset-top)) {
    .mobile-topbar {
        padding-top: env(safe-area-inset-top);
        height: calc(56px + env(safe-area-inset-top));
    }
}