:root {
    color-scheme: dark;
    --primary: #818cf8; /* Soft Indigo */
    --primary-glow: rgba(129, 140, 248, 0.4);
    --secondary: #2dd4bf; /* Teal Accent */
    --secondary-glow: rgba(45, 212, 191, 0.3);
    --accent: #f59e0b;
    --success: #10b981;
    --error: #f43f5e;
    
    --bg-body: #030712; /* Rich Dark Background */
    --bg-surface: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.6);
    
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-light: rgba(255, 255, 255, 0.15);
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-soft: #cbd5e1;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -2px rgb(0 0 0 / 0.1);
    --shadow-premium: 0 20px 50px rgba(0, 0, 0, 0.5);
    
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 32px;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background: var(--bg-body);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Noise Texture Overlay */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background-image: url("https://grainy-gradients.vercel.app/noise.svg");
    opacity: 0.05;
    pointer-events: none;
    z-index: 100;
}

.app-container {
    position: relative;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 10;
    transition: max-width 0.5s ease;
}

/* Desktop Full Width for Admin */
body.admin-mode .app-container {
    max-width: 100% !important;
    padding: 1.5rem 3rem;
}

/* Premium Animated Background */
.bg-mesh {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    filter: blur(100px);
}

.blob {
    position: absolute;
    border-radius: 50%;
    opacity: 0.4;
    animation: blob-float 20s infinite alternate;
    pointer-events: none;
}

.blob-1 {
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    top: -20%;
    right: -10%;
    animation-duration: 25s;
}

.blob-2 {
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--secondary) 0%, transparent 70%);
    bottom: -15%;
    left: -10%;
    animation-duration: 30s;
    animation-delay: -5s;
}

@keyframes blob-float {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(5%, 5%) scale(1.1); }
    66% { transform: translate(-5%, 10%) scale(0.9); }
    100% { transform: translateX(0, 0) scale(1); }
}

/* Header & Progressive Indicator */
.main-header {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow- premium);
    min-height: 80px;
    margin-bottom: 2rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.top-scroll-marquee {
    width: 100%;
    height: 28px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--glass-border);
}

.landing-marquee-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 10px 0;
    overflow: hidden;
    z-index: 10000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.marquee-inner {
    white-space: nowrap;
    display: inline-block;
    color: var(--text-soft);
    opacity: 0.9;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: marquee 30s linear infinite;
    padding-left: 100%;
    transition: opacity 0.3s ease;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

.header-main-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 1.25rem 2rem;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 800;
    border-radius: 14px;
    box-shadow: 0 5px 15px var(--primary-glow);
    position: relative;
}

.logo-text h2 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #fff, var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-icon img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 14px;
    background: white;
}

.logo-icon span {
    position: relative;
    z-index: 1;
}

/* Conditional Branding Visibility */
body.at-landing #headerBrandingLayer {
    display: none !important;
}

#headerBrandingLayer {
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.logo-text p {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* Safeguard: Prevent contact info links/spans from appearing in header logo area */
.logo-container span:not(#headerLogoLetter), 
.logo-container a:not(.logo-link),
.logo-text span, 
.logo-text a:not(.logo-link) {
    display: none !important;
}


.step-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.step {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.step.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 0 20px var(--primary-glow);
    transform: scale(1.1);
}

.step.completed {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.step-line {
    width: 30px;
    height: 2px;
    background: var(--glass-border);
    border-radius: 10px;
}

.step-line.active {
    background: var(--primary);
}

.view-section {
    width: 100%;
    max-width: 900px;
    background: var(--bg-card);
    padding: 3.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-premium);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(24px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

body.admin-mode .view-section {
    max-width: 100% !important;
}

.view-section::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    opacity: 0.8;
}

/* ========================================== */
/* NEW LANDING SCREEN (AESTHETIC STABILIZED) */
/* ========================================== */

.landing-screen {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    z-index: 500;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    padding-top: 60px; /* Space for the fixed marquee */
}

.landing-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 3rem 2rem 1.5rem;
    margin-bottom: 1.5rem;
    animation: hero-entrance 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.landing-hero-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

@keyframes hero-entrance {
    from { opacity: 0; transform: translateY(40px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.landing-logo-wrap {
    width: 80px;
    height: 80px;
    margin: 0;
    position: relative;
    padding: 8px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 20px;
    border: 1px solid var(--glass-border-light);
    box-shadow: 0 0 30px var(--primary-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: glow-pulse 4s infinite alternate;
}

@keyframes glow-pulse {
    0% { box-shadow: 0 0 30px var(--primary-glow); transform: scale(1); }
    100% { box-shadow: 0 0 60px var(--primary-glow), 0 0 20px var(--secondary-glow); transform: scale(1.05); }
}

.landing-logo-fallback {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 900;
    color: white;
    text-shadow: 0 4px 12px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
}

.landing-logo-fallback::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.2), transparent);
    transform: translateX(-100%);
    animation: shine-logo 3s infinite;
}

@keyframes shine-logo {
    100% { transform: translateX(100%); }
}

.landing-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 14px;
}

.landing-company-name {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 0.2rem;
    background: linear-gradient(to bottom, #ffffff 30%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 20px rgba(255,255,255,0.1));
}

.landing-divider {
    display: none;
}

.landing-tagline {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 6px;
    text-transform: uppercase;
    opacity: 0.7;
}

/* Safety: Prevent ghost contact info from obstructing the hero area */
.landing-hero .footer-contact, 
.landing-hero-text .footer-contact,
.landing-logo-wrap + .footer-contact {
    display: none !important;
}

.landing-cards {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    width: 100%;
    max-width: 800px;
    animation: cards-entrance 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
    opacity: 0;
}

@keyframes cards-entrance {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

.lcard {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    padding: 2rem 1.5rem;
    border-radius: var(--radius-lg);
    text-align: center;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}

.lcard::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(255,255,255,0.08) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s;
}

.lcard:hover::before { opacity: 1; }

.lcard:hover {
    transform: translateY(-12px) scale(1.03);
    border-color: var(--primary);
    box-shadow: 0 30px 60px rgba(0,0,0,0.5), 0 0 40px var(--primary-glow);
}

.lcard-primary:hover { border-color: var(--primary); }
.lcard-success:hover { border-color: var(--secondary); }

.lcard-icon {
    font-size: 2rem;
    background: var(--glass-bg);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.lcard:hover .lcard-icon {
    transform: scale(1.1) rotate(5deg);
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
}

.lcard-success:hover .lcard-icon {
    background: var(--secondary);
    border-color: var(--secondary);
    box-shadow: 0 0 20px var(--secondary-glow);
}

.lcard h3 {
    font-size: 1.2rem;
    color: white;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin: 0;
}

.lcard p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin: 0;
}

.landing-footer {
    position: relative;
    margin-top: auto;
    width: 100%;
    padding: 4rem 2rem 3rem;
    text-align: center;
    background: linear-gradient(to top, rgba(3, 7, 18, 0.9), transparent);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--glass-border);
    z-index: 10;
}

.footer-contact {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-soft);
    font-weight: 500;
}

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

/* ========================================== */

#applicantRegister, #applicantLogin, #adminLogin {
    padding: 1rem 2rem;
    max-width: 550px;
}

@media (max-width: 768px) {
    .view-section {
        padding: 1.5rem;
        border-radius: 16px;
    }
}

/* Forceful collapse for hidden views to prevent layout gaps or displacement */
.view-section.hidden {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    
    pointer-events: none !important;
}

.view-section.active {
    position: relative !important;
    height: auto !important;
    min-height: 400px; /* Consistent height base */
    visibility: visible !important;
    display: flex !important;
    flex-direction: column;
}

/* Shell Visibility Classes */
.app-container.hidden {
    display: none !important;
}

.landing-screen.hidden {
    display: none !important;
}


/* Admin Dashboard Stats */
.stats-header {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 220px;
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.1);
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 600;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
    line-height: 1;
}

.stat-trend {
    font-size: 0.8rem;
    font-weight: 600;
}

.stat-trend.up { color: var(--success); }

.landing-actions {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 3rem 0;
}

.btn-lg {
    padding: 1.5rem 2.5rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 280px;
    justify-content: center;
}

.company-quick-contact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Admin Login */
.login-card {
    max-width: 480px;
    margin: 0 auto;
    padding: 0.5rem 0;
}

.registration-grid {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.form-row-compact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}

.col-title {
    flex: 0 0 100px;
}

.form-row-compact:has(.col-title) {
    grid-template-columns: 100px 1fr;
}

.login-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* Admin Dashboard & Custom Buttons */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.header-titles h3 {
    font-size: 1.5rem;
    color: var(--primary);
}

.header-titles p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border-light);
    color: var(--text-main);
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-main);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.05);
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-icon {
    width: 60px;
    height: 60px;
    background: var(--glass-bg);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
    border: 1px solid var(--glass-border-light);
    box-shadow: 0 0 20px var(--primary-glow);
    color: var(--primary);
}

.premium-title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 0.5rem;
    color: white;
}

.login-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.logo-link:hover {
    transform: translateX(5px);
}

.logo-text h2 {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(to bottom, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn-sm {
    padding: 0.5rem 1.2rem;
    font-size: 0.85rem;
}

.logout-btn {
    border-color: var(--error);
    color: var(--error);
    background: transparent;
}

.logout-btn:hover {
    background: var(--error);
    border-color: var(--error);
    color: white;
}

.logo-preview-img {
    max-height: 100px;
    margin-bottom: 1rem;
}

/* Onboarding Logic Visibility */
.onboarding-active .main-header .step-indicator {
    display: flex;
}

.onboarding-inactive .main-header .step-indicator {
    display: none !important;
}

.hidden {
    display: none !important;
}

/* Welcome UI */
.welcome-section {
    text-align: center;
}

.welcome-section h2 {
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.instruction-card {
    background: rgba(99, 102, 241, 0.05);
    border-left: 5px solid var(--primary);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 12px;
    text-align: left;
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-left-width: 5px;
}

/* Input Styles */
.section-header {
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1rem;
}

.section-header h3 {
    color: white;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    letter-spacing: -0.02em;
}

.section-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.input-grid.full-width {
    grid-template-columns: 1fr;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
}

.form-group label {
    font-weight: 700;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.form-group input, .form-group select, .form-group textarea {
    padding: 1rem 1.25rem;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    background: rgba(255, 255, 255, 0.02);
    color: white;
    backdrop-filter: blur(10px);
}

.form-group input::placeholder, .form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 20px var(--primary-glow);
}

select optgroup, select option {
    background: #0f172a;
    color: white;
}

.btn {
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: none;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #6366f1);
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px var(--primary-glow);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--glass-border-light);
    color: var(--text-main);
}

.btn-outline:hover {
    background: var(--glass-bg);
    border-color: var(--text-main);
    transform: translateY(-2px);
}

.nav-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
    padding-top: 1rem;
}

.section-header {
    margin-bottom: 1.5rem;
}

.section-header h3 {
    color: white;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Toggle Styles */
.experience-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: 14px;
    border: 1px solid var(--glass-border);
}

.toggle-group {
    display: flex;
    gap: 5px;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: 12px;
}

.toggle-group input[type="radio"] {
    display: none;
}

.toggle-group label {
    padding: 8px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.8rem;
    transition: all 0.3s;
    color: var(--text-muted);
}

.toggle-group input[type="radio"]:checked + label {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.2);
}

/* iOS Toggle System */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e1;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px; width: 18px;
    left: 3px; bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

input:checked + .slider {
    background-color: var(--success);
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--success);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* Upload Style */
.upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.upload-box {
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    position: relative;
    overflow: hidden;
}

.progress-ribbon {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    width: 0%;
    background: linear-gradient(to right, #6366f1, #a855f7, #10b981);
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

.progress-ribbon.active {
    animation: pulseGlow 2s infinite ease-in-out;
}

.progress-ribbon.waiting {
    animation: progressIndeterminate 1.5s infinite linear;
    width: 40%;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0.8; height: 4px; }
    50% { opacity: 1; height: 6px; box-shadow: 0 0 15px rgba(99, 102, 241, 0.6); }
}

/* Global Upload Indicator */
.cloud-upload-status {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid var(--primary);
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transform: translateY(-100px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cloud-upload-status.show {
    transform: translateY(0);
    opacity: 1;
}

.upload-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s infinite linear;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes progressIndeterminate {
    0% { left: -30%; }
    100% { left: 100%; }
}

.upload-box label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.upload-box small {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.drop-zone {
    border: 1.5px dashed var(--glass-border);
    border-radius: 16px;
    padding: 2.2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.drop-zone:hover {
    border-color: var(--primary);
    background: rgba(0, 105, 92, 0.05);
}

.drop-icon {
    font-size: 2rem;
}

.drop-text {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--primary);
}

/* Declaration */
.declaration-block {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    line-height: 1.6;
    font-size: 0.95rem;
    color: var(--text-main);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.1);
}

.declaration-check {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 600;
}

/* Buttons */
.btn {
    padding: 0.8rem 2rem;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 105, 92, 0.3);
}

.btn-secondary {
    background: #e2e8f0;
    color: #1e293b; /* Darker text for readability */
}

.btn-secondary:hover {
    background: #cbd5e1;
}

.btn-start {
    margin-top: 1rem;
    font-size: 1.2rem;
    padding: 1rem 3rem;
}

.nav-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2.5rem;
    border-top: 1px solid #e0f2f1;
    padding-top: 1.5rem;
}

/* Success View */
.success-view {
    text-align: center;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--success);
    color: white;
    border-radius: 50%;
    margin: 0 auto 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

.info-note {
    background: rgba(245, 158, 11, 0.05); /* Accent gold transparent */
    border-left: 5px solid var(--accent);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 12px;
    font-weight: 500;
    border: 1px solid var(--glass-border);
    border-left-width: 5px;
    color: var(--text-main);
}

.app-footer {
    margin-top: 3rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Hyperlink Styles */
.logo-link, .company-name-link, .contact-link {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.logo-link:hover, .company-name-link:hover {
    opacity: 0.8;
}

.contact-link {
    color: var(--primary);
    font-weight: 600;
}

.contact-link:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* Review Container Grouping */
.review-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.review-section-group {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(5px);
}

.review-section-group h4 {
    font-size: 0.9rem;
    color: var(--accent);
    margin-bottom: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.5rem;
}

.review-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.2rem;
}

.review-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.review-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.review-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
}

.error {
    border-color: var(--error) !important;
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.form-step {
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.form-step.active {
    display: block;
    opacity: 1;
    animation: fadeInStep 0.5s ease forwards;
}

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

/* Responsive */
@media (max-width: 768px) {
    .app-container { padding: 1rem; }
    .main-header { flex-direction: column; gap: 1rem; padding: 1rem; }
    .step-indicator { gap: 0.25rem; transform: scale(0.9); }
    .step-line { width: 15px; }
}

@media (max-width: 480px) {
    .step-indicator { gap: 0.15rem; transform: scale(0.8); }
    .step-line { width: 10px; }
}
/* Recruitment Pipeline Icons */
.pipeline-row {
    display: flex;
    gap: 8px;
    justify-content: center;
}
.p-icon {
    font-size: 1.1em;
    filter: grayscale(1);
    opacity: 0.3;
    transition: all 0.3s ease;
}
.p-icon.done {
    filter: grayscale(0);
    opacity: 1;
    transform: scale(1.1);
}

/* Workflow Modal Style */
.modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
.workflow-card {
    background: var(--card-bg);
    width: 90%;
    max-width: 500px;
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    padding: 24px;
}
.applicant-info-bar {
    background: var(--bg-soft);
    padding: 10px 15px;
    border-radius: 10px;
    margin: 15px 0;
    font-size: 0.9em;
    color: var(--text-soft);
}
.task-matrix {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--bg-soft);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}
.task-meta {
    display: flex;
    gap: 12px;
    align-items: center;
}
.task-icon { font-size: 1.5em; }
.task-meta strong { display: block; font-size: 0.95em; }
.task-meta small { font-size: 0.8em; }
.task-meta small.pending { color: var(--error); }
.task-meta small.completed { color: var(--success); }

.btn-icon-only {
    padding: 8px 12px;
    font-size: 0.8em;
}

.modal-footer {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
}
.btn-danger {
    background: linear-gradient(135deg, #ef4444, #991b1b);
    color: white;
}

/* Compact Upload Boxes for Company Profile */
.upload-box-sm {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.upload-box-sm label {
    font-weight: 700;
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.drop-zone-sm {
    border: 2px dashed var(--glass-border);
    border-radius: 10px;
    padding: 0.8rem 0.6rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    background: rgba(255,255,255,0.03);
}

.drop-zone-sm:hover {
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.05);
    transform: translateY(-2px);
}

.drop-icon-sm {
    font-size: 1.3rem;
    line-height: 1;
}

.drop-label-sm {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    word-break: break-word;
}

.modal-actions-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.btn-success {
    background: linear-gradient(135deg, #065f46, #10b981);
    color: white;
}


/* Applicant Portal & Admin Enhancements */

.landing-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    width: 100%;
    max-width: 900px;
    margin: 2rem auto 0;
}

.landing-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.landing-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.15);
}

.landing-card h3 {
    font-size: 1.2rem;
    color: white;
    margin: 0;
}

.landing-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

.landing-card-icon {
    font-size: 2rem;
    margin-bottom: 12px;
    padding: 10px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: all 0.3s;
}

.landing-card:hover .landing-card-icon {
    transform: scale(1.1) rotate(5deg);
    background: rgba(99, 102, 241, 0.2);
}

.admin-portal-link {
    margin-top: 1.5rem;
    width: 100%;
    text-align: center;
}

.btn-link {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    opacity: 0.7;
    transition: all 0.3s;
}

.btn-link:hover {
    color: var(--primary);
    opacity: 1;
}

/* Desktop-First Admin Mode (Full Width) */
body.admin-mode .dashboard-container {
    width: 100% !important;
    max-width: none !important;
    padding: 0 40px;
}

body.admin-mode #appShell {
    max-width: none !important;
}

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

/* Admin Tabs */
.panel-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 2.5rem;
}

.tab-btn {
    flex: 1;
    padding: 1rem 1.2rem;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.3s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.95rem;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.tab-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.admin-tab-content {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
}

.admin-tab-content.hidden {
    display: none;
}

/* Applicant Management Table */
.search-bar {
    margin-bottom: 2rem;
}

.search-bar input {
    width: 100%;
    padding: 1.2rem 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 1rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

.table-container {
    overflow-x: auto;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    color: white;
}

.admin-table th, .admin-table td {
    padding: 1.2rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.admin-table th {
    background: rgba(255, 255, 255, 0.02);
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
}

.admin-table tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.badge {
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.badge.draft { background: rgba(239, 68, 68, 0.1); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.2); }
.badge.submitted { background: rgba(16, 185, 129, 0.1); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.2); }
.badge.approved { background: rgba(99, 102, 241, 0.1); color: #a5b4fc; border: 1px solid rgba(99, 102, 241, 0.2); }
.badge.rejected { background: rgba(148, 163, 184, 0.1); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.2); }

.btn-action {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.05);
    color: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-action.primary { background: rgba(99, 102, 241, 0.1); color: #a5b4fc; border-color: rgba(99, 102, 241, 0.2); }
.btn-action.success { background: rgba(16, 185, 129, 0.1); color: #6ee7b7; border-color: rgba(16, 185, 129, 0.2); }
.btn-action.error { background: rgba(239, 68, 68, 0.1); color: #fca5a5; border-color: rgba(239, 68, 68, 0.2); }

.btn-action:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
}

.action-flex {
    display: flex;
    gap: 5px;
}

/* Login Card Enhancements */
.login-header {
    text-align: center;
    margin-bottom: 0.75rem;
}

.premium-title {
    font-size: 1.15rem;
    background: linear-gradient(45deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.1rem;
}

.login-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

/* ===========================
   Asset Gallery / Library
   =========================== */
.gallery-header-info {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
}
.gallery-header-info h4 {
    font-size: 1.4rem;
    color: white;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}
.gallery-header-info p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.asset-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.2rem;
    margin-top: 1.5rem;
}

.asset-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    position: relative;
    overflow: hidden;
}

.asset-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px -10px rgba(99, 102, 241, 0.3);
}

.asset-delete-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    opacity: 0.8;
}

.asset-delete-btn:hover {
    transform: scale(1.1);
    opacity: 1;
    background: #dc2626;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.6);
}

.asset-card-preview {
    width: 100%;
    aspect-ratio: 1/1; 
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 4px; /* Minimal padding for maximum image visibility */
}

.asset-card-preview img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3));
    transition: transform 0.4s;
}

.asset-card:hover .asset-card-preview img {
    transform: scale(1.1);
}

.asset-card-preview .pdf-icon {
    font-size: 3.5rem;
    filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.4));
}

.asset-card-preview .empty-icon {
    font-size: 3rem;
    opacity: 0.15;
}

.asset-card-body {
    padding: 1.2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.asset-card-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.asset-card-status {
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.asset-card-status.uploaded { color: var(--success); }
.asset-card-status.missing { color: var(--text-muted); opacity: 0.6; }

.asset-card-action {
    margin-top: 1rem;
}

.btn-asset-view {
    width: 100%;
    padding: 0.65rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.btn-asset-view:hover:not(.disabled) {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

.btn-asset-view.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* --- Colorful Branding Cards --- */
.branding-upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
    padding: 0.5rem;
}

.upload-box-sm { 
    position: relative; 
    width: 100%;
    min-width: 220px;
    height: 380px; /* Fixed height for all boxes */
    display: flex; 
    flex-direction: column; 
    background: rgba(255, 255, 255, 0.02);
    border-radius: 18px;
    padding: 1.2rem;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.upload-box-sm label {
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
    display: block;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.upload-box-sm .drop-zone-sm {
    height: 120px; /* Uniform drop zone height */
    width: 100%;
    flex-shrink: 0;
    background: rgba(255,255,255,0.03);
    border: 1.5px dashed var(--glass-border);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.asset-list-vertical {
    margin-top: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex-grow: 1; /* Take up remaining space in the fixed-height box */
    overflow-y: auto;
    padding-right: 5px;
}

.asset-list-vertical::-webkit-scrollbar { width: 4px; }
.asset-list-vertical::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }

.asset-list-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.asset-list-item:hover { background: rgba(255,255,255,0.06); }
.asset-list-item.active { border-color: var(--primary); background: rgba(99, 102, 241, 0.1); }

.asset-mini-preview {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.asset-mini-preview img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.asset-item-info { flex: 1; min-width: 0; }
.asset-item-name { 
    font-size: 0.75rem; 
    font-weight: 600; 
    color: white; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
}

.asset-item-actions { display: flex; gap: 0.4rem; }

.btn-asset-mini {
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: white;
    transition: all 0.2s;
}

.btn-asset-mini:hover { background: var(--primary); border-color: var(--primary); }
.btn-asset-mini.active-tag { background: var(--success); border-color: var(--success); cursor: default; }
.btn-asset-mini.delete-btn:hover { background: #ef4444; border-color: #ef4444; }

.logo-box .drop-zone-sm   { background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), transparent); border-color: rgba(99, 102, 241, 0.3); }
.stamp-box .drop-zone-sm  { background: linear-gradient(135deg, rgba(239, 68, 68, 0.05), transparent); border-color: rgba(239, 68, 68, 0.3); }
.sig-box .drop-zone-sm    { background: linear-gradient(135deg, rgba(6, 182, 212, 0.05), transparent); border-color: rgba(6, 182, 212, 0.3); }
.mobile-box .drop-zone-sm { background: linear-gradient(135deg, rgba(245, 158, 11, 0.05), transparent); border-color: rgba(245, 158, 11, 0.3); }
.tada-box .drop-zone-sm   { background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), transparent); border-color: rgba(16, 185, 129, 0.3); }

.upload-box-sm:hover .drop-zone-sm {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px -5px rgba(0,0,0,0.3);
}
.logo-box:hover .drop-zone-sm   { border-color: #6366f1; box-shadow: 0 5px 15px rgba(99, 102, 241, 0.2); }
.stamp-box:hover .drop-zone-sm  { border-color: #ef4444; box-shadow: 0 5px 15px rgba(239, 68, 68, 0.2); }
.sig-box:hover .drop-zone-sm    { border-color: #06b6d4; box-shadow: 0 5px 15px rgba(6, 182, 212, 0.2); }
.mobile-box:hover .drop-zone-sm { border-color: #f59e0b; box-shadow: 0 5px 15px rgba(245, 158, 11, 0.2); }
.tada-box:hover .drop-zone-sm   { border-color: #10b981; box-shadow: 0 5px 15px rgba(16, 185, 129, 0.2); }

/* ===========================
   Setup & Letters Tab cleanup
   =========================== */
.setup-section {
    background: rgba(255,255,255,0.02);
    border-radius: 22px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
}
.setup-section-head h4 { font-size: 1.15rem; color: white; font-weight: 700; margin-bottom: 0.4rem; }
.setup-section-head p  { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.setup-hint { font-size: 0.82rem; color: var(--text-muted); margin: 0.8rem 0; }

.division-list { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1rem; }
.division-chip {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: var(--primary); color: white;
    padding: 0.4rem 1rem; border-radius: 50px;
    font-size: 0.82rem; font-weight: 700; letter-spacing: 0.04em;
}
.division-chip button {
    background: rgba(255,255,255,0.2); border: none; color: white; cursor: pointer;
    border-radius: 50%; width: 18px; height: 18px; font-size: 0.75rem;
    display: flex; align-items: center; justify-content: center; transition: background 0.2s;
}
.division-chip button:hover { background: rgba(255,255,255,0.4); }
.add-division-row { display: flex; gap: 0.8rem; align-items: center; flex-wrap: wrap; }
.form-input-sm {
    padding: 0.55rem 1rem;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
    width: 200px;
    background: rgba(15, 23, 42, 0.5);
    color: white;
}
.form-input-sm:focus { border-color: var(--primary); background: rgba(15, 23, 42, 0.8); }
.form-input-sm::placeholder { color: rgba(255, 255, 255, 0.35); }

.placeholder-guide {
    background: rgba(255,255,255,0.02); border: 1px dashed var(--glass-border); border-radius: 14px;
    padding: 1.2rem; margin-bottom: 1.2rem;
}
.placeholder-guide code {
    background: rgba(99, 102, 241, 0.1); color: #818cf8; padding: 2px 8px; border-radius: 6px;
}

/* ========================================== */
/* UNIFIED A4 SURFACE SYSTEM (FOOL-PROOF LOGIC) */
/* ========================================== */

.a4-page-standard {
    width: 210mm !important;
    min-height: 297mm !important;
    background: #ffffff !important;
    color: #1e293b !important;
    margin: 2rem auto !important;
    box-sizing: border-box !important;
    position: relative;
    box-shadow: 0 40px 100px rgba(0,0,0,0.5), 0 0 20px rgba(255,255,255,0.05);
    border-radius: 2px;
    line-height: 1.1 !important;
    overflow-wrap: break-word;
    word-wrap: break-word;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: none !important;
    outline: none !important;
    transform-origin: top center;
}

.fidelity-desk {
    background: rgba(15, 23, 42, 0.6);
    padding: 2rem;
    border-radius: 0 0 24px 24px;
    overflow-x: auto;
    overflow-y: visible;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 600px;
    position: relative;
    box-shadow: inset 0 0 40px rgba(0,0,0,0.4);
    border: 1px solid var(--glass-border);
    border-top: none;
}

.preview-control-overlay {
    position: sticky;
    top: 1rem;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    width: 100%;
    max-width: 800px;
}

.preview-mode {
    pointer-events: none;
    user-select: none;
}

.letter-editor {
    outline: none;
    padding: 65mm 20mm 25mm; /* Default, overridden by JS */
}

/* Page Boundary & Footer Marker Logic */
.a4-page-standard::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 10;
    /* Repeating Page Break Lines + Footer Safety Zones */
    background: 
        repeating-linear-gradient(to bottom, 
            transparent 0, 
            transparent calc(297mm - 1px), 
            rgba(99, 102, 241, 0.4) calc(297mm - 1px), 
            rgba(99, 102, 241, 0.4) 297mm
        ),
        repeating-linear-gradient(to top, 
            rgba(239, 68, 68, 0.08) 0, 
            rgba(239, 68, 68, 0.08) var(--footer-h-marker, 25mm), 
            transparent var(--footer-h-marker, 25mm), 
            transparent 297mm
        );
    background-size: 100% 297mm;
}

.letter-editor *, #livePreviewFrame * {
    font-family: inherit !important;
    font-size: inherit !important;
    color: inherit !important;
    line-height: inherit !important;
}

#livePreviewFrame {
    padding: 65mm 20mm 25mm;
}

.letter-editor:focus { 
    border-color: var(--primary); 
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2), 0 8px 32px rgba(0,0,0,0.4);
}

.wf-assign-panel {
    background: rgba(99, 102, 241, 0.05); border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 18px; padding: 1.5rem; margin-bottom: 1.2rem;
}
.wf-assign-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 0.8rem; }
@media (max-width: 600px) { .wf-assign-grid { grid-template-columns: 1fr; } }
.wf-select, .wf-input {
    width: 100%; padding: 0.55rem 0.9rem;
    background: rgba(0,0,0,0.2); border: 1px solid var(--glass-border); color: white;
    border-radius: 10px; font-size: 0.9rem; font-weight: 600;
    outline: none; transition: border-color 0.2s; box-sizing: border-box;
}
.wf-select:focus, .wf-input:focus { border-color: var(--primary); }
.letter-actions { display: flex; flex-direction: column; gap: 0.4rem; }
/* Add Category UI Enhancements */
.add-category-box {
    background: rgba(99, 102, 241, 0.03);
    border: 1px dashed rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    height: 100%;
}

.add-category-box:hover {
    background: rgba(99, 102, 241, 0.06);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.add-category-box .add-category-controls {
    display: flex;
    gap: 6px;
    width: 100%;
}

.add-category-box input {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    transition: all 0.3s;
}

.add-category-box input:focus {
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.4);
    outline: none;
}

.add-category-box button {
    white-space: nowrap;
    padding: 6px 14px;
    font-size: 0.8rem;
}

/* Unified Editor UI */
.setup-section {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.modern-editor-container {
    width: 100%;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

/* ===========================
   PREMIUM MASTER EDITOR v2.0
   =========================== */

.editor-workspace {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding-bottom: 8rem; /* Space for the floating sticky footer */
}

.editor-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    overflow: hidden;
    width: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(10px);
}

.editor-header-main {
    padding: 2rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 23, 42, 0.3);
}

.editor-toolbar {
    background: rgba(15, 23, 42, 0.8);
    padding: 0.75rem 1.5rem;
    display: flex;
    gap: 1.25rem;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--glass-border);
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(12px);
    display: flex;
    gap: 1.5rem;
    align-items: center;
    justify-content: space-between;
}

.btn-tool {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

.btn-tool:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-tool:active {
    transform: translateY(0);
    background: rgba(99, 102, 241, 0.3);
}

.btn-tool.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.v-divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 4px;
}

/* Master Editor Cluster Styles */
.toolbar-cluster {
    display: flex;
    align-items: center;
}

.toolbar-cluster .btn-tool {
    background: transparent !important;
    border: none !important;
    border-radius: 6px;
    min-width: 32px;
    height: 32px;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.7);
}

.toolbar-cluster .btn-tool:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    transform: none !important;
    box-shadow: none !important;
    color: white;
}

.toolbar-cluster .v-divider {
    height: 18px;
    margin: 0 6px;
}

/* Page Break UI */
.hard-page-break {
    position: relative;
    user-select: none;
    border-top: 2px dashed rgba(99, 102, 241, 0.3);
    margin: 30px 0;
    height: 20px;
}

.hard-page-break::after {
    content: "✂️ PAGE BREAK (FORCE NEXT PAGE)";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.6rem;
    font-weight: 800;
    color: var(--accent);
    background: #ffffff;
    padding: 2px 10px;
    border-radius: 20px;
    letter-spacing: 1px;
    white-space: nowrap;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.color-picker-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Metadata & Settings Pills */
.setting-group {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.pill-container {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 4px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 40px;
}

.pill-container label {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pill-container select, .pill-container input {
    background: transparent;
    border: none;
    color: white !important;
    font-size: 0.85rem;
    outline: none;
    font-weight: 600;
}

.pill-container input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.pill-container select option {
    background: #0f172a;
    color: white;
}

/* Editor Admin Actions Bar */
.editor-admin-bar {
    background: rgba(15, 23, 42, 0.4);
    padding: 1rem 1.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.editor-admin-bar input {
    background: transparent !important;
    border: none !important;
    color: white !important;
    font-weight: 700 !important;
    outline: none !important;
    padding: 0 !important;
    margin: 0 !important;
    font-family: inherit;
}

.editor-admin-bar input::placeholder {
    color: rgba(255, 255, 255, 0.3);
    font-weight: 400;
}

.guide-box {
    background: rgba(99, 102, 241, 0.03);
    border: 1px dashed rgba(99, 102, 241, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.placeholder-tag {
    background: rgba(99, 102, 241, 0.1);
    color: #818cf8;
    padding: 4px 10px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    margin-right: 6px;
    margin-bottom: 6px;
    display: inline-block;
    border: 1px solid rgba(99, 102, 241, 0.2);
    cursor: copy;
    transition: all 0.2s;
}

.placeholder-tag:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* Preview Fidelity Highlights */
.preview-highlight {
    background: rgba(99, 102, 241, 0.08);
    color: var(--primary);
    font-weight: 700;
    border-bottom: 1px dashed var(--primary);
}



#livePreviewFrame p, #unifiedEditor p, #livePreviewFrame div, #unifiedEditor div {
    margin: 0 !important;
}

#livePreviewContainer {
    animation: fadeInScale 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.98) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
/* ===========================
   APPLICANT ONBOARDING HUB
   =========================== */

#applicantDashboard {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
    padding-top: 1rem;
}

.dash-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.applicant-card-premium {
    background: rgba(45, 55, 72, 0.4);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-xl);
}

.avatar-lg {
    width: 90px;
    height: 90px;
    background: var(--primary);
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.4);
    border: 4px solid rgba(255, 255, 255, 0.1);
}

.dash-sidebar h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: white;
}

.dash-sidebar p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* Timeline Premium */
.onboarding-timeline {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 0.5rem 0;
}

.timeline-item-premium {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    position: relative;
    opacity: 0.4;
    transition: all 0.4s ease;
}

.timeline-item-premium.done {
    opacity: 1;
}

.timeline-dot-premium {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-muted);
    flex-shrink: 0;
    z-index: 2;
    transition: all 0.3s ease;
}

.timeline-item-premium.done .timeline-dot-premium {
    background: var(--success);
    border-color: var(--success);
    color: white;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}

.timeline-label-premium {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
}

.timeline-item-premium.done .timeline-label-premium {
    color: white;
}

/* Connectors */
.timeline-item-premium:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 15px;
    top: 32px;
    width: 2px;
    height: calc(100% - 8px);
    background: var(--glass-border);
    z-index: 1;
}

.timeline-item-premium.done:not(:last-child)::after {
    background: var(--success);
    opacity: 0.5;
}

/* Main Dashboard Cards */
.dash-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    margin-bottom: 2rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.dash-card:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
}

.dash-card-header {
    background: rgba(15, 23, 42, 0.3);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dash-card-header h3 {
    font-size: 1.25rem;
    color: white;
    margin-bottom: 4px;
}

.dash-card-header p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

.dash-card-body {
    padding: 2rem;
}

.icon-bubble {
    width: 44px;
    height: 44px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.letter-preview-box {
    background: white;
    color: #1e293b;
    padding: 3rem;
    border-radius: 12px;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    min-height: 200px;
    box-shadow: var(--shadow-lg);
    line-height: 1.6;
    overflow-x: auto;
}

/* Status Summary Box */
.status-summary-box {
    text-align: center;
    padding: 2rem;
}

.status-icon-pending {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    animation: rotate 4s linear infinite;
    display: inline-block;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Status Badges */
.badge.onboarding {
    background: rgba(99, 102, 241, 0.1);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.badge.joined {
    background: rgba(5, 150, 105, 0.1);
    color: #34d399;
    border: 1px solid rgba(5, 150, 105, 0.3);
}

.btn-tool-danger {
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-tool-danger:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fff;
    opacity: 1 !important;
    transform: scale(1.1);
}

/* Landing Cards Grid */
.landing-cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; width: 100%; margin-top: 2rem; }
@media (max-width: 768px) { .landing-cards-grid { grid-template-columns: 1fr; } }
.landing-card { background: var(--card-bg); border: 1px solid var(--glass-border); padding: 2.5rem 1.5rem; border-radius: 20px; cursor: pointer; transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); backdrop-filter: blur(10px); display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.landing-card:hover { transform: translateY(-8px) scale(1.02); border-color: var(--primary); background: rgba(99, 102, 241, 0.08); box-shadow: 0 20px 40px rgba(0,0,0,0.3); }
/* Departmental Picker Styles */
.picker-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
    margin-top: 10px;
}

.picker-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1.25rem;
    transition: all 0.3s ease;
}

.picker-card h5 {
    color: var(--primary-light);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.5rem;
}

.picker-grid {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-height: 250px;
    overflow-y: auto;
    padding-right: 5px;
}
.picker-grid::-webkit-scrollbar { width: 4px; }
.picker-grid::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px;
}

.picker-btn {
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-main);
    font-size: 0.82rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.picker-btn:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--primary);
    transform: translateX(4px);
}

.picker-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.picker-btn.active::after {
    content: "✓";
    font-weight: bold;
}

/* Documents Status in Dashboard */
.docs-status-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.doc-status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.doc-status-row:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

.doc-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.doc-info .name {
    font-size: 0.9rem;
    font-weight: 600;
}

.doc-info .status {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.doc-status-tag {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
}

.doc-status-tag.approved { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.doc-status-tag.rejected { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.doc-status-tag.pending { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }

.doc-status-row.rejected-mode {
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-left: 4px solid #ef4444;
}

/* Error feedback animation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.form-group input.error, .form-group select.error {
    border-color: var(--error) !important;
    animation: shake 0.4s ease-in-out;
}

/* Compact Mode Overrides */
body.onboarding-inactive .main-header { margin-bottom: 0.5rem !important; padding: 0.4rem 1.25rem !important; min-height: 55px !important; }
body.onboarding-inactive.hide-marquee .top-scroll-marquee { display: none !important; }
#applicantRegister .login-header, #applicantLogin .login-header { margin-bottom: 0.75rem !important; }
#applicantRegister .login-icon, #applicantLogin .login-icon { display: none !important; } /* Hide icon to save space */

/* Final Compact Polish */
body.onboarding-inactive .app-container { padding: 0.5rem !important; min-height: auto !important; }
body.onboarding-inactive .form-wrapper { min-height: auto !important; }
body.onboarding-inactive .main-header h1 { font-size: 1.1rem !important; }
body.onboarding-inactive .logo-container { height: 32px !important; }
body.onboarding-inactive .header-logo img { height: 28px !important; }
#applicantRegister, #applicantLogin, #adminLogin { padding: 1rem 1.5rem !important; margin-top: 0 !important; }

.login-header p { font-size: 0.8rem !important; margin-bottom: 0.5rem !important; }
/* ========================================== */
/* MULTI-FILE UPLOAD AESTHETICS             */
/* ========================================== */
.uploaded-files-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
    width: 100%;
}

.file-item-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.82rem;
    transition: all 0.3s ease;
    animation: slideInLow 0.3s ease-out;
}

.file-item-pill:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
}

.file-item-pill .file-name {
    color: var(--text-main);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-remove-file {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    transition: color 0.3s ease;
}

.btn-remove-file:hover {
    color: var(--error);
}

.drop-zone.has-files {
    border-style: solid;
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.05);
}

.drop-zone.has-files:hover {
    background: rgba(16, 185, 129, 0.1);
}

@keyframes slideInLow {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}
/* Letter Preview Box - Professional A4 Look */
.letter-preview-box {
    background: #ffffff;
    color: #000000;
    padding: 20mm;
    border-radius: 4px;
    border: 1px solid rgba(0,0,0,0.15);
    width: 210mm; /* A4 Width */
    min-height: 297mm; /* A4 Height */
    margin: 2rem auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    position: relative;
    overflow: visible; /* Capture full length */
    transform-origin: top center;
}

/* Scale down for laptop screens to fit width */
@media (max-width: 1400px) {
    .letter-preview-box {
        transform: scale(0.85);
        margin-top: -50px;
        margin-bottom: -50px;
    }
}

@media (max-width: 1100px) {
    .letter-preview-box {
        transform: scale(0.7);
        margin-top: -100px;
        margin-bottom: -100px;
    }
}

.letter-preview-container {
    background: rgba(0,0,0,0.1);
    padding: 2rem;
    border-radius: 12px;
    overflow-x: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}
/* Onboarding Form Action Header */
.form-header-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 1.5rem;
    padding: 0 0.5rem;
}

.btn-action-small {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-soft);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-action-small:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    color: white;
}

.btn-logout-danger:hover {
    border-color: var(--error);
    background: rgba(244, 63, 94, 0.1);
    color: var(--error);
}

.btn-action-small span { font-size: 1rem; }

/* Global System Toasts */
#toastNotif { 
    position: fixed; 
    bottom: 2rem; 
    left: 50%; 
    transform: translateX(-50%) translateY(100px); 
    background: rgba(15, 23, 42, 0.9); 
    color: #fff; 
    padding: 0.75rem 1.5rem; 
    border-radius: 50px; 
    font-weight: 600; 
    font-size: 0.85rem; 
    box-shadow: 0 10px 40px rgba(0,0,0,0.5); 
    z-index: 10001; 
    opacity: 0; 
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1); 
    max-width: 90%; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    gap: 10px; 
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(20px);
    pointer-events: none;
}
#toastNotif.show { transform: translateX(-50%) translateY(0); opacity: 1; }
#toastNotif.success { background: linear-gradient(135deg, #064e3b, #10b981); border-color: rgba(16, 185, 129, 0.3); }
#toastNotif.error { background: linear-gradient(135deg, #7f1d1d, #ef4444); border-color: rgba(239, 68, 68, 0.3); }
#toastNotif.warning { background: linear-gradient(135deg, #78350f, #f59e0b); border-color: rgba(245, 158, 11, 0.3); }
#toastNotif.secondary { background: linear-gradient(135deg, #1e3a5f, #3b82f6); border-color: rgba(59, 130, 246, 0.3); }

/* Placeholder Sidebar */
.editor-sidebar {
    width: 280px;
    background: rgba(15, 23, 42, 0.98);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    z-index: 100;
}

.editor-sidebar.hidden {
    width: 0;
    border-right-width: 0;
}

.sidebar-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sidebar-header span {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
}

.sidebar-header button {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

.sidebar-search {
    padding: 1.25rem;
}

.sidebar-search input {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 10px 14px;
    color: white;
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.3s;
}

.sidebar-search input:focus {
    border-color: var(--primary);
}

.sidebar-tag-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 1.25rem 1.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) transparent;
}

.tag-group {
    margin-bottom: 2rem;
}

.tag-group-title {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 1rem;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tag-item {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 8px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.8rem;
    color: #818cf8;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tag-item:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--primary);
    transform: translateX(6px);
    color: white;
}

.tag-item::after {
    content: '+';
    font-size: 1rem;
    opacity: 0.5;
}

/* Floating Contextual Toolbar */
.floating-toolbar {
    position: absolute;
    background: #1e293b;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    padding: 6px;
    display: flex;
    gap: 6px;
    box-shadow: 0 20px 50px -10px rgba(0,0,0,0.7);
    z-index: 2000;
    pointer-events: auto;
    transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(10px);
}

.floating-toolbar.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px) scale(0.95);
}

.floating-toolbar button {
    background: transparent;
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.floating-toolbar button:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-2px);
}

.floating-toolbar .v-divider {
    background: rgba(255,255,255,0.1);
    width: 1px;
    margin: 4px 2px;
}
