/* ============================================================
   EcoByWytsWeb — Thème Neo-Bank (style N26 Light)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --green:        #00C896;
    --green-dark:   #00A07A;
    --green-light:  #E6FAF5;
    --blue:         #4361EE;
    --blue-light:   #EEF1FD;
    --red:          #FF4757;
    --red-light:    #FFF0F1;
    --orange:       #FF8C42;
    --orange-light: #FFF4EC;
    --yellow:       #FFB700;
    --yellow-light: #FFFBEC;
    --purple:       #7C3AED;
    --purple-light: #F5F0FF;

    --bg:           #F4F6F9;
    --surface:      #FFFFFF;
    --surface-2:    #F9FAFB;
    --border:       #E8ECF0;
    --text:         #1A1D23;
    --text-2:       #4A5568;
    --muted:        #8A94A6;

    --radius:       14px;
    --radius-sm:    8px;
    --shadow:       0 2px 8px rgba(0,0,0,.06);
    --shadow-md:    0 4px 20px rgba(0,0,0,.09);
    --shadow-lg:    0 8px 40px rgba(0,0,0,.12);
}

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-dark); }
small { font-size: .82rem; }

/* ── Navbar ───────────────────────────────────────────────── */
.nb-navbar {
    background: var(--surface) !important;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 8px rgba(0,0,0,.05);
    padding: 0 1.5rem;
    min-height: 64px;
    position: sticky;
    top: 0;
    z-index: 100;
}
/* Menu hamburger mobile — expanded */
@media (max-width: 991px) {
    .nb-navbar .navbar-collapse {
        background: var(--surface);
        border-top: 1px solid var(--border);
        padding: 12px 0 16px;
        margin: 0 -1.5rem;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
        box-shadow: 0 6px 16px rgba(0,0,0,.08);
    }
    .nb-navbar .navbar-collapse .navbar-nav {
        gap: 4px;
    }
    .nb-navbar .navbar-collapse .nav-link {
        padding: .55rem .75rem !important;
    }
    .nb-navbar .navbar-collapse .navbar-nav.ms-auto {
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid var(--border);
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }
    .nb-navbar .navbar-collapse .dropdown-menu {
        position: static !important;
        box-shadow: none;
        border: 1px solid var(--border);
        margin-top: 4px;
    }
}
.nb-navbar .navbar-brand {
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--text) !important;
    letter-spacing: -.3px;
}
.nb-navbar .navbar-brand .logo-dot { color: var(--green); }
.nb-navbar .nav-link {
    color: var(--text-2) !important;
    font-weight: 500;
    font-size: .88rem;
    padding: .4rem .75rem !important;
    border-radius: var(--radius-sm);
    transition: background .15s, color .15s;
}
.nb-navbar .nav-link:hover { background: var(--bg); color: var(--text) !important; }
.nb-navbar .nav-link.active { color: var(--green) !important; }
.nb-navbar .navbar-toggler {
    border: none;
    color: var(--text-2);
    padding: 4px 8px;
}
.nb-navbar .navbar-toggler:focus { box-shadow: none; }

/* Avatar bouton */
.nb-avatar-btn {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: none;
    font-weight: 700;
    font-size: .85rem;
    cursor: pointer;
    transition: transform .15s;
}
.nb-avatar-btn:hover { transform: scale(1.05); }

/* Badge notification nav */
.nb-nav-badge {
    position: absolute;
    top: 2px; right: 2px;
    width: 8px; height: 8px;
    background: var(--red);
    border-radius: 50%;
    border: 2px solid var(--surface);
}

/* ── Layout ───────────────────────────────────────────────── */
.nb-main {
    max-width: 1180px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}
@media (max-width: 768px) { .nb-main { padding: 1.25rem 1rem 3rem; } }

/* ── Cards ────────────────────────────────────────────────── */
.nb-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
}
.nb-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: .92rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
}
.nb-card-header .ms-auto { margin-left: auto; }
.nb-card-body { padding: 20px; }
.nb-card-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    background: var(--surface-2);
}

/* ── Hero balance card ────────────────────────────────────── */
.nb-balance-card {
    background: linear-gradient(135deg, #1A1D23 0%, #2D3748 100%);
    border-radius: var(--radius);
    padding: 2rem;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.nb-balance-card::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 200px; height: 200px;
    background: rgba(0,200,150,.15);
    border-radius: 50%;
    pointer-events: none;
}
.nb-balance-card::after {
    content: '';
    position: absolute;
    bottom: -40px; left: 60px;
    width: 120px; height: 120px;
    background: rgba(0,200,150,.08);
    border-radius: 50%;
    pointer-events: none;
}
.nb-balance-label {
    font-size: .78rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .08em;
    opacity: .65;
    margin-bottom: 6px;
}
.nb-balance-amount {
    font-size: 2.6rem;
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.1;
}
.nb-balance-amount.negative { color: #FF6B7A; }
@media (max-width: 576px) { .nb-balance-amount { font-size: 2rem; } }
.nb-balance-rank {
    font-size: .82rem;
    opacity: .65;
    margin-top: 6px;
}
/* Quick action buttons dans le hero */
.nb-quick-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 1.5rem; }
.nb-quick-btn {
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 12px;
    padding: 12px 18px;
    color: rgba(255,255,255,.9);
    font-size: .78rem;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s;
    text-decoration: none;
    white-space: nowrap;
}
.nb-quick-btn:hover { background: rgba(255,255,255,.22); color: #fff; }
.nb-quick-btn i { font-size: 1.1rem; }

/* ── Stat cards ───────────────────────────────────────────── */
.nb-stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--shadow);
}
.nb-stat-icon {
    width: 46px; height: 46px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.nb-stat-icon.green  { background: var(--green-light);  color: var(--green); }
.nb-stat-icon.blue   { background: var(--blue-light);   color: var(--blue); }
.nb-stat-icon.red    { background: var(--red-light);    color: var(--red); }
.nb-stat-icon.orange { background: var(--orange-light); color: var(--orange); }
.nb-stat-icon.yellow { background: var(--yellow-light); color: var(--yellow); }
.nb-stat-icon.purple { background: var(--purple-light); color: var(--purple); }
.nb-stat-value { font-size: 1.25rem; font-weight: 700; color: var(--text); line-height: 1.2; }
.nb-stat-label { font-size: .77rem; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn-nb {
    background: var(--green);
    color: #fff !important;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: .88rem;
    padding: .6rem 1.2rem;
    transition: background .15s, transform .1s, box-shadow .15s;
    cursor: pointer;
    display: inline-flex; align-items: center; gap: 6px;
}
.btn-nb:hover { background: var(--green-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,200,150,.3); }
.btn-nb:active { transform: translateY(0); }
.btn-nb.sm { padding: .4rem .9rem; font-size: .82rem; }

.btn-nb-outline {
    background: transparent;
    color: var(--green) !important;
    border: 1.5px solid var(--green);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: .88rem;
    padding: .55rem 1.15rem;
    transition: all .15s;
    display: inline-flex; align-items: center; gap: 6px;
}
.btn-nb-outline:hover { background: var(--green); color: #fff !important; }
.btn-nb-outline.sm { padding: .38rem .85rem; font-size: .82rem; }

.btn-nb-ghost {
    background: var(--bg);
    color: var(--text-2) !important;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: .88rem;
    padding: .6rem 1.2rem;
    transition: all .15s;
    display: inline-flex; align-items: center; gap: 6px;
}
.btn-nb-ghost:hover { background: var(--border); color: var(--text) !important; }
.btn-nb-ghost.sm { padding: .4rem .9rem; font-size: .82rem; }

.btn-nb-danger {
    background: var(--red);
    color: #fff !important;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: .88rem;
    padding: .6rem 1.2rem;
    transition: all .15s;
    display: inline-flex; align-items: center; gap: 6px;
}
.btn-nb-danger:hover { background: #e03040; }
.btn-nb-danger.sm { padding: .4rem .9rem; font-size: .82rem; }

.btn-nb-blue {
    background: var(--blue);
    color: #fff !important;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: .88rem;
    padding: .6rem 1.2rem;
    transition: all .15s;
    display: inline-flex; align-items: center; gap: 6px;
}
.btn-nb-blue:hover { background: #3451d1; }
.btn-nb-blue.sm { padding: .4rem .9rem; font-size: .82rem; }

.btn-nb-orange {
    background: var(--orange);
    color: #fff !important;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: .88rem;
    padding: .6rem 1.2rem;
    transition: all .15s;
    display: inline-flex; align-items: center; gap: 6px;
}
.btn-nb-orange:hover { background: #e67030; }
.btn-nb-orange.sm { padding: .4rem .9rem; font-size: .82rem; }

/* ── Forms ────────────────────────────────────────────────── */
.nb-input,
.form-control,
.form-select {
    background: var(--surface) !important;
    border: 1.5px solid var(--border) !important;
    border-radius: var(--radius-sm) !important;
    color: var(--text) !important;
    font-size: .9rem;
    padding: .6rem .85rem;
    transition: border-color .15s, box-shadow .15s;
    font-family: 'Inter', sans-serif;
}
.nb-input:focus,
.form-control:focus,
.form-select:focus {
    border-color: var(--green) !important;
    box-shadow: 0 0 0 3px rgba(0,200,150,.12) !important;
    outline: none;
    background: var(--surface) !important;
    color: var(--text) !important;
}
.nb-input::placeholder,
.form-control::placeholder { color: var(--muted); }
.form-label { font-weight: 500; font-size: .87rem; color: var(--text-2); margin-bottom: .4rem; }
.form-text { font-size: .79rem; color: var(--muted); }
.input-group-text {
    background: var(--surface-2) !important;
    border: 1.5px solid var(--border) !important;
    color: var(--muted);
    font-size: .9rem;
}
.form-check-input:checked { background-color: var(--green); border-color: var(--green); }
.form-check-input:focus { box-shadow: 0 0 0 3px rgba(0,200,150,.12); border-color: var(--green); }
select option { background: #fff; color: var(--text); }

/* ── Tables ───────────────────────────────────────────────── */
.nb-table {
    width: 100%;
    color: var(--text);
    border-collapse: collapse;
}
.nb-table thead th {
    background: var(--surface-2);
    color: var(--muted);
    font-size: .76rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.nb-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    font-size: .88rem;
}
.nb-table tbody tr:last-child td { border-bottom: none; }
.nb-table tbody tr:hover { background: var(--surface-2); }
.nb-row-me td { background: var(--green-light) !important; }
.nb-table tfoot td {
    padding: 10px 16px;
    border-top: 2px solid var(--border);
    font-weight: 600;
    font-size: .88rem;
    background: var(--surface-2);
}

/* ── Tabs ─────────────────────────────────────────────────── */
.nb-tabs {
    display: flex;
    border-bottom: 2px solid var(--border);
    margin-bottom: 1.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0;
}
.nb-tabs::-webkit-scrollbar { display: none; }
.nb-tabs .nav-link {
    color: var(--muted);
    font-weight: 500;
    font-size: .87rem;
    padding: .65rem 1.1rem;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    white-space: nowrap;
    margin-bottom: -2px;
    transition: color .15s;
    display: inline-flex; align-items: center; gap: 6px;
}
.nb-tabs .nav-link.active { color: var(--green); border-bottom-color: var(--green); font-weight: 600; }
.nb-tabs .nav-link:hover:not(.active) { color: var(--text); }
.nb-tabs .nav-link .badge {
    font-size: .7rem;
    padding: 2px 6px;
    border-radius: 10px;
}

/* ── Badges ───────────────────────────────────────────────── */
.nb-badge {
    display: inline-flex; align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .74rem;
    font-weight: 600;
    line-height: 1.4;
}
.nb-badge-green  { background: var(--green-light);  color: #007A5E; }
.nb-badge-red    { background: var(--red-light);    color: #C00020; }
.nb-badge-blue   { background: var(--blue-light);   color: #2840B0; }
.nb-badge-orange { background: var(--orange-light); color: #C05A10; }
.nb-badge-gray   { background: var(--bg);           color: var(--muted); border: 1px solid var(--border); }
.nb-badge-yellow { background: var(--yellow-light); color: #8A6000; }
.nb-badge-purple { background: var(--purple-light); color: var(--purple); }

/* ── Transaction row (liste style N26) ────────────────────── */
.nb-tx-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 0;
    border-bottom: 1px solid var(--border);
    transition: background .1s;
}
.nb-tx-row:last-child { border-bottom: none; }
.nb-tx-row:hover { background: var(--surface-2); margin: 0 -20px; padding-left: 20px; padding-right: 20px; border-radius: var(--radius-sm); }
.nb-tx-icon {
    width: 40px; height: 40px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: .95rem;
    flex-shrink: 0;
}
.nb-tx-info { flex: 1; min-width: 0; }
.nb-tx-label { font-weight: 500; font-size: .9rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nb-tx-meta  { font-size: .78rem; color: var(--muted); margin-top: 1px; }
.nb-tx-amount { font-weight: 700; font-size: .92rem; text-align: right; white-space: nowrap; }
.nb-tx-amount.plus  { color: var(--green); }
.nb-tx-amount.minus { color: var(--red); }
.nb-tx-date { font-size: .76rem; color: var(--muted); text-align: right; white-space: nowrap; }

/* ── Economy card (dashboard) ─────────────────────────────── */
.nb-eco-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .15s, box-shadow .15s;
}
.nb-eco-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.nb-eco-card.frozen { opacity: .6; }
.nb-eco-stripe { height: 4px; }
.nb-eco-body { padding: 18px 20px; }
.nb-eco-name { font-weight: 700; font-size: 1rem; color: var(--text); }
.nb-eco-meta { font-size: .82rem; color: var(--muted); margin-top: 1px; }
.nb-eco-balance { font-size: 1.5rem; font-weight: 800; margin-top: 10px; color: var(--text); }
.nb-eco-balance.negative { color: var(--red); }
.nb-eco-stats { display: flex; gap: 16px; margin-top: 10px; }
.nb-eco-stat-item { font-size: .8rem; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.nb-eco-footer {
    display: flex; gap: 8px; flex-wrap: wrap;
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    background: var(--surface-2);
}

/* ── Auth pages ───────────────────────────────────────────── */
.nb-auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    padding: 2rem 1rem;
}
.nb-auth-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    width: 100%;
    max-width: 420px;
    padding: 40px 36px;
}
@media (max-width: 480px) { .nb-auth-card { padding: 28px 20px; border-radius: var(--radius-sm); } }
.nb-auth-logo { margin-bottom: 28px; }
.nb-auth-logo-name { font-size: 1.5rem; font-weight: 800; color: var(--text); }
.nb-auth-logo-name span { color: var(--green); }
.nb-auth-subtitle { color: var(--muted); font-size: .9rem; margin-top: 4px; }

/* ── Avatar ───────────────────────────────────────────────── */
.nb-avatar {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px;
    border-radius: 10px;
    color: #fff;
    font-weight: 700;
    font-size: .85rem;
    flex-shrink: 0;
}
.nb-avatar.sm  { width: 28px; height: 28px; font-size: .7rem;  border-radius: 7px; }
.nb-avatar.lg  { width: 50px; height: 50px; font-size: 1.1rem; border-radius: 13px; }
.nb-avatar.xl  { width: 64px; height: 64px; font-size: 1.5rem; border-radius: 16px; }
.nb-avatar.round { border-radius: 50%; }

/* ── Page header ──────────────────────────────────────────── */
.nb-page-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    flex-wrap: wrap; gap: 12px;
    margin-bottom: 1.5rem;
}
.nb-page-title { font-size: 1.45rem; font-weight: 800; color: var(--text); margin: 0; letter-spacing: -.3px; }
.nb-page-sub   { font-size: .88rem; color: var(--muted); margin: 3px 0 0; }

/* ── Breadcrumb ───────────────────────────────────────────── */
.nb-breadcrumb {
    background: transparent; padding: 0;
    font-size: .82rem; margin-bottom: 1rem;
}
.nb-breadcrumb .breadcrumb-item { color: var(--muted); }
.nb-breadcrumb .breadcrumb-item a { color: var(--green); }
.nb-breadcrumb .breadcrumb-item.active { color: var(--text-2); font-weight: 500; }
.nb-breadcrumb .breadcrumb-item+.breadcrumb-item::before { color: var(--muted); content: "/"; }

/* ── Alerts ───────────────────────────────────────────────── */
.alert { border-radius: var(--radius-sm); border: none; font-size: .9rem; font-weight: 500; }
.alert-success { background: var(--green-light); color: #006E50; }
.alert-danger   { background: var(--red-light);    color: #B00020; }
.alert-warning  { background: var(--yellow-light); color: #7A5500; }
.alert-info     { background: var(--blue-light);   color: #1A30A0; }
.btn-close { opacity: .4; }
.btn-close:hover { opacity: .7; }

/* ── Modals ───────────────────────────────────────────────── */
.modal-content {
    border-radius: var(--radius) !important;
    border: 1px solid var(--border) !important;
    box-shadow: var(--shadow-lg) !important;
    color: var(--text);
}
.modal-header {
    border-bottom: 1px solid var(--border) !important;
    padding: 18px 24px;
    background: var(--surface);
}
.modal-title { font-weight: 700; font-size: 1rem; }
.modal-body   { padding: 22px 24px; }
.modal-footer { border-top: 1px solid var(--border) !important; padding: 14px 24px; background: var(--surface-2); }

/* ── Dropdowns ────────────────────────────────────────────── */
.dropdown-menu {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    padding: 6px;
    background: var(--surface);
}
.dropdown-item {
    color: var(--text);
    border-radius: 6px;
    font-size: .88rem;
    padding: .5rem .8rem;
    transition: background .12s;
}
.dropdown-item:hover { background: var(--bg); color: var(--text); }
.dropdown-item.text-danger:hover { background: var(--red-light); }
.dropdown-divider { border-color: var(--border); margin: 4px 0; }

/* ── Announce ─────────────────────────────────────────────── */
.nb-announce {
    border-left: 3px solid var(--yellow);
    background: var(--yellow-light);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 14px 16px;
    margin-bottom: 10px;
}
.nb-announce.green { border-color: var(--green); background: var(--green-light); }
.nb-announce-title { font-weight: 600; color: var(--text); font-size: .9rem; }
.nb-announce-body  { font-size: .84rem; color: var(--text-2); margin: 4px 0 0; }
.nb-announce-meta  { font-size: .77rem; color: var(--muted); margin-top: 6px; }

/* ── Rule row (taxes/intérêts) ────────────────────────────── */
.nb-rule-row {
    display: flex; align-items: center; gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid var(--border);
}
.nb-rule-row:last-child { border-bottom: none; }
.nb-rule-icon {
    width: 36px; height: 36px;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-size: .9rem;
    flex-shrink: 0;
}

/* ── Leaderboard ──────────────────────────────────────────── */
.nb-rank-1 { color: #F5A623; }
.nb-rank-2 { color: #9B9B9B; }
.nb-rank-3 { color: #CD7F32; }

/* ── Chip ─────────────────────────────────────────────────── */
.nb-chip {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 5px 14px;
    font-size: .84rem;
    font-weight: 500;
    color: var(--text-2);
}

/* ── Divider ──────────────────────────────────────────────── */
.nb-divider { border: none; border-top: 1px solid var(--border); margin: 1.2rem 0; }
.nb-divider-text {
    text-align: center;
    color: var(--muted);
    font-size: .8rem;
    position: relative;
    margin: 1.2rem 0;
}
.nb-divider-text::before {
    content: '';
    position: absolute;
    top: 50%; left: 0; right: 0;
    border-top: 1px solid var(--border);
}
.nb-divider-text span {
    position: relative;
    background: var(--surface);
    padding: 0 12px;
}

/* ── Loan cards ───────────────────────────────────────────── */
.nb-loan-card {
    border-left: 4px solid;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 14px 16px;
    margin-bottom: 10px;
    background: var(--surface-2);
    border-top: 1px solid var(--border);
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.nb-loan-card.pending  { border-left-color: var(--yellow); }
.nb-loan-card.active   { border-left-color: var(--green); }
.nb-loan-card.repaid   { border-left-color: var(--muted); }
.nb-loan-card.rejected { border-left-color: var(--red); }

/* Progress bar */
.nb-progress {
    height: 5px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 8px;
}
.nb-progress-fill {
    height: 100%;
    background: var(--green);
    border-radius: 3px;
    transition: width .4s ease;
}

/* ── Info box ─────────────────────────────────────────────── */
.nb-info-box {
    background: var(--blue-light);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    font-size: .86rem;
    color: #1A30A0;
    display: flex; gap: 10px; align-items: flex-start;
}
.nb-info-box i { flex-shrink: 0; margin-top: 1px; }

/* ── Footer ───────────────────────────────────────────────── */
.nb-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 1.2rem 1.5rem;
    text-align: center;
    font-size: .81rem;
    color: var(--muted);
}
.nb-footer a { color: var(--green); }
.nb-footer a:hover { color: var(--green-dark); }

/* ── Pagination ───────────────────────────────────────────── */
.page-link {
    color: var(--green);
    border-color: var(--border);
    border-radius: var(--radius-sm) !important;
    margin: 0 2px;
    font-size: .86rem;
}
.page-item.active .page-link { background: var(--green); border-color: var(--green); color: #fff; }
.page-item.disabled .page-link { color: var(--muted); }

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── Responsive scroll ────────────────────────────────────── */
.nb-scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ── SuperAdmin banner ────────────────────────────────────── */
.nb-superadmin-bar {
    background: linear-gradient(90deg, #F5A623, #FFD700);
    color: #4A2C00;
    padding: 10px 20px;
    font-size: .85rem;
    font-weight: 600;
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}

/* ── Color picker ─────────────────────────────────────────── */
.nb-color-option input { display: none; }
.nb-color-swatch {
    display: inline-block;
    width: 30px; height: 30px;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color .15s, transform .1s;
}
.nb-color-option input:checked + .nb-color-swatch {
    border-color: var(--text);
    transform: scale(1.18);
}

/* ── Empty state ──────────────────────────────────────────── */
.nb-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--muted);
}
.nb-empty-icon { font-size: 2.5rem; margin-bottom: 12px; opacity: .6; }
.nb-empty-text { font-size: .9rem; }

/* ── Mobile adjustments ───────────────────────────────────── */
@media (max-width: 576px) {
    .nb-card-body  { padding: 16px; }
    .nb-card-header { padding: 14px 16px; }
    .nb-card-footer { padding: 12px 16px; }
    .nb-table thead { display: none; }
    .nb-table, .nb-table tbody, .nb-table tr, .nb-table td { display: block; width: 100%; }
    .nb-table tr { border-bottom: 1px solid var(--border); padding: 8px 0; }
    .nb-table td { border: none; padding: 4px 16px; }
    .nb-table td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: .76rem;
        color: var(--muted);
        text-transform: uppercase;
        display: block;
        margin-bottom: 2px;
    }
    .nb-quick-btn { padding: 10px 14px; }
}

/* ============================================================
   COMPATIBILITÉ — alias mc-* → nb-* pour les pages non migrées
   ============================================================ */

/* Layout */
.mc-navbar          { background: var(--surface) !important; border-bottom: 1px solid var(--border); box-shadow: 0 1px 8px rgba(0,0,0,.05); }
.container-fluid    { max-width: 1180px; margin: 0 auto; }

/* Cards */
.mc-card            { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border); overflow: hidden; margin-bottom: 1rem; }
.mc-card-header     { padding: 16px 20px; border-bottom: 1px solid var(--border); font-weight: 600; font-size: .92rem; color: var(--text); display: flex; align-items: center; gap: 8px; }
.mc-card-body       { padding: 20px; }
.mc-card-footer     { padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); }

/* Buttons */
.btn-mc, .btn.btn-mc {
    background: var(--green) !important; color: #fff !important; border: none !important;
    border-radius: var(--radius-sm) !important; font-weight: 600; font-size: .88rem;
    padding: .5rem 1.1rem; transition: background .15s;
}
.btn-mc:hover, .btn.btn-mc:hover { background: var(--green-dark) !important; }
.btn-mc-outline, .btn.btn-mc-outline {
    background: transparent !important; color: var(--green) !important;
    border: 1.5px solid var(--green) !important; border-radius: var(--radius-sm) !important;
    font-weight: 600; font-size: .88rem; padding: .45rem 1rem;
}
.btn-mc-outline:hover, .btn.btn-mc-outline:hover { background: var(--green) !important; color: #fff !important; }

/* Tables */
.mc-table           { width: 100%; color: var(--text); border-collapse: collapse; }
.mc-table thead th  { background: var(--surface-2); color: var(--muted); font-size: .76rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.mc-table tbody td  { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; font-size: .88rem; }
.mc-table tbody tr:last-child td { border-bottom: none; }
.mc-table tbody tr:hover { background: var(--surface-2); }
.mc-row-me td       { background: var(--green-light) !important; }

/* Avatar */
.mc-avatar          { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; color: #fff; font-weight: 700; font-size: .85rem; flex-shrink: 0; }
.mc-avatar.sm       { width: 28px; height: 28px; font-size: .7rem; border-radius: 7px; }
.mc-avatar.lg       { width: 50px; height: 50px; font-size: 1.1rem; border-radius: 13px; }

/* Titles */
.mc-title           { font-size: 1.4rem; font-weight: 800; color: var(--text); letter-spacing: -.3px; }
.mc-section-title   { font-size: 1rem; font-weight: 700; color: var(--text-2); margin-bottom: 1rem; display: flex; align-items: center; gap: 8px; }

/* Balance */
.mc-balance-display { padding: 16px 20px; }
.mc-balance-label   { font-size: .78rem; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 4px; }
.mc-balance-amount  { font-size: 1.8rem; font-weight: 800; color: var(--text); letter-spacing: -.5px; }
.mc-balance-amount.negative { color: var(--red); }
.mc-balance-big     { font-size: 2.4rem; font-weight: 800; color: var(--text); letter-spacing: -1px; line-height: 1.1; }
.mc-balance-big.negative { color: var(--red); }

/* Eco card */
.mc-eco-card        { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.mc-eco-card:hover  { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.mc-eco-card.frozen { opacity: .6; }
.mc-eco-header      { padding: 16px 20px; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--border); }
.mc-eco-footer      { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 20px; border-top: 1px solid var(--border); background: var(--surface-2); }
.mc-stats-row       { display: flex; gap: 14px; padding: 10px 20px; font-size: .82rem; color: var(--muted); border-top: 1px solid var(--border); }
.mc-mairie-row      { display: flex; justify-content: space-between; align-items: center; padding: 8px 20px; font-size: .88rem; color: var(--text-2); border-top: 1px solid var(--border); background: var(--surface-2); }
.mc-announce-mini   { padding: 8px 20px 12px; }
.mc-announce-item   { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--text-2); margin-bottom: 4px; }

/* Eco title bar */
.mc-eco-title-bar   { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 16px 20px; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); margin-bottom: 1.5rem; }

/* Tax badge */
.mc-tax-badge       { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; border-left: 3px solid var(--orange); }

/* Announcements */
.mc-announce-full   { border-left: 3px solid var(--yellow); background: var(--yellow-light); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 14px 16px; }

/* Breadcrumb */
.mc-breadcrumb .breadcrumb-item { color: var(--muted); }
.mc-breadcrumb .breadcrumb-item a { color: var(--green); }
.mc-breadcrumb .breadcrumb-item.active { color: var(--text-2); }
.mc-breadcrumb .breadcrumb-item+.breadcrumb-item::before { color: var(--muted); }

/* Auth */
.mc-auth-body       { background: var(--bg); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.mc-auth-container  { width: 100%; display: flex; align-items: center; justify-content: center; }
.mc-auth-card       { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-lg); border: 1px solid var(--border); width: 100%; max-width: 420px; padding: 40px 36px; }
.mc-auth-logo       { text-align: center; margin-bottom: 28px; }
.mc-auth-logo h1, .mc-auth-logo h2 { font-size: 1.5rem; font-weight: 800; color: var(--text); }

/* Input icon */
.mc-input-icon      { background: var(--surface-2) !important; border: 1.5px solid var(--border) !important; color: var(--muted); }
.mc-input           { background: var(--surface) !important; border: 1.5px solid var(--border) !important; color: var(--text) !important; border-radius: var(--radius-sm) !important; }
.mc-input:focus     { border-color: var(--green) !important; box-shadow: 0 0 0 3px rgba(0,200,150,.12) !important; }

/* Dropdown */
.mc-dropdown        { border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-md); }

/* Footer */
.mc-footer          { background: var(--surface); border-top: 1px solid var(--border); padding: 1.2rem 1.5rem; text-align: center; font-size: .81rem; color: var(--muted); }
.mc-link            { color: var(--green) !important; }

/* Color picker compat */
.mc-color-option input { display: none; }
.mc-color-swatch    { display: inline-block; width: 30px; height: 30px; border-radius: 8px; cursor: pointer; border: 2px solid transparent; transition: border-color .15s, transform .1s; line-height: 30px; text-align: center; font-size: .8rem; color: #fff; font-weight: 700; }

/* Misc */
.mc-logo            { color: var(--green); }
.text-success       { color: var(--green) !important; }
.text-mc            { color: var(--green) !important; }
.border-warning     { border-color: var(--yellow) !important; }

