/* Albaradan Console */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@500&family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');
:root{
  --ink:#0F1115;--ink-2:#171A21;--ink-3:#1F232C;--ground:#F5F4F0;--panel:#fff;--line:#E2E0DA;--line-2:#D6D3CC;--row:#EFEDE8;
  --muted:#5B5F68;--muted-dark:#A9ADB6;--accent:#1A6BF0;--accent-hover:#1252C4;--accent-soft:#E8F0FE;--sel:#F1F5FF;
  --ok:#15803D;--ok-soft:#E7F6EC;--warn:#B45309;--warn-soft:#FEF3E2;--bad:#B91C1C;--bad-soft:#FDECEC;--grey-soft:#EFEDE8;
  --font:'IBM Plex Sans',system-ui,-apple-system,'Segoe UI',sans-serif;--font-ar:'IBM Plex Sans Arabic','IBM Plex Sans',system-ui,sans-serif;--mono:'IBM Plex Mono',ui-monospace,monospace;
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;font-family:var(--font);background:var(--ground);color:var(--ink);font-size:15px;line-height:1.5;-webkit-font-smoothing:antialiased}
html[lang="ar"] body{font-family:var(--font-ar)}
a{color:var(--accent)}a:hover{color:var(--accent-hover)}
h1,h2,h3{margin:0;line-height:1.25}
p{margin:0}
code{font-family:var(--mono);font-size:13px;background:var(--grey-soft);padding:2px 6px;border-radius:5px;word-break:break-all}
:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
.muted{color:var(--muted)}
.mono{font-family:var(--mono);font-size:13px}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
[dir="rtl"] .ltr{direction:ltr;unicode-bidi:isolate}

/* layout */
.shell{display:flex;flex-wrap:wrap;min-height:100vh}
.sidebar{flex:1 1 240px;max-width:100%;background:var(--ink);color:#F5F4F0;padding:20px 16px;display:flex;flex-direction:column;gap:4px}
.main{flex:999 1 560px;min-width:0;padding:28px 32px 56px}
@media (min-width:900px){.sidebar{max-width:260px;position:sticky;top:0;height:100vh;overflow-y:auto}}
@media (max-width:640px){.main{padding:20px 16px 48px}}
.brand{display:flex;align-items:center;gap:10px;color:#F5F4F0;text-decoration:none;padding:4px 8px 22px;font-weight:700;font-size:16px}
.brand img{width:48px;height:35px;object-fit:cover;border-radius:7px}
.brand span span{font-weight:400;color:var(--muted-dark)}
.nav-item{display:flex;align-items:center;gap:12px;min-height:44px;padding:0 12px;border-radius:8px;color:#C2C5CC;text-decoration:none;font-size:15px}
.nav-item:hover{color:#fff;background:#181b22}
.nav-item.active{background:var(--ink-3);color:#fff;font-weight:600}
.nav-item svg{width:18px;height:18px;flex:none}
.badge{margin-inline-start:auto;background:#F2B357;color:var(--ink);font-size:12px;font-weight:700;border-radius:10px;padding:1px 8px}
.badge.blue{background:var(--accent);color:#fff}
.side-foot{margin-top:auto;padding:16px 12px 4px;border-top:1px solid #2A2E38;font-size:13px;color:var(--muted-dark);display:flex;flex-direction:column;gap:10px}
.side-foot a{color:#C2C5CC;text-decoration:none}.side-foot a:hover{color:#fff}
.side-foot strong{color:#F5F4F0;font-weight:600}
@media (max-width:899px){
  .sidebar{flex-direction:row;flex-wrap:wrap;align-items:center;gap:4px;padding:12px}
  .brand{padding:4px 8px;width:100%}
  .nav-item{min-height:40px;padding:0 10px;font-size:14px}
  .side-foot{width:100%;flex-direction:row;flex-wrap:wrap;border-top:1px solid #2A2E38;margin-top:8px;padding:10px 4px 0}
}

/* page header */
.page-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:24px}
.page-head h1{font-size:28px;letter-spacing:-.01em}
html[lang="ar"] .page-head h1{letter-spacing:0}
.page-head p{margin-top:4px;color:var(--muted)}
.actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center}

/* buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 16px;border-radius:8px;border:1px solid var(--line-2);background:#fff;color:var(--ink);font:inherit;font-size:15px;font-weight:500;text-decoration:none;cursor:pointer;white-space:nowrap;transition:background .15s,border-color .15s,filter .15s}
.btn:hover{border-color:var(--ink);color:var(--ink)}
.btn-primary{background:var(--accent);border-color:var(--accent);color:#fff;font-weight:600}
.btn-primary:hover{filter:brightness(1.08);color:#fff;border-color:var(--accent)}
.btn-danger{color:var(--bad);border-color:#F3C1C1}.btn-danger:hover{background:var(--bad-soft);border-color:var(--bad);color:var(--bad)}
.btn-ok{background:var(--ok);border-color:var(--ok);color:#fff;font-weight:600}.btn-ok:hover{filter:brightness(1.08);color:#fff}
.btn-warn{background:var(--warn);border-color:var(--warn);color:#fff;font-weight:600}.btn-warn:hover{filter:brightness(1.08);color:#fff}
.btn-sm{min-height:34px;padding:0 10px;font-size:13px}
.btn-lg{min-height:52px;padding:0 24px;font-size:16px}
.btn[disabled]{opacity:.55;cursor:not-allowed}
.btn-block{width:100%}
.link-btn{all:unset;cursor:pointer;color:var(--accent);font-size:14px}
.link-btn:hover{text-decoration:underline}

/* cards */
.card{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:22px}
.card h2{font-size:18px;margin-bottom:14px}
.card + .card{margin-top:20px}
.grid{display:grid;gap:16px}
.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:16px;margin-bottom:24px}
.kpi{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:18px 20px;text-decoration:none;color:inherit;display:block}
a.kpi:hover{border-color:var(--accent)}
.kpi span{font-size:14px;color:var(--muted)}
.kpi strong{display:block;font-size:30px;font-weight:700;margin-top:6px;line-height:1.1}
.kpi small{display:block;font-size:13px;color:var(--muted);margin-top:4px}
.kpi.warn strong{color:var(--warn)}.kpi.bad strong{color:var(--bad)}.kpi.ok strong{color:var(--ok)}
.split{display:flex;flex-wrap:wrap;gap:20px;align-items:flex-start}
.split > .wide{flex:999 1 520px;min-width:0}
.split > .side{flex:1 1 340px;min-width:0}

/* tables */
.table-wrap{background:var(--panel);border:1px solid var(--line);border-radius:12px;overflow-x:auto}
table.data{width:100%;border-collapse:collapse;font-size:14px}
table.data th{text-align:start;color:var(--muted);font-weight:500;padding:13px 14px;border-bottom:1px solid var(--line);white-space:nowrap}
table.data td{padding:11px 14px;border-bottom:1px solid var(--row);vertical-align:middle}
table.data tr:last-child td{border-bottom:0}
table.data tbody tr:hover{background:#FAFAF8}
table.data tr.selected{background:var(--sel)}
table.data td.num,table.data th.num{text-align:end}
.cell-title{font-weight:600}
.cell-sub{color:var(--muted);font-size:13px}
.empty{padding:40px 20px;text-align:center;color:var(--muted)}
.empty strong{display:block;color:var(--ink);font-size:16px;margin-bottom:6px}

/* pills & status */
.pill{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:600;padding:3px 10px;border-radius:12px;background:var(--grey-soft);color:#3F434B;white-space:nowrap}
.pill.ok{background:var(--ok-soft);color:var(--ok)}.pill.warn{background:var(--warn-soft);color:#9A4A06}.pill.bad{background:var(--bad-soft);color:var(--bad)}.pill.blue{background:var(--accent-soft);color:var(--accent-hover)}
.dot{width:8px;height:8px;border-radius:4px;background:currentColor;display:inline-block}

/* forms */
.form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}
.form-grid .full,.form-grid h2.full{grid-column:1/-1}
.form-grid h2{font-size:16px;margin-top:8px}
.field{display:flex;flex-direction:column;gap:6px;min-width:0}
.field label,.label{font-size:14px;font-weight:600}
.field .hint{font-size:13px;color:var(--muted);font-weight:400}
input:not([type]),input[type=text],input[type=email],input[type=password],input[type=tel],input[type=url],input[type=number],input[type=search],input[type=date],input[type=datetime-local],input[type=time],select,textarea{
  min-height:44px;border:1px solid var(--line-2);border-radius:8px;padding:0 12px;font:inherit;font-size:15px;background:#fff;color:var(--ink);width:100%;transition:border-color .15s,box-shadow .15s}
textarea{padding:10px 12px;min-height:96px;resize:vertical;line-height:1.55}
input:focus,select:focus,textarea:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px rgba(26,107,240,.18)}
input[type=checkbox],input[type=radio]{width:18px;height:18px;accent-color:var(--accent)}
.check{display:flex;gap:10px;align-items:center;font-size:14px}
.inline-form{display:inline}
.toolbar{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-bottom:14px}
.toolbar .grow{flex:1 1 220px}
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{display:inline-flex;align-items:center;min-height:38px;padding:0 14px;border-radius:19px;border:1px solid var(--line-2);background:#fff;color:var(--ink);text-decoration:none;font-size:14px;font-weight:500}
.chip:hover{border-color:var(--ink);color:var(--ink)}
.chip.on{background:var(--ink);border-color:var(--ink);color:#fff}

/* switch */
.switch{width:48px;height:28px;border-radius:14px;border:0;padding:3px;background:var(--accent);cursor:pointer;display:inline-flex;justify-content:flex-end;flex:none;transition:background .2s}
.switch::after{content:"";width:22px;height:22px;border-radius:11px;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.3)}
.switch.off{background:#C9C6BE;justify-content:flex-start}
[dir="rtl"] .switch{justify-content:flex-start}[dir="rtl"] .switch.off{justify-content:flex-end}

/* alerts */
.alert{padding:12px 16px;border-radius:10px;margin-bottom:16px;font-size:14px;border:1px solid transparent}
.alert-ok{background:var(--ok-soft);color:#14532D;border-color:#BBE5C8}
.alert-error{background:var(--bad-soft);color:#7F1D1D;border-color:#F3C1C1}
.alert-warn{background:var(--warn-soft);color:#7C3A06;border-color:#F7D9AE}
.alert-info{background:var(--accent-soft);color:#173B86;border-color:#C7D8FB}

/* hours editor */
.hours-row{display:grid;grid-template-columns:70px 1fr 1fr auto;gap:10px;align-items:center;padding:6px 0;border-bottom:1px solid var(--row)}
.hours-row:last-child{border-bottom:0}
.hours-row .day{font-weight:600}
@media (max-width:520px){.hours-row{grid-template-columns:60px 1fr 1fr;}.hours-row .check{grid-column:1/-1}}

/* list items (payments) */
.issue{display:flex;flex-wrap:wrap;align-items:center;gap:14px;padding:14px 16px;background:#fff;border:1px solid var(--line);border-radius:12px;text-decoration:none;color:inherit}
.issue:hover{border-color:var(--accent);color:inherit}
.issue.active{border:2px solid var(--accent);padding:13px 15px}
.issue.resolved{opacity:.6}
.issue .grow{flex:1 1 220px;min-width:0}
.list{display:flex;flex-direction:column;gap:10px}
dl.meta{display:grid;grid-template-columns:120px 1fr;gap:10px 12px;margin:16px 0 0;font-size:14px}
dl.meta dt{color:var(--muted)}dl.meta dd{margin:0;min-width:0;overflow-wrap:anywhere}
.notes{display:flex;flex-direction:column;gap:10px;margin-top:12px}
.note{background:var(--ground);border-radius:8px;padding:10px 12px;font-size:14px}
.note small{display:block;color:var(--muted);font-size:12px;margin-bottom:2px}

/* bars chart */
.bars{display:flex;align-items:flex-end;gap:6px;height:140px;padding-top:10px}
.bars .bar{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:6px;height:100%;min-width:0}
.bars .bar i{display:block;width:100%;max-width:28px;background:var(--accent);border-radius:4px 4px 0 0;min-height:2px}
.bars .bar.today i{background:var(--ink)}
.bars .bar span{font-size:11px;color:var(--muted);white-space:nowrap}

/* phone preview */
.phone{background:var(--ink);border-radius:28px;padding:14px;max-width:340px}
.phone-screen{border-radius:18px;padding:18px;min-height:300px;background:#E6DED3}
.phone-screen.sms{background:#F1F1F4}.phone-screen.email{background:#F5F4F0}
.bubble{background:#fff;border-radius:14px;padding:14px 16px;font-size:14px;line-height:1.6;white-space:pre-wrap;word-wrap:break-word;box-shadow:0 1px 2px rgba(0,0,0,.12)}
.bubble strong{display:block;margin-bottom:6px}

.progress{height:10px;background:var(--grey-soft);border-radius:5px;overflow:hidden}
.progress i{display:block;height:100%;background:var(--accent);width:0;transition:width .3s}

.pager{display:flex;gap:8px;align-items:center;justify-content:flex-end;margin-top:14px;font-size:14px;color:var(--muted)}

/* auth & install */
.auth-body{min-height:100vh;background:var(--ground)}
.auth{display:flex;flex-wrap:wrap;min-height:100vh}
.auth-brand{flex:1 1 420px;min-width:0;min-height:320px;background:radial-gradient(700px 480px at 50% 35%,rgba(26,107,240,.25),rgba(15,17,21,0) 70%),var(--ink);color:#F5F4F0;padding:40px 48px;display:flex;flex-direction:column;justify-content:space-between;gap:32px}
@media (max-width:640px){.auth-brand{padding:28px 20px}}
.auth-brand a{color:#C2C5CC;text-decoration:none}.auth-brand a:hover{color:#fff}
.auth-brand .center{display:flex;flex-direction:column;align-items:center;text-align:center;gap:20px}
.auth-brand img{width:360px;max-width:100%;aspect-ratio:3/2;object-fit:cover;border-radius:18px}
.auth-brand h1{font-size:28px;max-width:420px}
.auth-brand p{color:var(--muted-dark);max-width:400px;line-height:1.7}
.auth-brand .feats{display:flex;flex-wrap:wrap;gap:16px;justify-content:center;font-size:13px;color:var(--muted-dark)}
.auth-form{flex:1 1 480px;min-width:0;padding:32px 24px;display:flex;flex-direction:column}
.auth-form .inner{width:100%;max-width:420px;margin:auto;padding:32px 0}
.auth-form h2{font-size:32px;letter-spacing:-.01em}
.auth-form .sub{color:var(--muted);margin:8px 0 28px;font-size:16px}
.auth-form .stack{display:flex;flex-direction:column;gap:18px}
.auth-form input{min-height:50px;font-size:16px}
.code-input{font-family:var(--mono)!important;font-size:26px!important;letter-spacing:.3em;text-align:center;min-height:60px!important}
.pw-wrap{position:relative}
.pw-wrap input{padding-inline-end:76px}
.pw-wrap button{position:absolute;inset-inline-end:6px;top:6px;height:38px;padding:0 10px;border:0;border-radius:6px;background:var(--grey-soft);font:inherit;font-size:13px;cursor:pointer}
.lang-switch{display:flex;justify-content:flex-end;gap:0}
.lang-switch a{min-height:40px;padding:0 14px;display:inline-flex;align-items:center;border:1px solid var(--line-2);background:#fff;color:var(--ink);text-decoration:none;font-size:14px}
.lang-switch a:first-child{border-start-start-radius:8px;border-end-start-radius:8px}
.lang-switch a:last-child{border-start-end-radius:8px;border-end-end-radius:8px;border-inline-start:0}
.lang-switch a.on{background:var(--ink);color:#fff;border-color:var(--ink)}
.install-wrap{max-width:820px;margin:0 auto;padding:32px 16px 64px}
.install-logo{width:260px;max-width:70%;margin:0 auto 20px;display:block;border-radius:14px}
.install-wrap .card h1{font-size:26px;margin-bottom:10px}
.install-wrap .card p{margin-bottom:10px}
.checks{list-style:none;padding:0;margin:16px 0;display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:6px;font-size:14px}
.checks .ok{color:var(--ok)}.checks .bad{color:var(--bad);font-weight:600}
.qr{width:200px;height:200px;background:#fff;padding:8px;border:1px solid var(--line);border-radius:8px}
