/* =========================================================
   YCAF Design System
   ========================================================= */
:root {
    --ycaf-blue: #0d4d8a;
    --ycaf-blue-600: #1a6db5;
    --ycaf-blue-500: #2e86d6;
    --ycaf-ink: #0f172a;
    --ycaf-slate: #64748b;
    --ycaf-slate-light: #94a3b8;
    --ycaf-line: #e2e8f0;
    --ycaf-green: #10b981;
    --ycaf-amber: #f59e0b;
    --ycaf-bg: #eef2f7;
    --ycaf-gradient: linear-gradient(135deg, #0d4d8a 0%, #1a6db5 55%, #2e86d6 100%);
    --ycaf-radius: 16px;
    --ycaf-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --ycaf-shadow: 0 12px 34px -14px rgba(13, 77, 138, 0.28);
    --ycaf-shadow-hover: 0 18px 44px -16px rgba(13, 77, 138, 0.34);
}

.ycaf-body {
    background: var(--ycaf-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    color: var(--ycaf-ink);
}

.ycaf-body .wrapper {
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* ---- Shared header / topbar ---- */
.ycaf-header,
.ycaf-topbar {
    background: var(--ycaf-gradient);
    color: #fff;
    box-shadow: 0 4px 22px rgba(13, 77, 138, 0.3);
}

.ycaf-header-sticky {
    position: sticky;
    top: 0;
    z-index: 900;
    backdrop-filter: saturate(1.2) blur(8px);
}

.ycaf-header-inner,
.ycaf-topbar-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.ycaf-header-title {
    font-weight: 800;
    font-size: 1.05rem;
    line-height: 1.2;
    letter-spacing: 0.2px;
}

.ycaf-header-sub {
    font-size: 0.8rem;
    opacity: 0.92;
}

.ycaf-header-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.ycaf-ref-badge {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #fff;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.82rem;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 30px;
}

.ycaf-status-badge {
    background: var(--ycaf-amber);
    color: #433002;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: capitalize;
    padding: 3px 10px;
    border-radius: 30px;
}

.ycaf-bloomberg-credit {
    font-size: 0.72rem;
    opacity: 0.92;
}

/* ---- Footer ---- */
.ycaf-footer {
    margin-top: auto;
    padding: 20px 0;
    background: #0f172a;
    color: #94a3b8;
    font-size: 0.85rem;
    border-top: 3px solid rgba(255, 255, 255, 0.06);
}

.ycaf-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
}

.ycaf-footer-copy {
    line-height: 1.5;
}

.ycaf-footer-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.ycaf-footer-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #cbd5e1;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.ycaf-footer-links a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.25);
}

.ycaf-footer-links a i {
    color: #38bdf8;
}

/* =========================================================
   Landing page
   ========================================================= */
.ycaf-hero {
    background: linear-gradient(180deg, #f4f8fe 0%, #e9f1fb 100%);
    padding: 60px 16px 46px;
    border-bottom: 1px solid #dce8f5;
    position: relative;
    overflow: hidden;
}

.ycaf-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 12% 20%, rgba(46, 134, 214, 0.14), transparent 34%),
        radial-gradient(circle at 88% 80%, rgba(16, 185, 129, 0.10), transparent 30%);
    pointer-events: none;
}

.ycaf-hero .container {
    position: relative;
}

.ycaf-landing-title {
    font-weight: 800;
    color: var(--ycaf-blue);
    letter-spacing: 0.3px;
}

.ycaf-hero-sub {
    color: #4b5563;
    font-size: 1.12rem;
    max-width: 720px;
    margin: 0 auto;
}

.ycaf-hero-chips {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.ycaf-hero-chip {
    background: #fff;
    color: var(--ycaf-blue);
    border: 1px solid #cfe0f2;
    font-size: 0.84rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 30px;
    box-shadow: var(--ycaf-shadow-sm);
}

.ycaf-draft-ref {
    color: var(--ycaf-blue);
    font-family: 'Consolas', 'Courier New', monospace;
}

.ycaf-landing-card {
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: var(--ycaf-radius);
    box-shadow: var(--ycaf-shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ycaf-landing-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--ycaf-shadow-hover);
}

.ycaf-center-box {
    max-width: 640px;
    margin: 0 auto 20px;
}

.ycaf-landing-card .card-title {
    font-weight: 700;
}

.ycaf-landing-card > .card-header {
    background: #fff;
    border-bottom: 1px solid var(--ycaf-line);
    border-top-left-radius: var(--ycaf-radius);
    border-top-right-radius: var(--ycaf-radius);
    padding: 14px 20px;
}

.ycaf-landing-card > .card-header h6,
.ycaf-landing-card > .card-header h5 {
    font-weight: 700;
    letter-spacing: 0.2px;
}

/* ---- Admin tables ---- */
.ycaf-landing-card .table thead th {
    background: #f6f9fc;
    color: var(--ycaf-slate);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border-bottom: 1px solid var(--ycaf-line);
    white-space: nowrap;
}

.ycaf-landing-card .table td,
.ycaf-landing-card .table th {
    vertical-align: middle;
    padding: 0.6rem 0.75rem;
}

.ycaf-landing-card .table-hover tbody tr:hover {
    background: #f2f7fe;
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
    border-radius: 11px;
    font-weight: 600;
}

.btn-primary {
    background: var(--ycaf-gradient);
    border: 0;
    box-shadow: 0 8px 18px rgba(13, 77, 138, 0.25);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, #0b4277 0%, #17609f 55%, #2a78c4 100%);
    color: #fff;
}

.btn-success {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    border: 0;
}

.btn-outline-secondary {
    color: var(--ycaf-slate);
    border-color: #cbd5e1;
}

.btn-outline-secondary:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: var(--ycaf-ink);
}

/* =========================================================
   Form controls
   ========================================================= */
.form-control {
    border-radius: 10px;
    border-color: var(--ycaf-line);
    padding: 0.6rem 0.85rem;
    min-height: 44px;
}

.form-control:focus {
    border-color: var(--ycaf-blue);
    box-shadow: 0 0 0 0.18rem rgba(13, 77, 138, 0.12);
}

.form-select:focus {
    border-color: var(--ycaf-blue);
    box-shadow: 0 0 0 0.18rem rgba(13, 77, 138, 0.12);
}

.form-check-input {
    width: 1.2em;
    height: 1.2em;
    margin-top: 0.18em;
}

.form-check-input:checked {
    background-color: var(--ycaf-blue);
    border-color: var(--ycaf-blue);
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(13, 77, 138, 0.15);
    border-color: var(--ycaf-blue);
}

.form-check-label {
    font-weight: 400;
    color: #334155;
}

.form-label {
    font-weight: 600;
    color: #334155;
    font-size: 0.92rem;
}

.text-muted {
    color: var(--ycaf-slate) !important;
}

.ycaf-invalid-feedback {
    width: 100%;
    font-size: 0.8rem;
}

/* =========================================================
   Wizard card
   ========================================================= */
.ycaf-wizard-card {
    border: 0;
    border-radius: 20px;
    box-shadow: var(--ycaf-shadow);
    overflow: hidden;
}

.ycaf-wizard-card > .card-header {
    background: #fff;
    border-bottom: 1px solid var(--ycaf-line);
    padding: 14px 20px;
}

.ycaf-wizard-card > .card-header .card-title {
    font-weight: 800;
    color: var(--ycaf-blue);
}

#ycaf-save-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--ycaf-slate);
    font-size: 0.8rem;
}

#ycaf-save-status.is-saving {
    color: var(--ycaf-amber);
}

#ycaf-save-status.is-saved {
    color: var(--ycaf-green);
}

/* ---- Progress bar ---- */
.ycaf-progress-wrap {
    padding: 14px 20px 0;
    background: #fff;
}

.ycaf-progress-track {
    height: 6px;
    background: #e8eef5;
    border-radius: 99px;
    overflow: hidden;
}

.ycaf-progress-fill {
    display: block;
    height: 100%;
    width: 9%;
    background: var(--ycaf-gradient);
    border-radius: 99px;
    transition: width 0.45s ease;
}

.ycaf-progress-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--ycaf-slate);
    margin-top: 7px;
}

/* =========================================================
   Stepper
   ========================================================= */
.bs-stepper-header {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 18px 18px 8px;
    background: #fff;
    border-bottom: 1px solid var(--ycaf-line);
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 22px;
    -webkit-overflow-scrolling: touch;
}

.bs-stepper-header::-webkit-scrollbar {
    display: none;
}

.bs-stepper-header::before {
    content: '';
    position: absolute;
    top: 45px;
    left: 64px;
    right: 64px;
    height: 2px;
    background: #e8eef5;
    z-index: 0;
    pointer-events: none;
}

.bs-stepper-header .step {
    position: relative;
    flex: 1 1 0;
    min-width: 66px;
    z-index: 1;
    scroll-snap-align: center;
}

.bs-stepper-header .step-trigger {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 8px 6px;
    width: 100%;
    background: transparent;
    border: 0;
    border-radius: 12px;
    transition: background-color 0.15s ease;
}

.bs-stepper-header .step-trigger:hover {
    background: rgba(13, 77, 138, 0.06);
}

/* Keep disabled triggers interactive so we can navigate back to done steps. */
.bs-stepper .step-trigger:disabled,
.bs-stepper .step-trigger.disabled {
    pointer-events: auto;
    opacity: 1;
}

.bs-stepper .step.ycaf-step-done .step-trigger {
    cursor: pointer;
}

.bs-stepper .step:not(.active):not(.ycaf-step-done) .step-trigger {
    cursor: default;
}

.bs-stepper-circle {
    width: 38px;
    height: 38px;
    margin: 0 auto;
    background: #e3e9f1;
    color: var(--ycaf-slate-light);
    border: 2px solid #dbe4ee;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    position: relative;
    transition: all 0.3s ease;
}

.bs-stepper .step.active .bs-stepper-circle {
    background: var(--ycaf-gradient);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 6px 16px rgba(13, 77, 138, 0.35);
    transform: scale(1.08);
}

.bs-stepper .step.active .bs-stepper-title {
    color: var(--ycaf-blue);
    font-weight: 700;
}

.bs-stepper .step.ycaf-step-done .bs-stepper-circle {
    background: var(--ycaf-green);
    border-color: transparent;
    color: transparent;
}

.bs-stepper .step.ycaf-step-done .bs-stepper-circle::after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.9rem;
}

.bs-stepper .step.ycaf-step-done .bs-stepper-title {
    color: var(--ycaf-green);
}

.bs-stepper-title {
    display: block;
    font-size: 0.78rem;
    color: var(--ycaf-slate);
    text-align: center;
    white-space: nowrap;
    font-weight: 600;
    transition: color 0.2s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Stepper scroll viewport + edge fades so it's clear more steps exist. */
.ycaf-stepper-viewport {
    position: relative;
    background: #fff;
}

.ycaf-stepper-scrim {
    display: none;
    position: absolute;
    top: 0;
    bottom: 0;
    width: 30px;
    pointer-events: none;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.ycaf-stepper-scrim-left {
    left: 0;
    background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0));
}

.ycaf-stepper-scrim-right {
    right: 0;
    background: linear-gradient(to left, #fff, rgba(255, 255, 255, 0));
}

#ycaf-step-count .ycaf-step-name {
    color: var(--ycaf-blue);
    font-weight: 600;
}

.bs-stepper-subtitle {
    display: block;
    font-size: 0.7rem;
    color: var(--ycaf-slate-light);
    text-align: center;
    white-space: nowrap;
}

/* ---- Stepper content ---- */
.bs-stepper-content {
    min-height: 420px;
    background: #fff;
}

.bs-stepper-content .content {
    display: none;
}

.bs-stepper-content .content.active {
    display: block;
    animation: ycafFade 0.28s ease;
}

@keyframes ycafFade {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bs-stepper-content .content > .p-4 {
    padding: 24px 26px !important;
}

/* ---- Step navigation footer ---- */
.ycaf-step-nav {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 16px 20px;
    background: #f8fafc;
    border-top: 1px solid var(--ycaf-line);
}

.ycaf-prev-btn,
.ycaf-next-btn {
    border-radius: 12px;
    padding: 11px 22px;
    font-weight: 700;
    min-height: 46px;
    min-width: 150px;
}

.ycaf-next-btn {
    background: var(--ycaf-gradient);
    border: 0;
    color: #fff;
    box-shadow: 0 8px 18px rgba(13, 77, 138, 0.25);
}

.ycaf-next-btn:hover,
.ycaf-next-btn:focus {
    background: linear-gradient(135deg, #0b4277 0%, #17609f 55%, #2a78c4 100%);
    color: #fff;
}

.ycaf-prev-btn {
    color: var(--ycaf-slate);
    border: 1px solid #cbd5e1;
    background: #fff;
}

.ycaf-prev-btn:hover {
    background: #f1f5f9;
    color: var(--ycaf-ink);
}

/* ---- Submitted view ---- */
.ycaf-submitted-card {
    border: 0;
    border-radius: 20px;
    box-shadow: var(--ycaf-shadow);
    overflow: hidden;
}

.ycaf-submitted-card .card-header {
    background: var(--ycaf-gradient);
    color: #fff;
    border: 0;
    text-align: center;
    padding: 26px 20px 18px;
}

.ycaf-submitted-card .ycaf-success-ring {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 12px;
}

/* =========================================================
   Supporting documents (Section 18)
   ========================================================= */
.ycaf-doc-row {
    padding: 12px 0;
    border-bottom: 1px solid #eef0f3;
}

.ycaf-doc-row:last-of-type {
    border-bottom: none;
}

.ycaf-doc-row .custom-file {
    height: 2.6rem;
}

.ycaf-doc-progress {
    height: 6px;
}

.ycaf-doc-status {
    font-size: 0.85rem;
    line-height: 2.2;
}

/* ---- Dynamic repeatable rows ---- */
.ycaf-repeater {
    margin-bottom: 8px;
}

.ycaf-repeat-row {
    background: #fafbfc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 12px 6px;
    margin-bottom: 8px;
}

.ycaf-repeat-row .form-label {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--ycaf-slate);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ---- Essay word counters ---- */
.ycaf-wc-counter {
    font-size: 0.8rem;
    margin-top: 4px;
    color: #6c757d;
}

.ycaf-wc-counter.text-danger {
    color: #dc3545;
    font-weight: 600;
}

/* ---- Radio / checkbox grids ---- */
.ycaf-radio-grid label,
.ycaf-check-grid label {
    min-width: 200px;
    margin-right: 6px;
    font-weight: 400;
}

/* ---- Signature pad ---- */
.ycaf-signature-box {
    max-width: 620px;
}

.ycaf-signature-box canvas {
    border: 2px dashed #b9c3ce;
    border-radius: 12px;
    background: #fff;
    width: 100%;
    height: auto;
    cursor: crosshair;
    touch-action: none;
}

.ycaf-signature-box canvas:active {
    border-color: var(--ycaf-blue);
}

/* ---- Budget table ---- */
.ycaf-budget-table td {
    vertical-align: middle;
}

.ycaf-budget-total-row {
    background: #eef3f8;
}

.ycaf-budget-total-row td {
    font-size: 0.95rem;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 991px) {
    .ycaf-prev-btn,
    .ycaf-next-btn {
        min-width: 0;
        flex: 1;
    }
}

@media (max-width: 767px) {
    .ycaf-header-inner,
    .ycaf-topbar-inner {
        padding: 10px 14px;
        gap: 10px;
    }

    .ycaf-header-title {
        font-size: 0.92rem;
    }

    .ycaf-header-sub {
        font-size: 0.72rem;
    }

    .ycaf-header-meta {
        align-items: flex-end;
    }

    .ycaf-header-meta .ycaf-status-badge {
        display: none;
    }

    .ycaf-hero {
        padding: 44px 14px 34px;
    }

    .ycaf-hero-sub {
        font-size: 1rem;
    }

    .bs-stepper-header {
        padding: 14px 10px 6px;
    }

    .bs-stepper-header::before {
        top: 38px;
        left: 42px;
        right: 42px;
    }

    .bs-stepper-header .step {
        min-width: 48px;
    }

    .bs-stepper-circle {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    .bs-stepper-title {
        display: none;
    }

    .bs-stepper-subtitle {
        display: none;
    }

    .ycaf-stepper-scrim {
        display: block;
    }

    .ycaf-stepper-scrim.visible {
        opacity: 1;
    }

    .bs-stepper-content .content > .p-4 {
        padding: 18px 16px !important;
    }

    /* Sticky action bar at the bottom on mobile */
    .ycaf-step-nav {
        position: sticky;
        bottom: 0;
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(8px);
        box-shadow: 0 -6px 18px rgba(15, 23, 42, 0.08);
        padding: 12px 14px;
        z-index: 50;
    }

    .ycaf-prev-btn,
    .ycaf-next-btn {
        min-height: 48px;
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .form-control {
        min-height: 46px;
    }

    .ycaf-wizard-card {
        border-radius: 14px;
    }
}

/* =========================================================
   Admin: login page
   ========================================================= */
.ycaf-login-card {
    border-radius: 20px;
    box-shadow: var(--ycaf-shadow);
    border: 0;
    padding-top: 6px;
}

.ycaf-login-ring {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--ycaf-gradient);
    color: #fff;
    font-size: 1.35rem;
    box-shadow: 0 10px 22px rgba(13, 77, 138, 0.3);
}

/* =========================================================
   Admin: dashboard stat cards
   ========================================================= */
.ycaf-stat-card {
    border-radius: var(--ycaf-radius);
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: var(--ycaf-shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ycaf-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--ycaf-shadow-hover);
}

.ycaf-stat-card .stat-count {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--ycaf-blue);
}

.ycaf-stat-card.border-primary {
    border-color: var(--ycaf-blue) !important;
    box-shadow: 0 0 0 2px rgba(13, 77, 138, 0.15);
}

/* =========================================================
   Admin: user form
   ========================================================= */
.ycaf-user-form {
    border-radius: var(--ycaf-radius);
}

.ycaf-user-form .card-header {
    background: #f6f9fc;
    border-bottom: 1px solid var(--ycaf-line);
}

.ycaf-user-ring {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--ycaf-gradient);
    color: #fff;
    font-size: 1.1rem;
    box-shadow: 0 8px 18px rgba(13, 77, 138, 0.25);
    flex-shrink: 0;
}

.ycaf-user-form .form-label {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    color: var(--ycaf-slate);
    margin-bottom: 5px;
}

.ycaf-user-form .input-group-text {
    background: #f8fafc;
    border-color: var(--ycaf-line);
    color: var(--ycaf-slate);
    border-radius: 10px 0 0 10px;
    padding-right: 12px;
    padding-left: 12px;
}

.ycaf-user-form .input-group .form-control:not(:first-child) {
    border-left: 0;
}

.ycaf-user-form .input-group .form-control:not(:first-child):focus {
    border-left: 0;
}

.ycaf-user-form .toggle-pw {
    border-radius: 0 10px 10px 0;
    border-color: var(--ycaf-line);
    color: var(--ycaf-slate);
    background: #fff;
    min-height: 44px;
}

.ycaf-user-form .toggle-pw:hover {
    background: #f1f5f9;
    color: var(--ycaf-ink);
}

.ycaf-form-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 26px 0 18px;
}

.ycaf-form-divider::before,
.ycaf-form-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--ycaf-line);
}

.ycaf-form-divider-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--ycaf-blue);
    white-space: nowrap;
}

.ycaf-alert {
    border-radius: 12px;
    border-left: 4px solid currentColor;
}

.ycaf-alert-soft {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.ycaf-pw-meter {
    margin-top: 10px;
}

.ycaf-pw-meter-bar {
    height: 6px;
    background: #e8edf3;
    border-radius: 20px;
    overflow: hidden;
}

.ycaf-pw-meter-fill {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 20px;
    background: #ef4444;
    transition: width 0.25s ease, background-color 0.25s ease;
}

.ycaf-pw-meter-label {
    font-size: 0.75rem;
    margin-top: 4px;
    display: block;
}

@media (max-width: 575px) {
    .ycaf-user-ring {
        width: 40px;
        height: 40px;
        font-size: 0.95rem;
    }

    .ycaf-user-form .card-body {
        padding: 1.25rem;
    }
}

/* =========================================================
   Admin DataTables controls spacing
   ========================================================= */
#appsTable_wrapper .dataTables_length,
#appsTable_wrapper .dataTables_info,
#appsTable_wrapper .dataTables_paginate {
    padding-top: 0.75rem;
}

#appsTable_wrapper .dataTables_length {
    padding-left: 0.75rem;
}

#appsTable_wrapper .dataTables_paginate {
    padding-right: 0.75rem;
    margin-bottom: 0.75rem;
}

#appsTable_wrapper .dataTables_info {
    padding-left: 0.75rem;
    margin-bottom: 0.75rem;
}

/* =========================================================
   Data Privacy Notice consent modal
   ========================================================= */
.ycaf-modal {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.ycaf-modal[hidden] {
    display: none;
}

.ycaf-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(3px);
}

.ycaf-modal-dialog {
    position: relative;
    width: 100%;
    max-width: 780px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
    overflow: hidden;
}

.ycaf-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--ycaf-line);
    color: var(--ycaf-blue);
}

.ycaf-privacy-scroll {
    overflow-y: auto;
    padding: 1.25rem;
    max-height: 56vh;
}

.ycaf-modal-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--ycaf-line);
    background: #f8fafc;
}

@media (max-width: 575px) {
    .ycaf-privacy-scroll {
        max-height: 48vh;
        padding: 1rem;
    }

    .ycaf-modal-footer .btn {
        width: 100%;
    }
}

.ycaf-signature-box.ycaf-sig-saving {
    position: relative;
    pointer-events: none;
}
.ycaf-signature-box.ycaf-sig-saving::after {
    content: 'Saving signature...';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.75);
    color: #0d4d8a;
    font-weight: 600;
}

.ycaf-doc-row.is-invalid {
    border: 1px solid #dc3545;
    border-radius: 0.5rem;
    padding: 0.5rem;
    background: rgba(220, 53, 69, 0.05);
}
.ycaf-doc-row.is-invalid .ycaf-invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
}
