/* ============================================================
   RioBeauty — UI theme (Beauty Center / Aesthetic Clinic)
   Palette: Rose · Plum · Gold · Soft cloud — RTL Kurdish
   ============================================================ */
:root {
    --brand:        #d6336c;   /* rose */
    --brand-2:      #b5179e;   /* plum */
    --brand-3:      #7048e8;   /* violet */
    --accent:       #0ca678;   /* green */
    --gold:         #e8a13a;
    --bg:           #f6f4f8;
    --sidebar-bg:   #1b0e23;   /* deep plum */
    --sidebar-hover:#2c1736;
    --card:         #ffffff;
    --ink:          #2a2233;
    --muted:        #8a7f95;
    --line:         #ece7f1;
    --card-radius:  18px;
    --sidebar-w:    260px;
}
[data-bs-theme="dark"] {
    --bg: #140d1a;
    --card: #1d1426;
    --ink: #ece7f1;
    --muted: #9c8fab;
    --line: #2c2236;
    --sidebar-bg: #0e070f;
}

* { -webkit-tap-highlight-color: transparent; box-sizing: border-box; }
html, body { height: 100%; }
body {
    background: var(--bg);
    color: var(--ink);
    font-family: 'Vazirmatn', 'Noto Naskh Arabic', 'Segoe UI', 'Tahoma', sans-serif;
    overflow-x: hidden;
    margin: 0;
}
body { direction: rtl; }
a { text-decoration: none; }

/* ===== LOGIN ===== */
.login-wrap {
    min-height: 100vh; display: grid; place-items: center; padding: 1.2rem;
    background: radial-gradient(1200px 600px at 80% -10%, #6a2153 0%, transparent 60%),
                radial-gradient(900px 500px at 0% 110%, #3a1b6b 0%, transparent 55%),
                linear-gradient(135deg, #2a0f33, #4a1242);
    position: relative; overflow: hidden;
}
.login-blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5; }
.login-blob.b1 { width: 320px; height: 320px; background: #d6336c; top: -60px; right: -40px; }
.login-blob.b2 { width: 280px; height: 280px; background: #7048e8; bottom: -60px; left: -40px; }
.login-blob.b3 { width: 200px; height: 200px; background: #e8a13a; top: 40%; left: 50%; }
.login-card {
    position: relative; z-index: 2; width: 100%; max-width: 880px; display: grid;
    grid-template-columns: 1fr 1fr; background: var(--card); border-radius: 26px; overflow: hidden;
}
.login-hero {
    background: linear-gradient(160deg, var(--brand), var(--brand-2) 60%, var(--brand-3));
    color: #fff; padding: 2.4rem 2rem; display: flex; flex-direction: column; justify-content: space-between;
}
.login-logo { width: 70px; height: 70px; border-radius: 18px; background: rgba(255,255,255,.15); padding: 8px; }
.login-brand { font-weight: 800; margin-top: .8rem; font-size: 1.7rem; }
.login-brand span { opacity: .85; }
.login-feats { list-style: none; padding: 0; margin: 0; }
.login-feats li { margin: .55rem 0; opacity: .92; }
.login-feats i { margin-left: .4rem; }
.login-hero-foot { opacity: .8; font-size: .8rem; }
.login-form-pane { padding: 2.4rem 2rem; display: flex; flex-direction: column; justify-content: center; }
.login-logo-sm { display: none; }
@media (max-width: 767.98px) {
    .login-card { grid-template-columns: 1fr; max-width: 420px; }
    .login-hero { display: none; }
    .login-logo-sm { display: block; text-align: center; margin-bottom: 1rem; }
    .login-logo-sm img { width: 64px; }
}

/* ===== SHELL ===== */
.sidebar {
    position: fixed; inset: 0 0 0 auto; width: var(--sidebar-w); background: var(--sidebar-bg);
    color: #e7ddf0; display: flex; flex-direction: column; z-index: 1040; transition: transform .25s;
}
.sidebar-brand {
    padding: 1.1rem 1.2rem; font-size: 1.3rem; font-weight: 800; color: #fff;
    display: flex; align-items: center; gap: .55rem; border-bottom: 1px solid rgba(255,255,255,.07);
}
.sidebar-brand i { color: var(--brand); font-size: 1.5rem; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: .6rem; }
.sidebar-nav::-webkit-scrollbar { width: 6px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 6px; }
.nav-section { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: #8a7f95; padding: .9rem .8rem .35rem; }
.nav-link-item {
    display: flex; align-items: center; gap: .7rem; padding: .62rem .8rem; border-radius: 12px;
    color: #cbbfd8; cursor: pointer; margin-bottom: 2px; font-size: .92rem; transition: .15s;
}
.nav-link-item i { font-size: 1.1rem; width: 20px; text-align: center; }
.nav-link-item:hover { background: var(--sidebar-hover); color: #fff; }
.nav-link-item.active { background: linear-gradient(270deg, var(--brand-2), var(--brand)); color: #fff; box-shadow: 0 6px 16px rgba(214,51,108,.35); }
.sidebar-footer { padding: .8rem; border-top: 1px solid rgba(255,255,255,.07); }
.avatar {
    width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand-3));
    color: #fff; display: grid; place-items: center; font-weight: 700; flex: none;
}
.main { margin-right: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
    position: sticky; top: 0; z-index: 1020; background: var(--card); border-bottom: 1px solid var(--line);
    padding: .7rem 1.2rem; display: flex; align-items: center; gap: .6rem;
}
.content { padding: 1.2rem; flex: 1; }
@media (max-width: 991.98px) {
    .sidebar { transform: translateX(100%); }
    .sidebar.show { transform: translateX(0); }
    .main { margin-right: 0; }
}

/* ===== CARDS / UI ===== */
.card { border: 1px solid var(--line); border-radius: var(--card-radius); background: var(--card); }
.card-soft { box-shadow: 0 4px 18px rgba(40,20,50,.05); }
.stat-card { border-radius: var(--card-radius); padding: 1.1rem 1.2rem; color: #fff; position: relative; overflow: hidden; }
.stat-card .stat-ico { position: absolute; left: 1rem; top: 1rem; font-size: 2.4rem; opacity: .25; }
.stat-card .stat-val { font-size: 1.7rem; font-weight: 800; }
.stat-card .stat-lbl { opacity: .9; font-size: .85rem; }
.bg-grad-rose { background: linear-gradient(135deg, #d6336c, #b5179e); }
.bg-grad-violet { background: linear-gradient(135deg, #7048e8, #b5179e); }
.bg-grad-green { background: linear-gradient(135deg, #0ca678, #099268); }
.bg-grad-gold { background: linear-gradient(135deg, #e8a13a, #d6336c); }
.bg-grad-blue { background: linear-gradient(135deg, #2563eb, #7048e8); }

.btn-primary { background: var(--brand); border-color: var(--brand); }
.btn-primary:hover, .btn-primary:focus { background: var(--brand-2); border-color: var(--brand-2); }
.btn-outline-primary { color: var(--brand); border-color: var(--brand); }
.btn-outline-primary:hover { background: var(--brand); border-color: var(--brand); }
.text-brand { color: var(--brand) !important; }
.page-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

.table { color: var(--ink); }
.table thead th { background: #faf6fb; color: var(--muted); font-size: .8rem; font-weight: 700; border-bottom: 2px solid var(--line); white-space: nowrap; }
[data-bs-theme="dark"] .table thead th { background: #241a2e; }
.table td { vertical-align: middle; }
.table-hover tbody tr:hover { background: rgba(214,51,108,.04); }

.badge-soft-success { background: rgba(12,166,120,.12); color: #0ca678; }
.badge-soft-danger { background: rgba(214,51,108,.12); color: #d6336c; }
.badge-soft-warning { background: rgba(232,161,58,.16); color: #c47a12; }
.badge-soft-info { background: rgba(112,72,232,.12); color: #7048e8; }
.badge-soft-secondary { background: rgba(138,127,149,.15); color: #6c6178; }

.form-control, .form-select { border-radius: 12px; border-color: var(--line); }
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 .2rem rgba(214,51,108,.15); }
.form-label { font-weight: 600; font-size: .85rem; color: var(--muted); }
.modal-content { border-radius: 20px; border: none; }
.modal-header { border-bottom: 1px solid var(--line); }

.spinner-wrap { display: grid; place-items: center; padding: 3rem; }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty-state i { font-size: 2.6rem; opacity: .4; }

.toast-container { left: 0; right: auto; }
.section-title { font-weight: 800; font-size: 1.05rem; margin: 0; }

.list-tile { display: flex; align-items: center; gap: .75rem; padding: .7rem; border-radius: 14px; border: 1px solid var(--line); margin-bottom: .55rem; background: var(--card); }
.list-tile:hover { border-color: var(--brand); }
.tile-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: #fff; flex: none; font-size: 1.15rem; }

.cal-grid { display: grid; gap: 8px; }
.cal-slot { border: 1px solid var(--line); border-radius: 12px; padding: .55rem .7rem; background: var(--card); border-right: 4px solid var(--brand); }
.cal-slot .t { font-weight: 700; }

.pill-tabs { display: flex; gap: .4rem; flex-wrap: wrap; }
.pill-tabs .pill { padding: .35rem .9rem; border-radius: 999px; border: 1px solid var(--line); cursor: pointer; font-size: .85rem; }
.pill-tabs .pill.active { background: var(--brand); color: #fff; border-color: var(--brand); }

.kpi-mini { border: 1px solid var(--line); border-radius: 14px; padding: .8rem 1rem; background: var(--card); }
.kpi-mini .v { font-size: 1.3rem; font-weight: 800; }
.kpi-mini .l { color: var(--muted); font-size: .8rem; }

.cart-row { display: flex; align-items: center; gap: .5rem; padding: .5rem; border-bottom: 1px solid var(--line); }

/* ===== Modern combobox / multi-picker ===== */
.combo { position: relative; }
.combo-control { min-height: 42px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); padding: 4px 6px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; cursor: text; }
.combo-control.focus { border-color: var(--brand); box-shadow: 0 0 0 .2rem rgba(214,51,108,.15); }
.combo-control input { border: 0; outline: 0; background: transparent; flex: 1; min-width: 90px; color: var(--ink); padding: 4px; font-family: inherit; }
.combo-chip { display: inline-flex; align-items: center; gap: 5px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border-radius: 999px; padding: 2px 10px; font-size: .82rem; max-width: 100%; }
.combo-chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.combo-chip i { cursor: pointer; opacity: .85; }
.combo-chip i:hover { opacity: 1; }
.combo-panel { position: absolute; z-index: 1080; left: 0; right: 0; margin-top: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(40,20,50,.18); max-height: 300px; overflow-y: auto; }
.combo-opt { padding: .55rem .8rem; cursor: pointer; font-size: .9rem; display: flex; align-items: center; gap: .5rem; }
.combo-opt:hover, .combo-opt.active { background: rgba(214,51,108,.1); }
.combo-opt.is-child { padding-right: 1.9rem; color: var(--muted); }
.combo-opt.is-child::before { content: '↳'; color: var(--brand); }
.combo-opt .badge-soft-info { margin-right: auto; }
.combo-opt.chosen { opacity: .45; }
.combo-group { padding: .35rem .8rem; font-size: .72rem; font-weight: 700; color: var(--brand); background: #faf0f5; text-transform: uppercase; letter-spacing: .04em; }
[data-bs-theme="dark"] .combo-group { background: #241a2e; }
.combo-empty { padding: .7rem .8rem; color: var(--muted); font-size: .85rem; }

/* ===== POS — modern picker, tabs, payment ===== */
.pos-tabs { display: inline-flex; background: var(--bg); border-radius: 14px; padding: 4px; gap: 4px; }
.pos-tabs button { border: 0; background: transparent; border-radius: 11px; padding: .5rem 1.2rem; font-weight: 700; color: var(--muted); cursor: pointer; transition: .15s; }
.pos-tabs button.active { background: var(--card); color: var(--brand); box-shadow: 0 3px 10px rgba(40,20,50,.1); }

.pos-group { margin-bottom: 1rem; }
.pos-group-title { font-size: .8rem; font-weight: 800; color: var(--brand); margin: .2rem 0 .55rem; display: flex; align-items: center; gap: .4rem; }
.pos-group-title::before { content: ''; width: 6px; height: 16px; border-radius: 3px; background: linear-gradient(var(--brand), var(--brand-2)); }
/* گرووپەکان بە چەند ستوون (کەمکردنەوەی بۆشایی) */
.pick-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; align-items: start; }
.pos-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 7px; }
.pick-card { position: relative; border: 1.5px solid var(--line); border-radius: 14px; padding: .55rem 2rem .55rem .6rem; cursor: pointer; background: var(--card); transition: .12s; user-select: none; }
.pick-card:hover { border-color: var(--brand); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(40,20,50,.08); }
.pick-card.selected { border-color: var(--accent); background: linear-gradient(135deg, rgba(12,166,120,.12), rgba(112,72,232,.06)); box-shadow: 0 0 0 2px rgba(12,166,120,.25); }
/* استایلی نوێی checkbox — بازنەیی، کاتێ هەڵبژێردرا سەوز دەبێت */
.pick-card .pc-check { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: transparent; font-size: .75rem; transition: .12s; }
.pick-card:hover .pc-check { border-color: var(--brand); }
.pick-card.selected .pc-check { background: var(--accent); border-color: var(--accent); color: #fff; }
.pick-card .pc-name { padding-right: 0 !important; }
.pick-card .pc-name { font-weight: 700; font-size: .85rem; padding-right: 22px; line-height: 1.3; }
.pick-card .pc-sub { font-size: .72rem; color: var(--muted); }
.pick-card .pc-price { font-size: .82rem; font-weight: 800; color: var(--brand); margin-top: 3px; }
.pick-card.is-child { border-style: dashed; }

.pos-cart-line { display: flex; align-items: center; gap: .5rem; padding: .5rem .25rem; border-bottom: 1px dashed var(--line); }
.pos-cart-line .qty-box { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.pos-cart-line .qty-box button { border: 0; background: var(--bg); width: 26px; height: 28px; cursor: pointer; color: var(--brand); font-weight: 700; }
.pos-cart-line .qty-box input { width: 40px; border: 0; text-align: center; background: transparent; color: var(--ink); }

.pay-panel { background: linear-gradient(160deg, rgba(214,51,108,.06), rgba(112,72,232,.05)); border: 1px solid var(--line); border-radius: 16px; padding: 1rem; }
.pay-row { display: flex; justify-content: space-between; align-items: center; margin: .25rem 0; }
.pay-total { font-size: 1.7rem; font-weight: 800; color: var(--brand); }
.pay-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: .6rem 0; }
.pay-m { border: 1.5px solid var(--line); background: var(--card); border-radius: 12px; padding: .5rem; text-align: center; cursor: pointer; font-size: .82rem; font-weight: 700; color: var(--muted); }
.pay-m.active { border-color: var(--brand); background: var(--brand); color: #fff; }
.pay-quick { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.pay-quick button { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: .25rem .8rem; font-size: .8rem; cursor: pointer; }

.visit-list { max-height: 190px; overflow-y: auto; }
.visit-item { display: flex; align-items: center; gap: .5rem; padding: .45rem .5rem; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 5px; font-size: .82rem; }

/* ===== «هەڵبژاردنی کاڵا» — checkbox list grouped (ERP Choose-items style) ===== */
.cp-list { max-height: 58vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; padding: .3rem; }
.cp-cat { margin-bottom: .35rem; }
.cp-cat-head { position: sticky; top: 0; background: var(--card); font-weight: 800; font-size: .76rem;
    text-transform: uppercase; letter-spacing: .03em; color: var(--brand); padding: .4rem .55rem; border-radius: 8px; z-index: 1; border-bottom: 1px solid var(--line); }
.cp-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .35rem; padding: .3rem; }
.cp-item { display: flex; align-items: center; gap: .55rem; padding: .5rem .65rem; border: 1px solid var(--line);
    border-radius: 10px; cursor: pointer; font-size: .85rem; margin: 0; transition: background .12s, border-color .12s; background: var(--card); }
.cp-item:hover { background: rgba(214,51,108,.05); border-color: var(--brand); }
.cp-item.on { background: rgba(214,51,108,.1); border-color: rgba(214,51,108,.45); font-weight: 600; }
.cp-item input { accent-color: var(--brand); width: 18px; height: 18px; flex: none; }
.cp-item span { flex: 1; }

/* service tree — main service = group band, sub-services indented */
.svc-parent { font-weight: 700; }
.svc-parent td { background: linear-gradient(90deg, rgba(214,51,108,.07), transparent); border-top: 2px solid var(--line); }
.svc-child td:first-child { padding-right: 2.2rem; position: relative; }
.svc-child td:first-child::before { content: '↳'; position: absolute; right: 1rem; color: var(--brand); }
.scroll-y { max-height: 60vh; overflow-y: auto; }
.avatar-lg { width: 84px; height: 84px; border-radius: 20px; object-fit: cover; }
