/* ====== FORCE FONT AWESOME TO RENDER ====== */
#profile-page .fa,
#profile-page [class^="fa-"],
#profile-page [class*=" fa-"] {
    display: inline-block !important;
    font-family: "FontAwesome" !important;
    font-style: normal !important;
    font-weight: normal !important;
    line-height: 1 !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

#profile-page .fa::before {
    font-family: "FontAwesome" !important;
}

/* ====== ROOT VARIABLES ====== */
:root {
    --primary: #be995b;
    --primary-dark: #a8854a;
    --bg-dark: #4f432d;
    --bg-light: #3a3220;
    --text: #b29359;
    --border-color: #5a4e35;
}

body {
    background-color: var(--primary);
}

/* ── Filter Card ── */
.filter-card {
    border-radius: 12px;
    padding: 9px 3px;
    margin-bottom: 0;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-btn {
    padding: 6px 14px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: var(--bg-light);
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all .25s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.filter-btn:hover,
.filter-btn.active {
    background: #66263e;
    color: #f7f7f7;
    border-color: #fffefd;
}

/* ── Page Header ── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 60px;
    margin: 20px 0;
    padding: 0 15px;
    border: none !important;
}

.page-header h1 {
    color: #000000;
    font-size: 32px;
    font-weight: 700;
    margin: 0;
    text-align: center;
    width: 100%;
}

.btn-back {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    background: #4f432d;
    color: #b29359;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    text-decoration: none;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-back:hover {
    color: #b29359;
    text-decoration: none;
    background: #5a4e35;
}

/* ── Cards ── */
.profile-card {
    background: var(--bg-dark);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    color: var(--text);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
}

.profile-card h3 {
    color: var(--primary);
    font-weight: 800;
    font-size: 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

/* ── Profile image container ── */
.profile-image-container {
    text-align: center;
    margin-bottom: 15px;
    position: relative;
}

.profile-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
    margin-bottom: 10px;
}

.profile-image-container .upload-btn {
    position: absolute;
    bottom: 5px;
    right: calc(50% - 60px);
    background: var(--primary);
    color: var(--bg-dark);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.profile-image-container .upload-btn:hover {
    background: var(--primary-dark);
}

/* ── User info text ── */
.user-info-text {
    color: var(--text);
    margin-bottom: 8px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-info-text i {
    width: 18px;
    text-align: center;
}

.custid-badge {
    background: rgba(178, 147, 89, 0.2);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 10px;
}

.badge-verified {
    background: #d4edda;
    color: #155724;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-unverified {
    background: #f8d7da;
    color: #721c24;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* ── Form elements ── */
.form-label {
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    display: block;
}

.form-group {
    margin-bottom: 15px;
}

.input-field input,
.input-field select,
.input-field textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-light);
    color: var(--text);
    font-size: 14px;
    transition: border-color 0.2s;
}

.input-field input:focus,
.input-field select:focus,
.input-field textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(190, 153, 91, 0.25);
}

.input-field input[readonly],
.input-field input[disabled],
.input-field select[disabled] {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.input-field input::placeholder {
    color: var(--text);
    opacity: 0.5;
}

.section-separator {
    color: var(--primary);
    font-weight: 700;
    font-size: 13px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
    margin: 20px 0 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Buttons ── */
.btn {
    cursor: pointer;
    font-family: inherit;
    padding: 10px 30px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 15px;
    border: none;
    transition: background 0.2s, transform 0.1s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--primary);
    color: var(--bg-dark);
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: var(--bg-dark);
    text-decoration: none;
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: #5a4e35;
    color: var(--primary);
    text-decoration: none;
}

.btn-sm {
    padding: 6px 16px;
    font-size: 13px;
    border-radius: 20px;
}

.step-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.input-field input,
.input-field select,
.input-field textarea {
    height: 44px;
    box-sizing: border-box;
}

.form-group {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.input-field {
    flex: 1;
}

/* ── Progress Bar ── */
.multi-step-container {
    margin-bottom: 20px;
}

.step-indicators {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 0 20px 0;
    padding: 2px 0;
    flex-wrap: wrap;
    gap: 5px;
}

.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 3px 5px;
    border: 1px solid transparent;
    flex: 1 1 0;
    min-width: 32px;
    font-size: 11px;
    line-height: 1.2;
    background: #4f432d;
    border-color: #4f432d;
}

.step-indicator.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.step-number {
    width: auto;
    height: auto;
    background: transparent !important;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 6px 0;
    border-radius: 0;
}

.step-number i {
    font-size: 20px;
    transition: all 0.2s;
    color: #ffffff;
}

.step-title {
    font-size: 13px;
    font-weight: 600;
    color: #b29359;
    line-height: 1.3;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.step-indicator.active .step-number i,
.step-indicator.active .step-title {
    color: white;
}

.step-content {
    display: none;
    animation: fadeInUp 0.4s ease;
}

.step-content.active-step {
    display: block;
    background-color: #4f432d;
    padding: 12px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-step-selector {
    display: none;
    margin-bottom: 20px;
}

.mobile-step-selector select {
    width: 100%;
    font-size: 11px;
    background: #4f432e;
    color: #b29359;
    cursor: pointer;
    font-weight: 500;
}

@media (max-width: 768px) {
    .step-indicators {
        display: none;
    }
    .mobile-step-selector {
        display: block;
    }
}

@media (min-width: 769px) {
    .mobile-step-selector {
        display: none !important;
    }
}

.apply-action-wrap {
    display: flex;
    justify-content: flex-end;
    margin-top: 30px;
}

.btn-theme-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #4f432d;
    color: #b29359;
    border: none;
    padding: 14px 32px;
    border-radius: 15px;
    font-weight: 700;
    font-size: 18px;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s ease, color 0.2s ease;
    cursor: pointer;
}

.btn-theme-action:hover {
    background: #b29359;
    color: #4f432d;
    text-decoration: none;
}

.btn-theme-action.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #6b5f45;
    color: #b29359;
}

.btn-theme-action.disabled:hover {
    background: #6b5f45;
    color: #b29359;
}

.already-applied-msg {
    background: #4f432d;
    color: #b29359;
    padding: 15px 25px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.already-applied-msg i {
    font-size: 24px;
}

@media (max-width: 768px) {
    .apply-action-wrap {
        justify-content: center;
    }
    .btn-theme-action {
        font-size: 16px;
        padding: 12px 24px;
    }
}

.step-nav-btn {
    background: #4f432d;
    color: #b29359;
    border: 2px solid #b29359;
    padding: 10px 24px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    font-size: 15px;
}

.step-nav-btn:hover {
    background: #b29359;
    color: #4f432d;
    border-color: #4f432d;
}

.step-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #4f432d;
    color: #b29359;
    border-color: #b29359;
}

.confirmation-checkbox-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    color: #b29359;
    font-weight: 500;
}

.confirmation-checkbox-item input[type="checkbox"] {
    width: 12px;
    height: 11px;
    margin-top: -2px;
    accent-color: #b29359;
    cursor: pointer;
}

.theme-toast-wrap {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 380px;
}

.theme-toast {
    background: #4f432d;
    color: #b29359;
    padding: 16px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    animation: toastIn 0.35s ease;
    border-left: 5px solid #b29359;
}

.theme-toast.error {
    border-left-color: #d97777;
}

.theme-toast i {
    font-size: 22px;
    margin-top: 1px;
    flex-shrink: 0;
}

.theme-toast .toast-close {
    margin-left: auto;
    background: transparent;
    border: none;
    color: #b29359;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(30px); }
}

.theme-toast.closing {
    animation: toastOut 0.3s ease forwards;
}

@media (max-width: 768px) {
    .theme-toast-wrap {
        left: 12px;
        right: 12px;
        top: 12px;
        max-width: none;
    }
}

/* ─── Detail items ─── */
.gender-badge {
    display: inline-block;
    background: #4f432d;
    color: #b29359;
    font-size: 13px;
    font-weight: 700;
    padding: 4px 16px;
    border-radius: 12px;
    text-transform: uppercase;
    margin-top: 8px;
}

.multiple-images-container {
    margin: 5px 0;
}

.single-image-item {
    padding-bottom: 5px;
}

.single-image-item img {
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none;
    margin-bottom: 2px;
}

.detail-item {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: baseline;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: #b29359;
    min-width: 180px;
    max-width: 200px;
    font-size: 15px;
}

.detail-value {
    color: #b29359;
    flex: 1;
    font-size: 15px;
}

.terms-box {
    background: #4f432d;
    padding: 20px;
    margin: 20px 0;
    color: #b29359;
    line-height: 1.8;
}

.terms-box img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

.terms-box .head {
    font-size: 18px !important;
    line-height: 22.5px;
}

/* ─── Agreement Preview ── */
.agreement-preview-wrapper {
    background: #e6e2d9;
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
    border: 1px solid #5a4e35;
    color: #b29359;
}

.agreement-preview-wrapper .header {
    text-align: center;
    background: #e6e2d9;
    padding: 20px;
    border-radius: 8px 8px 0 0;
    margin: -20px -20px 20px -20px;
    border-bottom: 3px solid #f2e9d6;
}

.agreement-preview-wrapper .header .logo {
    object-fit: contain;
    margin-bottom: 8px;
}

.agreement-preview-wrapper .header h1 {
    font-size: 22px;
    font-weight: 700;
    text-transform: uppercase;
    color: #b29359;
    margin: 0;
}

.agreement-preview-wrapper .header .company-name {
    font-size: 16px;
    font-weight: 600;
    color: #201f1d;
    margin-top: 4px;
}

.agreement-preview-wrapper .header .company-info {
    font-size: 12px;
    color: #201f1d;
    margin-top: 4px;
}

.agreement-preview-wrapper .header .sub {
    display: inline-block;
    margin-top: 8px;
    font-size: 11px;
    color: #201f1d;
    background: #b29359;
    padding: 2px 16px;
    border-radius: 20px;
    font-weight: 600;
}

.agreement-preview-wrapper .section-title {
    font-size: 15px;
    font-weight: 700;
    color: #b29359;
    background: #e9d5ae;
    padding: 6px 14px;
    border-left: 4px solid #b29359;
    border-radius: 4px;
    margin: 18px 0 10px 0;
    text-transform: uppercase;
}

.agreement-preview-wrapper .profile-card {
    background: #e8e6e2;
    padding: 14px;
    border-radius: 8px;
    border: 1px solid #ede8df;
}

.agreement-preview-wrapper .profile-card .avatar img {
    width: 100%;
    height: auto;
    aspect-ratio: 1/1;
    object-fit: cover;
    border: 3px solid #b29359;
    display: block;
}

.agreement-preview-wrapper .profile-card .avatar-placeholder {
    width: 100%;
    aspect-ratio: 1/1;
    background: #3a3220;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b29359;
    font-weight: 600;
    border: 3px solid #b29359;
    font-size: 14px;
}

.agreement-preview-wrapper .profile-card .details .row {
    flex-wrap: wrap;
    text-align: left;
    gap: 8px 20px;
    padding: 4px 0;
    border-bottom: 1px dashed #5a4e35;
}

.agreement-preview-wrapper .profile-card .details .row:last-child {
    border-bottom: none;
}

.agreement-preview-wrapper .profile-card .details .label {
    font-weight: 600;
    color: #b29359;
    min-width: 100px;
    text-transform: uppercase;
    font-size: 11px;
}

.agreement-preview-wrapper .profile-card .details .value {
    color: #1d1c1b;
    font-weight: 500;
}

.agreement-preview-wrapper .profile-card .details .col-md-6 .row {
    margin-bottom: 2px;
}

.agreement-preview-wrapper .content-box {
    background: #eee6d4;
    padding: 12px 16px;
    border-radius: 6px;
    text-align: left;
    border: 1px solid #5a4e35;
    color: #b29359;
    line-height: 1.6;
    overflow: hidden;
}

.agreement-preview-wrapper .content-box img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.agreement-preview-wrapper .content-box table {
    width: 100%;
    border-collapse: collapse;
}

.agreement-preview-wrapper .content-box table tr:nth-child(even) {
    background: #efe1c4;
}

.agreement-preview-wrapper .content-box table td {
    padding: 6px 8px;
    text-align: left;
    border-bottom: 1px solid #efe1c4;
    vertical-align: top;
}

.agreement-preview-wrapper .content-box table .label-cell {
    font-weight: 600;
    color: #b29359;
    text-align: left;
    width: 30%;
}

.agreement-preview-wrapper .content-box table .value-cell {
    width: 70%;
}

.agreement-preview-wrapper .footer {
    margin-top: 20px;
    padding: 14px 20px;
    background: #eee8dd;
    border-top: 3px solid #b29359;
    text-align: center;
    color: #1b1a19;
    font-size: 12px;
    border-radius: 0 0 8px 8px;
    margin: 20px -20px -20px -20px;
}

.agreement-preview-wrapper .footer .company-details {
    margin-top: 4px;
    font-size: 11px;
    color: #1f1f1d;
}

/* ─── OTP / PDF download ── */
.otp-container {
    background: #4f432d;
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.otp-container .otp-input {
    flex: 1;
    min-width: 150px;
    padding: 10px 15px;
    border: 1px solid #5a4e35;
    border-radius: 8px;
    background: #3a3220;
    color: #b29359;
    font-size: 16px;
    letter-spacing: 2px;
}

.otp-container .otp-input:focus {
    outline: none;
    border-color: #be995b;
}

.otp-container .btn-sm {
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 8px;
}

.otp-container .btn-sm:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.otp-status {
    color: #b29359;
    font-weight: 600;
    margin-top: 8px;
    width: 100%;
}

.otp-status.success {
    color: #28a745;
}

.otp-status.error {
    color: #4f432d;
}

.otp-resend-wrap {
    width: 100%;
    font-size: 13px;
    color: #b29359;
    margin-top: 4px;
}

.otp-resend-wrap a {
    color: #e8cf9e;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}

.otp-resend-wrap a.disabled-link {
    pointer-events: none;
    opacity: 0.5;
    text-decoration: none;
}

.pdf-download-btn {
    display: inline-block;
    margin-top: 15px;
}

.pdf-auto-note {
    color: #28a745;
    font-weight: 600;
    font-size: 13px;
    margin-top: 8px;
}

/* ─── Responsive ── */
@media (max-width: 768px) {
    .page-header {
        min-height: auto;
        margin: 12px 0;
        padding: 0 10px;
    }
    .page-header h1 {
        font-size: 24px;
    }
    .btn-back {
        padding: 6px 14px;
        font-size: 13px;
    }
    .btn-back span {
        display: none;
    }
    h4 {
        font-size: 20px !important;
        margin-bottom: 0px !important;
    }
    .detail-label {
        font-size: 13px;
    }
    .detail-value {
        font-size: 13px;
    }
    .detail-item {
        padding: 10px 10px;
    }
    .terms-box {
        padding: 0px;
        margin: 15px 0;
    }
    p {
        padding: 0px !important;
    }
    .step-nav-btn {
        padding: 2px 12px;
        border-radius: 0px;
    }
    .agreement-preview-wrapper .profile-card .avatar {
        margin-bottom: 15px;
    }
    .agreement-preview-wrapper .profile-card .details .col-md-6 {
        width: 100%;
    }
    .otp-container {
        flex-direction: column;
        align-items: stretch;
    }
    .otp-container .otp-input {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .page-header {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: nowrap;
        padding: 0 10px;
        min-height: auto;
        margin: 12px 0;
        gap: 0;
    }
    .btn-back {
        position: static;
        transform: none;
        flex-shrink: 0;
        font-size: 12px;
        padding: 6px 12px;
        order: 0;
        margin-right: 10px;
    }
    .page-header h1 {
        position: static;
        transform: none;
        font-size: 20px;
        flex: 1;
        text-align: center;
        order: 1;
        width: auto;
        margin: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: calc(100% - 120px);
    }
}
