@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ========================================
   CSS Variables
   ======================================== */
:root {
    --uvp-font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --uvp-primary: #80114C;
    --uvp-primary-dark: #4a1a51;
    --uvp-primary-light: #8b3594;
    --uvp-secondary: #a41e4d;
    --uvp-secondary-dark: #7d1739;
    --uvp-accent: #d4a5c9;
    --uvp-text: #333333;
    --uvp-text-light: #666666;
    --uvp-border: #e0e0e0;
    --uvp-border-focus: #6b2574;
    --uvp-background: #ffffff;
    --uvp-background-light: #f8f5f9;
    --uvp-error: #dc3545;
    --uvp-warning: #ffc107;
    --uvp-success: #28a745;
    --uvp-info: #6b2574;
    /* Standard variable mappings for shared components */
    --primary-color: var(--uvp-primary);
    --secondary-color: var(--uvp-background-light);
    --text-color: var(--uvp-text);
    --text-muted: var(--uvp-text-light);
    --light-text-color: var(--uvp-text-light);
    --border-color: var(--uvp-border);
    --card-bg: var(--uvp-background);
    --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
    --white-color: #fff;
    --sidebar-bg: var(--uvp-background);
    --border-radius: 8px;
    --main-bg: #f9fafb;
}

/* ========================================
   CSS Reset & Base Styles
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #F3F2EB;
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   Global Heading Styles
   ======================================== */
h1, h2, h3, h4 {
    color: var(--uvp-primary);
    font-weight: 700;
    letter-spacing: -0.02em;
}

h1 {
    font-weight: 800;
    letter-spacing: -0.03em;
}

/* ========================================
   Header
   ======================================== */
.header {
    background: white;
    border-bottom: 1px solid #e5e5e5;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: #6b2574;
    letter-spacing: -0.02em;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s ease;
    white-space: nowrap;
}

.logo:hover {
    opacity: 0.8;
}

.header-nav {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.header-nav-link {
    padding: 0.5rem 1rem;
    color: #666;
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.header-nav-link:hover {
    color: #6b2574;
    background: #f5f0f7;
}

.header-nav-link.active {
    color: #6b2574;
    background: #f0e6f5;
    font-weight: 600;
}

.user-menu {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.user-email {
    color: #666;
    font-size: 0.875rem;
}

/* ========================================
   Buttons
   ======================================== */
.btn-secondary,
.sign-in-btn {
    padding: 0.625rem 1.25rem;
    background: transparent;
    color: #666;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover,
.sign-in-btn:hover {
    border-color: #6b2574;
    color: #6b2574;
    background: #f8f5f9;
}

.btn-primary,
.register-btn {
    padding: 0.625rem 1.25rem;
    background: #6b2574;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover,
.register-btn:hover {
    background: #7d2d87;
}

.logout-btn {
    padding: 0.625rem 1.25rem;
    background: transparent;
    color: #666;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
}

.logout-btn:hover {
    border-color: #dc3545;
    color: #dc3545;
    background: #fff5f5;
}

.btn.btn-outline {
    padding: 0.625rem 1.25rem;
    background: transparent;
    color: #6b2574;
    border: 2px solid #6b2574;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn.btn-outline:hover {
    background: #f8f5f9;
    border-color: #7d2d87;
    color: #7d2d87;
}

.btn.btn-outline:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ========================================
   Navigation Tabs
   ======================================== */
.main-nav {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.nav-tab {
    padding: 0.625rem 1.25rem;
    color: #666;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.nav-tab:hover {
    color: #6b2574;
    background: #f8f5f9;
}

.nav-tab.active {
    background: #6b2574;
    color: white;
}

/* ========================================
   User Avatar
   ======================================== */
.user-avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    flex-shrink: 0;
    border-radius: 8px;
    background: #6b2574;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
}

.user-avatar.large {
    width: 44px;
    height: 44px;
    font-size: 1.125rem;
    border-radius: 8px;
}

button.logout-btn {
    padding: 0.625rem 1.25rem;
    background: transparent;
    color: #666;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1;
}

button.logout-btn:hover {
    border-color: #dc3545;
    color: #dc3545;
    background: #fff5f5;
}

/* ========================================
   Container
   ======================================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* ========================================
   Common Components
   ======================================== */
.feature-check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #f8f5f9;
    color: #6b2574;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9375rem;
    color: #666;
}

/* ========================================
   Cards
   ======================================== */
.card {
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 16px;
    padding: 2rem;
}

/* ========================================
   Support Links
   ======================================== */
.support-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    text-decoration: none;
    color: #666;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all 0.15s ease;
}

.support-link:hover {
    border-color: #6b2574;
    color: #6b2574;
    background: #f8f5f9;
}

/* ========================================
   Sidebar Navigation
   ======================================== */
.sidebar-nav {
    flex: 0 0 250px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 8px;
    color: #666;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all 0.15s ease;
    cursor: pointer;
}

.sidebar-item:hover {
    background: #f8f5f9;
    color: #6b2574;
}

.sidebar-item.active {
    background: #6b2574;
    color: white;
}

.sidebar-item .nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    flex-shrink: 0;
}

.sidebar-item .nav-icon svg {
    stroke: currentColor;
    transition: stroke 0.15s ease;
}

.sidebar-item.active .nav-icon svg {
    stroke: white;
}

.sidebar-item .nav-text {
    font-size: 0.9375rem;
    font-weight: 500;
}

.sidebar-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e5e5;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 8px;
    width: 100%;
    background: transparent;
    border: none;
    color: #666;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    font-family: inherit;
    transition: all 0.15s ease;
    cursor: pointer;
}

    .logout-btn:hover {
        background: rgba(220, 53, 69, 0.1);
        color: #dc3545;
    }

        .logout-btn:hover .nav-icon svg {
            stroke: #dc3545;
        }

    .logout-btn .nav-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 20px;
        flex-shrink: 0;
    }

        .logout-btn .nav-icon svg {
            stroke: currentColor;
            transition: stroke 0.15s ease;
        }

    .logout-btn .nav-text {
        font-size: 0.9375rem;
        font-weight: 500;
    }

/* ========================================
   Content Header
   ======================================== */
.content-header {
    margin-bottom: 2.5rem;
}

.content-header h1 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 2rem;
    font-weight: 800;
    color: #6b2574;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
}

.content-header h1 .header-icon {
    flex-shrink: 0;
}

.content-header p {
    color: #666;
    font-size: 1rem;
    line-height: 1.5;
}

/* ========================================
   Status Badges
   ======================================== */
.status-badge {
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
}

.status-badge.pending {
    background: #fff3cd;
    color: #856404;
}

.status-badge.approved {
    background: #d4edda;
    color: #155724;
}

.status-badge.in-review {
    background: #cce5ff;
    color: #004085;
}

.status-badge.rejected {
    background: #f8d7da;
    color: #721c24;
}

/* ========================================
   Empty State
   ======================================== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state-icon {
    font-size: 4rem;
    color: #e5e5e5;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #6b2574;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #666;
    margin-bottom: 1.5rem;
}

/* ========================================
   Help Section
   ======================================== */
.help-section {
    background: #f8f5f9;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.help-section p {
    color: #666;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.help-section a {
    color: #6b2574;
    font-weight: 600;
    text-decoration: none;
}

.help-section a:hover {
    text-decoration: underline;
}

/* ========================================
   Responsive - Common
   ======================================== */
@media (max-width: 1024px) {
    .sidebar-nav {
        position: relative;
        top: 0;
        flex: none;
        width: 100%;
    }

    .sidebar-menu {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 0.5rem 1rem;
    }

    .logo {
        font-size: 1rem;
    }

    .main-nav,
    .header-nav {
        display: none;
    }

    .user-menu {
        gap: 0.5rem;
    }

    .user-email {
        display: none;
    }

    .btn-secondary,
    .btn-primary,
    .sign-in-btn,
    .register-btn,
    .logout-btn {
        padding: 0.5rem 0.875rem;
        font-size: 0.8125rem;
    }

    .container {
        padding: 0.75rem 1rem;
    }

    .sidebar-nav {
        padding: 1rem;
    }

    .sidebar-item {
        padding: 0.75rem;
        font-size: 0.8125rem;
    }

    .content-header h1 {
        font-size: 1.5rem;
    }

    .help-section {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .btn-secondary,
    .btn-primary,
    .sign-in-btn,
    .register-btn,
    .logout-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }

    .sidebar-menu {
        flex-direction: column;
    }
}

/* ========================================
   Mobile Menu & Responsive Navigation
   ======================================== */

/* Mobile header - hidden by default on desktop */
.mobile-header {
    display: none;
}

.mobile-menu-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    background: none;
    border: none;
    padding: 15px 20px;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--uvp-text);
}

.mobile-menu-toggle .mobile-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--uvp-primary);
}

.mobile-user-profile {
    display: flex;
    align-items: center;
    padding-right: 15px;
}

/* Sidebar overlay - hidden by default */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

.sidebar-overlay.open {
    display: block;
}

/* Sidebar header (for mobile close button) */
.sidebar-header {
    display: none;
}

.sidebar-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: var(--uvp-text-light);
}

.sidebar-close:hover {
    color: var(--uvp-text);
}

/* Mobile-specific styles */
@media (max-width: 768px) {
    /* Hide desktop header, show mobile header */
    .hide-on-mobile {
        display: none;
    }

    .mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 56px;
        background: white;
        border-bottom: 1px solid var(--uvp-border);
        z-index: 50;
    }

    /* Sidebar becomes a slide-out drawer */
    .sidebar-nav {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100vh;
        z-index: 100;
        transition: left 0.3s ease;
        border-radius: 0;
        border: none;
        border-right: 1px solid var(--uvp-border);
        overflow-y: auto;
    }

    .sidebar-nav.open {
        left: 0;
    }

    .sidebar-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem 1.5rem;
        border-bottom: 1px solid var(--uvp-border);
    }

    .sidebar-header .logo {
        font-size: 1.25rem;
        font-weight: 700;
        color: var(--uvp-primary);
    }

    .sidebar-menu {
        flex-direction: column;
        padding: 1rem 0;
    }

    /* Adjust container for mobile header */
    .container {
        padding-top: 56px;
    }

    .finance-container {
        flex-direction: column;
    }

    .main-content {
        padding: 16px;
    }
}

/* Tablet - Apply page sidebar hidden */
@media (min-width: 769px) and (max-width: 1024px) {
    .apply-page .hide-on-mobile {
        display: none;
    }

    .apply-page .mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 56px;
        background: white;
        border-bottom: 1px solid var(--uvp-border);
        z-index: 50;
    }

    .apply-page .sidebar-nav {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100vh;
        z-index: 100;
        transition: left 0.3s ease;
        border-radius: 0;
        border: none;
        border-right: 1px solid var(--uvp-border);
        overflow-y: auto;
    }

    .apply-page .sidebar-nav.open {
        left: 0;
    }

    .apply-page .sidebar-header {
        display: flex;
    }

    .apply-page .container {
        padding-top: 56px;
    }

    .apply-page .finance-container {
        flex-direction: column;
    }

    .apply-page .main-content {
        padding: 16px;
    }
}

/* ========================================
   Blazored Typeahead - Global Override Styles
   ======================================== */
.blazored-typeahead {
    position: relative;
}

.blazored-typeahead__input {
    display: block;
    width: 100%;
    padding: 0.7rem !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.95em;
    line-height: 1.5;
    color: var(--uvp-text);
    background-color: var(--uvp-background-light) !important;
    border: 1px solid var(--uvp-border);
    border-radius: var(--border-radius);
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.blazored-typeahead__input::placeholder {
    color: var(--uvp-text-light);
    opacity: 1;
}

.blazored-typeahead__input:focus {
    color: #495057;
    background-color: #fff !important;
    border-color: var(--uvp-primary);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(107, 37, 116, 0.15);
}

.blazored-typeahead__input-mask-wrapper {
    display: flex;
    width: 100%;
    background-color: var(--uvp-background-light) !important;
    border: 1px solid var(--uvp-border);
    border-radius: var(--border-radius);
}

.blazored-typeahead__input-mask {
    display: flex;
    align-items: center;
    flex: 1;
    padding: 12px 15px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.95em;
    line-height: 1.5;
    color: var(--uvp-text);
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.blazored-typeahead__clear {
    display: flex;
    align-items: center;
    padding: 0 10px;
    color: var(--uvp-text-light);
    cursor: pointer;
}

.blazored-typeahead__clear:hover {
    color: var(--uvp-text);
}

.blazored-typeahead__results {
    position: absolute;
    z-index: 1000;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    background-color: #fff;
    border: 1px solid var(--uvp-border);
    border-top: none;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.blazored-typeahead__result {
    padding: 12px 15px;
    cursor: pointer;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.95em;
    color: var(--uvp-text);
}

.blazored-typeahead__result:hover,
.blazored-typeahead__active-item {
    background-color: var(--uvp-background-light);
}

.blazored-typeahead__notfound {
    padding: 12px 15px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.95em;
    color: var(--uvp-text-light);
    font-style: italic;
}

.blazored-typeahead__loading {
    padding: 12px 15px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.95em;
    color: var(--uvp-text-light);
}

.blazored-typeahead__input:disabled,
.blazored-typeahead__input-mask-wrapper--disabled {
    background-color: #e9ecef !important;
    cursor: not-allowed;
    opacity: 0.7;
}

/* ========================================
   Form Controls - Global Styles
   ======================================== */
.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--uvp-border);
    border-radius: var(--border-radius);
    font-size: 0.95em;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--uvp-text);
    background-color: #ffffff;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    outline: none;
    border-color: var(--uvp-border-focus);
    box-shadow: 0 0 0 3px rgba(107, 37, 116, 0.1);
}

.form-control.has-error {
    border-color: var(--uvp-error);
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--uvp-text);
}

.form-label.required::after {
    content: ' *';
    color: var(--uvp-error);
}

.help-text {
    font-size: 0.85rem;
    color: var(--uvp-text-light);
    margin-bottom: 8px;
}

.form-group {
    margin-bottom: 20px;
}

/* ========================================
   Money Input
   ======================================== */
.uvp-money-input {
    position: relative;
    display: flex;
    align-items: center;
}

.uvp-money-input .currency-symbol {
    position: absolute;
    left: 12px;
    top: 12px;
    font-weight: 600;
    font-size: 0.95em;
    line-height: 1.5;
    color: var(--uvp-text-light);
    z-index: 1;
    pointer-events: none;
}

.uvp-money-input input,
.uvp-money-input .form-control {
    padding-left: 25px !important;
}

/* ========================================
   Important Info Dropdown
   ======================================== */
.important-info .info-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid var(--uvp-border);
    border-radius: 6px;
    background: var(--uvp-background);
    cursor: pointer;
    font-weight: 600;
    color: var(--uvp-secondary);
    font-family: inherit;
    font-size: 0.95rem;
}

.important-info .info-toggle .chevron {
    width: 20px;
    height: 20px;
    transition: transform 0.2s;
}

.important-info .info-toggle.expanded .chevron {
    transform: rotate(180deg);
}

.important-info .info-content {
    padding: 20px;
    background: var(--uvp-background-light);
    border: 1px solid var(--uvp-border);
    border-top: none;
    border-radius: 0 0 6px 6px;
}

.important-info .eligibility-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.important-info .eligibility-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 0.9rem;
    color: var(--uvp-text);
}

.important-info .check-icon {
    width: 20px;
    height: 20px;
    stroke: var(--uvp-success);
    flex-shrink: 0;
}

/* ========================================
   My Applications Page
   ======================================== */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background: white;
    border-radius: 16px;
    border: 1px solid #e5e5e5;
}

    .loading-state p {
        margin-top: 16px;
        color: #666;
        font-size: 0.9375rem;
    }

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e5e5;
    border-top-color: var(--uvp-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.error-state {
    background: #fef2f2;
    border: 1px solid var(--uvp-error);
    border-radius: 16px;
    padding: 40px 20px;
    text-align: center;
}

    .error-state .error-title {
        color: var(--uvp-error);
        margin-bottom: 20px;
        font-size: 1rem;
        font-weight: 500;
    }

    .error-state .btn {
        margin-top: 10px;
    }

.application-cta,
.empty-action {
    margin-top: 40px;
    text-align: center;
    padding: 30px;
    background: #f8f5f9;
    border-radius: 16px;
    border: 1px solid #e5e5e5;
}

    .application-cta .btn,
    .empty-action .btn {
        padding: 0.75rem 2rem;
        font-size: 1rem;
    }

/* ========================================
   Login & Register Pages
   ======================================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f5f9 0%, #f0e6f3 100%);
    padding: 20px;
}

.login-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(107, 37, 116, 0.15);
    max-width: 450px;
    width: 100%;
    padding: 40px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

    .login-header .logo {
        font-size: 2rem;
        font-weight: 700;
        margin-bottom: 20px;
        color: var(--uvp-primary);
    }

    .login-header h1 {
        font-size: 1.5rem;
        color: var(--uvp-text);
        margin: 0 0 8px 0;
        font-weight: 600;
    }

    .login-header p {
        color: #666;
        margin: 0;
        font-size: 0.9375rem;
    }

.login-form .form-group {
    margin-bottom: 20px;
}

    .login-form .form-group label {
        display: block;
        font-weight: 600;
        margin-bottom: 8px;
        color: var(--uvp-text);
        font-size: 0.9375rem;
    }

    .login-form .form-group input {
        width: 100%;
        padding: 12px 15px;
        border: 1px solid #e5e5e5;
        border-radius: 8px;
        font-size: 0.9375rem;
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
        transition: border-color 0.2s, box-shadow 0.2s;
        box-sizing: border-box;
        color: var(--uvp-text);
    }

        .login-form .form-group input:focus {
            outline: none;
            border-color: var(--uvp-primary);
            box-shadow: 0 0 0 3px rgba(107, 37, 116, 0.1);
        }

        .login-form .form-group input::placeholder {
            color: #999;
        }

.forgot-password {
    text-align: right;
    margin-top: 8px;
}

    .forgot-password a {
        color: var(--uvp-primary);
        text-decoration: none;
        font-size: 0.875rem;
        font-weight: 500;
    }

        .forgot-password a:hover {
            text-decoration: underline;
        }

.btn-login {
    width: 100%;
    padding: 14px;
    background: var(--uvp-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 10px;
}

    .btn-login:hover {
        background: var(--uvp-primary-dark);
    }

    .btn-login:disabled {
        background: #999;
        cursor: not-allowed;
    }

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

    .password-input-wrapper input {
        padding-right: 45px !important;
    }

.password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .password-toggle:hover {
        color: var(--uvp-primary);
    }

.password-requirements {
    margin-top: 6px;
    font-size: 0.8125rem;
    color: #666;
}

.password-mismatch {
    margin-top: 6px;
    font-size: 0.8125rem;
    color: #dc3545;
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
}

    .login-footer p {
        margin: 0;
        color: #666;
        font-size: 0.9375rem;
    }

    .login-footer a {
        color: var(--uvp-primary);
        text-decoration: none;
        font-weight: 600;
    }

        .login-footer a:hover {
            text-decoration: underline;
        }

.error-alert {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid #dc3545;
    color: #dc3545;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9375rem;
}

/* Responsive */
@media (max-width: 480px) {
    .login-container {
        padding: 30px 20px;
    }

    .login-header .logo {
        font-size: 1.5rem;
    }

    .login-header h1 {
        font-size: 1.25rem;
    }
}

/* ========================================
   Wizard Stepper
   ======================================== */
.uvp-wizard-stepper {
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
}

.uvp-wizard-stepper .step-list {
    display: flex;
    justify-content: space-between;
    list-style: none;
    padding: 0;
    margin: 0;
}

.uvp-wizard-stepper .step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.uvp-wizard-stepper .step-indicator {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    background: #e5e5e5;
    color: #999;
    margin-bottom: 8px;
    z-index: 1;
}

.uvp-wizard-stepper .step.current .step-indicator {
    background: var(--uvp-primary);
    color: white;
}

.uvp-wizard-stepper .step.completed .step-indicator {
    background: var(--uvp-primary);
    color: white;
}

.uvp-wizard-stepper .step.completed .check-icon {
    width: 18px;
    height: 18px;
}

.uvp-wizard-stepper .step-label {
    font-size: 0.75rem;
    color: #999;
    text-align: center;
}

.uvp-wizard-stepper .step.current .step-label,
.uvp-wizard-stepper .step.completed .step-label {
    color: var(--uvp-primary);
    font-weight: 600;
}

.uvp-wizard-stepper .step-connector {
    position: absolute;
    top: 16px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: #e5e5e5;
}

.uvp-wizard-stepper .step.completed .step-connector {
    background: var(--uvp-primary);
}

/* Wizard Content */
.wizard-content {
    min-height: 400px;
}

.step-content {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Wizard Navigation */
.wizard-navigation {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 20px 0;
    margin-top: 30px;
    border-top: 1px solid #e5e5e5;
}

.wizard-navigation > *:last-child {
    justify-self: end;
}

/* Mobile Wizard Stepper */
@media (max-width: 768px) {
    .uvp-wizard-stepper {
        padding: 1rem;
        overflow-x: auto;
    }

    .uvp-wizard-stepper .step-indicator {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }

    .uvp-wizard-stepper .step-label {
        font-size: 0.65rem;
        max-width: 60px;
    }

    .uvp-wizard-stepper .step-connector {
        top: 14px;
    }
}

/* ========================================
   Empty State Card
   ======================================== */
.empty-state-card {
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 16px;
    padding: 60px 20px;
    text-align: center;
}

.empty-state-card .empty-icon {
    color: #999;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.empty-state-card h3 {
    margin: 0 0 12px;
    color: var(--uvp-primary);
    font-weight: 600;
    font-size: 1.25rem;
}

.empty-state-card p {
    margin: 0;
    color: #666;
    font-size: 0.9375rem;
}

/* ========================================
   ClientFeeFinance Application Wizard Styles
   ======================================== */

/* Base Styles */
.uvp-application-page {
    font-family: var(--uvp-font-family);
    color: var(--uvp-text);
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.uvp-header {
    text-align: center;
    padding: 20px 0;
    border: 2px solid var(--uvp-primary);
    border-radius: 12px;
    margin-bottom: 30px;
}

.uvp-header .logo {
    font-size: 2.5rem;
    font-weight: 700;
}

.uvp-header .logo-u {
    color: var(--uvp-primary);
}

.uvp-header .logo-text {
    color: var(--uvp-secondary);
}

.uvp-header .tagline {
    color: var(--uvp-secondary);
    font-size: 0.9rem;
    margin-top: 5px;
}

/* Wizard Stepper - Enhanced */
.uvp-wizard-stepper {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Section Styles */
.uvp-section {
    margin-bottom: 30px;
    padding: 20px;
    background: var(--uvp-background);
    border: 1px solid var(--uvp-border);
    border-radius: 8px;
}

.uvp-section h1 {
    font-size: 1.5rem;
    color: var(--uvp-primary);
    margin-bottom: 20px;
}

.uvp-section h2 {
    font-size: 1.3rem;
    color: var(--uvp-primary);
    margin-bottom: 15px;
}

.uvp-section h3 {
    font-size: 1.1rem;
    color: var(--uvp-primary);
    margin-bottom: 15px;
}

.uvp-section h4 {
    font-size: 1rem;
    color: var(--uvp-text);
    margin-bottom: 10px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.section-header h2,
.section-header h3 {
    margin-bottom: 0;
}

.section-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.section-icon svg {
    width: 100%;
    height: 100%;
    stroke: var(--uvp-primary);
}

/* Button Group Selector */
.uvp-button-group-selector .button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.uvp-button-group-selector.layout-grid .button-group {
    display: grid;
}

.uvp-button-group-selector .button-group.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.uvp-button-group-selector .button-group.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.btn-option {
    padding: 12px 20px;
    border: 2px solid var(--uvp-border);
    border-radius: 6px;
    background: var(--uvp-background);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: pre-line;
}

.btn-option:hover {
    border-color: var(--uvp-primary);
    background: var(--uvp-background-light);
}

.btn-option.selected {
    border-color: var(--uvp-primary);
    background: var(--uvp-primary);
    color: white;
}

/* Yes/No Selector */
.uvp-yes-no-selector .button-group {
    display: flex;
    gap: 10px;
}

.uvp-yes-no-selector .button-group .btn-option {
    flex: 1;
    max-width: 100px;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    white-space: nowrap;
    line-height: 1;
    padding-top: 12px;
    padding-bottom: 12px;
}

/* Date Input */
.uvp-date-input .date-fields {
    display: flex;
    gap: 10px;
}

.uvp-date-input .date-field {
    flex: 1;
}

.uvp-date-input .date-field-month {
    flex: 2;
}

.uvp-date-input .date-field label {
    display: block;
    font-size: 0.8rem;
    color: var(--uvp-text-light);
    margin-bottom: 4px;
}

/* Term Selector */
.term-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn-term {
    padding: 10px 16px;
    border: 2px solid var(--uvp-border);
    border-radius: 6px;
    background: var(--uvp-background);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    font-weight: 600;
}

.btn-term:hover {
    border-color: var(--uvp-primary);
}

.btn-term.selected {
    border-color: var(--uvp-primary);
    background: var(--uvp-primary);
    color: white;
}

/* Legal Work Type Grid */
.legal-work-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.btn-work-type {
    padding: 15px 10px;
    border: 2px solid var(--uvp-border);
    border-radius: 6px;
    background: var(--uvp-background);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    font-size: 0.8rem;
    text-align: center;
    white-space: pre-line;
    line-height: 1.3;
}

.btn-work-type:hover {
    border-color: var(--uvp-primary);
}

.btn-work-type.selected {
    border-color: var(--uvp-primary);
    background: var(--uvp-primary);
    color: white;
}

.btn-work-type.other {
    text-decoration: none;
}

/* Repayment Summary */
.repayment-summary {
    background: var(--uvp-background-light);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.repayment-summary .summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.repayment-summary .summary-label {
    font-weight: 600;
}

.repayment-summary .summary-values {
    display: flex;
    align-items: center;
    gap: 15px;
}

.repayment-summary .monthly-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--uvp-primary);
    background: white;
    padding: 10px 20px;
    border-radius: 6px;
    border: 1px solid var(--uvp-border);
}

.repayment-summary .apr-badge {
    background: var(--uvp-primary);
    color: white;
    padding: 8px 15px;
    border-radius: 6px;
    font-weight: 600;
}

.repayment-summary .summary-details {
    display: flex;
    gap: 20px;
}

.repayment-summary .detail-item {
    font-size: 0.9rem;
}

.repayment-summary .detail-label {
    color: var(--uvp-text-light);
}

/* Address Lookup */
.uvp-address-lookup .postcode-input-group {
    margin-bottom: 15px;
}

.uvp-address-lookup .input-with-button {
    display: flex;
    gap: 10px;
}

.uvp-address-lookup .input-with-button input {
    flex: 1;
}

.uvp-address-lookup .address-results {
    margin: 15px 0;
}

.uvp-address-lookup .manual-entry .form-group {
    margin-bottom: 15px;
}

.btn-link {
    background: none;
    border: none;
    color: var(--uvp-primary);
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    font-size: 0.9rem;
}

.btn-link:hover {
    color: var(--uvp-primary-dark);
}

/* Address History */
.address-entry {
    padding: 20px;
    border: 1px solid var(--uvp-border);
    border-radius: 8px;
    margin-bottom: 15px;
}

.address-entry.current-address {
    border-color: var(--uvp-primary);
}

.address-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.btn-remove {
    color: var(--uvp-error);
    background: none;
    border: 1px solid var(--uvp-error);
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8rem;
}

.address-duration {
    font-size: 0.9rem;
    color: var(--uvp-text-light);
    margin-top: 10px;
}

.warning-badge {
    background: var(--uvp-warning);
    color: var(--uvp-text);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-left: 10px;
}

/* Progress Bar */
.address-summary {
    margin-top: 20px;
}

.progress-bar {
    height: 8px;
    background: var(--uvp-border);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--uvp-primary);
    transition: width 0.3s;
}

.progress-text {
    font-size: 0.9rem;
    margin-top: 8px;
}

.progress-text .success {
    color: var(--uvp-success);
    font-weight: 600;
}

/* Employment Section */
.info-box {
    background: var(--uvp-background-light);
    border-left: 4px solid var(--uvp-info);
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
}

.info-box .info-icon {
    flex-shrink: 0;
}

.info-box .info-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--uvp-info);
}

.info-box .info-title {
    font-family: inherit;
    font-weight: 600;
    margin-bottom: 10px;
}

/* Dependents Selector */
.dependents-selector {
    display: flex;
    gap: 10px;
}

.btn-dependent {
    width: 50px;
    height: 50px;
    border: 2px solid var(--uvp-border);
    border-radius: 6px;
    background: var(--uvp-background);
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-dependent:hover {
    border-color: var(--uvp-primary);
}

.btn-dependent.selected {
    border-color: var(--uvp-primary);
    background: var(--uvp-primary);
    color: white;
}

/* Affordability Summary */
.affordability-summary {
    background: var(--uvp-background-light);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.affordability-summary h4 {
    margin-bottom: 10px;
}

.affordability-summary .amount {
    font-size: 2rem;
    font-weight: 700;
    color: var(--uvp-success);
}

.affordability-summary.negative .amount {
    color: var(--uvp-error);
}

.affordability-summary .warning-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--uvp-error);
    margin-top: 10px;
}

.affordability-summary .warning-icon {
    width: 20px;
    height: 20px;
}

/* Finance History */
.history-questions {
    border: 1px solid var(--uvp-border);
    border-radius: 8px;
    overflow: hidden;
}

.history-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--uvp-border);
    gap: 10px;
}

.history-row:last-child {
    border-bottom: none;
}

.history-label {
    font-weight: 500;
}

.history-answer {
    display: flex;
    align-items: center;
    gap: 15px;
}

.count-input {
    width: 120px;
    padding: 8px;
}

.decline-warning {
    color: var(--uvp-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    width: 100%;
    margin-top: 5px;
}

.adverse-warning {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: rgba(164, 30, 77, 0.1);
    border-radius: 8px;
    margin-top: 15px;
}

.adverse-warning svg {
    width: 24px;
    height: 24px;
    stroke: var(--uvp-secondary);
    flex-shrink: 0;
}

/* Duty of Care */
.checkbox-group {
    margin: 15px 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: var(--uvp-primary);
}

.doc-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(107, 37, 116, 0.1);
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
}

.doc-notice .doc-icon {
    width: 24px;
    height: 24px;
    stroke: var(--uvp-primary);
    flex-shrink: 0;
}

.vulnerability-section {
    background: var(--uvp-background-light);
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.vulnerability-title {
    font-weight: 700;
    color: var(--uvp-secondary);
}

.contact-info {
    margin-top: 15px;
    font-size: 0.9rem;
}

.contact-info a {
    color: var(--uvp-primary);
}

/* Terms Acceptance */
.terms-intro {
    margin-bottom: 20px;
}

.terms-documents {
    margin-bottom: 20px;
}

.terms-document {
    margin-bottom: 15px;
}

.document-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: none;
    border: 1px solid var(--uvp-border);
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    text-align: left;
    color: var(--uvp-primary);
    text-decoration: underline;
    transition: all 0.2s;
}

.document-link:hover {
    background: var(--uvp-background-light);
}

.document-link.read {
    background: rgba(40, 167, 69, 0.1);
    border-color: var(--uvp-success);
}

.document-link svg {
    width: 20px;
    height: 20px;
    stroke: var(--uvp-primary);
    flex-shrink: 0;
}

.document-content {
    padding: 15px;
    background: var(--uvp-background-light);
    border: 1px solid var(--uvp-border);
    border-top: none;
    border-radius: 0 0 6px 6px;
}

.privacy-intro {
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.terms-acceptance-checkbox {
    padding: 20px;
    background: var(--uvp-background-light);
    border-radius: 8px;
    margin-bottom: 20px;
}

.terms-acceptance-checkbox.has-error {
    background: rgba(220, 53, 69, 0.1);
}

.eligibility-notice {
    display: flex;
    gap: 10px;
    padding: 15px;
    background: rgba(107, 37, 116, 0.1);
    border-radius: 8px;
}

.eligibility-notice svg {
    width: 24px;
    height: 24px;
    stroke: var(--uvp-primary);
    flex-shrink: 0;
}

/* Wizard Buttons */
.btn {
    padding: 12px 24px;
    border-radius: 6px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-submit {
    padding: 15px 30px;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

/* Spinners */
.spinner-small {
    width: 20px;
    height: 20px;
    border: 2px solid var(--uvp-border);
    border-top-color: var(--uvp-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
}

.loading-spinner p {
    margin-top: 15px;
    color: var(--uvp-text-light);
}

/* Error Messages */
.error-message {
    display: block;
    color: var(--uvp-error);
    font-size: 0.85rem;
    margin-top: 5px;
}

.error-message.warning-trigger {
    color: var(--uvp-secondary);
    font-weight: 500;
}

.info-message {
    display: block;
    color: var(--uvp-info);
    font-size: 0.85rem;
    margin-top: 5px;
}

.error-message-box {
    padding: 20px;
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid var(--uvp-error);
    border-radius: 8px;
    text-align: center;
}

.error-message-box p {
    margin-bottom: 15px;
    color: var(--uvp-error);
}

.error-message-box .error-title {
    font-weight: 600;
    font-size: 1rem;
}

.error-message-box .validation-error-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
    text-align: left;
}

.error-message-box .validation-error-list li {
    padding: 8px 12px;
    margin-bottom: 8px;
    background: rgba(220, 53, 69, 0.05);
    border-left: 3px solid var(--uvp-error);
    border-radius: 0 4px 4px 0;
    color: var(--uvp-text);
    font-size: 0.9rem;
}

.error-message-box .validation-error-list li:last-child {
    margin-bottom: 0;
}

/* Popup Overlay */
.uvp-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.uvp-popup {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.uvp-popup .popup-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border-bottom: 1px solid var(--uvp-border);
}

.uvp-popup .popup-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.uvp-popup .popup-icon svg {
    width: 24px;
    height: 24px;
}

.uvp-popup.severity-decline .popup-icon {
    background: rgba(164, 30, 77, 0.1);
}

.uvp-popup.severity-decline .popup-icon svg {
    stroke: var(--uvp-secondary);
}

.uvp-popup.severity-warning .popup-icon {
    background: rgba(255, 193, 7, 0.2);
}

.uvp-popup.severity-warning .popup-icon svg {
    stroke: #856404;
}

.uvp-popup.severity-dutyofcare .popup-icon {
    background: rgba(107, 37, 116, 0.1);
}

.uvp-popup.severity-dutyofcare .popup-icon svg {
    stroke: var(--uvp-primary);
}

.uvp-popup.severity-info .popup-icon {
    background: rgba(107, 37, 116, 0.1);
}

.uvp-popup.severity-info .popup-icon svg {
    stroke: var(--uvp-primary);
}

.uvp-popup .popup-title {
    flex: 1;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.uvp-popup .popup-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.uvp-popup .popup-close svg {
    width: 20px;
    height: 20px;
    stroke: var(--uvp-text-light);
}

.uvp-popup .popup-body {
    padding: 20px;
}

.uvp-popup .popup-body p {
    margin-bottom: 15px;
}

.uvp-popup .popup-body ul {
    margin: 15px 0;
    padding-left: 20px;
}

.uvp-popup .popup-body address {
    font-style: normal;
    margin-top: 15px;
    padding: 15px;
    background: var(--uvp-background-light);
    border-radius: 6px;
}

.uvp-popup .popup-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid var(--uvp-border);
}

/* Form Row */
.form-row {
    display: flex;
    gap: 20px;
}

.form-group-half {
    flex: 1;
}

/* Utility */
.mt-2 {
    margin-top: 0.5rem;
}

/* ============================================
   WIZARD RESPONSIVE DESIGN
   ============================================ */

/* ---- MOBILE (< 480px) ---- */
@media (max-width: 479px) {
    .uvp-application-page {
        padding: 10px;
        max-width: 100%;
    }

    .step-content h1 {
        font-size: 1.2rem;
        padding-bottom: 10px;
    }

    .uvp-header {
        padding: 15px 10px;
        margin-bottom: 20px;
        border-radius: 8px;
    }

    .uvp-header .logo {
        font-size: 1.8rem;
    }

    .uvp-header .tagline {
        font-size: 0.8rem;
    }

    .uvp-wizard-stepper {
        margin-bottom: 20px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .uvp-wizard-stepper .step-list {
        min-width: 100%;
        padding: 0 5px;
    }

    .uvp-wizard-stepper .step-indicator {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }

    .uvp-wizard-stepper .step-label {
        font-size: 0.6rem;
        max-width: 60px;
        line-height: 1.2;
        word-wrap: break-word;
    }

    .uvp-wizard-stepper .step-connector {
        top: 14px;
    }

    .uvp-section {
        padding: 15px;
        margin-bottom: 20px;
        border-radius: 6px;
    }

    .uvp-section h1 {
        font-size: 0.95rem;
        line-height: 1.3;
        white-space: nowrap;
        padding-bottom: 10px;
    }

    .uvp-section h2 {
        font-size: 1.1rem;
    }

    .uvp-section h3 {
        font-size: 1rem;
    }

    .form-label {
        font-size: 0.95rem;
        margin-bottom: 6px;
    }

    .term-selector {
        gap: 8px;
    }

    .btn-term {
        padding: 10px 12px;
        font-size: 0.85rem;
        flex: 1 1 calc(33.333% - 8px);
        min-width: calc(33.333% - 8px);
    }

    .legal-work-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .btn-work-type {
        padding: 12px 8px;
        font-size: 0.7rem;
        line-height: 1.2;
    }

    .repayment-summary {
        padding: 15px;
    }

    .repayment-summary .summary-row {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .repayment-summary .summary-values {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .repayment-summary .monthly-amount {
        font-size: 1.3rem;
        padding: 8px 15px;
        width: 100%;
        text-align: center;
    }

    .repayment-summary .apr-badge {
        padding: 6px 12px;
        font-size: 0.85rem;
    }

    .repayment-summary .summary-details {
        flex-direction: column;
        gap: 8px;
        margin-top: 10px;
    }

    .repayment-summary .detail-item {
        display: flex;
        justify-content: space-between;
        font-size: 0.85rem;
    }

    .uvp-button-group-selector .button-group {
        gap: 8px;
    }

    .uvp-button-group-selector .button-group.grid-cols-2,
    .uvp-button-group-selector .button-group.grid-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .btn-option {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .uvp-yes-no-selector .button-group {
        flex-wrap: nowrap;
    }

    .uvp-yes-no-selector .btn-option {
        padding: 10px 15px;
        max-width: none;
        flex: 1;
    }

    .uvp-date-input .date-fields {
        gap: 8px;
    }

    .uvp-date-input .date-field label {
        font-size: 0.7rem;
    }

    .uvp-date-input .date-field input,
    .uvp-date-input .date-field select {
        padding: 10px 8px;
        font-size: 16px;
    }

    .address-entry {
        padding: 15px;
    }

    .address-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .address-header h4 {
        font-size: 0.95rem;
    }

    .history-questions {
        border-radius: 6px;
    }

    .history-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 12px;
    }

    .history-label {
        font-size: 0.9rem;
    }

    .history-answer {
        width: 100%;
        flex-wrap: wrap;
    }

    .history-answer .uvp-yes-no-selector {
        width: 100%;
    }

    .count-input {
        width: 100%;
    }

    .dependents-selector {
        flex-wrap: wrap;
        gap: 8px;
    }

    .btn-dependent {
        width: 44px;
        height: 44px;
    }

    .affordability-summary .amount {
        font-size: 1.5rem;
    }

    .info-box {
        flex-direction: column;
        gap: 10px;
        padding: 12px;
    }

    .checkbox-label {
        font-size: 0.9rem;
    }

    .document-link {
        padding: 10px;
        font-size: 0.9rem;
    }

    .terms-acceptance-checkbox {
        padding: 15px;
    }

    .wizard-navigation {
        padding: 15px 0;
        margin-top: 20px;
        gap: 10px;
    }

    .btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .btn-submit {
        padding: 12px 20px;
        font-size: 1rem;
    }

    .uvp-popup-overlay {
        padding: 10px;
        align-items: flex-end;
    }

    .uvp-popup {
        max-width: 100%;
        max-height: 85vh;
        border-radius: 12px 12px 0 0;
    }

    .uvp-popup .popup-header {
        padding: 15px;
    }

    .uvp-popup .popup-title {
        font-size: 1rem;
    }

    .uvp-popup .popup-body {
        padding: 15px;
    }

    .uvp-popup .popup-body p {
        font-size: 0.9rem;
        margin-bottom: 12px;
    }

    .uvp-popup .popup-body address {
        padding: 12px;
        font-size: 0.85rem;
    }

    .uvp-popup .popup-footer {
        padding: 15px;
        flex-direction: column;
    }

    .uvp-popup .popup-footer .btn {
        width: 100%;
        justify-content: center;
    }

    .form-row {
        flex-direction: column;
        gap: 15px;
    }

    .uvp-address-lookup .input-with-button {
        flex-direction: column;
    }

    .uvp-address-lookup .input-with-button .btn {
        width: 100%;
    }

    .error-message-box {
        padding: 15px;
    }

    .error-message-box .validation-error-list li {
        padding: 6px 10px;
        font-size: 0.85rem;
    }

    .loading-spinner {
        padding: 40px 20px;
    }
}

/* ---- SMALL TABLETS (480px - 768px) ---- */
@media (min-width: 480px) and (max-width: 767px) {
    .uvp-application-page {
        padding: 15px;
        max-width: 100%;
    }

    .step-content h1 {
        font-size: 1.3rem;
        padding-bottom: 10px;
    }

    .uvp-header {
        padding: 20px 15px;
        margin-bottom: 25px;
    }

    .uvp-header .logo {
        font-size: 2rem;
    }

    .uvp-wizard-stepper .step-indicator {
        width: 30px;
        height: 30px;
    }

    .uvp-wizard-stepper .step-label {
        font-size: 0.7rem;
    }

    .uvp-section {
        padding: 18px;
    }

    .uvp-section h1 {
        font-size: 1.3rem;
    }

    .btn-term {
        flex: 1 1 calc(25% - 10px);
    }

    .legal-work-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .btn-work-type {
        font-size: 0.75rem;
    }

    .repayment-summary .summary-row {
        flex-direction: column;
        text-align: center;
    }

    .repayment-summary .summary-values {
        margin-top: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .repayment-summary .summary-details {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .uvp-button-group-selector .button-group.grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .history-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .history-answer {
        width: 100%;
    }

    .form-row {
        flex-direction: column;
    }

    .uvp-popup .popup-footer {
        flex-direction: row;
    }

    .uvp-address-lookup .input-with-button {
        flex-direction: row;
    }
}

/* ---- TABLETS (768px - 1024px) ---- */
@media (min-width: 768px) and (max-width: 1023px) {
    .uvp-application-page {
        padding: 20px;
        max-width: 90%;
    }

    .uvp-header .logo {
        font-size: 2.2rem;
    }

    .uvp-wizard-stepper .step-label {
        font-size: 0.75rem;
    }

    .legal-work-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .repayment-summary .summary-row {
        flex-direction: row;
    }

    .repayment-summary .summary-details {
        flex-direction: row;
    }

    .history-row {
        flex-direction: row;
        align-items: center;
    }

    .form-row {
        flex-direction: row;
    }
}

/* ---- DESKTOP (> 1024px) ---- */
@media (min-width: 1024px) {
    .uvp-application-page {
        max-width: 800px;
        padding: 20px;
    }

    .legal-work-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .history-row {
        flex-direction: row;
        align-items: center;
    }
}

/* ---- TOUCH DEVICE OPTIMIZATIONS ---- */
@media (hover: none) and (pointer: coarse) {
    .btn, .btn-option, .btn-term, .btn-work-type, .btn-dependent {
        min-height: 44px;
    }

    .form-control, select {
        min-height: 44px;
    }

    .checkbox-label input[type="checkbox"] {
        width: 24px;
        height: 24px;
    }

    .btn-option:hover,
    .btn-term:hover,
    .btn-work-type:hover {
        border-color: var(--uvp-border);
        background: var(--uvp-background);
    }

    .btn-option.selected:hover,
    .btn-term.selected:hover,
    .btn-work-type.selected:hover {
        border-color: var(--uvp-primary);
        background: var(--uvp-primary);
    }
}

/* ---- HIGH DPI DISPLAYS ---- */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .uvp-wizard-stepper .step-connector {
        height: 1px;
        transform: scaleY(2);
    }
}

/* ---- LANDSCAPE MOBILE ---- */
@media (max-height: 500px) and (orientation: landscape) {
    .uvp-popup-overlay {
        align-items: center;
    }

    .uvp-popup {
        max-height: 95vh;
        border-radius: 12px;
    }

    .wizard-navigation {
        position: relative;
    }
}

/* ---- PRINT STYLES ---- */
@media print {
    .uvp-application-page {
        max-width: 100%;
        padding: 0;
    }

    .wizard-navigation,
    .uvp-wizard-stepper {
        display: none;
    }

    .uvp-section {
        break-inside: avoid;
        border: 1px solid #ccc;
    }
}

/* ---- SAFE AREA SUPPORT (iPhone X+ notches) ---- */
@supports (padding: max(0px)) {
    .uvp-application-page {
        padding-left: max(10px, env(safe-area-inset-left));
        padding-right: max(10px, env(safe-area-inset-right));
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }

    .wizard-navigation {
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }

    .uvp-popup-overlay {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Skip OneId Option */
.skip-oneid-option {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
}

.skip-oneid-option .checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
}

.skip-oneid-option .checkbox-text {
    color: #856404;
    font-size: 0.9rem;
    font-weight: 500;
}

/* ---- ACCESSIBILITY IMPROVEMENTS ---- */
.btn:focus-visible,
.btn-option:focus-visible,
.btn-term:focus-visible,
.btn-work-type:focus-visible,
.form-control:focus-visible {
    outline: 2px solid var(--uvp-primary);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .step-content,
    .spinner,
    .spinner-small {
        animation: none;
    }

    .btn,
    .btn-option,
    .btn-term,
    .btn-work-type,
    .form-control {
        transition: none;
    }
}

@media (prefers-contrast: high) {
    .btn-option,
    .btn-term,
    .btn-work-type {
        border-width: 3px;
    }

    .uvp-section {
        border-width: 2px;
    }
}

/* ========================================
   Thank You / Success Page
   ======================================== */
.thank-you-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 16px;
    border: 1px solid #e5e5e5;
    max-width: 600px;
    margin: 0 auto;
}

.thank-you-section .success-icon {
    width: 80px;
    height: 80px;
    background: rgba(107, 37, 116, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.thank-you-section .success-icon svg {
    width: 40px;
    height: 40px;
    stroke: var(--uvp-primary);
}

.thank-you-section h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--uvp-primary);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.thank-you-section p {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 32px;
    max-width: 400px;
}

.thank-you-section .btn {
    margin: 8px;
}

.thank-you-section .btn-primary {
    padding: 14px 32px;
    font-size: 1rem;
}

.thank-you-section .btn-secondary {
    padding: 12px 24px;
}

@media (max-width: 480px) {
    .thank-you-section {
        padding: 40px 16px;
    }

    .thank-you-section .success-icon {
        width: 64px;
        height: 64px;
    }

    .thank-you-section .success-icon svg {
        width: 32px;
        height: 32px;
    }

    .thank-you-section h1 {
        font-size: 1.5rem;
    }

    .thank-you-section p {
        font-size: 0.9375rem;
    }
}

/* ========================================
   Find a Lawyer (FaL) Marketplace
   ======================================== */
.fal-container {
    display: flex;
    gap: 2rem;
    min-height: calc(100vh - 140px);
}

/* Left Side - Chat */
.fal-chat-section {
    flex: 0 0 65%;
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: calc(100vh - 140px);
    position: sticky;
    top: 80px;
}

.fal-chat-header {
    padding: 3rem 2rem 2rem;
    border-bottom: 1px solid #e5e5e5;
}

.fal-chat-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.fal-new-chat-btn {
    background: var(--uvp-background-light);
    color: var(--uvp-primary);
    border: 1px solid var(--uvp-border);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.fal-new-chat-btn:hover:not(:disabled) {
    background: var(--uvp-accent);
    border-color: var(--uvp-primary);
}

.fal-new-chat-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.fal-chat-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    font-weight: 800;
    color: var(--uvp-primary);
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.fal-chat-header p {
    color: #666;
    font-size: 1.0625rem;
    font-weight: 400;
    line-height: 1.5;
}

.fal-quick-prompts {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.fal-prompt-chip {
    background: white;
    padding: 0.625rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid #e5e5e5;
    color: var(--uvp-primary);
    font-weight: 500;
}

.fal-prompt-chip:hover {
    background: var(--uvp-primary);
    color: white;
    border-color: var(--uvp-primary);
}

.fal-chat-messages {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    background: #f8f5f9;
    min-height: 0;
}

.fal-message {
    margin-bottom: 1.5rem;
    display: flex;
    gap: 0.875rem;
    animation: falFadeIn 0.2s ease;
}

@keyframes falFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fal-message.bot {
    justify-content: flex-start;
}

.fal-message.user {
    justify-content: flex-end;
}

.fal-message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
    font-size: 0.875rem;
}

.fal-message.bot .fal-message-avatar {
    background: var(--uvp-primary);
}

.fal-message.user .fal-message-avatar {
    background: #666;
}

.fal-message-content {
    max-width: 65%;
    padding: 0.875rem 1.125rem;
    border-radius: 10px;
    line-height: 1.6;
    font-size: 0.9375rem;
}

.fal-message.bot .fal-message-content {
    background: white;
    border: 1px solid #e5e5e5;
    color: #0a0a0a;
}

.fal-message.user .fal-message-content {
    background: var(--uvp-primary);
    color: white;
}

/* Lawyer search results */
.lawyer-results {
    margin: 1rem 0;
}

.lawyer-result-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}

.lawyer-result-item:last-child {
    border-bottom: none;
}

.lawyer-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    line-height: 1.3;
}

.lawyer-result-header strong {
    font-weight: 600;
}

.finance-badge {
    display: inline-block;
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    white-space: nowrap;
}

.lawyer-result-location {
    color: #666;
    font-size: 0.75rem;
    line-height: 1.2;
}

.lawyer-results-more {
    color: #888;
    font-size: 0.75rem;
    font-style: italic;
    margin-top: 0.2rem;
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 4px 0;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--uvp-primary);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-indicator span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.4;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Disabled state for prompt chips */
.fal-prompt-chip.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Disabled state for input and button */
.fal-chat-input input:disabled {
    background: #f0f0f0;
    cursor: not-allowed;
}

.fal-chat-input button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Quick reply buttons (Yes/No etc) */
.fal-quick-replies {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: #f8f5f9;
    justify-content: flex-start;
}

.fal-quick-reply-btn {
    background: white;
    padding: 0.5rem 1.25rem;
    border-radius: 4px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid var(--uvp-primary);
    color: var(--uvp-primary);
    font-weight: 500;
}

.fal-quick-reply-btn:hover {
    background: var(--uvp-primary);
    color: white;
}

.fal-chat-input-container {
    padding: 1.5rem;
    background: white;
    border-top: 1px solid #e5e5e5;
}

.fal-chat-input {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.fal-chat-input input {
    flex: 1;
    padding: 0.875rem 1rem;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    font-size: 0.9375rem;
    transition: all 0.15s ease;
    font-family: inherit;
    background: #f8f5f9;
}

.fal-chat-input input:focus {
    outline: none;
    border-color: var(--uvp-primary);
    background: white;
}

.fal-chat-input button {
    padding: 0.875rem 1.5rem;
    background: var(--uvp-primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.fal-chat-input button:hover {
    background: #7d2d87;
}

.fal-chat-input button:active {
    transform: scale(0.98);
}

/* Right Side - Sidebar */
.fal-sidebar {
    flex: 0 0 35%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.fal-sidebar-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e5e5e5;
    transition: border-color 0.15s ease;
}

.fal-sidebar-card:hover {
    border-color: #d4d4d4;
}

.fal-sidebar-card h3 {
    color: var(--uvp-primary);
    margin-bottom: 1.25rem;
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Stats */
.fal-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.fal-stat-item {
    text-align: center;
    padding: 1.25rem 1rem;
    background: white;
    border-radius: 10px;
    border: 1px solid #e5e5e5;
    transition: all 0.15s ease;
}

.fal-stat-item:hover {
    background: #f8f5f9;
    border-color: var(--uvp-primary);
}

.fal-stat-number {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--uvp-primary);
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

.fal-stat-label {
    font-size: 0.8125rem;
    color: #666;
    font-weight: 500;
}

/* Featured Lawyer Cards */
.fal-lawyer-card {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    margin-bottom: 0.75rem;
    transition: all 0.15s ease;
    cursor: pointer;
    background: white;
}

.fal-lawyer-card:hover {
    border-color: var(--uvp-primary);
    background: #f8f5f9;
}

.fal-lawyer-card:last-child {
    margin-bottom: 0;
}

.fal-lawyer-avatar {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: var(--uvp-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.125rem;
    flex-shrink: 0;
}

.fal-lawyer-info {
    flex: 1;
}

.fal-lawyer-name {
    font-weight: 600;
    color: #0a0a0a;
    margin-bottom: 0.25rem;
    font-size: 0.9375rem;
}

.fal-lawyer-specialty {
    color: #666;
    font-size: 0.8125rem;
    margin-bottom: 0.375rem;
}

.fal-lawyer-rating {
    color: #0a0a0a;
    font-size: 0.8125rem;
    font-weight: 500;
}

.fal-badge {
    display: inline-block;
    background: var(--uvp-primary);
    color: white;
    padding: 0.1875rem 0.5rem;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 700;
    margin-left: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Ad Banner */
.fal-ad-banner {
    background: var(--uvp-primary);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.fal-ad-banner h4 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.fal-ad-banner p {
    margin-bottom: 1.25rem;
    opacity: 0.9;
    font-size: 0.9375rem;
}

.fal-ad-banner button {
    background: white;
    color: var(--uvp-primary);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.9375rem;
}

.fal-ad-banner button:hover {
    background: #f5f5f5;
}

.fal-ad-banner button:active {
    transform: scale(0.98);
}

/* Trust Badges */
.fal-trust-badges {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 1rem 0;
}

.fal-trust-badge {
    text-align: center;
    color: #666;
    font-size: 0.8125rem;
    transition: color 0.15s ease;
}

.fal-trust-badge:hover {
    color: var(--uvp-primary);
}

.fal-trust-icon {
    font-size: 1.75rem;
    margin-bottom: 0.375rem;
    color: var(--uvp-primary);
}

@media (max-width: 1200px) {
    .fal-container {
        flex-direction: column;
    }

    .fal-chat-section {
        flex: none;
        position: relative;
        top: 0;
        height: auto;
        min-height: 500px;
        max-height: 70vh;
    }

    .fal-sidebar {
        flex: none;
    }
}

@media (max-width: 768px) {
    /* Reduce container padding for FaL page on mobile */
    .container:has(.fal-container) {
        padding-top: 0.5rem;
    }

    .fal-container {
        gap: 1rem;
        padding-bottom: 70px;
    }

    .fal-chat-section {
        height: calc(100vh - 100px);
        min-height: 400px;
        max-height: calc(100vh - 100px);
        border-radius: 8px;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .fal-chat-header h1 {
        font-size: 1.25rem;
        margin-bottom: 0.25rem;
    }

    .fal-chat-header {
        padding: 0.75rem 1rem;
    }

    .fal-chat-header p {
        font-size: 0.875rem;
        margin-bottom: 0;
    }

    .fal-quick-prompts {
        gap: 0.5rem;
        margin-top: 1rem;
    }

    .fal-prompt-chip {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }

    .fal-chat-messages {
        padding: 1rem;
        padding-bottom: 80px;
        flex: 1;
        overflow-y: auto;
        background: #f8f5f9;
    }

    .fal-message {
        gap: 0.5rem;
    }

    .fal-message-avatar {
        width: 28px;
        height: 28px;
        font-size: 0.625rem;
    }

    .fal-message-content {
        max-width: 85%;
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }

    .fal-chat-input-container {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 0.75rem 1rem;
        background: white;
        border-top: 1px solid #e5e5e5;
        z-index: 100;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    }

    .fal-chat-input input {
        padding: 0.625rem 0.875rem;
        font-size: 0.875rem;
    }

    .fal-chat-input button {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }

    .fal-sidebar {
        display: none;
    }

    .fal-sidebar-card {
        padding: 1rem;
        border-radius: 8px;
    }

    .fal-sidebar-card h3 {
        font-size: 1rem;
    }

    .fal-ad-banner {
        padding: 1.25rem;
        border-radius: 8px;
    }

    .fal-ad-banner h4 {
        font-size: 1.125rem;
    }

    .fal-ad-banner p {
        font-size: 0.875rem;
    }
}

/* ========================================
   Dashboard (db-) Styles
   ======================================== */

/* Dashboard Navigation */
.db-main-nav {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.db-nav-tab {
    padding: 0.625rem 1.25rem;
    color: #666;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.db-nav-tab:hover {
    color: var(--uvp-primary);
    background: #f8f5f9;
}

.db-nav-tab.active {
    background: var(--uvp-primary);
    color: white;
}

/* Notification Badge */
.db-notification-badge {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    color: #666;
}

.db-notification-badge:hover {
    background: var(--uvp-primary);
    color: white;
}

.db-badge-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.125rem 0.375rem;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* Welcome Section */
.db-welcome-section {
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
    padding: 2rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.db-welcome-content h1 {
    font-size: 2rem;
    font-weight: 800;
    color: #6b2574;
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
}

.db-welcome-content p {
    font-size: 1rem;
    color: #666;
}

.db-quick-actions {
    display: flex;
    gap: 1rem;
}

.db-action-btn {
    padding: 0.875rem 1.5rem;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    display: inline-block;
    border: none;
}

.db-action-btn.primary {
    background: var(--uvp-primary);
    color: white;
}

.db-action-btn.primary:hover {
    background: #7d2d87;
    transform: translateY(-2px);
}

.db-action-btn.secondary {
    background: white;
    color: var(--uvp-primary);
    border: 2px solid var(--uvp-primary);
}

.db-action-btn.secondary:hover {
    background: #f8f5f9;
}

/* Dashboard Grid */
.db-dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-areas:
        "cases messages"
        "finance documents"
        "quicklinks quicklinks";
    gap: 2rem;
    margin-bottom: 2rem;
}

.db-dashboard-grid.finance-first {
    grid-template-areas:
        "finance messages"
        "cases documents"
        "quicklinks quicklinks";
}

.db-card-cases { grid-area: cases; }
.db-card-messages { grid-area: messages; align-self: start; }
.db-card-documents { grid-area: documents; align-self: start; }
.db-card-finance { grid-area: finance; align-self: start; }
.db-card-quicklinks { grid-area: quicklinks; align-self: start; }

/* Card Styles */
.db-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
    padding: 1.5rem;
}

.db-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.db-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #6b2574;
}

.db-card-link {
    color: var(--uvp-primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.15s ease;
}

.db-card-link:hover {
    text-decoration: underline;
}

/* Case List */
.db-case-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 320px;
    overflow-y: auto;
}

.db-case-list::-webkit-scrollbar {
    width: 8px;
}

.db-case-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.db-case-list::-webkit-scrollbar-thumb {
    background: var(--uvp-primary);
    border-radius: 4px;
}

.db-case-list::-webkit-scrollbar-thumb:hover {
    background: #7d2d87;
}

.db-case-item {
    padding: 1.25rem;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    transition: all 0.15s ease;
    cursor: pointer;
}

.db-case-item:hover {
    border-color: var(--uvp-primary);
    background: #f8f5f9;
}

.db-case-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.db-case-title {
    font-size: 1rem;
    font-weight: 600;
    color: #0a0a0a;
    margin-bottom: 0.25rem;
}

.db-case-lawyer {
    font-size: 0.875rem;
    color: #666;
}

.db-status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.db-status-badge.active {
    background: #dcfce7;
    color: #166534;
}

.db-status-badge.pending {
    background: #fef3c7;
    color: #854d0e;
}

.db-status-badge.review {
    background: #dbeafe;
    color: #1e40af;
}

.db-case-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.8125rem;
    color: #666;
}

.db-case-meta-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

/* Messages */
.db-message-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 300px;
    overflow-y: auto;
}

@media (min-width: 768px) {
    .db-message-list {
        max-height: 400px;
    }
}

.db-message-item {
    padding: 1rem;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    transition: all 0.15s ease;
    cursor: pointer;
    background: white;
}

.db-message-item:hover {
    border-color: var(--uvp-primary);
    background: #f8f5f9;
}

.db-message-item.unread {
    background: #f8f5f9;
    border-color: var(--uvp-primary);
}

.db-message-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.db-message-sender {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0a0a0a;
}

.db-message-time {
    font-size: 0.75rem;
    color: #999;
}

.db-message-preview {
    font-size: 0.875rem;
    color: #666;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.db-unread-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--uvp-primary);
    display: inline-block;
    margin-right: 0.5rem;
}

/* Finance Summary */
.db-finance-summary {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.db-finance-item {
    padding: 1.25rem;
    background: #f8f5f9;
    border-radius: 10px;
    border: 1px solid #e5e5e5;
}

.db-finance-label {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.db-finance-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--uvp-primary);
    letter-spacing: -0.02em;
}

.db-finance-status {
    font-size: 0.8125rem;
    color: #666;
    margin-top: 0.5rem;
}

/* Documents */
.db-document-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.db-document-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    transition: all 0.15s ease;
    cursor: pointer;
}

.db-document-item:hover {
    border-color: var(--uvp-primary);
    background: #f8f5f9;
}

.db-document-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #f8f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.db-document-info {
    flex: 1;
}

.db-document-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0a0a0a;
    margin-bottom: 0.25rem;
}

.db-document-meta {
    font-size: 0.75rem;
    color: #666;
}

/* Quick Links */
.db-quick-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.db-quick-link-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    transition: all 0.15s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.db-quick-link-item:hover {
    border-color: var(--uvp-primary);
    background: #f8f5f9;
}

/* Empty State */
.db-empty-state {
    text-align: center;
    padding: 3rem 2rem;
}

.db-empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.db-empty-state h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #6b2574;
    margin-bottom: 0.5rem;
}

.db-empty-state p {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 1.5rem;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .db-dashboard-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "cases"
            "finance"
            "messages"
            "documents"
            "quicklinks";
        gap: 1rem;
    }

    .db-case-list {
        max-height: 320px;
    }
}

/* Case Item Clickable */
.db-case-item {
    cursor: pointer;
    transition: all 0.2s ease;
}

.db-case-item.selected {
    border-color: #1a365d;
    background-color: #f0f7ff;
}

/* Case Detail Overlay */
.db-case-detail-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.db-case-detail-panel {
    background: #fff;
    border-radius: 12px;
    max-width: 700px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.db-case-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    background: #fff;
    border-radius: 12px 12px 0 0;
}

.db-case-detail-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: #6b2574;
}

.db-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    line-height: 1;
    border-radius: 4px;
    transition: all 0.2s;
}

.db-close-btn:hover {
    background: #f3f4f6;
    color: #1a365d;
}

.db-case-detail-content {
    padding: 1.5rem;
}

.db-case-detail-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.db-detail-row {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.db-detail-label {
    font-size: 0.75rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.db-detail-value {
    font-size: 0.9375rem;
    color: #1a365d;
    font-weight: 500;
}

/* Enquiry Section */
.db-enquiry-section {
    margin-bottom: 1.5rem;
}

.db-enquiry-section h3 {
    font-size: 1rem;
    color: #6b2574;
    margin: 0 0 0.75rem 0;
}

.db-enquiry-content {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1rem;
}

.db-enquiry-subject {
    font-weight: 600;
    color: #1a365d;
    margin-bottom: 0.5rem;
}

.db-enquiry-body {
    color: #4a5568;
    font-size: 0.9375rem;
    line-height: 1.6;
    white-space: pre-wrap;
}

/* Conversation Log Section */
.db-conversation-section h3 {
    font-size: 1rem;
    color: #6b2574;
    margin: 0 0 0.75rem 0;
}

.db-conversation-log {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.db-conversation-message {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    max-width: 85%;
}

.db-conversation-message.user {
    background: #e8f4fd;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.db-conversation-message.assistant {
    background: #f3f4f6;
    margin-right: auto;
    border-bottom-left-radius: 4px;
}

.db-conversation-role {
    font-size: 0.75rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.db-conversation-message.user .db-conversation-role {
    color: #1a365d;
}

.db-conversation-content {
    font-size: 0.9375rem;
    color: #374151;
    line-height: 1.5;
    white-space: pre-wrap;
}

/* Dashboard Responsive */
@media (max-width: 1024px) {
    /* Reduce container padding for dashboard on mobile */
    .container:has(.db-welcome-section) {
        padding: 0.5rem;
    }

    .db-dashboard-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "cases"
            "messages"
            "finance"
            "documents"
            "quicklinks";
        gap: 1rem;
    }

    .db-welcome-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1rem;
        margin-bottom: 0.75rem;
    }

    .db-quick-actions {
        width: 100%;
        flex-direction: column;
    }

    .db-action-btn {
        width: 100%;
        text-align: center;
    }

    .db-main-nav {
        display: none;
    }

    .db-card {
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    .db-case-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ========================================
   Enquiry Popup
   ======================================== */
.enquiry-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    padding: 1rem;
}

.enquiry-popup-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.enquiry-popup {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 400px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.enquiry-popup-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0.25rem 0.5rem;
    line-height: 1;
    transition: color 0.15s ease;
}

.enquiry-popup-close:hover {
    color: var(--uvp-primary);
}

.enquiry-popup h2 {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #6b2574;
    padding-right: 2rem;
}

.enquiry-popup-section {
    margin-bottom: 1rem;
}

.enquiry-popup-section h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--uvp-primary);
    margin: 0 0 0.75rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e5e5;
}

.enquiry-popup-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.enquiry-popup-field {
    margin-bottom: 0.875rem;
}

.enquiry-popup-field label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 0.25rem;
}

.enquiry-popup-field input,
.enquiry-popup-field select,
.enquiry-popup-field textarea {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.875rem;
    font-family: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    background: white;
}

.enquiry-popup-field input:focus,
.enquiry-popup-field select:focus,
.enquiry-popup-field textarea:focus {
    outline: none;
    border-color: var(--uvp-primary);
    box-shadow: 0 0 0 3px rgba(107, 37, 116, 0.1);
}

.enquiry-popup-field input::placeholder,
.enquiry-popup-field textarea::placeholder {
    color: #999;
}

.enquiry-popup-field textarea {
    resize: vertical;
    min-height: 80px;
}

.enquiry-popup-field .validation-message {
    color: #dc3545;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.enquiry-popup-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

.enquiry-popup-btn {
    padding: 0.625rem 1.25rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.enquiry-popup-btn.primary {
    background: var(--uvp-primary);
    color: white;
    border: none;
}

.enquiry-popup-btn.primary:hover:not(:disabled) {
    background: var(--uvp-primary-light);
}

.enquiry-popup-btn.primary:disabled {
    background: #b88dbd;
    cursor: not-allowed;
}

.enquiry-popup-btn.secondary {
    background: white;
    color: #666;
    border: 1px solid #e5e5e5;
}

.enquiry-popup-btn.secondary:hover:not(:disabled) {
    border-color: var(--uvp-primary);
    color: var(--uvp-primary);
    background: var(--uvp-background-light);
}

.enquiry-popup-btn.secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.enquiry-popup-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 0.625rem 0.75rem;
    border-radius: 6px;
    margin-bottom: 0.875rem;
    font-size: 0.8125rem;
}

.enquiry-popup-success {
    text-align: center;
    padding: 1.5rem 1rem;
}

.enquiry-popup-success .success-icon {
    width: 50px;
    height: 50px;
    background: #28a745;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 0.75rem;
}

.enquiry-popup-success h3 {
    margin: 0 0 0.375rem 0;
    color: #6b2574;
    font-weight: 600;
    font-size: 1.125rem;
}

.enquiry-popup-success p {
    color: #666;
    margin: 0 0 1rem 0;
    font-size: 0.875rem;
}

.enquiry-popup-login-link {
    text-align: center;
    font-size: 0.8125rem;
    color: #666;
    margin-top: 0.75rem;
}

.enquiry-popup-login-link a {
    color: var(--uvp-primary);
    text-decoration: none;
    font-weight: 500;
}

.enquiry-popup-login-link a:hover {
    text-decoration: underline;
}

.enquiry-popup-info {
    font-size: 0.875rem;
    color: #666;
    margin: 0 0 1rem 0;
    line-height: 1.4;
}

.enquiry-popup-divider {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 1rem 0;
}

/* Mobile adjustments for enquiry popup */
@media (max-width: 480px) {
    .enquiry-popup {
        padding: 1.25rem;
        border-radius: 8px;
    }

    .enquiry-popup h2 {
        font-size: 1.125rem;
    }

    .enquiry-popup-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .enquiry-popup-actions {
        flex-direction: column-reverse;
    }

    .enquiry-popup-btn {
        width: 100%;
        text-align: center;
    }
}

/* ========================================
   Law Firm Details Popup (extends enquiry-popup)
   ======================================== */

.firm-details-popup {
    max-width: 550px;
}

@media (max-width: 480px) {
    .firm-details-popup {
        max-width: 100%;
    }
}

.firm-details-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.firm-detail-row {
    display: flex;
    gap: 1rem;
}

.firm-detail-label {
    font-weight: 500;
    color: #666;
    min-width: 70px;
}

.firm-detail-row a {
    color: var(--uvp-primary, #6b2574);
    text-decoration: none;
}

.firm-detail-row a:hover {
    text-decoration: underline;
}

.firm-address {
    font-style: normal;
    color: #444;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

.firm-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.firm-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.firm-badge.positive {
    background: #d4edda;
    color: #155724;
}

.firm-badge.neutral {
    background: #f0f0f0;
    color: #666;
}

/* ========================================
   Case Detail Page (cdp-)
   ======================================== */

/* Header */
.cdp-header {
    background: white;
    border-bottom: 1px solid #e5e5e5;
    padding: 1.5rem 0;
    margin: -2rem -2rem 2rem -2rem;
    padding-left: 2rem;
    padding-right: 2rem;
}

.cdp-header-content {
    max-width: 1400px;
    margin: 0 auto;
}

.cdp-back-link {
    color: var(--uvp-primary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    display: inline-block;
    margin-bottom: 1rem;
}

.cdp-back-link:hover {
    text-decoration: underline;
}

.cdp-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.cdp-title-row h1 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #6b2574;
    margin: 0;
    letter-spacing: -0.03em;
}

.cdp-meta {
    color: #666;
    font-size: 0.9rem;
}

/* Main Container */
.cdp-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.cdp-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cdp-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Collapsible Sections */
.cdp-collapsible-header {
    cursor: pointer;
    font-weight: 600;
    padding: 0.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--uvp-primary);
    user-select: none;
}

.cdp-collapsible-header:hover {
    opacity: 0.8;
}

.cdp-collapsible-header.cdp-nested {
    margin-top: 1rem;
    font-size: 0.9rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e5e5;
}

.cdp-collapsible-content {
    margin-top: 1rem;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 8px;
}

.cdp-collapsible-content .db-detail-row {
    display: flex;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    flex-direction: row;
    gap: 1rem;
}

.cdp-collapsible-content .db-detail-row:last-child {
    border-bottom: none;
}

.cdp-collapsible-content .db-detail-label {
    font-weight: 600;
    min-width: 120px;
    color: #666;
    font-size: 0.875rem;
}

.cdp-collapsible-content .db-detail-value {
    color: #0a0a0a;
    font-size: 0.9375rem;
}

/* Enquiry Meta */
.cdp-enquiry-meta {
    font-weight: 600;
    color: #666;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

/* Firm Card */
.cdp-firm-card {
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 1rem;
    margin-top: 1rem;
}

.cdp-firm-header-clickable {
    cursor: pointer;
    padding-bottom: 0.5rem;
}

.cdp-firm-header-clickable:hover {
    background-color: #fafafa;
    margin: -1rem -1rem 0 -1rem;
    padding: 1rem 1rem 0.5rem 1rem;
    border-radius: 10px 10px 0 0;
}

.cdp-firm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cdp-firm-header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cdp-expand-icon {
    color: #666;
    font-size: 0.8rem;
}

.cdp-firm-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: #0a0a0a;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cdp-view-firm-link {
    background: none;
    border: none;
    color: var(--uvp-primary, #6b2574);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
}

.cdp-view-firm-link:hover {
    text-decoration: underline;
}

.cdp-firm-rating {
    color: #f59e0b;
    font-size: 0.85rem;
}

.cdp-firm-reviews {
    font-size: 0.85rem;
    color: #666;
}

.cdp-unread-badge {
    background: #ef4444;
    color: white;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cdp-responded-date {
    color: #666;
    font-size: 0.85rem;
    font-style: italic;
    margin-top: 0.25rem;
}

/* Conversation Divider */
.cdp-conversation-divider {
    margin: 1.5rem 0;
    text-align: center;
    color: #999;
    font-size: 0.9rem;
    position: relative;
}

.cdp-conversation-divider::before,
.cdp-conversation-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #ddd;
}

.cdp-conversation-divider::before {
    left: 0;
}

.cdp-conversation-divider::after {
    right: 0;
}

/* Messages Card */
.cdp-messages-card {
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    margin-top: 16px;
    margin-bottom: 16px;
}

.cdp-messages-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
}

.cdp-messages-header:hover {
    background: #f9fafb;
}

.cdp-messages-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

.cdp-collapse-icon {
    color: #6b7280;
    font-size: 12px;
}

.cdp-messages-body {
    padding: 20px;
}

/* Messages */
.cdp-message {
    padding: 12px 16px;
    border-radius: 8px;
    max-width: 85%;
}

.cdp-message-firm {
    background: #ede9fe;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.cdp-message-client {
    background: #f3f4f6;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.cdp-message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    gap: 16px;
}

.cdp-message-sender {
    font-size: 13px;
    font-weight: 600;
    color: #6b21a8;
}

.cdp-message-client .cdp-message-sender {
    color: #6b21a8;
}

.cdp-message-content {
    font-size: 14px;
    color: #374151;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.cdp-message-time {
    font-size: 12px;
    color: #9ca3af;
    white-space: nowrap;
}

/* Message Input */
.cdp-message-input {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.cdp-message-input input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
}

.cdp-message-input input:focus {
    outline: none;
    border-color: var(--uvp-primary);
}

/* Activity Items */
.cdp-activity-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
}

.cdp-activity-item:last-child {
    border-bottom: none;
}

.cdp-activity-time {
    color: #999;
    font-size: 0.85rem;
}

.cdp-activity-text {
    color: #444;
    margin-top: 0.25rem;
}

/* Quick Actions in sidebar */
.cdp-quick-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Firm Info in header */
.cdp-firm-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* Initial Response quote */
.cdp-initial-response {
    background: #f9fafb;
    border-left: 3px solid var(--uvp-primary);
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0 8px 8px 0;
}

.cdp-response-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--uvp-primary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.5rem;
}

.cdp-response-quote {
    font-style: italic;
    color: #374151;
    line-height: 1.5;
}

/* Messages list container */
.cdp-messages-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem 0;
}

/* Firm Actions at bottom of card */
.cdp-firm-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e5e5;
    display: flex;
    justify-content: flex-end;
}

.cdp-select-btn {
    background: var(--uvp-primary);
    color: white;
}

.cdp-select-btn:hover {
    background: var(--uvp-primary-dark);
}

/* Loading state */
.db-loading {
    text-align: center;
    padding: 3rem;
    color: #666;
    font-size: 1rem;
}

/* Error state */
.db-error {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
}

.db-error h2 {
    color: #6b2574;
    margin-bottom: 0.5rem;
}

.db-error p {
    color: #666;
    margin-bottom: 1.5rem;
}

/* Status badge additions for case detail */
.db-status-badge.open {
    background: #dcfce7;
    color: #166534;
}

.db-status-badge.inprogress {
    background: #dbeafe;
    color: #1e40af;
}

.db-status-badge.closed {
    background: #f3f4f6;
    color: #4b5563;
}

/* Responsive */
@media (max-width: 1024px) {
    .cdp-container {
        grid-template-columns: 1fr;
    }

    .cdp-header {
        margin: -1rem -1rem 1.5rem -1rem;
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    .cdp-title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* ========================================
   Law Firm Details Popup
   ======================================== */
.firm-popup-overlay {
    background: rgba(0, 0, 0, 0.6);
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.firm-popup-overlay.visible {
    display: flex;
}

.firm-popup {
    background: white;
    border-radius: 12px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.05);
    position: relative;
    display: flex;
    flex-direction: column;
}

.firm-popup-header {
    background: linear-gradient(135deg, #6b2d5c 0%, #8b3a7a 100%);
    color: white;
    padding: 30px 40px;
    position: relative;
    overflow: hidden;
}

.firm-popup-header::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.firm-logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.firm-logo-placeholder {
    height: 60px;
    width: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.firm-company-name {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: white;
}

.firm-tagline {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 300;
    position: relative;
    z-index: 1;
}

.firm-popup-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 2;
}

.firm-popup-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.firm-popup-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

.firm-main-content {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    min-width: 0;
    background: linear-gradient(to bottom, #ffffff 0%, #fafbfc 100%);
}

.firm-section {
    margin-bottom: 35px;
}

.firm-section-title {
    color: #6b2d5c;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.firm-section-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(135deg, #6b2d5c, #8b3a7a);
    border-radius: 2px;
}

.firm-about-text {
    color: #333;
    line-height: 1.7;
    font-size: 15px;
}

.firm-contact-grid {
    display: grid;
    gap: 15px;
}

.firm-contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: all 0.2s;
    border: 1px solid #e9ecef;
}

.firm-contact-item:hover {
    transform: translateX(3px);
    border-color: #dee2e6;
    background: #ffffff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.firm-contact-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #6b2d5c, #8b3a7a);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(107, 45, 92, 0.2);
}

.firm-contact-icon svg {
    width: 20px;
    height: 20px;
}

.firm-contact-details {
    flex: 1;
}

.firm-contact-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.firm-contact-value {
    color: #333;
    font-size: 15px;
    font-weight: 500;
}

.firm-contact-value a {
    color: #6b2d5c;
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
}

.firm-contact-value a:hover {
    text-decoration: underline;
    color: #8b3a7a;
}

.firm-services-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.firm-service-tag {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    color: #2e7d32;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid #a5d6a7;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.firm-service-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.firm-service-tag.neutral {
    background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
    color: #666;
    border-color: #ccc;
}

.firm-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: linear-gradient(to bottom, #f8f9fa 0%, #f1f3f5 100%);
    border-left: 1px solid #dee2e6;
    padding: 40px 30px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.firm-sidebar-title {
    color: #6b2d5c;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e8e0e7;
}

.firm-office-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.firm-office-item {
    background: white;
    padding: 18px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(107, 45, 92, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.firm-office-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(107, 45, 92, 0.15);
}

.firm-office-name {
    font-weight: 600;
    color: #6b2d5c;
    font-size: 15px;
    margin-bottom: 8px;
}

.firm-office-address {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

.firm-popup-loading,
.firm-popup-error {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.firm-popup-error {
    color: #dc3545;
}

@media (max-width: 768px) {
    .firm-popup {
        max-height: 95vh;
        display: flex;
        flex-direction: column;
    }

    .firm-popup-content {
        flex-direction: column;
        flex: 1;
        overflow-y: auto;
        min-height: 0;
    }

    .firm-main-content {
        padding: 25px 20px;
        overflow-y: visible;
        flex: none;
    }

    .firm-sidebar {
        width: 100%;
        flex-shrink: 0;
        border-left: none;
        border-top: 1px solid #e8e0e7;
        padding: 30px 20px;
        overflow-y: visible;
        flex: none;
    }

    .firm-popup-header {
        padding: 20px;
        flex-shrink: 0;
    }

    .firm-logo-placeholder {
        height: 45px;
        width: 45px;
        font-size: 20px;
    }

    .firm-company-name {
        font-size: 22px;
    }

    .firm-tagline {
        font-size: 14px;
    }

    .firm-popup-close-btn {
        top: 15px;
        right: 15px;
        width: 32px;
        height: 32px;
        font-size: 20px;
    }

    .firm-section {
        margin-bottom: 25px;
    }

    .firm-section-title {
        font-size: 18px;
    }

    .firm-about-text {
        font-size: 14px;
    }

    .firm-contact-icon {
        width: 36px;
        height: 36px;
    }

    .firm-contact-icon svg {
        width: 18px;
        height: 18px;
    }

    .firm-contact-label {
        font-size: 11px;
    }

    .firm-contact-value {
        font-size: 14px;
    }

    .firm-service-tag {
        font-size: 13px;
        padding: 8px 16px;
    }

    .firm-sidebar-title {
        font-size: 16px;
        margin-bottom: 15px;
    }

    .firm-office-item {
        padding: 15px;
    }

    .firm-office-name {
        font-size: 14px;
    }

    .firm-office-address {
        font-size: 12px;
    }

    .firm-office-list {
        gap: 15px;
    }

    .firm-contact-grid {
        gap: 12px;
    }

    .firm-contact-item {
        padding: 10px;
    }
}
