* { box-sizing: border-box; }
:root {
  color-scheme: dark;
  font: 14px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background: #0a0f16;
  --canvas: #0a0f16;
  --rail: #0c1118;
  --surface: #10151d;
  --surface-raised: #151c25;
  --surface-hover: #1a232e;
  --surface-selected: rgba(74,149,224,.08);
  --line: rgba(120,145,170,.12);
  --line-strong: rgba(120,145,170,.2);
  --text: #e9eef3;
  --muted: #8b98a8;
  --subtle: #647586;
  --accent: #4a95e0;
  --button: #2b5278;
  --button-hover: #35658f;
  --success: #62c991;
  --warning: #d0a55e;
  --danger: #d97979;
  --sidebar: 88px;
  --radius: 10px;
  --panel-radius: 16px;
  --card-radius: 18px;
}
html { min-width: 320px; overflow-x: hidden; }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 30% -12%, rgba(74,149,224,.11), transparent 34rem), radial-gradient(circle at 88% 24%, rgba(74,149,224,.035), transparent 28rem), var(--canvas); background-attachment: fixed; color: var(--text); }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
.icon { width: 18px; height: 18px; display: block; flex: 0 0 auto; }
.brand-name { font-weight: 650; }
.brand-name small { color: var(--muted); font-size: 12px; margin-left: 3px; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.auth-main { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-panel { width: min(100%, 390px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--card-radius); padding: 30px; }
.login-brand, .brand { display: flex; align-items: center; gap: 11px; color: var(--text); }
.login-brand { margin-bottom: 28px; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface-selected); color: var(--text); font-weight: 700; font-size: 16px; flex: 0 0 auto; }
.login-panel h1 { margin: 0 0 20px; font-size: 24px; font-weight: 600; }

.admin-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); background: var(--rail); border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; z-index: 20; }
.sidebar .brand { height: 64px; width: 100%; justify-content: center; }
.sidebar .brand-mark { width: 38px; height: 38px; border: 0; border-radius: 11px; background: transparent; color: var(--text); font-size: 18px; font-weight: 750; text-shadow: 0 0 18px rgba(74,149,224,.42); }
.primary-nav { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 0; }
.primary-nav a, .rail-button { position: relative; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; color: #8393a2; border: 1px solid transparent; background: transparent; cursor: pointer; transition: background-color .18s ease, color .18s ease, border-color .18s ease; }
.primary-nav .icon, .rail-button .icon { width: 20px; height: 20px; }
.primary-nav a:hover, .rail-button:hover { background: var(--surface-selected); color: var(--text); text-decoration: none; }
.primary-nav a[aria-current="page"] { background: transparent; border-color: transparent; color: var(--text); }
.primary-nav a[aria-current="page"]::before { content: ""; position: absolute; left: -8px; width: 2px; height: 18px; border-radius: 2px; background: var(--accent); box-shadow: 0 0 12px rgba(74,149,224,.65); }
.nav-label { position: absolute; left: calc(100% + 12px); top: 50%; z-index: 30; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-raised); color: var(--text); font-size: 12px; font-weight: 600; white-space: nowrap; opacity: 0; pointer-events: none; transform: translate(-4px, -50%); transition: opacity .14s ease, transform .14s ease; }
.primary-nav a:hover .nav-label, .primary-nav a:focus-visible .nav-label, .rail-button:hover .nav-label, .rail-button:focus-visible .nav-label { opacity: 1; transform: translate(0, -50%); }
.nav-divider { width: 28px; height: 1px; margin: 6px 0; background: var(--line); }
.sidebar-foot { margin-top: auto; padding: 14px 0 18px; display: grid; justify-items: center; gap: 10px; }
.avatar { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-raised); border: 1px solid var(--line); color: var(--text); font-weight: 700; }
.rail-button { padding: 0; color: #8393a2; }
.workspace { margin-left: var(--sidebar); min-height: 100vh; }
.topbar { position: sticky; top: 0; height: 64px; padding: 0 32px; background: rgba(10,15,22,.9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; z-index: 15; }
.topbar-brand { font-size: 16px; font-weight: 650; }
.topbar-brand small { margin-left: 4px; color: var(--muted); font-size: 13px; font-weight: 500; }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.environment { color: var(--muted); font-size: 12px; }
.environment.dev { color: var(--accent); }
.user-chip { display: grid; text-align: right; line-height: 1.25; }
.user-chip small { font-size: 12px; }
.content { width: min(100%, 1240px); margin-inline: auto; padding: 36px 36px 56px; }
.page-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-bottom: 28px; }
.page-header h1 { margin: 0; font-size: 30px; line-height: 1.12; font-weight: 650; letter-spacing: -.025em; }

h1, h2, h3, p { overflow-wrap: anywhere; }
h2 { margin: 0; font-size: 14px; line-height: 1.25; font-weight: 600; }
small, .muted-copy { color: var(--muted); }
code, pre { overflow-wrap: anywhere; white-space: pre-wrap; }
label { min-width: 0; display: grid; gap: 7px; font-weight: 600; color: #c7d1da; }
input:not([type="checkbox"]), select, textarea { width: 100%; min-width: 0; min-height: 44px; padding: 9px 11px; color: var(--text); background: #0b1119; border: 1px solid var(--line-strong); border-radius: var(--radius); outline: 2px solid transparent; outline-offset: 1px; }
input::placeholder, textarea::placeholder { color: var(--subtle); opacity: 1; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--accent); outline-color: var(--accent); box-shadow: none; }
textarea { resize: vertical; }
input[type="file"] { padding: 6px; }
.check-row { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: var(--radius); padding: 9px 15px; border: 1px solid transparent; cursor: pointer; font-weight: 700; white-space: nowrap; transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease; }
.button:hover { text-decoration: none; transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button.primary { background: var(--button); color: #fff; border-color: var(--button); box-shadow: 0 10px 24px -16px rgba(74,149,224,.8); }
.button.primary:hover { background: var(--button-hover); border-color: var(--button-hover); }
.button.secondary { background: var(--surface-raised); color: var(--text); border-color: var(--line-strong); }
.button.secondary:hover, .button.ghost:hover { background: var(--surface-hover); border-color: var(--line-strong); }
.button.ghost { background: transparent; color: #c6d0d9; border-color: var(--line); }
.button.full { width: 100%; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.panel { background: linear-gradient(180deg, rgba(74,149,224,.028), transparent 5rem), var(--surface); border: 1px solid var(--line); border-radius: var(--panel-radius); margin-bottom: 16px; overflow: hidden; box-shadow: inset 0 1px rgba(255,255,255,.018); }
.panel-head { min-height: 58px; padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.panel-note { font-size: 12px; color: var(--muted); }
.page-grid { display: grid; gap: 16px; }
.page-grid.equal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.actions, .panel-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.panel-actions { padding: 15px 16px; }
.form-stack { display: grid; gap: 15px; }
.panel-form { padding: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; padding: 16px; align-items: end; }
.form-grid.compact { grid-template-columns: repeat(3, minmax(0, 1fr)) auto; border-top: 1px solid var(--line); }
.form-actions { display: flex; align-items: end; gap: 8px; }
.inline-form { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; }
.inline-form > input { width: auto; flex: 1 1 160px; }
.detail-form { padding-top: 12px; }
.detail-form label { font-size: 12px; }
.panel-action { padding: 0 16px 16px; }
.toolbar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--panel-radius); padding: 13px; margin-bottom: 16px; }
.search-form, .filter-form { display: flex; align-items: end; gap: 10px; }
.search-form input { min-width: min(100%, 340px); }
.filter-form label { flex: 1 1 220px; }

.settings-list { display: grid; }
.setting-row { min-height: 64px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px) auto; align-items: center; gap: 14px; padding: 11px 18px; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border-bottom: 0; }
.setting-row.readonly { grid-template-columns: 1fr auto; }
.setting-row:hover { background: rgba(120,145,170,.035); }
.setting-copy { display: grid; min-width: 0; }
.setting-copy strong { font-size: 13px; color: var(--text); }
.setting-copy small { margin-top: 2px; }
.restart-note { color: var(--warning); }
.setting-control { min-width: 0; }
.setting-control.split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.money-field { display: flex; align-items: center; border: 1px solid var(--line-strong); background: #0b1119; border-radius: var(--radius); }
.money-field span { padding-left: 10px; color: var(--muted); }
.money-field input { border: 0; background: transparent; }
.money { font-variant-numeric: tabular-nums; }
.state-label { display: inline-flex; align-items: center; min-height: 26px; padding: 4px 9px; border-radius: 999px; background: rgba(217,121,121,.1); color: #e09999; font-size: 11px; font-weight: 700; }
.state-label.active { background: rgba(98,201,145,.1); color: #82d5a8; }

.overview-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .85fr); gap: 24px; align-items: start; }
.overview-grid > section > h2 { margin: 0 0 14px 2px; color: var(--muted); font-size: 11px; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--subtle); flex: 0 0 auto; }
.status-dot.ok { background: var(--success); box-shadow: 0 0 9px rgba(98,201,145,.34); }
.status-dot.warn { background: var(--warning); box-shadow: 0 0 9px rgba(208,165,94,.28); }
.status-dot.muted { background: var(--subtle); }
.metric-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.metric-card { min-height: 184px; padding: 24px; display: grid; grid-template-rows: auto 1fr auto auto; gap: 5px; border: 1px solid var(--line); border-radius: var(--card-radius); background: linear-gradient(180deg, rgba(74,149,224,.055), transparent 58%), var(--surface); box-shadow: inset 0 1px rgba(255,255,255,.025); color: var(--text); overflow-wrap: anywhere; transition: transform .2s ease, border-color .2s ease, background-color .2s ease, box-shadow .2s ease; }
.metric-card:hover { text-decoration: none; transform: translateY(-2px); border-color: rgba(74,149,224,.24); background: linear-gradient(180deg, rgba(74,149,224,.075), transparent 62%), var(--surface-raised); box-shadow: inset 0 1px rgba(255,255,255,.035), 0 18px 34px -26px rgba(74,149,224,.7); }
.metric-card:focus-visible, .service-list a:focus-visible { outline-offset: 2px; }
.metric-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.metric-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 0; background: transparent; color: var(--accent); filter: drop-shadow(0 0 8px rgba(74,149,224,.22)); }
.metric-icon.small { width: 30px; height: 30px; border-radius: 0; }
.metric-icon .icon { width: 19px; height: 19px; }
.metric-icon.small .icon { width: 16px; height: 16px; }
.metric-arrow-wrap { width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 0; color: var(--subtle); background: transparent; transition: transform .18s ease, color .18s ease; }
.metric-arrow { width: 16px; height: 16px; }
.metric-card:hover .metric-arrow-wrap { transform: translate(1px, -1px); color: var(--text); }
.metric-label { color: var(--muted); font-size: 11px; font-weight: 600; align-self: end; letter-spacing: .07em; text-transform: uppercase; }
.metric-card strong { font-size: 40px; line-height: 1.05; font-weight: 680; font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.metric-card small { color: var(--muted); font-size: 12px; }
.metric-card .metric-alert { color: var(--warning); }
.service-list { display: grid; overflow: hidden; border: 1px solid var(--line); border-radius: var(--card-radius); background: linear-gradient(180deg, rgba(74,149,224,.045), transparent 7rem), var(--surface); box-shadow: inset 0 1px rgba(255,255,255,.022); }
.service-list a { min-height: 68px; padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--text); transition: background-color .18s ease; }
.service-list a:last-child { border-bottom: 0; }
.service-list a:hover { background: rgba(74,149,224,.045); text-decoration: none; }
.service-name { display: inline-flex; align-items: center; gap: 12px; font-weight: 600; }
.service-state { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.service-state strong { color: var(--text); font-size: 13px; font-weight: 500; }

.users-toolbar { padding: 14px; }
.users-filter-form { display: grid; grid-template-columns: minmax(260px, 1.5fr) repeat(3, minmax(140px, .65fr)) auto; align-items: end; gap: 12px; }
.users-filter-form label { color: var(--muted); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.users-filter-actions { display: flex; gap: 8px; }
.users-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.users-layout.has-editor { grid-template-columns: minmax(0, 1fr) minmax(300px, 340px); }
.users-table-panel { min-width: 0; }
.users-table-head > div { display: grid; gap: 3px; }
.users-table { min-width: 780px; }
.users-table td { height: 68px; }
.users-table .selected-row { background: rgba(74,149,224,.07); box-shadow: inset 2px 0 var(--accent); }
.user-identity { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.user-identity > span:last-child { min-width: 0; }
.user-identity strong, .user-identity small, .activity-cell strong, .activity-cell small { display: block; }
.user-identity strong { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-identity small { margin-top: 3px; color: var(--muted); }
.user-avatar { width: 34px; height: 34px; display: grid; flex: 0 0 auto; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: linear-gradient(145deg, rgba(74,149,224,.14), rgba(74,149,224,.035)); color: var(--accent); font-size: 12px; font-weight: 750; box-shadow: inset 0 1px rgba(255,255,255,.025); }
.user-avatar.large { width: 44px; height: 44px; font-size: 14px; }
.locale-cell { color: var(--muted); font-size: 12px; }
.activity-cell { color: var(--muted); font-size: 12px; line-height: 1.35; }
.activity-cell strong { color: var(--text); font-size: 13px; font-weight: 600; }
.activity-cell small { margin-top: 2px; }
.user-status { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.row-action { width: 1%; text-align: right; }
.table-icon-action { width: 44px; height: 44px; display: inline-grid; place-items: center; border: 1px solid transparent; border-radius: 10px; color: var(--muted); transition: background-color .18s ease, border-color .18s ease, color .18s ease; }
.table-icon-action .icon { width: 17px; height: 17px; }
.table-icon-action:hover { border-color: var(--line); background: var(--surface-hover); color: var(--accent); text-decoration: none; }
.table-icon-action:active { background: var(--surface-selected); }
.pagination { min-height: 64px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--line); }
.pagination-pages { display: flex; align-items: center; gap: 5px; }
.pagination-control, .pagination-page { min-width: 44px; min-height: 44px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); font-size: 12px; font-weight: 650; }
.pagination-control { padding: 0 12px; }
.pagination-control:last-child { justify-self: end; }
.pagination-control:hover, .pagination-page:hover { border-color: var(--line-strong); background: var(--surface-hover); color: var(--text); text-decoration: none; }
.pagination-page.current { border-color: rgba(74,149,224,.3); background: rgba(74,149,224,.12); color: var(--text); }
.pagination-control.disabled { opacity: .38; pointer-events: none; }
.pagination-gap { width: 22px; color: var(--subtle); text-align: center; }
.user-editor { position: sticky; top: 80px; overflow: hidden; }
.user-editor-head { min-height: 76px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.user-editor-head h2 { font-size: 15px; }
.user-editor-head small { display: block; margin-top: 3px; color: var(--muted); }
.editor-close { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); font-size: 22px; line-height: 1; }
.editor-close:hover { background: var(--surface-hover); color: var(--text); text-decoration: none; }
.user-editor-form { display: grid; gap: 14px; padding: 18px 16px; }
.user-editor-form label { color: var(--muted); font-size: 12px; }
.user-editor-summary { display: grid; gap: 1px; background: var(--line); }
.user-editor-summary span { display: flex; justify-content: space-between; gap: 12px; padding: 13px 16px; background: var(--surface); color: var(--muted); font-size: 12px; }
.user-editor-summary strong { color: var(--text); }
.user-editor-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.user-editor-stats span { min-width: 0; padding: 14px 12px; border-right: 1px solid var(--line); text-align: center; }
.user-editor-stats span:last-child { border-right: 0; }
.user-editor-stats small, .user-editor-stats strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-editor-stats small { color: var(--muted); font-size: 10px; letter-spacing: .05em; text-transform: uppercase; }
.user-editor-stats strong { margin-top: 5px; font-size: 13px; font-variant-numeric: tabular-nums; }
.balance-adjustment { border-top: 1px solid var(--line); }
.balance-adjustment summary { min-height: 48px; display: flex; align-items: center; padding: 0 16px; color: var(--muted); font-size: 12px; font-weight: 650; list-style: none; }
.balance-adjustment summary::-webkit-details-marker { display: none; }
.balance-adjustment summary::after { content: "+"; margin-left: auto; color: var(--accent); font-size: 18px; }
.balance-adjustment[open] summary::after { content: "−"; }
.balance-adjustment[open] summary { color: var(--text); }
.compact-form { padding-top: 4px; }

.notice, .notice-panel { background: var(--surface-raised); border: 1px solid var(--line); border-left: 3px solid var(--warning); border-radius: var(--radius); padding: 12px 14px; margin: 0 0 16px; color: #d2bc91; }
.notice.success { background: var(--surface-raised); border-color: var(--line); border-left-color: var(--success); color: #9eddbb; }
.notice.error { background: var(--surface-raised); border-color: var(--line); border-left-color: var(--danger); color: #e3a5a5; }
.notice-panel { display: grid; gap: 10px; }
.notice-panel.sensitive { border-color: var(--line); border-left-color: var(--danger); background: var(--surface-raised); color: #e3a5a5; }
.empty-state, .empty-panel { color: var(--muted); }
.empty-state { padding: 12px 16px; margin: 0; }
.empty-panel { background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--panel-radius); padding: 38px; text-align: center; }
.empty-panel strong { color: var(--text); }
.recovery-list { word-break: break-all; }

.table-panel { overflow: visible; }
.table-scroll { width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; contain: inline-size; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { color: #aebdca; background: rgba(120,145,170,.035); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
th, td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(120,145,170,.035); }
td small { display: block; }
.detail-row td { background: rgba(120,145,170,.035); }
details summary { cursor: pointer; color: var(--accent); }
pre { margin: 8px 0 0; padding: 11px; background: #0b1119; border: 1px solid var(--line); border-radius: var(--radius); font-size: 12px; }
.translation-source { margin: 16px; min-height: 120px; }
.translation-preview { min-height: 120px; padding: 16px; white-space: pre-wrap; }
.upload-row { padding: 14px 16px; border-top: 1px solid var(--line); display: flex; align-items: end; justify-content: space-between; gap: 12px; }

@media (prefers-reduced-motion: reduce) {
  .metric-card, .metric-arrow-wrap, .primary-nav a, .rail-button, .nav-label, .service-list a, .button { transition: none; }
  .metric-card:hover, .metric-card:hover .metric-arrow-wrap, .button:hover, .button:active { transform: none; }
}

@media (min-width: 761px) and (max-height: 720px) {
  .sidebar .brand { height: 60px; }
  .primary-nav { gap: 2px; padding: 0; }
  .primary-nav a { width: 40px; height: 40px; border-radius: 12px; }
  .nav-divider { margin: 3px 0; }
  .sidebar-foot { padding: 8px 0 12px; }
  .avatar { display: none; }
}

@media (max-width: 1050px) {
  .page-grid.equal, .overview-grid, .users-layout.has-editor { grid-template-columns: minmax(0, 1fr); }
  .setting-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .setting-row .button { width: 100%; }
  .form-grid.compact { grid-template-columns: minmax(0, 1fr); }
  .users-filter-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .users-search-field { grid-column: span 2; }
  .users-table { min-width: 0; table-layout: fixed; }
  .users-table th:nth-child(4), .users-table td:nth-child(4) { display: none; }
  .users-table th:first-child { width: 40%; }
  .users-table th:nth-child(2) { width: 14%; }
  .users-table th:nth-child(3) { width: 18%; }
  .users-table th:nth-child(5) { width: 14%; }
  .users-table th:last-child { width: 14%; }
  .users-filter-actions { justify-content: flex-end; }
  .user-editor { position: static; }
}
@media (max-width: 760px) {
  :root { --sidebar: 0px; }
  body { background-attachment: scroll; }
  .admin-shell { padding-top: 64px; }
  .sidebar { inset: 0 0 auto 0; width: 100%; height: 64px; padding: 0 8px; overflow: hidden; border-right: 0; border-bottom: 1px solid var(--line); flex-direction: row; gap: 4px; }
  .sidebar .brand { width: auto; height: 64px; }
  .sidebar .brand-mark { width: 38px; height: 38px; }
  .primary-nav { flex: 1; min-width: 0; flex-direction: row; gap: 4px; padding: 0 4px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
  .primary-nav a, .rail-button { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px; }
  .primary-nav a[aria-current="page"]::before { left: 50%; bottom: 1px; width: 16px; height: 2px; transform: translateX(-50%); }
  .nav-label { display: none; }
  .nav-divider { width: 1px; height: 24px; margin: 0 4px; flex: 0 0 auto; }
  .sidebar-foot { margin: 0; padding: 0; }
  .avatar { display: none; }
  .workspace { margin-left: 0; }
  .topbar { position: static; height: auto; min-height: 56px; padding: 10px 16px; }
  .topbar-brand, .user-chip small { display: none; }
  .content { padding: 24px 16px 40px; }
  .page-header { margin-bottom: 22px; }
  .page-header h1 { font-size: 24px; }
  .metric-row { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .metric-card { min-height: 160px; padding: 20px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .filter-form, .search-form, .upload-row { align-items: stretch; flex-direction: column; }
  .filter-form .button, .search-form .button, .upload-row .button { width: 100%; }
  .users-filter-form { grid-template-columns: minmax(0, 1fr); }
  .users-search-field { grid-column: auto; }
  .users-filter-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .users-table th:nth-child(2), .users-table td:nth-child(2), .users-table th:nth-child(3), .users-table td:nth-child(3) { display: none; }
  .users-table th:first-child { width: 55%; }
  .users-table th:nth-child(5) { width: 20%; }
  .users-table th:last-child { width: 25%; }
  .user-identity strong { max-width: 150px; }
  .pagination { grid-template-columns: 1fr 1fr; }
  .pagination-pages { grid-column: 1 / -1; grid-row: 1; justify-content: center; }
  .pagination-control { grid-row: 2; }
  .users-table-head { align-items: flex-start; }
}
@media (max-width: 480px) {
  .auth-main { padding: 12px; }
  .login-panel { padding: 22px 18px; }
  .panel-head { align-items: flex-start; }
  .actions, .panel-actions { align-items: stretch; flex-direction: column; }
  .actions .button, .actions form, .panel-actions .button, .panel-actions form { width: 100%; }
  th, td { padding: 9px 10px; }
}
