:root {
  --blue: #00a3e0;
  --blue-deep: #0077b8;
  --blue-ink: #06324d;
  --blue-soft: #e7f6fd;
  --gold: #f5b301;
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #122033;
  --muted: #64748b;
  --line: #e6eef6;
  --good: #0f7a56;
  --good-bg: #e7f7f0;
  --warn: #b45309;
  --warn-bg: #fff4e5;
  --bad: #c2410c;
  --bad-bg: #ffefe8;
  --shadow: 0 12px 32px rgba(18, 52, 84, 0.06);
  --radius: 18px;
  --sidebar: 272px;
  --font: "Outfit", "Segoe UI", sans-serif;
  --display: "Fraunces", Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}
a { color: inherit; }
button, input, select, textarea { font-family: inherit; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  background: linear-gradient(180deg, #00aae6 0%, #0095d4 55%, #0087c6 100%);
  color: white;
  display: flex;
  flex-direction: column;
  z-index: 20;
  overflow: hidden;
}
.side-nav {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-bottom: 12px;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 22px 18px 8px;
}
.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px var(--gold);
  background: #000;
}
.brand strong { display: block; font-size: 15px; letter-spacing: -0.02em; }
.brand span { display: block; font-size: 12px; opacity: 0.85; }
.who {
  margin: 14px 16px 8px;
  background: rgba(255,255,255,0.14);
  border-radius: 16px;
  padding: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.avatar, .avatar-lg {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: white;
  color: var(--blue-deep);
  font-weight: 700;
  flex: none;
}
.avatar { width: 38px; height: 38px; font-size: 13px; }
.avatar-lg { width: 84px; height: 84px; font-size: 28px; }
img.avatar, img.avatar-lg { display: block; object-fit: cover; padding: 0; }
.profile-actions { display: flex; align-items: center; justify-content: flex-end; gap: 18px; flex-wrap: wrap; }
.photo-edit { display: flex; align-items: center; gap: 10px; }
.photo-picker { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; color: var(--blue-deep); font-weight: 700; font-size: 13px; }
.photo-picker input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.photo-preview .avatar { width: 52px; height: 52px; }
.who .name { font-weight: 650; font-size: 14px; }
.who .mail { font-size: 12px; opacity: 0.85; word-break: break-all; }
.role-pill {
  display: inline-flex;
  margin-top: 4px;
  background: #122033;
  color: white;
  border-radius: 999px;
  font-size: 11px;
  padding: 2px 8px;
}
.nav-label {
  margin: 16px 22px 6px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.75;
}
.nav-link {
  margin: 2px 12px;
  padding: 10px 12px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: white;
  font-weight: 560;
  font-size: 14.5px;
}
.nav-link svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.nav-link:hover { background: rgba(255,255,255,0.12); }
.nav-link.active { background: var(--blue-deep); }
.nav-link .count {
  margin-left: auto;
  background: white;
  color: var(--blue-deep);
  border-radius: 999px;
  min-width: 20px;
  text-align: center;
  font-size: 11px;
  padding: 1px 6px;
}
.nav-group { margin: 2px 12px; }
.nav-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  color: white;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  font: inherit;
  font-weight: 560;
  font-size: 14.5px;
  cursor: pointer;
  text-align: left;
}
.nav-toggle svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.nav-toggle .chev { width: 14px; height: 14px; margin-left: auto; transition: transform 0.15s ease; }
.nav-toggle:hover,
.nav-group.open > .nav-toggle { background: rgba(255,255,255,0.12); }
.nav-group.open > .nav-toggle .chev { transform: rotate(90deg); }
.nav-sub { display: none; margin: 2px 0 6px; padding-left: 14px; }
.nav-group.open > .nav-sub { display: block; }
.nav-sub .nav-link { margin: 2px 0; }
.side-foot {
  margin-top: auto;
  padding: 16px;
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}
.side-foot a { color: white; }

.workspace { margin-left: var(--sidebar); min-height: 100vh; }
.topbar {
  height: 72px;
  background: white;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar h1 { font-size: 16px; margin: 0; font-weight: 650; }
.topbar p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.icon-btn, .user-chip {
  border: 1px solid var(--line);
  background: white;
  border-radius: 999px;
  text-decoration: none;
}
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; position: relative; }
.icon-btn svg { width: 18px; height: 18px; stroke: var(--text); fill: none; }
.icon-btn .dot {
  position: absolute; top: 6px; right: 6px; width: 8px; height: 8px;
  background: var(--gold); border-radius: 50%;
}
.user-chip { display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; }
.user-chip small { display: block; color: var(--muted); }
.menu-btn { display: none; }

.main { padding: 28px; }
.page-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; margin-bottom: 18px; }
.page-head h2 { margin: 0; font-size: 30px; letter-spacing: -0.04em; }
.lede { margin: 6px 0 0; color: var(--muted); max-width: 640px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.stat-card, .card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.stat-card { padding: 18px; display: flex; gap: 14px; align-items: center; }
.stat-icon {
  width: 46px; height: 46px; border-radius: 14px;
  display: grid; place-items: center; background: var(--blue-soft); color: var(--blue-deep);
}
.stat-icon svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.stat-card span { color: var(--muted); font-size: 13px; }
.stat-card strong { display: block; font-size: 26px; letter-spacing: -0.04em; margin-top: 2px; }

.layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.8fr); gap: 16px; }
.card { padding: 8px 8px 12px; }
.card-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 14px 6px; }
.card-head h3 { margin: 0; font-size: 16px; }
.card-head p, .quiet { color: var(--muted); margin: 4px 0 0; font-size: 13px; }
.pad { padding: 8px 16px 16px; }

table.data { width: 100%; border-collapse: collapse; }
table.data th {
  text-align: left; font-size: 12px; color: var(--muted); font-weight: 600;
  padding: 10px 14px; border-bottom: 1px solid var(--line);
}
table.data td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 14px; }
table.data tr:last-child td { border-bottom: 0; }
table.data a.rowlink { font-weight: 650; text-decoration: none; color: var(--blue-ink); }
.sub { display: block; color: var(--muted); font-size: 12px; font-weight: 450; }

.progress { height: 6px; background: #e8eef5; border-radius: 99px; overflow: hidden; width: 120px; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), #35c16e); }
.mini { font-size: 12px; color: var(--muted); margin-top: 4px; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 650;
  background: #eef2f6; color: #334155;
}
.pill:before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill-active, .pill-verified, .pill-paid, .pill-confirmed, .pill-settled { background: var(--good-bg); color: var(--good); }
.pill-due_soon, .pill-pending, .pill-partially_paid, .pill-queued { background: var(--warn-bg); color: var(--warn); }
.pill-overdue, .pill-failed, .pill-rejected, .pill-reconcile_required { background: var(--bad-bg); color: var(--bad); }
.pill-recovery_pending { background: #efe9ff; color: #6d28d9; }
.pill-recovery_suspended, .pill-unverified { background: #eef2ff; color: #3730a3; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 12px; padding: 11px 16px; border: 1px solid transparent;
  text-decoration: none; font-weight: 650; cursor: pointer; font-size: 14px;
}
.btn-primary { background: var(--blue); color: white; }
.btn-primary:hover { background: var(--blue-deep); }
.btn-ghost { background: white; border-color: var(--line); color: var(--text); }
.btn-gold { background: var(--gold); color: #1b1400; }
.btn-danger { background: white; color: var(--bad); border-color: #ffd7c8; }
.btn-block { width: 100%; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; }
.filters label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 650; color: var(--muted); }
.filters input, .filters select, .form-grid input, .form-grid select, .form-grid textarea,
.inline-form input, .inline-form select, .stack input, .stack select, .stack textarea {
  border: 1px solid var(--line);
  background: #f8fafc;
  border-radius: 12px;
  padding: 11px 12px;
  color: var(--text);
  font-size: 14px;
}
.filters input { min-width: 240px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid label, .stack label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 650; }
.form-grid .wide, .form-grid textarea { grid-column: 1 / -1; }
.help, .errorlist { color: var(--bad); font-weight: 500; margin: 4px 0 0; padding: 0; list-style: none; font-size: 12px; }
.check { flex-direction: row !important; align-items: center; gap: 8px !important; font-weight: 560; }

.tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.tab {
  text-decoration: none; background: white; border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 14px; font-weight: 650; font-size: 13px; color: var(--muted);
}
.tab.active { background: var(--blue); border-color: var(--blue); color: white; }

.empty { text-align: center; padding: 54px 16px; color: var(--muted); }
.empty .bubble {
  width: 72px; height: 72px; margin: 0 auto 12px; border-radius: 50%;
  display: grid; place-items: center; background: var(--blue-soft); color: var(--blue);
}
.empty h3 { margin: 0 0 6px; color: var(--text); }

.pager {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px 4px; color: var(--muted); font-size: 13px;
}
.pager a { text-decoration: none; font-weight: 700; color: var(--blue-deep); margin-left: 10px; }

.banner {
  border-radius: 16px; padding: 14px 16px; margin-bottom: 16px;
  background: #fff8e8; border: 1px solid #ffe2a8; color: #7a4b00;
}
.banner strong { display: block; margin-bottom: 4px; }
.banner.go { background: var(--good-bg); border-color: #b7ebD4; color: var(--good); }

.profile-hero { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; padding: 18px; }
.kv { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 14px; }
.kv span { display: block; color: var(--muted); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.kv strong { font-size: 14px; }
.split { display: grid; grid-template-columns: minmax(0, 1.6fr) 320px; gap: 16px; }
.checklist { list-style: none; margin: 0; padding: 0 16px 16px; }
.checklist li { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.ok { color: var(--good); font-weight: 700; }
.no { color: var(--muted); }
.meter { height: 8px; background: #e8eef5; border-radius: 99px; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--blue); }

.timeline { list-style: none; margin: 0; padding: 0 16px 16px; }
.timeline li { display: grid; grid-template-columns: 16px 1fr; gap: 10px; padding-bottom: 14px; }
.timeline i { width: 10px; height: 10px; border-radius: 50%; background: var(--blue); margin-top: 5px; }
.msg { padding: 12px 14px; border-radius: 12px; margin-bottom: 8px; }
.msg-error { background: var(--bad-bg); color: var(--bad); }
.msg-success { background: var(--good-bg); color: var(--good); }
.msg-info, .msg-warning { background: var(--warn-bg); color: var(--warn); }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack input, .stack select, .stack textarea { width: 100%; }
.note {
  background: var(--blue-soft); border-radius: 14px; padding: 12px 14px; color: var(--blue-ink); font-size: 14px;
}

.login-shell { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 0.95fr; }
.login-brand {
  background:
    radial-gradient(900px 420px at 20% 10%, rgba(245,179,1,0.28), transparent 50%),
    linear-gradient(165deg, #0077b8 0%, #00aae6 58%, #19b7ea 100%);
  color: white;
  padding: 36px 56px;
  display: flex;
  flex-direction: column;
}
.login-nav { display: flex; gap: 22px; font-weight: 650; }
.login-nav span { opacity: 0.7; }
.login-nav .on { opacity: 1; border-bottom: 2px solid white; padding-bottom: 4px; }
.login-brand .logo {
  width: 148px; height: 148px; border-radius: 50%; object-fit: cover;
  margin: 54px 0 18px; box-shadow: 0 0 0 4px rgba(245,179,1,0.9), 0 20px 40px rgba(0,0,0,0.15);
}
.login-brand h2 {
  font-family: var(--display);
  font-size: 52px; line-height: 1.02; font-weight: 560; margin: 0 0 12px; max-width: 560px;
  letter-spacing: -0.03em;
}
.login-brand .intro { max-width: 460px; font-size: 18px; line-height: 1.45; opacity: 0.95; }
.trust { margin-top: auto; }
.trust h3 { margin: 0 0 6px; }
.trust p { margin: 0; max-width: 460px; opacity: 0.9; }
.dots { display: flex; gap: 6px; margin-top: 22px; }
.dots i { width: 8px; height: 8px; border-radius: 99px; background: rgba(255,255,255,0.45); }
.dots i:first-child { width: 22px; background: white; }
.login-panel { display: grid; place-items: center; padding: 40px 24px; background: white; }
.login-card { width: min(420px, 100%); }
.login-card h2 { font-size: 36px; margin: 0 0 8px; letter-spacing: -0.04em; }
.login-card .lede { margin-bottom: 22px; }
.login-card label { display: block; font-weight: 650; font-size: 14px; margin-bottom: 14px; }
.login-card input[type="email"], .login-card input[type="password"], .login-card input[type="text"] {
  width: 100%; margin-top: 6px; border: 1px solid var(--line); background: #f8fafc;
  border-radius: 12px; padding: 13px 14px; font-size: 15px;
}
.passwrap { position: relative; }
.passwrap button {
  position: absolute; right: 10px; top: 34px; border: 0; background: transparent; color: var(--muted); cursor: pointer;
}
.row-between { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 16px; font-size: 13px; }
.login-card .btn { width: 100%; padding: 14px; font-size: 16px; }

@media (max-width: 1100px) {
  .stat-grid, .kv { grid-template-columns: 1fr 1fr; }
  .layout, .split, .login-shell { grid-template-columns: 1fr; }
  .login-brand { min-height: 420px; }
  .login-brand h2 { font-size: 40px; }
}
@media (max-width: 860px) {
  .sidebar { transform: translateX(-105%); transition: transform 0.2s ease; }
  body.nav-open .sidebar { transform: none; }
  .workspace { margin-left: 0; }
  .menu-btn { display: grid; }
  .main { padding: 18px; }
  .form-grid, .stat-grid, .profile-hero { grid-template-columns: 1fr; }
  .page-head { flex-direction: column; align-items: flex-start; }
}

.report-picks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.report-pick {
  display: block; text-decoration: none; background: white; border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 14px; color: var(--text);
}
.report-pick strong { display: block; margin-bottom: 4px; }
.report-pick span { color: var(--muted); font-size: 13px; }
.report-pick.active { border-color: var(--blue); background: var(--blue-soft); }
.period-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.report-sheet .stat-grid { padding: 0 14px 8px; }
.tally {
  margin: 0 18px 12px;
  padding: 12px 14px;
  background: var(--blue-soft);
  border-radius: 10px;
  color: var(--blue-ink);
  font-weight: 600;
}
td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.total-row td { font-weight: 700; background: var(--blue-soft); }
th.act-col, td.act-col { text-align: right; width: 1%; white-space: nowrap; }
tr:has(.act.open) { position: relative; z-index: 4; }
.act { position: relative; display: inline-block; }
.act.open { z-index: 5; }
.act-btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 34px; padding: 0 12px;
  border: 1px solid #d7dee7; border-radius: 999px;
  background: #fff; color: #1b2836; cursor: pointer; line-height: 0;
}
.act-btn:hover { border-color: #b7c3d1; }
.act.open .act-btn { background: #152033; border-color: #152033; color: #fff; }
.act-btn .glyph { display: block; width: 24px; height: 16px; }
.act-btn .glyph circle { fill: currentColor; }
.act-btn .glyph path {
  fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}
.act-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30;
  min-width: 188px; padding: 8px;
  background: #fff; border: 1px solid #e7edf3; border-radius: 14px;
  box-shadow: 0 14px 36px rgba(21, 32, 51, 0.14);
}
.act-menu[hidden] { display: none; }
.act-menu form { margin: 0; }
.act-menu a, .act-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  border: 0; background: transparent; border-radius: 10px;
  padding: 9px 10px; color: #1b2836;
  font: inherit; font-size: 14px; font-weight: 650; cursor: pointer; text-decoration: none;
}
.act-menu a::before, .act-menu button::before {
  content: ""; width: 18px; height: 18px; flex: 0 0 18px;
  background: currentColor;
  -webkit-mask: var(--mark) center / 18px 18px no-repeat;
  mask: var(--mark) center / 18px 18px no-repeat;
}
.act-menu a { --mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z'/%3E%3C/svg%3E"); }
.act-off { --mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M8 12h8'/%3E%3C/svg%3E"); }
.act-on { --mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M8 12.5l2.5 2.5L16 9'/%3E%3C/svg%3E"); }
.act-menu a:hover, .act-menu button:hover { background: #f4f7fa; }
.act-menu .danger { --mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M8 6V4h8v2'/%3E%3Cpath d='M19 6l-1 14H6L5 6'/%3E%3C/svg%3E"); }
.act-menu .danger button { color: #e25c2a; }
.act-menu .danger button:hover { background: #fff4ee; }
.table-results.is-loading { opacity: 0.45; }
.perm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.perm-grid fieldset {
  border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 0;
}
.perm-grid legend { font-weight: 700; padding: 0 6px; }
.check { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0; font-size: 14px; }
.check input { margin-top: 3px; }
@media (max-width: 1100px) {
  .perm-grid, .report-picks { grid-template-columns: 1fr; }
}
.emergency { max-width: 560px; }
.emergency label span { display: block; font-weight: 650; margin-bottom: 6px; }
.emergency input[type="text"],
.emergency input[type="tel"],
.emergency input[type="number"] {
  width: 100%; font: inherit; font-size: 22px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
}
.emergency .person {
  background: #f3f9fc; border-radius: 14px; padding: 14px 16px; margin: 0;
  display: block; color: var(--blue-ink);
}
.emergency .person p { margin: 6px 0 0; color: #3d5c6e; }
.emergency .stack { display: flex; flex-direction: column; gap: 14px; }
.lang-switch {
  display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff;
}
.lang-switch button {
  border: 0; background: transparent; padding: 6px 10px; font: inherit; font-size: 13px; font-weight: 650;
  cursor: pointer; color: var(--blue-ink);
}
.lang-switch button.on { background: var(--blue-deep); color: #fff; }
.login-brand .lang-switch { margin-bottom: 18px; border-color: rgba(255,255,255,0.35); background: transparent; }
.login-brand .lang-switch button { color: #fff; }
.login-brand .lang-switch button.on { background: #fff; color: var(--blue-ink); }
.phrase-grid {
  display: grid; grid-template-columns: 1fr 1fr 168px; gap: 12px; align-items: start;
}
.phrase-grid label span { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.phrase-grid textarea {
  width: 100%; min-height: 88px; resize: vertical; font: inherit; font-size: 14px; line-height: 1.45;
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: #fff;
}
.phrase-actions { display: flex; flex-direction: column; gap: 8px; }
.phrase-mark { font-size: 12px; font-weight: 700; color: var(--muted); }
.phrase-mark.edited { color: var(--blue-deep); }
.phrases .phrase-line { margin: 0; }
@media (max-width: 800px) {
  .phrase-grid { grid-template-columns: 1fr; }
}
