@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&display=swap");

:root {
  --ink: #171917;
  --ink-2: #292c29;
  --slate: #686d68;
  --muted: #929791;
  --line: #e3e6e1;
  --line-2: #d5d9d3;
  --paper: #f6f7f5;
  --white: #ffffff;
  --signal: #d8f45b;
  --signal-dark: #b8da38;
  --green: #28734e;
  --green-bg: #eaf5ee;
  --amber: #8a5d15;
  --amber-bg: #faf1df;
  --red: #a43d38;
  --red-bg: #f8e9e7;
  --radius-sm: 8px;
  --radius: 12px;
  font-family: "Manrope", ui-sans-serif, system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--paper); }
button, input, select { font: inherit; }
button { cursor: pointer; }
.icon { flex: none; }

.btn { min-height: 42px; border: 1px solid transparent; border-radius: var(--radius-sm); padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; font-weight: 650; transition: .18s ease; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { color: var(--white); background: var(--ink); box-shadow: 0 1px 2px #00000018; }
.btn-primary:hover { background: #30332f; }
.btn-secondary { color: var(--ink); background: var(--white); border-color: var(--line-2); }
.btn-secondary:hover { background: var(--paper); }
.btn-ghost { color: var(--slate); background: transparent; padding-inline: 8px; }
.btn-danger { color: var(--red); background: var(--red-bg); }
.language-toggle { direction: ltr; display: inline-flex; align-items: center; padding: 3px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); }
.language-toggle button { min-width: 32px; height: 28px; padding: 0 7px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 700; }
.language-toggle button.active { color: var(--ink); background: var(--white); box-shadow: 0 1px 3px #17191714; }

.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.4px; font-size: 17px; }
.logo-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--ink); color: var(--signal); display: grid; place-items: center; }
.logo-muted { color: var(--muted); font-weight: 500; margin-left: 3px; }
.overline, .eyebrow, .nav-label, .demo-label { font-size: 11px; letter-spacing: .1em; font-weight: 700; color: var(--slate); }

.auth-page { min-height: 100vh; background: var(--white); }
.auth-header { height: 76px; padding: 0 5vw; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.auth-header-actions { display: flex; align-items: center; gap: 18px; }
.text-link, .back-link { border: 0; background: none; color: var(--ink); padding: 2px; font-size: 13px; font-weight: 650; }
.text-link:hover, .back-link:hover { text-decoration: underline; }
.auth-main { min-height: calc(100vh - 76px); display: grid; grid-template-columns: minmax(360px, 1fr) minmax(520px, 1.1fr); }
.auth-aside { position: relative; overflow: hidden; padding: clamp(48px, 7vw, 112px); background: var(--ink); color: var(--white); display: flex; flex-direction: column; justify-content: space-between; }
.auth-aside::after { content: ""; position: absolute; width: 420px; height: 420px; border: 1px solid #ffffff14; border-radius: 50%; bottom: -210px; right: -100px; box-shadow: 0 0 0 80px #ffffff06, 0 0 0 160px #ffffff04; }
.eyebrow { color: #d4d7d1; display: flex; gap: 8px; align-items: center; }
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 4px #d8f45b1d; }
.auth-aside h1 { margin: 28px 0 20px; font-size: clamp(38px, 4.2vw, 62px); line-height: 1.05; letter-spacing: -.05em; font-weight: 500; max-width: 700px; }
.auth-aside p { color: #b9bdb7; font-size: 16px; line-height: 1.7; max-width: 510px; }
.trust-row { display: flex; gap: 24px; color: #aeb3ac; font-size: 12px; z-index: 1; }
.trust-row span { display: flex; align-items: center; gap: 7px; }
.auth-card { align-self: center; width: min(100% - 48px, 520px); margin: 50px auto; }
.stepper { display: flex; align-items: center; margin-bottom: 36px; }
.step { width: 28px; height: 28px; border-radius: 50%; background: var(--paper); border: 1px solid var(--line); display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--muted); }
.step.active { background: var(--ink); color: var(--white); border-color: var(--ink); }
.step-line { height: 1px; background: var(--line); flex: 1; }
.form-heading { margin-bottom: 28px; }
.form-heading h2, .success-state h2 { font-size: 30px; line-height: 1.2; letter-spacing: -.035em; margin: 8px 0 9px; font-weight: 600; }
.form-heading p, .success-state p { margin: 0; color: var(--slate); font-size: 14px; line-height: 1.6; }
.form-stack { display: flex; flex-direction: column; gap: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field-label, .label-between { font-size: 12px; font-weight: 650; color: var(--ink-2); }
.field-hint { color: var(--muted); font-size: 11px; }
.label-between { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.input-wrap, .select-wrap, .search-box { height: 44px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--white); display: flex; align-items: center; gap: 10px; padding: 0 13px; color: var(--muted); transition: .15s ease; }
.input-wrap:focus-within, .select-wrap:focus-within, .search-box:focus-within, .signed-input:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px #1719170a; }
.input-wrap input, .search-box input { width: 100%; border: 0; outline: 0; background: none; color: var(--ink); font-size: 13px; min-width: 0; }
.signed-input { direction: ltr; height: 44px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--white); display: flex; align-items: stretch; overflow: hidden; transition: .15s ease; }
.signed-input input { width: 100%; min-width: 0; border: 0; outline: 0; background: none; color: var(--ink); padding: 0 12px; font-size: 13px; text-align: left; }
.input-sign { min-width: 38px; padding: 0 10px; border-right: 1px solid var(--line); background: var(--paper); color: var(--slate); display: grid; place-items: center; font-size: 13px; font-weight: 650; }
.signed-input-suffix { flex-direction: row-reverse; }
.signed-input-suffix .input-sign { border-right: 0; border-left: 1px solid var(--line); }
.signed-input-suffix input { text-align: right; }
input::placeholder { color: #a1a6a0; }
.select-wrap { position: relative; }
.select-wrap select { width: 100%; border: 0; outline: 0; appearance: none; background: none; font-size: 13px; color: var(--slate); }
.select-wrap .icon { position: absolute; right: 12px; pointer-events: none; }
.checkbox { position: relative; display: inline-flex; gap: 9px; align-items: center; color: var(--slate); font-size: 12px; line-height: 1.45; cursor: pointer; }
.checkbox input { position: absolute; opacity: 0; }
.checkmark { width: 17px; height: 17px; border: 1px solid var(--line-2); border-radius: 5px; display: grid; place-items: center; color: transparent; background: var(--white); flex: none; }
.checkbox input:checked + .checkmark { background: var(--ink); border-color: var(--ink); color: var(--white); }
.choice-group { border: 1px solid var(--line); border-radius: var(--radius); }
.choice-group .checkbox { display: flex; padding: 15px; border-bottom: 1px solid var(--line); }
.choice-group .checkbox:last-child { border-bottom: 0; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 28px; }
.form-actions .btn-primary { min-width: 145px; }
.divider { height: 45px; display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 11px; letter-spacing: .08em; }
.divider::before, .divider::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.auth-card > .btn-secondary { width: 100%; }
.security-note { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 24px; color: var(--muted); font-size: 12px; }
.back-link { color: var(--slate); margin-bottom: 32px; }
.help-box { margin-top: 28px; padding: 15px; border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius-sm); display: flex; gap: 11px; color: var(--slate); font-size: 12px; line-height: 1.6; }
.success-state { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.success-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; background: var(--green-bg); color: var(--green); margin-bottom: 10px; }

.shell { min-height: 100vh; display: flex; }
.sidebar { width: 250px; flex: none; background: var(--white); color: var(--ink); border-right: 1px solid var(--line); padding: 22px 14px 14px; display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 30; }
.side-top { padding: 0 8px 22px; }
.sidebar .logo-mark { background: var(--ink); color: var(--signal); }
.sidebar .logo-muted { color: var(--muted); }
.workspace { margin: 2px 0 24px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); display: flex; gap: 9px; align-items: center; }
.workspace > span:nth-child(2), .user-card > span:nth-child(2) { min-width: 0; flex: 1; }
.workspace strong, .user-card strong { display: block; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace small, .user-card small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.avatar { width: 31px; height: 31px; border-radius: 50%; background: #e8eae6; color: var(--ink); display: grid; place-items: center; font-size: 10px; font-weight: 700; flex: none; }
.avatar.square { border-radius: 7px; background: var(--ink); color: var(--white); }
.nav-label { display: block; color: var(--muted); padding: 5px 11px 8px; font-size: 10px; }
.nav-item { width: 100%; height: 42px; border: 0; border-radius: 8px; padding: 0 11px; background: transparent; color: var(--slate); display: flex; align-items: center; gap: 11px; font-size: 12px; text-align: left; margin-bottom: 3px; }
.nav-item:hover { color: var(--ink); background: var(--paper); }
.nav-item.active { color: var(--ink); background: #eef0ec; font-weight: 650; }
.nav-item.active .icon { color: var(--ink); }
.count { margin-left: auto; background: var(--white); border: 1px solid var(--line); padding: 2px 7px; border-radius: 10px; font-size: 11px; }
.side-bottom { margin-top: auto; }
.user-card { width: 100%; border: 0; border-top: 1px solid var(--line); margin-top: 8px; padding: 14px 8px 2px; background: transparent; color: var(--ink); display: flex; align-items: center; text-align: left; gap: 9px; }
.content { margin-left: 250px; width: calc(100% - 250px); }
.topbar { height: 68px; padding: 0 32px; border-bottom: 1px solid var(--line); background: #ffffffda; backdrop-filter: blur(12px); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 20; }
.breadcrumb { color: var(--slate); font-size: 12px; }
.breadcrumb span { color: var(--line-2); margin: 0 8px; }
.top-actions, .page-actions { display: flex; align-items: center; gap: 8px; }
.icon-button, .expand-button, .menu-button, .mobile-close { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); display: grid; place-items: center; color: var(--slate); }
.page { max-width: 1440px; margin: 0 auto; padding: 38px 38px 60px; }
.page-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.page-title h1 { font-size: clamp(26px, 3vw, 35px); line-height: 1.15; letter-spacing: -.04em; font-weight: 600; margin: 7px 0 7px; }
.page-title p { color: var(--slate); font-size: 13px; margin: 0; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin-bottom: 16px; }
.stat-card, .panel, .table-panel, .team-summary, .invite-panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.stat-card { padding: 18px; }
.stat-top { display: flex; justify-content: space-between; align-items: center; color: var(--slate); font-size: 12px; }
.stat-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; background: var(--paper); color: var(--ink-2); }
.stat-value { display: block; font-size: 28px; letter-spacing: -.04em; margin: 12px 0 5px; font-weight: 600; }
.stat-card small { color: var(--muted); font-size: 11px; }
.dashboard-grid { display: grid; grid-template-columns: 1.65fr 1fr; gap: 16px; }
.panel { padding: 20px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 22px; }
.panel h3, .invite-panel h3, .system-section h3 { font-size: 14px; margin: 0 0 4px; }
.panel p, .invite-panel p { color: var(--muted); font-size: 12px; margin: 0; }
.chart { height: 235px; display: flex; gap: 12px; padding-top: 10px; }
.y-labels { display: flex; flex-direction: column; justify-content: space-between; color: var(--muted); font-size: 11px; padding-bottom: 17px; }
.bars { flex: 1; display: flex; align-items: flex-end; gap: clamp(5px, 1.4vw, 15px); border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to bottom, transparent 0, transparent calc(33.33% - 1px), var(--line) 33.33%); }
.bars span { flex: 1; background: #d7dad5; border-radius: 4px 4px 0 0; min-width: 6px; }
.bars span.strong { background: var(--ink); }
.badge { background: var(--paper); color: var(--slate); border: 1px solid var(--line); border-radius: 5px; padding: 4px 7px; font-size: 11px; white-space: nowrap; }
.badge.warning { color: var(--amber); background: var(--amber-bg); border-color: #f2dfbc; }
.queue-item { padding: 13px 0; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 11px; }
.risk-score { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 8px; color: var(--red); background: var(--red-bg); font-size: 12px; font-weight: 700; }
.queue-item > span:nth-child(2) { flex: 1; }
.queue-item strong, .name-cell strong { display: block; font-size: 12px; }
.queue-item small, .name-cell small, .date-cell small { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
.queue > .btn { width: 100%; margin-top: 16px; }

.toolbar { display: flex; gap: 9px; margin-bottom: 12px; }
.search-box { max-width: 480px; flex: 1; }
.filter-count { background: #ffffff24; padding: 2px 5px; border-radius: 8px; font-size: 11px; }
.btn-secondary .filter-count { background: var(--paper); }
.filter-bar { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: grid; grid-template-columns: repeat(3, minmax(160px, 1fr)) .5fr; gap: 12px; margin-bottom: 12px; }
.filter-action { display: flex; align-items: flex-end; justify-content: flex-end; padding-bottom: 12px; }
.table-panel { overflow: hidden; }
.table-meta { padding: 14px 17px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
.table-meta strong { color: var(--ink); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 850px; }
th { color: var(--muted); font-size: 11px; letter-spacing: .06em; text-align: left; font-weight: 700; background: #fafbfa; padding: 12px 16px; border-bottom: 1px solid var(--line); }
td { padding: 15px 16px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--slate); }
tbody tr:not(.details-row):hover { background: #fafbfa; }
.row-open { background: #fafbfa; }
.name-cell { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.name-cell .checkbox > span:last-child:empty { display: none; }
.entity-icon { width: 32px; height: 32px; border-radius: 8px; background: var(--paper); display: grid; place-items: center; color: var(--slate); }
.score { font-weight: 700; color: var(--green); background: var(--green-bg); border-radius: 5px; padding: 5px 7px; }
.score.high { color: var(--red); background: var(--red-bg); }
.score.medium { color: var(--amber); background: var(--amber-bg); }
.status { display: inline-flex; gap: 6px; align-items: center; font-size: 11px; white-space: nowrap; }
.status i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.status-review i { background: var(--red); box-shadow: 0 0 0 3px var(--red-bg); }
.status-monitoring i { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-bg); }
.status-cleared i, .status-active i { background: var(--green); box-shadow: 0 0 0 3px var(--green-bg); }
.status-invited i { background: var(--amber); }
.expand-button { width: 30px; height: 30px; border: 0; background: transparent; }
.expand-button.open { transform: rotate(180deg); }
.details-row td { padding: 0; }
.match-details { background: var(--paper); border-bottom: 1px solid var(--line); padding: 18px 64px; display: grid; grid-template-columns: 1.1fr 1fr auto; gap: 28px; }
dl { margin: 10px 0 0; display: flex; gap: 24px; }
dt { color: var(--muted); font-size: 11px; margin-bottom: 3px; }
dd { margin: 0; color: var(--ink); font-size: 12px; }
.match-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.match-tags span { padding: 7px 9px; background: var(--white); border: 1px solid var(--line); border-radius: 6px; font-size: 11px; display: flex; align-items: center; gap: 4px; }
.match-tags .icon { color: var(--green); }
.detail-actions { display: flex; align-items: flex-end; gap: 7px; }
.detail-actions .btn { min-height: 36px; font-size: 11px; padding-inline: 10px; }
.pagination { padding: 13px 16px; display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); }
.pagination > div { display: flex; gap: 7px; }
.pagination .btn { min-height: 34px; font-size: 11px; }

.invite-panel { padding: 20px; margin-bottom: 14px; display: grid; grid-template-columns: 1fr 1fr 1fr auto; align-items: end; gap: 14px; }
.invite-actions { display: flex; gap: 6px; }
.team-summary { padding: 14px 18px; margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; }
.team-summary > div { display: flex; align-items: center; gap: 12px; }
.team-summary strong { display: block; font-size: 12px; }
.team-summary small, .plan-note { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.stacked-avatars { display: flex; padding-left: 8px; }
.stacked-avatars i { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--white); border: 2px solid var(--white); margin-left: -8px; font-size: 10px; font-style: normal; }
.team-table { margin-bottom: 14px; }
.name-cell em { margin-left: 6px; padding: 2px 5px; border-radius: 4px; color: var(--slate); background: var(--paper); font-size: 10px; font-style: normal; }
.role-picker { border: 1px solid var(--line); background: var(--white); border-radius: 6px; padding: 7px 9px; font-size: 11px; display: flex; gap: 8px; align-items: center; color: var(--ink); }
.permission-panel { padding: 0; overflow: hidden; }
.collapse-head { width: 100%; border: 0; background: var(--white); padding: 16px 18px; display: flex; align-items: center; gap: 11px; text-align: left; }
.collapse-head > span:nth-child(2) { flex: 1; }
.collapse-head strong, .collapse-head small { display: block; }
.collapse-head strong { font-size: 12px; }
.collapse-head small { color: var(--muted); font-size: 11px; margin-top: 3px; }
.permissions { border-top: 1px solid var(--line); padding: 0 18px 12px; }
.permission-row { display: grid; grid-template-columns: 2fr repeat(4, 1fr); min-width: 640px; border-bottom: 1px solid var(--line); align-items: center; min-height: 44px; font-size: 11px; color: var(--slate); }
.permission-row span:not(:first-child) { display: grid; place-items: center; }
.permission-row .icon { color: var(--green); }
.permission-row.header { font-size: 10px; color: var(--muted); letter-spacing: .05em; }

.system-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.system-section { min-width: 0; }
.system-section.full { grid-column: 1 / -1; }
.system-section > h3 { margin-top: 8px; margin-bottom: 20px; font-size: 17px; }
.swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.swatches > div { min-width: 0; }
.swatch { display: block; height: 64px; border-radius: 8px; border: 1px solid var(--line); margin-bottom: 7px; }
.swatches strong, .swatches small { display: block; font-size: 11px; }
.swatches small { color: var(--muted); margin-top: 2px; font-size: 10px; }
.swatch.ink { background: var(--ink); }.swatch.slate { background: var(--slate); }.swatch.mist { background: var(--line); }.swatch.paper { background: var(--paper); }.swatch.white { background: var(--white); }.swatch.signal { background: var(--signal); }
.type-samples { display: flex; gap: 28px; align-items: center; }
.display-sample { font-size: 80px; line-height: .9; letter-spacing: -.08em; }
.type-samples h2 { margin: 0 0 8px; font-size: 22px; letter-spacing: -.03em; }
.type-samples p { max-width: 360px; margin-bottom: 15px; }
.type-samples small { font-size: 10px; color: var(--muted); letter-spacing: .08em; }
.component-showcase { display: grid; grid-template-columns: 1fr 1.5fr 1fr; gap: 32px; }
.demo-label { display: block; margin-bottom: 12px; }
.demo-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.controls { align-items: flex-end; }
.controls .field { min-width: 150px; flex: 1; }
.rules-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.rules-grid > div { background: var(--paper); padding: 15px; border-radius: 8px; }
.rules-grid strong { font-size: 12px; }
.rules-grid p { line-height: 1.6; margin-top: 7px; }
.menu-button, .mobile-close, .scrim { display: none; }

.language-he { text-align: right; }
.language-he .sidebar { inset: 0 0 0 auto; border-right: 0; border-left: 1px solid var(--line); }
.language-he .content { margin-left: 0; margin-right: 250px; }
.language-he .nav-item, .language-he .user-card, .language-he .collapse-head { text-align: right; }
.language-he .count { margin-left: 0; margin-right: auto; }
.language-he th { text-align: right; }
.language-he .select-wrap .icon { right: auto; left: 12px; }
.language-he .auth-aside::after { right: auto; left: -100px; }
.language-he .form-actions { justify-content: flex-start; }
.language-he .filter-action { justify-content: flex-start; }
.language-he .expand-button .icon, .language-he .btn .icon[name="arrow"] { transform: scaleX(-1); }

@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .match-details { grid-template-columns: 1fr 1fr; padding-inline: 30px; }
  .detail-actions { grid-column: 1 / -1; }
  .invite-panel { grid-template-columns: 1fr 1fr; }
  .invite-actions { justify-content: flex-end; }
  .component-showcase { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.open { transform: translateX(0); }
  .mobile-close { display: grid; position: absolute; right: 12px; top: 20px; color: var(--slate); background: var(--white); border-color: var(--line); }
  .scrim { display: block; border: 0; position: fixed; inset: 0; background: #0008; z-index: 25; }
  .content { margin-left: 0; width: 100%; }
  .language-he .content { margin-right: 0; }
  .language-he .sidebar { transform: translateX(100%); }
  .language-he .sidebar.open { transform: translateX(0); }
  .menu-button { display: grid; }
  .breadcrumb { display: none; }
  .topbar { padding-inline: 20px; }
  .page { padding: 30px 22px 50px; }
  .auth-main { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-card { margin-block: 70px; }
  .system-grid { grid-template-columns: 1fr; }
  .system-section.full { grid-column: auto; }
}

@media (max-width: 640px) {
  .auth-header { height: 66px; padding-inline: 18px; }
  .auth-header .text-link { font-size: 0; }
  .auth-header .text-link::after { content: "Switch account"; font-size: 11px; }
  .auth-card { width: min(100% - 36px, 520px); margin-block: 42px; }
  .field-row, .filter-bar, .stats, .rules-grid { grid-template-columns: 1fr; }
  .page { padding: 24px 15px 40px; }
  .page-title { align-items: flex-start; flex-direction: column; margin-bottom: 23px; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .top-actions .icon-button { display: none; }
  .top-actions .btn { padding-inline: 12px; }
  .toolbar { flex-wrap: wrap; }
  .search-box { max-width: none; flex-basis: 100%; }
  .filter-bar { gap: 10px; }
  .filter-action { justify-content: flex-start; padding: 0; }
  .table-meta span:last-child { display: none; }
  .pagination { padding: 11px; }
  .invite-panel { grid-template-columns: 1fr; }
  .team-summary { align-items: flex-start; gap: 10px; flex-direction: column; }
  .match-details { grid-template-columns: 1fr; padding: 18px; }
  .detail-actions { grid-column: auto; flex-direction: column; }
  .detail-actions .btn { width: 100%; }
  dl { flex-direction: column; gap: 9px; }
  .swatches { grid-template-columns: repeat(3, 1fr); }
  .type-samples { align-items: flex-start; }
  .display-sample { font-size: 60px; }
}
