﻿
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

    /* --- Base Variables and Reset --- */
:root {
    --uvp-font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --primary-color: #7030A0; /* A shade of purple, adjust as needed */
    --secondary-color: #f0f2f5;
    --text-color: #333;
    --light-text-color: #777; /* Used for placeholder, hints, unselected text */
    --border-color: #e0e0e0; /* Used for subtle borders */
    --white-color: #fff;
    --pending-bg-color: #fff0c2;
    --pending-text-color: #f5a623;
    --approved-bg-color: #e6ffed;
    --approved-text-color: #4caf50;
    --applications-bg-color: #e7f3ff;
    --applications-text-color: #007bff;
    --sidebar-bg: var(--white-color);
    --main-bg: #f9fafb; /* Light grey for main content background */
    --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.07); /* Slightly softer shadow */
    --border-radius: 8px; /* Increased rounding */
}

    * {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
    }
    /* --- Custom Scrollbar Styling --- */
    ::-webkit-scrollbar {
        width: 10px;
        height: 10px;
    }

    ::-webkit-scrollbar-track {
        background: var(--secondary-color);
        border-radius: 5px;
    }

    ::-webkit-scrollbar-thumb {
        background: var(--primary-color);
        border-radius: 5px;
    }

        ::-webkit-scrollbar-thumb:hover {
            background: #5a2480;
        }
    /* Firefox scrollbar */
    * {
        scrollbar-width: thin;
        scrollbar-color: var(--primary-color) var(--secondary-color);
    }

    body {
        font-family: var(--uvp-font-family);
        background-color: var(--main-bg);
        color: var(--text-color);
        line-height: 1.6;
        /* display: flex; */ /* Commented out to avoid conflicts */
    }

    /* --- Global Heading Styles --- */
    h1, h2, h3, h4 {
        color: var(--primary-color);
        font-weight: 600;
        letter-spacing: -0.02em;
    }

    h1 {
        font-weight: 600;
        letter-spacing: -0.03em;
    }

    /* Ensure buttons and inputs inherit font */
    button, input, select, textarea {
        font-family: inherit;
    }

    /* --- General Layout (Dashboard/Application View) --- */
    .container {
        display: flex;
        width: 100%;
        min-height: 100vh;
    }
    /* Sidebar */
    .sidebar {
        width: 260px;
        height: 100vh;
        background-color: var(--sidebar-bg);
        padding: 20px;
        display: flex;
        flex-direction: column;
        border-right: 1px solid var(--border-color);
        flex-shrink: 0;
        position: sticky;
        top: 0;
        overflow-y: auto;
    }

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    margin-top: 20px;
}

    .logo {
        font-size: 28px;
        font-weight: 700;
        color: var(--primary-color);
        padding-left: 10px;
        text-decoration: none;
    }

    .sidebar-close {
        display: none;
        background: none;
        border: none;
        cursor: pointer;
        padding: 5px;
        color: var(--light-text-color);
    }

        .sidebar-close:hover {
            color: var(--primary-color);
        }

        .sidebar-close svg {
            stroke: currentColor;
        }

    .menu {
        flex: 1;
    }

        .menu ul {
            list-style: none;
            padding: 0;
            margin: 0;
        }

        .menu li {
            margin-bottom: 5px;
        }

            .menu li.nav-item {
                margin-bottom: 5px;
            }

            .menu li a {
                display: flex;
                align-items: center;
                text-decoration: none;
                color: var(--light-text-color);
                padding: 12px 15px;
                border-radius: var(--border-radius);
                font-weight: 500;
                transition: background-color 0.3s ease, color 0.3s ease;
            }

                .menu li a i {
                    margin-right: 12px;
                    font-size: 1.1em;
                    width: 20px;
                    text-align: center;
                }

                .menu li a .nav-icon {
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    margin-right: 12px;
                    width: 20px;
                    flex-shrink: 0;
                }

                    .menu li a .nav-icon svg {
                        stroke: var(--light-text-color);
                        transition: stroke 0.2s ease;
                    }

                .menu li a .nav-text {
                    font-size: 0.95rem;
                    font-weight: 500;
                }

                .menu li a:hover .nav-icon svg {
                    stroke: var(--primary-color);
                }

                .menu li.active a .nav-icon svg,
                .menu li a.active .nav-icon svg {
                    stroke: var(--white-color);
                }

            .menu li.active a {
                background-color: var(--primary-color);
                color: var(--white-color);
            }

                .menu li.active a i {
                    color: var(--white-color);
                }

            .menu li a:hover {
                background-color: var(--secondary-color);
                color: var(--primary-color);
            }

                .menu li a:hover i {
                    color: var(--primary-color);
                }
    /* Nav Links (NavLink component adds .active class) */
    .nav-link {
        display: flex;
        align-items: center;
        text-decoration: none;
        color: var(--light-text-color);
        padding: 12px 15px;
        border-radius: var(--border-radius);
        font-weight: 500;
        transition: background-color 0.3s ease, color 0.3s ease;
    }

        .nav-link i {
            margin-right: 12px;
            font-size: 1.1em;
            width: 20px;
            text-align: center;
        }

        .nav-link .nav-icon {
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 12px;
            width: 20px;
            flex-shrink: 0;
        }

            .nav-link .nav-icon svg {
                stroke: var(--light-text-color);
                transition: stroke 0.2s ease;
            }

        .nav-link .nav-text {
            font-size: 0.95rem;
            font-weight: 500;
        }

        .nav-link:hover {
            background-color: var(--secondary-color);
            color: var(--primary-color);
        }

            .nav-link:hover .nav-icon svg {
                stroke: var(--primary-color);
            }

        .nav-link.active {
            background-color: var(--primary-color);
            color: var(--white-color);
        }

            .nav-link.active i {
                color: var(--white-color);
            }

            .nav-link.active .nav-icon svg {
                stroke: var(--white-color);
            }
    /* Nav Sections */
    .nav-section {
        margin-top: 20px;
        padding-top: 15px;
        border-top: 1px solid var(--border-color);
    }

    .nav-section-title {
        display: block;
        color: var(--primary-color);
        font-size: 0.80rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: var(--light-text-color);
        padding: 15px 15px 8px 15px;
        margin: 0;
        list-style: none;
    }

    .nav-section ul {
        list-style: none;
    }

    .nav-section li {
        margin-bottom: 5px;
    }
    /* Sidebar Footer */
    .sidebar-footer {
        margin-top: auto;
        padding-top: 20px;
        border-top: 1px solid var(--border-color);
    }

    .logout-btn {
        display: flex;
        align-items: center;
        width: 100%;
        padding: 12px 15px;
        border: none;
        background: transparent;
        color: var(--light-text-color);
        font-family: 'Inter', sans-serif;
        font-size: 0.95rem;
        font-weight: 500;
        cursor: pointer;
        border-radius: var(--border-radius);
        transition: background-color 0.3s ease, color 0.3s ease;
    }

        .logout-btn i {
            margin-right: 12px;
            font-size: 1.1em;
            width: 20px;
            text-align: center;
        }

        .logout-btn .nav-icon {
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 12px;
            width: 20px;
            flex-shrink: 0;
        }

            .logout-btn .nav-icon svg {
                stroke: var(--light-text-color);
                transition: stroke 0.2s ease;
            }

        .logout-btn:hover {
            background-color: rgba(220, 53, 69, 0.1);
            color: #dc3545;
        }

            .logout-btn:hover .nav-icon svg {
                stroke: #dc3545;
            }
    /* Main Content Area */
    .main-content {
        flex: 1;
        padding: 0 30px 30px 30px;
        overflow-y: auto;
        background-color: var(--main-bg);
    }

    .content-area {
        padding-top: 10px;
    }

    .user-profile .user-name {
        font-weight: 500;
        color: var(--text-color);
        font-size: 0.95rem;
    }
    /* Top Header inside Main Content */
    .top-header {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        padding: 20px 0;
        height: 70px;
    }

    .user-profile {
        display: flex;
        align-items: center;
    }

        .user-profile .user-initial {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 36px;
            height: 36px;
            background-color: var(--primary-color);
            color: var(--white-color);
            border-radius: 50%;
            font-weight: 500;
            margin-right: 10px;
            font-size: 1em;
        }

        .user-profile a {
            text-decoration: none;
            color: var(--text-color);
            font-weight: 500;
            display: flex;
            align-items: center;
        }

            .user-profile a i {
                margin-left: 8px;
                font-size: 0.8em;
            }
    /* --- Dashboard Specific Elements --- */
    .dashboard-overview h1 {
        margin-bottom: 25px;
    }

    .summary-cards {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
        margin-bottom: 30px;
    }

    .card { /* General card style, now also used by form-container */
        background-color: var(--white-color);
        padding: 25px; /* Default padding */
        border-radius: var(--border-radius);
        box-shadow: var(--card-shadow);
        border: 1px solid #f0f0f0; /* Optional light border */
    }
    /* Dashboard card specific icon styles */
    .card-icon {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-right: 20px;
        font-size: 1.8em;
        float: left;
    }

        .card-icon.applications {
            background-color: var(--applications-bg-color);
            color: var(--applications-text-color);
        }

        .card-icon.pending {
            background-color: var(--pending-bg-color);
            color: var(--pending-text-color);
        }

        .card-icon.approved {
            background-color: var(--approved-bg-color);
            color: var(--approved-text-color);
        }

    .card-content {
        overflow: hidden;
    }
        /* Contains floated icon */
        .card-content p {
            font-size: 0.9em;
            color: var(--light-text-color);
            margin-bottom: 5px;
        }

        .card-content h2 {
            font-size: 2em;
            font-weight: 700;
            color: var(--text-color);
        }

    .text-danger {
        color: red;
    }

    .alert alert-danger {
        color: red;
    }
    /* Recent Applications Table/List */
    .recent-applications { /* Uses .card styling */
        margin-bottom: 30px;
    }

        .recent-applications h3 {
            font-size: 20px;
            font-weight: 500;
            margin-bottom: 20px;
            color: #333;
        }

    .application-item {
        display: flex;
        align-items: center;
        padding: 15px 0;
        border-bottom: 1px solid var(--border-color);
        text-decoration: none;
        color: inherit;
        transition: background-color 0.2s ease;
    }

        .application-item:last-child {
            border-bottom: none;
        }

        .application-item:hover {
            background-color: #f9f9f9;
        }

    .app-icon-col {
        width: 5%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .app-details-col {
        width: 15%;
        padding-right: 15px;
    }

    .app-ref-col {
        width: 15%;
        color: var(--light-text-color);
    }

    .app-name-col {
        width: 20%;
    }

    .app-wide-col {
        width: 25%;
    }

    .app-amount-col {
        width: 10%;
        font-weight: 500;
        text-align: right;
    }

    .app-status-col {
        width: 10%;
        text-align: right;
    }

    .app-checkbox {
        color: var(--light-text-color);
        font-size: 1.2em;
    }

        .app-checkbox .fa-check-square {
            color: var(--primary-color);
        }

    .app-id {
        font-weight: 500;
        color: var(--text-color);
        font-size: 0.95em;
        margin-bottom: 3px;
    }

    .app-date {
        font-size: 0.85em;
        color: var(--light-text-color);
    }

    .status { /* General status badge */
        padding: 5px 12px;
        border-radius: 15px;
        font-size: 0.8em;
        font-weight: 500;
        text-transform: capitalize;
        display: inline-block;
    }

        .status.pending-bg {
            background-color: var(--pending-bg-color);
            color: var(--pending-text-color);
        }

        .status.approved-bg {
            background-color: var(--approved-bg-color);
            color: var(--approved-text-color);
        }

    .status-badge {
        padding: 0.5rem 1rem;
        border-radius: 50px;
        font-weight: 600;
        font-size: 0.875rem;
    }
    /* Status colors */
    .approved {
        background-color: #d4edda;
        color: #155724;
    }

    .approvedforfinance {
        background-color: #d4edda;
        color: #155724;
    }

    .live {
        background-color: #d4edda;
        color: #155724;
    }

    .new {
        background-color: #fff0c2;
        color: #155724;
    }

    .unknown {
        background-color: #f5a623;
        color: white;
    }

    .pending {
        background-color: #fff0c2;
        color: #f5a623;
    }

    .pendingwithclient {
        background-color: #fff0c2;
        color: #f5a623;
    }

    .clientsignedpaperwork {
        background-color: green;
        color: whitesmoke;
    }

    .financeagreed {
        background-color: green;
        color: whitesmoke;
    }

    .authorisedreleased {
        background-color: green;
        color: whitesmoke;
    }

    .customernotproceeding {
        background-color: palevioletred;
        color: whitesmoke;
    }

    .applied {
        background-color: #f5a623;
        color: white;
    }

    .applicationunderreview {
        background-color: #f5a623;
        color: white;
    }

    .paid {
        background-color: green;
        color: white;
    }

    .paidout {
        background-color: green;
        color: white;
    }

    .awaitingclientsignature {
        background-color: green;
        color: white;
    }

    .declined {
        background-color: #f8d7da;
        color: #721c24;
    }

    .failed {
        background-color: orangered;
        color: white;
    }

    .expired {
        background-color: #e2e3e5;
        color: #383d41;
    }

    .status { /* General status badge */
        padding: 5px 12px;
        border-radius: 15px;
        font-size: 0.8em;
        font-weight: 500;
        text-transform: capitalize;
        display: inline-block;
    }

        .status.pending-bg {
            background-color: var(--pending-bg-color);
            color: var(--pending-text-color);
        }

        .status.approved-bg {
            background-color: var(--approved-bg-color);
            color: var(--approved-text-color);
        }



    .status { /* General status badge */
        padding: 5px 12px;
        border-radius: 15px;
        font-size: 0.8em;
        font-weight: 500;
        text-transform: capitalize;
        display: inline-block;
    }

        .status.pending-bg {
            background-color: var(--pending-bg-color);
            color: var(--pending-text-color);
        }

        .status.approved-bg {
            background-color: var(--approved-bg-color);
            color: var(--approved-text-color);
        }
    /* --- Order Details Page --- */
    .order-details-page .page-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 25px;
    }

    .order-details-page h2 {
        font-size: 24px;
        font-weight: 500;
        color: #333;
    }

    .details-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .details-card { /* Re-uses .card styles */
    }

        .details-card h3 {
            font-size: 18px;
            font-weight: 500;
            margin-bottom: 20px;
            padding-bottom: 10px;
            border-bottom: 1px solid var(--border-color);
            color: var(--primary-color);
        }

    .info-row {
        display: flex;
        justify-content: space-between;
        margin-bottom: 15px;
        font-size: 0.95em;
    }

        .info-row:last-child {
            margin-bottom: 0;
        }

    .info-label {
        color: var(--light-text-color);
        font-weight: 400;
        width: 40%;
    }

    .info-label-small {
        color: var(--light-text-color);
        font-weight: 400;
        width: 15%;
    }

    .info-value {
        color: var(--text-color);
        font-weight: 500;
        text-align: right;
        word-break: break-word;
    }

        .info-value a {
            color: var(--primary-color);
            text-decoration: none;
        }

            .info-value a:hover {
                text-decoration: underline;
            }

    .status-text.pending-text {
        color: var(--pending-text-color);
        font-weight: 700;
    }

    .info-text {
        font-size: 0.9rem;
        padding-bottom: inherit
    }
    /* --- Login Page Specific Styles --- */
    .login-page {
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, var(--main-bg) 0%, #f0e6f3 100%);
        padding: 20px;
        font-family: 'Inter', sans-serif;
    }

    .login-container {
        background: var(--white-color);
        border-radius: 12px;
        box-shadow: 0 10px 40px rgba(112, 48, 160, 0.15);
        max-width: 450px;
        width: 100%;
        padding: 40px;
    }

    .login-header {
        text-align: center;
        margin-bottom: 30px;
    }

        .login-header .logo {
            /*font-size: 2.5rem;*/
            font-weight: 700;
            margin-bottom: 20px;
            color: var(--primary-color);
        }

        .login-header h1 {
            font-size: 1.5rem;
            color: var(--text-color);
            margin: 0 0 8px 0;
        }

        .login-header p {
            color: var(--light-text-color);
            margin: 0;
        }

    .login-box {
        background-color: var(--white-color);
        padding: 40px;
        border-radius: var(--border-radius);
        box-shadow: var(--card-shadow);
        width: 100%;
        max-width: 500px;
    }

        .login-box .logo {
            font-size: 32px;
            font-weight: 700;
            color: var(--primary-color);
            margin-bottom: 30px;
            text-align: center;
            padding-left: 0;
        }

    .login-form .form-group {
        margin-bottom: 20px;
    }

    .login-form label {
        display: block;
        font-weight: 600;
        margin-bottom: 8px;
        color: var(--text-color);
    }

    .login-form input {
        width: 100%;
        padding: 12px;
        border: 1px solid var(--border-color);
        border-radius: 6px;
        font-size: 1rem;
        font-family: inherit;
        transition: border-color 0.2s;
        box-sizing: border-box;
        color: var(--text-color);
    }

        .login-form input:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(112, 48, 160, 0.1);
        }

        .login-form input::placeholder {
            color: var(--light-text-color);
            opacity: 1;
        }

    .forgot-password {
        text-align: right;
        margin-top: 5px;
    }

        .forgot-password a {
            color: var(--primary-color);
            text-decoration: none;
            font-size: 0.9em;
        }

            .forgot-password a:hover {
                text-decoration: underline;
            }

    .btn-login {
        width: 100%;
        padding: 14px;
        background: var(--primary-color);
        color: white;
        border: none;
        border-radius: 6px;
        font-size: 1rem;
        font-weight: 600;
        cursor: pointer;
        transition: background 0.2s;
    }

        .btn-login:hover {
            background: #5a2480;
        }

        .btn-login:disabled {
            background: var(--light-text-color);
            cursor: not-allowed;
        }

    .login-footer {
        text-align: center;
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid var(--border-color);
    }

        .login-footer p {
            margin: 0;
            color: var(--light-text-color);
        }

        .login-footer a {
            color: var(--primary-color);
            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;
        border-radius: 6px;
        margin-bottom: 20px;
        font-size: 0.9rem;
    }

    .login-button {
        background-color: var(--primary-color);
        color: var(--white-color);
        padding: 14px 20px;
        border: none;
        border-radius: var(--border-radius);
        font-size: 1.1em;
        font-weight: 500;
        cursor: pointer;
        width: 100%;
        transition: background-color 0.3s ease;
        margin-top: 10px;
    }

        .login-button:hover {
            background-color: #5a49b3;
        }

    .new-user {
        text-align: center;
        margin-top: 25px;
        color: var(--light-text-color);
        font-size: 0.9em;
    }

    .register-options {
        display: flex;
        justify-content: space-between;
        margin-top: 15px;
        gap: 10px;
    }

    .register-button {
        background-color: transparent;
        border: 1px solid var(--primary-color);
        color: var(--primary-color);
        padding: 10px 15px;
        border-radius: var(--border-radius);
        font-size: 0.9em;
        font-weight: 500;
        cursor: pointer;
        transition: background-color 0.3s ease, color 0.3s ease;
        flex: 1;
        text-align: center;
    }

        .register-button:hover {
            background-color: var(--primary-color);
            color: var(--white-color);
        }


    .validation-message {
        margin-top: 0.5rem;
        margin-bottom: 0.5rem;
        padding: 0.75rem 1rem;
        border-radius: 6px;
        background-color: #FFF5F5;
        color: #C53030;
        border: 1px solid #FED7D7;
        font-size: 14px;
    }
    /* --- Form Styles (e.g., About You Page) --- */
    .form-footer {
        text-align: center;
        margin-top: 20px;
        padding: 20px 0;
        border-top: 1px solid var(--border-color);
    }

        .form-footer p {
            margin-bottom: 10px;
            font-size: 0.9rem;
            color: var(--light-text-color);
        }

            .form-footer p:last-child {
                margin-bottom: 0;
            }

        .form-footer a {
            color: var(--primary-color);
            text-decoration: none;
        }

            .form-footer a:hover {
                text-decoration: underline;
            }
    /* Form container uses .card styles */
    .form-container.card {
        max-width: 700px;
        margin: 20px auto;
        padding: 30px 35px; /* Specific padding for form card */
        /* Inherits background, shadow, border from .card */
    }
    /* Header positioned INSIDE the form card */
    .form-header {
        margin-bottom: 30px;
        padding-bottom: 20px;
        border-bottom: 1px solid var(--secondary-color);
        text-align: center;
    }

        .form-header h2 {
            color: var(--text-color);
            font-weight: 500;
            margin-bottom: 4px;
            font-size: 1.3em;
            text-transform: uppercase;
        }

        .form-header .step-indicator {
            color: var(--light-text-color);
            font-size: 0.9em;
        }
    /* General Form Group styling */
    .form-group {
        margin-bottom: 28px;
    }
        /* General Form Label styling */
        .form-group label {
            display: block;
            font-weight: 500;
            color: var(--text-color);
            margin-bottom: 10px;
            font-size: 0.9em;
        }
    /* General Form Control (input, select, textarea) styling */
    .form-control {
        display: block;
        width: 100%;
        padding: 12px 15px;
        font-family: 'Inter', sans-serif;
        font-size: 0.95em;
        line-height: 1.5;
        color: var(--text-color);
        background-color: var(--white-color);
        background-clip: padding-box;
        border: 1px solid var(--border-color);
        border-radius: var(--border-radius);
        transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
        min-height: calc(1.5em + (12px * 2) + 2px); /* Ensure consistent height */
    }
    /* Ensure all form inputs use Roboto font */
    input, select, textarea, button {
        font-family: 'Inter', sans-serif;
    }

    .form-control::placeholder {
        color: var(--light-text-color);
        opacity: 1;
    }

    .form-control:focus {
        color: #495057;
        background-color: #fff;
        border-color: var(--primary-color);
        outline: 0;
        box-shadow: 0 0 0 0.2rem rgba(106, 90, 205, 0.25);
    }

    .form-group-flex {
        display: flex;
        align-items: start;
        gap: 1rem;
    }

        .form-group-flex > * {
            flex: 1;
            min-width: 0; /* Prevents flex items from overflowing */
        }

        .form-group-flex .validation-message {
            margin-top: 0.25rem;
        }
    /* Style for InputSelectMultiple to match InputSelect */
    .form-control[multiple] {
        padding: 0.375rem 0.75rem;
        border: 1px solid var(--border-color);
        border-radius: var(--border-radius);
        min-height: 120px;
        cursor: pointer;
    }

        .form-control[multiple] option {
            padding: 0.5rem 0.75rem;
            margin: 2px 0;
            border-radius: 0.2rem;
        }

            .form-control[multiple] option:checked {
                background: var(--applications-text-color) linear-gradient(0deg, var(--applications-text-color) 0%, var(--applications-text-color) 100%);
                color: var(--white-color);
            }

            .form-control[multiple] option:hover:not(:checked) {
                background-color: var(--secondary-color);
            }
    /* Or if you want to target InputTextArea specifically */
    ::deep textarea.form-control {
        font-family: 'Inter', sans-serif;
    }
    /* Specific styling for select to better match appearance */
    select.form-control {
        appearance: none; /* Remove default arrow */
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: right 0.75rem center;
        background-size: 16px 12px;
        padding-right: 2.5rem; /* Make space for custom arrow */
    }
    /* Spacing for stacked controls within a group */
    /*.form-group .form-control + .form-control {
    margin-top: 10px;
}*/
    /* Helper for horizontal input layouts */
    .input-row {
        display: flex;
        gap: 15px;
        align-items: flex-start;
    }

        .input-row .form-control {
            flex: 1; /* Let flexbox distribute space equally */
            width: auto; /* Override width: 100% */
        }
    /* Ensure DOB inputs have centered text if needed */
    .dob-inputs input {
        text-align: center;
    }
    /* Form hint text */
    .form-hint {
        font-size: 0.8em;
        color: var(--light-text-color);
        margin-top: 5px;
    }
    /* Radio Buttons styled as Yes/No buttons */
    .radio-button-group {
        display: flex;
        gap: 12px;
        margin-top: 5px;
    }

        .radio-button-group input[type="radio"] {
            display: none;
        }

    .radio-btn-label {
        display: inline-block;
        padding: 10px 20px;
        border: 1px solid var(--border-color);
        border-radius: var(--border-radius);
        cursor: pointer;
        background-color: var(--white-color);
        color: var(--light-text-color);
        font-weight: 400;
        transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
        text-align: center;
        min-width: 80px;
        line-height: 1.5;
    }

        .radio-btn-label:hover {
            background-color: #fdfdfd;
            border-color: #d8d8d8;
        }

    .radio-button-group input[type="radio"]:checked + .radio-btn-label {
        background-color: var(--primary-color);
        color: var(--white-color);
        border-color: var(--primary-color);
        font-weight: 500;
    }
    /* Specific section styling (e.g., "Do Any Apply?") */
    .apply-questions > label {
        font-size: 1em;
        margin-bottom: 15px;
        font-weight: 500;
    }

    .sub-question {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 15px;
        padding: 10px 0;
        border-bottom: 1px solid var(--secondary-color);
        min-height: 40px;
    }

        .sub-question:last-child {
            border-bottom: none;
            margin-bottom: 0;
            padding-bottom: 0;
        }

        .sub-question p {
            margin: 0;
            color: var(--text-color);
            flex-basis: 65%;
            padding-right: 15px;
            font-size: 0.9em;
            line-height: 1.4;
        }

        .sub-question .radio-button-group.inline {
            margin-top: 0;
            flex-shrink: 0;
        }
    /* Form Submit Button */
    .submit-button {
        background-color: var(--primary-color);
        color: var(--white-color);
        padding: 12px 20px;
        border: none;
        border-radius: var(--border-radius);
        font-size: 1.05em;
        font-weight: 500;
        cursor: pointer;
        width: 100%;
        transition: background-color 0.3s ease;
        text-align: center;
        display: block;
        margin-top: 10px;
    }

        .submit-button:hover {
            background-color: #5a49b3;
        }
    /* Save Button */
    .button-container {
        grid-column: 1 / -1; /* Span both columns */
        display: flex;
        justify-content: flex-end; /* Align button to the right */
        margin-top: 10px; /* Space above the button */
    }

    .save-button {
        background-color: var(--primary-color);
        color: var(--white-color);
        border: none;
        padding: 12px 25px;
        border-radius: var(--border-radius);
        font-size: 0.95em;
        font-weight: 500;
        cursor: pointer;
        transition: background-color 0.3s ease;
    }

        .save-button:hover {
            background-color: #5a4acd; /* Darker purple on hover */
        }
    /* --- Mobile Header --- */
    .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(--text-color);
    }

        .mobile-menu-toggle .mobile-logo {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--primary-color);
        }

    .mobile-user-profile {
        display: none;
    }

    .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;
        }
    /* --- Responsive Design --- */
    /* Larger Screens (e.g., Desktop) */
    @media (min-width: 992px) {
        .details-grid {
            grid-template-columns: repeat(2, 1fr);
        }
    }
    /* Medium Screens (e.g., Tablets) */
    @media (max-width: 768px) {
        .container {
            flex-direction: column;
        }

        .mobile-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            background: var(--white-color);
            border-bottom: 1px solid var(--border-color);
            z-index: 50;
            padding-right: 15px;
        }

        .mobile-menu-toggle {
            position: static;
            background: none;
            border: none;
        }

        .mobile-user-profile {
            display: flex;
            align-items: center;
        }

            .mobile-user-profile .user-initial {
                display: inline-flex;
                align-items: center;
                justify-content: center;
                width: 32px;
                height: 32px;
                background-color: var(--primary-color);
                color: var(--white-color);
                border-radius: 50%;
                font-weight: 500;
                font-size: 0.9em;
            }

        .sidebar {
            position: fixed;
            top: 0;
            left: -280px;
            width: 280px;
            height: 100vh;
            z-index: 100;
            transition: left 0.3s ease;
            border-right: 1px solid var(--border-color);
        }

            .sidebar.open {
                left: 0;
            }

        .sidebar-close {
            display: block;
        }

        .main-content {
            padding: 20px;
            padding-top: 70px;
        }

        .top-header {
            display: none;
        }

        .content-area {
            padding-top: 0;
        }

        .dashboard-container {
            margin-top: 60px;
        }

        .summary-cards {
            grid-template-columns: 1fr;
        }

        .application-item {
            flex-direction: column;
            align-items: flex-start;
            padding: 15px;
        }

        .app-icon-col, .app-details-col, .app-ref-col, .app-name-col, .app-amount-col, .app-status-col {
            width: 100%;
            text-align: left;
            margin-bottom: 8px;
        }

        .app-icon-col {
            justify-content: flex-start;
            margin-bottom: 10px;
        }

        .app-amount-col, .app-status-col {
            text-align: left;
            padding-top: 5px;
        }

        .order-details-page .page-header {
            flex-direction: column;
            align-items: flex-start;
        }

            .order-details-page .page-header .status {
                margin-top: 10px;
            }

        .info-row {
            flex-direction: column;
            align-items: flex-start;
        }

        .info-label {
            margin-bottom: 5px;
            width: auto;
        }

        .info-value {
            text-align: left;
        }
        /* Form Adjustments for Tablet */
        .input-row {
            flex-wrap: wrap; /* Allow wrapping */
        }
        /* Let them wrap naturally based on flex: 1 */
    }
    /* Small Screens (e.g., Mobile Phones) */
    @media (max-width: 576px) {
        .form-container.card {
            padding: 20px 15px;
            margin-left: 0;
            margin-right: 0;
            max-width: 100%;
            border-radius: 0;
            border: none;
            box-shadow: none;
        }

        .form-header {
            padding-bottom: 15px;
            margin-bottom: 25px;
            text-align: center;
        }

        .input-row {
            flex-direction: column;
            gap: 10px;
            align-items: stretch;
        }
            /* Stack vertically */
            .input-row .form-control {
                width: 100%; /* Full width when stacked */
            }

        .sub-question {
            flex-direction: column;
            align-items: flex-start;
            gap: 10px;
        }

            .sub-question p {
                flex-basis: auto;
                padding-right: 0;
            }

            .sub-question .radio-button-group.inline {
                align-self: flex-start;
            }

        .login-box {
            padding: 30px 20px;
            max-width: 100%;
            box-shadow: none;
        }

            .login-box .logo {
                font-size: 28px;
            }

        .register-options {
            flex-direction: column;
        }

        .register-button {
            margin: 5px 0;
            flex: none;
            width: 100%;
        }
    }
    /* Extra Small Screens (Refinements) */
    @media (max-width: 480px) {
        body {
            font-size: 15px;
        }

        .main-content {
            padding: 15px;
        }

        .menu ul {
            flex-direction: column;
            align-items: stretch;
        }

        .menu li a {
            justify-content: flex-start;
        }

        .dashboard-overview h1 {
            font-size: 24px;
        }

        .card {
            padding: 20px;
        }
        /* Default card padding */
        .form-container.card {
            padding: 20px 15px;
        }
        /* Override for form card */
        .card-content h2 {
            font-size: 1.8em;
        }

        .recent-applications h3 {
            font-size: 18px;
        }

        .order-details-page h2 {
            font-size: 20px;
        }

        .login-box {
            padding: 25px 15px;
        }
    }
    /* Radio group specific styling for legal forms */
    .radio-group {
        display: flex;
        flex-direction: row;
        gap: 20px;
        margin-top: 8px;
        flex-wrap: nowrap;
    }

    .radio-option {
        display: flex;
        align-items: center;
        gap: 8px;
        min-width: 200px;
    }

        .radio-option label {
            margin: 0;
            cursor: pointer;
            font-size: 0.9rem;
            white-space: nowrap;
            font-weight: normal;
        }
    /* --- Details/Edit Page Styles --- */
    .page-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 24px;
    }

        .page-header h1 {
            /*font-size: 1.75rem;
            font-weight: 600;*/
            /*color: var(--text-color);*/
            margin: 8px 0 0 0;
        }

    .back-link {
        color: var(--primary-color);
        text-decoration: none;
        font-size: 0.9rem;
    }

        .back-link:hover {
            text-decoration: underline;
        }

    .details-container {
        background: var(--white-color);
        border-radius: var(--border-radius);
        box-shadow: var(--card-shadow);
        padding: 24px;
    }

    .status-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 24px;
        padding-bottom: 16px;
        border-bottom: 1px solid var(--border-color);
    }

    .status-badge.status-active {
        background-color: var(--approved-bg-color);
        color: var(--approved-text-color);
    }

    .status-badge.status-inactive {
        background-color: #f8d7da;
        color: #721c24;
    }

    .details-section {
        margin-bottom: 32px;
        padding-bottom: 24px;
        border-bottom: 1px solid var(--secondary-color);
    }

        .details-section:last-child {
            border-bottom: none;
            margin-bottom: 0;
            padding-bottom: 0;
        }

        .details-section h2 {
            font-size: 1.1rem;
            font-weight: 600;
            color: var(--primary-color);
            margin-bottom: 16px;
        }

    .details-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 16px;
    }

    .detail-item {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

        .detail-item label {
            font-size: 0.8rem;
            color: var(--light-text-color);
            font-weight: 500;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .detail-item span,
        .detail-item a {
            font-size: 0.95rem;
            color: var(--text-color);
        }

        .detail-item a {
            color: var(--primary-color);
            text-decoration: none;
        }

            .detail-item a:hover {
                text-decoration: underline;
            }

    .form-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }

        .form-grid .full-width {
            grid-column: 1 / -1;
        }

    .form-actions {
        display: flex;
        gap: 12px;
        margin-top: 24px;
        padding-top: 24px;
        border-top: 1px solid var(--border-color);
    }

    .btn {
        padding: 10px 20px;
        border-radius: var(--border-radius);
        font-size: 0.95rem;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.2s ease;
        border: none;
        text-decoration: none;
    }

    .btn-primary {
        background-color: var(--primary-color);
        color: var(--white-color);
    }

        .btn-primary:hover {
            background-color: #5a2480;
        }

        .btn-primary:disabled {
            background-color: var(--light-text-color);
            cursor: not-allowed;
        }

    .btn-secondary {
        background-color: var(--secondary-color);
        color: var(--text-color);
        border: 1px solid var(--border-color);
    }

        .btn-secondary:hover {
            background-color: #e5e7eb;
        }

    .btn-link {
        color: var(--primary-color);
        text-decoration: none;
        font-weight: 500;
    }

        .btn-link:hover {
            text-decoration: underline;
        }

    .btn-outline {
        background: none;
        border: 1px solid var(--primary-color);
        color: var(--primary-color);
        padding: 6px 14px;
        border-radius: 6px;
        font-size: 13px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.2s;
    }

        .btn-outline:hover {
            background: var(--primary-color);
            color: white;
        }

        .btn-outline:disabled {
            opacity: 0.6;
            cursor: not-allowed;
        }

            .btn-outline:disabled:hover {
                background: none;
                color: var(--primary-color);
            }

    .address-block {
        line-height: 1.8;
        color: var(--text-color);
    }

    .success-alert {
        background: rgba(76, 175, 80, 0.1);
        border: 1px solid var(--approved-text-color);
        color: var(--approved-text-color);
        padding: 12px;
        border-radius: 6px;
        margin-bottom: 20px;
        font-size: 0.9rem;
    }

    .text-success {
        color: var(--approved-text-color) !important;
    }

    .text-danger {
        color: #dc3545 !important;
    }

    .text-muted {
        color: var(--light-text-color) !important;
    }
    /* --- ClientFeeFinance Registration Section --- */
    .clientfeefinance-section {
        background: linear-gradient(135deg, #f8f4fc 0%, #fff 100%);
        border-radius: var(--border-radius);
        padding: 20px;
        margin-top: 24px;
    }

    .onboarding-progress {
        margin-bottom: 24px;
    }

    .progress-header {
        display: flex;
        justify-content: space-between;
        margin-bottom: 8px;
    }

    .progress-label {
        font-weight: 600;
        color: var(--text-color);
    }

    .progress-value {
        color: var(--light-text-color);
        font-size: 0.9rem;
    }

    .progress-bar {
        height: 8px;
        background: var(--secondary-color);
        border-radius: 4px;
        overflow: hidden;
    }

    .progress-fill {
        height: 100%;
        background: linear-gradient(90deg, var(--primary-color) 0%, #9b59b6 100%);
        border-radius: 4px;
        transition: width 0.3s ease;
    }

    .onboarding-complete {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-top: 12px;
    }

    .complete-badge {
        background: var(--approved-bg-color);
        color: var(--approved-text-color);
        padding: 4px 12px;
        border-radius: 20px;
        font-size: 0.8rem;
        font-weight: 600;
    }

    .ready-date {
        color: var(--light-text-color);
        font-size: 0.85rem;
    }
    /* --- FCA Tasks --- */
    .fca-tasks {
        margin-top: 24px;
    }

        .fca-tasks h3 {
            font-size: 1rem;
            font-weight: 600;
            color: var(--text-color);
            margin-bottom: 16px;
        }

    .task-category {
        margin-bottom: 24px;
    }

        .task-category h4 {
            font-size: 0.9rem;
            font-weight: 600;
            color: var(--primary-color);
            margin-bottom: 12px;
            padding-bottom: 8px;
            border-bottom: 1px solid var(--border-color);
        }

    .task-list {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .task-item {
        display: flex;
        gap: 12px;
        padding: 12px;
        background: var(--white-color);
        border-radius: 6px;
        border: 1px solid var(--border-color);
    }

        .task-item.task-completed {
            border-color: var(--approved-bg-color);
            background: rgba(76, 175, 80, 0.02);
        }

        .task-item.task-pending {
            border-color: var(--pending-bg-color);
        }

    .task-status {
        flex-shrink: 0;
    }

    .task-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 24px;
        height: 24px;
        border-radius: 50%;
        font-size: 0.8rem;
    }

        .task-icon.completed {
            background: var(--approved-bg-color);
            color: var(--approved-text-color);
        }

        .task-icon.pending {
            background: var(--secondary-color);
            color: var(--light-text-color);
        }

    .task-details {
        flex: 1;
    }

    .task-description {
        font-size: 0.9rem;
        color: var(--text-color);
        margin-bottom: 4px;
    }

    .task-meta {
        font-size: 0.8rem;
        color: var(--light-text-color);
    }

    .task-notes {
        font-size: 0.85rem;
        color: var(--text-color);
        margin-top: 8px;
        padding: 8px;
        background: var(--secondary-color);
        border-radius: 4px;
        font-style: italic;
    }

    .no-registration {
        text-align: center;
        padding: 40px 20px;
        color: var(--light-text-color);
    }
    /* --- Table Styles --- */
    .table-container {
        overflow-x: auto;
    }

    .data-table {
        width: 100%;
        border-collapse: collapse;
        background: var(--white-color);
        border-radius: var(--border-radius);
        overflow: hidden;
        box-shadow: var(--card-shadow);
    }

        .data-table thead {
            background: var(--secondary-color);
        }

        .data-table th {
            padding: 14px 16px;
            text-align: left;
            font-weight: 600;
            font-size: 0.85rem;
            color: var(--text-color);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .data-table td {
            padding: 14px 16px;
            border-bottom: 1px solid var(--border-color);
            font-size: 0.9rem;
        }

        .data-table tbody tr:hover {
            background: rgba(112, 48, 160, 0.02);
        }

        .data-table tbody tr:last-child td {
            border-bottom: none;
        }
    /* --- Filter Styles --- */
    .filters-container {
        background: var(--white-color);
        padding: 20px;
        border-radius: var(--border-radius);
        box-shadow: var(--card-shadow);
        margin-bottom: 24px;
    }

    .filter-row {
        display: flex;
        gap: 16px;
        flex-wrap: wrap;
        align-items: flex-end;
    }

    .filter-group {
        display: flex;
        flex-direction: column;
        gap: 6px;
        min-width: 170px;
    }

        .filter-group label {
            font-size: 0.8rem;
            font-weight: 500;
            color: var(--light-text-color);
        }

    .filter-input,
    .filter-select {
        padding: 10px 12px;
        border: 1px solid var(--border-color);
        border-radius: var(--border-radius);
        font-size: 0.9rem;
    }

        .filter-input:focus,
        .filter-select:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(112, 48, 160, 0.1);
        }

    .filter-multiselect {
        min-width: 180px;
    }

        .filter-multiselect .e-multi-select-wrapper {
            border: 1px solid var(--border-color);
            border-radius: var(--border-radius);
            min-height: 40px;
        }

            .filter-multiselect .e-multi-select-wrapper:hover,
            .filter-multiselect .e-multi-select-wrapper.e-input-focus {
                border-color: var(--primary-color);
            }

        .filter-multiselect .e-checkbox-wrapper .e-frame.e-check {
            background-color: var(--primary-color);
            border-color: var(--primary-color);
        }

    .btn-clear {
        padding: 10px 16px;
        background: var(--primary-color);
        border: 1px solid var(--primary-color);
        border-radius: var(--border-radius);
        color: white;
        cursor: pointer;
        font-size: 0.9rem;
        font-weight: 500;
        transition: all 0.2s ease;
    }

        .btn-clear:hover {
            background: #5a2680;
            border-color: #5a2680;
            box-shadow: 0 2px 4px rgba(112, 48, 160, 0.3);
        }

    .loading {
        text-align: center;
        padding: 40px;
        color: var(--light-text-color);
    }

    .empty-state {
        text-align: center;
        padding: 60px 20px;
        background: var(--white-color);
        border-radius: var(--border-radius);
        box-shadow: var(--card-shadow);
    }

        .empty-state p {
            color: var(--light-text-color);
            font-size: 1rem;
        }

    .results-count {
        margin-top: 16px;
        font-size: 0.85rem;
        color: var(--light-text-color);
    }
    /* --- Quick Links Section --- */
    .quick-links {
        margin-top: 30px;
    }

        .quick-links h3 {
            font-size: 1.25rem;
            font-weight: 600;
            color: var(--text-color);
            margin-bottom: 16px;
        }

    .link-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 16px;
    }

    .quick-link-card {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 24px;
        background: var(--white-color);
        border-radius: var(--border-radius);
        box-shadow: var(--card-shadow);
        text-decoration: none;
        color: var(--text-color);
        transition: all 0.2s ease;
        gap: 12px;
    }

        .quick-link-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
            color: var(--primary-color);
        }

        .quick-link-card i {
            font-size: 2rem;
            color: var(--primary-color);
        }

        .quick-link-card span {
            font-weight: 500;
            text-align: center;
        }

    @media (max-width: 576px) {
        .radio-group {
            flex-direction: column;
            gap: 10px;
        }

        .radio-option {
            min-width: 100%;
        }

        .filter-row {
            flex-direction: column;
        }

        .filter-group {
            width: 100%;
        }
    }
    /* --- Finance Settings Section --- */
    .finance-settings {
        margin-bottom: 24px;
        padding: 16px;
        background: var(--white-color);
        border-radius: 6px;
        border: 1px solid var(--border-color);
    }

        .finance-settings h3 {
            font-size: 1rem;
            font-weight: 600;
            color: var(--text-color);
            margin-bottom: 12px;
        }
    /* --- Checkbox Group --- */
    .checkbox-group {
        display: flex;
        gap: 24px;
        margin-bottom: 16px;
        flex-wrap: wrap;
    }

    .checkbox-label {
        display: flex;
        align-items: center;
        gap: 8px;
        cursor: pointer;
        font-size: 0.9rem;
        color: var(--text-color);
    }

        .checkbox-label input[type="checkbox"] {
            width: 18px;
            height: 18px;
            accent-color: var(--primary-color);
            cursor: pointer;
        }

            .checkbox-label input[type="checkbox"]:disabled {
                cursor: not-allowed;
                opacity: 0.6;
            }
    /* --- Small Button --- */
    .btn-sm {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    /* --- Small Alerts --- */
    .small-alert {
        padding: 8px 12px;
        margin-bottom: 12px;
        font-size: 0.85rem;
    }
    /* --- Task Checkbox --- */
    .task-checkbox {
        flex-shrink: 0;
        display: flex;
        align-items: center;
    }

        .task-checkbox input[type="checkbox"] {
            width: 20px;
            height: 20px;
            accent-color: var(--primary-color);
            cursor: pointer;
        }

            .task-checkbox input[type="checkbox"]:disabled {
                cursor: wait;
                opacity: 0.6;
            }
    /* --- Task Saving Indicator --- */
    .task-saving {
        display: flex;
        align-items: center;
        margin-left: auto;
    }

    .spinner-small {
        width: 16px;
        height: 16px;
        border: 2px solid var(--secondary-color);
        border-top-color: var(--primary-color);
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
    }

    @keyframes spin {
        to {
            transform: rotate(360deg);
        }
    }
    /* --- Details Page Layout --- */
    .details-page {
        padding-top: 30px;
        background-color: var(--white-color);
        padding: 25px;
        border-radius: var(--border-radius);
        box-shadow: var(--card-shadow);
    }

        .details-page h2 {
            font-size: 22px;
            font-weight: 600;
            margin-bottom: 25px;
            color: #1f2937;
        }

        .details-page h3 {
            font-size: 20px;
            font-weight: 500;
            margin-bottom: 20px;
            color: #333;
        }

    .details-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 25px;
    }

        .details-header h2 {
            margin-bottom: 0;
            font-size: 22px;
            font-weight: 600;
            color: #1f2937;
        }

    .details-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
        align-items: start;
    }

    .info-card {
        background-color: #f9fafb;
        padding: 25px;
        border-radius: var(--border-radius);
        border: 1px solid var(--border-color);
    }

        .info-card h3 {
            font-size: 16px;
            font-weight: 600;
            margin-bottom: 20px;
            color: #374151;
            padding-bottom: 0;
            border-bottom: none;
        }

    .status-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 0;
        border-bottom: 1px solid var(--border-color);
        margin-bottom: 0;
    }

        .status-item:last-child {
            border-bottom: none;
        }

        .status-item.no-border {
            border-bottom: none;
            margin-bottom: 1rem;
        }

        .status-item label {
            display: block;
            font-weight: 500;
            color: var(--text-color);
            margin-bottom: 0;
            font-size: 0.9em;
        }

        .status-item input[type="checkbox"] {
            height: 18px;
            width: 18px;
            accent-color: var(--primary-color);
            cursor: pointer;
            border: 1px solid var(--border-color);
            border-radius: 4px;
        }

    @media (max-width: 992px) {
        .details-grid {
            grid-template-columns: 1fr;
            gap: 15px;
        }

        .info-card {
            padding: 15px;
        }
    }

    @media (max-width: 480px) {
        .details-grid {
            gap: 10px;
        }

        .info-card {
            padding: 12px;
        }
    }

    .header-actions {
        display: flex;
        align-items: center;
        gap: 15px;
    }

    /* --- ClientFeeFinance Section --- */
    .clientfeefinance-section {
        margin-top: 30px;
    }

        .clientfeefinance-section h2 {
            font-size: 22px;
            font-weight: 600;
            margin-bottom: 25px;
            color: #1f2937;
        }

    .fca-tasks-card {
        margin-top: 25px;
    }
    /* --- Tabs --- */
    .tabs-container {
        margin-top: 20px;
    }

    .tabs-header {
        display: flex;
        gap: 0;
        border-bottom: 2px solid var(--border-color);
        margin-bottom: 0;
    }

    .tab-button {
        padding: 14px 24px;
        background: transparent;
        border: none;
        border-bottom: 2px solid transparent;
        margin-bottom: -2px;
        cursor: pointer;
        font-size: 0.95rem;
        font-weight: 500;
        color: var(--light-text-color);
        transition: all 0.2s ease;
    }

        .tab-button:hover {
            color: var(--primary-color);
            background: rgba(112, 48, 160, 0.05);
        }

        .tab-button.active {
            color: var(--primary-color);
            border-bottom-color: var(--primary-color);
        }

    .tab-content {
        background: var(--white-color);
        border-radius: 0 0 var(--border-radius) var(--border-radius);
        padding: 24px;
        box-shadow: var(--card-shadow);
    }

    .tab-panel {
        display: none;
    }

        .tab-panel.active {
            display: block;
        }
    /* --- Users Section --- */
    .users-section h3 {
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--text-color);
        margin-bottom: 16px;
    }

    .users-section .status-badge {
        margin-right: 4px;
        font-size: 0.75rem;
        padding: 4px 8px;
    }
    /* --- Form Container Styles --- */
    .form-container {
        background: var(--white-color);
        border-radius: var(--border-radius);
        box-shadow: var(--card-shadow);
        padding: 24px;
        max-width: 800px;
    }

    .form-section {
        margin-bottom: 28px;
        padding-bottom: 24px;
        border-bottom: 1px solid var(--border-color);
    }

        .form-section:last-of-type {
            border-bottom: none;
            margin-bottom: 0;
            padding-bottom: 0;
        }

        .form-section h3 {
            font-size: 1rem;
            font-weight: 600;
            color: var(--primary-color);
            margin-bottom: 16px;
        }

    .form-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    @media (max-width: 576px) {
        .form-row {
            grid-template-columns: 1fr;
        }
    }

    .form-input {
        display: block;
        width: 100%;
        padding: 10px 12px;
        font-size: 0.95rem;
        line-height: 1.5;
        color: var(--text-color);
        background-color: var(--white-color);
        border: 1px solid var(--border-color);
        border-radius: var(--border-radius);
        transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    }

        .form-input:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(112, 48, 160, 0.1);
        }

    .form-static {
        padding: 10px 0;
        font-size: 0.95rem;
        color: var(--text-color);
    }
    /* --- Roles/Permissions Checkbox List --- */
    .checkbox-list {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

        .checkbox-list .checkbox-label {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            padding: 12px 16px;
            background: var(--secondary-color);
            border-radius: var(--border-radius);
            cursor: pointer;
            transition: background-color 0.2s ease;
        }

            .checkbox-list .checkbox-label:hover {
                background: #e8e9eb;
            }

            .checkbox-list .checkbox-label input[type="checkbox"] {
                width: 18px;
                height: 18px;
                margin-top: 2px;
                accent-color: var(--primary-color);
                cursor: pointer;
                flex-shrink: 0;
            }

            .checkbox-list .checkbox-label span {
                font-weight: 500;
                color: var(--text-color);
            }

            .checkbox-list .checkbox-label > div {
                display: flex;
                flex-direction: column;
                gap: 4px;
            }

        .checkbox-list .checkbox-description {
            font-weight: 400;
            color: var(--light-text-color);
            font-size: 0.85rem;
            display: block;
        }
    /* --- Permission Category --- */
    .permission-category {
        margin-bottom: 20px;
    }

        .permission-category:last-child {
            margin-bottom: 0;
        }

        .permission-category h4 {
            font-size: 0.9rem;
            font-weight: 600;
            color: var(--text-color);
            margin-bottom: 12px;
            padding-bottom: 8px;
            border-bottom: 1px solid var(--border-color);
        }

        .permission-category .checkbox-group {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .permission-category .checkbox-label {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            padding: 10px 12px;
            background: var(--secondary-color);
            border-radius: 6px;
            cursor: pointer;
        }

            .permission-category .checkbox-label:hover {
                background: #e8e9eb;
            }

            .permission-category .checkbox-label input[type="checkbox"] {
                width: 16px;
                height: 16px;
                margin-top: 2px;
                accent-color: var(--primary-color);
                flex-shrink: 0;
            }

            .permission-category .checkbox-label > div {
                display: flex;
                flex-direction: column;
                gap: 2px;
            }

            .permission-category .checkbox-label span {
                font-weight: 500;
                color: var(--text-color);
                font-size: 0.9rem;
            }

        .permission-category .checkbox-description {
            font-weight: 400;
            color: var(--light-text-color);
            font-size: 0.8rem;
            display: block;
        }
    /* --- Info Alert --- */
    .info-alert {
        background: rgba(112, 48, 160, 0.1);
        border: 1px solid var(--primary-color);
        color: var(--primary-color);
        padding: 12px;
        border-radius: 6px;
        margin-bottom: 20px;
        font-size: 0.9rem;
    }
    /* --- Role Edit Two-Column Layout --- */
    .role-edit-layout {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 24px;
        align-items: start;
        width: 100%;
    }

        .role-edit-layout > .role-details-panel,
        .role-edit-layout > .permissions-panel {
            min-width: 0;
        }

        .role-edit-layout .form-container {
            max-width: none !important;
            width: 100%;
        }

    .role-details-panel .form-container {
        height: 100%;
    }

    .permissions-panel .form-container {
        max-height: calc(100vh - 200px);
        overflow-y: auto;
    }

    .permissions-panel .form-section {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }

    @media (max-width: 992px) {
        .role-edit-layout {
            grid-template-columns: 1fr !important;
        }

        .permissions-panel .form-container {
            max-height: none;
        }
    }
    /* --- User Edit Two-Column Layout --- */
    .user-edit-layout {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 24px;
        align-items: start;
        width: 100%;
    }

        .user-edit-layout > .user-details-panel,
        .user-edit-layout > .roles-panel {
            min-width: 0;
        }

        .user-edit-layout .form-container {
            max-width: none !important;
            width: 100%;
        }

    .user-details-panel .form-container {
        height: 100%;
    }

    .roles-panel .form-container {
        max-height: calc(100vh - 200px);
        overflow-y: auto;
    }

    .roles-panel .form-section {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }
    /* Standalone checkbox (not in a list) */
    .checkbox-label.standalone {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 0;
        background: none;
        cursor: pointer;
    }

        .checkbox-label.standalone:hover {
            background: none;
        }

    @media (max-width: 992px) {
        .user-edit-layout {
            grid-template-columns: 1fr !important;
        }

        .roles-panel .form-container {
            max-height: none;
        }
    }
    /* --- Syncfusion Grid Custom Styles --- */
    /* Override Syncfusion default styles to match Lestr design */
    /* Grid container */
    .e-grid {
        font-family: 'Inter', sans-serif !important;
        border: none !important;
        box-shadow: none !important;
    }

    .sf-grid-container {
        background-color: var(--white-color);
        padding: 25px;
        border-radius: var(--border-radius);
        box-shadow: var(--card-shadow);
    }

        .sf-grid-container .section-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }

        .sf-grid-container .results-count {
            font-size: 14px;
            color: #6b7280;
        }
    /* Grid header */
    .e-grid .e-headercell {
        background: #f9fafb !important;
        border-color: #e5e7eb !important;
        font-size: 13px !important;
        font-weight: 600 !important;
        color: #374151 !important;
        padding: 16px 15px !important;
        height: auto !important;
        line-height: 1.5 !important;
    }

    .e-grid .e-headercelldiv {
        font-size: 13px !important;
        font-weight: 600 !important;
    }

    .e-grid .e-headercontent {
        border-radius: 8px 8px 0 0;
        overflow: hidden;
        border-bottom: 2px solid #e5e7eb !important;
    }
    /* Grid rows */
    .e-grid .e-rowcell {
        font-size: 14px !important;
        color: #111827 !important;
        padding: 15px !important;
        border-color: #e5e7eb !important;
        vertical-align: top !important;
    }

    .e-grid .e-row:hover .e-rowcell {
        background-color: #f9fafb !important;
    }

    .e-grid .e-altrow .e-rowcell {
        background-color: transparent !important;
    }
    /* Grid content */
    .e-grid .e-gridcontent {
        border: 1px solid #e5e7eb;
        border-top: none;
        border-radius: 0 0 8px 8px;
    }
    /* Status badges in grid */
    .e-grid .status-badge {
        display: inline-block;
        padding: 4px 10px;
        border-radius: 12px;
        font-size: 12px;
        font-weight: 500;
    }

    .e-grid .status-active {
        background: #d1fae5;
        color: #059669;
    }

    .e-grid .status-inactive {
        background: #fee2e2;
        color: #dc2626;
    }
    /* Application status colors */
    .e-grid .status-draft {
        background: #e5e7eb;
        color: #374151;
    }

    .e-grid .status-submitted,
    .e-grid .status-under-review,
    .e-grid .status-eligibility {
        background: #dbeafe;
        color: #1e40af;
    }

    .e-grid .status-pending {
        background: #fef3c7;
        color: #92400e;
    }

    .e-grid .status-approved,
    .e-grid .status-completed {
        background: #d1fae5;
        color: #059669;
    }

    .e-grid .status-failed-kyc,
    .e-grid .status-declined {
        background: #fee2e2;
        color: #dc2626;
    }

    .e-grid .status-withdrawn {
        background: #e5e7eb;
        color: #374151;
    }
    /* View button in grid */
    .e-grid .btn-view {
        background: none;
        border: 1px solid var(--primary-color);
        color: var(--primary-color);
        padding: 6px 14px;
        border-radius: 6px;
        font-size: 13px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.2s;
        text-decoration: none;
        display: inline-block;
    }

        .e-grid .btn-view:hover {
            background: var(--primary-color);
            color: white;
        }
    /* Pager styling */
    .e-grid .e-pager {
        background: #f9fafb !important;
        border: 1px solid #e5e7eb !important;
        border-top: none !important;
        border-radius: 0 0 8px 8px !important;
        padding: 10px !important;
    }

        .e-grid .e-pager .e-numericitem {
            border-radius: 6px !important;
        }

        .e-grid .e-pager .e-currentitem {
            background: var(--primary-color) !important;
            border-color: var(--primary-color) !important;
            color: white !important;
        }
    /* Filter row styling */
    .e-grid .e-filterbar .e-filterbarcell {
        background: #f9fafb !important;
        padding: 8px 15px !important;
    }

    .e-grid .e-filterbar input.e-input {
        border: 1px solid #e5e7eb !important;
        border-radius: 6px !important;
        padding: 6px 10px !important;
        font-size: 13px !important;
    }

        .e-grid .e-filterbar input.e-input:focus {
            border-color: var(--primary-color) !important;
            box-shadow: 0 0 0 3px rgba(112, 48, 160, 0.1) !important;
        }
    /* Sort icons */
    .e-grid .e-sortfilterdiv .e-sortfilter {
        color: var(--primary-color) !important;
    }
    /* Hide grid border lines */
    .e-grid .e-gridheader {
        border: 1px solid #e5e7eb !important;
        border-bottom: none !important;
    }
    /* Scrollbar styling for grid */
    .e-grid .e-content::-webkit-scrollbar {
        width: 8px;
        height: 8px;
    }

    .e-grid .e-content::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 4px;
    }

    .e-grid .e-content::-webkit-scrollbar-thumb {
        background: var(--primary-color);
        border-radius: 4px;
    }

        .e-grid .e-content::-webkit-scrollbar-thumb:hover {
            background: #5a2480;
        }

/* --- Offices Section --- */
.offices-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.offices-header h3 {
    margin-bottom: 0;
}

.no-offices-message {
    color: var(--light-text-color);
    font-style: italic;
    text-align: center;
    padding: 30px 20px;
}

.office-entry {
    background: var(--white-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 15px;
}

.office-entry:last-child {
    margin-bottom: 0;
}

.office-entry.primary-office {
    border-color: var(--primary-color);
    border-width: 2px;
}

.office-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.office-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.primary-badge {
    background: var(--primary-color);
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.office-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.office-actions .btn-link {
    background: none;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.office-actions .btn-link:hover {
    background: var(--primary-color);
    color: white;
}

.office-details {
    color: var(--text-color);
}

.office-phone {
    margin-bottom: 8px;
    font-weight: 500;
}

.office-address {
    color: var(--light-text-color);
    line-height: 1.5;
    margin: 0;
}

.btn-remove {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.btn-remove:hover {
    background: rgba(220, 53, 69, 0.1);
}

/* --- Office Edit Modal --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.office-modal {
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--light-text-color);
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-color);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    background: var(--secondary-color);
}

.office-modal .checkbox-group {
    margin-bottom: 16px;
}

.office-modal .checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500 !important;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.input-with-button {
    display: flex;
    gap: 10px;
}

.input-with-button input {
    flex: 1;
}

.address-results {
    margin: 16px 0;
}

.address-results label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-color);
}

.address-results select {
    width: 100%;
}

.search-error {
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 8px;
}

.help-text {
    font-size: 0.85rem;
    color: var(--light-text-color);
    margin-bottom: 8px;
}

.spinner-small {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95em;
    font-family: inherit;
    color: var(--text-color);
    background-color: #ffffff;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(112, 48, 160, 0.1);
}

.form-control:disabled {
    background-color: #f8f8f8;
    cursor: not-allowed;
}

.link-button {
    background: none;
    border: none;
    color: var(--primary-color);
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    font-size: 0.9rem;
    margin-top: 12px;
}

.link-button:hover {
    color: #5a2480;
}
