/* Mekadmim kit: the shared look of every Mekadmim system (from mekadmim studio/public/css/app.css). Generated into
 * <system>/public/kit/ by kit/sync.mjs: edit it in mekadmim studio/kit/web/, never in a copy. A system adds its own
 * personality (colors, backgrounds, motifs) in its own css/theme.css by re-scoping the tokens below. */
:root {
  --bg: #e8f5f3; --surface: #ffffff; --surface-2: #eef8f6; --surface-3: #e2f2ef; --ink: #0b2b36; --muted: #5b7a83; --line: #d6ebe8;
  --accent: #0c7f84; --accent-soft: #daf3ef; --mint: #92ffbe; --sky: #318eb9;
  --grad: linear-gradient(135deg, #14a296 0%, #0c7f84 52%, #22679f 100%);
  --grad-brand: linear-gradient(120deg, #318eb9 0%, #3fbfb0 55%, #92ffbe 100%);
  --grad-deep: linear-gradient(150deg, #125068 0%, #0b3242 55%, #061c27 100%);
  --glow-1: #c3f1e3; --glow-2: #cde7fa; --glow-3: #d9f8e8;
  --shadow: 0 1px 2px rgba(8, 60, 70, .05), 0 14px 34px -16px rgba(12, 110, 120, .28);
  --shadow-lift: 0 2px 4px rgba(8, 60, 70, .06), 0 26px 50px -20px rgba(12, 110, 120, .42);
  --good: #12805a; --good-soft: #def4ea; --bad: #b8322a; --bad-soft: #fbe7e5; --warn: #8a5d06; --warn-soft: #fbf0d6;
  --t-podcast: #12a39a; --t-lecture: #2f86d0; --t-hub: #21a874; --t-clients: #4f9a3c;
  --r-admin: #0b3242; --r-partner: #0c7f84; --r-employee: #2f78bd; --r-client: #6c8790;
  --body: 'Rubik', 'Segoe UI', 'Arial Hebrew', Arial, sans-serif;
  --r: 28px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #061a22; --surface: #0c2833; --surface-2: #113543; --surface-3: #16404f; --ink: #e5faf5; --muted: #8fb5bb; --line: #1b4452;
  --accent: #5fe0c8; --accent-soft: #123f44; --glow-1: #0b3b3d; --glow-2: #0a2c45; --glow-3: #0c3a33;
  --shadow: 0 14px 34px -18px rgba(0, 0, 0, .6); --shadow-lift: 0 26px 50px -20px rgba(0, 0, 0, .75);
  --good: #4fd39b; --good-soft: #12382a; --bad: #ff8a80; --bad-soft: #3a1714; --warn: #f2c25a; --warn-soft: #3a2c10;
  --r-admin: #92ffbe; --r-client: #9db4ba; --r-employee: #6fb4f0; --r-partner: #5fe0c8;
  color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #061a22; --surface: #0c2833; --surface-2: #113543; --surface-3: #16404f; --ink: #e5faf5; --muted: #8fb5bb; --line: #1b4452;
  --accent: #5fe0c8; --accent-soft: #123f44; --glow-1: #0b3b3d; --glow-2: #0a2c45; --glow-3: #0c3a33;
  --shadow: 0 14px 34px -18px rgba(0, 0, 0, .6); --shadow-lift: 0 26px 50px -20px rgba(0, 0, 0, .75);
  --good: #4fd39b; --good-soft: #12382a; --bad: #ff8a80; --bad-soft: #3a1714; --warn: #f2c25a; --warn-soft: #3a2c10;
  --r-admin: #92ffbe; --r-client: #9db4ba; --r-employee: #6fb4f0; --r-partner: #5fe0c8;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.5; direction: rtl;
  background:
    radial-gradient(900px 520px at 100% -8%, var(--glow-1) 0%, transparent 62%),
    radial-gradient(760px 480px at -6% 38%, var(--glow-2) 0%, transparent 60%),
    radial-gradient(700px 420px at 60% 110%, var(--glow-3) 0%, transparent 60%), var(--bg);
  background-attachment: fixed;
}
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.boot { min-height: 100vh; display: grid; place-items: center; }
.boot-orb { width: 54px; height: 54px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff 0%, var(--mint) 30%, #3fbfb0 60%, rgba(49, 142, 185, 0) 72%);
  animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.82); opacity: .6; } }

/* ---------------------------------------------------------------- shell */
.wrap { max-width: 1240px; margin: 0 auto; padding-block: 18px 60px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: grid; gap: 18px; }

/* the deep petrol panels re-scope the tokens so everything inside reads light-on-dark */
.deep {
  --ink: #ffffff; --muted: #b5d6da; --surface: #134a5c; --surface-2: rgba(255, 255, 255, .1); --line: rgba(255, 255, 255, .14);
  --accent: var(--mint); --accent-soft: rgba(146, 255, 190, .16); --good: var(--mint); --bad: #ff9fb0;
  color: var(--ink); position: relative; isolation: isolate; overflow: hidden; border-radius: var(--r);
  background:
    radial-gradient(circle at 12% -20%, rgba(63, 191, 176, .75) 0%, transparent 46%),
    radial-gradient(circle at 96% 120%, rgba(146, 255, 190, .22) 0%, transparent 40%), var(--grad-deep);
  box-shadow: 0 24px 48px -24px rgba(6, 60, 80, .7);
}
.deep::after { content: ""; position: absolute; z-index: -1; width: 190px; height: 190px; border-radius: 50%; left: 20%; top: -82px;
  background: radial-gradient(circle at 35% 30%, #fff 0%, #b8f5e6 16%, #3fbfb0 46%, rgba(49, 142, 185, 0) 72%); opacity: .5; pointer-events: none; }
.deep::before { content: ""; position: absolute; z-index: -1; width: 58px; height: 58px; border-radius: 50%; left: -14px; bottom: -20px;
  background: radial-gradient(circle at 35% 30%, #f1fff6 0%, var(--mint) 45%, rgba(146, 255, 190, 0) 72%); opacity: .85; pointer-events: none; }

header.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; padding: 18px 24px; z-index: 20; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; min-width: 0; }
.brand-mark { flex: none; width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .04)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); }
.brand-mark svg { width: 20px; height: 20px; margin-inline-start: 3px; }
.brand-text { display: grid; line-height: 1.1; }
.brand-text b { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.brand-text small { font-size: 12.5px; color: var(--muted); }
.brand-logo { height: 15px; width: auto; display: block; margin-bottom: 4px; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { border: 0; background: rgba(255, 255, 255, .1); color: #d3ecec; padding: 8px 17px; border-radius: 999px; font-size: 14.5px; font-weight: 600;
  text-decoration: none; transition: background .15s, color .15s; display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.tab svg { width: 16px; height: 16px; opacity: .85; }
.tab:hover { background: rgba(255, 255, 255, .18); color: #fff; }
.tab[aria-current="page"] { background: var(--mint); color: #062a33; }
.tab[aria-current="page"] svg { opacity: 1; }

.me-box { display: flex; align-items: center; gap: 10px; position: relative; }
.me-btn { display: flex; align-items: center; gap: 10px; border: 0; background: rgba(255, 255, 255, .08); border-radius: 999px; padding: 5px 5px 5px 14px;
  cursor: pointer; color: inherit; text-align: right; }
.me-btn:hover { background: rgba(255, 255, 255, .16); }
.me-btn .who { display: grid; line-height: 1.15; }
.me-btn .who b { font-size: 14px; }
.me-btn .who small { font-size: 12px; color: var(--muted); }
.menu { position: absolute; top: calc(100% + 8px); left: 0; z-index: 30; min-width: 220px; padding: 8px; border-radius: 20px; background: var(--surface);
  color: var(--ink); box-shadow: var(--shadow-lift); display: grid; gap: 2px; }
.menu button, .menu a { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 10px 12px; border-radius: 12px; cursor: pointer;
  text-align: right; color: var(--ink); text-decoration: none; font-size: 14.5px; }
.menu button:hover, .menu a:hover { background: var(--surface-2); }
.menu svg { width: 17px; height: 17px; color: var(--muted); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 6px; }

/* ---------------------------------------------------------------- cards & controls */
.card { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 22px 24px; min-width: 0; }
.card h2, .sec-head h2 { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.sec-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 14px; }
.sec-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 18px; padding: 4px 6px 0; }
.page-head h1 { margin: 0; font-size: clamp(24px, 3.4vw, 32px); font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.page-head p { margin: 6px 0 0; color: var(--muted); max-width: 640px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 10px 20px; cursor: pointer;
  background: var(--surface-2); color: var(--ink); font-weight: 600; font-size: 14.5px; text-decoration: none; transition: background .15s, transform .15s, filter .15s, box-shadow .15s;
  white-space: nowrap; }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn:hover { background: var(--accent-soft); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--grad); color: #fff; box-shadow: 0 10px 22px -10px rgba(12, 127, 132, .9); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.mint { background: var(--mint); color: #062a33; }
.btn.mint:hover { background: #b2ffd2; }
.btn.danger { background: var(--bad-soft); color: var(--bad); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.small { padding: 6px 14px; font-size: 13.5px; }
.btn.big { padding: 13px 26px; font-size: 16px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; filter: none; transform: none; }
.icon-btn { border: 0; background: transparent; width: 36px; height: 36px; border-radius: 12px; display: inline-grid; place-items: center; cursor: pointer; color: var(--muted); }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }

.field { display: grid; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.field .hint { font-weight: 400; font-size: 12.5px; }
input[type=text], input[type=password], input[type=search], input[type=email], select, textarea {
  width: 100%; border: 1.5px solid transparent; border-radius: 14px; padding: 11px 14px; background: var(--surface-2); color: var(--ink); font-size: 15px;
  transition: border-color .15s, background .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); background: var(--surface); }
input[aria-invalid="true"] { border-color: var(--bad); }
input.ltr { direction: ltr; text-align: right; }
.form { display: grid; gap: 14px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.err { background: var(--bad-soft); color: var(--bad); border-radius: 14px; padding: 10px 14px; font-size: 14px; }
.note { background: var(--surface-2); border-radius: 16px; padding: 12px 14px; font-size: 14px; color: var(--muted); }
.note b { color: var(--ink); }

.chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 11px; font-size: 12.5px; font-weight: 600;
  background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.chip svg { width: 13px; height: 13px; }
.chip.good { background: var(--good-soft); color: var(--good); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.accent { background: var(--accent-soft); color: var(--accent); }
.role-chip { --rc: var(--r-client); background: color-mix(in srgb, var(--rc) 13%, transparent); color: var(--rc); }
.role-chip.r-admin { --rc: var(--r-admin); } .role-chip.r-partner { --rc: var(--r-partner); } .role-chip.r-employee { --rc: var(--r-employee); }
.deep .role-chip { background: rgba(146, 255, 190, .16); color: var(--mint); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.dot.live { box-shadow: 0 0 0 0 currentColor; animation: live 2s infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 60%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.avatar { --ac: var(--r-client); flex: none; width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; font-weight: 700; font-size: 15px;
  color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--ac) 70%, #fff), var(--ac)); }
.avatar.r-admin { --ac: #0b3242; } .avatar.r-partner { --ac: #0c7f84; } .avatar.r-employee { --ac: #2f78bd; }
.avatar.sm { width: 32px; height: 32px; border-radius: 11px; font-size: 13px; }
.avatar.lg { width: 56px; height: 56px; border-radius: 18px; font-size: 21px; }
.me-btn .avatar { background: var(--grad-brand); color: #062a33; }

.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface-2); }
.seg button { border: 0; background: none; padding: 7px 14px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--muted);
  display: inline-flex; align-items: center; gap: 6px; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 4px 12px -6px rgba(8, 60, 70, .35); }
.seg .n { font-size: 12px; background: var(--surface-3); border-radius: 999px; padding: 0 7px; color: var(--muted); }

.switch { position: relative; width: 42px; height: 24px; border-radius: 999px; border: 0; background: var(--surface-3); cursor: pointer; flex: none;
  transition: background .18s; padding: 0; }
.switch::after { content: ""; position: absolute; top: 3px; right: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .2); transition: transform .18s; }
.switch[aria-checked="true"] { background: var(--grad); }
.switch[aria-checked="true"]::after { transform: translateX(-18px); }
.switch[disabled] { cursor: not-allowed; opacity: .55; }
.switch.busy { opacity: .6; }

/* ---------------------------------------------------------------- dialogs */
.backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(4, 24, 32, .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 16px; animation: fade .15s ease-out; }
@keyframes fade { from { opacity: 0; } }
.dialog { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; overflow-x: hidden; background: var(--surface); border-radius: 30px; box-shadow: var(--shadow-lift);
  padding: 24px 26px; animation: rise .2s ease-out; }
@keyframes rise { from { transform: translateY(14px) scale(.98); opacity: 0; } }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.dialog-head h2 { margin: 0; font-size: 21px; font-weight: 700; }
.dialog-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.dialog-foot { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-start; margin-top: 18px; }
/* ---------------------------------------------------------------- a working button, the admin's requests */
.spinner { width: 15px; height: 15px; border-radius: 50%; border: 2px solid color-mix(in srgb, currentColor 25%, transparent); border-top-color: currentColor;
  animation: spin .8s linear infinite; flex: none; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
/* ---------------------------------------------------------------- toasts */
.toasts { position: fixed; bottom: max(18px, env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); z-index: 80; display: grid; gap: 8px;
  width: min(420px, calc(100% - 32px)); pointer-events: none; }
.toast { background: #0b3242; color: #fff; border-radius: 18px; padding: 12px 16px; box-shadow: 0 18px 36px -14px rgba(0, 0, 0, .5); display: flex; gap: 10px;
  align-items: center; font-size: 14.5px; animation: rise .2s ease-out; }
.toast svg { width: 18px; height: 18px; color: var(--mint); flex: none; }
.toast.bad svg { color: #ff9fb0; }
