/* =========================================
   1. VARIABLES & RESET (Elite Palette)
   ========================================= */
:root {
    /* -- PALETTE: Warm Minimalist -- */
    --bg-color: #FDFCF8;       
    --surface: #FFFFFF;        
    --surface-hover: #F7F5F2;  
    
    /* -- ACCENT: Burnt Sienna -- */
    --accent: #B0502A;         
    --accent-hover: #8F3E1E;
    
    /* -- TYPOGRAPHY COLORS -- */
    --text-main: #111827;      /* Sharper, deep charcoal */
    --text-sub: #4B5563;       /* Cool gray for readability */
    --border: #E5E7EB;         /* Subtle borders */
    
    /* -- SHAPE & SHADOW -- */
    --radius: 12px;            
    --radius-btn: 8px;         
    --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.03);
    --shadow-float: 0 12px 32px rgba(0, 0, 0, 0.08);

    --font-serif: 'Merriweather', serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility; 
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* =========================================
   2. LAYOUT & NAVIGATION
   ========================================= */
.app-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 32px 0;
    margin-bottom: 20px;
}

.logo {
    font-family: var(--font-serif);
    font-weight: 900;
    font-size: 1.8rem;
    color: var(--text-main);
    letter-spacing: -0.04em;
}

#userStatus, .nav-menu { display: flex; align-items: center; gap: 24px; }

.btn-text { 
    background: none; border: none; color: var(--text-sub); 
    font-family: var(--font-sans); font-weight: 600; font-size: 0.95rem;
    cursor: pointer; transition: color 0.2s ease; padding: 0;
}
.btn-text:hover, .btn-text.active { color: var(--accent); }

.credit-badge {
    font-size: 0.85rem; color: var(--text-main); 
    background: #F0EAE6; 
    padding: 6px 14px; 
    border-radius: 100px; 
    font-weight: 600;
    white-space: nowrap; 
    flex-shrink: 0;
}
.credit-highlight { color: var(--accent); font-weight: 800; }

/* =========================================
   3. HERO & UPLOAD STYLING (The "Silicon Valley" Look)
   ========================================= */
#uploadView {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 40px;
}

/* Marketing Hero Text */
.upload-hero {
    text-align: center;
    max-width: 700px;
    margin-bottom: 48px;
    animation: fadeIn 0.6s ease-out;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #FFF7ED; 
    color: var(--accent);
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 24px;
    border: 1px solid #FFEDD5;
}

.upload-title {
    font-family: var(--font-serif);
    font-size: 3.2rem;
    line-height: 1.1;
    color: #111827; 
    margin-bottom: 16px;
    letter-spacing: -0.03em;
}

.highlight-text {
    background: linear-gradient(135deg, var(--accent) 0%, #EA580C 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.upload-sub {
    font-family: var(--font-sans);
    font-size: 1.15rem;
    color: #4B5563;
    line-height: 1.6;
    font-weight: 400;
}

/* Upload Box Wrapper */
.upload-box-wrapper {
    width: 100%;
    max-width: 600px;
    margin-bottom: 60px;
}

.drop-zone {
    background: #FFFFFF;
    border: 2px dashed #E5E7EB;
    border-radius: 20px;
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.drop-zone:hover {
    border-color: var(--accent);
    background: #FFFCFA;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.icon-circle {
    width: 56px; height: 56px;
    background: #F3F4F6;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; color: #9CA3AF;
    transition: all 0.2s;
}
.drop-zone:hover .icon-circle {
    background: var(--accent); color: white;
}

.drop-content h3 {
    font-family: var(--font-sans);
    font-size: 1.1rem;
    font-weight: 600;
    color: #111;
    margin-bottom: 4px;
}
.drop-content p {
    font-size: 0.9rem; color: #6B7280; margin: 0;
}

/* Action Area */
.action-area {
    margin-top: 24px;
    text-align: center;
}

.file-status {
    margin-bottom: 16px;
    font-size: 0.95rem;
    color: #374151;
    font-weight: 500;
}

.btn-wide {
    width: 100%;
    max-width: 300px;
    padding: 14px 24px;
    font-size: 1rem;
    display: inline-flex; justify-content: center; align-items: center; gap: 10px;
}

.status-msg {
    margin-top: 16px;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.95rem;
}

/* =========================================
   4. BUTTONS & INPUTS (Global)
   ========================================= */
.btn-primary {
    background-color: var(--accent);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: var(--radius-btn);
    font-size: 1rem;
    font-family: var(--font-sans);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    box-shadow: 0 4px 12px rgba(176, 80, 42, 0.25);
    min-width: 160px;
}
.btn-primary:hover:not(:disabled) { background-color: var(--accent-hover); transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; box-shadow: none; }

.btn-secondary {
    background-color: transparent;
    border: 1px solid #D1D5DB;
    color: var(--text-main);
    padding: 12px 24px;
    border-radius: var(--radius-btn);
    font-size: 0.95rem;
    font-family: var(--font-sans);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

.btn-danger-small {
    background: transparent; border: 1px solid #EF4444; color: #EF4444;
    padding: 8px 16px; border-radius: var(--radius-btn); font-size: 0.85rem; cursor: pointer;
}

.btn-block { width: 100%; display: flex; justify-content: center; align-items: center; }
.shadow-btn {
    box-shadow: 0 4px 12px rgba(176, 80, 42, 0.3);
    transition: all 0.2s;
}
.shadow-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(176, 80, 42, 0.4);
}

.icon-btn {
    background: #F3F4F6;
    border: 1px solid #E5E7EB;
    color: var(--text-sub);
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}
.icon-btn:hover {
    background: white;
    border-color: var(--accent);
    color: var(--accent);
    transform: rotate(15deg);
}

input, button { font-family: var(--font-sans) !important; }

/* =========================================
   5. LOGIN LAYOUT (Split Screen)
   ========================================= */
.full-height-view {
    min-height: calc(100vh - 100px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.split-layout {
    display: flex;
    width: 100%;
    max-width: 1100px;
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 
        0 0 0 1px rgba(0,0,0,0.03),
        0 2px 8px rgba(0,0,0,0.04),
        0 12px 32px rgba(0,0,0,0.08);
    min-height: 700px;
}

/* Left: Marketing */
.marketing-panel {
    flex: 1.1;
    background-color: #FAFAF9; 
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    border-right: 1px solid #F0F0F0;
}

.brand-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    border: 1px solid #E5E5E5;
    color: var(--text-main);
    padding: 6px 12px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 30px;
    width: fit-content;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--accent);
    border-radius: 50%;
    margin-right: 8px;
    flex-shrink: 0;
    /* Updated Animation Here: */
    animation: glowing-dot 2s infinite ease-in-out;
}

.hero-heading {
    font-family: var(--font-serif);
    font-size: 3.2rem;
    line-height: 1.1;
    color: #1A1A1A;
    margin-bottom: 20px;
    letter-spacing: -0.03em;
}

.text-gradient {
    background: linear-gradient(135deg, var(--accent) 0%, #d97706 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-family: var(--font-sans);
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 48px;
    line-height: 1.6;
    max-width: 440px;
}

/* Benefits */
.benefit-list { display: flex; flex-direction: column; gap: 24px; margin-bottom: 48px; }
.benefit-item { display: flex; gap: 16px; align-items: flex-start; }
.benefit-icon {
    width: 42px; height: 42px;
    background: white;
    border: 1px solid #EBEBEB;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: var(--accent);
    font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.benefit-text strong {
    display: block; font-family: var(--font-sans); font-size: 0.95rem; color: #111; margin-bottom: 2px;
}
.benefit-text p { font-size: 0.85rem; color: #666; margin: 0; line-height: 1.4; }

/* Social Proof */
.social-proof { display: flex; align-items: center; gap: 12px; }
.avatars { display: flex; }
.avatar-mini {
    width: 36px; height: 36px; border-radius: 50%;
    background: #E5E5E5; color: #555;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 600;
    border: 3px solid #FAFAF9;
    margin-right: -12px;
}
.social-proof p { font-size: 0.85rem; color: #666; margin-left: 10px; }

/* Right: Login Form */
.login-panel {
    flex: 1;
    padding: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
}
.login-content { width: 100%; max-width: 380px; }
.login-header { margin-bottom: 32px; text-align: center; }
.login-header h2 { font-size: 2rem; color: #111; margin-bottom: 8px; }
.login-header p { font-size: 1rem; color: #666; }

/* Inputs */
.input-group { margin-bottom: 24px; text-align: left; }
.input-group label { display: block; font-size: 0.85rem; margin-bottom: 6px; color: #374151; font-weight: 600; }
.input-group input {
    width: 100%; padding: 14px 16px; border: 1px solid #E0E0E0; border-radius: 8px;
    background: #FFFFFF; font-size: 1rem; color: #111; transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.input-group input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(176, 80, 42, 0.15); outline: none; }

/* Guest Button */
.guest-btn-large {
    width: 100%; display: flex; align-items: center; padding: 16px;
    background: #FFFBF7; border: 1px solid #FCD3C1; border-radius: 12px;
    cursor: pointer; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.guest-btn-large:hover { background: #FFF0E6; border-color: var(--accent); transform: scale(1.02); }
.guest-icon-box {
    width: 40px; height: 40px; background: white; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: var(--accent); font-size: 1.2rem; margin-right: 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.guest-text { text-align: left; flex: 1; }
.guest-text span { display: block; font-weight: 700; color: #111; font-size: 1rem; }
.guest-text small { color: #666; font-size: 0.8rem; }
.arrow-fade { opacity: 0; transform: translateX(-10px); transition: all 0.3s; color: var(--accent); }
.guest-btn-large:hover .arrow-fade { opacity: 1; transform: translateX(0); }

/* Separator & Links */
.guest-separator { display: flex; align-items: center; text-align: center; margin: 24px 0; color: #9CA3AF; font-size: 0.8rem; font-weight: 600; }
.guest-separator::before, .guest-separator::after { content: ''; flex: 1; border-bottom: 1px solid #E5E7EB; }
.guest-separator span { padding: 0 10px; }
.forgot-link { font-size: 0.85rem; color: #6B7280; font-weight: 500; text-decoration: none; }
.forgot-link:hover { color: var(--accent); text-decoration: underline; }
.auth-switch { text-align: center; margin-top: 24px; font-size: 0.9rem; color: #666; }
.auth-switch a { color: var(--accent); font-weight: 600; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }

/* Also supports the older "auth-card" class for other views */
.auth-card {
    background: var(--surface); padding: 48px; border-radius: var(--radius); 
    box-shadow: var(--shadow-float); max-width: 420px; margin: 60px auto; 
    text-align: center; border: 1px solid var(--border);
}

/* =========================================
   6. PROFILE & DASHBOARD
   ========================================= */
.profile-header-minimal {
    display: flex; align-items: center; gap: 24px;
    margin-bottom: 40px; border-bottom: 1px solid var(--border);
    padding-bottom: 32px;
}
.profile-header-minimal > div:last-child { min-width: 0; flex: 1; }
#profileEmail { overflow-wrap: anywhere; word-break: break-word; line-height: 1.3; }

.avatar-circle {
    width: 72px; height: 72px; min-width: 72px; flex-shrink: 0;
    background: var(--text-main); color: white; border-radius: 50%; 
    display: flex; align-items: center; justify-content: center; font-size: 2rem;
}

.dashboard-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px; margin-bottom: 48px;
}

.dash-card, .standard-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 32px;
    display: flex; flex-direction: column; justify-content: space-between;
    box-shadow: var(--shadow-soft);
}
.premium-card { background-color: #FAF9F7; border-color: #D6D3CD; }

.stat-label {
    font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--text-sub); font-weight: 700; margin-bottom: 12px;
    font-family: var(--font-sans);
}
.stat-value {
    font-family: var(--font-serif); font-size: 2.8rem; color: var(--text-main);
    margin-bottom: 6px; font-weight: 400; line-height: 1;
    display: flex; align-items: baseline; flex-wrap: wrap;
}
.stat-value .stat-unit {
    font-family: var(--font-sans); font-size: 1.1rem; color: var(--text-sub);
    font-weight: 600; margin-left: 8px; letter-spacing: 0.05em; text-transform: uppercase;
}
.stat-value .stat-subtext {
    font-family: var(--font-sans); font-size: 0.95rem; color: #666;
    font-weight: 500; width: 100%; margin-top: 6px; line-height: 1.4;
}
.stat-unit-bottom { font-size: 0.9rem; font-family: var(--font-sans); color: var(--text-sub); margin-top: 10px; }

.topup-row, .referral-content { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap;}
.referral-input-group { display: flex; gap: 8px; }
.input-elegant, .input-referral {
    padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-btn);
    background: var(--bg-color); font-family: var(--font-sans); flex: 1; font-size: 1rem;
}
.input-elegant:focus, .input-referral:focus { outline: none; border-color: var(--accent); }
.code-box { background: var(--surface-hover); padding: 4px 8px; border-radius: 4px; font-family: monospace; color: var(--accent); font-weight: bold; }

.resume-row {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--surface-hover); padding: 20px 24px; border-radius: var(--radius-btn);
}
.fname { font-weight: 600; display: block; font-size: 1.05rem; }
.fdate { font-size: 0.85rem; color: var(--text-sub); }

/* =========================================
   7. RESULTS SECTION (Redesigned)
   ========================================= */
.results-section {
    width: 100%; margin-top: 20px;
    background: transparent; /* No double background */
    border-top: 1px solid #E5E5E5;
    padding-top: 60px; padding-bottom: 100px;
}

.results-header {
    max-width: 800px; margin: 0 auto 32px auto; padding: 0 10px;
    display: flex; align-items: center; justify-content: space-between;
}
.header-left { display: flex; align-items: center; gap: 16px; }
.section-title { font-family: var(--font-serif); font-size: 1.8rem; color: #111; margin: 0; }
.tool-actions { display: flex; gap: 8px; }
.btn-text-danger {
    background: none; border: none; color: #9CA3AF;
    font-weight: 600; font-size: 0.9rem; cursor: pointer; transition: color 0.2s;
}
.btn-text-danger:hover { color: #EF4444; }

.results-grid {
    display: flex; flex-direction: column; gap: 24px;
    max-width: 800px; margin: 0 auto;
}

/* --- THE JOB CARD (The Star) --- */
.job-card {
    background: #FFFFFF;
    border: 1px solid #EAEAEA;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02), 0 8px 16px rgba(0,0,0,0.03);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.job-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05), 0 20px 40px rgba(0,0,0,0.06);
    border-color: #D4D4D4;
}

.job-header { padding: 32px; border-bottom: 1px solid #F3F4F6; position: relative; }
.job-title { 
    font-family: var(--font-serif); font-size: 1.6rem; margin-bottom: 12px; 
    padding-right: 140px; font-weight: 800; color: #111827; line-height: 1.3;
}

.match-badge {
    position: absolute; top: 32px; right: 32px;
    background: #DCFCE7; color: #15803D;
    padding: 6px 12px; border-radius: 8px; font-size: 0.8rem; 
    font-weight: 700; font-family: var(--font-sans); letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(22, 163, 74, 0.1);
}

.job-meta { 
    font-size: 0.9rem; color: #4B5563; font-weight: 500;
    display: flex; gap: 24px; flex-wrap: wrap; margin-top: 16px; align-items: center;
}
.job-meta span { color: #374151; font-weight: 500; }
.job-meta i { color: #6B7280; font-size: 1rem; margin-right: 2px; }

.job-summary-box { padding: 24px 32px; }

.ai-label { 
    font-family: var(--font-sans); 
    font-size: 0.75rem; 
    text-transform: uppercase;
    letter-spacing: 2px; 
    font-weight: 800; 
    color: #9CA3AF;
    
    /* Stack vertically: Text Top, Line Bottom */
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    
    margin-bottom: 24px;
    width: 100%;
}

/* --- UPDATE: Centered Text Sandwiched Between Two Lines --- */
.ai-label { 
    font-family: var(--font-sans); 
    font-size: 0.75rem; 
    text-transform: uppercase; 
    letter-spacing: 2px; 
    font-weight: 800; 
    color: #9CA3AF;
    
    /* Layout: Stack Top Line, Text, Bottom Line vertically */
    display: flex; 
    flex-direction: column; 
    align-items: center; /* Keeps text centered */
    justify-content: center; 
    
    margin-bottom: 24px;
    width: 100%;
}

/* --- UPDATE: Left Aligned Text with Full Line Below --- */
.ai-label { 
    font-family: var(--font-sans); 
    font-size: 0.75rem; 
    text-transform: uppercase; 
    letter-spacing: 2px; 
    font-weight: 800; 
    color: #9CA3AF;
    
    /* Flex Column: Text top, Line bottom */
    display: flex; 
    flex-direction: column; 
    
    /* ALIGNMENT: Moves text to the Left */
    align-items: flex-start; 
    justify-content: center; 
    
    margin-bottom: 24px;
    width: 100%;
}

/* Ensure no top line */
.ai-label::before { 
    content: none; 
}

/* Full width line below */
.ai-label::after { 
    content: ''; 
    display: block; 
    height: 1px; 
    background-color: #E5E7EB; 
    
    width: 100%;      
    margin-top: 12px; 
}

.job-desc { 
    font-family: var(--font-serif); 
    font-size: 1.05rem; 
    color: #374151;
    line-height: 1.7; 
    
    /* Creates the rectangular shape */
    text-align: justify;
    text-justify: inter-word; /* Ensures spaces stretch evenly */
    
    /* Prevents large gaps by allowing word breaks where necessary */
    -webkit-hyphens: auto; 
    -moz-hyphens: auto; 
    hyphens: auto;
}


.job-footer { 
    padding: 20px 32px; background: #FAFAF9; text-align: right; border-top: 1px solid #F3F4F6; 
}

/* Apply Button (Pill Style) */
.btn-link {
    text-decoration: none; color: var(--accent); background: #FFFFFF;
    border: 1px solid #E5E7EB; padding: 10px 24px; border-radius: 100px;
    font-family: var(--font-sans); font-weight: 600; font-size: 0.9rem;
    display: inline-flex; align-items: center; gap: 8px;
    cursor: pointer; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.btn-link:hover { 
    border-color: var(--accent); background-color: #FFF7ED;
    transform: translateY(-2px); box-shadow: 0 4px 12px rgba(176, 80, 42, 0.15);
    padding-right: 28px;
}
.btn-link i { transition: transform 0.2s; font-size: 0.8rem; }
.btn-link:hover i { transform: translateX(4px); }

/* =========================================
   8. NOTIFICATIONS & SETTINGS
   ========================================= */
.notif-wrapper { position: relative; cursor: pointer; margin-right: 8px; }
.bell-icon { font-size: 1.4rem; color: var(--text-sub); transition: color 0.2s ease; }
.bell-icon:hover { color: var(--accent); }

.notif-badge {
    position: absolute; top: -2px; right: -2px;
    background: var(--accent); color: white; font-family: var(--font-sans);
    font-size: 0.65rem; font-weight: 700; min-width: 18px; height: 18px; 
    padding: 0 4px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--bg-color); box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.notif-dropdown {
    position: absolute; top: 45px; right: -10px; width: 360px; 
    background: var(--surface); border: 1px solid rgba(0,0,0,0.05); border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.12), 0 5px 15px rgba(0,0,0,0.05);
    z-index: 1000; overflow: hidden; transform-origin: top right;
    animation: scaleIn 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.notif-header {
    padding: 20px 24px; background: #ffffff; border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: baseline;
}
.notif-header span:first-child {
    font-family: var(--font-serif); font-weight: 700; font-size: 1.1rem; color: var(--text-main);
}
.notif-header span:last-child {
    font-family: var(--font-sans); font-size: 0.75rem; color: var(--accent); 
    font-weight: 600; cursor: pointer; text-transform: uppercase; letter-spacing: 0.05em;
    opacity: 0.85; transition: opacity 0.2s;
}
.notif-header span:last-child:hover { opacity: 1; text-decoration: underline; }

.notif-list { max-height: 380px; overflow-y: auto; background: #FAFAFA; }
.notif-list::-webkit-scrollbar { width: 6px; }
.notif-list::-webkit-scrollbar-thumb { background: #E0E0E0; border-radius: 10px; }

.notif-item {
    padding: 20px 24px; background: #ffffff; border-bottom: 1px solid #F0F0F0;
    cursor: pointer; transition: all 0.2s ease; position: relative;
    display: flex; flex-direction: column; gap: 6px;
}
.notif-item:hover { background: #FFFCFA; }
.notif-item.unread::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent);
}
.n-title { font-family: var(--font-sans); font-weight: 600; font-size: 0.95rem; color: var(--text-main); }
.n-body { font-family: var(--font-sans); font-size: 0.85rem; color: var(--text-sub); }
.n-time { font-size: 0.7rem; color: #999; font-weight: 500; text-transform: uppercase; }
.notif-empty { padding: 40px 20px; text-align: center; color: var(--text-sub); font-size: 0.9rem; }

/* Settings */
.settings-section { margin-top: 40px; border-top: 1px solid var(--border); padding-top: 30px; }
.setting-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.setting-info h4 { font-family: var(--font-sans); font-size: 1rem; margin-bottom: 4px; color: var(--text-main); }
.setting-info p { font-size: 0.85rem; color: var(--text-sub); }

.switch { position: relative; display: inline-block; width: 48px; height: 26px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background-color: #E5E7EB; transition: .3s; border-radius: 34px;
}
.slider:before {
    position: absolute; content: ""; height: 20px; width: 20px; left: 3px; bottom: 3px;
    background-color: white; transition: .3s; border-radius: 50%; box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
input:checked + .slider { background-color: var(--accent); }
input:checked + .slider:before { transform: translateX(22px); }

.btn-telegram {
    background: #229ED9; color: white; border: none; padding: 10px 20px;
    border-radius: var(--radius-btn); font-weight: 600; font-size: 0.9rem;
    display: inline-flex; align-items: center; gap: 8px; width: 100%; justify-content: center;
    transition: background 0.2s;
}
.btn-telegram:hover { background: #1b8bbd; }

/* =========================================
   9. HISTORY BAR & MISC
   ========================================= */
.history-bar {
    display: flex; gap: 12px; overflow-x: auto; padding-bottom: 16px; margin-bottom: 24px;
    border-bottom: 1px dashed var(--border); -ms-overflow-style: none; scrollbar-width: none;
}
.history-bar::-webkit-scrollbar { display: none; }

.history-chip {
    background: white; border: 1px solid var(--border); border-radius: 20px;
    padding: 8px 16px; font-size: 0.85rem; color: var(--text-main);
    cursor: pointer; white-space: nowrap; display: flex; flex-direction: column;
    transition: all 0.2s; min-width: 140px;
}
.history-chip:hover { border-color: var(--accent); background: #FFFCFA; transform: translateY(-2px); }
.chip-date { font-size: 0.7rem; color: #999; font-weight: 600; margin-bottom: 2px; }
.chip-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }

/* Footer */
.app-footer { 
    margin-top: auto; 
    padding: 40px 0; 
    text-align: center; 
    background-color: var(--bg-color); /* Match body bg for cleaner look */
    border-top: 1px solid var(--border); 
    color: var(--text-sub); 
    font-size: 0.9rem; 
}

.social-links { 
    display: flex; 
    justify-content: center; 
    align-items: center; /* Fix vertical alignment */
    gap: 16px; 
    margin-bottom: 20px; 
}

.social-links a {
    width: 40px; 
    height: 40px; 
    border-radius: 50%; 
    background-color: #FFFFFF;
    border: 1px solid #E5E5E5; 
    color: #6B7280; 
    display: flex; /* Changed from grid to flex for better icon centering */
    align-items: center;
    justify-content: center;
    font-size: 1rem; 
    transition: all 0.2s ease; 
    text-decoration: none;
}

.social-links a:hover { 
    border-color: var(--accent); 
    color: var(--accent); 
    transform: translateY(-3px); 
    box-shadow: 0 4px 12px rgba(176, 80, 42, 0.15); 
}
/* Animations */
@keyframes popIn { 0% { transform: scale(0); } 70% { transform: scale(1.2); } 100% { transform: scale(1); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
@keyframes breathe-red { 0% { opacity: 1; } 50% { opacity: 0.25; } 100% { opacity: 1; } }
.urgent-pulse { animation: breathe-red 2s infinite ease-in-out; display: inline-block; }
.hidden { display: none !important; }
.fade-in { animation: fadeIn 0.5s ease-out forwards; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

/* =========================================
   MOBILE RESPONSIVENESS (PHONES)
   ========================================= */
@media (max-width: 900px) {
    
    /* --- 0. LAYOUT & CONTAINER --- */
    .app-container {
        padding: 0 16px; 
		
    }

	.notif-wrapper { 
        position: relative !important; 
    }

    /* >>> TRANSFORM TO STACKED CARDS <<< */
    .split-layout {
        flex-direction: column; /* Stack vertically */
        width: auto;
        margin: 0 -12px; /* Keep the width expansion */
        min-height: auto;
        
        /* CRITICAL: Turn off the white background and borders on the container */
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        
        /* This creates the vertical space between the floating cards */
        gap: 24px; 
    }

    /* >>> RESTORE CARD LOOK FOR INDIVIDUAL PANELS <<< */
    .marketing-panel, .login-panel {
        /* Give EACH card its own white background and border */
        background: #FFFFFF !important;
        width: 100%;
        
        /* Rounded corners for every card */
        border-radius: 24px !important; 
        border: 1px solid #E5E5E5 !important;
        
        /* Deep shadow to make them "float" above the main background */
        box-shadow: 0 10px 30px rgba(0,0,0,0.06) !important;
        
        /* Internal Spacing */
        padding: 32px 20px !important;
        
        /* Ensure text alignment */
        text-align: center;
    }

    /* Specific adjustment for the Intro Card gradient to stay inside the border */
    .marketing-panel {
        background-color: #FAFAF9 !important; /* Slightly different tone for intro if desired */
        overflow: hidden; /* Keeps child elements inside the rounded corners */
    }

    .hero-heading {
        font-size: 2rem !important;
        text-align: center;
    }

    .hero-desc {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    /* Keep benefit list strictly left aligned inside the card */
    .benefit-list {
        background: #F9FAFB; 
        padding: 20px;
        border-radius: 12px;
        border: 1px solid #F3F4F6;
        text-align: left;
    }

    /* --- 1. HEADER FIXES --- */
    header { 
        flex-direction: column; 
        gap: 16px; 
        padding: 15px 0; 
        align-items: center;
    }
    
    .logo { font-size: 1.6rem; margin-bottom: 5px; }

    /* --- 2. NOTIFICATION PANEL FIX --- */
    .notif-wrapper { position: static; }

    .notif-dropdown {
        position: fixed;
        top: 80px;
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        max-width: 400px;
        max-height: 60vh;
        overflow-y: auto;
        right: auto;
        z-index: 10000;
        box-shadow: 0 10px 50px rgba(0,0,0,0.25);
        border: 1px solid #eee;
        border-radius: 16px;
    }

    #userStatus { 
        display: flex; flex-direction: row; flex-wrap: nowrap; 
        justify-content: center; align-items: center;
        width: 100%; gap: 12px; overflow-x: auto; 
    }
    
    .nav-menu { width: auto; border: none; padding: 0; gap: 15px; }
    .btn-text { font-size: 0.9rem; } 
    .credit-badge { font-size: 0.75rem; padding: 5px 10px; white-space: nowrap; }

    /* --- 3. PROFILE & RESULTS FIXES --- */
    .resume-row {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px;
    }
    .resume-row > div:first-child { margin-bottom: 16px; width: 100%; overflow: hidden; }
    .resume-row > div:last-child { width: 100%; display: flex; gap: 10px; }
    #runExistingMatchBtn { flex: 1; justify-content: center; }

    .referral-content { flex-direction: column; align-items: flex-start; gap: 20px; }
    .referral-content > div, .referral-input-group, .referral-input-group input { width: 100%; }
    
    .job-header, .job-summary-box, .job-footer { padding: 20px; }
    .job-title { padding-right: 0; font-size: 1.35rem; }
    .match-badge { position: static; display: inline-block; margin-bottom: 10px; }
    .btn-link { width: 100%; justify-content: center; }
    
    .results-header { flex-direction: column; align-items: flex-start; gap: 16px; }
    .results-header > div:first-child { width: 100%; display: flex; align-items: center; justify-content: space-between; }
    .icon-btn { width: 40px !important; height: 40px !important; min-width: 40px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
    #backToUploadBtn { width: 100%; text-align: center; background-color: #F3F4F6; padding: 12px; border-radius: 8px; font-weight: 600; color: #EF4444; }
}



/* =========================================
   ELEGANT TOAST NOTIFICATIONS
   ========================================= */
#toastContainer {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000; /* Always on top */
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: auto;
}

.toast {
    background: #1F2937; /* Dark charcoal for high contrast */
    color: #FFFFFF;
    padding: 12px 24px;
    border-radius: 50px; /* Pill shape */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0;
    min-width: 300px;
    max-width: 90vw;
    animation: slideDownFade 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    pointer-events: auto;
}

.toast.success { border-left: 4px solid #10B981; } /* Green accent */
.toast.error { border-left: 4px solid #EF4444; }   /* Red accent */

.toast i { font-size: 1.1rem; }
.toast.success i { color: #34D399; }
.toast.error i { color: #F87171; }

@keyframes slideDownFade {
    0% { opacity: 0; transform: translateY(-20px) scale(0.9); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes fadeOutUp {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-20px); }
}

/* --- MOBILE SPECIFIC TOAST --- */
@media (max-width: 768px) {
    #toastContainer {
        width: 90%; /* Fit screen width */
        top: 16px;
    }
    
    .toast {
        width: 100%;
        min-width: auto;
        border-radius: 12px; /* Slightly less rounded on mobile to fit text better */
        justify-content: center;
        text-align: center;
    }
}





@keyframes glowing-dot {
    0% {
        box-shadow: 0 0 0 0 rgba(176, 80, 42, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(176, 80, 42, 0);
        transform: scale(1.1);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(176, 80, 42, 0);
        transform: scale(1);
    }
}