/* Web admin panel (multi-brand) and in-store POS ("kasa") screens.
   The admin is the platform's own UI: neutral canvas, brand colors only as accent + tenant identity. */

body.admin, body.kasa {
  --a-bg: #F4F3F1; --a-panel: #FFFFFF; --a-line: #E6E3DF; --a-line-soft: #F0EDE9;
  --a-ink: #1A1C1E; --a-ink-2: #4A4F54; --a-muted: #6A7075; --a-hover: #FAF9F7;
  --r-btn: 9px; --r-chip: 999px; --r-sm: 9px; --r-md: 12px; --r-card: 12px; --r-xs: 5px; --r-pill: 999px;
  --btn-size: 13.5px; --btn-weight: 700; --btn-tracking: 0; --btn-case: none;
  font-family: var(--font-ui); background: var(--a-bg); color: var(--a-ink); font-size: 14px;
}
body.admin h1, body.admin h2, body.admin h3, body.kasa h1, body.kasa h2, body.kasa h3 { font-family: var(--font-ui); font-weight: 750; letter-spacing: -.01em; }
body.admin .btn, body.kasa .btn { min-height: 40px; padding: 0 16px; font-family: var(--font-ui); }
body.admin .btn-sm { min-height: 32px; padding: 0 12px; font-size: 12.5px; }
body.admin .input, body.admin .select, body.admin .textarea { min-height: 40px; padding: 8px 12px; font-size: 14px; border-color: #DAD6D0; border-radius: 9px; }
body.admin .select { padding-right: 34px; }
body.admin .textarea { min-height: 90px; }
body.admin .chip { height: 32px; font-size: 12.5px; }
body.admin .card, body.admin .list { border-color: var(--a-line); }

/* ── shell ─────────────────────────────────────────── */
.a-shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.a-side { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding: 16px 12px 24px; background: var(--c-ink); color: rgba(255, 255, 255, .86); scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .15) transparent; }
[data-brand="lappartement"] .a-side { background: #171513; }
.a-side-brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 14px; }
.a-side-brand .logo { height: 30px; width: auto; color: #fff; }
.a-side-brand small { display: block; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .5); font-weight: 700; margin-top: 2px; }
.a-nav-title { padding: 14px 10px 6px; font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .42); display: flex; align-items: center; gap: 8px; }
.a-nav-link { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; font-size: 13.5px; color: rgba(255, 255, 255, .74); }
.a-nav-link .ic { width: 18px; height: 18px; opacity: .85; }
.a-nav-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.a-nav-link.is-current { background: rgba(255, 255, 255, .12); color: #fff; font-weight: 700; }
.a-nav-link.is-current::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--c-primary); }
[data-brand="lappartement"] .a-nav-link.is-current::before { background: #C9AB7C; }
.a-nav-link .phase-badge { margin-left: auto; height: 17px; font-size: 9px; }
.a-side-foot { margin-top: auto; padding: 14px 10px 0; font-size: 11.5px; color: rgba(255, 255, 255, .45); }

.a-main { min-width: 0; display: flex; flex-direction: column; }
.a-top { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 14px; height: 64px; padding: 0 28px; background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--a-line); }
.tenant { position: relative; }
.tenant-btn { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 12px 0 8px; border: 1px solid #E0DCD7; border-radius: 10px; background: #fff; font-weight: 700; font-size: 13.5px; }
.tenant-btn img { width: 28px; height: 28px; border-radius: 7px; }
.tenant-btn small { display: block; font-size: 10.5px; font-weight: 600; color: var(--a-muted); line-height: 1; }
.tenant-menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 260px; padding: 6px; background: #fff; border: 1px solid var(--a-line); border-radius: 12px; box-shadow: var(--shadow-2); display: none; z-index: 60; }
.tenant.is-open .tenant-menu { display: block; }
.tenant-menu a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; font-weight: 600; }
.tenant-menu a:hover { background: var(--a-hover); }
.tenant-menu img { width: 30px; height: 30px; border-radius: 7px; }
.a-search { flex: 1; max-width: 440px; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 10px; background: var(--a-bg); color: var(--a-muted); font-size: 13.5px; }
.a-search input { border: 0; background: transparent; outline: none; width: 100%; }
.a-top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.a-env { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--c-warning); background: var(--c-warning-soft); padding: 5px 9px; border-radius: 999px; }
.a-iconbtn { position: relative; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: var(--a-ink-2); }
.a-iconbtn:hover { background: var(--a-bg); }
.a-iconbtn .dot-badge { top: 4px; right: 4px; border-color: #fff; }
.a-user { display: flex; align-items: center; gap: 10px; padding-left: 10px; border-left: 1px solid var(--a-line); }
.a-user b { display: block; font-size: 13px; line-height: 1.2; } .a-user small { font-size: 11.5px; color: var(--a-muted); }

.a-content { width: 100%; max-width: 1480px; padding: 26px 28px 80px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; line-height: 1.15; }
.page-head .sub { color: var(--a-muted); margin-top: 4px; font-size: 14px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--a-muted); margin-bottom: 6px; }
.crumbs a:hover { color: var(--a-ink); }
.crumbs .ic { width: 14px; height: 14px; }

/* ── panels, KPIs, grids ───────────────────────────── */
.panel { background: var(--a-panel); border: 1px solid var(--a-line); border-radius: 14px; min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--a-line-soft); }
.panel-head h2 { font-size: 15px; font-weight: 750; }
.panel-head .sub { font-size: 12.5px; color: var(--a-muted); margin-top: 2px; }
.panel-body { padding: 18px; }
.panel-foot { padding: 12px 18px; border-top: 1px solid var(--a-line-soft); display: flex; justify-content: flex-end; gap: 8px; }
.a-grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.cols-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.span-2 { grid-column: span 2; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi { background: var(--a-panel); border: 1px solid var(--a-line); border-radius: 14px; padding: 16px 18px; min-width: 0; }
.kpi-label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--a-muted); font-weight: 600; }
.kpi-label .ic { width: 16px; height: 16px; }
.kpi-value { font-size: 28px; font-weight: 800; letter-spacing: -.02em; margin-top: 8px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12px; color: var(--a-muted); }
.delta { display: inline-flex; align-items: center; gap: 2px; font-weight: 800; font-size: 12px; }
.delta .ic { width: 14px; height: 14px; }
.delta.up { color: var(--c-success); } .delta.down { color: var(--c-danger); }

/* ── tables ────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { position: sticky; top: 0; text-align: left; font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--a-muted); padding: 10px 14px; border-bottom: 1px solid var(--a-line); background: #FAF9F7; white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--a-line-soft); vertical-align: middle; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover td { background: var(--a-hover); }
.table tr.is-link { cursor: pointer; }
.table .num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table .cell-user { display: flex; align-items: center; gap: 10px; }
.table .cell-user .avatar { width: 32px; height: 32px; font-size: 12px; }
.table .cell-sub { font-size: 12px; color: var(--a-muted); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--a-line-soft); }
.filters .input, .filters .select { width: auto; min-width: 160px; }
.pager { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; font-size: 12.5px; color: var(--a-muted); }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--a-muted); margin-right: 6px; vertical-align: middle; }
.dot-success { background: var(--c-success); } .dot-warning { background: #D4972B; } .dot-danger { background: var(--c-danger); } .dot-info { background: var(--c-info); }

/* ── forms & parameter editors ─────────────────────── */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.param { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 18px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--a-line-soft); }
.param:last-child { border-bottom: 0; }
.param-title { font-weight: 700; }
.param-desc { font-size: 12.5px; color: var(--a-muted); margin-top: 2px; line-height: 1.45; }
.input-group { display: flex; align-items: stretch; }
.input-group .input { border-radius: 9px 0 0 9px; min-width: 0; }
.input-group .addon { display: grid; place-items: center; padding: 0 12px; background: var(--a-bg); border: 1px solid #DAD6D0; border-left: 0; border-radius: 0 9px 9px 0; font-size: 12.5px; color: var(--a-muted); font-weight: 700; white-space: nowrap; }
.a-alert { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; background: var(--c-info-soft); color: #1F3F52; font-size: 13px; line-height: 1.45; }
.a-alert .ic { color: var(--c-info); margin-top: 1px; }
.a-alert.warning { background: var(--c-warning-soft); color: #5B3B08; } .a-alert.warning .ic { color: var(--c-warning); }
.a-alert.success { background: var(--c-success-soft); color: #1C4A30; } .a-alert.success .ic { color: var(--c-success); }

/* wizard steps */
.steps { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.step { flex: 1; min-width: 150px; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--a-line); font-weight: 700; font-size: 13px; color: var(--a-muted); }
.step-num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--a-bg); font-size: 12px; flex: none; }
.step.is-current { border-color: var(--c-primary); color: var(--a-ink); box-shadow: 0 0 0 3px var(--c-accent-soft); }
.step.is-current .step-num { background: var(--c-primary); color: var(--c-on-primary); }
.step.is-done { color: var(--a-ink); }
.step.is-done .step-num { background: var(--c-success); color: #fff; }

/* charts (Chart.js canvas inside) */
.chart-box { position: relative; height: 260px; }
.chart-box.sm { height: 190px; } .chart-box.lg { height: 320px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--a-ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* drawer & modal */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 90; width: min(480px, 100%); display: flex; flex-direction: column; background: #fff; transform: translateX(104%); transition: transform .32s var(--ease-out); box-shadow: -24px 0 60px rgba(0, 0, 0, .16); }
.drawer.is-open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--a-line); }
.drawer-head h2 { font-size: 17px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px; }
.drawer-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--a-line); }
.modal { position: fixed; left: 50%; top: 50%; z-index: 95; width: min(560px, calc(100% - 32px)); max-height: calc(100vh - 60px); overflow: auto; background: #fff; border-radius: 16px; box-shadow: var(--shadow-2); opacity: 0; pointer-events: none; transform: translate(-50%, -47%) scale(.98); transition: opacity .22s, transform .22s var(--ease-out); }
.modal.is-open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 10px; }
.modal-head h2 { font-size: 18px; }
.modal-body { padding: 8px 20px 18px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--a-line); }

/* presenter notes (admin + kasa) */
.notes-fab { position: fixed; right: 22px; bottom: 22px; z-index: 85; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 999px; background: #111; color: #fff; font-weight: 700; font-size: 13px; box-shadow: var(--shadow-2); }
.notes-fab .ic { width: 18px; height: 18px; }
body.has-tour .notes-fab { bottom: 100px; }
.notes-drawer .drawer-body { font-size: 14px; line-height: 1.6; color: var(--a-ink-2); }
.notes-drawer .drawer-body ul { display: flex; flex-direction: column; gap: 10px; }
.notes-drawer .drawer-body li { position: relative; padding-left: 18px; }
.notes-drawer .drawer-body li::before { content: ""; position: absolute; left: 0; top: .6em; width: 7px; height: 7px; border-radius: 2px; background: var(--c-primary); }
.notes-drawer .drawer-body p + p, .notes-drawer .drawer-body p + ul { margin-top: 10px; }

/* live phone preview (e.g. marka-ayarlari) */
.mini-phone { width: 262px; height: 548px; padding: 10px; border-radius: 44px; background: #0B0B0B; box-shadow: 0 0 0 1.5px #2C2C2C, var(--shadow-3); overflow: hidden; flex: none; }
.mini-phone iframe { width: 390px; height: 844px; border: 0; border-radius: 52px; transform: scale(.620); transform-origin: 0 0; background: #fff; }

@media (max-width: 1200px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cols-3, .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cols-2-1, .cols-1-2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) { .a-shell { grid-template-columns: minmax(0, 1fr); } .a-side { display: none; } .cols-2, .form-grid { grid-template-columns: minmax(0, 1fr); } .param { grid-template-columns: minmax(0, 1fr); } .a-search { display: none; } }

/* ═════════ KASA (POS) ═════════ */
body.kasa { background: #E9E6E1; height: 100vh; overflow: hidden; }
.k-shell { display: grid; grid-template-rows: 64px minmax(0, 1fr); height: 100vh; }
.k-top { display: flex; align-items: center; gap: 16px; padding: 0 22px; background: var(--c-ink); color: #F4F1EC; }
[data-brand="lappartement"] .k-top { background: #171513; }
.k-top .logo { height: 28px; width: auto; color: #fff; }
.k-top-sep { width: 1px; height: 28px; background: rgba(255, 255, 255, .15); }
.k-top-info { font-size: 13px; line-height: 1.25; } .k-top-info small { display: block; color: rgba(255, 255, 255, .55); font-size: 11.5px; }
.k-top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 13px; }
.k-top-right a { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 9px; background: rgba(255, 255, 255, .08); font-weight: 700; font-size: 12.5px; }
.k-top-right .ic { width: 16px; height: 16px; }
.k-clock { font-variant-numeric: tabular-nums; font-weight: 700; }
.k-main { min-height: 0; overflow: auto; padding: 22px; }
.k-layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 18px; height: 100%; min-height: 0; }
.k-panel { background: #fff; border-radius: 18px; border: 1px solid #E0DCD6; padding: 22px; min-height: 0; overflow: auto; }
.k-title { font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.k-sub { color: var(--a-muted); margin-top: 4px; }
.k-btn { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 64px; padding: 0 22px; border-radius: 14px; font-size: 17px; font-weight: 800; background: var(--c-primary); color: var(--c-on-primary); width: 100%; transition: transform .15s var(--ease-out); }
.k-btn:active { transform: scale(.98); }
.k-btn .ic { width: 22px; height: 22px; }
.k-btn.is-soft { background: #F1EEEA; color: var(--a-ink); }
.k-btn.is-accent { background: var(--c-accent); color: var(--c-on-accent); }
.k-btn.is-outline { background: #fff; color: var(--a-ink); border: 1.5px solid #D6D1CA; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.keypad button { height: 64px; border-radius: 14px; background: #F4F2EF; font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; transition: background .12s, transform .12s; }
.keypad button:active { background: #E6E2DC; transform: scale(.97); }
.k-amount { font-size: 44px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.scanner { position: relative; aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden; background: #101010; display: grid; place-items: center; }
.scanner::before { content: ""; position: absolute; inset: 18%; border: 3px solid rgba(255, 255, 255, .85); border-radius: 18px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .35); }
.scanner::after { content: ""; position: absolute; left: 20%; right: 20%; height: 2px; background: #7BD29B; box-shadow: 0 0 14px #7BD29B; top: 20%; animation: scanline 2.2s ease-in-out infinite; }
@keyframes scanline { 0%, 100% { top: 20%; } 50% { top: 78%; } }
.k-member { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 14px; background: #F7F5F2; }
.k-member .avatar { width: 54px; height: 54px; font-size: 18px; }
