/* הניהול יומי שלי — עיצוב */
:root {
  --primary: #4f46e5;
  --primary-2: #06b6d4;
  --primary-soft: #eef2ff;
  --on-primary: #fff;
  --bg: #f3f5fb;
  --bg-grad: radial-gradient(1200px 600px at 100% -10%, #e0e7ff 0%, transparent 60%), radial-gradient(900px 500px at -10% 0%, #cffafe 0%, transparent 55%);
  --surface: #ffffff;
  --surface-2: #f6f7fb;
  --surface-3: #eceff6;
  --text: #1e2433;
  --muted: #6b7385;
  --border: #e3e7ef;
  --shadow: 0 1px 2px rgba(20, 30, 60, .06), 0 6px 20px rgba(20, 30, 60, .07);
  --shadow-lg: 0 20px 60px rgba(20, 30, 60, .25);
  --danger: #e11d48;
  --success: #059669;
  --warning: #d97706;
  --radius: 16px;
  --radius-sm: 10px;
  --font: 'Heebo', 'Segoe UI', Arial, sans-serif;
  color-scheme: light;
}
:root[data-accent="teal"] { --primary: #0d9488; --primary-2: #22c55e; --primary-soft: #e6fffa; }
:root[data-accent="rose"] { --primary: #e11d48; --primary-2: #f97316; --primary-soft: #fff1f2; }
:root[data-accent="orange"] { --primary: #ea580c; --primary-2: #eab308; --primary-soft: #fff7ed; }
:root[data-accent="blue"] { --primary: #2563eb; --primary-2: #0ea5e9; --primary-soft: #eff6ff; }
:root[data-accent="purple"] { --primary: #9333ea; --primary-2: #ec4899; --primary-soft: #faf5ff; }
:root[data-accent="green"] { --primary: #16a34a; --primary-2: #84cc16; --primary-soft: #f0fdf4; }

:root[data-theme="dark"] {
  --bg: #0b1020;
  --bg-grad: radial-gradient(1200px 600px at 100% -10%, rgba(79, 70, 229, .22) 0%, transparent 60%), radial-gradient(900px 500px at -10% 0%, rgba(6, 182, 212, .12) 0%, transparent 55%);
  --surface: #151b2e;
  --surface-2: #1b2238;
  --surface-3: #252e48;
  --text: #e7eaf3;
  --muted: #98a1b7;
  --border: #2a3350;
  --primary-soft: rgba(129, 140, 248, .16);
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px rgba(0, 0, 0, .3);
  color-scheme: dark;
}
:root[data-theme="dark"][data-accent="teal"] { --primary-soft: rgba(45, 212, 191, .14); }
:root[data-theme="dark"][data-accent="rose"] { --primary-soft: rgba(251, 113, 133, .14); }
:root[data-theme="dark"][data-accent="orange"] { --primary-soft: rgba(251, 146, 60, .14); }
:root[data-theme="dark"][data-accent="blue"] { --primary-soft: rgba(96, 165, 250, .14); }
:root[data-theme="dark"][data-accent="purple"] { --primary-soft: rgba(192, 132, 252, .14); }
:root[data-theme="dark"][data-accent="green"] { --primary-soft: rgba(74, 222, 128, .14); }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg-grad), var(--bg);
  background-repeat: no-repeat;
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  transition: background-color .3s, color .3s;
}
a { color: var(--primary); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .85em; }
.nowrap { white-space: nowrap; }
.ltr { direction: ltr; unicode-bidi: plaintext; }
.grow { flex: 1 1 auto; min-width: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 10px; }
.spacer { flex: 1; }

/* ---------- top bar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 22px; max-width: 1500px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand .logo {
  width: 58px; height: 58px; border-radius: 16px; object-fit: cover; background: #fff;
  box-shadow: 0 6px 18px rgba(79, 70, 229, .25); border: 2px solid var(--surface);
}
.brand h1 {
  margin: 0; font-size: 1.75rem; font-weight: 800; letter-spacing: -.3px; line-height: 1.15;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand .subtitle { color: var(--muted); font-size: .95rem; font-weight: 500; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.top-clock { text-align: left; line-height: 1.15; padding: 0 8px; }
.top-clock b { font-size: 1.35rem; font-variant-numeric: tabular-nums; display: block; }
.top-clock span { font-size: .78rem; color: var(--muted); }

.icon-btn {
  width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 1.2rem; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--shadow);
  transition: transform .15s, background .2s;
}
.icon-btn:hover { transform: translateY(-1px); background: var(--surface-2); }
.icon-btn.sm { width: 34px; height: 34px; font-size: 1rem; border-radius: 10px; box-shadow: none; }
.icon-btn.ghost { border-color: transparent; background: transparent; box-shadow: none; }
.icon-btn.ghost:hover { background: var(--surface-3); }

/* ---------- tabs ---------- */
.tabs {
  position: sticky; top: 0; z-index: 50;
  display: flex; gap: 6px; padding: 8px 22px; max-width: 1500px; margin: 0 auto;
  overflow-x: auto; scrollbar-width: none;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 10px 18px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); cursor: pointer; font: inherit; font-weight: 600;
  box-shadow: var(--shadow); transition: all .2s; position: relative;
}
.tab:hover { border-color: var(--primary); }
.tab .ti { font-size: 1.15rem; }
.tab.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: var(--on-primary);
  border-color: transparent; box-shadow: 0 6px 18px rgba(79, 70, 229, .35);
}
.tab .badge { position: static; margin-inline-start: 2px; }
.badge {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--danger); color: #fff;
  font-size: .72rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
}

main { max-width: 1500px; margin: 0 auto; padding: 10px 22px 60px; }
.view { display: none; animation: fadeIn .25s ease; }
.view.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- generic UI ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px;
}
.card h3 { margin: 0 0 12px; font-size: 1.08rem; display: flex; align-items: center; gap: 8px; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar h2 { margin: 0; font-size: 1.35rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: 11px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer;
  transition: all .15s; white-space: nowrap; text-decoration: none;
}
.btn:hover { background: var(--surface-2); border-color: var(--primary); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; border-color: transparent; box-shadow: 0 4px 14px rgba(79, 70, 229, .3); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { color: var(--danger); }
.btn.danger.solid { background: var(--danger); color: #fff; border-color: transparent; }
.btn.sm { padding: 6px 11px; font-size: .88rem; border-radius: 9px; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-3); }
.btn.active { background: var(--primary-soft); color: var(--primary); border-color: var(--primary); }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; color: var(--text); padding: 7px 13px; border-radius: 9px; font: inherit; font-weight: 600; cursor: pointer; }
.seg button.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow); }

input, select, textarea {
  font: inherit; color: var(--text); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; width: 100%;
  transition: border .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--primary); }
input[type="color"] { padding: 2px; height: 38px; width: 52px; }
textarea { resize: vertical; min-height: 70px; }
label.field { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: .9rem; }
label.field > span { color: var(--muted); }
label.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 500; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.search {
  position: relative; min-width: 220px;
}
.search input { padding-inline-start: 36px; border-radius: 999px; background: var(--surface); }
.search::before { content: "🔍"; position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); font-size: .9rem; opacity: .6; }
.empty { text-align: center; color: var(--muted); padding: 40px 10px; }
.empty .big { font-size: 3rem; display: block; margin-bottom: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px;
  background: var(--surface-3); color: var(--text); font-size: .8rem; font-weight: 500; border: 0; cursor: default;
}
button.chip { cursor: pointer; font: inherit; font-size: .8rem; }
.chip.active { background: var(--primary); color: #fff; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--border); cursor: pointer; }
.swatch.active { outline: 3px solid var(--primary); outline-offset: 2px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.spinner { width: 22px; height: 22px; border: 3px solid var(--surface-3); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 30px; color: var(--muted); }
@keyframes spin { to { transform: rotate(360deg); } }
.error-box { background: rgba(225, 29, 72, .08); color: var(--danger); border: 1px solid rgba(225, 29, 72, .25); border-radius: 10px; padding: 10px 14px; }
.info-box { background: var(--primary-soft); border-radius: 10px; padding: 10px 14px; font-size: .9rem; }

/* ---------- dropdown menu ---------- */
.dropdown {
  position: fixed; z-index: 400; min-width: 230px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px;
  animation: fadeIn .15s ease;
}
.dropdown button, .dropdown a {
  display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 12px; border: 0; background: none;
  color: var(--text); font: inherit; text-align: start; cursor: pointer; border-radius: 9px; text-decoration: none;
}
.dropdown button:hover, .dropdown a:hover { background: var(--surface-2); }
.dropdown hr { border: 0; border-top: 1px solid var(--border); margin: 5px 0; }
.dropdown .mi { width: 22px; text-align: center; }

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 500; background: rgba(10, 15, 30, .5); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 16px; animation: fadeIn .15s;
}
.modal {
  background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-lg); width: 560px; max-width: 100%;
  max-height: calc(100vh - 32px); display: flex; flex-direction: column; border: 1px solid var(--border);
}
.modal.wide { width: 860px; }
.modal.xwide { width: 1100px; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; font-size: 1.15rem; flex: 1; }
.modal-body { padding: 18px 20px; overflow: auto; display: flex; flex-direction: column; gap: 12px; }
.modal-foot { display: flex; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.modal-foot .spacer { flex: 1; }

/* ---------- toasts ---------- */
#toasts { position: fixed; bottom: 18px; left: 18px; z-index: 900; display: flex; flex-direction: column; gap: 8px; max-width: min(380px, calc(100vw - 36px)); }
.toast {
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-inline-start: 5px solid var(--primary);
  border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow-lg); display: flex; gap: 10px; align-items: flex-start;
  animation: fadeIn .2s;
}
.toast.success { border-inline-start-color: var(--success); }
.toast.error { border-inline-start-color: var(--danger); }
.toast.reminder { border-inline-start-color: var(--warning); }
.toast b { display: block; }
.toast .x { margin-inline-start: auto; cursor: pointer; opacity: .6; background: none; border: 0; color: inherit; font-size: 1rem; }

/* ---------- lock screen ---------- */
#lockScreen { position: fixed; inset: 0; z-index: 1000; background: var(--bg-grad), var(--bg); display: flex; align-items: center; justify-content: center; padding: 20px; }
#lockScreen .card { width: 380px; max-width: 100%; text-align: center; padding: 30px; }
#lockScreen img { width: 90px; height: 90px; border-radius: 22px; }

/* ====================================================== CALENDAR */
.cal-layout { display: grid; grid-template-columns: 270px 1fr; gap: 18px; }
.cal-side { display: flex; flex-direction: column; gap: 14px; }
.mini-cal table { width: 100%; border-collapse: collapse; text-align: center; font-size: .82rem; }
.mini-cal th { color: var(--muted); font-weight: 500; padding: 3px 0; }
.mini-cal td { padding: 1px; }
.mini-cal td button { width: 30px; height: 30px; border-radius: 50%; border: 0; background: none; color: var(--text); cursor: pointer; font: inherit; position: relative; }
.mini-cal td button:hover { background: var(--surface-3); }
.mini-cal td button.other { color: var(--muted); opacity: .5; }
.mini-cal td button.today { background: var(--primary); color: #fff; font-weight: 700; }
.mini-cal td button.sel:not(.today) { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.mini-cal td button.has::after { content: ""; position: absolute; bottom: 3px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--primary-2); }
.mini-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; font-weight: 700; }
.cal-list-item { display: flex; align-items: center; gap: 8px; padding: 5px 4px; border-radius: 8px; }
.cal-list-item:hover { background: var(--surface-2); }
.cal-list-item .grow { cursor: pointer; }
.upcoming-item { display: flex; gap: 10px; padding: 8px; border-radius: 10px; cursor: pointer; align-items: flex-start; }
.upcoming-item:hover { background: var(--surface-2); }
.upcoming-item .when { font-size: .78rem; color: var(--muted); }
.upcoming-item .bar { width: 4px; align-self: stretch; border-radius: 4px; flex: none; }

.cal-main { min-width: 0; }
.cal-title { font-size: 1.35rem; font-weight: 800; margin: 0 6px; min-width: 180px; }
.month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--border); gap: 1px; }
.month-grid .dow { background: var(--surface-2); text-align: center; padding: 8px 2px; font-weight: 700; font-size: .85rem; color: var(--muted); }
.month-cell { background: var(--surface); min-height: 118px; padding: 4px 5px 6px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; min-width: 0; transition: background .15s; }
.month-cell:hover { background: var(--surface-2); }
.month-cell.other { background: var(--surface-2); }
.month-cell.other .dnum { opacity: .45; }
.month-cell.weekend { background: color-mix(in srgb, var(--surface) 92%, var(--primary) 8%); }
.month-cell.drop { outline: 2px dashed var(--primary); outline-offset: -3px; }
.month-cell .dhead { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.month-cell .dnum { font-weight: 700; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-size: .92rem; }
.month-cell.today .dnum { background: var(--primary); color: #fff; }
.month-cell .hdate { font-size: .68rem; color: var(--muted); }
.month-cell .holiday { font-size: .7rem; color: var(--success); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-pill {
  font-size: .76rem; padding: 2px 6px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: #fff; font-weight: 600; cursor: pointer; line-height: 1.45;
}
.ev-pill.timed { background: transparent !important; color: var(--text); font-weight: 500; display: flex; gap: 4px; align-items: center; }
.ev-pill.timed::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.ev-pill.timed .t { color: var(--muted); font-variant-numeric: tabular-nums; }
.more-link { font-size: .74rem; color: var(--primary); font-weight: 700; padding: 0 4px; }

.tgrid-wrap { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.tgrid-head { display: grid; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.tgrid-head .hc { text-align: center; padding: 8px 2px; font-weight: 600; font-size: .85rem; border-inline-start: 1px solid var(--border); cursor: pointer; }
.tgrid-head .hc .n { font-size: 1.35rem; font-weight: 800; display: block; line-height: 1.2; }
.tgrid-head .hc.today .n { color: var(--primary); }
.tgrid-allday { display: grid; border-bottom: 1px solid var(--border); min-height: 28px; }
.tgrid-allday > div { border-inline-start: 1px solid var(--border); padding: 2px; display: flex; flex-direction: column; gap: 2px; }
.tgrid-scroll { max-height: 640px; overflow-y: auto; position: relative; scrollbar-gutter: stable; }
.tgrid-head, .tgrid-allday { overflow-y: hidden; scrollbar-gutter: stable; }
.tgrid { display: grid; position: relative; }
.tgrid .hours { display: flex; flex-direction: column; }
.tgrid .hour-label { height: 48px; font-size: .72rem; color: var(--muted); text-align: center; transform: translateY(-7px); }
.tgrid .daycol { position: relative; border-inline-start: 1px solid var(--border); }
.tgrid .slot { height: 48px; border-bottom: 1px solid var(--border); }
.tgrid .slot:nth-child(odd) { border-bottom-style: dashed; border-bottom-color: color-mix(in srgb, var(--border) 60%, transparent); }
.tgrid .slot:hover { background: var(--primary-soft); }
.tgrid .tev {
  position: absolute; border-radius: 8px; padding: 3px 6px; font-size: .76rem; color: #fff; overflow: hidden; cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .15); border: 1px solid rgba(255, 255, 255, .5); line-height: 1.3;
}
.tgrid .tev b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-line { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger); z-index: 3; pointer-events: none; }
.now-line::before { content: ""; position: absolute; right: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); }

.year-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.year-month { padding: 12px; }
.year-month h4 { margin: 0 0 6px; text-align: center; cursor: pointer; }
.year-month h4:hover { color: var(--primary); }

.agenda-day { display: grid; grid-template-columns: 110px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.agenda-day .ad { font-weight: 800; }
.agenda-day .ad small { display: block; color: var(--muted); font-weight: 500; }
.agenda-day.today .ad { color: var(--primary); }
.agenda-ev { display: flex; gap: 12px; align-items: center; padding: 7px 10px; border-radius: 10px; cursor: pointer; }
.agenda-ev:hover { background: var(--surface-2); }
.agenda-ev .t { width: 105px; flex: none; color: var(--muted); font-size: .88rem; font-variant-numeric: tabular-nums; }

.ev-detail .dt { font-size: 1.05rem; }
.ev-detail .line { display: flex; gap: 10px; align-items: flex-start; }
.ev-detail .line .i { width: 22px; text-align: center; flex: none; }
.dow-picker { display: flex; gap: 6px; flex-wrap: wrap; }
.dow-picker button { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); cursor: pointer; font: inherit; font-weight: 700; }
.dow-picker button.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.rem-list { display: flex; flex-wrap: wrap; gap: 6px; }

/* ====================================================== TODO (Keep) */
.keep-layout { display: grid; grid-template-columns: 220px 1fr; gap: 18px; }
.keep-nav { display: flex; flex-direction: column; gap: 2px; }
.keep-nav button {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px; border: 0; background: none; color: var(--text);
  font: inherit; font-weight: 600; border-radius: 0 999px 999px 0; cursor: pointer; text-align: start;
}
[dir="rtl"] .keep-nav button { border-radius: 999px 0 0 999px; }
.keep-nav button:hover { background: var(--surface-3); }
.keep-nav button.active { background: var(--primary-soft); color: var(--primary); }
.keep-nav .cnt { margin-inline-start: auto; font-size: .8rem; color: var(--muted); }
.keep-nav h5 { margin: 12px 16px 4px; color: var(--muted); font-size: .78rem; font-weight: 600; }
.quick-add {
  max-width: 620px; margin: 0 auto 22px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--shadow); padding: 4px 6px;
}
.quick-add input, .quick-add textarea { border: 0; background: transparent; box-shadow: none !important; }
.quick-add .qa-title { font-weight: 700; font-size: 1.02rem; }
.quick-add .qa-tools { display: flex; align-items: center; gap: 4px; padding: 4px; flex-wrap: wrap; }
.notes-section-title { font-size: .78rem; font-weight: 700; color: var(--muted); letter-spacing: .5px; margin: 6px 6px 8px; }
.notes-grid { columns: 260px; column-gap: 14px; }
.notes-grid.list { columns: 1; max-width: 680px; margin: 0 auto; }
.note {
  break-inside: avoid; margin-bottom: 14px; background: var(--note-bg, var(--surface)); border: 1px solid var(--border);
  border-radius: 14px; padding: 12px 14px 6px; cursor: pointer; position: relative; transition: box-shadow .2s, transform .15s;
  display: inline-block; width: 100%;
}
.note:hover { box-shadow: var(--shadow); }
.note .n-title { font-weight: 700; font-size: 1.02rem; margin-bottom: 4px; word-break: break-word; padding-inline-end: 26px; }
.note .n-text { white-space: pre-wrap; word-break: break-word; font-size: .95rem; max-height: 300px; overflow: hidden; }
.note .n-img { width: calc(100% + 28px); margin: -12px -14px 8px; border-radius: 14px 14px 0 0; display: block; max-height: 240px; object-fit: cover; }
.note .n-items { list-style: none; padding: 0; margin: 4px 0; }
.note .n-items li { display: flex; gap: 8px; align-items: flex-start; padding: 2px 0; font-size: .93rem; }
.note .n-items li.done span { text-decoration: line-through; color: var(--muted); }
.note .n-meta { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0 4px; }
.note .n-meta .chip { background: rgba(127, 127, 127, .16); }
.note .n-meta .chip.overdue { background: rgba(225, 29, 72, .15); color: var(--danger); }
.note .n-actions { display: flex; gap: 2px; opacity: 0; transition: opacity .2s; margin: 0 -8px; }
.note:hover .n-actions, .note:focus-within .n-actions { opacity: 1; }
.note .pin { position: absolute; top: 8px; inset-inline-end: 8px; opacity: 0; }
.note:hover .pin, .note .pin.on { opacity: 1; }
.note .progress { height: 5px; border-radius: 4px; background: rgba(127, 127, 127, .2); overflow: hidden; margin: 6px 0 2px; }
.note .progress i { display: block; height: 100%; background: var(--success); }
.note.done-note { opacity: .7; }
.prio-high { box-shadow: inset 4px 0 0 var(--danger); }
.prio-low { box-shadow: inset 4px 0 0 #94a3b8; }
[dir="rtl"] .prio-high { box-shadow: inset -4px 0 0 var(--danger); }
[dir="rtl"] .prio-low { box-shadow: inset -4px 0 0 #94a3b8; }
.check-edit { display: flex; flex-direction: column; gap: 4px; }
.check-edit .ci { display: flex; gap: 8px; align-items: center; }
.check-edit .ci input[type=text] { padding: 6px 8px; background: transparent; border-color: transparent; }
.check-edit .ci input[type=text]:focus { border-color: var(--border); }
.check-edit .ci.done input[type=text] { text-decoration: line-through; color: var(--muted); }
.check-edit .ci .drag { cursor: grab; opacity: .4; }

/* ====================================================== MAIL */
.mail-layout { display: grid; grid-template-columns: 230px minmax(320px, 430px) 1fr; gap: 14px; height: calc(100vh - 200px); min-height: 560px; }
.mail-layout > * { min-height: 0; }
.mail-folders { display: flex; flex-direction: column; gap: 6px; overflow: auto; }
.mail-folders .compose-btn { margin-bottom: 8px; padding: 14px; border-radius: 16px; font-size: 1rem; }
.folder-btn {
  display: flex; align-items: center; gap: 10px; padding: 8px 14px; border: 0; background: none; color: var(--text);
  font: inherit; border-radius: 999px; cursor: pointer; text-align: start; width: 100%;
}
.folder-btn:hover { background: var(--surface-3); }
.folder-btn.active { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.folder-btn .cnt { margin-inline-start: auto; font-size: .8rem; font-weight: 700; }
.mail-list { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.mail-list-head { display: flex; gap: 6px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.mail-items { overflow-y: auto; flex: 1; }
.mail-item { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 10px; padding: 10px 12px; border-bottom: 1px solid var(--border); cursor: pointer; align-items: center; }
.mail-item:hover { background: var(--surface-2); }
.mail-item.active { background: var(--primary-soft); }
.mail-item.unread { background: color-mix(in srgb, var(--surface) 85%, var(--primary) 15%); }
.mail-item.unread .from, .mail-item.unread .subj { font-weight: 800; }
.mail-item .from { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-item .date { font-size: .78rem; color: var(--muted); white-space: nowrap; }
.mail-item .subj { grid-column: 2 / 4; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.mail-item.unread .subj { color: var(--text); }
.mail-item .chk { grid-row: 1 / 3; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.mail-item .star { background: none; border: 0; cursor: pointer; font-size: 1rem; padding: 0; color: var(--muted); }
.mail-item .star.on { color: #f59e0b; }
.mail-read { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; overflow: hidden; }
.mail-read-head { padding: 14px 18px; border-bottom: 1px solid var(--border); }
.mail-read-head h2 { margin: 0 0 10px; font-size: 1.25rem; word-break: break-word; }
.mail-read-actions { display: flex; gap: 4px; flex-wrap: wrap; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.mail-from { display: flex; gap: 10px; align-items: center; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; flex: none; }
.mail-body { flex: 1; min-height: 0; overflow: auto; padding: 0; background: #fff; }
.mail-body iframe { width: 100%; border: 0; display: block; min-height: 100%; background: #fff; }
.mail-body pre { white-space: pre-wrap; word-break: break-word; font-family: inherit; padding: 16px; margin: 0; color: #222; }
.attach-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 18px; border-top: 1px solid var(--border); }
.attach { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 10px; padding: 6px 10px; background: var(--surface-2); color: var(--text); text-decoration: none; font-size: .86rem; }
.attach:hover { border-color: var(--primary); }
.mail-pager { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--border); font-size: .85rem; }
.compose .rcpt { position: relative; }
.suggest { position: absolute; top: 100%; inset-inline: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg); z-index: 10; max-height: 200px; overflow: auto; }
.suggest div { padding: 7px 12px; cursor: pointer; }
.suggest div:hover, .suggest div.sel { background: var(--surface-2); }
.rte-tools { display: flex; gap: 3px; flex-wrap: wrap; padding: 4px; background: var(--surface-2); border: 1px solid var(--border); border-bottom: 0; border-radius: 10px 10px 0 0; }
.rte-tools button { border: 0; background: none; color: var(--text); width: 32px; height: 30px; border-radius: 6px; cursor: pointer; font: inherit; }
.rte-tools button:hover { background: var(--surface-3); }
.rte { min-height: 240px; max-height: 50vh; overflow: auto; border: 1px solid var(--border); border-radius: 0 0 10px 10px; padding: 12px; background: var(--surface); outline: none; }
.rte:focus { border-color: var(--primary); }
.rte blockquote { border-inline-start: 3px solid var(--border); margin: 8px 0; padding-inline-start: 10px; color: var(--muted); }
.mail-setup { max-width: 760px; margin: 20px auto; }
.provider-btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* ====================================================== DASHBOARD */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; align-items: start; }
.widget { position: relative; }
.widget .w-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.widget .w-head h3 { margin: 0; flex: 1; }
.widget .w-tools { display: flex; gap: 2px; opacity: .35; transition: opacity .2s; }
.widget:hover .w-tools { opacity: 1; }
.widget.span2 { grid-column: span 2; }
.rate-row { display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 12px; background: var(--surface-2); margin-bottom: 7px; }
.rate-row .flag { font-size: 1.6rem; }
.rate-row .nm b { display: block; }
.rate-row .nm small { color: var(--muted); }
.rate-row .val { font-weight: 800; font-size: 1.15rem; font-variant-numeric: tabular-nums; direction: ltr; }
.chg { font-size: .78rem; font-weight: 700; direction: ltr; }
.chg.up { color: var(--success); }
.chg.down { color: var(--danger); }
.spark { width: 70px; height: 26px; }
.conv { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; margin-top: 10px; }
.conv-res { text-align: center; font-weight: 800; font-size: 1.2rem; color: var(--primary); margin-top: 8px; direction: ltr; }
.team-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.team-head img { width: 54px; height: 54px; object-fit: contain; }
.match { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; padding: 10px; border-radius: 12px; background: var(--surface-2); margin-bottom: 7px; }
.match .tm { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: .9rem; min-width: 0; }
.match .tm span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match .tm.away { flex-direction: row-reverse; text-align: left; }
.match .tm img { width: 26px; height: 26px; object-fit: contain; flex: none; }
.match .sc { font-weight: 800; font-size: 1.15rem; text-align: center; min-width: 64px; direction: ltr; }
.match .meta { grid-column: 1 / 4; text-align: center; font-size: .76rem; color: var(--muted); }
.match.next { background: linear-gradient(135deg, var(--primary-soft), var(--surface-2)); border: 1px solid var(--primary); }
.res-badge { width: 22px; height: 22px; border-radius: 6px; color: #fff; font-size: .72rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.res-W { background: var(--success); } .res-D { background: #94a3b8; } .res-L { background: var(--danger); }
.countdown { display: flex; gap: 8px; justify-content: center; direction: ltr; margin: 6px 0; }
.countdown div { background: var(--surface-2); border-radius: 10px; padding: 6px 10px; text-align: center; min-width: 58px; }
.countdown b { display: block; font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.countdown small { color: var(--muted); font-size: .7rem; }
.news-item { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--border); text-decoration: none; color: var(--text); }
.news-item:last-child { border-bottom: 0; }
.news-item:hover b { color: var(--primary); }
.news-item img { width: 64px; height: 48px; object-fit: cover; border-radius: 8px; flex: none; }
.news-item small { color: var(--muted); display: block; }
.world-clock { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.world-clock div { background: var(--surface-2); border-radius: 12px; padding: 10px; text-align: center; }
.world-clock b { font-size: 1.4rem; display: block; font-variant-numeric: tabular-nums; }

/* ====================================================== WEATHER */
.wx-cities { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.wx-hero {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; padding: 26px; border-radius: 22px; color: #fff;
  background: linear-gradient(135deg, #2563eb, #06b6d4); box-shadow: var(--shadow); margin-bottom: 16px; position: relative; overflow: hidden;
}
.wx-hero.night { background: linear-gradient(135deg, #1e1b4b, #312e81 60%, #0f172a); }
.wx-hero.rain { background: linear-gradient(135deg, #334155, #475569 60%, #0ea5e9); }
.wx-hero.cloud { background: linear-gradient(135deg, #64748b, #3b82f6); }
.wx-hero.sun { background: linear-gradient(135deg, #f59e0b, #f97316 45%, #3b82f6); }
.wx-hero .big { font-size: 5rem; font-weight: 800; line-height: 1; }
.wx-hero .ico { font-size: 5rem; line-height: 1; }
.wx-hero .place { font-size: 1.4rem; font-weight: 700; }
.wx-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.wx-stats div { background: rgba(255, 255, 255, .16); border-radius: 12px; padding: 9px; font-size: .82rem; }
.wx-stats b { display: block; font-size: 1.08rem; }
.wx-hourly { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; }
.wx-hour { flex: none; width: 66px; text-align: center; padding: 8px 4px; border-radius: 12px; background: var(--surface-2); font-size: .82rem; }
.wx-hour .e { font-size: 1.5rem; display: block; }
.wx-hour b { font-size: 1rem; }
.wx-hour .p { color: #0ea5e9; font-size: .74rem; }
.wx-days { display: flex; flex-direction: column; gap: 4px; }
.wx-day { display: grid; grid-template-columns: 90px 40px 1fr 140px; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 12px; cursor: pointer; }
.wx-day:hover { background: var(--surface-2); }
.wx-day .e { font-size: 1.6rem; text-align: center; }
.wx-range { position: relative; height: 8px; border-radius: 8px; background: var(--surface-3); direction: ltr; }
.wx-range i { position: absolute; top: 0; bottom: 0; border-radius: 8px; background: linear-gradient(90deg, #38bdf8, #fbbf24, #f97316); }
.wx-day .tt { display: flex; justify-content: space-between; direction: ltr; font-variant-numeric: tabular-nums; }
.wx-chart svg { width: 100%; height: 170px; display: block; }

/* ====================================================== LINKS */
.links-group { margin-bottom: 18px; }
.links-group-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.links-group-head h3 { margin: 0; flex: 1; }
.links-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.link-btn {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); cursor: pointer; font: inherit; font-weight: 600; text-align: start;
  box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; position: relative; min-height: 58px;
  border-inline-start: 5px solid var(--lc, var(--primary));
}
.link-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(20, 30, 60, .14); }
.link-btn .li { font-size: 1.5rem; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.link-btn .li img { width: 26px; height: 26px; border-radius: 6px; }
.link-btn .ln { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.link-btn.filled { background: var(--lc); color: #fff; border-color: transparent; }
.link-btn .ed { position: absolute; top: 4px; inset-inline-end: 4px; display: none; gap: 2px; }
.editing .link-btn .ed { display: flex; }
.editing .link-btn { cursor: grab; }
.link-btn.dragging { opacity: .4; }
.link-btn.drop-before { outline: 2px dashed var(--primary); }
.link-add { border-style: dashed; color: var(--muted); justify-content: center; box-shadow: none; border-inline-start-width: 1px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .mail-layout { grid-template-columns: 200px 1fr; height: auto; }
  .mail-layout .mail-read { grid-column: 1 / 3; min-height: 520px; }
  .year-grid { grid-template-columns: repeat(3, 1fr); }
  .widget.span2 { grid-column: auto; }
}
@media (max-width: 860px) {
  .topbar { padding: 12px 14px; }
  .brand .logo { width: 46px; height: 46px; border-radius: 12px; }
  .brand h1 { font-size: 1.3rem; }
  .brand .subtitle { font-size: .82rem; }
  .top-clock { display: none; }
  .tabs { padding: 8px 14px; }
  .tab { padding: 8px 13px; }
  main { padding: 8px 14px 50px; }
  .cal-layout, .keep-layout { grid-template-columns: 1fr; }
  .cal-side { display: none; }
  .cal-side.show { display: flex; }
  .keep-nav { flex-direction: row; overflow-x: auto; }
  .keep-nav h5 { display: none; }
  .keep-nav button { border-radius: 999px !important; white-space: nowrap; }
  .month-cell { min-height: 82px; }
  .ev-pill { font-size: .68rem; }
  .ev-pill.timed .t { display: none; }
  .year-grid { grid-template-columns: repeat(2, 1fr); }
  .mail-layout { grid-template-columns: 1fr; }
  .mail-layout .mail-read { grid-column: auto; }
  .mail-folders { flex-direction: row; overflow-x: auto; }
  .mail-folders .compose-btn { margin: 0; }
  .folder-btn { width: auto; white-space: nowrap; }
  .mail-layout.reading .mail-list, .mail-layout:not(.reading) .mail-read { display: none; }
  .mail-list { max-height: 70vh; }
  .wx-hero { grid-template-columns: 1fr; padding: 18px; }
  .wx-hero .big, .wx-hero .ico { font-size: 3.6rem; }
  .wx-day { grid-template-columns: 70px 34px 1fr; }
  .wx-day .wx-range { display: none; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
  .agenda-day { grid-template-columns: 1fr; gap: 4px; }
  .modal-backdrop { padding: 0; align-items: flex-end; }
  .modal { border-radius: 20px 20px 0 0; max-height: 92vh; }
  .links-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
@media print {
  .topbar .top-actions, .tabs, .toolbar, .cal-side, #toasts { display: none !important; }
  body { background: #fff; }
}
.flag-img { width: 34px; height: 24px; object-fit: cover; border-radius: 5px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .1); vertical-align: middle; }
label.check .flag-img { width: 22px; height: 15px; border-radius: 3px; }
.month-grid .dow .ds { display: none; }
@media (max-width: 860px) {
  .month-grid .dow .dl { display: none; }
  .month-grid .dow .ds { display: inline; }
  .month-cell .hdate { display: none; }
  .month-cell { padding: 2px; }
  .month-cell .dnum { width: 24px; height: 24px; font-size: .82rem; }
  .cal-title { min-width: 0; font-size: 1.15rem; }
}

/* ====================================================== SHOPPING & SHABBAT */
.shop-add { max-width: 820px; margin: 0 auto 14px; }
.shop-summary { max-width: 820px; margin: 0 auto 8px; }
.shop-groups { columns: 380px; column-gap: 14px; }
.shop-group { break-inside: avoid; margin-bottom: 14px; display: inline-block; width: 100%; padding: 14px 16px; }
.shop-group h3 { margin-bottom: 6px; }
.done-group { max-width: 820px; margin: 0 auto 14px; display: block; opacity: .85; }
.shop-row { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px dashed var(--border); }
.shop-row:last-child { border-bottom: 0; }
.shop-row .shop-chk { width: 22px; height: 22px; flex: none; cursor: pointer; }
.shop-row .shop-name { cursor: pointer; }
.shop-row.done .shop-name b { text-decoration: line-through; color: var(--muted); font-weight: 500; }
.qty { display: inline-flex; align-items: center; gap: 2px; background: var(--surface-2); border-radius: 999px; padding: 0 2px; font-weight: 700; font-size: .88rem; white-space: nowrap; }
.qty span { min-width: 26px; text-align: center; }
.qty .icon-btn { width: 28px; height: 28px; }
.sb-head { margin-bottom: 14px; }
.sb-meals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.sb-dish, .sb-task { display: flex; align-items: center; gap: 10px; padding: 7px 4px; border-bottom: 1px dashed var(--border); }
.sb-dish [data-dedit] { cursor: pointer; }
.sb-dish.done b, .sb-task.done span { text-decoration: line-through; color: var(--muted); }
.sb-dish input[type=checkbox], .sb-task input[type=checkbox] { width: 20px; height: 20px; flex: none; }
.sb-tasks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }

/* ====================================================== PHONES: bottom tab bar */
@media (max-width: 860px) {
  body { padding-bottom: calc(74px + env(safe-area-inset-bottom)); }
  .tabs {
    position: fixed; top: auto; bottom: 0; left: 0; right: 0; z-index: 300; max-width: none;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); gap: 2px; justify-content: space-between;
    background: color-mix(in srgb, var(--surface) 92%, transparent); border-top: 1px solid var(--border);
    box-shadow: 0 -6px 20px rgba(0, 0, 0, .08);
  }
  .tab {
    flex: 1 0 auto; min-width: 52px; flex-direction: column; gap: 1px; padding: 5px 4px; border-radius: 12px;
    font-size: .68rem; font-weight: 600; box-shadow: none; border: 0; background: transparent; position: relative;
  }
  .tab .ti { font-size: 1.35rem; }
  .tab.active { box-shadow: none; }
  .tab .badge { position: absolute; top: 0; inset-inline-start: 50%; margin: 0; height: 17px; min-width: 17px; font-size: .62rem; }
  #toasts { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .topbar { position: sticky; top: 0; z-index: 60; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
  .toolbar { gap: 6px; }
  .toolbar .search { min-width: 0; flex: 1 1 100%; }
  .toolbar h2 { font-size: 1.15rem; }
  .btn { padding: 9px 12px; }
  input, select, textarea { font-size: 16px; } /* stops iOS zooming into fields */
  .sb-meals, .sb-tasks { grid-template-columns: 1fr; }
  .shop-groups { columns: 1; }
  .mail-layout { min-height: 0; }
  .mail-read { min-height: 70vh; }
  .wx-stats { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .wx-stats div { padding: 7px; font-size: .74rem; }
  .links-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modal-foot .btn { flex: 1 1 auto; }
  .dropdown { max-width: calc(100vw - 16px); }
}
@media (max-width: 380px) {
  .brand .subtitle { display: none; }
  .tab { min-width: 46px; font-size: .62rem; }
}

/* ====================================================== USERS */
.user-chip { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px 0 6px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; box-shadow: var(--shadow); }
.user-chip .avatar { width: 30px; height: 30px; font-size: .9rem; }
.user-chip .un { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imp-banner { max-width: 1500px; margin: 0 auto 6px; padding: 8px 14px; border-radius: 12px; background: #fef3c7; color: #78350f; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .9rem; }
.adm-seg { flex-wrap: wrap; }
.users-list { display: flex; flex-direction: column; gap: 10px; }
.user-card { border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; background: var(--surface-2); }
.user-card.blocked { border-color: rgba(225, 29, 72, .4); background: rgba(225, 29, 72, .05); }
.user-card .user-actions { margin-top: 10px; gap: 6px; }
.chip.st-ok { background: rgba(5, 150, 105, .14); color: var(--success); }
.chip.st-bad { background: rgba(225, 29, 72, .14); color: var(--danger); }
.chip.st-warn { background: rgba(217, 119, 6, .16); color: var(--warning); }
.tab-pref { display: flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 10px; background: var(--surface-2); }
#lockScreen .col { gap: 10px; }
@media (max-width: 860px) {
  .user-chip { padding: 0 4px; height: 38px; }
  .user-chip .un { display: none; }
  .user-card .user-actions .btn { flex: 1 1 calc(50% - 6px); }
}

/* ====================================================== REGISTRATION */
#lockScreen { overflow-y: auto; }
#lockScreen .reg-card { width: 480px; text-align: start; }
#lockScreen .reg-card img, #lockScreen .reg-card h2 { display: block; margin-inline: auto; text-align: center; }
#lockScreen .reg-card > p { text-align: center; }
#lockScreen .reg-card .field { margin-bottom: 10px; }
.req { color: var(--danger); font-weight: 700; }
.link-btn-plain { display: block; width: 100%; margin-top: 12px; background: none; border: 0; color: var(--primary); font: inherit; font-weight: 700; cursor: pointer; padding: 6px; border-radius: 8px; }
.link-btn-plain:hover { background: var(--primary-soft); }
.reg-msg { display: block; min-height: 1.2em; font-size: .82rem; font-weight: 600; margin-top: 3px; }
.reg-msg.ok { color: var(--success); }
.reg-msg.bad { color: var(--danger); }
input.bad { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(225, 29, 72, .15); }
@media (max-height: 760px) { #lockScreen { align-items: flex-start; } }
.reg-settings { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; padding: 10px 14px; border-radius: 12px; background: var(--primary-soft); }
.user-card.pending { border-color: rgba(217, 119, 6, .5); background: rgba(217, 119, 6, .07); }
