/* =====================================================================
   EstatePilot CRM · admin.css
   Plain, calm, white surfaces on warm paper. Manrope UI, Fraunces titles.
   ===================================================================== */
:root {
  --bg: #f6f4f0; --surface: #fff; --surface-2: #faf8f5;
  --ink: #1f1b16; --ink-2: #4a4238; --muted: #8a7f70; --faint: #b3a99b;
  --line: rgba(31, 27, 22, .09); --line-2: rgba(31, 27, 22, .16);
  --tc: #c2512c; --tc-d: #9c3d1f; --tc-bg: #fbe9e1;
  --sage: #5c7a64; --sage-d: #4a6552; --sage-bg: #e8efe9;
  --gold: #c9952b; --private: #fbf6ec;
  --ok: #2e7d4f; --ok-bg: #e2f3e8; --warn: #9a6a12; --warn-bg: #fbf0d9; --err: #b3261e;
  --r: 12px; --r-sm: 8px;
  --sh: 0 1px 2px rgba(31, 27, 22, .04), 0 1px 6px rgba(31, 27, 22, .03);
  --sh-lg: 0 24px 60px rgba(31, 27, 22, .20), 0 4px 14px rgba(31, 27, 22, .08);
  --sb: 244px;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 var(--font); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
body.no-scroll { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--tc-d); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--tc); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.code { font-weight: 700; letter-spacing: .02em; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.nowrap { white-space: nowrap; }
.num { text-align: right; white-space: nowrap; }
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.ico-sm { width: 15px; height: 15px; }

/* ---------------- shell ---------------- */
.app { display: flex; min-height: 100vh; background: linear-gradient(to right, var(--surface) var(--sb), transparent var(--sb)); }
.sb { width: var(--sb); flex: none; position: sticky; top: 0; height: 100vh; background: var(--surface); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 18px 14px 16px; overflow-y: auto; z-index: 40; }
.sb-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.logo-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--tc); color: #fff; display: grid; place-items: center; flex: none; }
.logo-mark svg { width: 20px; height: 20px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.brand-txt b { display: block; font-size: 15px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; }
.brand-txt small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.sb-nav { display: flex; flex-direction: column; gap: 2px; }
.sb-link { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 9px; color: var(--ink-2); font-weight: 600; font-size: 14px; }
.sb-link:hover { background: var(--bg); text-decoration: none; color: var(--ink); }
.sb-link.is-active { background: var(--tc-bg); color: var(--tc-d); }
.sb-link .ico { color: var(--muted); }
.sb-link.is-active .ico { color: var(--tc); }
.sb-count { margin-left: auto; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 10px; background: var(--tc); color: #fff; font-size: 11.5px; font-weight: 800; display: inline-grid; place-items: center; }
.sb-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.sb-foot .sb-link { color: var(--sage-d); }
.sb-foot .sb-link .ico { color: var(--sage); }
.sb-reset { justify-content: flex-start; }
.sb-note { font-size: 11.5px; line-height: 1.45; color: var(--muted); padding: 0 10px; }
.sb .sb-close { display: none; margin-left: auto; }
.topbar { display: none; }
.sb-scrim { display: none; }

.main { flex: 1; min-width: 0; padding: 28px 32px 64px; }
.wrap { max-width: 1320px; margin: 0 auto; }
.ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px 20px; flex-wrap: wrap; margin-bottom: 22px; }
.ph h1 { font-family: var(--serif); font-weight: 600; font-size: 30px; letter-spacing: -.015em; }
.ph p { color: var(--muted); margin-top: 4px; }
.ph-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

@media (max-width: 960px) {
  .topbar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 30; height: 56px; padding: 0 12px;
    background: var(--surface); border-bottom: 1px solid var(--line); }
  .topbar .brand-txt b { font-size: 14px; }
  .app { display: block; }
  .sb { position: fixed; left: 0; top: 0; bottom: 0; height: auto; width: min(290px, 86vw); transform: translateX(-102%); transition: transform .22s ease; box-shadow: var(--sh-lg); z-index: 70; }
  body.nav-open .sb { transform: none; }
  .sb .sb-close { display: inline-grid; }
  .app { background: none; }
  .sb-scrim { display: block; position: fixed; inset: 0; background: rgba(31, 27, 22, .35); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 65; }
  body.nav-open .sb-scrim { opacity: 1; pointer-events: auto; }
  .main { padding: 20px 16px 56px; }
  .ph h1 { font-size: 25px; }
}

/* ---------------- buttons ---------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 15px; border-radius: 9px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink); font-weight: 700; font-size: 13.5px; cursor: pointer; white-space: nowrap; text-decoration: none !important; transition: background .15s, border-color .15s, color .15s; }
.btn:hover { background: var(--surface-2); border-color: rgba(31, 27, 22, .26); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--tc); border-color: var(--tc); color: #fff; }
.btn-primary:hover { background: var(--tc-d); border-color: var(--tc-d); }
.btn-sage { background: var(--sage); border-color: var(--sage); color: #fff; }
.btn-sage:hover { background: var(--sage-d); border-color: var(--sage-d); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: rgba(31, 27, 22, .05); border-color: transparent; }
.btn-quiet-danger { color: #8a3a26; }
.btn-sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn-xs { height: 26px; padding: 0 9px; font-size: 12px; border-radius: 7px; gap: 5px; }
.btn-block { width: 100%; }
.icon-btn { width: 36px; height: 36px; border-radius: 9px; border: 0; background: transparent; color: var(--ink-2); display: inline-grid; place-items: center; cursor: pointer; flex: none; }
.icon-btn:hover { background: rgba(31, 27, 22, .06); color: var(--ink); }
.btn-wa { color: #1d7a46; }
.linkish { background: none; border: 0; padding: 0; color: var(--tc-d); font-weight: 700; cursor: pointer; font-size: inherit; }
.linkish:hover { text-decoration: underline; }

/* segmented control */
.seg { display: inline-flex; padding: 3px; background: #efebe5; border-radius: 10px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 0 13px; height: 32px; border-radius: 8px; font-weight: 700; font-size: 13px; color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(31, 27, 22, .14); }

/* ---------------- chips ---------------- */
.chip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 11px; font-size: 11.5px; font-weight: 800; white-space: nowrap; letter-spacing: .01em; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.chip.no-dot::before { display: none; }
.tag { display: inline-flex; align-items: center; height: 21px; padding: 0 8px; border-radius: 6px; background: #f0ece6; color: var(--ink-2); font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.filter-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.fchip { height: 32px; padding: 0 12px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 700; font-size: 12.5px; color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.fchip b { font-weight: 800; color: var(--muted); }
.fchip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.fchip[aria-pressed="true"] b { color: rgba(255, 255, 255, .7); }

/* ---------------- cards ---------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh); }
.card-pad { padding: 18px 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 12px; }
.card-head h2 { font-size: 15px; font-weight: 800; }
.card-head .sub { color: var(--muted); font-size: 12.5px; }
.card-body { padding: 0 20px 18px; }
.grid { display: grid; gap: 16px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .g-main, .g-3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .g-2 { grid-template-columns: minmax(0, 1fr); } }
.empty { padding: 26px 16px; text-align: center; color: var(--muted); font-size: 13.5px; }

/* tiles */
.tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.tile { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; color: inherit; text-decoration: none !important; transition: border-color .15s; }
a.tile:hover { border-color: rgba(194, 81, 44, .4); }
.tile .lbl { color: var(--muted); font-size: 12.5px; font-weight: 700; }
.tile .val { font-size: 27px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.tile .foot { font-size: 12px; color: var(--muted); }
.tile.accent .val { color: var(--tc-d); }
@media (max-width: 1200px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .tile { padding: 13px 14px; } .tile .val { font-size: 22px; } .tiles .tile:last-child:nth-child(odd) { grid-column: 1 / -1; } }

/* toolbar / filters */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.toolbar .search { flex: 1 1 240px; max-width: 360px; position: relative; }
.toolbar .search .ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.toolbar .search input { padding-left: 36px; }
.toolbar select { width: auto; min-width: 130px; }
.toolbar .spacer { flex: 1; }
@media (max-width: 640px) { .toolbar .search { max-width: none; flex-basis: 100%; } .toolbar select { flex: 1 1 40%; min-width: 0; } }

/* ---------------- forms ---------------- */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label, .flabel { font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.req { color: var(--tc); }
.opt { color: var(--faint); font-weight: 600; }
input[type=text], input[type=tel], input[type=email], input[type=number], input[type=search], input[type=datetime-local], input[type=date], select, textarea {
  width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--surface); color: var(--ink); font-size: 14px; transition: border-color .15s, box-shadow .15s; }
textarea { height: auto; padding: 10px 12px; line-height: 1.5; resize: vertical; min-height: 76px; }
select { appearance: none; -webkit-appearance: none; padding-right: 32px;
  background: var(--surface) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1.5l5 5 5-5' fill='none' stroke='%238a7f70' stroke-width='1.6' stroke-linecap='round'/></svg>") no-repeat right 12px center; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--tc); box-shadow: 0 0 0 3px rgba(194, 81, 44, .14); }
input:disabled, select:disabled, textarea:disabled { background: #f4f1ec; color: var(--muted); }
.field.has-err input, .field.has-err select, .field.has-err textarea { border-color: var(--err); }
.err { color: var(--err); font-size: 12px; font-weight: 600; min-height: 0; }
.err:empty { display: none; }
.hint { color: var(--muted); font-size: 12px; }
.inp-wrap { display: flex; align-items: stretch; border: 1px solid var(--line-2); border-radius: 9px; background: var(--surface); overflow: hidden; }
.inp-wrap:focus-within { border-color: var(--tc); box-shadow: 0 0 0 3px rgba(194, 81, 44, .14); }
.field.has-err .inp-wrap { border-color: var(--err); }
.inp-wrap input { border: 0 !important; box-shadow: none !important; border-radius: 0; min-width: 0; }
.inp-wrap .pre, .inp-wrap .suf { display: grid; place-items: center; padding: 0 11px; background: #f6f3ee; color: var(--muted); font-weight: 700; font-size: 13px; white-space: nowrap; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 14px; }
.form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 760px) { .form-grid.cols-3, .form-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .form-grid { grid-template-columns: minmax(0, 1fr); } .form-grid.cols-3, .form-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.check { display: inline-flex; align-items: flex-start; gap: 9px; cursor: pointer; font-weight: 600; font-size: 13.5px; line-height: 1.4; }
.check input { width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--tc); flex: none; }
.radio-cards { display: grid; gap: 8px; }
.radio-card { display: flex; gap: 11px; align-items: flex-start; border: 1px solid var(--line-2); border-radius: 10px; padding: 11px 13px; cursor: pointer; background: var(--surface); }
.radio-card:hover { border-color: rgba(31, 27, 22, .3); }
.radio-card input { margin: 3px 0 0; accent-color: var(--tc); width: 16px; height: 16px; flex: none; }
.radio-card b { display: block; font-size: 14px; }
.radio-card span { color: var(--muted); font-size: 12.5px; }
.radio-card:has(input:checked) { border-color: var(--tc); background: #fffaf7; box-shadow: 0 0 0 2px rgba(194, 81, 44, .12); }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: 10px; background: var(--sage-bg); color: #34503d; font-size: 12.8px; line-height: 1.45; }
.note .ico { color: var(--sage); margin-top: 1px; }
.note.warm { background: var(--private); color: #6b5530; }
.note.warm .ico { color: var(--gold); }
.note.warn { background: var(--warn-bg); color: #6d4c0f; }
.form-stack { display: flex; flex-direction: column; gap: 14px; }
.money-help { font-size: 12px; color: var(--sage-d); font-weight: 700; }

/* switch */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 700; font-size: 13.5px; }
.switch input { appearance: none; -webkit-appearance: none; width: 38px; height: 22px; border-radius: 11px; background: #d9d2c7; position: relative; cursor: pointer; transition: background .15s; flex: none; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .15s; }
.switch input:checked { background: var(--sage); }
.switch input:checked::after { transform: translateX(16px); }

/* ---------------- tables ---------------- */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 800; padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.tbl th:first-child { border-top-left-radius: var(--r); }
.tbl th:last-child { border-top-right-radius: var(--r); }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tr.clickable { cursor: pointer; }
.tbl tr.clickable:hover td { background: #fcfaf7; }
.tbl .t-main b { display: block; font-weight: 700; }
.tbl .t-main span { color: var(--muted); font-size: 12.5px; }
.tbl .t-thumb { width: 64px; height: 46px; border-radius: 7px; object-fit: cover; background: var(--bg); }
.tbl .t-actions { text-align: right; white-space: nowrap; }
.cell-stack { display: flex; flex-direction: column; gap: 2px; }
@media (max-width: 760px) {
  .tbl-card.card { background: transparent; border: 0; box-shadow: none; }
  table.rt, .rt tbody, .rt tr, .rt td { display: block; width: 100%; }
  .rt thead { display: none; }
  .rt tr { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 10px; padding: 10px 14px; box-shadow: var(--sh); }
  .rt td { border: 0 !important; padding: 5px 0; display: flex; justify-content: space-between; align-items: center; gap: 14px; text-align: right; }
  .rt td::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 700; text-align: left; flex: none; }
  .rt td.rt-main { display: block; text-align: left; padding-bottom: 8px; margin-bottom: 4px; border-bottom: 1px solid var(--line) !important; }
  .rt td.rt-main::before, .rt td.rt-noLabel::before { display: none; }
  .rt td.t-actions { justify-content: flex-end; }
  .rt td:empty { display: none; }
  .rt .t-thumb { display: none; }
}

/* ---------------- property bits ---------------- */
.pmini { display: flex; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.pmini img { width: 86px; height: 64px; border-radius: 8px; object-fit: cover; flex: none; background: var(--bg); }
.pmini .pm-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pmini b { display: block; font-size: 14px; line-height: 1.3; margin: 2px 0; }
.pmini .pm-meta { color: var(--muted); font-size: 12.5px; }
.owner-lock { display: flex; gap: 9px; align-items: center; padding: 9px 12px; margin-top: 8px; border-radius: 9px; background: var(--private); color: #6b5530; font-size: 12.5px; font-weight: 600; }
.owner-lock .ico { color: var(--gold); }
.owner-lock .code { color: #4d3c1d; }

/* ---------------- toasts ---------------- */
.toasts { position: fixed; left: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; pointer-events: none; width: min(400px, calc(100vw - 32px)); }
@media (max-width: 640px) { .toasts { left: 16px; right: 16px; width: auto; bottom: auto; top: 12px; flex-direction: column-reverse; align-items: stretch; } }
.toast { background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 11px; font-weight: 600; font-size: 13.5px; box-shadow: var(--sh-lg); display: flex; gap: 10px; align-items: flex-start; pointer-events: auto;
  animation: tin .22s ease; max-width: 100%; }
.toast .ico { color: #9fc3a8; margin-top: 1px; }
.toast.is-warn .ico { color: #f0b98f; }
.toast.out { opacity: 0; transform: translateY(6px); transition: all .25s; }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } }

/* ---------------- modal ---------------- */
.mdl-wrap { position: fixed; inset: 0; z-index: 90; background: rgba(31, 27, 22, .42); display: flex; align-items: center; justify-content: center; padding: 24px; animation: fadein .15s ease; }
@keyframes fadein { from { opacity: 0; } }
.mdl { background: var(--surface); border-radius: 16px; box-shadow: var(--sh-lg); width: 100%; max-height: calc(100vh - 48px); display: flex; flex-direction: column; animation: mdlin .2s cubic-bezier(.2, .8, .2, 1); }
@keyframes mdlin { from { opacity: 0; transform: translateY(10px) scale(.985); } }
.mdl-sm { max-width: 440px; } .mdl-md { max-width: 560px; } .mdl-lg { max-width: 820px; } .mdl-xl { max-width: 1040px; }
.mdl-form { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.mdl-head { display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.mdl-head h2 { font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.mdl-head p { color: var(--muted); font-size: 13px; margin-top: 3px; }
.mdl-head .icon-btn { margin: -6px -8px 0 auto; }
.mdl-body { padding: 18px 20px; overflow-y: auto; flex: 1; min-height: 0; }
.mdl-foot { display: flex; gap: 8px; justify-content: flex-end; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; background: var(--surface-2); border-radius: 0 0 16px 16px; }
.mdl-foot .left { margin-right: auto; }
@media (max-width: 640px) {
  .mdl-wrap { padding: 0; align-items: flex-end; }
  .mdl { max-height: 94vh; border-radius: 16px 16px 0 0; }
  .mdl-lg, .mdl-xl { max-height: 100vh; height: 100%; border-radius: 0; }
  .mdl-foot { border-radius: 0; }
  .mdl-foot .btn { flex: 1 1 auto; }
  .mdl-foot .left { flex-basis: 100%; margin: 0; }
}

/* ---------------- drawer ---------------- */
.drw-scrim { position: fixed; inset: 0; background: rgba(31, 27, 22, .3); z-index: 80; animation: fadein .15s; }
.drw { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--surface); z-index: 81; box-shadow: var(--sh-lg); display: flex; flex-direction: column; animation: drin .22s cubic-bezier(.2, .8, .2, 1); }
.drw:focus { outline: none; }
@keyframes drin { from { transform: translateX(30px); opacity: 0; } }
.drw-head { padding: 16px 20px 14px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: flex-start; }
.drw-head .dh-main { flex: 1; min-width: 0; }
.drw-head .dh-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 3px; }
.drw-head h2 { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.drw-head .icon-btn { margin: -4px -8px 0 0; }
.drw-body { flex: 1; overflow-y: auto; padding: 4px 20px 30px; }
.dsec { padding: 16px 0; border-bottom: 1px solid var(--line); }
.dsec:last-child { border-bottom: 0; }
.dsec > h3 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 800; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.dsec > h3 .ico { width: 14px; height: 14px; }
.next-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.kv { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 7px 12px; font-size: 13.5px; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.contact-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.callout { padding: 12px 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }

/* timeline */
.tl { list-style: none; margin: 0; padding: 0; position: relative; }
.tl li { position: relative; padding: 0 0 16px 22px; }
.tl li::before { content: ""; position: absolute; left: 5px; top: 14px; bottom: -2px; width: 2px; background: var(--line); }
.tl li:last-child::before { display: none; }
.tl .tl-dot { position: absolute; left: 0; top: 5px; width: 12px; height: 12px; border-radius: 50%; border: 2.5px solid #fff; box-shadow: 0 0 0 1px var(--line-2); }
.tl .tl-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tl .tl-by { color: var(--muted); font-size: 12px; font-weight: 600; }
.tl p { margin-top: 4px; font-size: 13.5px; color: var(--ink-2); overflow-wrap: anywhere; }

/* meeting rows */
.mt-list { display: flex; flex-direction: column; gap: 8px; }
.mt { display: flex; gap: 12px; align-items: flex-start; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; }
.mt-date { flex: none; width: 52px; text-align: center; border-radius: 8px; background: var(--bg); padding: 5px 0 6px; }
.mt-date b { display: block; font-size: 18px; line-height: 1.1; font-weight: 800; }
.mt-date span { display: block; font-size: 11px; color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.mt-date.is-today { background: var(--tc-bg); color: var(--tc-d); }
.mt-main { flex: 1; min-width: 0; }
.mt-main .mt-line { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mt-main p { font-size: 13px; color: var(--ink-2); margin-top: 3px; }

/* ---------------- dashboard ---------------- */
.hello { margin-bottom: 22px; }
.hello h1 { font-family: var(--serif); font-weight: 600; font-size: 30px; letter-spacing: -.015em; }
.hello p { color: var(--muted); margin-top: 3px; }
.inbox-item { display: flex; gap: 12px; align-items: center; padding: 11px 20px; border-top: 1px solid var(--line); color: inherit; }
.inbox-item:hover { background: #fcfaf7; text-decoration: none; }
.ii-badge { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.ii-badge.buyer { background: var(--tc-bg); color: var(--tc); }
.ii-badge.seller { background: var(--sage-bg); color: var(--sage); }
.ii-main { flex: 1; min-width: 0; }
.ii-main b { font-weight: 700; }
.ii-main .ii-sub { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ii-when { color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; text-align: right; }
.ii-open { color: var(--tc-d); font-size: 12.5px; font-weight: 800; display: block; }
.funnel { display: flex; flex-direction: column; gap: 9px; }
.fun-row { display: grid; grid-template-columns: 172px minmax(0, 1fr) 36px; gap: 12px; align-items: center; font-size: 13px; color: inherit; }
.fun-row:hover { text-decoration: none; }
.fun-row:hover .fun-bar { filter: brightness(.96); }
.fun-lbl { font-weight: 700; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fun-track { height: 24px; background: var(--bg); border-radius: 6px; overflow: hidden; }
.fun-bar { height: 100%; border-radius: 6px; min-width: 4px; transition: width .5s ease; }
.fun-n { font-weight: 800; text-align: right; }
@media (max-width: 520px) { .fun-row { grid-template-columns: 104px minmax(0, 1fr) 28px; gap: 8px; } }

/* ---------------- leads board ---------------- */
.board-scroll { overflow-x: auto; padding-bottom: 10px; -webkit-overflow-scrolling: touch; }
.board { display: flex; gap: 10px; align-items: flex-start; min-width: min-content; }
.col { flex: 1 0 196px; min-width: 196px; max-width: 300px; background: #efebe5; border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.col-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 4px; font-weight: 800; font-size: 13px; }
.col-head .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.col-head .n { margin-left: auto; color: var(--muted); font-weight: 800; font-size: 12px; background: rgba(255, 255, 255, .65); padding: 1px 8px; border-radius: 9px; }
.col-empty { color: var(--muted); font-size: 12.5px; padding: 14px 6px; text-align: center; border: 1px dashed var(--line-2); border-radius: 9px; }
.lcard { text-align: left; width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 10px 11px; cursor: pointer; box-shadow: 0 1px 2px rgba(31, 27, 22, .05); display: flex; flex-direction: column; gap: 5px; transition: border-color .15s, box-shadow .15s; }
.lcard:hover { border-color: rgba(194, 81, 44, .45); box-shadow: 0 3px 10px rgba(31, 27, 22, .07); }
.lcard .lc-top { display: flex; justify-content: space-between; gap: 6px; align-items: center; }
.lcard .lc-name { font-weight: 800; font-size: 13.5px; }
.lcard .lc-prop { font-size: 12.3px; color: var(--ink-2); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lcard .lc-foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.lcard .lc-meet { font-size: 11.5px; font-weight: 700; color: #2f6f8f; background: #e9f3f8; border-radius: 6px; padding: 3px 7px; align-self: flex-start; }
.lcard.is-fresh { border-left: 3px solid var(--tc); }
.avatar { width: 22px; height: 22px; border-radius: 50%; background: var(--sage-bg); color: var(--sage-d); font-size: 10px; font-weight: 800; display: inline-grid; place-items: center; flex: none; }
.col.is-collapsed { flex: none; min-width: 0; width: 50px; padding: 10px 6px; align-items: center; cursor: pointer; border: 0; font: inherit; color: inherit; }
.col.is-collapsed:hover { background: #e8e3db; }
.col.is-collapsed .vlabel { writing-mode: vertical-rl; transform: rotate(180deg); font-weight: 800; font-size: 13px; display: flex; gap: 8px; align-items: center; padding: 6px 0; }
.col.is-collapsed .dot { width: 8px; height: 8px; border-radius: 50%; }
.col-collapse { margin-left: 4px; }

/* ---------------- properties ---------------- */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.pcard { overflow: hidden; display: flex; flex-direction: column; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.pcard:hover { border-color: rgba(194, 81, 44, .35); box-shadow: 0 4px 14px rgba(31, 27, 22, .07); }
.pcard .pc-img { position: relative; aspect-ratio: 16 / 10; background: var(--bg); overflow: hidden; }
.pcard .pc-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pcard .pc-img .chip { position: absolute; left: 10px; top: 10px; box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
.pcard .pc-feat { position: absolute; right: 10px; top: 10px; width: 26px; height: 26px; border-radius: 50%; background: rgba(255, 255, 255, .95); color: var(--gold); display: grid; place-items: center; }
.pcard .pc-feat svg { fill: var(--gold); stroke: var(--gold); width: 14px; height: 14px; }
.pcard .pc-body { padding: 12px 14px 4px; flex: 1; }
.pcard .pc-title { font-weight: 800; font-size: 14px; line-height: 1.35; margin: 3px 0 4px; }
.pcard .pc-price { font-weight: 800; font-size: 16px; color: var(--ink); }
.pcard .pc-meta { color: var(--muted); font-size: 12.5px; }
.pcard .pc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px 12px; }
.interest { font-size: 12px; font-weight: 700; color: var(--ink-2); display: inline-flex; gap: 5px; align-items: center; }
.interest .ico { color: var(--tc); width: 15px; height: 15px; }

/* property editor */
.pe-jump { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 20px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.pe-jump button { border: 1px solid var(--line-2); background: var(--surface); border-radius: 14px; height: 28px; padding: 0 11px; font-weight: 700; font-size: 12px; color: var(--ink-2); cursor: pointer; }
.pe-jump button:hover { border-color: var(--tc); color: var(--tc-d); }
.pe-jump button.has-err { border-color: var(--err); color: var(--err); }
.pe-sec { padding: 4px 0 22px; margin-bottom: 18px; border-bottom: 1px solid var(--line); scroll-margin-top: 10px; }
.pe-sec:last-child { border-bottom: 0; margin-bottom: 0; }
.pe-sec > h3 { font-size: 15px; font-weight: 800; margin-bottom: 4px; display: flex; gap: 9px; align-items: center; }
.pe-sec > h3 .n { width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 11.5px; display: inline-grid; place-items: center; }
.pe-sec > .sec-sub { color: var(--muted); font-size: 12.8px; margin-bottom: 14px; }
.pe-sec.private { background: var(--private); border: 1px solid #efdfc0; border-radius: 12px; padding: 16px 16px 18px; }
.pe-sec.private > h3 .n { background: var(--gold); }
.amen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 14px; }
.pe-map-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 16px; align-items: start; }
.pe-map { height: 300px; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; background: #f4ece0; }
.pick-status { font-size: 12.8px; font-weight: 700; color: var(--ink-2); }
.pick-status.ok { color: var(--ok); }
@media (max-width: 760px) { .pe-map-wrap { grid-template-columns: minmax(0, 1fr); } .pe-map { height: 260px; } }
.ph-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.ph-item { position: relative; aspect-ratio: 4 / 3; border-radius: 9px; overflow: hidden; background: var(--bg); border: 1px solid var(--line); cursor: grab; margin: 0; }
.ph-item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ph-item.dragging { opacity: .4; }
.ph-item.drop-target { outline: 2px dashed var(--tc); outline-offset: 2px; }
.ph-item .cover { position: absolute; left: 6px; top: 6px; background: var(--ink); color: #fff; font-size: 10.5px; font-weight: 800; padding: 2px 7px; border-radius: 5px; letter-spacing: .03em; }
.ph-item .ph-tools { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; padding: 5px; background: linear-gradient(transparent, rgba(0, 0, 0, .45)); }
.ph-item .ph-tools button { width: 26px; height: 26px; border-radius: 7px; border: 0; background: rgba(255, 255, 255, .94); color: var(--ink); display: grid; place-items: center; cursor: pointer; padding: 0; }
.ph-item .ph-tools button:disabled { opacity: .35; cursor: default; }
.ph-item .ph-tools .ico { width: 14px; height: 14px; }
.ph-add { aspect-ratio: 4 / 3; border-radius: 9px; border: 1.5px dashed var(--line-2); background: var(--surface-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; font-weight: 700; font-size: 12.5px; color: var(--ink-2); cursor: pointer; padding: 6px; text-align: center; }
.ph-add:hover { border-color: var(--tc); color: var(--tc-d); }
.ph-add:disabled { opacity: .45; cursor: not-allowed; }
.lib-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.lib-item { position: relative; aspect-ratio: 4 / 3; border-radius: 9px; overflow: hidden; border: 2px solid transparent; padding: 0; cursor: pointer; background: var(--bg); }
.lib-item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lib-item[aria-pressed="true"] { border-color: var(--tc); }
.lib-item .tick { position: absolute; right: 6px; top: 6px; width: 22px; height: 22px; border-radius: 50%; background: rgba(255, 255, 255, .9); border: 1.5px solid rgba(31, 27, 22, .3); display: grid; place-items: center; }
.lib-item[aria-pressed="true"] .tick { background: var(--tc); border-color: var(--tc); color: #fff; }
.lib-item .tick svg { width: 13px; height: 13px; opacity: 0; }
.lib-item[aria-pressed="true"] .tick svg { opacity: 1; }
.lib-item.is-used::after { content: "In use"; position: absolute; left: 6px; bottom: 6px; background: rgba(31, 27, 22, .75); color: #fff; font-size: 10.5px; font-weight: 800; padding: 2px 6px; border-radius: 5px; }

/* ---------------- brokerage panel ---------------- */
.bp-values { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 14px; align-items: start; }
.stat-box { padding: 12px 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.stat-box span { display: block; font-size: 12.5px; color: var(--muted); font-weight: 700; }
.stat-box b { display: block; font-size: 20px; font-weight: 800; margin-top: 2px; }
.rule-line { display: flex; gap: 8px; align-items: flex-start; flex-wrap: nowrap; font-size: 12.8px; color: var(--ink-2); padding: 10px 12px; border-radius: 9px; background: var(--sage-bg); }
.rule-line b { color: #34503d; }
.rule-line .ico { margin-top: 2px; }
.party { border: 1px solid var(--line-2); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.party-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.party-head h4 { font-size: 14px; font-weight: 800; display: flex; gap: 7px; align-items: center; }
.party .sug { font-size: 12.5px; color: var(--muted); font-weight: 600; display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; }
.party .sug b { color: var(--ink-2); }
.calc { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 13px; }
.calc span:nth-child(odd) { color: var(--muted); font-weight: 600; }
.calc .tot { font-weight: 800; font-size: 15px; color: var(--ink); padding-top: 5px; border-top: 1px solid var(--line); }
.party .pay-line { font-size: 12px; color: var(--muted); font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.party.is-off { opacity: .55; }
.wa-prev { border: 1px solid #cfe3d4; background: #f3f9f4; border-radius: 12px; padding: 12px; }
.wa-prev .flabel { display: flex; gap: 6px; align-items: center; color: #2c5b3a; margin-bottom: 6px; }
.wa-prev textarea { background: #fff; min-height: 170px; font-size: 13px; }
.wa-prev .wa-tools { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 12px; color: var(--muted); align-items: center; flex-wrap: wrap; }
.wa-links { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 13px; font-weight: 700; }
@media (max-width: 640px) { .bp-values { grid-template-columns: minmax(0, 1fr); } }

/* ---------------- deals / reports ---------------- */
.amt { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.amt b { font-weight: 800; white-space: nowrap; }
.amt small { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
@media (max-width: 760px) { .amt { align-items: flex-end; } }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 130px minmax(0, 1fr) 70px; gap: 10px; align-items: center; font-size: 13px; }
.bar-row .bl { font-weight: 700; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-row .bt { height: 20px; background: var(--bg); border-radius: 5px; overflow: hidden; }
.bar-row .bf { height: 100%; border-radius: 5px; background: var(--tc); min-width: 3px; }
.bar-row .bv { font-weight: 800; text-align: right; white-space: nowrap; }
.bar-row .bv small { color: var(--muted); font-weight: 700; }
@media (max-width: 520px) { .bar-row { grid-template-columns: 96px minmax(0, 1fr) 58px; gap: 8px; } }
.cols-chart { display: flex; align-items: flex-end; gap: 10px; height: 220px; padding: 10px 4px 0; border-bottom: 1px solid var(--line-2); }
.cc-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; min-width: 0; }
.cc-val { font-size: 11.5px; font-weight: 800; color: var(--ink-2); white-space: nowrap; }
.cc-bar { width: 100%; max-width: 54px; background: var(--tc); border-radius: 6px 6px 0 0; min-height: 3px; transition: height .5s; }
.cc-bar.zero { background: #e4ddd2; }
.cc-labels { display: flex; gap: 10px; padding: 6px 4px 0; }
.cc-labels div { flex: 1; text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); min-width: 0; }
.cc-labels small { display: block; font-weight: 600; font-size: 11px; color: var(--faint); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); font-weight: 600; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.fine { font-size: 12px; color: var(--muted); margin-top: 14px; }

/* brokerage settings */
.set-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.set-grid .sticky { position: sticky; top: 20px; }
@media (max-width: 1100px) { .set-grid { grid-template-columns: minmax(0, 1fr); } .set-grid .sticky { position: static; } }
.set-block { padding: 16px 20px 18px; border-top: 1px solid var(--line); }
.set-block:first-child { border-top: 0; }
.set-block h3 { font-size: 14px; font-weight: 800; margin-bottom: 3px; }
.set-block .sec-sub { color: var(--muted); font-size: 12.5px; margin-bottom: 12px; }
.ph-legend { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.ph-legend button { border: 1px solid var(--line-2); background: var(--surface-2); border-radius: 6px; padding: 2px 7px; font-size: 12px; font-weight: 700; color: var(--ink-2); cursor: pointer; font-family: ui-monospace, Consolas, monospace; }
.ph-legend button:hover { border-color: var(--tc); color: var(--tc-d); }
.sticky-save { position: sticky; bottom: 0; z-index: 5; display: flex; gap: 8px; justify-content: flex-end; align-items: center; flex-wrap: wrap; padding: 12px 20px; background: rgba(250, 248, 245, .96); border-top: 1px solid var(--line); border-radius: 0 0 var(--r) var(--r); }
.sticky-save .left { margin-right: auto; color: var(--muted); font-size: 12.5px; }

/* meetings page */
.mgroup { margin-bottom: 22px; }
.mgroup > h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 800; margin: 0 0 10px 2px; display: flex; gap: 8px; align-items: center; }
.mgroup > h2 .n { background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 0 7px; font-size: 11.5px; color: var(--ink-2); }
.mrow { display: grid; grid-template-columns: 64px minmax(0, 1.25fr) minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 18px; border-top: 1px solid var(--line); }
.mrow:first-child { border-top: 0; }
.mrow .mt-date { width: 58px; }
.mrow .who { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mrow .who-line { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.mrow .who-line .lbl { color: var(--muted); font-size: 11.5px; font-weight: 700; width: 42px; }
.mrow .prop { font-size: 13px; min-width: 0; }
.mrow .prop b { display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow .meta { font-size: 12.5px; color: var(--ink-2); display: flex; flex-direction: column; gap: 3px; }
.mrow .acts { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.reveal { display: inline-flex; gap: 5px; align-items: center; border: 0; background: var(--private); color: #6b5530; border-radius: 6px; font-size: 11.5px; font-weight: 700; padding: 2px 7px; cursor: pointer; }
.reveal .ico { width: 13px; height: 13px; color: var(--gold); }
.revealed { font-size: 12px; background: var(--private); border-radius: 6px; padding: 4px 8px; color: #4d3c1d; font-weight: 600; }
.revealed small { display: block; color: #8a6d3b; font-size: 11px; }
@media (max-width: 1000px) {
  .mrow { grid-template-columns: 58px minmax(0, 1fr); gap: 10px 14px; padding: 14px; }
  .mrow > .prop, .mrow > .meta, .mrow > .acts { grid-column: 2; }
  .mrow > .acts { justify-content: flex-start; }
}

/* small screens: generic */
@media (max-width: 640px) {
  .card-head { padding: 14px 14px 10px; }
  .card-body { padding: 0 14px 14px; }
  .inbox-item { padding: 11px 14px; }
  .drw-body { padding: 4px 16px 30px; }
  .drw-head { padding: 14px 16px 12px; }
  .kv { grid-template-columns: 100px minmax(0, 1fr); }
  .mdl-body { padding: 16px; }
  .mdl-head { padding: 16px 16px 12px; }
  .pe-jump { padding: 8px 16px; flex-wrap: nowrap; overflow-x: auto; }
  .pe-jump button { flex: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.tiles.tiles-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .tiles.tiles-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
