/* Self-Hosted & Local BPG Arial Web Font Definition */
@font-face {
    font-family: 'BPG Arial';
    src: url('../vendor/bpg-arial/fonts/bpg-arial-webfont.eot');
    src: url('../vendor/bpg-arial/fonts/bpg-arial-webfont.eot?#iefix') format('embedded-opentype'),
         url('../vendor/bpg-arial/fonts/bpg-arial-webfont.woff2') format('woff2'),
         url('../vendor/bpg-arial/fonts/bpg-arial-webfont.woff') format('woff'),
         url('../vendor/bpg-arial/fonts/bpg-arial-webfont.ttf') format('truetype'),
         url('../vendor/bpg-arial/fonts/bpg-arial-webfont.svg#bpg_arialregular') format('svg');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg-main: #f8fafc;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --bg-light: #f1f5f9;
    
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #eef2ff;
    
    --accent-emerald: #10b981;
    --accent-emerald-light: #ecfdf5;
    --accent-amber: #d97706;
    --accent-amber-light: #fffbeb;
    --accent-rose: #f43f5e;
    
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --text-light: #ffffff;
    
    --border-color: #cbd5e1;
    --border-focus: #818cf8;
    
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.04);
    --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 20px 40px -10px rgba(79, 70, 229, 0.12), 0 8px 16px -4px rgba(15, 23, 42, 0.06);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body, input, select, textarea, button {
    font-family: 'BPG Arial', 'BPG Glaho Arial', 'Fira GO', sans-serif !important;
}

body {
    background: #0f172a;
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Ambient Video Background */
.hero-video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.hero-bg-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.95) contrast(1.02);
}

.hero-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.42) 0%, rgba(15, 23, 42, 0.62) 100%);
    backdrop-filter: blur(2px);
}

/* Bright Light Glass Header */
.portal-header {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid #e2e8f0;
    padding: 1.1rem 2.25rem;
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.brand-logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo-img {
    height: 26px;
    width: auto;
    object-fit: contain;
    filter: none; /* Original Crisp Logo */
}

.hero-brand-logo-img {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.brand-divider {
    height: 20px;
    width: 1px;
    background: #cbd5e1;
}

.portal-badge-title {
    font-size: 0.76rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 0.08em;
    background: var(--primary-light);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    border: 1px solid #c7d2fe;
}

.brand-text h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.01em;
}

.brand-text p {
    font-size: 0.76rem;
    color: #64748b;
    font-weight: 600;
}

/* Language Selector Custom Dropdown (Right-aligned in header) */
.lang-dropdown-wrapper {
    position: relative;
    margin-left: 6px;
}

.lang-dropdown-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: var(--text-dark);
    padding: 8px 14px;
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

.lang-dropdown-btn:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.lang-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 155px;
    max-width: calc(100vw - 24px);
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.2);
    padding: 6px;
    z-index: 500;
    display: none;
    flex-direction: column;
    gap: 2px;
    animation: fadeInDown 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.lang-dropdown-menu.show {
    display: flex;
}

.lang-option-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    transition: var(--transition);
}

.lang-option-item:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.lang-option-item.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 800;
}

.svg-flag {
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    flex-shrink: 0;
}

/* Header Right Actions */
.header-right-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-profile-header-expanded {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px;
    border-radius: var(--radius-md);
    transition: background 0.2s ease;
}

.user-profile-header-expanded:hover {
    background: rgba(241, 245, 249, 0.8);
}

.user-profile-header-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    line-height: 1.2;
}

.user-header-meta-txt {
    font-size: 0.82rem;
    color: #64748b;
    font-weight: 500;
    margin-top: 2px;
    line-height: 1.35;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9.5px 20px;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.btn-outline-light {
    background: #ffffff;
    border-color: #cbd5e1;
    color: var(--text-dark);
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

.btn-outline-light:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

.btn-emerald {
    background: var(--accent-emerald);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-emerald:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

/* SPA PAGE VIEW ROUTER & TRANSITIONS */
.page-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    animation: viewFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes viewFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Dedicated Full-Page Registration Wizard View */
.dedicated-wizard-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    position: relative;
    z-index: 10;
}

.dedicated-wizard-card {
    background: #ffffff;
    border-radius: 28px;
    max-width: 820px; /* Spacious and readable */
    width: 100%;
    box-shadow: 0 25px 70px -15px rgba(15, 23, 42, 0.22), 0 10px 20px -5px rgba(79, 70, 229, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.9);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.dedicated-wizard-header {
    background: #ffffff;
    color: var(--text-dark);
    padding: 2.25rem 2.75rem;
    position: relative;
    border-bottom: 1px solid #e2e8f0;
}

.btn-back-home {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #475569;
    padding: 7px 16px;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-back-home:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: #c7d2fe;
    transform: translateX(-3px);
}

.wizard-badge {
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid #c7d2fe;
    padding: 5px 16px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dedicated-wizard-title {
    font-size: 1.55rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: #0f172a;
}

.dedicated-wizard-subtitle {
    font-size: 0.88rem;
    color: #64748b;
    font-weight: 500;
}

.dedicated-wizard-body {
    padding: 2.75rem 2.75rem;
    background: #ffffff;
    flex: 1;
}

.dedicated-wizard-footer {
    padding: 1.5rem 2.75rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Hero Container Layout */
.hero-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 1.5rem;
    position: relative;
    z-index: 10;
    gap: 3.5rem;
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
}

/* First Hero Section - Boxless Layout over Video */
.hero-card {
    background: none !important;
    backdrop-filter: none !important;
    border: none !important;
    box-shadow: none !important;
    max-width: 860px;
    width: 100%;
    padding: 0;
    text-align: center;
}

.hero-pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 7px 20px;
    border-radius: var(--radius-full);
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.hero-title {
    font-size: 2.75rem;
    font-weight: 800;
    color: #ffffff !important;
    line-height: 1.2;
    margin-bottom: 1.25rem;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.95), 0 2px 8px rgba(0, 0, 0, 0.8);
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.12rem;
    color: #ffffff !important;
    line-height: 1.6;
    margin-bottom: 2.25rem;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 500;
    text-shadow: 0 3px 20px rgba(0, 0, 0, 0.95), 0 1px 4px rgba(0, 0, 0, 0.8);
}

.hero-actions-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
}

.btn-hero-action {
    padding: 15px 36px;
    font-size: 1.02rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.5);
}

.btn-hero-action-sec {
    padding: 15px 32px;
    font-size: 1.02rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #ffffff;
    transition: var(--transition);
}

.btn-hero-action-sec:hover {
    background: rgba(255, 255, 255, 0.35);
    border-color: #ffffff;
    color: #ffffff;
    transform: translateY(-2px);
}

/* Bottom Timeline Section - Broader, Wider Glass Container */
.timeline-section-card {
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 28px;
    max-width: 1280px;
    width: 100%;
    padding: 2.75rem 2.5rem;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.timeline-header {
    text-align: center;
    margin-bottom: 2.25rem;
}

.timeline-pill-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(129, 140, 248, 0.25);
    color: #c7d2fe;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 6px 18px;
    border-radius: var(--radius-full);
    margin-bottom: 10px;
    border: 1px solid rgba(199, 210, 254, 0.35);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.timeline-section-title {
    font-size: 1.85rem;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.timeline-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    position: relative;
}

.timeline-step-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 20px;
    padding: 1.65rem 1.25rem;
    position: relative;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.timeline-step-card:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.timeline-step-number {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    font-size: 1.25rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: -0.02em;
}

.timeline-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.1rem;
}

.timeline-step-title {
    font-size: 1.02rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
    line-height: 1.35;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.timeline-step-desc {
    font-size: 0.85rem;
    color: #e2e8f0;
    line-height: 1.55;
    font-weight: 500;
}

.timeline-section-title {
    font-size: 1.85rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.timeline-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    position: relative;
}

.timeline-step-card {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 1.85rem 1.35rem;
    position: relative;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.timeline-step-card:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
}

.timeline-step-number {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    font-size: 1.25rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: -0.02em;
}

.timeline-icon-box {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.2rem;
}

.timeline-step-title {
    font-size: 1.02rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
    line-height: 1.3;
}

.timeline-step-desc {
    font-size: 0.85rem;
    color: #cbd5e1;
    line-height: 1.5;
}

.hero-pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    margin-bottom: 1.25rem;
    border: 1px solid #c7d2fe;
}

.hero-title {
    font-size: 2.1rem;
    font-weight: 700;
    color: #1e1b4b;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1rem;
    color: #475569;
    line-height: 1.65;
    margin-bottom: 2.5rem;
}

.hero-actions-row {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-hero-action {
    padding: 13px 30px;
    font-size: 1rem;
    border-radius: var(--radius-md);
}

.btn-hero-action-sec {
    padding: 13px 26px;
    font-size: 1rem;
    color: var(--text-dark);
    border-color: #cbd5e1;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.btn-hero-action-sec:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

/* WIZARD & LOGIN MODALS - Larger Centered Glass Popups */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(11, 15, 25, 0.68);
    backdrop-filter: blur(12px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.wizard-modal-card {
    background: #ffffff;
    border-radius: 28px;
    width: 100%;
    max-width: 720px; /* Wider and larger */
    height: auto;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 30px 80px -15px rgba(15, 23, 42, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.9);
    overflow: hidden;
    transform: scale(0.93) translateY(12px);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
    border: 1px solid #e2e8f0;
}

.modal-overlay.active .wizard-modal-card {
    transform: scale(1) translateY(0);
}

.wizard-modal-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 60%, #312e81 100%);
    color: #ffffff;
    padding: 1.85rem 2.25rem;
    position: relative;
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.1);
}

.wizard-modal-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
    color: #ffffff;
}

.wizard-modal-subtitle {
    font-size: 0.84rem;
    color: #a5b4fc;
    font-weight: 500;
}

.modal-close-btn {
    position: absolute;
    top: 1.35rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: rotate(90deg) scale(1.08);
}

/* Wizard Stepper Progress Bar with Track Lines */
.wizard-progress-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1.5rem;
    position: relative;
    padding: 0 4px;
}

.wizard-step-dot {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #94a3b8;
    z-index: 2;
    transition: var(--transition);
}

.wizard-step-dot.active {
    color: var(--primary);
    font-weight: 800;
}

.wizard-step-dot.completed {
    color: #059669;
    font-weight: 700;
}

.dot-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f1f5f9;
    border: 2px solid #cbd5e1;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.wizard-step-dot.active .dot-circle {
    background: var(--primary);
    border-color: #6366f1;
    color: #ffffff;
    box-shadow: 0 0 16px rgba(79, 70, 229, 0.45);
}

.wizard-step-dot.completed .dot-circle {
    background: var(--accent-emerald);
    border-color: #34d399;
    color: #ffffff;
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.3);
}

.wizard-modal-body {
    padding: 2.25rem;
    overflow-y: auto;
    flex: 1;
    background: #ffffff;
}

/* Entity Type Selector Cards - Modern Glass */
.entity-type-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.1rem;
    margin-bottom: 1.5rem;
}

.entity-option-card {
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.65rem 1.25rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: #f8fafc;
    position: relative;
}

.entity-option-card:hover {
    border-color: var(--border-focus);
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08);
}

.entity-option-card.selected {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.16);
}

.entity-svg-icon {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.entity-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
}

.entity-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Forgot Password Link */
.forgot-pass-link {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

.forgot-pass-link:hover {
    color: #3730a3;
    text-decoration: underline;
}
.form-group {
    margin-bottom: 1.35rem;
}

.form-label {
    display: block;
    font-size: 0.84rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 7px;
    letter-spacing: -0.01em;
}

.form-label .req {
    color: var(--accent-rose);
    margin-left: 3px;
}

.form-control {
    width: 100%;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: var(--text-dark);
    padding: 11.5px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.form-control:focus {
    border-color: #6366f1;
    background: #ffffff;
    outline: none;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.14);
}

/* Password Generator Button */
.password-input-wrapper {
    position: relative;
    display: flex;
    gap: 8px;
}

.btn-generate-pass {
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid #c7d2fe;
    padding: 0 16px;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-generate-pass:hover {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* Wizard Modal Footer */
.wizard-modal-footer {
    padding: 1.25rem 2.25rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Status Banners */
.status-banner {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.status-banner.pending {
    background: var(--accent-amber-light);
    color: #92400e;
    border: 1px solid rgba(217, 119, 6, 0.3);
}

.status-banner.success {
    background: var(--accent-emerald-light);
    color: #065f46;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Rich Whitish Glassmorphic Portal Footer */
.portal-footer {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: var(--text-dark);
    padding: 3.5rem 1.5rem 1.5rem 1.5rem;
    border-top: 1px solid #e2e8f0;
    position: relative;
    z-index: 20;
}

.footer-container {
    max-width: 1140px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2.75rem;
}

.footer-logo-img {
    height: 28px;
    width: auto;
    margin-bottom: 1.1rem;
    filter: none;
}

.footer-tagline {
    font-size: 0.88rem;
    color: #475569;
    line-height: 1.6;
    max-width: 320px;
}

.footer-col-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 1.2rem;
    letter-spacing: -0.01em;
}

.footer-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links-list a {
    color: #475569;
    font-size: 0.88rem;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links-list a:hover {
    color: var(--primary);
    transform: translateX(3px);
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 0.88rem;
    color: #475569;
}

.contact-email-link {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
}

.contact-email-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.footer-bottom-bar {
    border-top: 1px solid #e2e8f0;
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.82rem;
    color: #64748b;
}

/* Responsive Mobile Header & Wizard Fixes */
@media (max-width: 640px) {
    .portal-header {
        padding: 0.75rem 1rem;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0.5rem;
    }

    .brand-logo-img {
        height: 22px;
    }

    .header-right-actions {
        gap: 6px;
    }

    .header-right-actions .btn {
        padding: 6px 12px;
        font-size: 0.78rem;
    }

    .lang-dropdown-wrapper {
        margin-left: 2px;
        position: relative;
    }

    .lang-dropdown-btn {
        padding: 5px 8px;
        font-size: 0.76rem;
    }

    .lang-dropdown-menu {
        right: 0;
        left: auto;
        width: 145px;
        max-width: calc(100vw - 16px);
        box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25);
    }
    
    .entity-type-grid {
        grid-template-columns: 1fr;
    }

    .hero-card {
        padding: 2.25rem 1.25rem;
    }

    .hero-title {
        font-size: 1.45rem;
    }

    .hero-subtitle {
        font-size: 0.88rem;
        margin-bottom: 1.75rem;
    }

    .dedicated-wizard-container {
        padding: 1.25rem 0.75rem;
    }

    .dedicated-wizard-card {
        border-radius: 20px;
    }

    .dedicated-wizard-header {
        padding: 1.35rem 1.25rem;
    }

    .dedicated-wizard-title {
        font-size: 1.25rem;
    }

    .dedicated-wizard-subtitle {
        font-size: 0.82rem;
    }

    .dedicated-wizard-body {
        padding: 1.35rem 1.25rem;
    }

    .dedicated-wizard-footer {
        padding: 1rem 1.25rem;
    }

    .wizard-step-dot span {
        display: none; /* Hide text labels on mobile for clean dot icons */
    }

    .wizard-progress-bar {
        margin-top: 1rem;
    }

    /* Mobile Timeline Responsiveness */
    .timeline-section-card {
        padding: 1.75rem 1rem;
        border-radius: 20px;
    }

    .timeline-header {
        margin-bottom: 1.5rem;
    }

    .timeline-section-title {
        font-size: 1.35rem;
    }

    .timeline-grid {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .timeline-step-card {
        padding: 1.25rem 1rem;
        border-radius: 16px;
        display: grid;
        grid-template-columns: auto 1fr;
        align-items: start;
        column-gap: 12px;
    }

    .timeline-icon-box {
        width: 42px;
        height: 42px;
        border-radius: 12px;
        margin-bottom: 0;
        grid-row: span 2;
    }

    .timeline-step-number {
        top: 1rem;
        right: 1rem;
        font-size: 1.1rem;
    }

    .timeline-step-title {
        font-size: 0.95rem;
        margin-bottom: 4px;
        padding-right: 28px;
    }

    .timeline-step-desc {
        font-size: 0.82rem;
        line-height: 1.45;
        grid-column: 2;
    }

    .wizard-modal-body {
        padding: 1.25rem;
    }

    /* Mobile Footer Responsiveness */
    .portal-footer {
        padding: 2.25rem 1.25rem 1.25rem 1.25rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-bottom: 2rem;
        text-align: left;
    }

    .footer-tagline {
        max-width: 100%;
        font-size: 0.85rem;
    }

    .footer-col-title {
        font-size: 0.92rem;
        margin-bottom: 0.85rem;
    }

    .footer-links-list {
        gap: 8px;
    }

    .footer-contact-item {
        font-size: 0.85rem;
        gap: 8px;
    }

    .contact-email-link {
        word-break: break-all;
    }

    .footer-bottom-bar {
        padding-top: 1.25rem;
        font-size: 0.78rem;
    }
}

/* ==========================================================================
   PARTNER PROFILE DASHBOARD STYLES (#view-dashboard)
   ========================================================================== */

#view-dashboard {
    background: #f8fafc;
    min-height: calc(100vh - 70px);
}

.dashboard-container {
    /* Wide enough for the lead and document tables to breathe on a laptop
       screen; 1280px left a visible gutter beside every table. */
    max-width: 1480px;
    width: 100%;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem 1.5rem;
}

/* Top Partner Profile Banner */
.dashboard-profile-header {
    background: #ffffff;
    border-radius: 24px;
    padding: 1.75rem 2.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
    border: 1px solid #e2e8f0;
    margin-bottom: 2rem;
}

.dash-user-info {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.dash-avatar {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, #4f46e5 0%, #312e81 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}

.dash-partner-name {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.dash-partner-meta {
    font-size: 0.84rem;
    color: #64748b;
    margin-top: 4px;
    font-weight: 500;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.76rem;
    font-weight: 700;
}

.status-chip.active {
    background: #d1fae5;
    color: #065f46;
}

.status-chip.pending {
    background: #fef3c7;
    color: #92400e;
}

.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.user-avatar-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-profile-name {
    font-size: 0.84rem;
    font-weight: 700;
    color: #0f172a;
}

/* KPI Metric Cards Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.kpi-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 1.35rem 1.5rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    display: flex;
    align-items: center;
    gap: 1.1rem;
    transition: var(--transition);
}

.kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.06);
}

.kpi-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.kpi-icon-box.bg-indigo { background: #e0e7ff; }
.kpi-icon-box.bg-blue { background: #dbeafe; }
.kpi-icon-box.bg-emerald { background: #d1fae5; }
.kpi-icon-box.bg-amber { background: #fef3c7; }

.kpi-label {
    font-size: 0.78rem;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 2px;
}

.kpi-value {
    font-size: 1.45rem;
    font-weight: 800;
    color: #0f172a;
}

/* Dashboard Action Row & Responsiveness */
.dash-action-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.dash-page-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.dash-action-btns {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Dashboard Tabs Navigation */
.dash-tabs-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 2px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
}

.dash-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 12px 12px 0 0;
    border: none;
    background: transparent;
    font-size: 0.9rem;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.dash-tab-btn:hover {
    color: var(--primary);
}

.dash-tab-btn.active {
    background: #ffffff;
    color: var(--primary);
    border-bottom: 3px solid var(--primary);
    box-shadow: 0 -4px 12px rgba(0,0,0,0.03);
}

/* Custom Table Card & Touch Horizontal Scrolling */
.table-card {
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
    overflow: hidden;
    width: 100%;
}

.table-card-header {
    padding: 1.35rem 1.75rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
}

.table-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
}

.table-responsive {
    width: 100%;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    display: block;
    padding-bottom: 6px;
}

/* Styled Visible Scrollbar on Mobile & Desktop */
.table-responsive::-webkit-scrollbar {
    height: 8px;
    display: block;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

.mobile-swipe-hint {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: #e0e7ff;
    color: #3730a3;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 20px;
}

.custom-table {
    /* Fills the card, and only scrolls once the viewport is narrower than the
       content needs. `max-content` left the last column short of the card's
       right edge on any screen wide enough to fit the table. */
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.88rem;
}

.custom-table th {
    background: #f1f5f9;
    color: #475569;
    font-weight: 700;
    padding: 14px 20px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

/* ==========================================================================
   RESPONSIVE MOBILE HEADER & BURGER NAV DRAWER
   ========================================================================== */

.mobile-burger-toggle-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #0f172a;
    cursor: pointer;
    transition: var(--transition);
}

.mobile-burger-toggle-btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.mobile-nav-drawer {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
    z-index: 990;
    animation: drawerSlideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes drawerSlideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.mobile-nav-drawer.open {
    display: block;
}

.mobile-drawer-inner {
    padding: 1.5rem;
    max-width: 640px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .header-desktop-actions {
        display: none !important;
    }

    .mobile-burger-toggle-btn {
        display: flex !important;
    }

    .portal-header {
        padding: 0 1rem !important;
        height: 66px !important;
        width: 100% !important;
        max-width: 100% !important;
        left: 0 !important;
        right: 0 !important;
        box-sizing: border-box !important;
    }

    .mobile-nav-drawer {
        top: 66px;
    }

    .dashboard-container {
        padding: 1rem 0.35rem !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .dash-action-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 0 0.25rem;
    }

    .dash-action-btns {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
        width: 100% !important;
    }

    .dash-action-btns .btn {
        width: 100% !important;
        justify-content: center !important;
        padding: 9px 6px !important;
        font-size: 0.78rem !important;
        white-space: nowrap !important;
    }

    .kpi-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        margin-bottom: 1.25rem !important;
    }

    .kpi-card {
        padding: 0.9rem 0.85rem !important;
        gap: 10px !important;
        border-radius: 14px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .kpi-icon-box {
        width: 40px !important;
        height: 40px !important;
        border-radius: 10px !important;
    }

    .kpi-icon-box svg {
        width: 18px !important;
        height: 18px !important;
    }

    .kpi-label {
        font-size: 0.72rem !important;
        line-height: 1.25 !important;
    }

    .kpi-value {
        font-size: 1.2rem !important;
    }

    .table-card {
        border-radius: 16px !important;
        margin: 0 !important;
        width: 100% !important;
        box-shadow: none !important;
    }

    .table-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 1rem;
    }

    .table-search-wrapper {
        width: 100%;
    }

    .table-search-wrapper .form-control {
        width: 100% !important;
    }
}

@media (max-width: 480px) {
    .kpi-grid {
        grid-template-columns: 1fr !important;
    }
}

.custom-table td {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    white-space: nowrap;
}

/* ==========================================================================
   CENTER-SCREEN 3-SECOND MOBILE PHONE ROTATE OVERLAY SPLASH
   ========================================================================== */

.mobile-rotate-center-overlay {
    display: none;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    margin: 0 !important;
    padding: 1.5rem !important;
    background: rgba(15, 23, 42, 0.92) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    z-index: 2147483647 !important;
    align-items: center !important;
    justify-content: center !important;
    animation: fadeInOverlay 0.3s ease;
}

@keyframes fadeInOverlay {
    from { opacity: 0; }
    to { opacity: 1; }
}

.mobile-rotate-center-overlay.fade-out {
    animation: fadeOutOverlay 0.4s forwards;
}

@keyframes fadeOutOverlay {
    from { opacity: 1; }
    to { opacity: 0; pointer-events: none; }
}

.mobile-rotate-center-card {
    background: #0f172a;
    border: 1.5px solid rgba(129, 140, 248, 0.4);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 35px rgba(79, 70, 229, 0.4);
    border-radius: 24px;
    padding: 2.25rem 1.75rem;
    text-align: center;
    max-width: 340px;
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: centerCardPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes centerCardPop {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.mobile-rotate-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.mobile-rotate-close-btn:hover {
    background: #ef4444;
    border-color: #ef4444;
}

.phone-3d-anim-wrapper {
    width: 64px;
    height: 64px;
    background: rgba(79, 70, 229, 0.2);
    border: 1px solid rgba(129, 140, 248, 0.5);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.phone-3d-rotate-svg {
    animation: rotatePhoneContinuous 1.8s infinite ease-in-out;
    transform-origin: center center;
}

@keyframes rotatePhoneContinuous {
    0%, 15% { transform: rotate(0deg); }
    50%, 65% { transform: rotate(-90deg); }
    100% { transform: rotate(0deg); }
}

/* ==========================================================================
   NEW LEAD PANEL — full-width workspace with the apartment picker
   The old lead form was a narrow 520px pop-up with no room for choosing an
   apartment; this is a centred panel sized for a real selection grid.
   ========================================================================== */

.lead-panel {
    background: #ffffff;
    border-radius: 20px;
    width: 100%;
    max-width: 1180px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.35);
    transform: translateY(14px) scale(0.985);
    opacity: 0;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.28s ease;
}

.modal-overlay.active .lead-panel { transform: none; opacity: 1; }

.lead-panel-header {
    padding: 1.15rem 1.6rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-shrink: 0;
}

.lead-panel-title { font-size: 1.15rem; font-weight: 800; color: #0f172a; margin: 0; }
.lead-panel-subtitle { font-size: 0.82rem; color: #64748b; margin: 3px 0 0; }

.lead-panel-body {
    display: grid;
    grid-template-columns: minmax(320px, 400px) 1fr;
    gap: 0;
    overflow: hidden;
    flex: 1;
    min-height: 0;
}

.lead-form-col {
    padding: 1.4rem 1.6rem;
    overflow-y: auto;
    border-right: 1px solid #e2e8f0;
}

.lead-apartments-col {
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: #f8fafc;
}

.lead-panel-footer {
    padding: 1rem 1.6rem;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

/* ── Apartment picker ────────────────────────────────────────────────────── */

.apt-toolbar {
    padding: 1rem 1.3rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    background: #ffffff;
    flex-shrink: 0;
}

.apt-search {
    flex: 1 1 180px;
    min-width: 150px;
    padding: 9px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.86rem;
}

.apt-search:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,0.12); }

.apt-select {
    padding: 9px 11px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #ffffff;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
}

.apt-count {
    font-size: 0.78rem;
    color: #64748b;
    font-weight: 700;
    white-space: nowrap;
    margin-left: auto;
}

.apt-grid {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 1rem 1.3rem 1.3rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
    gap: 11px;
    align-content: start;
}

.apt-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 13px;
    padding: 11px 13px;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
    position: relative;
    text-align: left;
    font-family: inherit;
    display: block;
    width: 100%;
}

.apt-card:hover:not(.is-taken) {
    border-color: var(--primary);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.12);
    transform: translateY(-1px);
}

.apt-card.is-selected {
    border-color: var(--primary);
    background: #eef2ff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.16);
}

.apt-card.is-taken {
    opacity: 0.55;
    cursor: not-allowed;
    background: #f8fafc;
}

.apt-card-name { font-size: 1rem; font-weight: 800; color: #0f172a; }
.apt-card-meta { font-size: 0.74rem; color: #64748b; margin-top: 3px; line-height: 1.5; }
.apt-card-price { font-size: 0.88rem; font-weight: 800; color: var(--primary); margin-top: 6px; }
.apt-card.is-taken .apt-card-price { color: #94a3b8; }

.apt-badge {
    position: absolute;
    top: 9px;
    right: 9px;
    font-size: 0.62rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 20px;
    letter-spacing: 0.02em;
}

.apt-badge.free  { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.apt-badge.taken { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

.apt-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Selected-apartment summary shown under the client form */
.apt-chosen {
    border: 1.5px solid var(--primary);
    background: #eef2ff;
    border-radius: 13px;
    padding: 12px 14px;
    margin-top: 1rem;
}

.apt-chosen-label {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #4338ca;
    margin-bottom: 5px;
}

.apt-chosen-name { font-size: 1.05rem; font-weight: 800; color: #0f172a; }
.apt-chosen-meta { font-size: 0.78rem; color: #475569; margin-top: 3px; }

.apt-chosen-hold {
    font-size: 0.75rem;
    color: #b45309;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 6px 9px;
    margin-top: 9px;
    font-weight: 700;
}

.apt-clear {
    background: none;
    border: none;
    color: #b91c1c;
    font-family: inherit;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    margin-top: 8px;
    text-decoration: underline;
}

@media (max-width: 900px) {
    .lead-panel { max-height: 96vh; }
    .lead-panel-body { grid-template-columns: 1fr; overflow-y: auto; }
    .lead-form-col { border-right: none; border-bottom: 1px solid #e2e8f0; overflow: visible; }
    .lead-apartments-col { min-height: 460px; }
    .apt-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* ==========================================================================
   NOTIFICATION BELL — shared by the portal and the back office
   ========================================================================== */

.notif-wrap { position: relative; display: inline-flex; }

.notif-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #475569;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.notif-btn:hover { background: #f1f5f9; border-color: #94a3b8; color: #0f172a; }
.notif-btn.has-unread { border-color: #c7d2fe; color: var(--primary); }

.notif-dot {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #dc2626;
    color: #ffffff;
    font-size: 0.66rem;
    font-weight: 800;
    line-height: 18px;
    text-align: center;
    border: 2px solid #ffffff;
}

.notif-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 380px;
    max-width: calc(100vw - 28px);
    max-height: 460px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
    z-index: 600;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.notif-panel.is-open { display: flex; }

.notif-head {
    padding: 0.85rem 1.05rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-shrink: 0;
}

.notif-title { font-size: 0.92rem; font-weight: 800; color: #0f172a; }

.notif-mark-all {
    background: none;
    border: none;
    color: var(--primary);
    font-family: inherit;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
}

.notif-mark-all:hover { text-decoration: underline; }
.notif-mark-all:disabled { color: #cbd5e1; cursor: default; text-decoration: none; }

.notif-list { overflow-y: auto; flex: 1; }

.notif-item {
    display: flex;
    gap: 11px;
    padding: 0.8rem 1.05rem;
    border-bottom: 1px solid #f8fafc;
    cursor: pointer;
    transition: background 0.12s;
}

.notif-item:hover { background: #f8fafc; }
.notif-item.is-unread { background: #f5f3ff; }
.notif-item.is-unread:hover { background: #ede9fe; }

.notif-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notif-icon.info    { background: #eff6ff; color: #1d4ed8; }
.notif-icon.success { background: #ecfdf5; color: #047857; }
.notif-icon.warning { background: #fffbeb; color: #b45309; }
.notif-icon.error   { background: #fef2f2; color: #b91c1c; }

.notif-body { min-width: 0; flex: 1; }
.notif-item-title { font-size: 0.84rem; font-weight: 700; color: #0f172a; line-height: 1.35; }
.notif-item-text  { font-size: 0.78rem; color: #64748b; margin-top: 2px; line-height: 1.45; word-break: break-word; }
.notif-time       { font-size: 0.71rem; color: #94a3b8; margin-top: 4px; }

.notif-empty { padding: 2.6rem 1rem; text-align: center; color: #94a3b8; font-size: 0.85rem; font-weight: 600; }

/* Dark header (back office) needs the inverse treatment */
.admin-header .notif-btn {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.16);
    color: #e2e8f0;
}

.admin-header .notif-btn:hover { background: rgba(255, 255, 255, 0.16); color: #ffffff; }
.admin-header .notif-dot { border-color: #0f172a; }

/* ── Client identity document picker (new-lead panel) ───────────────────── */

.id-upload-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.id-upload-drop {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 16px 14px;
    border: 1.6px dashed var(--border-color);
    border-radius: 12px;
    background: #f8fafc;
    color: var(--text-muted);
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.id-upload-drop:hover,
.id-upload-drop.is-dragging {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

/* A class-level display: flex would otherwise beat the [hidden] attribute,
   leaving the drop zone and the file card both on screen at once. */
.id-upload-drop[hidden],
.id-upload-file[hidden] { display: none; }

.id-upload-file {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 11px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: #fff;
}

.id-upload-thumb {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 9px;
    overflow: hidden;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.id-upload-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.id-upload-ext {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #b91c1c;
}

.id-upload-meta {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.id-upload-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary, #0f172a);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.id-upload-size {
    font-size: 0.74rem;
    color: var(--text-muted);
    font-weight: 600;
}

.id-upload-remove {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #fff;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.id-upload-remove:hover {
    color: #b91c1c;
    border-color: #fecaca;
}

.id-upload-hint {
    display: block;
    margin-top: 5px;
    font-size: 0.74rem;
    line-height: 1.45;
    color: var(--text-muted);
}

.lead-approval-hint {
    display: block;
    margin-top: 3px;
    color: #b45309;
}

.lead-approval-hint[hidden] { display: none; }

/* ── Cloudflare Turnstile (registration wizard) ─────────────────────────── */

.turnstile-block {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.turnstile-block[hidden] { display: none; }

.turnstile-hint {
    font-size: 0.74rem;
    color: var(--text-muted);
}

.turnstile-error {
    font-size: 0.8rem;
    font-weight: 600;
    color: #b91c1c;
    line-height: 1.5;
}

/* The widget is 300px wide and must not push the wizard sideways on a phone. */
@media (max-width: 420px) {
    #turnstile-widget {
        transform: scale(0.88);
        transform-origin: left top;
    }
}
