:root {
    --kt-primary: #ffbf3f;
    --kt-primary-light: #fff8eb;
    --kt-primary-active: #022e48;
    --kt-success: #17c653;
    --kt-success-light: #dfffea;
    --kt-warning: #f6c000;
    --kt-warning-light: #fff8dd;
    --kt-danger: #f8285a;
    --kt-danger-light: #ffeef3;
    --kt-info: #7239ea;
    --kt-info-light: #d7c7f9;
    --kt-gray-100: #f9f9f9;
    --kt-gray-200: #f1f1f4;
    --kt-gray-300: #dbdfe9;
    --kt-gray-400: #b5b5c3;
    --kt-gray-500: #99a1b7;
    --kt-gray-600: #78829d;
    --kt-gray-700: #4b5675;
    --kt-gray-800: #252f4a;
    --kt-gray-900: #071437;
    --kt-body-bg: #f5f8fa;
    --kt-card-bg: #ffffff;
    --kt-white: #ffffff;
    --kt-card-border: #f1f1f4;
    --kt-card-shadow: 0px 3px 4px 0px rgba(0, 0, 0, 0.03);
    --kt-radius: 0.625rem;
}

/* ── Page ─────────────────────────── */
.tenant-registration-page footer {
    margin-top: 0;
}

.kt-page {
    background-color: var(--kt-body-bg);
    padding-bottom: 5rem;
}

.kt-page-header {
    padding: 2rem 0 0.5rem;
}

.kt-page-title {
    font-size: 1.5rem;
    color: var(--kt-gray-900);
    margin-bottom: 0.15rem;
}

.kt-page-desc {
    font-size: 0.975rem;
    color: var(--kt-gray-500);
}

/* ── Card ─────────────────────────── */
.kt-card {
    background: var(--kt-card-bg);
    border: 1px solid var(--kt-card-border);
    border-radius: var(--kt-radius);
    box-shadow: var(--kt-card-shadow);
}

.kt-card-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--kt-card-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.kt-card-header-center {
    justify-content: center;
    flex-direction: column;
    text-align: center;
}

.kt-card-title {
    font-size: 1.075rem;
    color: var(--kt-gray-900);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.kt-card-title-center {
    justify-content: center;
}

.kt-card-title .kt-icon-wrap {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--kt-primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.kt-card-title .kt-icon-wrap svg {
    width: 18px;
    height: 18px;
    color: var(--kt-primary);
}

.kt-card-toolbar .kt-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.85rem;
    border-radius: 6px;
    font-size: 0.75rem;
    background: var(--kt-primary-light);
    color: var(--kt-primary);
}

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

.kt-card-footer {
    padding: 1.25rem 2rem;
    border-top: 1px solid var(--kt-card-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

/* ── Separator ────────────────────── */
.kt-separator {
    border: 0;
    border-top: 1px dashed var(--kt-gray-600);
    margin: 1.75rem 0;
}

.app-mobile-view .kt-separator {
     border-top: 1px dashed var(--kt-gray-300);
}

/* ── Section Title ────────────────── */
.kt-section-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--kt-gray-500);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.kt-section-title svg {
    width: 16px;
    height: 16px;
    color: var(--kt-gray-400);
}

/* ── Step Indicator ───────────────── */
.kt-step-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--kt-gray-400);
    margin-bottom: 0.4rem;
}

.kt-step-title {
    font-size: 0.95rem;
    color: var(--kt-gray-800);
    margin-bottom: 1.25rem;
}

.kt-step-title .required,
.kt-label .required {
    color: var(--kt-danger);
    margin-left: 2px;
}

/* ── Form Controls ────────────────── */
.kt-label {
    display: block;
    font-size: 0.875rem;
    color: var(--kt-gray-800);
    margin-bottom: 0.4rem;
}

.kt-input {
    width: 100%;
    padding: 0.65rem 1rem;
    font-size: 0.875rem;
    color: var(--kt-gray-700);
    background: var(--kt-gray-100);
    border: 1px solid var(--kt-gray-400);
    border-radius: var(--kt-radius);
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.kt-input::placeholder {
    color: var(--kt-gray-400);
}

.kt-input:focus {
    background: #fff;
    border-color: var(--kt-primary);
    box-shadow: 0 0 0 0.2rem rgba(255, 191, 63, 0.15);
}

.kt-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2399a1b7' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    cursor: pointer;
}

/* ── Row Grid ─────────────────────── */
.kt-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.kt-mb {
    margin-bottom: 1.25rem;
}

/* ── Document Type Tabs ───────────── */
.kt-doc-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.kt-doc-tab {
    flex: 1;
    padding: 0.7rem 0.75rem;
    border: 1.5px solid var(--kt-gray-400);
    border-radius: var(--kt-radius);
    text-align: center;
    font-size: 0.85rem;
    color: var(--kt-gray-600);
    cursor: pointer;
    background: var(--kt-card-bg);
    transition: all 0.15s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.kt-doc-tab svg {
    width: 16px;
    height: 16px;
}

.kt-doc-tab:hover:not(.active) {
    border-color: var(--kt-primary);
    color: var(--kt-primary);
    background: var(--kt-primary-light);
}

.kt-doc-tab.active {
    border-color: var(--kt-primary);
    background: var(--kt-primary);
    color: #fff;
}

/* ── Conditional Section ──────────── */
.kt-conditional-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--kt-primary-light);
    color: var(--kt-primary);
    font-size: 0.75rem;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    margin-bottom: 1.25rem;
}

.kt-conditional-badge .dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--kt-primary);
}

/* ── File Upload ──────────────────── */
.kt-upload-zone {
    border: 1.5px dashed var(--kt-gray-300);
    border-radius: var(--kt-radius);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    position: relative;
    background: var(--kt-gray-100);
    transition: all 0.15s ease;
}

.kt-upload-zone:hover,
.kt-upload-zone.dragover {
    border-color: var(--kt-primary);
    background: var(--kt-primary-light);
}

.kt-upload-zone.file-selected {
    border-color: var(--kt-success);
    border-style: solid;
    background: var(--kt-success-light);
}

.kt-upload-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.kt-upload-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--kt-primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s ease;
}

.file-selected .kt-upload-icon {
    background: var(--kt-success-light);
}

.kt-upload-icon svg {
    width: 22px;
    height: 22px;
    color: var(--kt-primary);
    transition: color 0.15s ease;
}

.file-selected .kt-upload-icon svg {
    color: var(--kt-success);
}

.kt-upload-text {
    font-size: 0.875rem;
    color: var(--kt-gray-800);
}

.kt-upload-hint {
    font-size: 0.8rem;
    color: var(--kt-gray-500);
    margin-top: 0.1rem;
}

/* ── Buttons ──────────────────────── */
.kt-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.75rem;
    font-size: 0.875rem;
    color: #fff;
    background: var(--kt-primary);
    border: none;
    border-radius: var(--kt-radius);
    cursor: pointer;
    transition: background 0.15s ease;
    text-decoration: none;
}

.kt-btn-primary:hover {
    background: var(--kt-primary-active);
    color: #fff;
}

.kt-btn-primary svg {
    width: 16px;
    height: 16px;
}

.kt-btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.5rem;
    font-size: 0.85rem;
    color: var(--kt-gray-600);
    background: transparent;
    border: 1.5px solid var(--kt-gray-300);
    border-radius: var(--kt-radius);
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
}

.kt-btn-outline:hover {
    border-color: var(--kt-primary);
    color: var(--kt-primary);
    background: var(--kt-primary-light);
}

.kt-btn-link {
    background: none;
    border: none;
    font-size: 0.875rem;
    color: var(--kt-gray-500);
    cursor: pointer;
    padding: 0;
    transition: color 0.15s ease;
    text-decoration: none;
}

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

.kt-btn-link svg,
.kt-btn-outline svg {
    vertical-align: -2px;
    margin-right: 2px;
}

/* ── Divider Label ────────────────── */
.kt-divider-label {
    position: relative;
    text-align: center;
    margin: 2rem 0 1.5rem;
}

.kt-divider-label::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--kt-gray-300);
}

.kt-divider-label span {
    position: relative;
    background: var(--kt-body-bg);
    padding: 0 1rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--kt-gray-400);
}

/* ── Status Intro / Desc ──────────── */
.kt-status-intro {
    color: var(--kt-gray-500);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.kt-status-desc {
    font-size: 0.85rem;
    color: var(--kt-gray-500);
    margin-bottom: 1.25rem;
}

/* ── Status Badges ────────────────── */
.kt-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3em 0.8em;
    border-radius: 6px;
    font-size: 0.78rem;
}

.kt-badge-pending {
    background: var(--kt-warning-light);
    color: #b28200;
}

.kt-badge-approved {
    background: var(--kt-success-light);
    color: #0d7b38;
}

.kt-badge-rejected {
    background: var(--kt-danger-light);
    color: #c0123c;
}

.kt-badge-review {
    background: var(--kt-info-light);
    color: var(--kt-info);
}

.kt-badge-unknown {
    background: var(--kt-gray-200);
    color: var(--kt-gray-600);
}

/* ── Result Items ─────────────────── */
.kt-result-item {
    border: 1px solid var(--kt-gray-200);
    border-radius: var(--kt-radius);
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    background: var(--kt-gray-100);
    transition: border-color 0.15s ease;
}

.kt-result-building {
    font-size: 0.75rem;
    color: var(--kt-info);
    background: var(--kt-info-light);
    padding: 0.15em 0.5em;
    border-radius: 4px;
    display: inline-block;
    margin-top: 0.25rem;
}

.kt-result-item:hover {
    border-color: var(--kt-gray-300);
}

.kt-result-location {
    color: var(--kt-gray-900);
}

.kt-result-date {
    font-size: 0.82rem;
    color: var(--kt-gray-500);
}

.kt-result-reason {
    color: var(--kt-danger);
    font-size: 0.82rem;
    margin-top: 0.5rem;
}

.kt-result-subtitle {
    font-size: 0.82rem;
    color: var(--kt-gray-500);
    margin: 0;
}

.kt-contact-bar {
    text-align: center;
    padding: 1rem;
    border-radius: var(--kt-radius);
    background: var(--kt-gray-100);
    border: 1px solid var(--kt-gray-200);
    font-size: 0.85rem;
    color: var(--kt-gray-600);
    margin-top: 1rem;
}

.kt-contact-bar a {
    color: var(--kt-primary);
    text-decoration: none;
}

.kt-contact-bar a:hover {
    text-decoration: underline;
}

/* ── Alerts ────────────────────────── */
.kt-alert {
    padding: 0.85rem 1rem;
    border-radius: var(--kt-radius);
    font-size: 0.875rem;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}

.kt-alert-success {
    background: var(--kt-success-light);
    color: #0d7b38;
}

.kt-alert-danger {
    background: var(--kt-danger-light);
    color: #c0123c;
}

.kt-alert svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ── Bootstrap Select Override ─────── */
.bootstrap-select .dropdown-toggle {
    background: var(--kt-gray-100) !important;
    border: 1px solid var(--kt-gray-300) !important;
    border-radius: var(--kt-radius) !important;
    padding: 0.65rem 1rem !important;
    font-size: 0.875rem !important;
    color: var(--kt-gray-700) !important;
    box-shadow: none !important;
}

.bootstrap-select .dropdown-toggle:focus {
    background: #fff !important;
    border-color: var(--kt-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 191, 63, 0.15) !important;
}

/* ── Hidden Utility ───────────────── */
.kt-hidden {
    display: none !important;
}


/* ── Info Popup ───────────────────── */
.kt-info-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--kt-gray-200);
    color: var(--kt-gray-500);
    cursor: pointer;
    margin-left: 4px;
    vertical-align: middle;
    transition: all 0.15s ease;
}

.kt-info-trigger:hover {
    background: var(--kt-primary-light);
    color: var(--kt-primary);
}

.kt-info-trigger svg {
    width: 12px;
    height: 12px;
}

.kt-info-overlay {
    position: fixed;
    inset: 0;
    background: rgba(7, 20, 55, 0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.kt-info-popup {
    background: var(--kt-card-bg);
    border-radius: var(--kt-radius);
    max-width: 740px;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.kt-info-popup-header {
    padding: 1rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--kt-card-border);
}

.kt-info-popup-title {
    font-size: 1.15rem;
    color: var(--kt-gray-800);
    margin: 0;
}
.kt-info-popup-body{
    padding: 1rem;
}

.kt-info-popup-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--kt-gray-400);
    padding: 0;
    transition: color 0.15s ease;
}

.kt-info-popup-close:hover {
    color: var(--kt-gray-900);
}

.kt-info-popup-close svg {
    width: 20px;
    height: 20px;
}

.kt-info-popup img {
    width: 100%;
    display: block;
}
.kt-info-overlay:not(.kt-hidden) {
    display: flex !important;
}

/* ── Responsive ───────────────────── */
@media (max-width: 576px) {
    .kt-row {
        grid-template-columns: 1fr;
    }

    .kt-card-body {
        padding: 1.25rem;
    }

    .kt-card-header,
    .kt-card-footer {
        padding: 1rem 1.25rem;
    }

    .kt-card-footer {
        flex-direction: column-reverse;
        gap: 0.75rem;
    }

    .kt-card-footer .kt-btn-primary,
    .kt-card-footer .kt-btn-link {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .kt-doc-tabs {
        flex-direction: column;
    }

    .kt-conditional {
        padding: 1rem;
    }
}

/* ══════════════════════════════════════════════════════ */
/* Mobile App UI Overrides (.app-mobile-view)             */
/* ══════════════════════════════════════════════════════ */

/* Comprehensive Mobile Font Size Overrides */

.app-mobile-view .kt-conditional {
        padding: 1rem 0;
    }
.app-mobile-view, .app-mobile-view p, .app-mobile-view span, .app-mobile-view div {
    font-size: 16px;
        color: var(--kt-gray-700);
        font-weight: 600;
}
.app-mobile-view .h1-page-heading {
    font-size: 24px !important;
}
.app-mobile-view .kt-page-desc {
    font-size: 16px !important;
}
.app-mobile-view .kt-card-title {
    font-size: 20px !important;
}
.app-mobile-view .kt-label, .app-mobile-view .kt-divider-label span, .app-mobile-view .kt-conditional-badge {
    font-size: 16px !important;
}
/* 16px minimum font size is strictly required to prevent iOS zoom on input focus */
.app-mobile-view .kt-input, .app-mobile-view .bootstrap-select > .dropdown-toggle, .app-mobile-view .building-select, .app-mobile-view input, .app-mobile-view select, .app-mobile-view textarea {
    font-size: 16px !important; 
}
.app-mobile-view .kt-input::placeholder {
    font-size: 15px !important;
}
.app-mobile-view .kt-btn-primary, .app-mobile-view .kt-btn-outline, .app-mobile-view .kt-btn-link {
    font-size: 16px !important;
}
.app-mobile-view .kt-doc-tab {
    font-size: 16px !important;
}
.app-mobile-view .kt-section-title {
    font-size: 18px !important;
}
.app-mobile-view .kt-upload-text, .app-mobile-view .kt-upload-hint {
    font-size: 16px !important;
}
.app-mobile-view .kt-card-toolbar .kt-badge {
    font-size: 14px !important;
}
.app-mobile-view .kt-alert, .app-mobile-view .kt-alert div, .app-mobile-view .kt-alert li, .app-mobile-view .required {
    font-size: 16px !important;
}

/* Consistent Padding, Input Widths, and Spacing */
.app-mobile-view .container {
    padding: 0 15px !important;
}
.app-mobile-view .kt-card-body {
    padding: 20px 15px !important;
}
.app-mobile-view .kt-card-header, .app-mobile-view .kt-card-footer {
    padding: 15px !important;
}

/* Force 100% width on inputs to prevent uneven shrinking, especially for iOS date inputs */
.app-mobile-view .kt-input, .app-mobile-view .bootstrap-select > .dropdown-toggle, .app-mobile-view .building-select, .app-mobile-view input[type="date"] {
    display: block !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

/* Stack side-by-side elements vertically with equal 15px gaps */
.app-mobile-view .kt-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 15px !important;
    margin-bottom: 0 !important;
    width: 100% !important;
}
.app-mobile-view .kt-row > div {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 100% !important;
    margin-bottom: 0 !important;
}

/* Standardize vertical spacing to exactly 15px between elements */
.app-mobile-view .kt-mb {
    margin-bottom: 15px !important;
}
.app-mobile-view .kt-doc-tabs {
    display: flex;
    flex-direction: column;
    gap: 15px !important;
    margin-bottom: 15px !important;
}
.app-mobile-view .kt-section-title {
    padding: 15px 0 10px !important;
    margin-bottom: 0 !important;
}
.app-mobile-view .kt-separator {
    margin: 20px 0 !important;
}