:root, [data-theme="dark"] {
  --bg: #0b0f17;
  --bg2: #0f1522;
  --panel: #141b2b;
  --panel2: #1a2336;
  --line: #243049;
  --text: #e8ecf4;
  --muted: #8b97b0;
  --gold: #d4af6a;
  --gold2: #f1d69a;
  --gold-soft: rgba(212, 175, 106, .12);
  --btn1: var(--gold2); --btn2: var(--gold); --on-accent: #1a1406;
  --hero1: #1b2336; --hero2: #0e1320;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --green: #22c55e; --red: #f43f5e; --blue: #3b82f6; --amber: #f59e0b; --slate: #94a3b8; --violet: #a78bfa;
  --gold-text: var(--gold); /* لون الكلام اللي بلون الثيم (القائمة المختارة، الفلاتر) — themes.gen.css بيظبطه لكل ثيم */
}
[data-theme="light"] {
  --bg: #f4f1ea;
  --bg2: #ece7dc;
  --panel: #ffffff;
  --panel2: #f8f5ef;
  --line: #e4ddcf;
  --text: #1c2233;
  --muted: #6b7388;
  --gold: #a9812f;
  --gold2: #7d5c17;
  --gold-soft: rgba(169, 129, 47, .1);
  --gold-text: var(--gold2);
  --on-accent: #ffffff; /* زرار الذهبي في النهاري أغمق (gold2) — الأبيض أوضح عليه */
  --shadow: 0 10px 30px rgba(60, 45, 20, .08);
  /* ألوان الحالات أغمق في النهاري (الفاتحة كانت مش باينة على الخلفية الفاتحة) */
  --green: #15803d; --red: #be123c; --blue: #1d4ed8; --amber: #b45309; --slate: #475569; --violet: #6d28d9;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
a { color: inherit; text-decoration: none; cursor: pointer; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }

/* ===== Splash ===== */
#splash {
  position: fixed; inset: 0; z-index: 999;
  background: radial-gradient(circle at 50% 40%, #1b2438 0%, #070a10 70%);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  color: var(--gold);
  transition: opacity .6s ease, visibility .6s;
}
#splash.hide { opacity: 0; visibility: hidden; }
.splash-logo { animation: float 2s ease-in-out infinite; filter: drop-shadow(0 0 20px color-mix(in srgb, var(--gold) 50%, transparent)); }
.splash-title { font-size: 30px; font-weight: 900; letter-spacing: .5px; background: linear-gradient(90deg,var(--gold2),var(--gold),var(--gold2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.splash-sub { color: #8b97b0; font-size: 14px; }
.splash-bar { width: 220px; height: 3px; background: #1f2940; border-radius: 3px; overflow: hidden; margin-top: 18px; }
.splash-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg,var(--gold),var(--gold2)); animation: load 1.3s ease forwards; }
@keyframes load { to { width: 100%; } }
@keyframes float { 50% { transform: translateY(-8px); } }

/* ===== Layout ===== */
.app { display: flex; height: 100vh; }
.sidebar {
  width: 250px; flex-shrink: 0;
  background: linear-gradient(180deg, var(--panel) 0%, var(--bg2) 100%);
  border-left: 1px solid var(--line);
  display: flex; flex-direction: column;
  padding: 20px 14px;
  transition: transform .3s;
  z-index: 50;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 22px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.brand-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: var(--gold); background: var(--gold-soft); border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent); }
.brand-name { font-weight: 800; font-size: 16px; }
.brand-sub { font-size: 11px; color: var(--muted); letter-spacing: .5px; direction: ltr; text-align: right; }
.nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 12px;
  color: var(--muted); font-weight: 600;
  transition: .2s; position: relative;
}
.nav a i { font-style: normal; width: 22px; text-align: center; font-size: 16px; }
.nav a:hover { background: var(--panel2); color: var(--text); }
.nav a.active { background: var(--gold-soft); color: var(--gold-text); }
.nav a.active::before { content: ''; position: absolute; right: -14px; top: 10px; bottom: 10px; width: 4px; border-radius: 4px 0 0 4px; background: var(--gold); }
.nav-badge { margin-right: auto; background: var(--red); color: #fff; font-size: 11px; min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; padding: 0 6px; }
.nav-badge:empty { display: none; }
.sidebar-foot { border-top: 1px solid var(--line); padding-top: 14px; }
.user { display: flex; gap: 10px; align-items: center; padding: 6px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--btn1), var(--btn2)); color: var(--on-accent); font-weight: 800; display: grid; place-items: center; }
.user-name { font-weight: 700; }
.user-role { font-size: 12px; color: var(--muted); }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 70px; flex-shrink: 0;
  display: flex; align-items: center; gap: 14px; padding: 0 26px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
}
.search { flex: 1; max-width: 460px; display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; height: 42px; }
.search span { color: var(--muted); font-size: 18px; }
.search input { flex: 1; background: none; border: none; outline: none; }
.top-actions { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.clock { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; padding: 0 8px; }
.menu-btn { display: none; }
.view { flex: 1; overflow-y: auto; padding: 26px; }
.view > * { animation: rise .35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* ===== Controls ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 16px; border-radius: 11px;
  border: 1px solid var(--line); background: var(--panel2);
  font-weight: 700; cursor: pointer; transition: .2s; white-space: nowrap;
}
.btn:hover { border-color: var(--gold); color: var(--gold); }
.btn-gold { background: linear-gradient(135deg, var(--btn1), var(--btn2)); color: var(--on-accent); border: none; box-shadow: 0 6px 18px color-mix(in srgb, var(--gold) 25%, transparent); }
.btn-gold:hover { color: var(--on-accent); filter: brightness(1.08); transform: translateY(-1px); }
.btn-sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 9px; }
.btn-danger { color: var(--red); }
.btn-danger:hover { border-color: var(--red); color: var(--red); }
.btn-green { color: var(--green); }
.btn-green:hover { border-color: var(--green); color: var(--green); }
.icon-btn { width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; font-size: 16px; transition: .2s; flex-shrink: 0; }
.icon-btn:hover { color: var(--gold); border-color: var(--gold); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.input, .field input, .field select, .field textarea {
  height: 42px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg2); outline: none; transition: .2s; width: 100%;
}
.field textarea { height: 80px; padding: 10px 12px; resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.span-2 { grid-column: span 2; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 7px 14px; border-radius: 20px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; font-weight: 600; font-size: 13px; color: var(--muted); transition: .2s; display: inline-flex; gap: 6px; align-items: center; }
.chip:hover { color: var(--text); }
.chip.active { background: var(--gold-soft); color: var(--gold-text); border-color: color-mix(in srgb, var(--gold) 40%, transparent); }
.chip .dot { width: 8px; height: 8px; }

/* ===== Page heading ===== */
.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: 24px; font-weight: 800; }
.page-head p { color: var(--muted); margin-top: 2px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }

/* ===== Cards ===== */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 20px; box-shadow: var(--shadow); }
.card-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.card-title h3 { font-size: 16px; font-weight: 800; }
.card-title small { color: var(--muted); }

.hero {
  position: relative; overflow: hidden;
  border-radius: 22px; padding: 28px 30px; margin-bottom: 22px;
  background:
    radial-gradient(circle at 10% 20%, color-mix(in srgb, var(--gold) 28%, transparent), transparent 45%),
    linear-gradient(135deg, var(--hero1) 0%, var(--hero2) 100%);
  border: 1px solid color-mix(in srgb, var(--gold) 25%, transparent);
  color: #eef1f7;
  display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap;
}
.hero::after { content: '✦'; position: absolute; left: 30px; top: -30px; font-size: 180px; color: color-mix(in srgb, var(--gold) 6%, transparent); }
.hero h1 { font-size: 26px; font-weight: 900; }
.hero p { color: #c3cbdb; margin-top: 4px; }
.hero-stats { display: flex; gap: 26px; z-index: 1; }
.hero-stat b { display: block; font-size: 26px; color: var(--hero-accent, var(--gold2)); font-weight: 900; }
.hero-stat span { color: #c3cbdb; font-size: 12.5px; }
[data-theme="light"] .hero-stat b { color: var(--hero-accent, #ffffff); } /* البانر غامق دايمًا، ولون الثيم الغامق في النهاري مكانش باين عليه */

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 22px; }
.kpi { position: relative; overflow: hidden; }
.kpi-top { display: flex; justify-content: space-between; align-items: center; }
.kpi-icon { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-size: 19px; }
.kpi-val { font-size: 26px; font-weight: 900; margin-top: 14px; font-variant-numeric: tabular-nums; }
.kpi-label { color: var(--muted); font-weight: 600; font-size: 13px; }
.kpi-trend { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 8px; }
.up { color: var(--green); background: rgba(34,197,94,.12); }
.down { color: var(--red); background: rgba(244,63,94,.12); }

.dash-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; margin-bottom: 18px; }
.dash-grid-2 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; }
/* Small windows: grid columns never grow past the window because of a wide table inside a card */
.dash-grid > *, .dash-grid-2 > * { min-width: 0; }

/* charts */
.bars { display: flex; align-items: flex-end; gap: 14px; height: 220px; padding-top: 20px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.bar {
  width: 100%; max-width: 46px; border-radius: 10px 10px 4px 4px;
  background: linear-gradient(180deg, var(--gold2), var(--gold) 60%, color-mix(in srgb, var(--gold) 35%, transparent));
  position: relative; transform-origin: bottom; animation: grow .9s cubic-bezier(.2,.8,.2,1) both;
  min-height: 4px;
}
.bar.today { background: linear-gradient(180deg, #7dd3fc, var(--blue)); }
.bar:hover::after { content: attr(data-v); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 3px 8px; border-radius: 6px; font-size: 11.5px; white-space: nowrap; font-weight: 700; }
.bar-col small { color: var(--muted); font-size: 11.5px; }
@keyframes grow { from { transform: scaleY(0); } }

.donut-wrap { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.donut { position: relative; width: 190px; height: 190px; }
.donut svg { transform: rotate(-90deg); }
.donut circle { transition: stroke-dasharray 1s; }
.donut-center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.donut-center b { font-size: 32px; font-weight: 900; display: block; }
.donut-center span { color: var(--muted); font-size: 12px; }
.legend { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; width: 100%; }
.legend div { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.legend b { margin-right: auto; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; }

.list { display: flex; flex-direction: column; gap: 10px; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; background: var(--panel2); border: 1px solid transparent; transition: .2s; }
.list-item:hover { border-color: var(--line); }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .sub { color: var(--muted); font-size: 12px; }
.ava { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; flex-shrink: 0; color: #fff; }
.empty { text-align: center; color: var(--muted); padding: 26px 10px; }
.empty b { display: block; font-size: 28px; margin-bottom: 6px; opacity: .5; }

.log-item { display: flex; gap: 10px; font-size: 13px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.log-item:last-child { border: none; }
.log-item time { color: var(--muted); font-size: 11.5px; margin-right: auto; white-space: nowrap; }

/* ===== Badges ===== */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.s-available { color: var(--green); background: rgba(34,197,94,.12); }
.s-occupied { color: var(--red); background: rgba(244,63,94,.12); }
.s-reserved { color: var(--blue); background: rgba(59,130,246,.13); }
.s-cleaning { color: var(--amber); background: rgba(245,158,11,.13); }
.s-maintenance { color: var(--slate); background: rgba(100,116,139,.18); }
.s-checkedin { color: var(--green); background: rgba(34,197,94,.12); }
.s-checkedout { color: var(--muted); background: rgba(139,151,176,.14); }
.s-cancelled { color: var(--red); background: rgba(244,63,94,.12); }
.s-paid { color: var(--green); background: rgba(34,197,94,.12); }
.s-partial { color: var(--amber); background: rgba(245,158,11,.13); }
.s-unpaid { color: var(--red); background: rgba(244,63,94,.12); }
.vip { background: linear-gradient(135deg, var(--btn1), var(--btn2)); color: var(--on-accent); font-size: 10.5px; padding: 2px 8px; border-radius: 6px; font-weight: 900; margin-right: 6px; }

/* ===== Rooms ===== */
.floor { margin-bottom: 26px; }
.floor-title { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; color: var(--muted); font-weight: 700; }
.floor-title::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.rooms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.room {
  position: relative; overflow: hidden; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px;
  transition: .25s;
}
.room::before { content: ''; position: absolute; top: 0; right: 0; left: 0; height: 4px; background: var(--c); }
.room:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--c); }
.room-num { font-size: 26px; font-weight: 900; }
.room-type { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.room-row { display: flex; justify-content: space-between; align-items: center; }
.room-guest { margin-top: 12px; font-size: 12.5px; color: var(--muted); min-height: 36px; }
.room-guest b { color: var(--text); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room-price { font-weight: 800; color: var(--gold); font-size: 13px; }

.summary-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.summary-strip .card { padding: 14px 16px; display: flex; align-items: center; gap: 12px; cursor: pointer; }
.summary-strip b { font-size: 22px; font-weight: 900; display: block; line-height: 1.1; }
.summary-strip span { color: var(--muted); font-size: 12.5px; }

/* ===== Table ===== */
.table-wrap { overflow-x: auto; }
/* Small windows: a wide table placed straight in a card (expenses, operations log) scrolls inside the card, not the whole page */
.card:has(> table), .card:has(> .table) { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th { text-align: right; font-size: 12px; color: var(--muted); font-weight: 700; padding: 12px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 13px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
tr:last-child td { border-bottom: none; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: var(--panel2); }
.mono { font-variant-numeric: tabular-nums; font-weight: 700; }
.actions { display: flex; gap: 6px; }
.cell-guest { display: flex; align-items: center; gap: 10px; }
.cell-guest .ava { width: 32px; height: 32px; font-size: 13px; border-radius: 9px; }

/* ===== Timeline ===== */
.tl { overflow: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); max-height: calc(100vh - 230px); }
.tl-inner { position: relative; width: max-content; min-width: 100%; }
.tl-row { display: flex; position: relative; border-bottom: 1px solid var(--line); height: 50px; }
.tl-row:last-child { border-bottom: none; }
.tl-head { position: sticky; top: 0; z-index: 5; background: var(--panel2); height: 58px; }
.tl-label { width: 130px; flex-shrink: 0; position: sticky; right: 0; z-index: 3; background: var(--panel); border-left: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; padding: 0 14px; }
.tl-head .tl-label { background: var(--panel2); z-index: 6; font-weight: 800; }
.tl-label b { font-size: 15px; }
.tl-label small { color: var(--muted); font-size: 11px; }
.tl-cell { width: 64px; flex-shrink: 0; border-left: 1px solid color-mix(in srgb, var(--line) 50%, transparent); cursor: pointer; }
.tl-cell:hover { background: var(--gold-soft); }
.tl-cell.we { background: color-mix(in srgb, var(--panel2) 60%, transparent); }
.tl-head .tl-cell { display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: default; font-size: 12px; color: var(--muted); }
.tl-head .tl-cell b { font-size: 16px; color: var(--text); }
.tl-head .tl-cell.is-today { background: var(--gold-soft); color: var(--gold); }
.tl-head .tl-cell.is-today b { color: var(--gold); }
.tl-cell.col-today { background: color-mix(in srgb, var(--gold) 5%, transparent); }
.tl-bar {
  position: absolute; top: 8px; height: 34px; border-radius: 9px;
  padding: 0 10px; display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; color: #fff; overflow: hidden; white-space: nowrap;
  cursor: pointer; z-index: 2; box-shadow: 0 4px 12px rgba(0,0,0,.25); transition: .2s;
}
.tl-bar:hover { filter: brightness(1.12); transform: translateY(-1px); }
.tl-bar.checkedin { background: linear-gradient(135deg, #f43f5e, #be123c); }
.tl-bar.reserved { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.tl-bar.checkedout { background: linear-gradient(135deg, #64748b, #475569); opacity: .75; }

/* ===== Guests ===== */
.guests-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.guest-card { display: flex; flex-direction: column; gap: 12px; }
.guest-card .top { display: flex; gap: 12px; align-items: center; }
.guest-card .ava { width: 52px; height: 52px; font-size: 20px; border-radius: 15px; }
.guest-card .name { font-weight: 800; font-size: 15px; }
.guest-meta { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; text-align: center; background: var(--panel2); border-radius: 12px; padding: 10px; }
.guest-meta b { display: block; font-size: 15px; }
.guest-meta span { color: var(--muted); font-size: 11.5px; }
.guest-info { color: var(--muted); font-size: 12.5px; display: flex; flex-direction: column; gap: 3px; }

/* ===== Invoice ===== */
.invoice { background: var(--panel2); border-radius: 14px; padding: 18px; }
.inv-head { display: flex; justify-content: space-between; margin-bottom: 14px; gap: 10px; flex-wrap: wrap; }
.inv-head .muted { color: var(--muted); font-size: 12.5px; }
.inv-lines { width: 100%; min-width: 0; margin: 8px 0; }
.inv-lines td, .inv-lines th { padding: 8px 6px; white-space: normal; }
.inv-total { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 12px; }
.inv-total div { display: flex; justify-content: space-between; }
.inv-total .grand { font-size: 18px; font-weight: 900; color: var(--gold); }
.services-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.svc { padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--bg2); cursor: pointer; text-align: center; transition: .2s; }
.svc:hover { border-color: var(--gold); }
.svc b { display: block; font-size: 18px; }
.svc small { color: var(--muted); }

/* ===== Reports ===== */
.hbar { display: flex; flex-direction: column; gap: 14px; }
.hbar-row { display: grid; grid-template-columns: 110px 1fr 110px; align-items: center; gap: 12px; }
.hbar-track { height: 12px; background: var(--panel2); border-radius: 8px; overflow: hidden; }
.hbar-fill { height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--gold), var(--gold2)); animation: widen 1s ease both; transform-origin: right; }
@keyframes widen { from { transform: scaleX(0); } }
.hbar-row b { text-align: left; font-variant-numeric: tabular-nums; }

/* ===== Modal ===== */
.modal-wrap { position: fixed; inset: 0; background: rgba(4,7,12,.65); backdrop-filter: blur(6px); display: none; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.modal-wrap.open { display: flex; animation: fade .2s; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; width: 100%; max-width: 640px; max-height: 92vh; display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(0,0,0,.5); animation: pop .25s cubic-bezier(.2,.9,.3,1.2); }
.modal.wide { max-width: 820px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 18px; font-weight: 800; }
.modal-body { padding: 22px; overflow-y: auto; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-start; flex-wrap: wrap; }
.modal-foot:empty { display: none; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.94) translateY(10px); } }
.hint { font-size: 12.5px; color: var(--muted); background: var(--panel2); border-radius: 10px; padding: 10px 12px; margin-top: 14px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.hint b { color: var(--gold); }
.err { color: var(--red); font-size: 12.5px; margin-top: 8px; font-weight: 600; }

/* ===== Toasts ===== */
.toasts { position: fixed; bottom: 20px; left: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 200; }
.toast { background: var(--panel); border: 1px solid var(--line); border-right: 4px solid var(--green); padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow); font-weight: 600; min-width: 250px; animation: slideIn .3s ease; }
.toast.error { border-right-color: var(--red); }
.toast.info { border-right-color: var(--gold); }
@keyframes slideIn { from { opacity: 0; transform: translateX(-30px); } }

/* ===== Responsive ===== */
/* ===== Gate: storage setup & login ===== */
.app.locked { visibility: hidden; }
#gate {
  position: fixed; inset: 0; z-index: 90; display: none;
  align-items: center; justify-content: center; padding: 20px; overflow-y: auto;
  background:
    radial-gradient(circle at 15% 20%, color-mix(in srgb, var(--gold) 16%, transparent), transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(59,130,246,.1), transparent 40%),
    var(--bg);
}
#gate.open { display: flex; }
.gate-card {
  width: 100%; max-width: 440px; margin: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 24px;
  padding: 32px; box-shadow: 0 30px 80px rgba(0,0,0,.35);
  animation: pop .35s cubic-bezier(.2,.9,.3,1.2);
}
.gate-card.wide { max-width: 720px; }
.gate-card.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.gate-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.gate-brand .brand-icon { width: 52px; height: 52px; }
.gate-title { margin-bottom: 22px; }
.gate-title h2 { font-size: 22px; font-weight: 900; margin-bottom: 6px; }
.gate-title p { color: var(--muted); line-height: 1.9; }
.gate-title p b { color: var(--gold); }
.gate-form { display: flex; flex-direction: column; gap: 14px; }
.gate-actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.gate-foot { margin-top: 20px; text-align: center; color: var(--muted); font-size: 12px; }
.btn-block { width: 100%; height: 46px; font-size: 15px; margin-top: 4px; }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: grayscale(.5); transform: none; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-left: 42px; }
.pw-eye { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; opacity: .6; font-size: 15px; }
.pw-meter { height: 4px; background: var(--panel2); border-radius: 4px; overflow: hidden; margin-top: -4px; }
.pw-meter span { display: block; height: 100%; width: 0; transition: .3s; }

.store-list { display: flex; flex-direction: column; gap: 12px; }
.store { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; background: var(--panel2); border: 1px solid var(--line); transition: .2s; }
.store.ok { border-color: rgba(34,197,94,.45); }
.store.bad { border-color: rgba(244,63,94,.6); background: rgba(244,63,94,.05); }
.store-num { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; font-weight: 900; background: var(--gold-soft); color: var(--gold); }
.store.ok .store-num { background: rgba(34,197,94,.15); color: var(--green); }
.store-info { flex: 1; min-width: 0; }
.store-title { font-weight: 800; }
.store-path { font-size: 12.5px; font-family: Consolas, monospace; margin-top: 3px; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-path span { color: var(--muted); font-family: 'Cairo', sans-serif; }
.store-desc { color: var(--muted); font-size: 12px; margin-top: 2px; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.choice { padding: 24px 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel2); cursor: pointer; text-align: center; transition: .2s; }
.choice:hover { border-color: var(--gold); transform: translateY(-3px); }
.choice b { font-size: 36px; display: block; margin-bottom: 8px; }
.choice h3 { font-weight: 800; margin-bottom: 4px; }
.choice p { color: var(--muted); font-size: 12.5px; }
.sub.path { font-family: Consolas, monospace; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.user-text { flex: 1; min-width: 0; cursor: pointer; }
.user-text:hover .user-name { color: var(--gold); }
.logout-btn { width: 34px; height: 34px; font-size: 14px; }
.logout-btn:hover { color: var(--red); border-color: var(--red); }

/* ===== v3: tabs, finance, housekeeping, security, network ===== */
.gated .modal-wrap { visibility: hidden; }
body[data-role="housekeeping"] .search,
body[data-role="housekeeping"] .top-actions .btn-gold { display: none; }
.tabs { display: flex; gap: 6px; margin-bottom: 20px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab { padding: 10px 16px; cursor: pointer; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; transition: .2s; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--gold); border-bottom-color: var(--gold); }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; font-size: 13px; }
.check input { width: 18px; height: 18px; accent-color: var(--gold); }
.link { color: var(--gold); cursor: pointer; font-size: 13px; font-weight: 700; }
.link:hover { text-decoration: underline; }
.btn-wa { background: #25d366; color: #06301a; border-color: #25d366; }
.btn-wa:hover { background: #1fbe5a; color: #06301a; border-color: #1fbe5a; }
.hint.warn { background: rgba(245,158,11,.1); color: var(--amber); align-items: center; }
code { background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: 12px; color: var(--gold); }
.pos { color: var(--green); } .neg { color: var(--red); }
.hbar-fill.red { background: linear-gradient(90deg, #f43f5e, #fb7185); }

.toast-action { display: flex; align-items: center; gap: 10px; }
.toast-action span { flex: 1; }
.toast-x { background: none; border: none; cursor: pointer; color: var(--muted); font-size: 14px; }

.diff-box { height: 42px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; background: var(--panel2); }
.diff-box.ok { color: var(--green); background: rgba(34,197,94,.1); }
.diff-box.plus { color: var(--blue); background: rgba(59,130,246,.1); }
.diff-box.minus { color: var(--red); background: rgba(244,63,94,.1); }
.drawer-card .grand { font-size: 20px; }

.pl { display: flex; flex-direction: column; gap: 16px; margin: 8px 0 18px; }
.pl-row { display: grid; grid-template-columns: 160px 1fr 120px; gap: 12px; align-items: center; }
.pl-row b { text-align: left; font-variant-numeric: tabular-nums; }
.pl-bar { height: 22px; background: var(--panel2); border-radius: 8px; overflow: hidden; }
.pl-bar div { height: 100%; border-radius: 8px; animation: widen 1s ease both; transform-origin: right; }
.pl-net { display: flex; align-items: baseline; gap: 14px; padding: 16px; border-radius: 14px; }
.pl-net.pos { background: rgba(34,197,94,.1); } .pl-net.neg { background: rgba(244,63,94,.1); }
.pl-net b { font-size: 28px; font-weight: 900; }
.pl-net small { color: var(--muted); margin-right: auto; }

.hk-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: start; }
.hk-col { background: var(--panel2); border: 1px solid var(--line); border-radius: 18px; padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 200px; }
.hk-head { display: flex; align-items: center; gap: 8px; font-weight: 800; padding: 4px 6px 8px; }
.hk-head b { margin-right: auto; background: var(--panel); border-radius: 20px; padding: 0 10px; font-size: 13px; }
.hk-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px; border-right: 4px solid var(--c, var(--line)); }
.hk-card.need { --c: var(--amber); } .hk-card.doing { --c: var(--blue); } .hk-card.ready { --c: var(--green); } .hk-card.maint { --c: var(--slate); }
.hk-meta { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.hk-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.hk-actions .btn:not(.btn-sm) { flex: 1; height: 44px; font-size: 15px; }

.id-box { display: flex; flex-direction: column; gap: 10px; }
.id-preview { min-height: 140px; border: 2px dashed var(--line); border-radius: 14px; display: grid; place-items: center; color: var(--muted); overflow: hidden; background: var(--bg2); }
.id-preview img { max-width: 100%; max-height: 320px; display: block; cursor: zoom-in; }
.id-preview.small { min-height: 110px; }
.id-preview.small img { max-height: 200px; }
#cam { width: 100%; max-height: 320px; border-radius: 14px; background: #000; }
.profile { display: grid; grid-template-columns: 260px 1fr; gap: 20px; }
.profile-side { background: var(--panel2); border-radius: 16px; padding: 18px; }

.lock-user { text-align: center; margin-bottom: 20px; }
.lock-user h2 { font-size: 20px; font-weight: 900; margin-top: 10px; }
.lock-user p { color: var(--muted); font-size: 13px; margin-top: 4px; }
.avatar.big { width: 76px; height: 76px; font-size: 30px; margin: 0 auto; }

.net-pill { font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 20px; white-space: nowrap; }
.net-pill.on { color: var(--green); background: rgba(34,197,94,.12); }
.net-pill.off { color: var(--red); background: rgba(244,63,94,.12); animation: blink 1.5s infinite; }
@keyframes blink { 50% { opacity: .5; } }
.conn-info { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.conn-info div { background: var(--panel2); border-radius: 12px; padding: 12px; }
.conn-info span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.conn-info b { font-family: Consolas, monospace; font-size: 15px; }
.net-key { color: var(--gold); letter-spacing: 2px; font-size: 18px !important; }

.store.skipped { border-color: rgba(245,158,11,.45); border-style: dashed; }
.store.skipped .store-num { background: rgba(245,158,11,.15); color: var(--amber); }
.store-btns { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.btn-ghost { background: transparent; color: var(--muted); }
.skip-ask { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
.skip-ask input { flex: 1; min-width: 140px; height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--gold); background: var(--bg2); outline: none; }

@media (max-width: 1150px) {
  .hk-board { grid-template-columns: 1fr 1fr; }
  .profile { grid-template-columns: 1fr; }
}


/* ===== السمات (Skins) ===== */
html[data-skin="emerald"]  { --gold: #10b981; --gold2: #6ee7b7; --gold-soft: rgba(16,185,129,.13); --btn1: #34d399; --btn2: #059669; --on-accent: #022c22; --hero1: #0f2a22; --hero2: #07140f; }
html[data-skin="sapphire"] { --gold: #3b82f6; --gold2: #93c5fd; --gold-soft: rgba(59,130,246,.14); --btn1: #3b82f6; --btn2: #2563eb; --on-accent: #fff; --hero1: #12213d; --hero2: #0a1122; }
html[data-skin="royal"]    { --gold: #8b5cf6; --gold2: #c4b5fd; --gold-soft: rgba(139,92,246,.14); --btn1: #8b5cf6; --btn2: #7c3aed; --on-accent: #fff; --hero1: #221a3d; --hero2: #110c22; }
html[data-skin="rose"]     { --gold: #f43f5e; --gold2: #fda4af; --gold-soft: rgba(244,63,94,.13); --btn1: #f43f5e; --btn2: #e11d48; --on-accent: #fff; --hero1: #35141d; --hero2: #1a0a0f; }
html[data-skin="ocean"]    { --gold: #14b8a6; --gold2: #5eead4; --gold-soft: rgba(20,184,166,.13); --btn1: #2dd4bf; --btn2: #0d9488; --on-accent: #042f2e; --hero1: #0f2a2a; --hero2: #071515; }
html[data-skin="copper"]   { --gold: #f97316; --gold2: #fdba74; --gold-soft: rgba(249,115,22,.13); --btn1: #fb923c; --btn2: #ea580c; --on-accent: #1a0f07; --hero1: #33200f; --hero2: #1a0f07; }
html[data-skin="mono"]     { --gold: #94a3b8; --gold2: #e2e8f0; --gold-soft: rgba(148,163,184,.14); --btn1: #e2e8f0; --btn2: #94a3b8; --on-accent: #0f172a; --hero1: #1e2433; --hero2: #0f131c; }

/* خلفيات ليلية بلون السمة */
html[data-theme="dark"][data-skin="emerald"]  { --bg: #06100d; --bg2: #0a1612; --panel: #0e1d18; --panel2: #13261f; --line: #1d3a30; }
html[data-theme="dark"][data-skin="sapphire"] { --bg: #070c18; --bg2: #0a1222; --panel: #0f1a30; --panel2: #14223c; --line: #1f3257; }
html[data-theme="dark"][data-skin="royal"]    { --bg: #0c0916; --bg2: #110d20; --panel: #18132c; --panel2: #1f1838; --line: #2e2552; }
html[data-theme="dark"][data-skin="rose"]     { --bg: #12080b; --bg2: #190b10; --panel: #221117; --panel2: #2b161e; --line: #43222d; }
html[data-theme="dark"][data-skin="ocean"]    { --bg: #051110; --bg2: #081816; --panel: #0d201e; --panel2: #122a27; --line: #1c403b; }
html[data-theme="dark"][data-skin="copper"]   { --bg: #110b06; --bg2: #181009; --panel: #22170e; --panel2: #2b1e13; --line: #45301e; }
html[data-theme="dark"][data-skin="mono"]     { --bg: #0b0c0f; --bg2: #101216; --panel: #16191f; --panel2: #1c2028; --line: #2a303b; }

/* نهاري: ألوان أغمق شوية عشان تبان على الأبيض */
html[data-theme="light"][data-skin="emerald"]  { --gold: #047857; --gold2: #065f46; --bg: #eef6f2; --bg2: #e2efe8; --panel2: #f3f9f6; --line: #d3e6dc; }
html[data-theme="light"][data-skin="sapphire"] { --gold: #1d4ed8; --gold2: #1e3a8a; --bg: #eef3fb; --bg2: #e1e9f7; --panel2: #f4f7fd; --line: #d4def0; }
html[data-theme="light"][data-skin="royal"]    { --gold: #6d28d9; --gold2: #4c1d95; --bg: #f3f0fb; --bg2: #e8e2f7; --panel2: #f8f6fd; --line: #ddd5f0; }
html[data-theme="light"][data-skin="rose"]     { --gold: #be123c; --gold2: #881337; --bg: #fbf0f2; --bg2: #f6e2e6; --panel2: #fdf6f7; --line: #f0d4da; }
html[data-theme="light"][data-skin="ocean"]    { --gold: #0f766e; --gold2: #134e4a; --bg: #eef7f6; --bg2: #e0f0ee; --panel2: #f4faf9; --line: #d1e7e4; }
html[data-theme="light"][data-skin="copper"]   { --gold: #c2410c; --gold2: #7c2d12; --bg: #fbf3ec; --bg2: #f5e6d8; --panel2: #fdf8f3; --line: #eedccb; }
html[data-theme="light"][data-skin="mono"]     { --gold: #475569; --gold2: #1e293b; --bg: #f1f3f6; --bg2: #e5e8ee; --panel2: #f7f8fa; --line: #dde1e8; --btn1: #64748b; --btn2: #334155; --on-accent: #fff; }

/* حجم الخط */
html[data-font="sm"] body { zoom: .92; }
html[data-font="lg"] body { zoom: 1.1; }
html[data-font="xl"] body { zoom: 1.2; }

/* ===== صفحة المظهر ===== */
.skins { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.skin { border: 2px solid var(--line); border-radius: 16px; overflow: hidden; cursor: pointer; transition: .2s; background: var(--panel2); }
.skin:hover { transform: translateY(-3px); }
.skin.active { border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }
.skin-prev { height: 96px; display: flex; gap: 6px; padding: 10px; }
.skin-prev .sb { width: 34px; border-radius: 8px; display: flex; flex-direction: column; gap: 5px; padding: 6px 5px; }
.skin-prev .sb i { height: 5px; border-radius: 3px; background: rgba(255,255,255,.18); display: block; }
.skin-prev .sb i:first-child { background: var(--sa); }
.skin-prev .mn { flex: 1; border-radius: 8px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.skin-prev .bt { width: 46px; height: 14px; border-radius: 5px; background: linear-gradient(135deg, var(--sb), var(--sa)); }
.skin-prev .ln { height: 6px; border-radius: 3px; background: rgba(128,128,128,.25); }
.skin-prev .ln.a { width: 60%; background: var(--sa); opacity: .8; }
.skin-name { padding: 10px 12px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.skin-name .dot { width: 14px; height: 14px; }
.skin-name .ok { margin-right: auto; color: var(--gold); }
.mode-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mode-card { border: 2px solid var(--line); border-radius: 14px; padding: 16px; cursor: pointer; text-align: center; font-weight: 800; transition: .2s; }
.mode-card b { display: block; font-size: 28px; margin-bottom: 4px; }
.mode-card.active { border-color: var(--gold); background: var(--gold-soft); color: var(--gold); }

/* ===== الغرف المشتركة ===== */
.beds { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
.beds i { width: 14px; height: 9px; border-radius: 3px; background: color-mix(in srgb, var(--green) 30%, transparent); border: 1px solid color-mix(in srgb, var(--green) 60%, transparent); }
.beds i.on { background: var(--violet); border-color: var(--violet); }
.bed-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin-bottom: 16px; }
.bed { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--panel2); display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; }
.bed[data-action] { cursor: pointer; }
.bed.on { border-color: color-mix(in srgb, var(--violet) 55%, transparent); background: color-mix(in srgb, var(--violet) 10%, var(--panel2)); }
.bed-no { color: var(--muted); font-size: 11.5px; font-weight: 700; }
.bed b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bed b.free { color: var(--green); }
.bed small { color: var(--muted); }
.s-partial { color: var(--violet); background: rgba(167,139,250,.14); }
.tl-row.shared { background-image: repeating-linear-gradient(to bottom, transparent 0 calc(var(--lane) - 1px), color-mix(in srgb, var(--line) 50%, transparent) calc(var(--lane) - 1px) var(--lane)); background-position: 0 6px; }
.tl-bar.lane { height: 26px; font-size: 11.5px; }
.tl-bar small { background: rgba(0,0,0,.25); border-radius: 5px; padding: 0 5px; font-size: 10.5px; }

input[data-phone].bad { border-color: var(--red) !important; box-shadow: 0 0 0 3px rgba(244,63,94,.12) !important; }
input[data-phone].good { border-color: var(--green) !important; }

@media print {
  body { overflow: visible; background: #fff; }
  .sidebar, .topbar, .toolbar .btn, .page-head .btn { display: none !important; }
  .app, .main, .view { display: block; height: auto; overflow: visible; }
  .card { box-shadow: none; break-inside: avoid; }
}
@media (max-width: 1150px) {
  .dash-grid, .dash-grid-2 { grid-template-columns: 1fr; }
  .summary-strip { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .sidebar { position: fixed; top: 0; bottom: 0; right: 0; transform: translateX(100%); box-shadow: var(--shadow); }
  .sidebar.open { transform: none; }
  .menu-btn { display: block; }
  .topbar { padding: 0 16px; gap: 10px; }
  .clock { display: none; }
  .top-actions .btn-gold { padding: 0 12px; }
  .view { padding: 16px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .summary-strip { grid-template-columns: repeat(2, 1fr); }
  .services-pick { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { gap: 18px; }
  .hbar-row { grid-template-columns: 80px 1fr 90px; }
}
@media (max-width: 520px) {
  .search { display: none; }
  .hero { padding: 22px; }
}

/* ===== ثيمات Meta Origin كلها + الاستايلات: themes.gen.css (مولَّد بـ tools/themes/apply.js) ===== */

/* ===== Meta Origin: حول البرنامج + شرح البرنامج (meta.js) ===== */
.mo-company { display: flex; flex-wrap: wrap; padding: 0 !important; overflow: hidden; }
.mo-company-logo { background: #10131a; padding: 28px 34px; text-align: center; min-width: 220px; }
.mo-company-logo img { width: 110px; height: 110px; }
.mo-company-name { color: #fff; font-size: 22px; font-weight: 700; margin-top: 10px; }
.mo-company-sub { color: #8a93a6; font-size: 11px; letter-spacing: 2px; }
.mo-company-text { flex: 1; padding: 24px 28px; min-width: 300px; line-height: 1.9; }
.mo-company-text p { margin: 10px 0 14px; }
.mo-muted { color: var(--muted); font-size: 12.5px; }
.mo-app { display: flex; align-items: center; gap: 10px; }
.mo-app img { width: 42px; height: 42px; border-radius: 10px; }
.mo-team { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.mo-member { padding: 0 !important; overflow: hidden; }
.mo-member-head { background: #14161c; padding: 20px; display: flex; align-items: center; gap: 18px; }
.mo-member-head img { width: 100px; height: 100px; border-radius: 50%; border: 3px solid #3d5afe; cursor: pointer; object-fit: cover; }
.mo-role { color: #3ddc97; font-size: 12px; font-weight: 600; }
.mo-name { color: #fff; font-size: 22px; font-weight: 700; }
.mo-name-en { color: #a9b1c2; }
.mo-bio { padding: 12px 20px 0; line-height: 1.9; color: var(--muted); }
.mo-phones-title { padding: 6px 20px 0; font-weight: 700; }
.mo-phone { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 20px; padding: 6px 12px; border-radius: 10px; background: var(--panel2); font-weight: 600; }
.mo-member .mo-phone:last-child { margin-bottom: 18px; }
.mo-wa { background: #128C7E !important; border-color: #128C7E !important; color: #fff !important; }
.mo-zoom { position: fixed; inset: 0; background: rgba(0, 0, 0, .75); display: flex; align-items: center; justify-content: center; z-index: 9999; cursor: pointer; }
.mo-zoom img { max-width: min(660px, 92vw); max-height: 92vh; border-radius: 12px; }
.mo-help { padding: 14px 18px !important; margin-bottom: 10px; }
.mo-help summary { cursor: pointer; font-weight: 700; font-size: 15px; }
.mo-help ul { margin: 10px 0 0; padding-inline-start: 20px; line-height: 2; }

/* أيقونة البرنامج (appIcon) */
.brand-icon.app-icon { object-fit: contain; background: none !important; padding: 0; }

/* ===== شكل القائمة (data-layout على <html>، من الإعدادات ← المظهر) ===== */
/* قائمة أيقونات: الاسم بيظهر لما تقف على الأيقونة */
html[data-layout='rail'] .sidebar { width: 76px; padding-inline: 8px; }
html[data-layout='rail'] .brand { justify-content: center; padding-inline: 0; }
html[data-layout='rail'] .brand > div, html[data-layout='rail'] .nav a span, html[data-layout='rail'] .user-text { display: none; }
html[data-layout='rail'] .nav a { justify-content: center; padding-inline: 0; position: relative; }
html[data-layout='rail'] .nav-badge { position: absolute; top: 2px; left: 4px; margin: 0; }
html[data-layout='rail'] .user { flex-direction: column; gap: 6px; }
/* شريط علوي */
html[data-layout='topbar'] .app { flex-direction: column; }
html[data-layout='topbar'] .sidebar { width: 100%; height: auto; flex-direction: row; align-items: center; gap: 12px; padding: 8px 14px; overflow-x: auto; }
html[data-layout='topbar'] .brand { border: 0; margin: 0; padding: 0; flex-shrink: 0; }
html[data-layout='topbar'] .brand-sub { display: none; }
html[data-layout='topbar'] .nav { flex-direction: row; flex: 1; min-width: 0; overflow-x: auto; }
html[data-layout='topbar'] .nav a { white-space: nowrap; flex-shrink: 0; }
html[data-layout='topbar'] .nav a.active::before { display: none; }
html[data-layout='topbar'] .sidebar-foot { border: 0; padding: 0; flex-shrink: 0; }
html[data-layout='topbar'] .menu-btn { display: none; }
html[data-layout='topbar'] .main { min-height: 0; }
/* عائم */
html[data-layout='floating'] .app { padding: 12px; gap: 12px; }
html[data-layout='floating'] .sidebar { border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--shadow); align-self: stretch; overflow-y: auto; }
html[data-layout='floating'] .main { border-radius: 18px; border: 1px solid var(--line); overflow: hidden; }

/* مخطط الحجوزات: سحب الحجز لنقله */
.tl-bar[draggable="true"] { cursor: grab; }
.tl-bar.tl-dragging { opacity: .4; }
.tl-cell.tl-drop-ok { background: color-mix(in srgb, var(--gold) 28%, transparent) !important; outline: 2px dashed var(--gold); outline-offset: -2px; }
