
     * {
         margin: 0;
         padding: 0;
         box-sizing: border-box;
     }

    body {
        font-family: "Karla", sans-serif;
        background: linear-gradient(135deg, #faf8f5 0%, #f5f1eb 100%);
        min-height: 100vh;
        color: #1f2937;
        line-height: 1.6;
    }

body {
    opacity: 0;
    transition: opacity .3s ease;
}

    body.ready {
        opacity: 1;
    }
    /* Flip all icons inside buttons when RTL */
    body.rtl .btn svg {
        transform: scaleX(-1);
    }


.address-row {
    display: grid;
    gap: 16px;
}

    .address-row .form-field {
        margin-bottom: 0;
    }

.address-row-2 {
    grid-template-columns: 1fr 1fr;
}

.address-row-3 {
    grid-template-columns: 2fr 0.8fr 0.8fr;
}

@media (max-width: 768px) {
    .address-row-2,
    .address-row-3 {
        grid-template-columns: 1fr;
    }
}

.validated-address-card {
    margin-top: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #e9f8ef;
    border: 1px solid #a9dfbf;
    color: #145a32;
    font-size: 14px;
    line-height: 1.5;
}

    .validated-address-card strong {
        display: block;
        margin-bottom: 4px;
    }

    .validated-address-card.invalid {
        background: #fff8e5;
        border-color: #f3d27a;
        color: #7a5200;
    }


    /* Load Arabic font only in RTL mode */
    body.rtl {
        font-family: 'Noto Kufi Arabic', sans-serif;
        direction: rtl;
    }

/* Load font file only when needed */
@font-face {
    font-family: 'Noto Kufi Arabic';
    src: url('../assets/webfonts/Arabic Font/Arabic Font/static/NotoKufiArabic-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

.response-box {
    padding: 15px;
    margin-bottom: 20px;
    margin-top: 20px;
    border-radius: 8px;
    font-size: 15px;
}

.response-success {
    background-color: #d4edda;
    color: #155724;
}

.response-error {
    background-color: #f8d7da;
    color: #721c24;
}

.autocomplete-wrapper {
    position: relative;
    width: 100%;
}

/* Dropdown */
.autocomplete-dropdown {
    position: absolute;
    top: 100%; /* ensures it shows BELOW the input */
    left: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    width: 100%; /* matches input width */
    z-index: 9999;
    margin-top: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
    max-height: 220px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Smaller, nicer items */
.autocomplete-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    .autocomplete-item:hover {
        background: #f0f0f0;
    }

.agreement-link {
    color: #2563eb;
    text-decoration: underline;
    cursor: pointer;
}

    .agreement-link:hover {
        color: #1d4ed8;
    }


/* Utility */
.hidden {
    display: none !important;
}


.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.3); /* 30% transparent */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.25s ease;
}

    .loader-overlay.show {
        opacity: 1;
    }

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 6px solid #ddd;
    border-top: 6px solid #007bff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

.hidden {
    display: none !important;
}



     .container {
         max-width: 900px;
         margin: 0 auto;
         padding: 3rem 1.5rem;
     }

     /* Language Selector */
     .language-selector {
         position: fixed;
         top: 1rem;
         right: 1rem;
         z-index: 1000;
     }

     .language-select {
         padding: 0.5rem 1rem;
         border: 2px solid #c9a961;
         border-radius: 0.5rem;
         background: white;
         color: #1f2937;
         font-size: 0.875rem;
         font-weight: 500;
         cursor: pointer;
         box-shadow: 0 4px 6px rgba(0,0,0,0.1);
         transition: all 0.2s;
     }

         .language-select:hover {
             border-color: #b89951;
             box-shadow: 0 6px 8px rgba(0,0,0,0.15);
         }

     /* Header */
     .header {
         background: #1d243a;
         padding: 2rem 1.5rem;
         border-radius: 1rem;
         text-align: center;
         margin-bottom: 3rem;
         box-shadow: 0 10px 25px rgba(0,0,0,0.1);
     }

     .logo-container {
         display: flex;
         align-items: center;
         justify-content: center;
         margin-bottom: 1.5rem;
     }

     .logo {
         width: 3rem;
         height: 3rem;
         background: #c9a961;
         border-radius: 50%;
         display: flex;
         align-items: center;
         justify-content: center;
         font-size: 1.5rem;
         font-weight: bold;
         color: white;
         box-shadow: 0 4px 6px rgba(0,0,0,0.1);
         flex-shrink: 0;
     }

.logo-text {
    margin-left: 0.75rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: #c9a961;
    height: 65px;
    max-width: 90%;
}

     body.rtl .logo-text {
         margin-left: 0;
         margin-right: 0.75rem;
       
     }

     .header h1 {
         font-size: 2.25rem;
         color: white;
         margin-bottom: 1rem;
         font-weight: 700;
     }

     .header p {
         color: #d1d5db;
         font-size: 1.125rem;
     }

     /* Progress Steps */
     .progress-container {
         display: flex;
         justify-content: space-between;
         align-items: center;
         margin-bottom: 3rem;
         max-width: 700px;
         margin-left: auto;
         margin-right: auto;
     }

     .progress-step {
         flex: 1;
         display: flex;
         align-items: center;
     }

     .step-content {
         flex: 1;
         display: flex;
         flex-direction: column;
         align-items: center;
     }

     .step-circle {
         width: 2.5rem;
         height: 2.5rem;
         border-radius: 50%;
         display: flex;
         align-items: center;
         justify-content: center;
         font-weight: bold;
         transition: all 0.3s;
         box-shadow: 0 2px 4px rgba(0,0,0,0.1);
     }

         .step-circle.active {
             background: #c9a961;
             color: white;
         }

         .step-circle.completed {
             background: #c9a961;
             color: white;
         }

         .step-circle.inactive {
             background: white;
             color: #9ca3af;
             border: 2px solid #d1d5db;
         }

     .step-label {
         font-size: 0.75rem;
         margin-top: 0.5rem;
         text-align: center;
         color: #4b5563;
         font-weight: 500;
     }

     .step-line {
         height: 4px;
         flex: 1;
         margin: 0 0.5rem;
         transition: all 0.3s;
     }

         .step-line.completed {
             background: #c9a961;
         }

         .step-line.incomplete {
             background: #d1d5db;
         }

     /* Card */
     .card {
         background: white;
         border-radius: 0.75rem;
         padding: 2rem;
         box-shadow: 0 10px 25px rgba(0,0,0,0.08);
         border: 1px solid #e5e7eb;
     }

     /* Welcome Step */
     .welcome-steps {
         display: grid;
         gap: 1.5rem;
     }

     .welcome-step-card {
         display: flex;
         align-items: flex-start;
         padding: 1.5rem;
         background: #1d243a;
         border-radius: 0.75rem;
         box-shadow: 0 4px 6px rgba(0,0,0,0.1);
     }

     .step-number {
         width: 3rem;
         height: 3rem;
         background: #c9a961;
         border-radius: 50%;
         display: flex;
         align-items: center;
         justify-content: center;
         font-size: 1.5rem;
         font-weight: bold;
         color: white;
         flex-shrink: 0;
         box-shadow: 0 2px 4px rgba(0,0,0,0.2);
     }

     .step-details {
         margin-left: 1rem;
         flex: 1;
     }

     body.rtl .step-details {
         margin-left: 0;
         margin-right: 1rem;
     }

     .step-details h3 {
         font-size: 1.125rem;
         color: #c9a961;
         margin-bottom: 0.5rem;
         font-weight: 600;
     }

     .step-details p {
         color: #d1d5db;
         font-size: 0.875rem;
     }

     /* Form Section */
     .section-header {
         background: #1d243a;
         padding: 1rem 1.5rem;
         border-radius: 0.75rem;
         margin: -2rem -2rem 2rem -2rem;
     }

         .section-header h2 {
             font-size: 1.5rem;
             color: #c9a961;
             font-weight: 700;
         }

     .form-grid {
         display: grid;
         grid-template-columns: repeat(2, 1fr);
         gap: 1.5rem;
     }

     .form-field {
         display: flex;
         flex-direction: column;
         gap: 0.5rem;
     }

         .form-field.full-width {
             grid-column: span 2;
         }

     .form-label {
         color: #374151;
         font-weight: 500;
         font-size: 0.875rem;
     }

     .form-input {
         padding: 0.75rem 1rem;
         border: 1px solid #d1d5db;
         border-radius: 0.5rem;
         font-size: 0.875rem;
         background: #f9fafb;
         color: #1f2937;
         transition: all 0.2s;
     }

         .form-input:focus {
             outline: none;
             border-color: #c9a961;
             box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.1);
         }

         .form-input::placeholder {
             color: #9ca3af;
         }

     .section-divider {
         margin: 2rem 0;
     }

     /* Agreements */
     .agreements-list {
         display: flex;
         flex-direction: column;
         gap: 1.5rem;
     }

     .agreement-item {
         display: flex;
         align-items: flex-start;
         gap: 1rem;
     }

     .checkbox {
         width: 1.25rem;
         height: 1.25rem;
         border: 2px solid #d1d5db;
         border-radius: 0.25rem;
         cursor: pointer;
         flex-shrink: 0;
         margin-top: 0.125rem;
     }

         .checkbox:checked {
             background: #c9a961;
             border-color: #c9a961;
         }

     .agreement-text {
         color: #4b5563;
         font-size: 0.875rem;
         line-height: 1.5;
     }

     /* Thank You */
     .thank-you-content {
         text-align: center;
         padding: 2rem 0;
     }

     .success-icon {
         width: 5rem;
         height: 5rem;
         background: #c9a961;
         border-radius: 50%;
         display: flex;
         align-items: center;
         justify-content: center;
         margin: 0 auto 2rem;
         box-shadow: 0 10px 25px rgba(201, 169, 97, 0.3);
     }

         .success-icon svg {
             width: 3rem;
             height: 3rem;
             stroke: white;
         }

     .thank-you-content h2 {
         font-size: 2rem;
         color: #1d243a;
         margin-bottom: 1rem;
         font-weight: 700;
     }

     .thank-you-content p {
         color: #4b5563;
         font-size: 1rem;
         margin-bottom: 1rem;
     }

     .contact-info {
         background: #fef3c7;
         padding: 1rem;
         border-radius: 0.5rem;
         color: #92400e;
         font-size: 0.875rem;
         margin-top: 2rem;
     }

     /* Buttons */
     .button-group {
         display: flex;
         justify-content: space-between;
         margin-top: 2rem;
         gap: 1rem;
     }








     .btn {
         padding: 0.75rem 2rem;
         border: none;
         border-radius: 0.5rem;
         font-size: 0.875rem;
         font-weight: 600;
         cursor: pointer;
         transition: all 0.2s;
         display: flex;
         align-items: center;
         gap: 0.5rem;
     }

     .btn-primary {
         background: #c9a961;
         color: white;
         box-shadow: 0 4px 6px rgba(201, 169, 97, 0.3);
     }

         .btn-primary:hover {
             background: #b89951;
             box-shadow: 0 6px 8px rgba(201, 169, 97, 0.4);
         }

     .btn-secondary {
         background: white;
         color: #4b5563;
         border: 1px solid #d1d5db;
     }

         .btn-secondary:hover {
             background: #f9fafb;
             border-color: #9ca3af;
         }

     .hidden {
         display: none !important;
     }

     /* Responsive */
     @media (max-width: 768px) {
         .form-grid

     {
         grid-template-columns: 1fr;
     }

     .form-field.full-width {
         grid-column: span 1;
     }

     .progress-container {
         flex-direction: column;
         gap: 1rem;
     }

     .step-line {
         display: none;
     }

     .header h1 {
         font-size: 1.75rem;
     }

     .button-group {
         flex-direction: column-reverse;
     }

     }

/* Reworked onboarding additions */
.form-hint {
    color: #6b7280;
    margin-top: 0.35rem;
    font-size: 0.95rem;
}

.verification-panel {
    background: #fafafa;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.verification-email {
    font-weight: 700;
    color: #1d243a;
    margin-bottom: 1rem;
}

.code-input {
    letter-spacing: 0.35rem;
    font-size: 1.35rem;
    text-align: center;
    max-width: 220px;
}

.button-row-right {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.response-info {
    background-color: #e7f1ff;
    color: #084298;
}

.autocomplete-empty {
    color: #6b7280;
    cursor: default;
}

.autocomplete-empty:hover {
    background: white;
}

body.rtl .code-input {
    direction: ltr;
}

@media (max-width: 640px) {
    .button-row-right {
        width: 100%;
        justify-content: stretch;
    }

    .button-row-right .btn {
        flex: 1;
    }
}

/* Reworked onboarding flow */
.single-right {
    justify-content: flex-end;
}

.compact-overview {
    margin-bottom: 2rem;
}

.form-hint {
    margin-top: 0.35rem;
    color: #6b7280;
    font-size: 0.92rem;
}

.form-input[type="hidden"] {
    display: none;
}

.selected-company-card {
    margin-top: 1.25rem;
    padding: 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.75rem;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.selected-company-title {
    font-weight: 700;
    color: #111827;
    font-size: 1.05rem;
}

.selected-company-meta,
.selected-company-address {
    color: #4b5563;
    font-size: 0.92rem;
    margin-top: 0.2rem;
}

.compact-btn {
    white-space: nowrap;
    padding: 0.65rem 1rem;
}

.extra-info-section {
    margin-top: 1.5rem;
    animation: revealSection 0.22s ease-out;
}

@keyframes revealSection {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header-small {
    margin-bottom: 1rem;
}

.review-overview {
    border: 1px solid #e5e7eb;
    border-radius: 0.85rem;
    overflow: hidden;
    background: #fff;
    margin-bottom: 1.5rem;
}

.review-row {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.review-row:last-child {
    border-bottom: 0;
}

.review-label {
    color: #6b7280;
    font-weight: 600;
}

.review-value {
    color: #111827;
    font-weight: 500;
    overflow-wrap: anywhere;
}

.verification-panel {
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 0.85rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.verify-actions {
    margin-top: 1rem;
}

.response-info {
    background-color: #dbeafe;
    color: #1e3a8a;
}

body.rtl .selected-company-card {
    direction: rtl;
}

body.rtl .review-row {
    direction: rtl;
}

@media (max-width: 720px) {
    .selected-company-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .review-row {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .compact-btn {
        width: 100%;
    }
}

/* Address rows override */
.form-grid > .address-row {
    display: grid;
    width: 100%;
    gap: 1.5rem;
    align-items: end;
}

.form-grid > .address-row-2 {
    grid-template-columns: 1fr 1fr;
}

.form-grid > .address-row-3 {
    grid-template-columns: 2fr 0.8fr 0.8fr;
}

.form-grid > .address-row > .form-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0;
    min-width: 0;
}

    .form-grid > .address-row > .form-field.full-width {
        grid-column: auto;
    }

@media (max-width: 768px) {
    .form-grid > .address-row-2,
    .form-grid > .address-row-3 {
        grid-template-columns: 1fr;
    }
}

.btn {
    text-decoration: none;
}

    .btn:hover {
        text-decoration: none;
    }