/* Laguna CRM — the shell on top of the hub's looks (/css/hub.css holds the colours of every look).
   Phone first: a top bar and a bottom bar below 768px; a side menu from 768px. Every control 44px or more.
   Motion is light and sits in the no-preference query; prefers-reduced-motion stops it (hub.css section 9). */

.crm { --top-h: 56px; --tab-h: 64px; --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px); }
.crm .sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.inline-form { margin: 0; }

/* ── The logo: white on the dark bars, navy on light ones ──────────────────────── */
.crm .logo img { display: block; width: auto; height: 30px; }
.rail-brand .logo img { height: 28px; }
.crm .logo .logo-on-light { display: none; }
html[data-theme="light"] .crm .logo .logo-on-dark { display: none; }
html[data-theme="light"] .crm .logo .logo-on-light { display: block; }
.crm .brand { font-size: 17px; }
html[data-theme="jewel"] .crm .brand { font-size: 21px; }

/* ── Top bar (phones and tablets) ──────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: calc(var(--top-h) + var(--safe-t)); padding: var(--safe-t) 12px 0;
  background: var(--side); color: var(--side-ink); border-bottom: 1px solid var(--side-line);
  -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
}
.top-brand { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 44px; padding-inline-end: 4px; color: inherit; text-decoration: none; }
.top-brand:hover { color: inherit; }
.topbar .brand { color: var(--side-act-ink); }
html[data-theme="jewel"] .topbar .brand { color: #E9CF8F; }
.icon-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--side-ink); }
.icon-btn:hover, .icon-btn[aria-expanded="true"] { background: var(--side-card); color: var(--side-act-ink); }

/* ── The bell ──────────────────────────────────────────────────────────────────── */
.bell { position: static; display: flex; align-items: center; }
.bell-count { position: absolute; top: 4px; inset-inline-end: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--badge-bg); color: var(--badge-ink); font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--side); font-variant-numeric: tabular-nums; }
.bell-count.bump { animation: crmBump .4s ease-out; }
.bell-list {
  position: absolute; z-index: 30; top: calc(100% + 6px); inset-inline-end: 12px; width: min(380px, calc(100vw - 24px));
  max-height: min(70vh, 520px); overflow-y: auto; margin: 0; padding: 6px; list-style: none;
  border: 1px solid var(--line); border-radius: 16px; background: var(--card); color: var(--ink); box-shadow: 0 18px 40px rgba(4, 10, 20, .3);
}
.bell-list li + li { border-top: 1px solid var(--line); }
.bell-list a { display: flex; align-items: center; min-height: 48px; padding: 8px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.bell-list a:hover { background: var(--soft); color: var(--ink); }
.bell-list .unread a { font-weight: 700; }
html[data-theme="jewel"] .bell-list { background-image: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, 0) 160px); }

/* ── Bottom bar (below 768px) ──────────────────────────────────────────────────── */
.tabbar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 25;
  padding: 6px 6px calc(6px + var(--safe-b));
  background: var(--side); border-top: 1px solid var(--side-line);
  -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
}
html[data-theme="jewel"] .tabbar, html[data-theme="jewel"] .topbar { background: rgba(3, 12, 18, .78); }
.tabbar ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); max-width: 560px; margin: 0 auto; padding: 0; list-style: none; }
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 52px; padding: 2px 0; border-radius: 14px; color: var(--side-muted); font-size: 11.5px; font-weight: 700; line-height: 1.2; text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.tabbar .ico { display: flex; align-items: center; justify-content: center; width: 56px; height: 30px; border-radius: 999px; }
.tabbar a:hover { color: var(--side-act-ink); }
.tabbar a[aria-current="page"] { color: var(--side-act-ink); }
.tabbar a[aria-current="page"] .ico { background: var(--side-act-bg); color: var(--side-icon); }
.tabbar .lbl { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Side menu (768px and up) ──────────────────────────────────────────────────── */
.rail { display: none; }
.rail-brand { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 44px; padding: 0 4px; color: inherit; text-decoration: none; }
.rail-brand .brand { flex: 0 1 auto; min-width: 0; font-size: 17px; }
.rail-brand:hover { color: inherit; }
.rail .brand { color: var(--side-act-ink); }
html[data-theme="jewel"] .rail .brand { color: #E9CF8F; font-size: 20px; }
.rail nav { display: flex; flex-direction: column; gap: 4px; }
.rail-list { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.rail-list a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 12px; color: var(--side-ink); font-size: 14px; text-decoration: none; white-space: nowrap; }
.rail-list a:hover { background: var(--side-card); color: var(--side-act-ink); }
.rail-list a[aria-current="page"] { background: var(--side-act-bg); color: var(--side-act-ink); font-weight: 700; }
.rail-list a[aria-current="page"] .ico { color: var(--side-icon); }
.rail-head { margin: 18px 0 6px; padding: 14px 12px 0; border-top: 1px solid color-mix(in srgb, var(--side-muted) 30%, transparent); color: var(--side-muted); font-size: 12px; font-weight: 700; }

/* ── Content ───────────────────────────────────────────────────────────────────── */
.crm-main { display: block; min-width: 0; padding: 16px 16px calc(var(--tab-h) + var(--safe-b) + 28px); transition: filter .2s ease; }
.page-title { margin: 6px 0 16px; font-size: 24px; }
.crm-main .panel { padding: 16px; border-radius: 18px; }

@media (min-width: 768px) {
  .crm { --rail-w: 232px; }
  .shell { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); align-items: start; min-height: 100vh; }
  .rail {
    position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto;
    display: flex; flex-direction: column; gap: 24px; padding: 20px 14px calc(20px + var(--safe-b));
    background: var(--side); color: var(--side-ink); border-inline-end: 1px solid var(--side-line);
  }
  html[data-theme="jewel"] .rail { background: rgba(2, 8, 13, .55); }
  .tabbar { display: none; }
  .topbar { position: relative; z-index: 5; pointer-events: none; justify-content: flex-end; min-height: 64px; padding: 10px 24px 0; background: transparent; border: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
  html[data-theme="jewel"] .topbar { background: transparent; }
  .topbar .top-brand { display: none; }
  .topbar .icon-btn { color: var(--ink2); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
  .topbar .icon-btn:hover, .topbar .icon-btn[aria-expanded="true"] { color: var(--ink); background: var(--soft); }
  .bell { position: relative; pointer-events: auto; }
  .bell-list { inset-inline-end: 0; }
  .bell-count { box-shadow: 0 0 0 2px var(--card); }
  .crm-main { max-width: 980px; margin-top: -54px; padding: 8px 28px 48px; }
  .crm-main :is(.page-title, .hello) { margin-inline-end: 64px; }
  .page-title { font-size: 28px; }
  .crm-main .panel { padding: 20px 22px; }
}
@media (min-width: 1024px) { .crm { --rail-w: 248px; } .crm-main { padding-inline: 40px; } }

/* ── Empty states: an icon and one word ───────────────────────────────────────── */
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 42vh; padding: 32px 16px; color: var(--muted); text-align: center; }
.empty-ico { display: flex; align-items: center; justify-content: center; width: 88px; height: 88px; border-radius: 28px; background: var(--soft); color: var(--accent); border: 1px solid var(--line); }
.empty-label { font-size: 15px; font-weight: 700; color: var(--ink2); }
.empty .btn { margin-top: 4px; min-width: 140px; }
html[data-theme="jewel"] .empty-ico { background: radial-gradient(circle at 50% 0%, rgba(45, 212, 191, .16), transparent 70%), var(--card); }

/* ── Today ─────────────────────────────────────────────────────────────────────── */
.hello { margin: 10px 0 18px; font-size: 32px; font-weight: 800; letter-spacing: -.2px; }
.feed { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.feed a {
  display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  min-height: 60px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); color: var(--ink2); text-decoration: none; box-shadow: var(--shadow);
}
html[data-theme="jewel"] .feed a { background-image: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, 0) 80px); }
.feed a:hover { color: var(--ink); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.feed-dot { width: 8px; height: 8px; border-radius: 999px; background: transparent; }
.feed .unread a { color: var(--ink); font-weight: 700; }
.feed .unread .feed-dot { background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent); }
.feed-text { min-width: 0; line-height: 1.55; }
.feed time { font-size: 12px; font-weight: 400; color: var(--muted); white-space: nowrap; }

/* ── More: grouped rows ────────────────────────────────────────────────────────── */
.more { display: grid; gap: 22px; max-width: 640px; }
.more > .page-title { margin-bottom: -6px; }
.group-head { margin: 0 0 8px; padding: 0 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.group-card { border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
html[data-theme="jewel"] .group-card { background-image: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, 0) 160px); }
.row {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 6px 16px;
  border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 15px; text-align: start; text-decoration: none;
}
a.row:hover, button.row:hover { background: var(--soft); color: var(--ink); }
.group-card > * + * { border-top: 1px solid var(--line); }
.group-card > .inline-form + .inline-form, .group-card > * + .inline-form { border-top: 1px solid var(--line); }
.row-ico { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px; background: var(--soft); color: var(--accent); }
.row-ico svg { width: 20px; height: 20px; }
.row-lbl { display: flex; flex: 1 1 auto; flex-direction: column; align-items: flex-start; min-width: 0; line-height: 1.35; }
.row-end { display: flex; align-items: center; flex: 0 0 auto; margin-inline-start: auto; color: var(--muted); }
.row-val { font-size: 14px; font-weight: 700; color: var(--ink2); }
html[dir="rtl"] .chev svg { transform: scaleX(-1); }
.row.static { cursor: default; }
.row.danger, .row.danger .row-ico { color: var(--bad); }
.row.danger .row-ico { background: var(--bad-bg); }
.who-name { font-weight: 700; }
.who-mail { max-width: 100%; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.avatar { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 999px; background: var(--btn); color: var(--btn-ink); font-weight: 800; }
/* the sound switch: on = muted (the button's aria-pressed) */
.switch { position: relative; width: 46px; height: 28px; border-radius: 999px; background: var(--axis); transition: background-color .2s ease; }
.switch::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 999px; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .2s cubic-bezier(.2, .8, .2, 1); }
[aria-pressed="true"] > .switch { background: var(--accent); }
html[dir="ltr"] [aria-pressed="true"] > .switch::after { transform: translateX(18px); }
html[dir="rtl"] [aria-pressed="true"] > .switch::after { transform: translateX(-18px); }
.bell-x { display: none; }
[aria-pressed="true"] .bell-x { display: inline; }
[aria-pressed="true"] .bell-wave { display: none; }

/* the look picker: a swatch and a name per look */
.theme-pick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0 12px 14px; border: 0 !important; }
.theme-pick button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 76px; padding: 10px 4px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--soft); color: var(--ink2); font-size: 13px; font-weight: 700;
}
.theme-pick button:hover { color: var(--ink); border-color: var(--axis); }
.theme-pick button[aria-pressed="true"] { color: var(--ink); border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.theme-pick .sw { width: 28px; height: 28px; }

/* ── Admin pages ───────────────────────────────────────────────────────────────── */
.filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: end; }
.filters label { display: grid; gap: 6px; min-width: 0; font-size: 13px; font-weight: 700; color: var(--ink2); }
.filters .btn { grid-column: 1 / -1; }
.crm-main :is(.filters, .lv) :is(input:not([type=hidden]), select) {
  width: 100%; min-width: 0; min-height: 44px; padding: 9px 12px; border: 1px solid var(--axis); border-radius: 12px; background: var(--soft); color: var(--ink);
}
@media (min-width: 1100px) {
  .filters { grid-template-columns: repeat(4, minmax(0, 1fr)) auto; }
  .filters .btn { grid-column: auto; }
}
.table-panel { padding: 8px !important; }
.table-panel .tbl table { min-width: 720px; }
.table-panel > p { margin: 10px 8px 6px; }
.audit-row td { font-size: 12.5px; }

/* settings lists (was inline on the page) */
.lv { display: grid; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); }
.lv form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.lv .btn { min-height: 44px; }
.crm-main .lv input[name=label_ar], .crm-main .lv input[name=label_en] { flex: 1 1 130px; width: auto; }
.crm-main .lv input[name=sort] { flex: 0 0 84px; width: 84px; }
.crm-main .lv input[name=key] { flex: 1 1 120px; width: auto; }
.lv .k { flex: 1 0 100%; min-height: 28px; display: inline-flex; align-items: center; font-weight: 700; color: var(--ink); }
.lv.off { opacity: .6; }
@media (min-width: 768px) { .lv .k { flex: 0 0 150px; min-height: 44px; } }

/* ── Users and Roles ───────────────────────────────────────────────────────────── */
.page-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.page-bar .page-title { margin-bottom: 16px; }
.page-bar .btn { flex: 0 0 auto; margin-bottom: 10px; }
@media (min-width: 768px) { .crm-main .page-bar { margin-inline-end: 64px; } .crm-main .page-bar .page-title { margin-inline-end: 0; } }
.filters-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1100px) { .filters-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) auto; } }
.ulist { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ucard {
  display: flex; align-items: flex-start; gap: 12px; min-height: 64px; padding: 14px 14px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--card); color: var(--ink); text-decoration: none; box-shadow: var(--shadow);
}
html[data-theme="jewel"] .ucard { background-image: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, 0) 80px); }
.ucard:hover { color: var(--ink); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.ucard.off { opacity: .72; }
.ucard .avatar { margin-top: 2px; }
.ucard .chev { align-self: center; }
.ucard-main { display: flex; flex: 1 1 auto; flex-direction: column; gap: 3px; min-width: 0; }
.ucard-name { font-weight: 700; line-height: 1.35; }
.ucard-mail { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; color: var(--muted); text-align: start; }
html[dir="rtl"] .ucard-mail { text-align: end; align-self: flex-start; }
.ucard-meta { font-size: 13px; color: var(--ink2); }
.ucard .chips { margin-top: 6px; }
.back-link { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding-inline-end: 8px; color: var(--info); font-weight: 700; text-decoration: none; }
.back-link .chev { display: flex; }
html[dir="rtl"] .back-chev svg { transform: none; }
html[dir="ltr"] .back-chev svg { transform: scaleX(-1); }
.crm-main .page-title + .panel, .crm-main .form-err + .panel, .crm-main .form-ok + .panel { margin-top: 0; }
.form-err, .form-ok { margin: 0 0 12px; font-weight: 700; }
.crm-main .narrow { max-width: 640px; }
.crm-main .panel h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.plain-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.plain-fieldset[disabled] :is(input, select) { opacity: .7; }
.btn-row > form { flex: 1 1 200px; }
.btn-row .btn { width: 100%; }
.consent-form { margin-top: 12px; }
.consent-form .err:empty { display: none; }
.crm-main .stack input[type=file] { padding: 8px; font-size: 14px; }
.crm-main .stack input[type=file]::file-selector-button { min-height: 32px; margin-inline-end: 10px; padding: 0 12px; border: 1px solid var(--axis); border-radius: 8px; background: var(--card); color: var(--ink); font: inherit; }
.temp-panel { display: grid; gap: 14px; justify-items: start; }
.temp-who { margin: 0; font-weight: 700; }
.muted-inline { color: var(--muted); font-weight: 400; }
.temp-pw { display: block; width: 100%; padding: 14px 16px; border-radius: 14px; font-size: 22px; letter-spacing: 1.5px; text-align: center; word-break: break-all; user-select: all; -webkit-user-select: all; }
.out-card.pw-form h1 { margin: 0 0 4px; }
.role-end { gap: 8px; }
.role-end .chip svg { width: 14px; height: 14px; }
.role-form .group-head { margin-top: 4px; }
.grant-groups { display: grid; gap: 18px; margin-bottom: 18px; }
@media (min-width: 768px) { .grant-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
.grant-group { min-width: 0; margin: 0; padding: 0; border: 0; }
.grant-group legend { float: inline-start; width: 100%; padding: 0 6px; }
.grant-group .group-card { clear: both; }
.grant-group.sensitive legend { color: var(--warn); }
.grant-group.sensitive .group-card { border-color: color-mix(in srgb, var(--warn) 55%, var(--line)); }
.grant { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 4px 16px; color: var(--ink); font-size: 15px; cursor: pointer; }
.grant:hover { background: var(--soft); }
.grant.fixed { cursor: default; color: var(--muted); }
.grant.fixed:hover { background: transparent; }
.grant input { flex: 0 0 auto; width: 22px; height: 22px; margin: 0; accent-color: var(--accent); }
.form-actions { margin: 0 0 16px; }
.form-actions .btn { min-width: 160px; }

/* ── The language switch (EN / العربية): sign-in top bar, More, side menu ─────── */
.lang-switch { display: inline-flex; flex: 0 0 auto; gap: 2px; margin: 0; padding: 2px; border: 1px solid var(--axis); border-radius: 999px; }
.lang-switch button {
  min-width: 48px; min-height: 44px; padding: 0 14px; border: 0; border-radius: 999px;
  background: transparent; color: var(--ink2); font: inherit; font-size: 14px; font-weight: 700; line-height: 1; cursor: pointer;
}
.lang-switch button[lang="ar"] { font-family: 'Almarai', Tahoma, sans-serif; }
.lang-switch button[lang="en"] { font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; }
.lang-switch button:hover { color: var(--ink); }
.lang-switch button[aria-pressed="true"] { background: var(--btn); color: var(--btn-ink); cursor: default; }
.lang-row .row-end { color: inherit; }
.rail .lang-switch { margin-top: auto; align-self: flex-start; border-color: var(--side-line); }
.rail .lang-switch button { color: var(--side-ink); }
.rail .lang-switch button:hover { color: var(--side-act-ink); }
.rail .lang-switch button[aria-pressed="true"] { background: var(--side-act-bg); color: var(--side-act-ink); }

/* ── Sensitive pages: the watermark and the blur when the page is left ────────── */
.wm { position: fixed; inset: 0; z-index: 15; overflow: hidden; pointer-events: none; user-select: none; -webkit-user-select: none; }
.wm-grid {
  position: absolute; inset-block-start: -50%; inset-inline-start: -50%; width: 200%; height: 200%;
  display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 72px 56px;
  transform: rotate(-24deg); opacity: .07; color: var(--ink); font-size: 14px; font-weight: 700; white-space: nowrap;
}
@media (min-width: 768px) { .wm { inset-inline-start: var(--rail-w); } }
html[data-away] .crm-main { filter: blur(18px); }

/* ── Signed out (sign-in, two-step) ────────────────────────────────────────────── */
.out-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(10px + var(--safe-t)) 16px 10px; }
.out-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
html:is([data-theme="navy"], [data-theme="light"], [data-theme="warm"]) .out .logo .logo-on-dark { display: none; }
html:is([data-theme="navy"], [data-theme="light"], [data-theme="warm"]) .out .logo .logo-on-light { display: block; }
html:is([data-theme="navy"], [data-theme="light"], [data-theme="warm"]) .out .brand { color: var(--ink); }
.out-main { padding: 8px 16px 48px; }
.out-card { max-width: 440px; margin: 6vh auto 0; padding: 24px 22px; border-radius: 20px; }
.out-card h1 { margin-top: 0; }
.out-card .btn { width: 100%; }
.out-card form + form { margin-top: 10px; }

/* ── Motion ────────────────────────────────────────────────────────────────────── */
@keyframes crmBump { 0% { transform: scale(1); } 40% { transform: scale(1.3); } 100% { transform: scale(1); } }
@keyframes crmIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes crmPill { from { transform: scaleX(.4); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: no-preference) {
  .hello, .page-title, .feed > li, .group, .empty { animation: crmIn .45s cubic-bezier(.2, .7, .2, 1) both; }
  .feed > li:nth-child(2), .group:nth-of-type(2) { animation-delay: .04s; }
  .feed > li:nth-child(3), .group:nth-of-type(3) { animation-delay: .08s; }
  .feed > li:nth-child(n+4), .group:nth-of-type(n+4) { animation-delay: .12s; }
  .tabbar a[aria-current="page"] .ico { animation: crmPill .3s cubic-bezier(.2, .8, .2, 1) both; }
  .bell-list:not([hidden]) { animation: lhPop .18s cubic-bezier(.2, .8, .2, 1) both; }
  .tabbar a, .rail-list a, .row, .icon-btn, .feed a, .theme-pick button, .lang-switch button { transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .15s ease; }
  .tabbar a:active .ico, .row:active, .feed a:active, .theme-pick button:active, .icon-btn:active { transform: scale(.97); }
}
