/* ===== PRÉSTAMO CLICK — MAIN STYLES ===== */
:root {
    --pc-navy:    #0a1628;
    --pc-dark:    #0f1f3d;
    --pc-blue:    #1a3a6e;
    --pc-accent:  #2563eb;
    --pc-gold:    #f5a623;
    --pc-gold2:   #e8951a;
    --pc-light:   #f0f4ff;
    --pc-white:   #ffffff;
    --pc-gray:    #8b9bb4;
    --pc-success: #10b981;
    --pc-danger:  #ef4444;
    --pc-warn:    #f59e0b;
    --radius:     12px;
    --radius-lg:  20px;
    --shadow:     0 4px 24px rgba(10,22,40,.18);
    --shadow-lg:  0 8px 40px rgba(10,22,40,.28);
}

*, *::before, *::after { box-sizing: border-box; }

html {
    width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--pc-navy);
    color: #d4dff0;
    min-height: 100vh;
    font-size: 15px;
    overflow-x: hidden;
    touch-action: manipulation;
}

img, svg, video, canvas, iframe, object {
    max-width: 100%;
}

h1,h2,h3,h4,h5,h6,.display-1,.display-2,.display-3,.display-4 {
    font-family: 'Sora', sans-serif;
    color: var(--pc-white);
}

a { color: var(--pc-accent); text-decoration: none; }
a:hover { color: var(--pc-gold); }

/* ===== NAVBAR ===== */
.pc-navbar {
    background: rgba(10,22,40,.96);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(37,99,235,.15);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.pc-navbar .navbar-brand {
    font-family: 'Sora', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--pc-white) !important;
    letter-spacing: -.5px;
}

.pc-navbar .navbar-brand span {
    color: var(--pc-gold);
}

.pc-navbar .nav-link {
    color: var(--pc-gray) !important;
    font-weight: 500;
    transition: color .2s;
    padding: 6px 14px !important;
}
.pc-navbar .nav-link:hover { color: var(--pc-white) !important; }

.btn-nav-cta {
    background: linear-gradient(135deg, var(--pc-accent), #1d4ed8);
    color: #fff !important;
    border-radius: 8px;
    padding: 8px 22px !important;
    font-weight: 600;
    transition: transform .2s, box-shadow .2s;
    box-shadow: 0 2px 12px rgba(37,99,235,.4);
}
.btn-nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(37,99,235,.6);
}

/* ===== HERO ===== */
.pc-hero {
    background: linear-gradient(135deg, var(--pc-navy) 0%, var(--pc-dark) 40%, #0d2a5a 100%);
    min-height: 88vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 80px 0;
}

.pc-hero::before {
    content: '';
    position: absolute;
    width: 700px; height: 700px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37,99,235,.18) 0%, transparent 70%);
    top: -200px; right: -150px;
    pointer-events: none;
}

.pc-hero::after {
    content: '';
    position: absolute;
    width: 400px; height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245,166,35,.1) 0%, transparent 70%);
    bottom: -100px; left: -80px;
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(37,99,235,.15);
    border: 1px solid rgba(37,99,235,.35);
    border-radius: 50px;
    padding: 6px 18px;
    font-size: .82rem;
    color: #93c5fd;
    font-weight: 600;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-title {
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 18px;
    letter-spacing: -.5px;
}

.hero-title .highlight {
    background: linear-gradient(135deg, var(--pc-gold), #f97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-checks {
    list-style: none;
    padding: 0;
    margin: 24px 0 36px;
}

.hero-checks li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #cbd5e1;
    margin-bottom: 10px;
    font-size: 1rem;
    font-weight: 500;
}

.hero-checks li::before {
    content: '✔';
    width: 22px; height: 22px;
    background: rgba(16,185,129,.2);
    border: 1px solid rgba(16,185,129,.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    color: var(--pc-success);
    flex-shrink: 0;
}

/* ===== HERO CARD ===== */
.hero-card {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-lg);
}

.hero-card .display-amount {
    font-size: 3.2rem;
    font-weight: 800;
    color: var(--pc-gold);
    font-family: 'Sora', sans-serif;
    line-height: 1;
}

/* ===== BUTTONS ===== */
.btn-pc-primary {
    background: linear-gradient(135deg, var(--pc-accent) 0%, #1d4ed8 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 14px 32px;
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all .25s;
    box-shadow: 0 4px 20px rgba(37,99,235,.4);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}
.btn-pc-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(37,99,235,.55);
    color: #fff;
}

.btn-pc-gold {
    background: linear-gradient(135deg, var(--pc-gold) 0%, var(--pc-gold2) 100%);
    color: var(--pc-navy);
    border: none;
    border-radius: 10px;
    padding: 14px 32px;
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all .25s;
    box-shadow: 0 4px 20px rgba(245,166,35,.35);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}
.btn-pc-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(245,166,35,.5);
    color: var(--pc-navy);
}

.btn-pc-outline {
    background: transparent;
    color: var(--pc-white);
    border: 1.5px solid rgba(255,255,255,.25);
    border-radius: 10px;
    padding: 13px 32px;
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all .25s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}
.btn-pc-outline:hover {
    border-color: var(--pc-accent);
    color: var(--pc-accent);
    background: rgba(37,99,235,.08);
}

/* ===== CARDS ===== */
.pc-card {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.09);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    transition: all .3s;
}
.pc-card:hover {
    border-color: rgba(37,99,235,.35);
    box-shadow: 0 0 0 1px rgba(37,99,235,.15), var(--shadow);
    transform: translateY(-3px);
}

.pc-card-icon {
    width: 52px; height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 16px;
}

/* ===== SECTION ===== */
.section-label {
    display: inline-block;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--pc-gold);
    margin-bottom: 10px;
}

.section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -.3px;
    margin-bottom: 16px;
}

/* ===== ADVANTAGES ===== */
.advantages-section {
    background: linear-gradient(180deg, var(--pc-navy) 0%, #0c1d3a 100%);
    padding: 90px 0;
}

.adv-card {
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    height: 100%;
    transition: all .3s;
    position: relative;
    overflow: hidden;
}
.adv-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--pc-accent), var(--pc-gold));
    transform: scaleX(0);
    transition: transform .3s;
    transform-origin: left;
}
.adv-card:hover::before { transform: scaleX(1); }
.adv-card:hover {
    background: rgba(37,99,235,.06);
    border-color: rgba(37,99,235,.2);
    transform: translateY(-4px);
}

.adv-icon {
    font-size: 2.2rem;
    margin-bottom: 14px;
    display: block;
}

/* ===== PROCESS & TESTIMONIALS ===== */
.pc-process-section {
    background: linear-gradient(180deg, var(--pc-navy) 0%, #0b1a34 100%);
    border-top: 1px solid rgba(255,255,255,.05);
}

.process-card,
.testimonial-card {
    height: 100%;
    background: rgba(255,255,255,.035);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius);
    padding: 24px 22px;
}

.process-card {
    position: relative;
}

.process-step {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(245,166,35,.14);
    border: 1px solid rgba(245,166,35,.32);
    color: var(--pc-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Sora', sans-serif;
    font-weight: 800;
    margin-bottom: 16px;
}

.process-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: rgba(37,99,235,.12);
    color: #93c5fd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 16px;
}

.process-card h5,
.testimonial-name {
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
}

.process-card p,
.testimonial-card p,
.testimonial-role {
    color: #64748b;
    font-size: .9rem;
    line-height: 1.7;
}

.pc-testimonials-section {
    background: #0c1d3a;
    border-top: 1px solid rgba(255,255,255,.05);
}

.testimonial-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.testimonial-mark {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(16,185,129,.11);
    color: var(--pc-success);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

.testimonial-author {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,.07);
}

.testimonial-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pc-accent), var(--pc-gold));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Sora', sans-serif;
    font-weight: 800;
    flex-shrink: 0;
}

/* ===== AUTH FORMS ===== */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--pc-navy), #0c1d3a);
    padding: 40px 0;
}

.auth-box {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: var(--radius-lg);
    padding: 42px 40px;
    max-width: 520px;
    width: 100%;
    margin: 0 auto;
    box-shadow: var(--shadow-lg);
}

.auth-logo {
    font-family: 'Sora', sans-serif;
    font-weight: 800;
    font-size: 1.8rem;
    color: var(--pc-white);
    text-align: center;
    margin-bottom: 8px;
}
.auth-logo span { color: var(--pc-gold); }

/* ===== FORM CONTROLS ===== */
.pc-label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.pc-input {
    width: 100%;
    background: rgba(255,255,255,.06);
    border: 1.5px solid rgba(255,255,255,.1);
    border-radius: 10px;
    color: var(--pc-white);
    padding: 12px 16px;
    font-size: 16px;
    font-family: 'DM Sans', sans-serif;
    transition: all .2s;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    line-height: 1.35;
    min-height: 46px;
}
.pc-input:focus {
    border-color: var(--pc-accent);
    background: rgba(37,99,235,.08);
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
.pc-input::placeholder { color: #4a5568; }
.pc-input option { background: var(--pc-dark); color: var(--pc-white); }

.file-preview-box {
    display: none;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    padding: 10px 12px;
    min-height: 62px;
    background: rgba(255,255,255,.055);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 10px;
}

.file-preview-box.show {
    display: flex;
}

.file-preview-thumb {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(37,99,235,.14);
    color: #93c5fd;
    border: 1px solid rgba(37,99,235,.25);
    font-size: 1.25rem;
}

.file-preview-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.file-preview-meta {
    min-width: 0;
    flex: 1;
}

.file-preview-name {
    color: #fff;
    font-weight: 700;
    font-size: .9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-preview-size {
    color: #64748b;
    font-size: .78rem;
    margin-top: 2px;
}

.file-preview-clear {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px;
    background: rgba(255,255,255,.05);
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.file-preview-clear:hover {
    color: #fff;
    border-color: rgba(239,68,68,.35);
    background: rgba(239,68,68,.12);
}

.file-preview-compact {
    margin-top: 8px;
    min-height: 50px;
    padding: 8px 10px;
}

.file-preview-compact .file-preview-thumb {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    font-size: 1rem;
}

/* ===== STEPS ===== */
.steps-bar {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-bottom: 36px;
}

.step-dot {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    font-weight: 700;
    color: var(--pc-gray);
    transition: all .3s;
    font-family: 'Sora', sans-serif;
}
.step-dot.active {
    background: var(--pc-accent);
    border-color: var(--pc-accent);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(37,99,235,.25);
}
.step-dot.done {
    background: var(--pc-success);
    border-color: var(--pc-success);
    color: #fff;
}

.step-line {
    flex: 1;
    height: 2px;
    background: rgba(255,255,255,.1);
    border-radius: 2px;
}
.step-line.done { background: var(--pc-success); }

/* ===== DASHBOARD ===== */
.dash-layout {
    display: flex;
    min-height: 100vh;
}

.dash-sidebar {
    width: 260px;
    background: rgba(10,22,40,.97);
    border-right: 1px solid rgba(255,255,255,.07);
    padding: 0;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 200;
    overflow-y: auto;
}

.sidebar-logo {
    padding: 24px 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,.07);
    font-family: 'Sora', sans-serif;
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--pc-white);
}
.sidebar-logo span { color: var(--pc-gold); }

.sidebar-nav {
    padding: 16px 12px;
    flex: 1;
}

.sidebar-nav .nav-item {
    margin-bottom: 4px;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #8b9bb4 !important;
    padding: 12px 16px;
    border-radius: 10px;
    font-weight: 500;
    font-size: .95rem;
    transition: all .2s;
}
.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    background: rgba(37,99,235,.15);
    color: var(--pc-white) !important;
    border-left: 3px solid var(--pc-accent);
}
.sidebar-nav .nav-link i { font-size: 1.1rem; width: 20px; }

.sidebar-user {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,.07);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pc-accent), var(--pc-gold));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .95rem;
    color: #fff;
    flex-shrink: 0;
    font-family: 'Sora', sans-serif;
}

.dash-content {
    margin-left: 260px;
    flex: 1;
    padding: 32px;
    background: var(--pc-navy);
    min-height: 100vh;
}

/* ===== STAT CARDS ===== */
.stat-card {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius-lg);
    padding: 24px 22px;
    position: relative;
    overflow: hidden;
}
.stat-card::after {
    content: '';
    position: absolute;
    right: -20px; bottom: -20px;
    width: 80px; height: 80px;
    border-radius: 50%;
    background: rgba(255,255,255,.03);
}

.stat-value {
    font-family: 'Sora', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--pc-white);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: .82rem;
    color: var(--pc-gray);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.stat-icon {
    font-size: 1.6rem;
    margin-bottom: 14px;
}

.admin-dashboard-page .stat-card {
    height: 100%;
}

/* ===== STATUS BADGES ===== */
.badge-status {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.badge-en_attente    { background: rgba(245,158,11,.15); color: var(--pc-warn); }
.badge-garantie_payee { background: rgba(99,102,241,.15); color: #818cf8; }
.badge-approuve      { background: rgba(16,185,129,.15); color: var(--pc-success); }
.badge-refuse        { background: rgba(239,68,68,.15); color: var(--pc-danger); }
.badge-en_cours      { background: rgba(37,99,235,.15); color: #60a5fa; }
.badge-rembourse     { background: rgba(100,116,139,.15); color: #94a3b8; }

/* ===== LOAN SUMMARY ===== */
.loan-summary-box {
    background: linear-gradient(135deg, rgba(37,99,235,.12), rgba(245,166,35,.08));
    border: 1px solid rgba(37,99,235,.25);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 28px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.summary-row:last-child { border-bottom: none; }

.summary-label { color: var(--pc-gray); font-size: .93rem; }
.summary-value {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    color: var(--pc-white);
    font-size: 1.05rem;
}
.summary-value.gold { color: var(--pc-gold); font-size: 1.15rem; }

/* ===== BANQUE BOX ===== */
.banque-box {
    background: rgba(37,99,235,.08);
    border: 1.5px solid rgba(37,99,235,.25);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
}
.banque-box .banque-label {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--pc-gray);
    margin-bottom: 3px;
}
.banque-box .banque-val {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    color: var(--pc-white);
    font-size: 1.05rem;
    word-break: break-all;
}

/* ===== CHAT ===== */
.chat-wrapper {
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 480px;
    min-height: 0;
}

.chat-header {
    background: rgba(37,99,235,.15);
    border-bottom: 1px solid rgba(255,255,255,.07);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-online-dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--pc-success);
    box-shadow: 0 0 0 3px rgba(16,185,129,.25);
}

.chat-messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: scroll;
    overflow-x: hidden;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: rgba(148,163,184,.55) rgba(255,255,255,.04);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(255,255,255,.04);
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(148,163,184,.55);
    border-radius: 10px;
}

.chat-bubble {
    max-width: 75%;
    padding: 10px 16px;
    border-radius: 14px;
    font-size: .92rem;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-attachment {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 8px;
    border-radius: 10px;
    background: rgba(255,255,255,.1);
    color: inherit;
    text-decoration: none;
}

.chat-attachment:hover {
    color: inherit;
    background: rgba(255,255,255,.16);
}

.chat-attachment img {
    width: 86px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
    flex: 0 0 auto;
}

.chat-attachment i {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.12);
    font-size: 1.15rem;
    flex: 0 0 auto;
}

.chat-bubble.admin {
    background: rgba(37,99,235,.2);
    border: 1px solid rgba(37,99,235,.25);
    border-radius: 14px 14px 14px 4px;
    align-self: flex-start;
    color: #c7d7f0;
}

.chat-bubble.client {
    background: linear-gradient(135deg, var(--pc-accent), #1d4ed8);
    color: #fff;
    align-self: flex-end;
    border-radius: 14px 14px 4px 14px;
}

.admin-chat-messages .chat-bubble.admin {
    align-self: flex-end !important;
    margin-left: auto;
    margin-right: 0;
    border-radius: 14px 14px 4px 14px;
    background: linear-gradient(135deg, var(--pc-accent), #1d4ed8);
    color: #fff;
}

.admin-chat-messages .chat-bubble.from-admin {
    align-self: flex-end !important;
    margin-left: auto;
    margin-right: 0;
}

.admin-chat-messages .chat-bubble.client {
    align-self: flex-start !important;
    margin-left: 0;
    margin-right: auto;
    border-radius: 14px 14px 14px 4px;
    background: rgba(37,99,235,.2);
    border: 1px solid rgba(37,99,235,.25);
    color: #c7d7f0;
}

.admin-chat-messages .chat-bubble.from-client {
    align-self: flex-start !important;
    margin-left: 0;
    margin-right: auto;
}

.admin-chat-shell,
.admin-chat-panel {
    min-height: 0;
}

.admin-chat-shell {
    overflow: hidden;
    display: flex;
    height: clamp(480px, calc(100dvh - 320px), 680px);
    min-height: 480px;
    background: rgba(255,255,255,.025);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius-lg);
}

.admin-chat-list {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    min-height: 0;
    background: rgba(255,255,255,.02);
    border-right: 1px solid rgba(255,255,255,.07);
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.admin-chat-panel {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.admin-chat-header,
.admin-chat-composer {
    flex-shrink: 0;
}

.admin-chat-header {
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255,255,255,.07);
    background: rgba(37,99,235,.08);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.admin-chat-header > div:nth-child(2) {
    min-width: 0;
}

.admin-chat-header > div:nth-child(2) > div {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-chat-body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 16px;
    overflow: hidden;
}

.admin-chat-conversation {
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius-lg);
}

.admin-chat-messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.admin-chat-composer {
    flex: 0 0 auto;
    padding: 14px 16px;
    border-top: 1px solid rgba(255,255,255,.07);
    background: rgba(10,22,40,.96);
}

.admin-chat-composer form {
    display: flex;
    width: 100%;
    min-width: 0;
    gap: 10px;
}

.admin-chat-composer .pc-input {
    flex: 1 1 auto;
    min-width: 0;
}

.admin-chat-send-btn {
    flex: 0 0 auto;
    min-height: 46px;
    padding: 10px 20px;
    font-size: .88rem;
    white-space: nowrap;
}

.chat-time {
    font-size: .7rem;
    color: var(--pc-gray);
    margin-top: 4px;
    display: block;
}

.admin-chat-date-stat {
    font-size: 1.05rem;
    line-height: 1.25;
}

.admin-chat-titlebar {
    gap: 16px;
}

@media (max-width: 1199.98px) {
    .admin-chat-shell {
        height: calc(100dvh - 250px);
    }

    .admin-chat-body {
        padding: 12px;
    }
}

@media (max-width: 991.98px) {
    .admin-chat-shell {
        height: calc(100dvh - 180px);
        min-height: 560px;
        overflow: hidden;
        flex-direction: column;
    }

    .admin-chat-list {
        flex: 0 0 auto;
        max-height: 180px;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,.07);
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }

    .admin-chat-panel {
        flex: 1 1 auto;
        overflow: hidden;
    }

    .admin-chat-body {
        overflow: hidden;
    }

    .admin-chat-conversation {
        min-height: 0;
    }
}

.chat-input-area {
    border-top: 1px solid rgba(255,255,255,.07);
    padding: 12px 16px;
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.btn-chat-attach {
    background: rgba(255,255,255,.06);
    color: #cbd5e1;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 10px;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    cursor: pointer;
    transition: background .2s, border-color .2s, color .2s;
}

.btn-chat-attach:hover {
    background: rgba(37,99,235,.16);
    border-color: rgba(37,99,235,.35);
    color: #fff;
}

.chat-input {
    flex: 1;
    background: rgba(255,255,255,.06);
    border: 1.5px solid rgba(255,255,255,.1);
    border-radius: 10px;
    color: #fff;
    padding: 10px 14px;
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    resize: none;
    outline: none;
    min-height: 42px;
    max-height: 100px;
    transition: border .2s;
}
.chat-input:focus { border-color: var(--pc-accent); }
.chat-input::placeholder { color: #4a5568; }

.btn-chat-send {
    background: linear-gradient(135deg, var(--pc-accent), #1d4ed8);
    color: #fff;
    border: none;
    border-radius: 10px;
    width: 42px; height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform .2s;
    flex-shrink: 0;
}
.btn-chat-send:hover { transform: scale(1.07); }

/* ===== ALERTS ===== */
.alert-pc {
    border-radius: 10px;
    padding: 14px 18px;
    border: 1px solid;
    font-size: .93rem;
    margin-bottom: 20px;
}
.alert-pc-success {
    background: rgba(16,185,129,.1);
    border-color: rgba(16,185,129,.3);
    color: #6ee7b7;
}
.alert-pc-danger {
    background: rgba(239,68,68,.1);
    border-color: rgba(239,68,68,.3);
    color: #fca5a5;
}
.alert-pc-info {
    background: rgba(37,99,235,.1);
    border-color: rgba(37,99,235,.3);
    color: #93c5fd;
}
.alert-pc-warn {
    background: rgba(245,158,11,.1);
    border-color: rgba(245,158,11,.3);
    color: #fcd34d;
}

/* ===== TABLE ===== */
.pc-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 6px;
}
.pc-table thead th {
    padding: 10px 16px;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--pc-gray);
    font-weight: 600;
    background: none;
    border: none;
}
.pc-table tbody tr {
    background: rgba(255,255,255,.03);
    border-radius: var(--radius);
    transition: background .2s;
}
.pc-table tbody tr:hover { background: rgba(255,255,255,.06); }
.pc-table tbody td {
    padding: 14px 16px;
    vertical-align: middle;
    border-top: 1px solid rgba(255,255,255,.05);
    border-bottom: 1px solid rgba(255,255,255,.05);
}
.pc-table tbody td:first-child {
    border-left: 1px solid rgba(255,255,255,.05);
    border-radius: 10px 0 0 10px;
}
.pc-table tbody td:last-child {
    border-right: 1px solid rgba(255,255,255,.05);
    border-radius: 0 10px 10px 0;
}

/* ===== ADMIN ===== */
.admin-sidebar {
    background: rgba(5,12,28,.98);
    border-right: 1px solid rgba(255,255,255,.07);
}

.admin-mobile-topbar,
.admin-sidebar-backdrop {
    display: none;
}

.admin-menu-toggle {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 10px;
    background: rgba(255,255,255,.06);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.admin-mobile-brand {
    font-family: 'Sora', sans-serif;
    font-size: 1.08rem;
    font-weight: 800;
    color: #fff;
}

.admin-mobile-brand span {
    color: var(--pc-gold);
}

.client-mobile-topbar,
.client-sidebar-backdrop {
    display: none;
}

.client-menu-toggle {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 10px;
    background: rgba(255,255,255,.06);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.client-mobile-brand {
    font-family: 'Sora', sans-serif;
    font-size: 1.08rem;
    font-weight: 800;
    color: #fff;
}

.client-mobile-brand span {
    color: var(--pc-gold);
}

/* ===== PROGRESS ===== */
.pc-progress {
    height: 6px;
    background: rgba(255,255,255,.07);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 8px;
}
.pc-progress-bar {
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--pc-accent), var(--pc-gold));
    transition: width .6s ease;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 4px; }

/* ===== RANGE INPUT ===== */
.pc-range {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 4px;
    background: rgba(255,255,255,.1);
    outline: none;
    cursor: pointer;
}
.pc-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pc-accent), #1d4ed8);
    box-shadow: 0 2px 8px rgba(37,99,235,.5);
    cursor: pointer;
}

/* ===== CHECKBOX ===== */
.pc-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    margin-bottom: 12px;
}
.pc-check input[type="checkbox"] {
    width: 18px; height: 18px;
    border-radius: 4px;
    accent-color: var(--pc-accent);
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .dash-sidebar { transform: translateX(-260px); transition: transform .3s; }
    .dash-sidebar.open { transform: translateX(0); }
    .dash-content { margin-left: 0; padding: 20px 16px; }
    .auth-box { padding: 28px 22px; }
    .hero-title { font-size: 2.2rem; }
    .whatsapp-assistant-fab {
        right: 16px;
        bottom: 16px;
        min-width: 54px;
        width: 54px;
        padding: 0;
    }
    .whatsapp-assistant-fab span {
        display: none;
    }
    .email-assistant-fab {
        right: 16px;
        bottom: 78px;
    }
}

/* ===== WHATSAPP BUTTON ===== */
.btn-whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 14px 28px;
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all .25s;
    box-shadow: 0 4px 20px rgba(37,211,102,.35);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.btn-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(37,211,102,.5);
    color: #fff;
}

.btn-email {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 14px 28px;
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all .25s;
    box-shadow: 0 4px 20px rgba(37,99,235,.35);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.btn-email:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(37,99,235,.5);
    color: #fff;
}

.whatsapp-assistant-fab {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1100;
    min-height: 54px;
    padding: 0 20px;
    border-radius: 999px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Sora', sans-serif;
    font-size: .94rem;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 12px 32px rgba(18,140,126,.42);
    transition: transform .2s ease, box-shadow .2s ease;
}
.whatsapp-assistant-fab i {
    font-size: 1.35rem;
}
.whatsapp-assistant-fab:hover {
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(18,140,126,.5);
}

.email-assistant-fab {
    position: fixed;
    right: 24px;
    bottom: 86px;
    z-index: 1100;
    width: 54px;
    height: 54px;
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 12px 32px rgba(37,99,235,.36);
    transition: transform .2s ease, box-shadow .2s ease;
}

.email-assistant-fab i {
    font-size: 1.25rem;
}

.email-assistant-fab:hover {
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(37,99,235,.44);
}

/* ===== NB BOX ===== */
.nb-box {
    background: rgba(245,166,35,.07);
    border: 1px solid rgba(245,166,35,.25);
    border-left: 4px solid var(--pc-gold);
    border-radius: var(--radius);
    padding: 18px 20px;
    font-size: .93rem;
    color: #e2c680;
    margin-bottom: 20px;
}

/* ===== FOOTER ===== */
.pc-footer {
    background: rgba(5,12,28,.98);
    border-top: 1px solid rgba(255,255,255,.07);
}

/* CREDIT ACCOUNT ADMIN */
.credit-form-box {
    background: rgba(16,185,129,.06);
    border: 1px solid rgba(16,185,129,.2);
    border-radius: var(--radius-lg);
    padding: 28px;
}

/* DOCUMENT PREVIEWS */
.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
    align-items: start;
}

.document-preview {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius);
    overflow: hidden;
    min-width: 0;
}

.document-preview-media {
    width: 100%;
    aspect-ratio: 4 / 3;
    min-height: 220px;
    max-height: 440px;
    background: rgba(5,12,28,.55);
    border-bottom: 1px solid rgba(255,255,255,.07);
    overflow: hidden;
}

.document-preview-media img,
.document-preview-media object {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
}

.document-preview-media img {
    object-fit: contain;
    object-position: center;
}

.document-preview-pdf .document-preview-media {
    aspect-ratio: auto;
    height: clamp(360px, 48vw, 620px);
    max-height: 70vh;
}

.document-preview-pdf.document-preview-compact .document-preview-media {
    height: clamp(300px, 38vw, 480px);
}

.document-preview-image .document-preview-media {
    height: auto;
}

.document-preview-fallback {
    width: 100%;
    height: 100%;
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: .9rem;
}

.document-preview-fallback i {
    font-size: 2rem;
}

.document-preview-meta {
    padding: 12px 14px 14px;
}

.document-preview-title {
    color: #fff;
    font-weight: 700;
    font-size: .9rem;
}

.document-preview-file {
    color: #94a3b8;
    font-size: .76rem;
    margin-top: 3px;
    word-break: break-all;
}

.document-preview-date {
    color: #64748b;
    font-size: .74rem;
    margin-top: 4px;
}

.document-preview-link {
    margin-top: 10px;
    padding: 6px 10px;
    font-size: .76rem;
}

.document-preview-compact .document-preview-media {
    aspect-ratio: 16 / 11;
    min-height: 180px;
    max-height: 340px;
}

/* ===== VIREMENTS ===== */
.virement-panel,
.virement-code-box,
.virement-admin-step {
    background: rgba(255,255,255,.035);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius);
    padding: 18px;
}

.virement-admin-step + .virement-admin-step {
    margin-top: 14px;
}

.virement-processing {
    max-width: 760px;
}

.virement-percent {
    font-family: 'Sora', sans-serif;
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--pc-gold);
}

.virement-progress {
    height: 16px;
    width: 100%;
    overflow: hidden;
    background: rgba(255,255,255,.07);
    border-radius: 999px;
}

.virement-progress > div {
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--pc-accent), var(--pc-gold));
    transition: width .18s linear;
}

.badge-code_initial { background: rgba(245,158,11,.15); color: var(--pc-warn); }
.badge-termine { background: rgba(16,185,129,.15); color: var(--pc-success); }
.badge-annule { background: rgba(239,68,68,.15); color: var(--pc-danger); }

/* ===== GLOBAL RESPONSIVE REFINEMENTS ===== */
@media (max-width: 1199.98px) {
    .dash-sidebar {
        width: 230px;
    }

    .dash-content {
        margin-left: 230px;
        padding: 26px 22px;
    }

    .pc-card {
        padding: 24px 20px;
    }

    .documents-grid {
        grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    }
}

@media (max-width: 991.98px) {
    .pc-hero {
        min-height: auto;
        padding: 56px 0 42px;
    }

    .hero-card {
        margin-top: 24px;
    }

    .dash-layout {
        display: block;
        min-height: 100vh;
    }

    .dash-sidebar,
    .dash-sidebar.open {
        position: sticky;
        top: 0;
        left: 0;
        bottom: auto;
        width: 100%;
        height: auto;
        max-height: none;
        transform: none;
        z-index: 1200;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,.08);
    }

    .sidebar-logo {
        padding: 14px 16px 10px;
        font-size: 1.12rem;
    }

    .sidebar-nav {
        padding: 8px 10px 10px;
        overflow-x: auto;
        flex: none;
        -webkit-overflow-scrolling: touch;
    }

    .sidebar-nav .nav {
        flex-direction: row !important;
        flex-wrap: nowrap;
        gap: 8px;
        width: max-content;
        min-width: 100%;
    }

    .sidebar-nav .nav-item {
        margin-bottom: 0;
    }

    .sidebar-nav .nav-link {
        white-space: nowrap;
        padding: 10px 12px;
        border-radius: 8px;
        font-size: .86rem;
        border-left: none;
    }

    .sidebar-nav .nav-link:hover,
    .sidebar-nav .nav-link.active {
        border-left: none;
        box-shadow: inset 0 -2px 0 var(--pc-accent);
    }

    .sidebar-user {
        display: none;
    }

    .dash-content {
        margin-left: 0;
        padding: 22px 16px 28px;
    }

    .auth-wrapper {
        align-items: flex-start;
        padding: 24px 14px;
    }

    .auth-box {
        max-width: 680px;
    }

    .pc-card {
        border-radius: var(--radius);
    }

    .loan-summary-box,
    .banque-box,
    .credit-form-box {
        padding: 20px;
        border-radius: var(--radius);
    }

    .chat-wrapper {
        height: min(480px, 68vh) !important;
    }

    .chat-bubble {
        max-width: 88%;
    }

    .pc-table {
        min-width: 640px;
    }

    .pc-card:has(.pc-table) {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .documents-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }

    .admin-mobile-topbar {
        position: sticky;
        top: 0;
        z-index: 1300;
        min-height: 58px;
        padding: 8px 12px;
        background: rgba(5,12,28,.98);
        border-bottom: 1px solid rgba(255,255,255,.08);
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .admin-layout {
        display: block;
    }

    .admin-layout .admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(82vw, 310px);
        height: 100vh;
        max-height: 100vh;
        transform: translateX(-104%);
        transition: transform .25s ease;
        z-index: 1400;
        display: flex;
        flex-direction: column;
        overflow-y: auto;
        border-right: 1px solid rgba(255,255,255,.09);
        border-bottom: none;
        box-shadow: 18px 0 42px rgba(0,0,0,.35);
    }

    .admin-layout .admin-sidebar.admin-sidebar-open {
        transform: translateX(0);
    }

    .admin-layout .admin-sidebar .sidebar-logo {
        padding: 22px 20px 18px;
        font-size: 1.25rem;
    }

    .admin-layout .admin-sidebar .sidebar-nav {
        padding: 14px 12px;
        overflow-x: visible;
        overflow-y: auto;
        flex: 1;
    }

    .admin-layout .admin-sidebar .sidebar-nav .nav {
        flex-direction: column !important;
        width: 100%;
        min-width: 0;
        gap: 4px;
    }

    .admin-layout .admin-sidebar .sidebar-nav .nav-link {
        white-space: normal;
        width: 100%;
        justify-content: flex-start;
        padding: 12px 14px;
        font-size: .92rem;
        box-shadow: none;
    }

    .admin-layout .admin-sidebar .sidebar-nav .nav-link:hover,
    .admin-layout .admin-sidebar .sidebar-nav .nav-link.active {
        border-left: 3px solid var(--pc-accent);
        box-shadow: none;
    }

    .admin-layout .admin-sidebar .sidebar-user {
        display: flex;
    }

    .admin-sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1350;
        background: rgba(3,7,18,.62);
        backdrop-filter: blur(2px);
    }

    .admin-sidebar-backdrop.show {
        display: block;
    }

    body.admin-menu-open {
        overflow: hidden;
    }

    .admin-layout .dash-content {
        margin-left: 0;
        padding-top: 20px;
    }
}

@media (max-width: 767.98px) {
    body {
        font-size: 14px;
    }

    .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .pc-navbar {
        padding: 10px 0;
    }

    .pc-navbar .navbar-brand {
        font-size: 1.22rem;
    }

    .hero-title {
        font-size: 2rem;
        line-height: 1.15;
    }

    .hero-card {
        padding: 24px 18px;
    }

    .hero-card .display-amount {
        font-size: 2.35rem;
    }

    .dash-content {
        padding: 18px 12px 26px;
    }

    .dash-content > .d-flex {
        flex-wrap: wrap;
    }

    .dash-content > .d-flex form {
        width: 100%;
    }

    .dash-content > .d-flex .pc-input,
    .dash-content > .d-flex [style*="max-width"] {
        max-width: none !important;
        width: 100% !important;
    }

    .pc-card {
        padding: 18px 14px;
    }

    .stat-card {
        padding: 18px 14px;
    }

    .stat-value {
        font-size: 1.35rem;
    }

    .summary-row {
        align-items: flex-start;
        gap: 8px;
    }

    .summary-label {
        max-width: 44%;
    }

    .summary-value {
        max-width: 56%;
        text-align: right;
        font-size: .94rem;
        word-break: break-word;
    }

    .loan-summary-box {
        margin-bottom: 18px;
    }

    .pc-label {
        font-size: .78rem;
    }

    .steps-bar {
        margin-bottom: 24px;
    }

    .step-dot {
        width: 28px;
        height: 28px;
        font-size: .76rem;
    }

    .pc-input,
    .chat-input,
    input,
    select,
    textarea,
    button {
        font-size: 16px !important;
    }

    .btn-pc-primary,
    .btn-pc-gold,
    .btn-pc-outline,
    .btn-whatsapp,
    .btn-email {
        width: 100%;
        justify-content: center;
        padding: 12px 16px;
        min-height: 46px;
    }

    .d-flex.gap-2,
    .d-flex.gap-3 {
        row-gap: 10px !important;
    }

    form.d-flex,
    .chat-input-area form {
        align-items: stretch;
    }

    .chat-input-area {
        padding: 10px;
    }

    .btn-chat-send {
        width: 46px;
        height: 46px;
    }

    .auth-box {
        padding: 24px 16px;
        border-radius: var(--radius);
    }

    .documents-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .document-preview-media,
    .document-preview-compact .document-preview-media {
        aspect-ratio: 4 / 3;
        min-height: 210px;
        max-height: 380px;
    }

    .document-preview-pdf .document-preview-media,
    .document-preview-pdf.document-preview-compact .document-preview-media {
        aspect-ratio: auto;
        height: min(68vh, 520px);
        min-height: 360px;
        max-height: none;
    }

    .document-preview-link {
        width: auto;
        min-height: 38px;
        padding: 7px 12px;
    }

    .whatsapp-assistant-fab {
        right: 12px;
        bottom: 12px;
    }

    .pc-footer {
        margin-top: 28px !important;
    }

    .dash-content > .row.g-0 {
        height: auto !important;
        min-height: 0 !important;
    }

    .dash-content > .row.g-0 > [class*="col-"] {
        width: 100%;
        border-right: none !important;
        border-radius: var(--radius) !important;
    }
}

@media (max-width: 575.98px) {
    .sidebar-logo {
        padding: 12px 12px 8px;
    }

    .sidebar-nav {
        padding-left: 8px;
        padding-right: 8px;
    }

    .sidebar-nav .nav-link {
        padding: 9px 10px;
        font-size: .8rem;
        gap: 8px;
    }

    .sidebar-nav .nav-link i {
        font-size: 1rem;
        width: auto;
    }

    .dash-content h4,
    .dash-content h5 {
        font-size: 1.05rem;
    }

    .pc-table {
        min-width: 560px;
    }

    .pc-table thead th,
    .pc-table tbody td {
        padding: 10px 12px;
        font-size: .82rem;
    }

    .chat-wrapper {
        height: min(430px, 62vh) !important;
    }

    .chat-messages {
        padding: 14px 10px;
    }

    .chat-bubble {
        max-width: 94%;
        padding: 9px 12px;
    }
}

.client-assistance-page .chat-wrapper {
    height: min(560px, calc(100dvh - 190px));
    min-height: 480px;
}

.client-assistance-page .chat-header,
.client-assistance-page .chat-input-area {
    flex: 0 0 auto;
}

.client-assistance-page .chat-messages {
    flex: 1 1 auto;
    min-height: 0;
}

.client-assistance-page .chat-input-area {
    background: rgba(15,23,42,.96);
}

.client-assistance-page .support-contact-card {
    height: auto;
    min-height: 280px;
}

@media (max-width: 991.98px) {
    .client-assistance-page .chat-wrapper {
        height: min(520px, calc(100dvh - 170px));
        min-height: 420px;
    }
}

@media (max-width: 575.98px) {
    .client-assistance-page .chat-wrapper {
        height: min(500px, calc(100dvh - 150px));
        min-height: 380px;
    }
}

@media (max-width: 991.98px) {
    .client-mobile-topbar {
        position: sticky;
        top: 0;
        z-index: 1300;
        min-height: 58px;
        padding: 8px 12px;
        background: rgba(5,12,28,.98);
        border-bottom: 1px solid rgba(255,255,255,.08);
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .dash-layout:not(.admin-layout) {
        display: block;
    }

    .dash-layout:not(.admin-layout) .dash-sidebar,
    .dash-layout:not(.admin-layout) .dash-sidebar.open {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(82vw, 310px);
        height: 100vh;
        max-height: 100vh;
        transform: translateX(-104%);
        transition: transform .25s ease;
        z-index: 1400;
        display: flex;
        flex-direction: column;
        overflow-y: auto;
        border-right: 1px solid rgba(255,255,255,.09);
        border-bottom: none;
        box-shadow: 18px 0 42px rgba(0,0,0,.35);
    }

    .dash-layout:not(.admin-layout) .dash-sidebar.open {
        transform: translateX(0);
    }

    .dash-layout:not(.admin-layout) .sidebar-logo {
        padding: 22px 20px 18px;
        font-size: 1.25rem;
    }

    .dash-layout:not(.admin-layout) .sidebar-nav {
        padding: 14px 12px;
        overflow-x: visible;
        overflow-y: auto;
        flex: 1;
    }

    .dash-layout:not(.admin-layout) .sidebar-nav .nav {
        flex-direction: column !important;
        width: 100%;
        min-width: 0;
        gap: 4px;
    }

    .dash-layout:not(.admin-layout) .sidebar-nav .nav-link {
        white-space: normal;
        width: 100%;
        justify-content: flex-start;
        padding: 12px 14px;
        font-size: .92rem;
        box-shadow: none;
    }

    .dash-layout:not(.admin-layout) .sidebar-nav .nav-link:hover,
    .dash-layout:not(.admin-layout) .sidebar-nav .nav-link.active {
        border-left: 3px solid var(--pc-accent);
        box-shadow: none;
    }

    .dash-layout:not(.admin-layout) .sidebar-user {
        display: flex;
    }

    .client-sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1350;
        background: rgba(3,7,18,.62);
        backdrop-filter: blur(2px);
    }

    .client-sidebar-backdrop.show {
        display: block;
    }

    body.client-menu-open {
        overflow: hidden;
    }
}

/* ===== MOBILE RESPONSIVE HARDENING ===== */
@media (max-width: 767.98px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: clip;
    }

    body {
        min-width: 0;
    }

    .container,
    .container-fluid,
    .row,
    [class*="col-"],
    .dash-layout,
    .dash-content,
    .pc-card,
    .auth-box,
    .loan-summary-box,
    .banque-box,
    .credit-form-box,
    .virement-panel,
    .virement-code-box,
    .virement-admin-step,
    .chat-wrapper,
    .chat-messages,
    .documents-grid,
    .document-preview {
        min-width: 0;
        max-width: 100%;
    }

    .row {
        margin-left: 0;
        margin-right: 0;
    }

    .row > * {
        padding-left: 0;
        padding-right: 0;
    }

    .dash-content {
        width: 100%;
        overflow-x: clip;
    }

    .dash-content > .d-flex,
    .pc-card > .d-flex,
    .credit-form-box > .d-flex,
    .virement-admin-step > .row,
    form.d-flex {
        flex-wrap: wrap;
        min-width: 0;
    }

    .dash-content > .d-flex > *,
    .pc-card > .d-flex > *,
    .credit-form-box > .d-flex > *,
    form.d-flex > * {
        min-width: 0;
    }

    input,
    select,
    textarea,
    button,
    .pc-input,
    .chat-input,
    .form-control,
    .form-select {
        max-width: 100%;
        font-size: 16px !important;
    }

    input,
    select,
    textarea,
    .pc-input,
    .chat-input,
    .form-control,
    .form-select {
        transform: translateZ(0);
    }

    .btn-pc-primary,
    .btn-pc-gold,
    .btn-pc-outline,
    .btn-whatsapp {
        max-width: 100%;
        white-space: normal;
        text-align: center;
    }

    .table-responsive,
    .pc-card:has(.pc-table),
    div[style*="overflow-x:auto"],
    div[style*="overflow-x: auto"] {
        width: 100%;
        max-width: 100%;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .pc-table {
        width: max-content;
        min-width: min(560px, 100%);
    }

    .pc-table th,
    .pc-table td {
        white-space: nowrap;
    }

    .summary-row {
        min-width: 0;
    }

    .summary-label,
    .summary-value,
    .banque-val,
    .document-preview-file,
    .chat-bubble,
    .sidebar-user,
    .sidebar-nav .nav-link,
    .admin-layout .sidebar-nav .nav-link,
    .dash-layout:not(.admin-layout) .sidebar-nav .nav-link {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .chat-messages {
        width: 100%;
        overflow-x: hidden;
    }

    .chat-bubble {
        max-width: 92%;
    }

    .chat-input-area {
        width: 100%;
        min-width: 0;
    }

    .chat-input-area form {
        display: flex;
        width: 100%;
        min-width: 0;
        gap: 10px;
    }

    .chat-input-area .chat-input {
        min-width: 0;
    }

    .btn-chat-send {
        flex: 0 0 46px;
    }

    .auth-wrapper {
        min-height: 100dvh;
    }

    .auth-box {
        margin-left: auto;
        margin-right: auto;
    }

    .whatsapp-assistant-fab {
        max-width: calc(100vw - 24px);
    }

    .dash-content > .row.g-0.admin-chat-shell,
    .dash-content > .admin-chat-shell {
        height: calc(100dvh - 132px) !important;
        min-height: min(560px, calc(100dvh - 132px)) !important;
        overflow: hidden !important;
        display: flex !important;
        flex-direction: column;
    }

    .admin-chat-shell > .admin-chat-list,
    .dash-content > .admin-chat-shell > .admin-chat-list {
        flex: 0 0 auto;
        max-height: 132px;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        border-right: none !important;
        border-bottom: 1px solid rgba(255,255,255,.07);
        border-radius: var(--radius) var(--radius) 0 0 !important;
    }

    .admin-chat-shell > .admin-chat-panel,
    .dash-content > .row.g-0.admin-chat-shell > .admin-chat-panel,
    .dash-content > .admin-chat-shell > .admin-chat-panel {
        flex: 1 1 auto;
        height: auto;
        min-height: 0;
        overflow: hidden !important;
        display: flex !important;
        flex-direction: column;
        border-radius: 0 0 var(--radius) var(--radius) !important;
    }

    .admin-chat-header {
        gap: 10px !important;
        padding: 12px !important;
    }

    .admin-chat-header .ms-auto {
        margin-left: 0 !important;
    }

    .admin-chat-header .btn-pc-outline {
        width: auto;
        min-height: 38px;
        padding: 7px 10px !important;
        font-size: .78rem !important;
    }

    .admin-chat-messages {
        flex: 1 1 auto;
        min-height: 0;
        padding: 14px 10px !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
    }

    .admin-chat-body {
        flex: 1 1 auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 10px;
        overflow: hidden;
    }

    .admin-chat-conversation {
        flex: 1 1 auto;
        min-height: 0;
        border-radius: var(--radius);
    }

    .admin-chat-composer {
        flex-shrink: 0;
        padding: 10px !important;
    }

    .admin-chat-composer form {
        display: flex;
        flex-wrap: nowrap;
        width: 100%;
        min-width: 0;
        gap: 8px !important;
        align-items: stretch;
    }

    .admin-chat-composer .pc-input {
        flex: 1 1 auto !important;
        min-width: 0;
    }

    .admin-chat-composer .btn-pc-primary {
        width: auto;
        flex: 0 0 auto;
        min-height: 46px;
        padding: 10px 12px !important;
        white-space: nowrap;
    }

    .admin-chat-messages .chat-bubble {
        max-width: 94%;
    }

}

@media (max-width: 420px) {
    .dash-content {
        padding-left: 10px;
        padding-right: 10px;
    }

    .pc-card,
    .auth-box,
    .loan-summary-box,
    .banque-box,
    .credit-form-box,
    .virement-panel,
    .virement-code-box,
    .virement-admin-step {
        padding-left: 12px;
        padding-right: 12px;
    }

    .chat-input-area {
        gap: 8px;
        padding-left: 8px;
        padding-right: 8px;
    }

    .chat-bubble {
        max-width: 96%;
    }

    .admin-chat-composer {
        padding: 8px !important;
    }

    .admin-chat-composer form {
        gap: 6px !important;
    }

    .admin-chat-send-btn {
        width: 46px !important;
        min-width: 46px;
        padding: 0 !important;
        justify-content: center;
    }

    .admin-chat-send-btn i {
        margin: 0;
    }

    .admin-chat-send-btn {
        font-size: 0 !important;
    }

    .admin-chat-send-btn i {
        font-size: 1rem;
    }
}

/* ===== PROFESSIONAL HOME FOOTER ===== */
.index-footer {
    background: rgba(5,12,28,.98);
    border-top: 1px solid rgba(255,255,255,.08);
    color: #d4dff0;
}

.index-footer-main {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(140px, .7fr) minmax(140px, .7fr) minmax(220px, 1fr);
    gap: 34px;
    padding: 52px 0 34px;
}

.index-footer-logo {
    display: inline-block;
    font-family: 'Sora', sans-serif;
    font-weight: 800;
    font-size: 1.35rem;
    color: #fff;
    text-decoration: none;
    margin-bottom: 14px;
}

.index-footer-logo span {
    color: var(--pc-gold);
}

.index-footer-brand p,
.index-footer-contact p {
    color: #8b9bb4;
    line-height: 1.7;
    margin: 0;
    max-width: 440px;
}

.index-footer-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.index-footer-trust span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 10px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 8px;
    background: rgba(255,255,255,.04);
    color: #cbd5e1;
    font-size: .84rem;
    font-weight: 600;
}

.index-footer-trust i {
    color: var(--pc-gold);
}

.index-footer-col h6,
.index-footer-contact h6 {
    color: #fff;
    font-size: .8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 14px;
}

.index-footer-col a {
    display: block;
    color: #8b9bb4;
    text-decoration: none;
    font-weight: 600;
    font-size: .92rem;
    margin-bottom: 10px;
}

.index-footer-col a:hover {
    color: var(--pc-gold);
}

.index-footer-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
    padding: 10px 14px;
    border-radius: 8px;
    background: #16a34a;
    color: #ffffff;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(22,163,74,.2);
}

.index-footer-whatsapp:hover {
    color: #ffffff;
    background: #15803d;
}

.index-footer-email {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    background: #2563eb;
    color: #ffffff;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(37,99,235,.2);
}

.index-footer-email:hover {
    color: #ffffff;
    background: #1d4ed8;
}

.index-footer-bottom {
    border-top: 1px solid rgba(255,255,255,.08);
    padding: 18px 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    color: #64748b;
    font-size: .86rem;
}

@media (max-width: 991.98px) {
    .index-footer-main {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 575.98px) {
    .index-footer-main {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 38px 0 26px;
    }

    .index-footer-bottom {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* ===== BOOTSTRAP RESPONSIVE PROJECT PASS ===== */
.container,
.container-fluid,
.row,
[class^="col-"],
[class*=" col-"] {
    min-width: 0;
}

.row {
    --bs-gutter-x: min(1.5rem, 4vw);
}

.d-flex,
.row,
.pc-card,
.stat-card,
.auth-box,
.loan-summary-box,
.banque-box,
.credit-form-box,
.virement-panel,
.virement-code-box,
.virement-admin-step,
.chat-wrapper,
.admin-chat-shell,
.admin-chat-panel,
.admin-chat-body,
.admin-chat-conversation {
    min-width: 0;
}

.table-responsive,
.pc-card:has(.pc-table) {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.pc-table {
    min-width: 640px;
}

.pc-table th,
.pc-table td {
    vertical-align: middle;
}

.pc-input,
.chat-input,
.form-control,
.form-select,
input,
select,
textarea {
    max-width: 100%;
}

.btn-pc-primary,
.btn-pc-gold,
.btn-pc-outline,
.btn-whatsapp,
.btn-chat-send {
    max-width: 100%;
}

.summary-value,
.banque-val,
.document-preview-file,
.chat-bubble,
.pc-card,
.stat-card {
    overflow-wrap: anywhere;
}

.admin-chat-composer {
    flex: 0 0 auto;
}

.admin-chat-messages {
    padding-bottom: 24px;
}

@media (max-width: 991.98px) {
    .dash-content {
        padding-left: 16px;
        padding-right: 16px;
    }

    .admin-chat-stats {
        display: none;
    }

    .admin-chat-titlebar {
        align-items: flex-start !important;
        flex-direction: column;
        gap: 12px;
    }

    .admin-chat-titlebar .btn-pc-outline {
        width: auto;
    }

    .admin-chat-shell {
        height: calc(100dvh - 118px) !important;
        min-height: 0 !important;
    }

    .admin-chat-list {
        max-height: 128px;
    }

    .admin-chat-body {
        padding: 10px;
    }
}

@media (max-width: 767.98px) {
    .row {
        --bs-gutter-x: 0;
    }

    .row.g-3,
    .row.g-4,
    .row.g-5 {
        --bs-gutter-x: .75rem;
    }

    .pc-table {
        min-width: 560px;
    }

    .btn-pc-primary,
    .btn-pc-gold,
    .btn-pc-outline,
    .btn-whatsapp {
        min-height: 44px;
    }

    .admin-chat-header {
        flex-wrap: wrap;
    }

    .admin-chat-header .ms-auto {
        margin-left: 0 !important;
        width: 100%;
    }

    .admin-chat-header .ms-auto .btn-pc-outline {
        width: auto;
    }

    .admin-chat-composer form {
        align-items: stretch;
        flex-wrap: nowrap;
    }

    .admin-chat-composer .pc-input {
        min-width: 0;
    }
}

@media (max-width: 767.98px) {
    body.admin-dashboard-page .dash-content {
        padding-left: 14px;
        padding-right: 14px;
    }

    body.admin-dashboard-page .dash-content > .row {
        --bs-gutter-x: 14px;
        --bs-gutter-y: 14px;
        margin-left: calc(var(--bs-gutter-x) * -.5);
        margin-right: calc(var(--bs-gutter-x) * -.5);
    }

    body.admin-dashboard-page .dash-content > .row > [class*="col-"] {
        padding-left: calc(var(--bs-gutter-x) * .5);
        padding-right: calc(var(--bs-gutter-x) * .5);
        margin-top: var(--bs-gutter-y);
    }

    body.admin-dashboard-page .dash-content > .row > [class*="col-"]:nth-child(-n + 2) {
        margin-top: 0;
    }

    body.admin-dashboard-page .stat-card {
        border-radius: 10px;
        padding: 18px 14px;
    }

    body.admin-dashboard-page .stat-icon {
        margin-bottom: 12px;
    }
}

/* Keep the admin chat composer visible while messages scroll. */
body.admin-chat-page {
    overflow: hidden;
}

body.admin-chat-page .admin-layout {
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
}

body.admin-chat-page .dash-content {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    padding-bottom: 24px;
}

body.admin-chat-page .admin-chat-titlebar,
body.admin-chat-page .admin-chat-stats {
    flex: 0 0 auto;
}

body.admin-chat-page .admin-chat-shell {
    flex: 1 1 auto;
    height: auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
    margin-bottom: 0 !important;
}

body.admin-chat-page .admin-chat-panel,
body.admin-chat-page .admin-chat-body,
body.admin-chat-page .admin-chat-conversation {
    flex: 1 1 auto;
    min-height: 0 !important;
    overflow: hidden;
}

body.admin-chat-page .admin-chat-panel {
    display: flex !important;
    flex-direction: column;
    padding: 16px;
}

body.admin-chat-page .admin-chat-main-wrapper {
    flex: 1 1 0;
    height: auto !important;
    min-height: 0 !important;
    max-height: 100%;
    width: 100%;
    border-radius: var(--radius-lg);
}

body.admin-chat-page .admin-chat-main-wrapper .chat-header,
body.admin-chat-page .admin-chat-main-wrapper .chat-input-area {
    flex: 0 0 auto;
}

body.admin-chat-page .admin-chat-messages {
    flex: 1 1 0;
    height: auto !important;
    min-height: 0 !important;
    overflow-y: scroll !important;
    scrollbar-gutter: stable;
    overscroll-behavior: contain;
}

body.admin-chat-page .admin-chat-composer {
    flex: 0 0 auto;
}

@media (max-width: 991.98px) {
    body.admin-chat-page .admin-mobile-topbar {
        flex: 0 0 auto;
    }

    body.admin-chat-page .admin-layout {
        height: calc(100dvh - 58px);
    }

    body.admin-chat-page .dash-content {
        height: calc(100dvh - 58px);
        padding-top: 12px;
        padding-bottom: 12px;
    }

    body.admin-chat-page .admin-chat-panel {
        padding: 10px;
    }
}

@media (max-width: 575.98px) {
    .chat-attachment {
        align-items: flex-start;
    }

    .chat-attachment img {
        width: 72px;
        height: 56px;
    }

    .chat-bubble {
        max-width: 96%;
    }

    .chat-input-area .d-flex {
        gap: 8px !important;
    }

    .btn-chat-attach,
    .btn-chat-send {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }
}
