/* :root {
    --primary: #16A34A;
    --primary-dark: #166534;
    --primary-light: #DCFCE7;
    --white: #FFFFFF;
    --bg: #F8FAF9;
    --text: #1A1A1A;
    --text-light: #6B7280;
    --danger: #DC2626;
    --danger-light: #FEE2E2;
    --danger-dark: #B91C1C;
    --shadow: rgba(0, 0, 0, 0.06);
    --shadow-primary: rgba(22, 163, 74, 0.25);
    --shadow-primary-dark: rgba(22, 101, 52, 0.25);
    --shadow-primary-strong: rgba(22, 163, 74, 0.35);
    --shadow-danger: rgba(220, 38, 38, 0.25);
    --border: #E5E7EB;
    --border-light: #D1D5DB;
    --bg-light: #F3F4F6;
    --bg-warning: #FEF3C7;
    --text-warning: #B45309;
    --bg-success: #DCFCE7;
    --text-success: #15803D;
    --bg-info: #DBEAFE;
    --text-info: #1D4ED8;
    --bg-danger-light: #FEF2F2;
    --overlay: rgba(0, 0, 0, 0.45);
    --white-30: rgba(255, 255, 255, 0.3);
    --white-60: rgba(255, 255, 255, 0.6);
    --text-blue: #1E3A8A;
    --text-gray: #4B5563;
} */

:root {
    /* Couleurs principales */
    --primary: #1E3A5F;
    --primary-dark: #152C47;
    --primary-light: #EAF1F8;

    /* Couleur d'accent */
    --secondary: #E67E22;
    --secondary-dark: #C96A14;
    --secondary-light: #FDF1E4;

    /* Neutres */
    --white: #FFFFFF;
    --bg: #F8FAFC;
    --bg-light: #F1F5F9;

    /* Textes */
    --text: #1F2937;
    --text-light: #6B7280;
    --text-gray: #4B5563;
    --text-blue: #1E3A5F;

    /* Bordures */
    --border: #E5E7EB;
    --border-light: #D1D5DB;

    /* États */
    --success: #16A34A;
    --success-light: #DCFCE7;
    --text-success: #15803D;
    --bg-success: #DCFCE7;

    --warning: #F59E0B;
    --warning-light: #FEF3C7;
    --text-warning: #B45309;
    --bg-warning: #FEF3C7;

    --danger: #DC2626;
    --danger-dark: #B91C1C;
    --danger-light: #FEE2E2;
    --bg-danger-light: #FEF2F2;

    --info: #2563EB;
    --info-light: #DBEAFE;
    --text-info: #1D4ED8;
    --bg-info: #DBEAFE;

    /* Ombres */
    --shadow: rgba(0, 0, 0, 0.06);
    --shadow-primary: rgba(30, 58, 95, 0.25);
    --shadow-primary-dark: rgba(21, 44, 71, 0.30);
    --shadow-primary-strong: rgba(30, 58, 95, 0.35);
    --shadow-secondary: rgba(230, 126, 34, 0.25);
    --shadow-danger: rgba(220, 38, 38, 0.25);

    /* Divers */
    --overlay: rgba(0, 0, 0, 0.45);
    --white-30: rgba(255, 255, 255, 0.3);
    --white-60: rgba(255, 255, 255, 0.6);
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

*:focus {
    outline: none;
}

html, body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg);
    color: var(--text);
    height: 100%;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

#app {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg);
    position: relative;
    padding-bottom: 80px;
}

.page {
    display: none;
    animation: fadeIn 0.2s ease;
    min-height: 100vh;
}

.page.active {
    display: block;
    padding-bottom: 80px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Header */
.header {
    padding: 24px 20px 16px;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-dark);
}

.header-logo {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: block;
    margin-bottom: 8px;
}

.header-subtitle {
    font-size: 14px;
    color: var(--text-light);
    margin-top: 4px;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}

.header-greeting {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.header-bienvenue {
    font-size: 13px;
    color: var(--text-light);
    font-weight: 500;
    margin: 0;
}

.header-user {
    font-size: 14px;
    color: var(--text);
    font-weight: 600;
    margin: 0;
}

.header-logo {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: block;
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.header-row h2 {
    margin: 0;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 24px;
    border-radius: 16px;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.2s ease;
    min-height: 56px;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 14px var(--shadow-primary);
}

.btn-success {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 14px var(--shadow-primary);
}

.btn-danger {
    background: var(--primary-dark);
    color: var(--white);
    box-shadow: 0 4px 14px var(--shadow-primary-dark);
}

.btn-full {
    width: 100%;
}

.btn-back {
    background: none;
    border: none;
    color: var(--primary);
    padding: 8px;
    margin-left: -8px;
    margin-bottom: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Forms */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 8px;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 16px;
    border: 2px solid var(--border);
    border-radius: 14px;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    background: var(--white);
    color: var(--text);
    transition: border-color 0.2s ease;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Login Page */
.login-container {
    padding: 60px 24px 40px;
    text-align: center;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo-section {
    margin-bottom: 48px;
}

.logo-icon {
    width: 96px;
    height: 96px;
    background: var(--primary-light);
    border-radius: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 20px;
}

.app-title {
    font-size: 40px;
    font-weight: 700;
    color: var(--primary-dark);
    letter-spacing: -0.5px;
}

.app-subtitle {
    font-size: 14px;
    color: var(--text-light);
    margin-top: 6px;
    font-weight: 400;
}

.login-form {
    text-align: left;
    background: var(--white);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 2px 8px var(--shadow);
}

.login-hint {
    margin-top: 24px;
    font-size: 13px;
    color: var(--text-light);
    text-align: center;
}

.text-success { color: var(--text-success); }
.text-danger { color: var(--danger); }

/* Metrics */
.metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 16px 20px;
}

.metric-card {
    background: var(--white);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 2px 8px var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.metric-card-full {
    grid-column: 1 / -1;
}

.metric-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
}

.metric-sales .metric-value { color: var(--primary); }
.metric-expenses .metric-value { color: var(--text-info); }
.metric-net .metric-value { color: var(--text); }
.metric-count .metric-value { color: var(--text); }

/* Split */
.section {
    padding: 0 20px 16px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
}

.split-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.split-item {
    background: var(--white);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 2px 6px var(--shadow);
}

.split-item span:first-child {
    flex: 1;
}

.split-item strong {
    font-weight: 600;
    color: var(--text);
}

.split-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

/* Form Page */
.form-page {
    padding: 24px 20px;
}

/* Filters */
.filter-bar {
    display: flex;
    gap: 10px;
    padding: 0 20px 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.filter-bar::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    padding: 10px 20px;
    border-radius: 12px;
    border: 2px solid var(--border);
    background: var(--white);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.filter-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* List */
.list-container {
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#dashboard-recent .list-container {
    padding-left: 0;
    padding-right: 0;
}

.list-item {
    background: var(--white);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 6px var(--shadow);
}

.list-item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.list-item-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

.list-item-meta {
    font-size: 12px;
    color: var(--text-light);
}

.list-item-amount {
    font-size: 16px;
    font-weight: 700;
    text-align: right;
}

.list-item-amount.positive {
    color: var(--primary);
}

.list-item-amount.negative {
    color: var(--danger);
}

.list-item-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 8px;
}

.list-item-actions .btn {
    min-height: 44px;
    padding: 10px 18px;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
}

.badge-actif,
.badge-role {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.badge-inactif {
    background: var(--danger-light);
    color: var(--danger-dark);
}

.badge-en_attente {
    background: var(--bg-warning);
    color: var(--text-warning);
}

.badge-expire {
    background: var(--bg-light);
    color: var(--text-gray);
}

.badge-suspendu {
    background: var(--danger-light);
    color: var(--danger-dark);
}

.list-item-column {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

.abonnement-statut {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    background: var(--white);
    color: var(--text);
}

.abonnement-statut:focus {
    outline: none;
    border-color: var(--primary);
}

.reabonnement-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.reabonnement-row .abonnement-statut {
    flex: 1;
}

.reabonnement-row .btn {
    min-height: 44px;
    padding: 10px 18px;
    white-space: nowrap;
}

.expired-box {
    text-align: center;
    padding: 24px 16px;
}

.expired-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.expired-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.expired-message {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.5;
}

.expired-contact {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
}

.expired-contact-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 14px 16px;
    text-decoration: none;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
}

.expired-contact-item strong {
    color: var(--primary-dark);
    font-weight: 600;
}

.list-item-delete {
    background: none;
    border: none;
    color: var(--danger);
    padding: 8px;
    margin-left: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

/* Chart Tabs */
.chart-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.chart-tab {
    flex: 1;
    padding: 10px;
    border-radius: 12px;
    border: 2px solid var(--border);
    background: var(--white);
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.chart-tab.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.chart-container {
    background: var(--white);
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 2px 8px var(--shadow);
    height: 260px;
}

.chart-container canvas {
    width: 100% !important;
    height: 220px !important;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 12px;
    font-size: 12px;
    color: var(--text-light);
}

.chart-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.chart-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

.chart-legend-dot.sales { background: var(--primary); }
.chart-legend-dot.expenses { background: var(--danger); }

/* Cash */
.cash-summary {
    background: var(--white);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 2px 8px var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

.cash-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    color: var(--text-light);
}

.cash-row strong {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.cash-row-total strong {
    font-size: 18px;
    color: var(--primary);
    font-weight: 700;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: var(--white);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    padding: 8px 0 12px;
    z-index: 100;
    box-shadow: 0 -2px 10px var(--shadow);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: #9CA3AF;
    font-family: 'Poppins', sans-serif;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
    min-width: 60px;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-item.active {
    color: var(--primary);
    background: var(--primary-light);
    border-radius: 12px;
}

.nav-item svg,
.nav-item svg * {
    fill: none;
    stroke: currentColor;
}

/* Floating Action Button */
.fab-container {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 99;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 14px var(--shadow-primary-strong);
    transition: transform 0.2s ease;
}

.fab:active {
    transform: scale(0.92);
}

.fab-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 8px;
}

.fab-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 16px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    box-shadow: 0 2px 6px var(--shadow);
    white-space: nowrap;
}

.fab-menu-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dev-actions {
    display: flex;
    gap: 12px;
    margin-top: 4px;
}

.dev-actions .btn {
    flex: 1;
}

/* Bottom spacer */
.bottom-spacer {
    height: 20px;
}

/* Utility */
.text-center {
    text-align: center;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
    font-size: 14px;
}

.empty-state svg {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    opacity: 0.4;
}

/* Desktop adjustments */
@media (min-width: 481px) {
    #app {
        border-left: 1px solid var(--border);
        border-right: 1px solid var(--border);
    }
}

/* Toast */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    padding: 12px 20px;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 200;
    max-width: 90%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Search Trigger */
.btn-search-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    border: 1.5px solid var(--border);
    background: var(--white);
    color: var(--text-light);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 8px;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.btn-search-trigger:active {
    border-color: var(--primary);
    color: var(--primary);
}

.dev-search-bar {
    display: flex;
    gap: 8px;
    padding: 12px 20px 4px;
}

.dev-search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    background: var(--white);
    color: var(--text);
}

.dev-search-input:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-load-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: calc(100% - 40px);
    margin: 8px 20px 16px;
    padding: 14px;
    border-radius: 14px;
    border: 2px solid var(--border);
    background: var(--white);
    color: var(--text);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-load-more:active {
    border-color: var(--primary);
    color: var(--primary);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.detail-transactions-scroll {
    max-height: 320px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast.toast-success {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 12px var(--shadow-primary);
}

.toast.toast-error {
    background: var(--danger);
    color: var(--white);
    box-shadow: 0 4px 12px var(--shadow-danger);
}

.top-menu-btn {
    position: fixed;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--white);
    border: 1.5px solid var(--border);
    color: var(--text-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 150;
    box-shadow: 0 2px 8px var(--shadow);
}

.top-menu-btn:active {
    transform: scale(0.95);
}

.top-menu-dropdown {
    position: fixed;
    top: 68px;
    right: 16px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 8px 24px var(--shadow);
    z-index: 160;
    display: none;
    min-width: 220px;
    padding: 8px;
    animation: fadeIn 0.15s ease;
}

.top-menu-dropdown.open {
    display: block;
}

.top-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    border: none;
    background: none;
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 12px;
    text-align: left;
}

.top-menu-item:active {
    background: var(--bg-light);
}

.top-menu-item svg {
    color: var(--text-light);
    flex-shrink: 0;
}

.top-menu-logout {
    color: var(--danger);
}

.top-menu-logout svg {
    color: var(--danger);
}

.download-hero {
    text-align: center;
    padding: 32px 20px;
}

.download-icon {
    width: 96px;
    height: 96px;
    background: var(--primary-light);
    border-radius: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 16px;
}

.download-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-dark);
}

.download-version {
    font-size: 14px;
    color: var(--text-light);
    margin-top: 4px;
}

.download-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.download-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--white);
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    box-shadow: 0 2px 6px var(--shadow);
}

.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.download-note {
    text-align: center;
    font-size: 12px;
    color: var(--text-light);
    margin-top: 12px;
}

.list-item-arrow {
    background: none;
    border: none;
    color: var(--text-light);
    padding: 8px;
    margin-left: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.detail-section {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.detail-section:last-child {
    border-bottom: none;
}

.detail-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.detail-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--text-light);
}

.detail-item strong {
    font-weight: 600;
    color: var(--text);
    text-align: right;
    max-width: 60%;
    word-break: break-word;
}

.detail-transactions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--overlay);
    z-index: 300;
    display: none;
    align-items: flex-end;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.open {
    display: flex;
}

.modal-sheet {
    width: 100%;
    max-width: 480px;
    max-height: 85vh;
    background: var(--bg);
    border-radius: 24px 24px 0 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.25s ease;
}

#location-detail-sheet,
#client-detail-sheet,
#user-detail-sheet {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

@keyframes slideUp {
    from { transform: translateY(40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 12px;
    background: var(--white);
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-dark);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

.confirm-sheet {
    padding: 24px 20px 32px;
    text-align: center;
}

.confirm-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.confirm-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--bg-danger-light);
    color: var(--danger);
    display: flex;
    align-items: center;
    justify-content: center;
}

.confirm-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.confirm-message {
    font-size: 14px;
    color: var(--text-light);
}

.confirm-actions {
    display: flex;
    gap: 12px;
}

.confirm-actions .btn {
    flex: 1;
}

.btn-secondary:active {
    background: var(--bg-light);
}

/* Loader & Skeleton */
.btn-loading {
    pointer-events: none;
    opacity: 0.7;
    position: relative;
}

.btn-loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid var(--white-30);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
}

.skeleton {
    background: linear-gradient(90deg, var(--border) 25%, var(--bg-light) 50%, var(--border) 75%);
    background-size: 200% 100%;
    animation: skeleton-pulse 1.4s ease-in-out infinite;
    border-radius: 10px;
}

.skeleton-card {
    background: var(--white);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 2px 8px var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skeleton-line {
    height: 14px;
}

.skeleton-line.w-60 { width: 60%; }
.skeleton-line.w-80 { width: 80%; }
.skeleton-line.w-40 { width: 40%; }
.skeleton-line.h-24 { height: 24px; }
.skeleton-line.h-20 { height: 20px; }

.skeleton-metric {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes skeleton-pulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.loader-overlay {
    position: fixed;
    inset: 0;
    background: var(--white-60);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 250;
    backdrop-filter: blur(2px);
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.skeleton-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.skeleton-list-item {
    background: var(--white);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 2px 6px var(--shadow);
    display: flex;
    align-items: center;
    gap: 12px;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
}

.skeleton-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-secondary {
    background: var(--white);
    color: var(--text);
    border: 2px solid var(--border);
    box-shadow: none;
}

.btn-secondary:active {
    background: var(--bg-light);
}

/* LOKALEX : statuts de location */
.badge-en_cours { background: var(--bg-success); color: var(--text-success); }
.badge-terminee { background: var(--bg-info); color: var(--text-info); }
.badge-retard { background: var(--danger-light); color: var(--danger-dark); }

.selected-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-info);
    color: var(--text-blue);
    padding: 10px 14px;
    border-radius: 12px;
    font-weight: 600;
    margin-top: 8px;
}
.selected-chip button { background: none; border: none; color: inherit; font-size: 16px; cursor: pointer; line-height: 1; }

.ligne-row {
    display: grid;
    grid-template-columns: 1fr 64px 80px auto;
    gap: 8px;
    align-items: center;
    background: var(--white);
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 1px 4px var(--shadow);
    margin-bottom: 8px;
}
.ligne-row .ligne-remove {     background: var(--danger-light);
    color: var(--danger-dark);
    border: none;
    border-radius: 8px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 14px; }

.readonly-amount {     font-size: 22px;
    font-weight: 700;
    color: var(--text-blue);
    padding: 8px 0; }

.detail-actions { display: flex; gap: 12px; margin-top: 16px; }
.detail-actions .btn { flex: 1; }

.reabonnement-row { display: flex; gap: 10px; align-items: center; }
.reabonnement-row .abonnement-statut { flex: 1; }

.fab-container.open .fab-menu { display: flex; }
.fab-menu { display: none; flex-direction: column; gap: 8px; position: absolute; bottom: 76px; right: 16px; }
.fab-menu-item { display: flex; align-items: center; gap: 10px;     background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 16px;
    font-weight: 600;
    color: var(--text);
    box-shadow: 0 4px 12px var(--shadow); white-space: nowrap; }
.fab-menu-dot { width: 10px; height: 10px; border-radius: 50%; }

.client-picker { position: relative; }
.client-picker .list-container { margin-top: 8px; max-height: 220px; overflow-y: auto; }

.sidebar { display: none; }
.top-navbar { display: none; }
.app-footer { display: none; }
