/* ==========================================================================
   Blackkey, Apple design layer.
   Loads last on every page. It changes how the site looks, never what it does:
   tokens first, then the shared primitives, then the few page-specific layouts.
   Light: #F5F5F7 ground, white surfaces, #1D1D1F label. Dark: true black ground,
   #1C1C1E surfaces, #F5F5F7 label. Black & Silver; colour only in content and signals.
   ========================================================================== */

/* ---------- tokens: dark ---------- */
:root {
  color-scheme: dark;
  --ground: #000000;
  --panel: #1c1c1e;
  --panel-2: #2c2c2e;
  --raised: #2c2c2e;
  --line: rgba(84, 84, 88, .55);
  --line-2: rgba(120, 120, 128, .45);
  --field: #1c1c1e;
  --field-focus: #1c1c1e;
  --scrim: rgba(0, 0, 0, .55);

  --ink: #f5f5f7;
  --ink-2: #c7c7cc;
  --ink-3: #98989d;

  --rail: #1c1c1e;
  --rail-2: #2c2c2e;
  --rail-line: rgba(84, 84, 88, .55);
  --rail-ink: #f5f5f7;
  --rail-ink-2: #98989d;
  --rail-tile: #2c2c2e;
  --rail-strong: #ffffff;
  --rail-hover: rgba(255, 255, 255, .06);

  --gold: #e5e5ea; --gold-hi: #ffffff; --gold-text: #e5e5ea; --gold-ink: #000000; --brass: #c7c7cc;
  --accent: #f5f5f7; --accent-hi: #ffffff; --accent-ink: #000000; --accent-text: #f5f5f7;
  --accent-ring: rgba(245, 245, 247, .32); --accent-glow: rgba(0, 0, 0, .5);
  --cobalt: #98989d; --cobalt-hi: #c7c7cc; --cobalt-deep: #3a3a3c;

  --teal: #30d158; --teal-text: #30d158;
  --terra: #ff453a; --terra-text: #ff6961;
  --good: #30d158; --bad: #ff453a;

  --shadow: 0 0 0 1px rgba(255, 255, 255, .02);
  --shadow-pop: 0 0 0 1px rgba(255, 255, 255, .06), 0 20px 40px -12px rgba(0, 0, 0, .7);

  --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-xl: 22px;
  --ease: cubic-bezier(.32, .72, 0, 1);
  --t-fast: 160ms; --t: 280ms; --t-slow: 560ms;

  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Helvetica Neue', 'Noto Sans Georgian', 'Segoe UI', system-ui, sans-serif;
  --glass: rgba(28, 28, 30, .72);
  --glass-line: rgba(255, 255, 255, .08);
  --fill: rgba(120, 120, 128, .24);      /* Apple tertiary fill: quiet buttons, chips */
  --fill-2: rgba(120, 120, 128, .32);
  --focus: 0 0 0 3px rgba(245, 245, 247, .55);
}

/* ---------- tokens: light ---------- */
:root[data-theme='light'] {
  color-scheme: light;
  --ground: #f5f5f7;
  --panel: #ffffff;
  --panel-2: #f5f5f7;
  --raised: #e8e8ed;
  --line: rgba(60, 60, 67, .14);
  --line-2: rgba(60, 60, 67, .22);
  --field: #ffffff;
  --field-focus: #ffffff;
  --scrim: rgba(0, 0, 0, .32);

  --ink: #1d1d1f;
  --ink-2: #424245;
  --ink-3: #6e6e73;

  --rail: #f5f5f7;
  --rail-2: #e8e8ed;
  --rail-line: rgba(60, 60, 67, .12);
  --rail-ink: #1d1d1f;
  --rail-ink-2: #6e6e73;
  --rail-tile: #ffffff;
  --rail-strong: #1d1d1f;
  --rail-hover: rgba(0, 0, 0, .045);

  --gold: #1d1d1f; --gold-hi: #000000; --gold-text: #1d1d1f; --gold-ink: #ffffff; --brass: #1d1d1f;
  --accent: #1d1d1f; --accent-hi: #000000; --accent-ink: #ffffff; --accent-text: #1d1d1f;
  --accent-ring: rgba(29, 29, 31, .2); --accent-glow: rgba(0, 0, 0, .18);

  --teal: #1e7a34; --teal-text: #1e7a34;
  --terra: #d70015; --terra-text: #d70015;
  --good: #1e7a34; --bad: #d70015;

  --shadow: 0 1px 2px rgba(0, 0, 0, .04);
  --shadow-pop: 0 0 0 1px rgba(0, 0, 0, .05), 0 20px 40px -14px rgba(0, 0, 0, .22);

  --glass: rgba(255, 255, 255, .74);
  --glass-line: rgba(0, 0, 0, .08);
  --fill: rgba(118, 118, 128, .12);
  --fill-2: rgba(118, 118, 128, .2);
  --focus: 0 0 0 3px rgba(29, 29, 31, .35);
}
/* the sidebar key keeps its silver on both appearances */
:root[data-theme='light'] .rail { --brass: #1d1d1f; --gold: #1d1d1f; --gold-text: #1d1d1f; --accent-text: #1d1d1f; }
:root[data-theme='light'] .rail .mark i { background: #1d1d1f; }
:root[data-theme='light'] .rail .mark i:nth-child(9), :root[data-theme='light'] .rail .mark i:nth-child(10) { background: #8e8e93; }
:root[data-theme='light'] .rail .mark i:nth-child(15) { background: #48484a; }

/* the admin area: the same quiet shell; only the "Admin" label and the band carry red */
body[data-area='admin'] {
  --rail: var(--panel); --rail-2: var(--raised); --rail-line: var(--line); --rail-ink: var(--ink); --rail-ink-2: var(--ink-3); --rail-tile: var(--panel-2);
  --accent: #f5f5f7; --accent-hi: #ffffff; --accent-ink: #000; --accent-text: #f5f5f7; --accent-ring: rgba(245, 245, 247, .3);
  --band-b: #1c1c1e; --band-line: var(--line); --band-ink: var(--ink); --band-ink-2: var(--ink-3);
}
:root[data-theme='light'] body[data-area='admin'] {
  --rail: #f5f5f7; --rail-2: #e8e8ed; --rail-line: rgba(60, 60, 67, .12); --rail-ink: #1d1d1f; --rail-ink-2: #6e6e73; --rail-tile: #fff;
  --accent: #1d1d1f; --accent-hi: #000; --accent-ink: #fff; --accent-text: #1d1d1f; --accent-ring: rgba(29, 29, 31, .2);
  --band-b: #ffffff; --band-ink: #1d1d1f; --band-ink-2: #6e6e73;
}
body[data-area='admin'] .rail-brand small, body[data-area='admin'] .wm-admin { color: var(--bad) !important; }
body[data-area='admin'] .admin-band .icon, body[data-area='admin'] .admin-band strong { color: var(--bad); }
body[data-area='admin'] .topbar { box-shadow: none; }

/* ---------- base ---------- */
html, body { font-family: var(--font); }
body { font-size: 15px; line-height: 1.47; letter-spacing: -0.01em; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
html:lang(ka) body { letter-spacing: 0; }
:root[data-theme='light'] body, :root[data-theme='light'] body[data-area] { background: var(--ground); }
h1, h2, h3 { font-weight: 700; letter-spacing: -0.022em; }
html:lang(ka) h1, html:lang(ka) h2, html:lang(ka) h3 { letter-spacing: 0; }
::selection { background: rgba(0, 113, 227, .22); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-sm); }
a:focus-visible, button:focus-visible { outline: none; box-shadow: var(--focus); }
.icon { stroke-width: 1.7; }
::-webkit-scrollbar-thumb { background: var(--fill-2); }
* { scrollbar-color: var(--fill-2) transparent; }

/* ---------- buttons: capsules, filled for the one main action, gray fill for the rest ---------- */
.btn { height: 44px; padding: 0 20px; border-radius: 999px; font-weight: 600; font-size: 15px; letter-spacing: -0.01em; gap: 8px; box-shadow: none; transition: background var(--t-fast) ease, color var(--t-fast), opacity var(--t-fast), transform var(--t-fast) var(--ease); }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.btn-primary:hover:not(:disabled) { background: var(--accent-hi); box-shadow: none; opacity: .88; }
.btn-ghost { background: var(--fill); color: var(--ink); border-color: transparent; }
.btn-ghost:hover:not(:disabled) { background: var(--fill-2); color: var(--ink); }
.btn-quiet { color: var(--ink-2); }
.btn-quiet:hover:not(:disabled) { color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, transparent); }
.btn-danger { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); border-color: transparent; }
.btn-danger:hover:not(:disabled) { background: color-mix(in srgb, var(--bad) 18%, transparent); }
.btn-sm { height: 32px; padding: 0 14px; font-size: 13px; border-radius: 999px; gap: 6px; }
.btn.is-done { background: var(--good); color: #fff; }
.btn-add { border-radius: 999px !important; background: var(--accent) !important; color: var(--accent-ink) !important; box-shadow: none !important; font-weight: 600; }
.btn-add::after { display: none !important; }
.btn-add:hover:not(:disabled) { transform: none; opacity: .88; box-shadow: none !important; }
.btn-add .plus { background: transparent !important; color: currentColor !important; width: 18px; height: 18px; }
.btn-add.is-here { box-shadow: 0 0 0 2px var(--ground), 0 0 0 4px var(--accent) !important; }
.fp-btn { height: 44px; padding: 0 22px; font-weight: 600; letter-spacing: -0.01em; }
.fp-btn:active { transform: scale(.97); }
.fp-post { height: 32px; padding: 0 14px; font-weight: 600; font-size: 13px; }

/* ---------- fields: white wells with a hairline, a soft ring on focus ---------- */
.control, select { border-radius: var(--r); border-color: var(--line-2); background: var(--field); }
.control:hover, select:hover { border-color: var(--line-2); }
.control:focus-within, select:focus { border-color: var(--ink-3); box-shadow: 0 0 0 4px var(--accent-ring); }
.label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.control.invalid { border-color: var(--bad); }

/* ---------- segmented control ---------- */
.seg { background: var(--fill); border: 0; padding: 2px; }
.seg button { height: 32px; font-weight: 600; font-size: 13px; color: var(--ink-2); }
.seg button.on { color: var(--ink); }
.seg .seg-pill { top: 2px; bottom: 2px; background: var(--panel); box-shadow: 0 3px 8px rgba(0, 0, 0, .12), 0 3px 1px rgba(0, 0, 0, .04); }
:root:not([data-theme='light']) .seg .seg-pill { background: #636366; box-shadow: none; }
:root[data-theme='light'] .seg .seg-pill { background: #fff; }

/* ---------- surfaces: cards are a white (or graphite) plane, no heavy border ---------- */
.panel { border-color: transparent; box-shadow: var(--shadow); border-radius: var(--r-lg); }
:root:not([data-theme='light']) .panel { border-color: transparent; }
.panel-head { padding: 18px 20px; border-bottom-color: var(--line); }
.panel-head h2 { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.panel-head p { font-size: 13px; }
.panel-body { padding: 20px; }
.panel-foot { padding: 16px 20px; }

/* ---------- menus, sheets, dialogs ---------- */
.menu, .hs-menu { border-radius: 14px; border: 0; background: var(--glass); -webkit-backdrop-filter: blur(30px) saturate(1.8); backdrop-filter: blur(30px) saturate(1.8); box-shadow: var(--shadow-pop); }
.menu-item, .hs-menu a, .hs-menu .hs-out { border-radius: 8px; }
.hs-menu .hs-out { color: var(--bad); }
.modal-card { border-radius: var(--r-xl); border: 0; box-shadow: var(--shadow-pop); padding: 24px; }
dialog.hd { border-radius: var(--r-xl); border: 0; }
dialog.sheet { border-left: 0; box-shadow: -1px 0 0 var(--line), -30px 0 60px -30px rgba(0, 0, 0, .45); }
dialog.sheet::backdrop, dialog.hd::backdrop, .modal::backdrop { background: var(--scrim); }
.toast { border-radius: 14px; }
html .bkl-menu { border-radius: 14px; background: var(--glass); -webkit-backdrop-filter: blur(30px) saturate(1.8); backdrop-filter: blur(30px) saturate(1.8); box-shadow: 0 0 0 .5px var(--glass-line), 0 20px 40px -12px rgba(0, 0, 0, .35); }
html .bkl-menu button { border-radius: 8px; font-family: var(--font); font-weight: 500; font-size: 14px; }
html .bkl-menu button[aria-checked='true'] { font-weight: 600; }
html .bkl-btn { font-family: var(--font); font-weight: 600; border-color: transparent; background: var(--fill); height: 32px; }
html .bkl-btn:hover { background: var(--fill-2); }
.fp-lang { border-color: transparent; background: var(--fill); font-weight: 600; height: 32px; }

/* ---------- glass bars: the site header and the app top bar float over the content ---------- */
.fp-nav, .hs-top, .topbar {
  background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(1.8); backdrop-filter: blur(24px) saturate(1.8);
  border-bottom: .5px solid var(--glass-line);
}
.fp-nav.solid { border-bottom-color: var(--glass-line); }
.fp-brand { font-weight: 700; font-size: 17px; letter-spacing: -0.022em; }
.fp-switch { background: var(--fill); border: 0; padding: 2px; }
.fp-switch-pill { top: 2px; left: 2px; height: calc(100% - 4px); width: calc(50% - 2px); background: var(--panel); box-shadow: 0 3px 8px rgba(0, 0, 0, .12), 0 3px 1px rgba(0, 0, 0, .04); }
:root:not([data-theme='light']) .fp-switch-pill { background: #636366; box-shadow: none; }
.fp-switch a { height: 32px; font-weight: 600; font-size: 13px; color: var(--ink-2); }
.fp-switch a.on { color: var(--ink); }
/* the Agent side: dark glass, like the hero under it */
.side-agent .fp-nav { background: rgba(0, 0, 0, .72); border-bottom-color: rgba(255, 255, 255, .08); }
.side-agent .fp-switch { background: rgba(118, 118, 128, .24); border: 0; }
.side-agent .fp-switch-pill { background: #636366; }
.side-agent .fp-switch a.on { color: #fff; }
.side-agent .fp-lang, html .side-agent .bkl-btn { background: rgba(118, 118, 128, .24); border-color: transparent; color: #f5f5f7; }

/* ---------- workspace shell: an Apple sidebar ---------- */
.rail { background: var(--rail); border-right: .5px solid var(--rail-line); }
:root[data-theme='light'] .rail { background: #f5f5f7; }
.rail-brand { height: 64px; padding: 0 20px; border-bottom: 0; }
.rail-brand strong { font-size: 17px; font-weight: 700; }
.nav { gap: 2px; padding: 8px 10px 16px; }
.nav-group { padding: 0 10px 6px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--rail-ink-2); }
html:lang(ka) .nav-group { text-transform: none; letter-spacing: 0; font-size: 12px; }
.nav a + .nav-group { margin-top: 18px; }
.nav a { height: 36px; padding: 0 10px; gap: 10px; border-radius: 8px; font-weight: 500; font-size: 14px; color: var(--rail-ink); animation: none; }
.nav a .icon { width: 18px; height: 18px; color: var(--rail-ink-2); }
.nav a:hover { background: var(--rail-hover); color: var(--rail-ink); }
.nav a:hover .icon { transform: none; }
.nav a[aria-current='page'] { background: var(--rail-2); color: var(--rail-strong); font-weight: 600; }
.nav a[aria-current='page'] .icon { color: var(--rail-strong); }
.nav-tessera { display: none; }
.rail-note { border-top: .5px solid var(--rail-line); }
/* icon rail (laptops): no section words, a hairline between groups, every icon and the logo on the rail's centre line */
@media (max-width: 1180px) and (min-width: 641px) {
  .rail-brand { justify-content: center; padding: 0; }
  .nav { grid-template-columns: minmax(0, 1fr); justify-items: center; padding: 8px 0 16px; }
  .nav-group { display: none; }
  .nav a + .nav-group { display: block; justify-self: stretch; height: 0; margin: 9px 18px; padding: 0; overflow: hidden; font-size: 0; border-top: .5px solid var(--rail-line); }
  .nav a { width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: 10px; }
  .nav a .icon { width: 20px; height: 20px; }
}
.topbar { min-height: 60px; position: relative; z-index: 5; }
.topbar h1 { font-size: 20px; font-weight: 700; letter-spacing: -0.022em; }
.content { background: var(--ground); }
.profile-btn { height: 40px; border: 0; background: var(--fill); }
.profile-btn:hover { background: var(--fill-2); border: 0; }
.profile-btn[aria-expanded='true'] { box-shadow: var(--focus); }
.admin-band { min-height: 32px; font-size: 12px; border-bottom: .5px solid var(--line); }

/* ---------- tabs, chips, tags: gray fills, never boxes ---------- */
.tabs { border: 0; background: var(--fill); padding: 2px; border-radius: 10px; box-shadow: none; }
.tag { border-radius: 6px; font-weight: 600; }
.chips button, .chip { border-radius: 999px; }

/* ---------- reduced transparency and motion ---------- */
@media (prefers-reduced-transparency: reduce) {
  .fp-nav, .hs-top, .topbar, .menu, .hs-menu, html .bkl-menu { background: var(--panel) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  .btn:active:not(:disabled), .fp-btn:active { transform: none; }
}

/* ==========================================================================
   Homes front (/homes): a large title on the ground, the search as a white well,
   the map as a row. No photo behind the title: the homes are the pictures.
   ========================================================================== */
.bh-wrap { gap: 44px; padding-top: 8px; }
.bh-hero { background: none; border-radius: 0; padding: clamp(28px, 4vw, 56px) 0 0; isolation: auto; }
.bh-hero-bg, .bh-hero::before { display: none; }
.bh-hero h1 { color: var(--ink); text-align: left; text-shadow: none; font-size: clamp(34px, 4.6vw, 56px); line-height: 1.07; letter-spacing: -0.035em; font-weight: 700; margin-bottom: 24px; max-width: 18ch; }
html:lang(ka) .bh-hero h1 { letter-spacing: 0; max-width: 22ch; font-size: clamp(30px, 4vw, 48px); }
.ks-deals { gap: 8px; margin-bottom: 14px; }
.ks-deals button { height: 36px; padding: 0 16px; border: 0; background: var(--fill); color: var(--ink); font-weight: 600; font-size: 14px; }
.ks-deals button:hover { background: var(--fill-2); border: 0; }
.ks-deals button.on { background: var(--ink); color: var(--ground); }
.ks-deals button:focus-visible { outline: none; box-shadow: var(--focus); }
.ks { border: 0; border-radius: 18px; box-shadow: 0 0 0 .5px var(--line), 0 6px 24px -12px rgba(0, 0, 0, .18); padding: 6px; min-height: 64px; }
:root:not([data-theme='light']) .ks { background: var(--panel); box-shadow: 0 0 0 .5px var(--line); }
.ks-seg { border-radius: 12px; }
.ks-seg:hover, .ks-seg.open { background: var(--fill); }
.ks-seg:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--ink-3); }
.ks-seg.set > .icon:first-child { color: var(--ink); }
.ks-lab small { font-weight: 500; }
.ks-lab b { font-weight: 600; }
.ks-q input { font-weight: 500; }
.ks-more { border-radius: 12px; font-weight: 600; }
.ks-more:hover { background: var(--fill); }
.ks-badge { background: var(--ink); color: var(--ground); }
.ks-go { background: var(--accent); color: var(--accent-ink); border-radius: 12px; font-weight: 600; padding: 0 24px; }
.ks-go:hover { background: var(--accent-hi); opacity: .88; }
.ks-q:focus-within { box-shadow: inset 0 0 0 2px var(--ink-3); }
.bh-mapgo { margin: 16px 0 0; height: 44px; padding: 0 18px; background: var(--fill); color: var(--ink); font-weight: 600; font-size: 15px; box-shadow: none; }
.bh-mapgo:hover { background: var(--fill-2); }
:root[data-theme='light'] .bh-mapgo { background: var(--panel); box-shadow: 0 0 0 .5px var(--line); }
:root[data-theme='light'] .bh-mapgo:hover { background: #fff; box-shadow: 0 0 0 .5px var(--line-2), 0 6px 18px -10px rgba(0, 0, 0, .25); }
.bh-stories { margin-top: -8px; }
.bh-st-ring { background: var(--fill-2); }
.bh-st-add .bh-st-ring { border: 1.5px dashed var(--line-2); }
.bh-st b { font-weight: 600; }
.bh-st-add b { font-weight: 600; }
.bh-st-empty b { font-weight: 600; }
.bh-head { margin-bottom: 14px; }
.bh-head h2 { font-size: clamp(22px, 2vw, 28px); font-weight: 700; letter-spacing: -0.025em; }
.bh-head a { font-weight: 500; font-size: 15px; color: var(--ink-3); }
.bh-grid { gap: 20px; }
.bh-pc { border-radius: 18px; }
.bh-pc-in b { font-weight: 700; }
.bh-ps-i { border: 0; border-radius: 16px; box-shadow: 0 0 0 .5px var(--line); }
.bh-ps-i:hover { border: 0; box-shadow: 0 0 0 .5px var(--line-2), 0 8px 22px -14px rgba(0, 0, 0, .3); }
.bh-ps-ic { border: 0; background: var(--fill); }
.bh-ps-t b { font-weight: 600; }
.bh-banner { border-radius: 22px; background: #1d1d1f; }
:root:not([data-theme='light']) .bh-banner { background: var(--panel); }
.bh-svc-i { font-weight: 500; }
.bh-links h3 { font-weight: 600; font-size: 13px; color: var(--ink); }
.bh-links a { font-size: 13px; color: var(--ink-3); }

/* the sub-navigation: plain gray links, the current one in ink, no gold rule */
.bh-sub { background: var(--glass); -webkit-backdrop-filter: blur(24px) saturate(1.8); backdrop-filter: blur(24px) saturate(1.8); border-bottom: .5px solid var(--glass-line); }
.bh-sub a { height: 40px; font-weight: 500; font-size: 13px; color: var(--ink-3); border-bottom: 0; }
.bh-sub a:hover { color: var(--ink); border-bottom: 0; }
.bh-sub a[aria-current='page'] { color: var(--ink); font-weight: 600; border-bottom: 0; }

/* account button and quiet header buttons: gray fills */
.hs-me { border: 0; background: var(--fill); }
.hs-me:hover { background: var(--fill-2); }
.hs-me[aria-expanded='true'] { background: var(--fill-2); }
.hs-me:focus-visible { outline: none; box-shadow: var(--focus); }
.hs-guest-ic { background: transparent; box-shadow: none; }
.fp-nav .hs-me { border: 0; }
.hs-in { border: 0; background: var(--fill); font-weight: 600; }
.hs-in:hover { background: var(--fill-2); }

/* ---------- listing cards and rows ---------- */
.kc { border: 0; border-radius: 18px; background: transparent; box-shadow: none; overflow: visible; }
.kc:hover { transform: none; box-shadow: none; border: 0; }
.kc.is-gold, .kc.is-black { border: 0; }
.kc-media { margin: 0; border-radius: 16px; aspect-ratio: 4 / 3; }
.kc:hover .kc-media img { transform: scale(1.03); }
.kc-body { padding: 10px 2px 0; gap: 2px; }
.kc-price b { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.kc-fav, .kr-fav { -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.kc-fav { top: 10px; right: 10px; width: 34px; height: 34px; background: rgba(0, 0, 0, .36); }
.kc-fav.on, .kr-fav.on { color: #ff375f; }
.kc-specs span, .kr-count { border-radius: 999px; background: rgba(0, 0, 0, .5); font-weight: 600; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.kr { border: 0; border-radius: 20px; box-shadow: 0 0 0 .5px var(--line); padding: 12px; }
.kr:hover { border: 0; box-shadow: 0 0 0 .5px var(--line-2), 0 12px 32px -20px rgba(0, 0, 0, .35); }
.kr.is-gold, .kr.is-black { background: var(--panel); border: 0; }
.kr .kr-media { border-radius: 14px; }
.vip { border-radius: 6px; font-weight: 600; letter-spacing: 0; height: 22px; padding: 0 8px; }
.vip-silver { background: linear-gradient(180deg, #f2f2f4, #c7c7cc); color: #1d1d1f; }
.vip-gold { background: linear-gradient(180deg, #e5e5ea, #aeaeb2); color: #1d1d1f; }
.vip-black { background: #1d1d1f; color: #fff; box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .5); }

/* ==========================================================================
   Agent front (/agent): the dark page keeps its black, in Apple's graphite
   ========================================================================== */
.side-agent { --ground: #000; }

/* ==========================================================================
   Outlined controls become gray fills (Apple's bordered buttons); the
   selected one is ink. Fields inside wells never draw a second ring.
   ========================================================================== */
.control input:focus-visible, .control textarea:focus-visible, .ks-q input:focus-visible, .control select:focus-visible { box-shadow: none; outline: none; }
.btn-gold { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 600; }
.btn-gold:hover:not(:disabled) { background: var(--accent-hi); border-color: transparent; box-shadow: none; opacity: .88; }
.hs-post { border: 0 !important; font-weight: 600; }
.hs-mapbtn { box-shadow: none; background: var(--fill); font-weight: 600; }
.hs-mapbtn:hover { background: var(--fill-2); }
.fp-social { border: 0; background: var(--fill); color: var(--ink); font-weight: 500; }
.fp-social:hover { border: 0; background: var(--fill-2); }
.bell { border-color: transparent !important; background: var(--fill); border-radius: 999px; }
.bell:hover, .bell[aria-expanded='true'] { background: var(--fill-2); }
.bell-n { background: var(--bad); }
.chips button, .date-chips button, .sources .src, .rd-pages button, .fav-toggle, .tk-q-pri, .ai-try-list button { border-color: transparent !important; background: var(--fill); color: var(--ink); font-weight: 500; box-shadow: none; }
.chips button:hover, .date-chips button:hover, .sources .src:hover, .rd-pages button:hover:not(:disabled), .fav-toggle:hover, .ai-try-list button:hover { background: var(--fill-2); color: var(--ink); }
.chips button.on, .date-chips button.on, .rd-pages button.on { background: var(--ink) !important; color: var(--ground) !important; font-weight: 600; }
.sources .src.on { background: var(--ink); color: var(--ground); }
.sources .src.on b { background: rgba(255, 255, 255, .18); }
.sources .src b { background: var(--panel); }
.fav-toggle[aria-pressed='true'] { color: var(--ink); background: var(--fill-2); }
.hb-side-post { background: #1d1d1f; border: 0; border-radius: 20px; }
:root:not([data-theme='light']) .hb-side-post { background: var(--panel); }
label.search.cl-search, .tk-q-opt, label.ai-field { border-color: var(--line-2); border-radius: var(--r); }
select { border-radius: var(--r); }
.lg-top .bkl-btn, html .lg-top .bkl-btn { border-color: transparent; background: var(--fill); }

/* ---------- legal, About, Contact ---------- */
.lg-top { background: var(--glass); -webkit-backdrop-filter: blur(24px) saturate(1.8); backdrop-filter: blur(24px) saturate(1.8); border-bottom: .5px solid var(--glass-line); }
.lg-brand { font-weight: 700; font-size: 17px; }
.lg-lang { border: 0; background: var(--fill); padding: 2px; }
.lg-lang button[aria-pressed='true'] { background: var(--panel); box-shadow: 0 3px 8px rgba(0, 0, 0, .12); }
.lg-tabs a { border: 0; background: var(--fill); color: var(--ink); font-weight: 500; }
.lg-tabs a:hover { background: var(--fill-2); }
.lg-tabs a[aria-current='page'] { background: var(--ink); color: var(--ground); font-weight: 600; }
.lg-head h1 { font-weight: 700; }
.lg-toc { border: 0; box-shadow: 0 0 0 .5px var(--line); }

/* the page title keeps its full width; the crumbs give way first (70% of a shrink-to-fit box cut titles short) */
.topbar-left { flex: 1 1 auto; }
.topbar-left > h1, .topbar-left .view-title { max-width: none; flex: 0 1 auto; }
.topbar .crumbs { flex: 0 1 auto; min-width: 0; }
.ab-hero h1, .ab-prod h3, .ab-sec > h2, .ab-end h2, .ab-vals h3, .ct-ways h2, .ct-form h2, .ct-done h2 { font-weight: 700; }
.ab-kicker { font-weight: 600; letter-spacing: 0; text-transform: none; font-size: 15px; }
.ab-prod-agent { background: #1d1d1f; box-shadow: none; }
.ab-prod, .ct-card { border-radius: 22px; box-shadow: 0 0 0 .5px var(--line); }
.ct-way { box-shadow: 0 0 0 .5px var(--line); }
.ab-nav a[aria-current='page'] { background: var(--fill); box-shadow: none; }
.ab-btn-q { background: var(--fill); box-shadow: none; }
.ct-f label, .ct-f legend, .ct-way b, .ab-link { font-weight: 600; }
.ct-f input, .ct-f textarea { background: var(--fill); }
.ct-chips span { background: var(--fill); font-weight: 500; }
.ct-chips input:checked + span { font-weight: 600; }
:root:not([data-theme='light']) { --accent-ring: rgba(245, 245, 247, .18); }
.hb-view, .hb-tools { border: 0; box-shadow: 0 0 0 .5px var(--line); }
.hb-view { background: var(--fill); box-shadow: none; padding: 2px; border-radius: 10px; }
.hb-view button { border-radius: 8px; color: var(--ink-2); }
.hb-view button.on { background: var(--panel); color: var(--ink); box-shadow: 0 3px 8px rgba(0, 0, 0, .12), 0 3px 1px rgba(0, 0, 0, .04); }
:root:not([data-theme='light']) .hb-view button.on { background: #636366; }
.hb-view button:not(.on):hover { background: transparent; }

/* ==========================================================================
   Launch fixes (owner review, 18 Oct)
   ========================================================================== */
/* nothing is see-through: menus, bars and popovers are solid surfaces */
:root, :root[data-theme='light'] { --glass: var(--panel); }
.fp-nav, .hs-top, .topbar, .bh-sub, .lg-top, .sr-top, .menu, .hs-menu, html .bkl-menu, .mural-note {
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
}
.fp-nav, .hs-top, .topbar, .bh-sub, .lg-top { background: var(--panel); }
.sr-top { background: var(--ground); }
.side-agent .fp-nav { background: #000; }
.mural-note { background: var(--panel); }
.menu, .hs-menu, html .bkl-menu { background: var(--panel) !important; box-shadow: 0 0 0 .5px var(--line-2), 0 18px 44px -14px rgba(0, 0, 0, .35); }
:root:not([data-theme='light']) .menu, :root:not([data-theme='light']) .hs-menu, :root:not([data-theme='light']) .bkl-menu { background: #2c2c2e !important; box-shadow: 0 0 0 .5px rgba(255, 255, 255, .1), 0 18px 44px -12px rgba(0, 0, 0, .7); }
.side-agent .hs-menu { background: #2c2c2e !important; color: #f5f5f7; }
.side-agent .hs-menu a, .side-agent .hs-menu .hs-out { color: #e5e5ea; }

/* the initial in a round avatar sits in the optical centre */
.hs-ava { display: inline-grid; place-items: center; line-height: 1; font-weight: 600; text-box: trim-both cap alphabetic; background: #1d1d1f; color: #fff; }
.hs-ava > img { text-box: normal; }
.side-agent .fp-nav .hs-ava { background: #f5f5f7; color: #1d1d1f; }

/* VIP tiers: black, real gold, silver */
.vip-gold { background: linear-gradient(180deg, #f6d77a 0%, #d9a93c 55%, #b8862b 100%); color: #2b1d00; box-shadow: inset 0 0 0 .5px rgba(120, 80, 0, .35); }
.vip-silver { background: linear-gradient(180deg, #f4f4f6 0%, #d1d1d6 60%, #aeaeb2 100%); color: #1d1d1f; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .18); }
.vip-black { background: #1d1d1f; color: #fff; }
.bh-st.is-gold .bh-st-ring { background: conic-gradient(from 200deg, #b8862b, #f6d77a, #d9a93c, #f6d77a, #b8862b); }

/* the latest listings: six across on a wide screen */
.bh-grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1200px) { .bh-grid-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .bh-grid-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
.bh-grid-6 .kc-price b { font-size: 16px; }

/* one $ / ₾ switch on the Listings page, beside Favorites */
.lx-tools { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; flex: none; }
.lx-tools .fav-toggle { margin-bottom: 0; }
.cur-sw.lx-cur { height: 38px; padding: 2px; border: 0; border-radius: 999px; background: var(--fill); }
.cur-sw.lx-cur button { min-width: 36px; height: 34px; padding: 0 10px; border: 0; border-radius: 999px; background: none; color: var(--ink-2); font-size: 14px; font-weight: 600; cursor: pointer; }
.cur-sw.lx-cur button.on { background: var(--panel); color: var(--ink); box-shadow: 0 3px 8px rgba(0, 0, 0, .12), 0 3px 1px rgba(0, 0, 0, .04); }
:root:not([data-theme='light']) .cur-sw.lx-cur button.on { background: #636366; }
.notes-pop { background: var(--panel) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; border-radius: 14px; box-shadow: 0 0 0 .5px var(--line-2), 0 18px 44px -14px rgba(0, 0, 0, .35); }
:root:not([data-theme='light']) .notes-pop { background: #2c2c2e !important; }
/* Homes pages scope their own tokens on body; give them the Apple light set too */
:root[data-theme='light'] body[data-area='homes'] {
  --ground: #f5f5f7; --panel: #ffffff; --panel-2: #f5f5f7; --raised: #e8e8ed;
  --line: rgba(60, 60, 67, .14); --line-2: rgba(60, 60, 67, .22); --field: #ffffff; --field-focus: #ffffff;
  --ink: #1d1d1f; --ink-2: #424245; --ink-3: #6e6e73;
}
.profile-btn[aria-expanded='true'] { box-shadow: none; background: var(--fill-2); }
/* phones: the sidebar becomes the bottom tab bar; the sidebar link sizes above must not squash it */
@media (max-width: 640px) {
  .nav a, .nav-more, body[data-area='admin'] .nav a { height: 54px; gap: 3px; padding: 0 2px; border-radius: 12px; }
  .nav a span, .nav-more span { line-height: 1.35; font-size: 10.5px; font-weight: 500; }
  html[lang='ka'] .nav a span, html[lang='ka'] .nav-more span { font-size: 10px; }
  .nav a[aria-current='page'] { background: transparent; }
  .nav a[aria-current='page'] .icon, .nav a[aria-current='page'] span { color: var(--rail-strong); }
  .nav a[aria-current='page'] span { font-weight: 600; }
  .rail { border-top: .5px solid var(--rail-line); }
  .nav a .icon, .nav-more .icon { width: 21px; height: 21px; }
}

/* map pins: a plain pin, no price on it; VIP pins are the same pin in gold */
.hb-pin { background: none !important; border: 0 !important; width: 28px !important; height: 36px !important; }
.hb-pin svg { display: block; width: 28px; height: 36px; overflow: visible; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35)); transition: transform var(--t-fast) var(--ease); transform-origin: 50% 100%; }
.hb-pin svg path { fill: #1d1d1f; stroke: #fff; stroke-width: 1.6; }
.hb-pin svg circle { fill: #fff; }
.hb-pin.is-vip svg path { fill: #c99a2e; }
.hb-pin:hover svg { transform: scale(1.12); }
.hb-pin span { display: none; }
/* the leaderboard fits its panel: long Georgian headings wrap instead of pushing the score out of view */
.lb-table th { white-space: normal; line-height: 1.25; vertical-align: bottom; }
.lb-table th .icon { display: block; margin-bottom: 4px; }
@media (min-width: 900px) { .lb-table th, .lb-table td { padding-left: 10px; padding-right: 10px; } }

/* the Agent page's closing call-to-action sits on the black page: light text there (it was dark on black) */
.side-agent .ag-end { --ink: #f5f5f7; --ink-2: #c7c7cc; --ink-3: #98989d; color: #f5f5f7; }
.side-agent .ag-end .ag-link { color: #f5f5f7; }

/* listing page: the breadcrumb trail above the title */
.hl-crumbs ol { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; font-size: 14px; color: var(--ink-3); }
.hl-crumbs li { display: inline-flex; align-items: center; min-width: 0; }
.hl-crumbs li + li::before { content: '›'; margin: 0 8px; color: var(--ink-3); }
.hl-crumbs a { color: var(--ink-3); text-decoration: none; white-space: nowrap; }
.hl-crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.hl-crumbs li:last-child a { color: var(--ink-2); }
/* Homes price $/₾ switch: big enough to tap (24 px) */
body[data-area='homes'] .cur-sw button { min-width: 30px; height: 26px; padding: 0 7px; font-size: 13px; }
/* Agent page footer logo (white footer): the grey "key" in a grey that reads on white */
.side-agent .fp-foot .fp-brand em { color: #6e6e73; }

/* ==========================================================================
   /homes against Apple's HIG (29 Oct). Each rule names the guideline it meets.
   ========================================================================== */
/* accessibility.md › Offer sufficiently sized controls: 44 × 44 on phones, 28 on desktop */
.fp-nav .fp-brand { min-height: 44px; padding: 0 6px; margin-left: -6px; border-radius: 10px; }
.bh-head a { min-height: 44px; padding: 0 4px; margin-right: -4px; border-radius: 10px; }
.ft .fp-legal a, .ft .fp-legal .fp-cookie-btn { min-height: 32px; display: inline-flex; align-items: center; }
@media (max-width: 760px) {
  .ft .fp-legal a, .ft .fp-legal .fp-cookie-btn, .ft-col a, .ft-reach a { min-height: 44px; display: inline-flex; align-items: center; }
  .ft-col ul, .ft-reach { gap: 0; }
}
/* typography.md › Use font sizes that most people can read easily: nothing on the page under 13 px */
.ks-lab small { font-size: 13px; }
.kc-price small, .kr-price small { font-size: 13px; }
.bh-st-add b { font-size: 13px; }
/* buttons.md › Consider using text when a short label communicates more clearly than an icon:
   on phones the filter button has the whole half-row, so it says what it opens */
@media (max-width: 760px) { .ks-hero .ks-more-l { display: inline; font-size: 15px; font-weight: 600; } .ks-hero .ks-more { gap: 8px; } }
/* layout.md › Design a layout that adapts gracefully: the four deal choices fit a phone instead of running off it */
@media (max-width: 760px) {
  .ks-deals { display: grid; grid-template-columns: 1fr 1fr; margin-right: 0; padding-right: 0; gap: 6px; overflow: visible; }
  .ks-deals button { min-width: 0; height: 40px; padding: 0 8px; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
/* layout.md › Group related items / consistency: the cookie button reads as one of the legal links */
.ft .fp-legal .fp-cookie-btn { font: inherit; font-size: 13px; color: var(--ink-3); background: none; border: 0; padding: 0; }
.ft .fp-legal .fp-cookie-btn:hover { color: var(--ink); }
/* layout.md › Group related items: the browse links above the footer use the footer's own type, so the page ends
   in one family instead of two */
@media (min-width: 761px) {
  .bh-links h3 { font-size: 14px; font-weight: 700; color: var(--ink); }
  .bh-links ul { gap: 10px; }
  .bh-links a { font-size: 14.5px; color: var(--ink-2); }
  .bh-links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
}
/* the remaining small type and targets from the second measuring pass */
.bh-st small, .kc-place, .kr-when, .kr-who, .kp-list i, .kp-h, .kp-pair span, .kl-pick i { font-size: 13px; }
.ft .fp-brand { min-height: 44px; }
@media (min-width: 761px) { .bh-links a { display: inline-flex; align-items: center; min-height: 28px; } .bh-links ul { gap: 2px; } }

/* =====================================================================================================================
   The agent workspace's frame (Nov 2026): the side bar floats with room around it, the page sits in its own framed
   panel, the agency's logo and name sit at the top of the bar, the account at its foot. Phones keep the bottom bar.
   ===================================================================================================================== */
:root { --shell-bg: #000; --frame-line: rgba(255, 255, 255, .1); --fi: #f2f2f7; --fi-2: #aeaeb2; }
:root[data-theme='light'] { --shell-bg: #e3e5e9; --frame-line: rgba(0, 0, 0, .09); --fi: #1c1c1e; --fi-2: #6e6e73; }
@media (min-width: 641px) {
  body[data-area='agent'] .shell { padding: 14px; gap: 14px; grid-template-columns: 272px minmax(0, 1fr); background: var(--shell-bg); }
  body[data-area='agent'] .rail { border: 1px solid var(--frame-line); border-radius: 22px; }
  body[data-area='agent'] .main { border: 1px solid var(--frame-line); border-radius: 22px; }
  body[data-area='agent'] .topbar { border-top-left-radius: 22px; border-top-right-radius: 22px; }
}
@media (min-width: 641px) and (max-width: 1180px) {
  body[data-area='agent'] .shell { grid-template-columns: 78px minmax(0, 1fr); }
}

/* the agency at the top of the bar: its logo (or first letter), "powered by Blackkey", its name */
.rail-brand.is-agency { height: auto; display: flex; align-items: center; gap: 12px; padding: 18px 16px 14px; }
.ab-logo { flex: none; width: 46px; height: 46px; border-radius: 13px; overflow: hidden; display: grid; place-items: center; background: linear-gradient(150deg, #f5f5f7, #c7c9cf); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.ab-logo img { width: 100%; height: 100%; object-fit: cover; }
.ab-logo b { font-size: 21px; font-weight: 800; color: #0b0b0c; letter-spacing: -.02em; }
.ab-t { display: grid; gap: 3px; min-width: 0; }
.rail-brand .ab-by { display: flex; margin: 0; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; letter-spacing: .02em; color: var(--rail-ink-2); white-space: nowrap; }
.ab-by .mark { width: 15px; height: 9px; gap: 1px; }
.ab-by .mark i { border-radius: 1px; background: var(--rail-ink-2); }
.ab-t strong { font-size: 16px; font-weight: 700; letter-spacing: -.015em; color: var(--rail-strong, var(--fi)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* the filled, light icons of the bar (the line icons' stroke is switched off for them) */
.icon.fi { fill: currentColor; stroke: none; }
.nav a .icon.fi { width: 19px; height: 19px; color: var(--fi-2); }
.nav a:hover .icon.fi, .nav a[aria-current='page'] .icon.fi { color: var(--fi); }
.nav a[aria-current='page'] { color: var(--fi); font-weight: 600; }

/* the account at the foot of the bar */
.rail-me { flex: none; margin: 8px 10px 10px; padding: 9px 10px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--frame-line); border-radius: 15px; background: var(--rail-2); color: var(--rail-ink); font: inherit; text-align: left; cursor: pointer; transition: background var(--t-fast); }
.rail-me:hover { background: var(--rail-hover); }
.rail-me[hidden] { display: none; }
.rm-av { flex: none; display: grid; }
.rm-t { flex: 1; min-width: 0; display: grid; gap: 1px; }
.rm-t strong { font-size: 13.5px; font-weight: 650; color: var(--fi); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-t small { font-size: 12px; color: var(--rail-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-me .icon.fi { flex: none; width: 16px; height: 16px; color: var(--fi-2); }
.menu.from-rail { position: fixed; top: auto; right: auto; left: 26px; bottom: 82px; transform-origin: bottom left; }
@media (max-width: 1180px) {
  .rail-brand.is-agency { justify-content: center; padding: 16px 0 12px; }
  .rail-brand.is-agency .ab-t, .rm-t, .rail-me .icon.fi { display: none; }
  .rail-me { justify-content: center; margin: 8px; padding: 8px 0; }
}
@media (max-width: 640px) { .rail-me { display: none !important; } }
/* the account sits in the bar on wide screens; the top bar keeps it on smaller ones */
@media (min-width: 1181px) { body[data-area='agent'] .topbar .profile-btn { display: none; } body[data-area='agent'] .topbar .profile { position: absolute; width: 0; height: 0; overflow: visible; } }

/* the big round icon on empty states (Messenger) */
.soon-ic { width: 84px; height: 84px; border-radius: 26px; display: grid; place-items: center; background: var(--panel); border: 1px solid var(--frame-line); }
.icon.fi.big { width: 40px; height: 40px; color: var(--fi); }

/* ---------- the guide ---------- */
.gd { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 18px; align-items: start; }
.gd-list { border: 1px solid var(--frame-line); border-radius: 18px; background: var(--panel); overflow: hidden; }
.gd-head { padding: 18px 18px 14px; border-bottom: 1px solid var(--frame-line); display: grid; gap: 10px; }
.gd-head h2 { font-size: 17px; }
.gd-prog { height: 5px; border-radius: 999px; background: var(--fill); overflow: hidden; }
.gd-prog i { display: block; height: 100%; border-radius: inherit; background: var(--fi); transition: width 400ms var(--ease); }
.gd-head small { color: var(--ink-3); font-size: 12.5px; }
.gd-list ol { list-style: none; margin: 0; padding: 6px; display: grid; gap: 2px; max-height: calc(100dvh - 260px); overflow: auto; }
.gd-list button { width: 100%; display: flex; gap: 12px; align-items: flex-start; padding: 10px; border: 0; border-radius: 12px; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.gd-list button:hover { background: var(--fill); }
.gd-list button.on { background: var(--fill-2, var(--fill)); }
.gd-n { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--fill); font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.gd-list button.on .gd-n { background: var(--fi); color: var(--panel); }
.gd-list button.seen .gd-n .icon { width: 30px; height: 30px; color: var(--fi); }
.gd-list b { display: block; font-size: 14px; font-weight: 650; }
.gd-list small { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; color: var(--ink-3); font-size: 12.5px; }
.gd-main { border: 1px solid var(--frame-line); border-radius: 18px; background: var(--panel); overflow: hidden; }
.gd-player { aspect-ratio: 16 / 9; display: grid; place-items: center; align-content: center; gap: 10px; background: #050506; color: #aeaeb2; }
.gd-player .icon.fi.big { width: 64px; height: 64px; color: #f2f2f7; opacity: .9; }
.gd-player p { font-size: 14px; }
.gd-info { padding: 20px 22px 6px; display: grid; gap: 6px; }
.gd-step { color: var(--ink-3); font-size: 12.5px; font-weight: 700; }
.gd-info h2 { font-size: 22px; letter-spacing: -.02em; }
.gd-info p { color: var(--ink-2); font-size: 15px; }
.gd-next { margin-top: 14px; padding: 16px 22px; border-top: 1px solid var(--frame-line); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.gd-next small { display: block; color: var(--ink-3); font-size: 12.5px; }
.gd-next b { font-size: 14.5px; }
@media (max-width: 1000px) { .gd { grid-template-columns: minmax(0, 1fr); } .gd-main { order: -1; } .gd-list ol { max-height: none; } }

/* ---------- members & roles ---------- */
.tm { display: grid; gap: 16px; }
.tm-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tm-bar .btn .icon { width: 17px; height: 17px; }
.tm-scroll { overflow-x: auto; }
.tm-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tm-table th { padding: 12px 18px; text-align: left; font-size: 12.5px; font-weight: 650; color: var(--ink-3); border-bottom: 1px solid var(--frame-line); white-space: nowrap; }
.tm-table td { padding: 12px 18px; border-bottom: 1px solid var(--frame-line); vertical-align: middle; white-space: nowrap; }
.tm-table tr:last-child td { border-bottom: 0; }
.tm-table a { color: var(--ink); text-decoration: none; }
.tm-table a:hover { text-decoration: underline; }
.tm-who { display: flex; align-items: center; gap: 12px; }
.tm-who b { display: block; font-weight: 650; }
.tm-who small { color: var(--ink-3); font-size: 12.5px; }
.tm-who em { font-style: normal; color: var(--ok, #30d158); }
.tm-role { display: inline-flex; padding: 4px 10px; border-radius: 999px; background: var(--fill); font-size: 12.5px; font-weight: 650; }
.tm-role-owner { background: var(--fi); color: var(--panel); }
.tm-perms td small { display: block; color: var(--ink-3); font-size: 12px; margin-top: 2px; }
.tm-sw { display: inline-block; width: 40px; height: 24px; border-radius: 999px; background: var(--fill); position: relative; }
.tm-sw i { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--ink-3); }
.tm-sw.on { background: var(--fi); }
.tm-sw.on i { left: 19px; background: var(--panel); }
.tm-note, .tm-none { padding: 14px 18px; color: var(--ink-3); font-size: 13px; }

/* ---------- settings → agency ---------- */
.ag-set { margin-top: 18px; }
.ag-form { display: grid; gap: 14px; }
.ag-logo-row { display: flex; align-items: center; gap: 16px; }
.ag-logo { width: 72px; height: 72px; border-radius: 20px; }
.ag-logo b { font-size: 30px; }
.ag-logo-row b { display: block; font-size: 14.5px; }
.ag-logo-row small { display: block; color: var(--ink-3); font-size: 12.5px; margin-top: 2px; }
.ag-logo-btns { display: flex; gap: 8px; margin-top: 10px; }
.ag-h { margin-top: 6px; font-size: 15px; }
.ag-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; }
.ag-actions { display: flex; justify-content: flex-end; }
@media (max-width: 700px) { .ag-grid { grid-template-columns: minmax(0, 1fr); } }
.rail-brand .ab-by { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ab-by .mark { display: inline-grid; vertical-align: -1px; margin-right: 4px; }
.tm-bar .seg button.on { background: var(--fi); color: var(--panel); border-radius: 999px; }
.ag-set { grid-column: 1 / -1; }

/* ---------- Social → Facebook: the post composer (on the page, not a pop-up) ---------- */
.fb { display: grid; gap: 16px; max-width: 980px; }
.fb .icon.fi { fill: currentColor; stroke: none; }
.fb-conn { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 18px 20px; }
.fb-conn h2 { font-size: 16px; }
.fb-conn p { margin-top: 3px; color: var(--ink-2); font-size: 13.5px; line-height: 1.5; }
.fb-logo { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: #1877f2; color: #fff; }
.fb-logo .icon { width: 28px; height: 28px; color: #fff; }
.fb-conn .btn[disabled] { opacity: .55; }
.fb-soon { font-style: normal; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: var(--fill); }
@media (max-width: 760px) { .fb-conn { grid-template-columns: auto minmax(0, 1fr); } .fb-conn .btn { grid-column: 1 / -1; } }
.fb-search { padding: 0 20px 12px; }
.fb-search input { width: 100%; height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--frame-line); background: var(--fill); color: var(--ink); font: inherit; }
.fb-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; padding: 0 14px 16px; max-height: 60vh; overflow: auto; }
.fb-item, .fb-chosen { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid var(--frame-line); border-radius: 14px; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.fb-item:hover { background: var(--fill); }
.fb-thumb { flex: none; width: 56px; height: 56px; border-radius: 10px; background: var(--fill) center / cover no-repeat; }
.fb-item-t { min-width: 0; display: grid; gap: 2px; flex: 1; }
.fb-item-t b { font-size: 14px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fb-item-t small { color: var(--ink-3); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fb-empty { padding: 18px 20px; color: var(--ink-3); }
.fb-comp { padding: 22px; display: grid; gap: 14px; }
.fb-comp-head h2 { display: flex; align-items: center; gap: 10px; font-size: 22px; letter-spacing: -.02em; }
.fb-comp-head h2 .icon { width: 26px; height: 26px; color: #1877f2; }
.fb-comp-head p { margin-top: 4px; color: var(--ink-2); }
.fb-step { display: inline-block; margin-bottom: 6px; color: var(--ink-3); font-size: 12.5px; font-weight: 700; }
.fb-chosen { cursor: default; }
.fb-tpl-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fb-tpl-bar small { color: var(--ink-3); font-size: 13px; }
.fb .btn .icon { width: 16px; height: 16px; }
.fb-tpl { padding: 14px; border: 1px solid var(--frame-line); border-radius: 16px; background: var(--fill); display: grid; gap: 10px; }
.fb-tpl-head small { display: block; color: var(--ink-3); font-size: 12.5px; margin-top: 2px; }
.fb-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fb-chip { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--frame-line); background: var(--panel); color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.fb-chip:hover { border-color: var(--ink-3); }
.fb-tpl-text, .fb-text textarea { width: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--frame-line); background: var(--panel); color: var(--ink); font: inherit; font-size: 15px; line-height: 1.65; resize: vertical; }
.fb-text textarea { min-height: 230px; background: var(--fill); }
.fb-text textarea:focus, .fb-tpl-text:focus { outline: 2px solid var(--fi); outline-offset: 1px; }
.fb-text > span { display: block; margin-bottom: 6px; color: var(--ink-3); font-size: 12.5px; font-weight: 650; }
.fb-tpl-acts, .fb-text-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fb-text-foot span { color: var(--ink-3); font-size: 13px; }
.fb-link { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--ink-2); font: inherit; font-size: 13.5px; cursor: pointer; padding: 4px 0; }
.fb-link:disabled { opacity: .45; cursor: default; }
.fb-link .icon { width: 15px; height: 15px; }
.fb-media { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 14px; background: var(--fill); }
.fb-media button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; border: 0; border-radius: 10px; background: none; color: var(--ink-2); font: inherit; font-weight: 650; cursor: pointer; }
.fb-media button.on { background: var(--panel); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.fb-media .icon { width: 17px; height: 17px; }
.fb-muted { color: var(--ink-3); font-size: 13px; line-height: 1.5; }
.fb-grid-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 4px; }
.fb-grid-head h3 { font-size: 15px; }
.fb-grid-head span, .fb-grid-head small { color: var(--ink-3); font-size: 13px; }
.fb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.fb-ph { position: relative; aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: var(--fill); border: 0; padding: 0; cursor: grab; }
.fb-ph img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.fb-ph.dragging { opacity: .4; }
.fb-ph.over { outline: 2px solid var(--fi); outline-offset: 2px; }
.fb-ph-grip, .fb-ph-x, .fb-ph-n, .fb-ph-big { position: absolute; display: grid; place-items: center; border-radius: 999px; background: rgba(255, 255, 255, .92); color: #111; border: 0; font: inherit; }
.fb-ph-grip { top: 8px; left: 8px; width: 28px; height: 28px; }
.fb-ph-grip .icon, .fb-ph-big .icon { width: 15px; height: 15px; color: #111; }
.fb-ph-x { top: 8px; right: 8px; width: 28px; height: 28px; font-size: 18px; line-height: 1; cursor: pointer; }
.fb-ph-n { bottom: 8px; left: 8px; min-width: 26px; height: 26px; padding: 0 6px; font-size: 12.5px; font-weight: 800; }
.fb-ph-big { bottom: 8px; right: 8px; width: 28px; height: 28px; cursor: pointer; }
.fb-grid-out .fb-ph { cursor: pointer; opacity: .55; }
.fb-grid-out .fb-ph:hover { opacity: 1; }
.fb-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; border-top: 1px solid var(--frame-line); flex-wrap: wrap; }
.fb-foot-r { display: flex; gap: 8px; }
.fb-foot .btn[disabled] { opacity: .5; }
.fb-preview { border: 1px solid var(--frame-line); border-radius: 16px; overflow: hidden; background: var(--fill); }
.fb-preview-text { padding: 16px; white-space: pre-wrap; font-size: 15px; line-height: 1.6; }
.fb-preview-ph { display: grid; gap: 2px; aspect-ratio: 16 / 10; }
.fb-preview-ph.n2 { grid-template-columns: 1fr 1fr; }
.fb-preview-ph.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.fb-preview-ph.n3 span:first-child { grid-row: 1 / 3; }
.fb-preview-ph.n4 { grid-template-columns: 2fr 1fr; grid-template-rows: repeat(3, 1fr); }
.fb-preview-ph.n4 span:first-child { grid-row: 1 / 4; }
.fb-preview-ph span { position: relative; background: center / cover no-repeat; }
.fb-preview-ph b { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .5); color: #fff; font-size: 24px; }
.fb-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fb-opts h3 { font-size: 15px; margin-bottom: 8px; }
.fb-at { margin-top: 10px; height: 42px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--frame-line); background: var(--fill); color: var(--ink); font: inherit; }
.fb-when button.on { background: var(--fi); color: var(--panel); border-radius: 999px; }
.fb-off { text-align: right; }
@media (max-width: 700px) { .fb-opts { grid-template-columns: 1fr; } .fb-grid { grid-template-columns: repeat(3, 1fr); } }
.fb-preview { width: 100%; max-width: 520px; margin: 0 auto; }

/* =====================================================================================================================
   Every page of the workspace in the side bar's language (Nov 2026): cards wear the same thin frame line and round
   corners, headers share one rhythm, the chosen tab is a light pill, content icons are filled and light.
   ===================================================================================================================== */
body[data-area='agent'] :is(.panel, .hq-kpi, .hq-alone, .cl-col, .cl-stat, .cl-today-c, .dl-col, .dl-intro, .dl-stats > div, .hx-stats > div, .lb-note, .lb-p, .mc-hero, .rc-card, .rd-watch, .wx-conn, .ai-box, .gl, .factbar, .cp-reply, .tk-row, .option, .sr-card, .showroom-card, .rd-card, .an-card, .kpi) {
  border: 1px solid var(--frame-line); box-shadow: none;
}
body[data-area='agent'] .panel { border-radius: 20px; }
body[data-area='agent'] :is(.hq-kpi, .cl-stat, .dl-stats > div, .hx-stats > div, .lb-p, .rc-card, .option) { border-radius: 18px; }
body[data-area='agent'] .panel-head { border-bottom-color: var(--frame-line); }
body[data-area='agent'] .panel-head h2 { font-size: 17px; font-weight: 700; letter-spacing: -.015em; }
body[data-area='agent'] .panel-head p { color: var(--ink-3); font-size: 13px; }
body[data-area='agent'] .content { padding: clamp(18px, 2.6vw, 34px); }
body[data-area='agent'] .topbar h1 { font-size: 21px; font-weight: 700; letter-spacing: -.02em; }
body[data-area='agent'] .topbar { border-bottom: 1px solid var(--frame-line); }

/* filled content icons take their colour from where they sit, like the line icons did */

/* the chosen option in every tab switch is a light pill with dark text */
:root:not([data-theme='light']) body[data-area='agent'] .content .seg .seg-pill { background: var(--fi); box-shadow: none; }
:root:not([data-theme='light']) body[data-area='agent'] .content .seg button.on { color: #0b0b0c; }
:root:not([data-theme='light']) body[data-area='agent'] .content .seg button.on .icon { color: #0b0b0c; }
body[data-area='agent'] .content .seg { background: var(--fill); border: 1px solid var(--frame-line); }

/* the top bar keeps only the bell */
body[data-area='agent'] .topbar .bell { border: 1px solid var(--frame-line); }
/* adding a listing sits on the Properties page */
.l-add { flex: none; }
.l-add .icon { width: 16px; height: 16px; }
@media (max-width: 760px) { .l-add span { display: none; } .l-add { width: 44px; padding: 0; justify-content: center; } }

/* Properties: the toolbar wraps instead of squeezing the search */
.lx-head { flex-wrap: wrap; row-gap: 10px; }
.lx-head .search { flex: 1 1 380px; min-width: 300px; }

/* the agency at the top of the bar, second version: name first, then a quiet "Powered by Blackkey" with a drawn mark */
.rail-brand .ab-t { gap: 4px; }
.rail-brand .ab-t strong { font-size: 16.5px; line-height: 1.15; }
.rail-brand .ab-by { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 11.5px; font-weight: 500; letter-spacing: .005em; color: var(--rail-ink-2); white-space: nowrap; overflow: hidden; }
.rail-brand .ab-by > span { overflow: hidden; text-overflow: ellipsis; }
.rail-brand .ab-by b { font-weight: 700; color: var(--rail-ink); }
.bk-mk { flex: none; width: 15px; height: 9px; fill: currentColor; }
.rail-brand .bk-mk { color: var(--rail-ink); }

/* audit (Nov 2026): cards never push past a phone's width; wide tables scroll inside their card, fields shrink */
.panel, .panel-body, .split > *, .ad-grid > *, [class*='-grid'] > * { min-width: 0; }
.panel :is(input, select, textarea, .control) { max-width: 100%; }
@media (max-width: 640px) {
  body[data-area='admin'] .panel { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  body[data-area='admin'] .ad-span2 { grid-column: auto; }
  body[data-area='admin'] .panel table { min-width: 560px; }
  body[data-area='admin'] .panel select { min-width: 120px; }
  .mc-step .btn, .mc-step button { max-width: 100%; white-space: normal; }
}
/* the "online" label is readable on the light theme too */
:root[data-theme='light'] .tm-who em { color: #1f7a35; }
/* settings rows: a short number box keeps its width; a text or e-mail field takes the row's free width instead of overflowing */
.ad-num { grid-template-columns: minmax(0, 1fr) minmax(0, 88px) minmax(0, 90px); }
.ad-num:has(input[type='email'], input[type='text'], input[type='url']) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
.ad-num .control { min-width: 0; width: 100%; }
.ad-num .control input[type='email'], .ad-num .control input[type='text'], .ad-num .control input[type='url'] { text-align: left; }
/* the page frame never scrolls sideways (wide tables scroll inside their own card); settings rows shrink to fit */
.content { overflow-x: hidden; }
.panel-body > *, .panel-body .control, .panel-body .control input { min-width: 0; }
.panel-body .control { max-width: 100%; }
/* number boxes inside table cells (VIP plans): sized to their numbers */
.panel td .control { display: inline-flex; width: 96px; max-width: 100%; }
.panel td .control input { width: 100%; }
.panel table { max-width: 100%; }

/* =====================================================================================================================
   Nov 2026: the bell sits in the frame's corner, brand icons keep their colour, the Messenger, the message pop-up, the
   new Overview. Only Facebook (blue) and WhatsApp (green) are coloured; the rest of the side bar stays silver.
   ===================================================================================================================== */
body[data-area='agent'] .topbar { padding-right: 8px; }
body[data-area='agent'] .topbar .bell { width: 44px; height: 44px; }
.nav a[href$='/facebook'] .icon.fi { color: #1877f2; }
.nav a[href$='/whatsapp'] .icon.fi { color: #25d366; }
.nav a[href$='/facebook'][aria-current='page'] .icon.fi, .nav a[href$='/facebook']:hover .icon.fi { color: #3b8cff; }
.nav a[href$='/whatsapp'][aria-current='page'] .icon.fi, .nav a[href$='/whatsapp']:hover .icon.fi { color: #3be07c; }

/* ---------- the pop-up for a new message ---------- */
.chat-toast { position: fixed; z-index: 90; right: 18px; top: 84px; width: min(340px, calc(100vw - 36px)); display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--frame-line); border-radius: 16px; background: var(--panel); color: var(--ink); text-align: left; font: inherit; cursor: pointer; box-shadow: 0 18px 50px -16px rgba(0, 0, 0, .7); transform: translateY(-12px); opacity: 0; transition: transform 320ms var(--ease), opacity 260ms; }
.chat-toast.in { transform: none; opacity: 1; }
.ct-ic { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--fi); color: var(--panel); }
.ct-ic .icon { width: 20px; height: 20px; color: var(--panel); }
.ct-t { min-width: 0; display: grid; gap: 2px; }
.ct-t b { font-size: 14px; }
.ct-t small { color: var(--ink-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Messenger ---------- */
.ms { height: 100%; }
.ms-wrap { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 14px; height: calc(100dvh - 190px); min-height: 480px; }
.ms-list, .ms-conv { display: flex; flex-direction: column; min-height: 0; overflow: hidden; padding: 0; }
.ms-list-h { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 10px; }
.ms-list-h h2 { font-size: 18px; }
.ms-plus { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--frame-line); background: var(--fi); color: var(--panel); display: grid; place-items: center; cursor: pointer; }
.ms-plus .icon { width: 18px; height: 18px; color: var(--panel); }
.ms-list ul { list-style: none; margin: 0; padding: 4px 8px 10px; overflow: auto; flex: 1; display: grid; align-content: start; gap: 2px; }
.ms-item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 9px 10px; border: 0; border-radius: 14px; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.ms-item:hover { background: var(--fill); }
.ms-item.on { background: var(--fill-2, var(--fill)); }
.ms-it { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ms-it b { font-size: 14px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-it small { color: var(--ink-3); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-meta { display: grid; justify-items: end; gap: 4px; }
.ms-meta em { font-style: normal; color: var(--ink-3); font-size: 11.5px; }
.ms-un { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--fi); color: var(--panel); font-size: 11.5px; font-weight: 800; display: grid; place-items: center; }
.ms-empty { padding: 24px 12px; display: grid; gap: 4px; text-align: center; color: var(--ink-3); }
.ms-empty b { color: var(--ink); }
.ms-new { margin: 0 10px 8px; padding: 10px; border: 1px solid var(--frame-line); border-radius: 16px; background: var(--fill); }
.ms-new ul { max-height: 260px; padding: 0; }
.ms-q { width: 100%; height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--frame-line); background: var(--panel); color: var(--ink); font: inherit; }
.ms-cap { margin: 10px 4px 4px; color: var(--ink-3); font-size: 12px; font-weight: 700; }
.ms-blank { flex: 1; display: grid; place-items: center; align-content: center; gap: 8px; text-align: center; color: var(--ink-2); padding: 20px; }
.ms-blank .soon-ic { width: 72px; height: 72px; }
.ms-ch { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--frame-line); }
.ms-ch b { display: block; font-size: 15px; }
.ms-ch small { color: var(--ink-3); font-size: 12.5px; }
.ms-ch small.on { color: #30d158; }
.ms-back { display: none; transform: rotate(90deg); }
.ms-log { flex: 1; min-height: 0; overflow: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.ms-day { display: flex; justify-content: center; margin: 10px 0 4px; }
.ms-day span { padding: 3px 12px; border-radius: 999px; background: var(--fill); color: var(--ink-3); font-size: 12px; font-weight: 650; }
.ms-m { display: flex; }
.ms-m.me { justify-content: flex-end; }
.ms-b { max-width: min(78%, 520px); padding: 9px 12px 6px; border-radius: 18px 18px 18px 6px; background: var(--fill); color: var(--ink); }
.ms-m.me .ms-b { border-radius: 18px 18px 6px 18px; background: var(--fi); color: var(--panel); }
.ms-b p { margin: 0; font-size: 14.5px; line-height: 1.5; overflow-wrap: anywhere; }
.ms-b a { color: inherit; text-decoration: underline; }
.ms-b time { display: block; margin-top: 3px; text-align: right; font-size: 11px; opacity: .6; }
.ms-img img { display: block; max-width: 260px; max-height: 300px; border-radius: 12px; object-fit: cover; }
.ms-file { display: flex; align-items: center; gap: 10px; text-decoration: none !important; }
.ms-fi { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: rgba(128, 128, 128, .22); flex: none; }
.ms-fi .icon { width: 18px; height: 18px; }
.ms-file b { display: block; font-size: 13.5px; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-file small { opacity: .7; font-size: 12px; }
.ms-voice { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.ms-vp { width: 36px; height: 36px; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; display: grid; place-items: center; }
.ms-vp .icon { width: 34px; height: 34px; }
.ms-wave { flex: 1; height: 30px; display: flex; align-items: center; gap: 2px; }
.ms-wave i { flex: 1; min-width: 2px; border-radius: 2px; background: currentColor; opacity: .35; transition: opacity 120ms; }
.ms-wave i.on { opacity: 1; }
.ms-vt { font-size: 12px; opacity: .8; }
.ms-lst { width: 280px; display: grid; gap: 8px; }
.ms-lst-img { height: 130px; border-radius: 12px; background: rgba(128, 128, 128, .25) center / cover no-repeat; }
.ms-lst-t { display: grid; gap: 2px; }
.ms-lst-t small { opacity: .7; font-size: 12px; }
.ms-lst-t b { font-size: 14px; line-height: 1.3; }
.ms-lst-t em { font-style: normal; font-weight: 800; font-size: 15px; }
.ms-lst-a { display: flex; gap: 6px; flex-wrap: wrap; }
.ms-m.me .ms-lst .btn { background: rgba(0, 0, 0, .12); color: inherit; border-color: transparent; }
.ms-comp { position: relative; display: flex; align-items: flex-end; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--frame-line); }
.ms-comp textarea { flex: 1; min-height: 44px; max-height: 140px; padding: 11px 14px; border-radius: 22px; border: 1px solid var(--frame-line); background: var(--fill); color: var(--ink); font: inherit; font-size: 14.5px; line-height: 1.4; resize: none; }
.ms-comp textarea:focus { outline: 2px solid var(--fi); outline-offset: 1px; }
.ms-ib { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: none; color: var(--ink-2); display: grid; place-items: center; cursor: pointer; }
.ms-ib:hover { background: var(--fill); color: var(--ink); }
.ms-ib .icon { width: 20px; height: 20px; }
.ms-send { background: var(--fi); color: var(--panel); }
.ms-send:hover { background: var(--fi); opacity: .88; color: var(--panel); }
.ms-send .icon { color: var(--panel); }
.ms-comp.is-rec > :not(.ms-rec) { visibility: hidden; }
.ms-rec { position: absolute; inset: 10px 12px; display: flex; align-items: center; gap: 12px; padding: 0 6px 0 14px; border-radius: 22px; background: var(--fill); }
.ms-rec b { font-size: 13.5px; }
.ms-rec .tnum { flex: 1; color: var(--ink-2); }
.ms-dot { width: 10px; height: 10px; border-radius: 50%; background: #ff453a; animation: ms-blink 1s infinite; }
@keyframes ms-blink { 50% { opacity: .25; } }
.ms-lpick { position: absolute; left: 12px; right: 12px; bottom: 74px; max-height: 320px; display: grid; grid-template-rows: auto auto minmax(0, 1fr); padding: 12px; border: 1px solid var(--frame-line); border-radius: 18px; background: var(--panel); box-shadow: 0 18px 50px -16px rgba(0, 0, 0, .7); z-index: 5; }
.ms-lpick[hidden] { display: none; }
.ms-lpick ul { list-style: none; margin: 8px 0 0; padding: 0; overflow: auto; display: grid; gap: 2px; }
.ms-lthumb { flex: none; width: 48px; height: 48px; border-radius: 10px; background: var(--fill) center / cover no-repeat; }
.ms-conv { position: relative; }
.ms-dlg { width: min(860px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid var(--frame-line); border-radius: 22px; background: var(--panel); color: var(--ink); overflow: hidden; }
.ms-dlg::backdrop { background: rgba(0, 0, 0, .6); }
.ms-dlg-in { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); max-height: calc(100dvh - 24px); position: relative; }
.ms-x { position: absolute; top: 12px; right: 12px; z-index: 2; background: rgba(0, 0, 0, .55); color: #fff; border-radius: 50%; }
.ms-gal { min-height: 0; overflow: auto; background: #000; display: flex; flex-direction: column; }
.ms-gal-main { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.ms-gal-t { display: flex; gap: 6px; padding: 8px; overflow-x: auto; }
.ms-gal-t button { flex: none; width: 64px; height: 48px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: none; cursor: pointer; opacity: .6; }
.ms-gal-t button.on { border-color: #fff; opacity: 1; }
.ms-gal-t img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ms-dlg-b { padding: 22px; overflow: auto; display: grid; align-content: start; gap: 8px; }
.ms-dlg-b small { color: var(--ink-3); font-weight: 700; }
.ms-dlg-b h2 { font-size: 20px; line-height: 1.25; }
.ms-price { font-size: 22px; font-weight: 800; margin: 0; }
.ms-addr, .ms-desc { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.55; }
.ms-facts { list-style: none; margin: 4px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ms-facts li { padding: 5px 10px; border-radius: 999px; background: var(--fill); font-size: 13px; font-weight: 650; }
.ms-ro { margin: 8px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--fill); color: var(--ink-2); font-size: 13px; }
.ms-dlg-a { margin-top: 6px; }
@media (max-width: 900px) {
  .ms-wrap { grid-template-columns: minmax(0, 1fr); height: calc(100dvh - 210px); }
  .ms-wrap .ms-conv { display: none; }
  .ms-wrap.is-conv .ms-list { display: none; }
  .ms-wrap.is-conv .ms-conv { display: flex; }
  .ms-back { display: grid; }
  .ms-dlg-in { grid-template-columns: minmax(0, 1fr); overflow: auto; }
  .ms-b { max-width: 86%; }
}

/* ---------- Overview as charts ---------- */
.ov { display: grid; gap: 16px; max-width: 1180px; }
.ov-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ov-head h2 { font-size: clamp(24px, 3vw, 32px); letter-spacing: -.025em; }
.ov-head p { margin-top: 4px; color: var(--ink-2); }
.ov-head .btn .icon { width: 17px; height: 17px; }
.ov-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ov-kpi { position: relative; display: grid; gap: 4px; padding: 16px 18px 14px; border: 1px solid var(--frame-line); border-radius: 18px; background: var(--panel); overflow: hidden; min-height: 118px; align-content: start; }
.ov-kpi small { color: var(--ink-3); font-size: 12.5px; font-weight: 700; }
.ov-kpi b { font-size: 34px; font-weight: 800; letter-spacing: -.035em; line-height: 1.05; }
.ov-kpi > span { color: var(--ink-3); font-size: 12.5px; }
.ov-spark { position: absolute; right: 12px; bottom: 12px; width: 96px; height: 30px; color: var(--fi); }
.ov-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.ov-wide { grid-column: span 3; }
.ov-grid .panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ov-legend { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 12.5px; white-space: nowrap; }
.ov-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.ov-legend i.a { background: var(--fi); } .ov-legend i.u { background: var(--fi-2); height: 3px; border-radius: 2px; margin-left: 6px; }
.ov-chart { width: 100%; height: auto; display: block; }
.ov-grid line, .ov-grid { stroke: none; }
.ov-chart .ov-grid { stroke: var(--frame-line); stroke-width: 1; }
.ov-ax { fill: var(--ink-3); font-size: 11px; }
.ov-st { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 16px; align-items: center; }
.ov-donut { width: 140px; height: 140px; }
.ov-dn { fill: var(--ink); font-size: 26px; font-weight: 800; }
.ov-dl { fill: var(--ink-3); font-size: 10px; }
.ov-leg { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.ov-leg li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.ov-leg li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-leg i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.ov-leg b { color: var(--ink); }
.ov-hb { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ov-hb li { display: grid; grid-template-columns: 90px minmax(0, 1fr) 30px; align-items: center; gap: 10px; font-size: 13px; }
.ov-hb-l { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-hb-t { height: 10px; border-radius: 999px; background: var(--fill); overflow: hidden; }
.ov-hb-t i { display: block; height: 100%; border-radius: inherit; background: var(--fi); }
.ov-hb b { text-align: right; }
.ov-val { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ov-val small { display: block; color: var(--ink-3); font-size: 12.5px; font-weight: 700; }
.ov-val b { font-size: 30px; letter-spacing: -.03em; }
.ov-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; height: 120px; }
.ov-week > div { display: grid; justify-items: center; align-content: end; gap: 4px; height: 100%; }
.ov-week b { font-size: 12px; color: var(--ink-2); min-height: 14px; }
.ov-week span { width: 100%; max-width: 30px; border-radius: 8px; background: var(--fi); opacity: .85; }
.ov-week .is-today span { opacity: 1; }
.ov-week small { color: var(--ink-3); font-size: 11.5px; }
.ov-none { color: var(--ink-3); margin: 0; }
.ov-empty { padding: 22px; }
.ov-empty p { color: var(--ink-2); margin-top: 4px; }
.ov-more { justify-self: end; display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); text-decoration: none; font-size: 13.5px; font-weight: 650; }
.ov-more .icon { width: 14px; height: 14px; }
.ov-more:hover { color: var(--ink); }
@media (max-width: 1000px) { .ov-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ov-grid { grid-template-columns: minmax(0, 1fr); } .ov-wide { grid-column: auto; } }

/* ---------- side bar icons: a few carry a colour that matches what the page is (the others stay silver) ---------- */
.nav a[href='/dashboard'] .icon.fi { color: #0a84ff; }
.nav a[href$='/analytics'] .icon.fi { color: #bf5af2; }
.nav a[href$='/deals'] .icon.fi { color: #30d158; }
.nav a[href$='/tasks'] .icon.fi { color: #64a7ff; }
.nav a[href$='/meetings'] .icon.fi { color: #ff6b61; }
.nav a[href$='/messenger'] .icon.fi { color: #30d158; }
.nav a[href$='/ai'] .icon.fi { color: #bf5af2; }
.nav a[href$='/guide'] .icon.fi { color: #5ac8fa; }
:root[data-theme='light'] .nav a[href='/dashboard'] .icon.fi { color: #0a6fe0; }
:root[data-theme='light'] .nav a[href$='/analytics'] .icon.fi { color: #9b3fd1; }
:root[data-theme='light'] .nav a[href$='/deals'] .icon.fi { color: #1f9d3d; }
:root[data-theme='light'] .nav a[href$='/tasks'] .icon.fi { color: #2f6fd6; }
:root[data-theme='light'] .nav a[href$='/meetings'] .icon.fi { color: #e0443a; }
:root[data-theme='light'] .nav a[href$='/messenger'] .icon.fi { color: #1f9d3d; }
:root[data-theme='light'] .nav a[href$='/ai'] .icon.fi { color: #9b3fd1; }
:root[data-theme='light'] .nav a[href$='/guide'] .icon.fi { color: #1a8fc4; }
:root[data-theme='light'] .nav a[href$='/facebook'] .icon.fi { color: #1877f2; }
:root[data-theme='light'] .nav a[href$='/whatsapp'] .icon.fi { color: #1ea952; }

/* ---------- top bar: language, light/dark and the bell are the same round buttons ---------- */
.top-actions { gap: 8px; }
.tb-btn { position: relative; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 999px; border: 1px solid var(--frame-line); background: var(--fill); color: var(--ink-2); cursor: pointer; transition: color var(--t-fast), background var(--t-fast), border-color var(--t-fast); }
.tb-btn:hover, .tb-btn[aria-expanded='true'] { color: var(--ink); background: var(--raised); border-color: var(--ink-3); }
.tb-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tb-btn .icon { width: 19px; height: 19px; }
.tb-menu { position: fixed; z-index: 90; min-width: 170px; padding: 6px; border: 1px solid var(--frame-line); border-radius: 16px; background: var(--panel); box-shadow: 0 18px 50px -16px rgba(0, 0, 0, .7); animation: menu-in 220ms var(--ease) both; }
.tb-menu button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 42px; padding: 0 12px; border: 0; border-radius: 10px; background: none; color: var(--ink); font: inherit; font-size: 14.5px; font-weight: 600; text-align: left; cursor: pointer; }
.tb-menu button:hover { background: var(--fill); }
.tb-menu .icon { width: 16px; height: 16px; color: var(--fi); }
@media (max-width: 640px) { .tb-btn { width: 42px; height: 42px; } .top-actions { gap: 6px; } }

/* ---- Kei AI: the Beta tag and the chat ---- */
em.beta { font-style: normal; margin-left: 7px; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--ink-3); font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; vertical-align: middle; position: relative; top: -1px; line-height: 1.4; }
h1 em.beta, .topbar em.beta { font-size: 11px; padding: 1px 7px; vertical-align: middle; top: -1px; }
.content:has(.kei) { display: flex; padding: 0; overflow: hidden; scroll-behavior: auto; }
.content:has(.kei) > .view { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.kei { flex: 1; min-width: 0; min-height: 0; display: grid; grid-template-columns: 272px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); border-top: 1px solid var(--line); position: relative; overflow: hidden; }
.kei-side { display: flex; flex-direction: column; gap: 10px; padding: 14px 12px; border-right: 1px solid var(--line); overflow-y: auto; min-height: 0; }
.kei-newbtn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: transparent; color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.kei-newbtn:hover { background: var(--fill); }
.kei-newbtn .icon { width: 18px; height: 18px; }
.kei-list h3 { margin: 14px 10px 4px; font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
.kei-row { display: flex; align-items: center; border-radius: 10px; }
.kei-row:hover, .kei-row.on { background: var(--fill); }
.kei-row > button:first-child { flex: 1; min-width: 0; text-align: left; padding: 9px 10px; border: 0; background: none; color: var(--ink-2); font: inherit; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.kei-row.on > button:first-child { color: var(--ink); font-weight: 600; }
.kei-x { flex: none; width: 26px; height: 26px; margin-right: 4px; border: 0; border-radius: 8px; background: none; color: var(--ink-3); font-size: 16px; line-height: 1; cursor: pointer; opacity: 0; }
.kei-row:hover .kei-x, .kei-x:focus-visible { opacity: 1; }
.kei-x:hover { background: var(--line); color: var(--ink); }
.kei-none { margin: 10px; color: var(--ink-3); font-size: 13px; }
.kei-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.kei-bar { display: flex; align-items: center; gap: 10px; padding: 10px 20px 0; }
.kei-ic.kei-toggle { display: none; }
.kei-note { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--ink-3); font-size: 12.5px; line-height: 1.4; }
.kei-note .icon { flex: none; width: 16px; height: 16px; }
.kei-log { flex: 1; overflow-y: auto; padding: 18px 20px; display: flex; flex-direction: column; min-height: 0; }
.kei-thread { width: min(780px, 100%); margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.kei-m { display: flex; flex-direction: column; gap: 4px; max-width: 88%; }
.kei-m.user { align-self: flex-end; align-items: flex-end; }
.kei-who { font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
.kei-b { padding: 10px 14px; border-radius: 16px; background: var(--fill); color: var(--ink); font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
.kei-m.assistant .kei-b { background: none; padding-left: 0; }
.kei-m.user .kei-b { background: var(--fi); color: var(--panel); }
.kei-cp { align-self: flex-start; display: inline-grid; place-items: center; width: 30px; height: 30px; margin-left: -6px; border: 0; border-radius: 8px; background: none; color: var(--ink-3); font: inherit; font-size: 12px; cursor: pointer; }
.kei-cp:hover { background: var(--fill); color: var(--ink); }
.kei-cp .icon { width: 16px; height: 16px; }
.kei-cp.done { color: var(--ink); }
.kei-cp[data-retry] { width: auto; padding: 0 10px; margin-left: 0; }
.kei-dots { display: inline-flex; gap: 5px; align-items: center; }
.kei-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); animation: kei-dot 1s infinite ease-in-out; }
.kei-dots i:nth-child(2) { animation-delay: .15s; } .kei-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes kei-dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.kei-empty { margin: auto; text-align: center; max-width: 560px; padding: 12px; }
.kei-empty h2 { margin: 0 0 6px; font-size: 26px; }
.kei-empty p { margin: 0 0 20px; color: var(--ink-3); }
.kei-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.kei-chips button { padding: 9px 15px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--ink-2); font: inherit; font-size: 13.5px; cursor: pointer; }
.kei-chips button:hover { background: var(--fill); color: var(--ink); }
.kei-dock { width: min(780px, 100%); margin: 0 auto; padding: 0 20px 6px; box-sizing: border-box; }
.kei-att { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 8px; }
.kei-thumb { position: relative; width: 54px; height: 54px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.kei-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kei-thumb button, .kei-fchip button { border: 0; background: var(--fi); color: var(--panel); border-radius: 50%; width: 18px; height: 18px; line-height: 1; cursor: pointer; font-size: 13px; padding: 0; }
.kei-thumb button { position: absolute; top: 3px; right: 3px; }
.kei-fchip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; border-radius: 999px; background: var(--fill); font-size: 13px; }
.kei-form { display: flex; align-items: flex-end; gap: 8px; padding: 8px; border: 1px solid var(--line-2); border-radius: 18px; background: var(--panel); }
.kei-form textarea { flex: 1; resize: none; max-height: 160px; padding: 9px 6px; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 15px; line-height: 1.4; outline: none; }
.kei-form:focus-within { border-color: var(--ink-3); }
.kei-ic { flex: none; width: 38px; height: 38px; border-radius: 12px; border: 0; background: transparent; color: var(--ink-2); display: grid; place-items: center; cursor: pointer; }
.kei-ic:hover { background: var(--fill); }
.kei-ic.kei-send { background: var(--fi); color: var(--panel); }
.kei-ic.kei-send:hover { opacity: .88; }
.kei-ic.kei-send .icon { color: var(--panel); }
.kei-left { display: block; padding: 6px 4px 0; color: var(--ink-3); font-size: 12px; min-height: 18px; }
@media (max-width: 900px) {
  .kei { grid-template-columns: minmax(0, 1fr); }
  .kei-side { position: absolute; inset: 0 auto 0 0; width: min(300px, 86%); z-index: 5; background: var(--panel); transform: translateX(-102%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(0, 0, 0, .25); }
  .kei.side-open .kei-side { transform: none; }
  .kei-ic.kei-toggle { display: grid; }
  .kei-m { max-width: 94%; }
}
@media (prefers-reduced-motion: reduce) { .kei-dots i { animation: none; opacity: .6; } .kei-side { transition: none; } }

.kei-av { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; vertical-align: middle; margin-right: 8px; box-shadow: 0 0 0 1px var(--line); background: var(--fill); }
.kei-who { display: flex; align-items: center; }
.kei-who b { font-weight: 600; }
.kei-av-bar { width: 32px; height: 32px; margin-right: 2px; }
.kei-hero { width: 96px; height: 96px; border-radius: 50%; margin: 0 auto 14px; display: block; box-shadow: 0 0 0 1px var(--line), 0 10px 30px rgba(0, 0, 0, .18); }
.kei-m.assistant .kei-b { padding-left: 32px; }

dialog.kei-cf { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100dvh; margin: auto; }
dialog.kei-cf::backdrop { background: rgba(0, 0, 0, .5); }
.kei-cf-card { width: min(380px, calc(100vw - 32px)); display: grid; gap: 18px; padding: 24px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 18px; box-shadow: var(--shadow-pop); }
.kei-cf-card p { margin: 0; font-size: 16px; font-weight: 600; color: var(--ink); line-height: 1.4; }
.kei-cf-a { display: flex; justify-content: flex-end; gap: 10px; }

.kei-b a[data-go] { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.kei-act { margin-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 12px 10px 14px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--panel); max-width: 560px; }
.kei-act-l { font-size: 14px; color: var(--ink); overflow-wrap: anywhere; flex: 1 1 200px; }
.kei-act-b { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kei-act-s { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-style: normal; color: var(--ink-3); }
.kei-act.done .kei-act-s { color: var(--ink); }
.kei-act-s .icon { width: 16px; height: 16px; }
.kei-act-e { color: var(--bad); font-size: 12.5px; }
.kei-act.no { opacity: .6; }
.kei-m.assistant .kei-act { margin-left: 32px; }

.kei-b p { margin: 0 0 8px; } .kei-b p:last-child { margin-bottom: 0; }
.kei-b ul, .kei-b ol { margin: 4px 0 8px; padding-left: 20px; } .kei-b li { margin: 2px 0; }
.kei-m.assistant .kei-blk, .kei-m.assistant .kei-act { margin-left: 32px; }
.kei-blk { margin-top: 10px; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--panel); max-width: 620px; }
.kei-blk h4 { margin: 0 0 12px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); letter-spacing: .02em; }
.kei-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 10px; }
.kei-tile { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--fill); }
.kei-tile b { font-size: 24px; font-weight: 700; color: var(--ink); line-height: 1.1; }
.kei-tile span { font-size: 12px; color: var(--ink-3); }
.kei-bars { display: grid; gap: 9px; }
.kei-bar-r { display: grid; grid-template-columns: minmax(70px, 130px) 1fr 34px; align-items: center; gap: 10px; font-size: 13px; }
.kei-bl { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kei-bt { height: 10px; border-radius: 6px; background: var(--fill); overflow: hidden; }
.kei-bt i { display: block; height: 100%; border-radius: 6px; background: var(--fi); transform-origin: left; animation: kei-grow .6s var(--ease, ease) both; }
.kei-bar-r b { text-align: right; color: var(--ink); font-weight: 600; }
@keyframes kei-grow { from { transform: scaleX(0); } }
.kei-rows { list-style: none; margin: 0; padding: 0; display: grid; }
.kei-rows li { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.kei-rows li:first-child { border-top: 0; padding-top: 0; }
.kei-rows b { display: block; font-size: 14px; font-weight: 600; color: var(--ink); }
.kei-rows small { display: block; margin-top: 2px; color: var(--ink-3); font-size: 12.5px; }
.kei-rows em { font-style: normal; font-weight: 700; color: var(--ink); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .kei-bt i { animation: none; } }

.kei-form textarea:focus, .kei-form textarea:focus-visible { outline: none; box-shadow: none; }

.avatar.avatar-ini { display: inline-grid; place-items: center; border-radius: 50%; color: #fff; font-weight: 600; line-height: 1; letter-spacing: 0; user-select: none; flex: none; }

/* an icon at the start of a field always sits 14px in from the edge, with the text 10px after it (some fields put the
   icon in without the .lead class) */
.control:not(.wx-search) > svg.icon:first-child:not(.lead) { flex: none; margin-left: 14px; color: var(--ink-3); }
.control:not(.wx-search) > svg.icon:first-child:not(.lead) + :is(input, select) { padding-left: 10px; }

/* numbers in small pills sit in their optical middle: same-width digits, and the line trimmed to the digits' own height */
:is(.badge, .nav-badge, .tabs button b, .sources .src b, .cp-hint, .wx-badge, .ks-badge, .ms-un, .bell-n, .cur-sw button, .tx-bar .badge) {
  font-variant-numeric: tabular-nums; line-height: 1; text-box: trim-both cap alphabetic;
}

/* phones: the page title gets the room it needs; the round buttons shrink to 38px and the profile shows only the photo */
@media (max-width: 640px) {
  :root .tb-btn, :root .topbar .bell { width: 38px; height: 38px; }
  :root .top-actions { gap: 5px; }
  :root .topbar .profile-btn { padding: 0 2px; height: 40px; background: none; }
  :root .topbar .profile-btn .chev { display: none; }
  :root .topbar h1 { font-size: 17px; flex: 1 1 auto; }
  /* language and theme are in the profile menu: on a phone the bar keeps Notes, the bell and the photo */
  :root .topbar .tb-lang, :root .topbar .tb-theme { display: none; }
}

/* phones: the notifications sheet spans the screen with the same 12px margin on both sides */
@media (max-width: 640px) {
  :root .notes-pop { left: 12px !important; right: 12px !important; width: auto !important; max-width: none !important; }
  :root .notes-pop .note-txt, :root .notes-pop b { overflow-wrap: anywhere; }
}
@media (max-width: 640px) { :root .notes-head { flex-wrap: wrap; row-gap: 4px; } :root .notes-head > button, :root .notes-head .btn { white-space: normal; text-align: right; } }

/* the currency switch: each symbol sits in the exact middle of its thumb (the shared button reset inherits the
   surrounding text-align, which pushed $ and ₾ to the left) */
.cur-sw button { display: inline-grid; place-items: center; text-align: center; }

/* workspace and admin: a hover answers at once. Colours, backgrounds, borders, shadows and fades change instantly;
   only real movement (a drawer sliding, a switch's knob, a bar filling) keeps its motion */
body:is([data-area='agent'], [data-area='admin']) *, body:is([data-area='agent'], [data-area='admin']) *::before, body:is([data-area='agent'], [data-area='admin']) *::after {
  transition-property: transform, translate, scale, rotate, width, height, max-height, grid-template-rows, grid-template-columns, clip-path, inset, left, right, top, bottom !important;
}
/* pages open in their finished state (script.js stops the entrances); a chart's line is already drawn */
body:is([data-area='agent'], [data-area='admin']) .line-chart .line { stroke-dashoffset: 0; }

/* a skeleton shows only when loading takes a moment: on a fast connection the page simply appears */
.skeleton { opacity: 0; animation: sk-wait 0s linear 160ms forwards; }
@keyframes sk-wait { to { opacity: 1; } }

/* the top bar keeps Notes, the bell and the profile: language and light/dark live in the profile menu */
:root .topbar .tb-lang, :root .topbar .tb-theme { display: none; }
/* the frame itself (rail, its links, the top band, the rail note, menu items) is simply there too */
body:is([data-area='agent'], [data-area='admin']) :is(.rail, .rail a, .nav a, .rail-note, .admin-band, .menu > *, .custom-range) { animation: none; }
/* the profile menu reopened after a language change appears in place: no opening motion, the pill already set */
.menu.no-anim, .menu.no-anim * { animation: none !important; transition: none !important; }

/* the side bar, a size down (Nov 2026): narrower (272 → 236px), the same height, and its pages a step smaller */
@media (min-width: 1181px) {
  body[data-area='agent'] .shell { grid-template-columns: 236px minmax(0, 1fr); }
  body:is([data-area='agent'], [data-area='admin']) .nav a { height: 32px; gap: 9px; font-size: 13.5px; }
  body:is([data-area='agent'], [data-area='admin']) .nav a .icon, body:is([data-area='agent'], [data-area='admin']) .nav a .icon.fi { width: 17px; height: 17px; }
  body:is([data-area='agent'], [data-area='admin']) .nav-group { font-size: 11.5px; }
}
/* the Notes button's icon is notes-yellow (Apple's system yellow), the button itself stays glass */
.topbar .tb-pad .icon, .topbar .tb-pad:hover .icon { color: #ffd60a; }
:root[data-theme='light'] .topbar .tb-pad .icon { color: #e0a800; }
/* the "more below" hint sits at the bar's right edge, clear of the page names under it */
@media (min-width: 1181px) { body:is([data-area='agent'], [data-area='admin']) .nav-down { left: auto; right: 12px; margin-left: 0; } }
.new-listing .options[hidden] { display: none; }

/* short labels never break over two lines: a number and its word, a time, a counter, a tag or a button's words stay
   together ("21 matches", "2 d ago"); a long one is shortened with … instead */
.cl-card-foot > *, .cl-due, .cl-last, .cl-m, .tag, .badge, .pill, .delta, .chips button, .date-chips button, .ad-num span,
.rd-dup a, .ad-table td, .ad-table th { white-space: nowrap; }
.cl-card-foot { min-width: 0; }
.cl-card-foot > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ad-table td { max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
/* an on/off switch keeps its hidden checkbox inside itself (it pushed Admin → Radar wider than a phone) */
.ad-switch, .switch, .check { position: relative; }
/* Admin → Texts: the bar fits a phone; the switches scroll inside themselves, the address shortens */
.tx-bar > * { min-width: 0; max-width: 100%; }
.tx-seg { overflow-x: auto; scrollbar-width: none; }
.tx-addr { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* the MCP page's code lines scroll sideways instead of running out */
.mcp code, [class*='mcp'] pre { overflow-x: auto; max-width: 100%; }
:is(.chips, .date-chips) button { white-space: nowrap !important; }
/* Keyper: the chats panel's top row holds New chat and a close button (the close shows where the panel floats) */
.kei-side-top { display: flex; align-items: center; gap: 8px; }
.kei-side-top .kei-newbtn { flex: 1; }
.kei-side-x { display: none; }
@media (max-width: 900px) { .kei-side-x { display: grid; } }
