/* ============================================================
   KL BEAUTÉ — Premium Glassmorphism Theme v2
   ============================================================ */
* { scroll-behavior: smooth; }
::selection { background: rgba(200, 132, 47, 0.15); color: #4a2c10; }

/* ── Login ── */
.login-bg {
    background: linear-gradient(135deg, #0a0a0a 0%, #171717 40%, #1a1510 100%);
}
.login-orb {
    position: absolute; border-radius: 50%; filter: blur(120px); opacity: 0.15;
    animation: orbFloat 20s ease-in-out infinite;
}
.login-orb-1 { width: 500px; height: 500px; top: -10%; left: -5%; background: #c8842f; }
.login-orb-2 { width: 400px; height: 400px; bottom: -10%; right: -5%; background: #d4944a; animation-delay: 7s; }
.login-orb-3 { width: 300px; height: 300px; top: 40%; left: 50%; background: #b06d1e; animation-delay: 14s; }
@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.05); }
    66% { transform: translate(-20px, 30px) scale(0.95); }
}

/* ── Paiements Tabs ── */
.pay-tab {
    display: flex; align-items: center; gap: 5px;
    padding: 8px 14px;
    font-size: 11px; font-weight: 600;
    color: #71717a;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    cursor: pointer;
    background: none; border-left: none; border-right: none; border-top: none;
}
.pay-tab:hover { color: #27272a; }
.pay-tab.active {
    color: #c8842f;
    border-bottom-color: #c8842f;
}

/* ── Glass Cards ── */
.glass-card-dark {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    backdrop-filter: blur(40px) saturate(150%);
    -webkit-backdrop-filter: blur(40px) saturate(150%);
}
.glass-card {
    background: rgba(255,255,255,0.65);
    border: 1px solid rgba(255,255,255,0.5);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 4px 30px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.02);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.glass-card:hover {
    background: rgba(255,255,255,0.8);
    box-shadow: 0 8px 40px rgba(0,0,0,0.06), 0 2px 6px rgba(0,0,0,0.03);
    transform: translateY(-2px);
}
.glass-card-colored {
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.4);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.glass-card-colored:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 20px 60px rgba(0,0,0,0.08);
}

/* ── Brand Button ── */
.btn-brand {
    background: linear-gradient(135deg, #c8842f 0%, #d4944a 50%, #b06d1e 100%);
    color: white;
    box-shadow: 0 2px 12px rgba(200,132,47,0.25);
    transition: all 0.3s ease;
}
.btn-brand:hover {
    box-shadow: 0 6px 24px rgba(200,132,47,0.4);
    transform: translateY(-1px);
}

/* ── Nav ── */
.nav-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.35);
    transition: all 0.2s ease;
    border: 1px solid transparent;
}
.nav-btn:hover {
    color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.04);
}
.nav-btn.active {
    background: rgba(200,132,47,0.12);
    color: #e4b36e;
    border-color: rgba(200,132,47,0.15);
}
.nav-btn.active i { color: #d4944a; }

/* ── Category Glass Colors ── */
.glass-hammam { background: linear-gradient(135deg, rgba(254,243,199,0.6), rgba(253,230,138,0.3)); }
.glass-coiffure { background: linear-gradient(135deg, rgba(252,231,243,0.6), rgba(251,207,232,0.3)); }
.glass-coloration { background: linear-gradient(135deg, rgba(237,233,254,0.6), rgba(221,214,254,0.3)); }
.glass-proteine { background: linear-gradient(135deg, rgba(209,250,229,0.6), rgba(167,243,208,0.3)); }
.glass-soin-cheveux { background: linear-gradient(135deg, rgba(224,242,254,0.6), rgba(186,230,253,0.3)); }
.glass-epilation { background: linear-gradient(135deg, rgba(255,241,242,0.6), rgba(254,205,211,0.3)); }
.glass-soin-visage { background: linear-gradient(135deg, rgba(240,253,244,0.6), rgba(220,252,231,0.3)); }
.glass-makeup { background: linear-gradient(135deg, rgba(253,244,255,0.6), rgba(245,208,254,0.3)); }
.glass-onglerie { background: linear-gradient(135deg, rgba(255,247,237,0.6), rgba(254,215,170,0.3)); }

/* ── KPI Cards ── */
.kpi-card {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
}
.kpi-card::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 80px; height: 80px;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.12;
    pointer-events: none;
}
.kpi-green::after { background: #34d399; }
.kpi-blue::after { background: #60a5fa; }
.kpi-amber::after { background: #fbbf24; }
.kpi-rose::after { background: #fb7185; }

/* ── Status Badges ── */
.badge {
    padding: 3px 10px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.badge-nouveau { background: rgba(236,72,153,0.08); color: #db2777; }
.badge-confirme { background: rgba(59,130,246,0.08); color: #2563eb; }
.badge-en_cours { background: rgba(245,158,11,0.08); color: #d97706; }
.badge-termine { background: rgba(16,185,129,0.08); color: #059669; }
.badge-annule { background: rgba(107,114,128,0.06); color: #9ca3af; }
.badge-paye { background: rgba(16,185,129,0.08); color: #059669; }
.badge-partiel { background: rgba(245,158,11,0.08); color: #d97706; }
.badge-impaye { background: rgba(239,68,68,0.08); color: #dc2626; }

/* ── Toast ── */
@keyframes slideInRight {
    from { transform: translateX(100%) scale(0.95); opacity: 0; }
    to { transform: translateX(0) scale(1); opacity: 1; }
}
@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(120%); opacity: 0; }
}
.toast-enter { animation: slideInRight 0.3s ease-out; }
.toast-exit { animation: slideOutRight 0.3s ease-in; }

/* ── Modal ── */
.modal-enter { animation: modalIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes modalIn {
    from { transform: scale(0.92) translateY(16px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

/* ── FullCalendar ── */
.fc { font-family: 'Inter', sans-serif !important; }
.fc .fc-toolbar-title { font-family: 'Outfit', sans-serif !important; font-size: 1.1rem !important; font-weight: 700 !important; }
.fc .fc-button-primary {
    background: linear-gradient(135deg, #c8842f, #d4944a) !important;
    border: none !important; border-radius: 8px !important;
    font-size: 11px !important; padding: 6px 14px !important; font-weight: 600 !important;
}
.fc .fc-button-primary:hover { box-shadow: 0 4px 16px rgba(200,132,47,0.3) !important; }
.fc .fc-daygrid-day:hover { background: rgba(200,132,47,0.03); }
.fc .fc-event { border-radius: 6px !important; border: none !important; padding: 2px 6px !important; font-size: 11px !important; }
.fc .fc-col-header-cell-cushion { font-weight: 600; color: #a1a1aa; text-transform: uppercase; font-size: 10px; letter-spacing: 0.06em; }
.fc .fc-day-today { background: rgba(200,132,47,0.04) !important; }

/* ── Spinner ── */
.spinner {
    width: 36px; height: 36px;
    border: 2.5px solid rgba(200,132,47,0.15);
    border-top-color: #c8842f;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(200,132,47,0.15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(200,132,47,0.3); }

/* ── Charts ── */
.chart-container { position: relative; height: 280px; }

/* ── Inputs ── */
.input-field {
    width: 100%;
    border: 1px solid #e4e4e7;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    background: white;
    transition: all 0.2s ease;
}
.input-field:focus {
    outline: none;
    border-color: #c8842f;
    box-shadow: 0 0 0 3px rgba(200,132,47,0.08);
}

/* ── Tables — Premium Full-Width ── */
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: auto; }
.data-table thead th {
    background: linear-gradient(180deg, #fafafa 0%, #f4f4f5 100%);
    padding: 12px 16px; font-size: 10px; font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.08em; color: #71717a;
    border-bottom: 2px solid #e4e4e7; text-align: left;
    position: sticky; top: 0; z-index: 5;
    white-space: nowrap;
}
.data-table thead th:first-child { border-radius: 12px 0 0 0; }
.data-table thead th:last-child { border-radius: 0 12px 0 0; }
.data-table tbody td {
    padding: 13px 16px; border-bottom: 1px solid #f4f4f5; font-size: 13px;
    vertical-align: middle;
}
.data-table tbody tr { transition: all 0.15s ease; }
.data-table tbody tr:nth-child(even) { background: rgba(250,250,250,0.5); }
.data-table tbody tr:hover { background: rgba(200,132,47,0.04); }
.data-table tbody tr:last-child td:first-child { border-radius: 0 0 0 12px; }
.data-table tbody tr:last-child td:last-child { border-radius: 0 0 12px 0; }

/* Treasury table wrapper — always full width */
#payDataTable { min-width: 100%; }
#payDataTable .data-table { min-width: 700px; }

/* Treasury summary cards — no lift on hover */
#paySummary .relative { transition: all 0.25s ease; }
#paySummary .relative:hover { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(0,0,0,0.08); }

/* ── POS Cards ── */
.pos-card {
    border-radius: 16px;
    padding: 20px;
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.5);
    transition: all 0.3s ease;
}
.pos-card:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,0,0,0.06); }
.pos-especes { background: linear-gradient(135deg, rgba(16,185,129,0.06), rgba(52,211,153,0.04)); }
.pos-carte { background: linear-gradient(135deg, rgba(59,130,246,0.06), rgba(96,165,250,0.04)); }
.pos-virement { background: linear-gradient(135deg, rgba(168,85,247,0.06), rgba(192,132,252,0.04)); }

/* ── Pulse ── */
.pulse-dot {
    width: 7px; height: 7px; border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%,100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ── Signal indicator ── */
.signal-up { color: #10b981; }
.signal-down { color: #ef4444; }
.signal-icon { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; }

/* ── Permission toggle ── */
.perm-toggle {
    position: relative;
    width: 36px; height: 20px;
    background: #e4e4e7;
    border-radius: 10px;
    transition: background 0.2s;
    cursor: pointer;
}
.perm-toggle.active { background: #c8842f; }
.perm-toggle::after {
    content: '';
    position: absolute;
    top: 2px; left: 2px;
    width: 16px; height: 16px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.perm-toggle.active::after { transform: translateX(16px); }

/* ── POS Tablet System ── */
.pos-svc-card {
    background: rgba(255,255,255,0.75);
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 14px;
    overflow: hidden;
    backdrop-filter: blur(12px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.pos-svc-card:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(200,132,47,0.12);
    border-color: rgba(200,132,47,0.3);
}
.pos-svc-card:active {
    transform: scale(0.97);
    transition-duration: 0.1s;
}
.pos-svc-img {
    width: 100%; height: 90px;
    background-size: cover;
    background-position: center;
    background-color: #f4f4f5;
}
@media (min-width: 1024px) { .pos-svc-img { height: 100px; } }

.pos-cat-btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 7px 14px; border-radius: 10px;
    font-size: 11px; font-weight: 600;
    white-space: nowrap;
    background: rgba(255,255,255,0.65);
    border: 1px solid rgba(255,255,255,0.5);
    color: #71717a;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}
.pos-cat-btn:hover { background: rgba(255,255,255,0.9); }
.pos-cat-btn.active {
    background: linear-gradient(135deg, #c8842f, #d4944a);
    color: white; border-color: transparent;
    box-shadow: 0 2px 10px rgba(200,132,47,0.25);
}

.pos-pay-btn {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 8px 4px; border-radius: 10px;
    font-size: 9px; font-weight: 600;
    background: #fafafa; border: 1px solid #e4e4e7;
    color: #a1a1aa;
    transition: all 0.2s ease;
}
.pos-pay-btn:hover { border-color: #c8842f; color: #c8842f; }
.pos-pay-btn.active {
    background: rgba(200,132,47,0.08);
    border-color: #c8842f;
    color: #c8842f;
}

.pos-cat-scroll { scrollbar-width: none; -ms-overflow-style: none; }
.pos-cat-scroll::-webkit-scrollbar { display: none; }

/* ── Service Image Upload ── */
.svc-img-upload {
    position: relative;
    width: 100%; height: 120px;
    border-radius: 12px;
    overflow: hidden;
    background: #f4f4f5;
    cursor: pointer;
    transition: all 0.2s ease;
}
.svc-img-upload:hover { opacity: 0.85; }
.svc-img-upload img { width: 100%; height: 100%; object-fit: cover; }
.svc-img-upload .upload-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.2s;
}
.svc-img-upload:hover .upload-overlay { opacity: 1; }

/* ── Smart RDV Modal ── */
.rdv-step-label {
    display: flex; align-items: center; gap: 8px;
    font-size: 11px; font-weight: 700; color: #52525b;
    margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.04em;
}
.rdv-step-num {
    width: 20px; height: 20px; border-radius: 6px;
    background: linear-gradient(135deg, #c8842f, #d4944a);
    color: white; font-size: 10px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
}

/* Time Slot Grid */
.time-slot-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    padding: 2px;
}

.time-slot {
    padding: 8px 4px; border-radius: 8px;
    font-size: 12px; font-weight: 600;
    font-family: 'Outfit', 'Inter', sans-serif;
    background: white; border: 1px solid #e4e4e7;
    color: #52525b; text-align: center;
    transition: all 0.15s ease;
    cursor: pointer;
    letter-spacing: 0.02em;
}
.time-slot:hover {
    background: rgba(200,132,47,0.04);
    border-color: rgba(200,132,47,0.3);
    color: #c8842f;
}
.time-slot.active {
    background: linear-gradient(135deg, #c8842f, #d4944a);
    color: white; border-color: transparent;
    box-shadow: 0 3px 12px rgba(200,132,47,0.3);
}

/* Service Chips */
.svc-chip {
    padding: 5px 10px; border-radius: 8px;
    font-size: 11px; font-weight: 500;
    background: #fafafa; border: 1px solid #e4e4e7;
    color: #52525b;
    transition: all 0.15s ease;
    cursor: pointer;
    white-space: nowrap;
}
.svc-chip:hover {
    background: rgba(200,132,47,0.05);
    border-color: rgba(200,132,47,0.25);
}
.svc-chip.active {
    background: linear-gradient(135deg, #c8842f, #d4944a);
    color: white; border-color: transparent;
    box-shadow: 0 2px 8px rgba(200,132,47,0.2);
}

/* ── History Tabs ── */
.hist-tab {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 6px 12px; border-radius: 8px;
    font-size: 11px; font-weight: 600;
    background: #fafafa; border: 1px solid #e4e4e7;
    color: #71717a;
    transition: all 0.2s ease;
    cursor: pointer; white-space: nowrap;
}
.hist-tab:hover { background: rgba(200,132,47,0.05); border-color: rgba(200,132,47,0.2); }
.hist-tab.active {
    background: linear-gradient(135deg, #c8842f, #d4944a);
    color: white; border-color: transparent;
    box-shadow: 0 2px 8px rgba(200,132,47,0.25);
}

/* ══════════════════════════════════════════════
   Smart Client Picker (SCP)
   ══════════════════════════════════════════════ */
.smart-client-picker { position: relative; z-index: 100; }

.scp-input-wrap {
    display: flex; align-items: center; gap: 8px;
    border: 1.5px solid #e4e4e7; border-radius: 12px;
    padding: 8px 12px; background: white;
    cursor: pointer; transition: all 0.2s ease;
}
.scp-input-wrap:hover { border-color: rgba(200,132,47,0.4); }
.scp-input-wrap:focus-within {
    border-color: #c8842f;
    box-shadow: 0 0 0 3px rgba(200,132,47,0.08);
}
.scp-icon { width: 16px; height: 16px; color: #c8842f; flex-shrink: 0; }
.scp-input {
    flex: 1; border: none; outline: none; background: none;
    font-size: 12px; font-weight: 500; color: #27272a;
}
.scp-input::placeholder { color: #a1a1aa; }
.scp-chevron {
    width: 14px; height: 14px; color: #a1a1aa; flex-shrink: 0;
    transition: transform 0.2s ease;
}

.scp-dropdown {
    position: absolute; z-index: 9999; width: 100%;
    margin-top: 6px; border-radius: 16px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 12px 48px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.04);
    max-height: 360px; overflow-y: auto;
    animation: scpSlideIn 0.2s ease-out;
}
@keyframes scpSlideIn {
    from { opacity: 0; transform: translateY(-6px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Quick Actions (Walk-in + New) */
.scp-actions {
    display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
    padding: 10px 10px 6px;
}
.scp-action-btn {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 8px 10px; border-radius: 10px;
    font-size: 10px; font-weight: 700;
    transition: all 0.2s ease; cursor: pointer;
    border: 1.5px solid transparent;
}
.scp-action-walkin {
    background: rgba(168,85,247,0.06); color: #7c3aed;
    border-color: rgba(168,85,247,0.12);
}
.scp-action-walkin:hover {
    background: rgba(168,85,247,0.12);
    box-shadow: 0 2px 8px rgba(168,85,247,0.15);
}
.scp-action-new {
    background: rgba(16,185,129,0.06); color: #059669;
    border-color: rgba(16,185,129,0.12);
}
.scp-action-new:hover {
    background: rgba(16,185,129,0.12);
    box-shadow: 0 2px 8px rgba(16,185,129,0.15);
}

/* Inline New Client Form */
.scp-new-form {
    margin: 0 10px 6px; padding: 10px;
    background: rgba(200,132,47,0.04);
    border: 1px dashed rgba(200,132,47,0.2);
    border-radius: 12px;
    animation: scpSlideIn 0.15s ease-out;
}
.scp-new-title {
    display: flex; align-items: center; gap: 6px;
    font-size: 10px; font-weight: 700; color: #c8842f;
    margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.05em;
}
.scp-new-fields { display: flex; flex-direction: column; gap: 6px; }
.scp-field-group {
    display: flex; align-items: center; gap: 8px;
    background: white; border: 1px solid #e4e4e7;
    border-radius: 8px; padding: 6px 10px;
}
.scp-field-group i { color: #a1a1aa; flex-shrink: 0; }
.scp-field-input {
    flex: 1; border: none; outline: none; background: none;
    font-size: 12px; color: #27272a;
}
.scp-field-input::placeholder { color: #d4d4d8; }
.scp-create-btn {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    width: 100%; padding: 8px;
    background: linear-gradient(135deg, #c8842f, #d4944a);
    color: white; border: none; border-radius: 8px;
    font-size: 11px; font-weight: 700; cursor: pointer;
    transition: all 0.2s ease;
}
.scp-create-btn:hover {
    box-shadow: 0 4px 12px rgba(200,132,47,0.3);
    transform: translateY(-1px);
}

/* Section Titles */
.scp-section { padding: 0 10px 8px; }
.scp-section-title {
    display: flex; align-items: center; gap: 6px;
    font-size: 9px; font-weight: 800; color: #a1a1aa;
    text-transform: uppercase; letter-spacing: 0.08em;
    padding: 6px 4px 4px; margin-bottom: 2px;
}

/* Client Rows */
.scp-list { display: flex; flex-direction: column; gap: 2px; }
.scp-client-row {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: 10px;
    cursor: pointer; transition: all 0.15s ease;
}
.scp-client-row:hover {
    background: rgba(200,132,47,0.06);
}
.scp-client-row:hover .scp-row-arrow { color: #c8842f; transform: translateX(2px); }
.scp-row-arrow { transition: all 0.15s ease; }
.scp-client-avatar {
    width: 32px; height: 32px; border-radius: 10px;
    background: linear-gradient(135deg, #c8842f, #d4944a);
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 12px; font-weight: 800;
    flex-shrink: 0;
}
.scp-client-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.scp-client-name {
    font-size: 12px; font-weight: 600; color: #27272a;
    display: flex; align-items: center; gap: 6px;
    line-height: 1.3;
}
.scp-client-phone {
    font-size: 10px; color: #a1a1aa; font-weight: 500;
    display: flex; align-items: center; gap: 4px;
}

/* Badges */
.scp-badge {
    font-size: 8px; font-weight: 800; padding: 1px 6px;
    border-radius: 5px; text-transform: uppercase; letter-spacing: 0.04em;
}
.scp-badge-vip { background: rgba(245,158,11,0.12); color: #d97706; }
.scp-badge-visits { background: rgba(59,130,246,0.08); color: #3b82f6; }
.scp-badge-new { background: rgba(16,185,129,0.08); color: #10b981; }

/* Empty / No Results */
.scp-empty, .scp-no-results {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 16px; text-align: center; color: #a1a1aa; font-size: 11px;
}
.scp-no-results p { font-size: 11px; color: #71717a; }
.scp-smart-create-btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 7px 14px; border-radius: 8px;
    background: linear-gradient(135deg, #c8842f, #d4944a);
    color: white; font-size: 11px; font-weight: 700;
    border: none; cursor: pointer; transition: all 0.2s ease;
    margin-top: 4px;
}
.scp-smart-create-btn:hover { box-shadow: 0 4px 12px rgba(200,132,47,0.3); }

.scp-loading {
    display: flex; justify-content: center; padding: 16px;
}

/* Selected Client Badge */
.scp-selected {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px; border-radius: 12px;
    background: linear-gradient(135deg, rgba(200,132,47,0.06), rgba(200,132,47,0.02));
    border: 1.5px solid rgba(200,132,47,0.15);
    animation: scpSlideIn 0.2s ease-out;
}
.scp-selected-avatar {
    width: 34px; height: 34px; border-radius: 10px;
    background: linear-gradient(135deg, #c8842f, #d4944a);
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 14px; font-weight: 800; flex-shrink: 0;
}
.scp-selected-info { flex: 1; min-width: 0; }
.scp-selected-name {
    display: block; font-size: 12px; font-weight: 700; color: #27272a;
}
.scp-selected-detail {
    display: block; font-size: 10px; color: #71717a; font-weight: 500;
}
.scp-selected-remove {
    width: 28px; height: 28px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: #a1a1aa; background: rgba(0,0,0,0.04);
    transition: all 0.2s ease; cursor: pointer; border: none;
}
.scp-selected-remove:hover { background: rgba(239,68,68,0.1); color: #ef4444; }

/* ── RDV Fluid Service List ── */
.rdv-svc-scroll {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}
.rdv-svc-scroll::-webkit-scrollbar { width: 3px; }
.rdv-svc-scroll::-webkit-scrollbar-track { background: transparent; }
.rdv-svc-scroll::-webkit-scrollbar-thumb { background: rgba(200,132,47,0.15); border-radius: 10px; }

.rdv-svc-row {
    display: flex; align-items: center; gap: 10px;
    width: 100%; text-align: left;
    padding: 10px 12px; border-radius: 12px;
    background: white;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-bottom: 3px;
}
.rdv-svc-row:hover {
    background: #fefcf9;
    border-color: rgba(200,132,47,0.15);
}
.rdv-svc-row:active { transform: scale(0.985); transition-duration: 0.08s; }
.rdv-svc-row.active {
    background: linear-gradient(135deg, rgba(200,132,47,0.06), rgba(200,132,47,0.02));
    border-color: #c8842f;
}
.rdv-svc-emoji {
    font-size: 22px; flex-shrink: 0;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    background: #fafafa; border-radius: 12px;
}
.rdv-svc-row.active .rdv-svc-emoji {
    background: rgba(200,132,47,0.1);
}
.rdv-svc-name {
    flex: 1; min-width: 0;
    font-size: 13px; font-weight: 600; color: #27272a;
    line-height: 1.35;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rdv-svc-row.active .rdv-svc-name { color: #6b3f14; }
.rdv-svc-prix {
    font-size: 13px; font-weight: 800; color: #c8842f;
    font-family: 'Outfit', sans-serif; flex-shrink: 0;
    white-space: nowrap;
}
.rdv-svc-tick {
    width: 26px; height: 26px; border-radius: 50%;
    border: 2px solid #e4e4e7;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.rdv-svc-tick svg { width: 14px; height: 14px; color: transparent; transition: color 0.15s; }
.rdv-svc-row.active .rdv-svc-tick {
    background: linear-gradient(135deg, #c8842f, #d4944a);
    border-color: #c8842f;
}
.rdv-svc-row.active .rdv-svc-tick svg { color: white; }

/* RDV Selection Summary Bar */
.rdv-selection-bar {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px; border-radius: 14px;
    background: linear-gradient(135deg, rgba(200,132,47,0.08), rgba(200,132,47,0.03));
    border: 1.5px solid rgba(200,132,47,0.18);
    animation: scpSlideIn 0.2s ease-out;
}
.rdv-selection-bar .rdv-sel-count {
    width: 32px; height: 32px; border-radius: 10px;
    background: linear-gradient(135deg, #c8842f, #d4944a);
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 14px; font-weight: 800; flex-shrink: 0;
    font-family: 'Outfit', sans-serif;
}
.rdv-selection-bar .rdv-sel-info { flex: 1; min-width: 0; }
.rdv-selection-bar .rdv-sel-label {
    font-size: 10px; font-weight: 700; color: #8e5318;
    text-transform: uppercase; letter-spacing: 0.04em;
}
.rdv-selection-bar .rdv-sel-items {
    font-size: 11px; color: #71717a; font-weight: 500;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rdv-selection-bar .rdv-sel-total {
    font-size: 18px; font-weight: 800; color: #c8842f;
    font-family: 'Outfit', sans-serif; flex-shrink: 0;
    white-space: nowrap;
}

/* ── Fullscreen Modal on Mobile ── */
@media (max-width: 767px) {
    #globalModal > div:last-child { padding: 0 !important; }
    #modalContent {
        border-radius: 0 !important; max-height: 100vh !important;
        min-height: 100vh; width: 100% !important; max-width: 100% !important;
    }
    .rdv-svc-row { padding: 12px 12px; }
    .rdv-svc-name { font-size: 12px; }
    .rdv-svc-prix { font-size: 12px; }
    .rdv-svc-emoji { width: 36px; height: 36px; font-size: 18px; }
    .time-slot { font-size: 11px; padding: 8px 2px; }
}

/* ══════════════════════════════════════════════
   POS Fullscreen Mode
   ══════════════════════════════════════════════ */
.pos-fullscreen-active #sidebar { transform: translateX(-100%) !important; }
.pos-fullscreen-active #sidebarOverlay { display: none !important; }
.pos-fullscreen-active main { margin-left: 0 !important; }
.pos-fullscreen-active header { display: none !important; }
.pos-fullscreen-active #pageContainer {
    padding: 16px !important;
    height: 100vh !important;
    background: #f4f4f5;
}
.pos-fullscreen-active .pos-mobile-stack {
    height: calc(100vh - 32px) !important;
}

.pos-fs-exit-btn {
    position: fixed; top: 12px; right: 12px; z-index: 9999;
    display: flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: 12px;
    background: rgba(0,0,0,0.75); color: white;
    font-size: 12px; font-weight: 700; border: none; cursor: pointer;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    transition: all 0.2s ease;
    animation: scpSlideIn 0.3s ease-out;
}
.pos-fs-exit-btn:hover {
    background: rgba(200,132,47,0.9);
    transform: scale(1.05);
}

/* ══════════════════════════════════════════════
   POS Cart Item + Inline Quantity Controls
   ══════════════════════════════════════════════ */
.pos-cart-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: 12px;
    background: white; border: 1px solid #f4f4f5;
    transition: all 0.15s ease;
    position: relative;
}
.pos-cart-item:hover { border-color: rgba(200,132,47,0.2); }

.pos-qty-controls {
    display: flex; align-items: center; gap: 0;
    background: #f4f4f5; border-radius: 10px;
    border: 1px solid #e4e4e7;
    overflow: hidden; flex-shrink: 0;
}
.pos-qty-btn {
    width: 30px; height: 30px; border: none; background: none;
    font-size: 16px; font-weight: 700; color: #71717a;
    cursor: pointer; transition: all 0.15s; display: flex;
    align-items: center; justify-content: center;
}
.pos-qty-btn:hover { background: #e4e4e7; color: #27272a; }
.pos-qty-btn:active { transform: scale(0.9); }
.pos-qty-btn-plus { color: #c8842f; }
.pos-qty-btn-plus:hover { background: rgba(200,132,47,0.1); color: #b06d1e; }
.pos-qty-value {
    min-width: 26px; text-align: center;
    font-size: 13px; font-weight: 800; color: #27272a;
    font-family: 'Outfit', sans-serif;
}
.pos-cart-delete {
    padding: 6px; border-radius: 8px; border: none;
    background: none; color: #d4d4d8; cursor: pointer;
    transition: all 0.15s; flex-shrink: 0;
    opacity: 0.4;
}
.pos-cart-delete:hover { background: rgba(239,68,68,0.08); color: #ef4444; opacity: 1; }
.pos-cart-item:hover .pos-cart-delete { opacity: 1; }

/* ══════════════════════════════════════════════
   POS Responsive — Tablet (768-1023px)
   ══════════════════════════════════════════════ */
@media (min-width: 768px) and (max-width: 1023px) {
    .pos-mobile-stack { flex-direction: column !important; height: auto !important; }
    .pos-mobile-stack > div:first-child { max-height: 50vh; }
    .pos-mobile-stack > div:last-child { width: 100% !important; }
    #posServiceCards { grid-template-columns: repeat(3, 1fr) !important; }
    .pos-svc-img { height: 85px; }
    .pos-cart-delete { opacity: 1; }
}

/* ── POS Mobile (< 768px) ── */
@media (max-width: 767px) {
    .pos-mobile-stack { flex-direction: column !important; height: auto !important; }
    .pos-mobile-stack > div:first-child { max-height: 40vh; }
    .pos-mobile-stack > div:last-child { width: 100% !important; }
    #posServiceCards { grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; }
    .pos-svc-img { height: 70px; }
    .pos-svc-card { border-radius: 10px; }
    .pos-svc-card .p-2\.5 { padding: 6px 8px; }
    .pos-cart-delete { opacity: 1; }
    .pos-qty-btn { width: 34px; height: 34px; }
}

/* POS fullscreen tablet/mobile */
@media (max-width: 1023px) {
    .pos-fullscreen-active #pageContainer { padding: 8px !important; }
    .pos-fullscreen-active .pos-mobile-stack {
        height: calc(100vh - 16px) !important;
        flex-direction: column !important;
    }
    .pos-fullscreen-active .pos-mobile-stack > div:first-child { max-height: 45vh; flex: 1; }
    .pos-fullscreen-active .pos-mobile-stack > div:last-child { flex: 1; }
}

/* POS fullscreen desktop */
@media (min-width: 1024px) {
    .pos-fullscreen-active .pos-mobile-stack {
        flex-direction: row !important;
        height: calc(100vh - 32px) !important;
    }
    .pos-fullscreen-active #posServiceCards {
        grid-template-columns: repeat(5, 1fr) !important;
    }
    .pos-fullscreen-active .pos-svc-img { height: 110px; }
}

/* ══════════════════════════════════════════════
   Calendar Responsive
   ══════════════════════════════════════════════ */
@media (max-width: 767px) {
    .fc .fc-toolbar { flex-direction: column; gap: 8px; }
    .fc .fc-toolbar-title { font-size: 0.95rem !important; }
    .fc .fc-button-primary { font-size: 10px !important; padding: 4px 8px !important; }
}
@media (min-width: 768px) and (max-width: 1023px) {
    .fc .fc-toolbar-title { font-size: 1rem !important; }
}

/* ══════════════════════════════════════════════
   Dashboard Responsive — Mobile card layout
   ══════════════════════════════════════════════ */
@media (max-width: 767px) {
    .kpi-card p.text-xl { font-size: 1.1rem; }
    .chart-container { height: 220px; }
}

/* ── Reminder Popup Animations ── */
@keyframes reminderFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes reminderFadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}
@keyframes reminderSlideUp {
    from { transform: translateY(40px) scale(0.92); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes reminderPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 8px 25px rgba(200,132,47,0.3); }
    50% { transform: scale(1.08); box-shadow: 0 12px 35px rgba(200,132,47,0.5); }
}

/* ── Notification Button Active State ── */
#notifBtn #notifCount {
    font-variant-numeric: tabular-nums;
}
#notifBtn:has(#notifCount[style*="flex"]) {
    background: rgba(239,68,68,0.06);
    color: #ef4444;
}

/* ══════════════════════════════════════════════
   RTL SUPPORT — Arabic Layout
   ══════════════════════════════════════════════ */

/* Global RTL text alignment */
html[dir="rtl"] body { text-align: right; }

/* Sidebar flip */
html[dir="rtl"] #sidebar {
    left: auto; right: 0;
    border-right: none;
    border-left: 1px solid rgba(255,255,255,0.08);
}
html[dir="rtl"] #sidebar.open { transform: translateX(0); }
html[dir="rtl"] main { margin-left: 0 !important; }
@media (min-width: 1024px) {
    html[dir="rtl"] main { margin-left: 0; margin-right: 220px; }
    html[dir="rtl"] #sidebar { transform: translateX(0); }
}
html[dir="rtl"] #sidebarOverlay + #sidebar:not(.open) {
    transform: translateX(100%);
}

/* Menu toggle button */
html[dir="rtl"] #menuToggle { left: auto; right: auto; }

/* Navigation items */
html[dir="rtl"] .nav-btn { text-align: right; flex-direction: row-reverse; }
html[dir="rtl"] .nav-btn i { margin-left: 8px; margin-right: 0; }

/* Header controls */
html[dir="rtl"] header { flex-direction: row-reverse; }

/* Search icons flip */
html[dir="rtl"] .input-field.pl-10 { padding-left: 14px; padding-right: 40px; }
html[dir="rtl"] i[class*="absolute left-3"] {
    left: auto !important; right: 14px;
}

/* Tables */
html[dir="rtl"] .data-table thead th { text-align: right; }
html[dir="rtl"] .data-table thead th:first-child { border-radius: 0 12px 0 0; }
html[dir="rtl"] .data-table thead th:last-child { border-radius: 12px 0 0 0; }
html[dir="rtl"] .data-table tbody tr:last-child td:first-child { border-radius: 0 0 12px 0; }
html[dir="rtl"] .data-table tbody tr:last-child td:last-child { border-radius: 0 0 0 12px; }

/* Buttons & flex containers */
html[dir="rtl"] .flex { /* Keep flex but reverse where needed */ }
html[dir="rtl"] .gap-2 i + span,
html[dir="rtl"] .gap-1 i + span { direction: rtl; }

/* Modal close button */
html[dir="rtl"] button[onclick="closeModal()"] { margin-left: 0; margin-right: auto; }

/* Permission toggle */
html[dir="rtl"] .perm-toggle::after { left: auto; right: 2px; }
html[dir="rtl"] .perm-toggle.active::after { transform: translateX(-16px); }

/* Toast notifications — slide from left in RTL */
html[dir="rtl"] .toast-enter {
    animation: slideInLeft 0.3s ease-out;
}
html[dir="rtl"] .toast-exit {
    animation: slideOutLeft 0.3s ease-in;
}
@keyframes slideInLeft {
    from { transform: translateX(-100%) scale(0.95); opacity: 0; }
    to { transform: translateX(0) scale(1); opacity: 1; }
}
@keyframes slideOutLeft {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(-120%); opacity: 0; }
}

/* Smart Client Picker */
html[dir="rtl"] .scp-client-row { flex-direction: row-reverse; }
html[dir="rtl"] .scp-input-wrap { flex-direction: row-reverse; }
html[dir="rtl"] .scp-selected { flex-direction: row-reverse; }

/* Language dropdown — fix position in RTL */
html[dir="rtl"] #langDropdown { left: 0; right: auto; }

/* Calendar RTL */
html[dir="rtl"] .fc { direction: rtl; }

/* POS fullscreen RTL */
html[dir="rtl"] .pos-fullscreen-active #sidebar { transform: translateX(100%) !important; }
html[dir="rtl"] .pos-fs-exit-btn { right: auto; left: 12px; }

/* Font selection for Arabic */
html[lang="ar"] { font-family: 'Inter', 'Segoe UI', 'Tahoma', 'Arial', sans-serif; }
html[lang="ar"] .font-heading { font-family: 'Outfit', 'Inter', 'Arial', sans-serif; }

/* Dashboard arrow direction flip for RTL */
html[dir="rtl"] .dash_voir_tout { direction: ltr; unicode-bidi: bidi-override; }

/* RDV service rows */
html[dir="rtl"] .rdv-svc-row { flex-direction: row-reverse; text-align: right; }

/* Form labels */
html[dir="rtl"] label { text-align: right; }

/* Stat cards */
html[dir="rtl"] .signal-icon { flex-direction: row-reverse; }

