:root {
  --sidebar-width: 230px;
  --topbar-height: 84px;
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-soft: #fafbfc;
  --sidebar: #12171e;
  --sidebar-active: #272c34;
  --text: #15181d;
  --text-soft: #606976;
  --text-faint: #89919d;
  --border: #e1e5ea;
  --border-strong: #d3d9e1;
  --blue: #1769db;
  --blue-soft: #edf4ff;
  --green: #159451;
  --green-soft: #e9f8ef;
  --amber: #c78107;
  --amber-soft: #fff5df;
  --red: #df3f38;
  --red-soft: #ffeded;
  --shadow: 0 2px 8px rgb(22 31 43 / 4%);
  --radius: 6px;
  --ease: 180ms ease;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
button, a, input, select, textarea { outline: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  box-shadow: 0 0 0 3px rgb(23 105 219 / 18%);
  border-color: var(--blue) !important;
}
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 2000; top: 8px; left: 8px; transform: translateY(-150%); padding: 10px 14px; border-radius: 4px; background: var(--surface); color: var(--text); }
.skip-link:focus { transform: translateY(0); }
.muted { color: var(--text-faint); }
.tabular { font-variant-numeric: tabular-nums; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 100;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  padding: 23px 12px 22px;
  background: radial-gradient(circle at 85% 45%, #1c222b 0, transparent 45%), var(--sidebar);
  color: #f5f7fa;
  transition: transform var(--ease);
}
.brand { display: flex; min-height: 60px; align-items: center; flex-direction: column; justify-content: center; margin: 0 0 25px; letter-spacing: .38em; }
.brand span { font-size: 23px; font-weight: 500; line-height: 1.1; }
.brand small { margin-top: 7px; font-size: 11px; letter-spacing: .42em; }
.primary-nav { display: grid; gap: 7px; }
.primary-nav a, .sidebar-logout button {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 14px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #e8ebef;
  cursor: pointer;
  transition: background var(--ease), color var(--ease);
}
.primary-nav a:hover, .sidebar-logout button:hover { background: rgb(255 255 255 / 6%); }
.primary-nav a.active { background: var(--sidebar-active); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 2%); color: #fff; }
.primary-nav svg, .sidebar-logout svg { width: 21px; height: 21px; }
.nav-badge { display: grid; min-width: 21px; height: 21px; place-items: center; margin-left: auto; padding: 0 6px; border-radius: 10px; background: #fff; color: var(--text); font-size: 11px; }
.sidebar-logout { margin-top: auto; }
.sidebar-logout button { width: 100%; }
.sidebar-scrim { display: none; position: fixed; z-index: 90; inset: 0; border: 0; background: rgb(9 13 18 / 55%); }

.app-shell { min-height: 100vh; margin-left: var(--sidebar-width); }
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  min-height: var(--topbar-height);
  align-items: center;
  padding: 0 30px;
  border-bottom: 1px solid var(--border);
  background: rgb(255 255 255 / 94%);
  backdrop-filter: blur(14px);
}
.topbar h1 { margin: 0 0 0 39px; font-size: 20px; font-weight: 650; letter-spacing: -.015em; }
.icon-button {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  transition: background var(--ease), border var(--ease);
}
.icon-button:hover { background: #f0f2f5; }
.menu-button svg { width: 24px; height: 24px; }
.topbar-actions { display: flex; align-items: center; gap: 11px; margin-left: auto; }
.notification-button { position: relative; margin-right: 12px; }
.notification-button span { position: absolute; top: 3px; right: 2px; display: grid; min-width: 17px; height: 17px; place-items: center; padding: 0 4px; border: 2px solid #fff; border-radius: 9px; background: #e6bc65; font-size: 9px; }
.avatar, .client-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #3a414b, #11151b);
  color: #fff;
  font-weight: 650;
}
.avatar { width: 30px; height: 30px; font-size: 12px; }
.admin-name { margin-left: 2px; font-size: 13px; }
.profile-chevron { width: 14px; height: 14px; transform: rotate(90deg); }
.content { width: 100%; min-height: calc(100vh - var(--topbar-height)); padding: 36px 30px 56px; }

.toast {
  position: fixed;
  z-index: 300;
  top: 98px;
  right: 24px;
  display: flex;
  width: min(430px, calc(100vw - 32px));
  align-items: center;
  gap: 12px;
  padding: 14px 14px 14px 16px;
  border: 1px solid #b8e0c8;
  border-radius: 8px;
  background: #f1fbf5;
  box-shadow: 0 14px 40px rgb(27 39 53 / 16%);
  color: #176b3d;
}
.toast.error { border-color: #f1c1be; background: #fff4f3; color: #a52723; }
.toast > svg { flex: 0 0 auto; }
.toast button { display: grid; width: 36px; height: 36px; place-items: center; margin-left: auto; border: 0; background: transparent; cursor: pointer; }
.toast button svg { width: 17px; height: 17px; }

.page-toolbar { margin: -4px 0 16px; }
.filter-row { display: flex; min-height: 62px; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 20px; overflow-x: auto; }
.tabs { display: flex; min-width: max-content; align-items: center; gap: 28px; }
.tabs a { position: relative; display: inline-flex; min-height: 44px; align-items: center; gap: 8px; color: #3f4650; font-size: 13px; white-space: nowrap; }
.tabs a::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; border-radius: 2px; background: transparent; content: ""; }
.tabs a.active { color: var(--text); font-weight: 650; }
.tabs a.active::after { background: var(--text); }
.tabs a span { display: grid; min-width: 20px; height: 20px; place-items: center; padding: 0 5px; border-radius: 6px; background: #eceff2; color: #5c6571; font-size: 11px; font-weight: 600; }
.request-kind-tabs { border-bottom: 1px solid var(--border); }
.request-kind-tabs .tabs { gap: 36px; }
.status-tabs { gap: 26px; }
.filters { display: flex; min-width: max-content; align-items: center; gap: 8px; }
.search-field, .date-field, .select-field {
  display: flex;
  height: 40px;
  align-items: center;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border var(--ease), box-shadow var(--ease);
}
.search-field { width: 240px; padding: 0 11px; gap: 8px; }
.search-field.wide { width: 310px; }
.search-field svg { width: 17px; color: var(--text-faint); }
.search-field input, .date-field input { width: 100%; height: 100%; border: 0; background: transparent; color: var(--text); }
.date-field { width: 138px; padding: 0 9px; }
.select-field { width: 158px; }
.select-field.compact { width: 142px; }
.select-field select { min-height: 38px; border: 0; background: transparent; }
.date-separator { color: var(--text-faint); }
.button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--ease), border var(--ease), color var(--ease);
}
.button:hover { border-color: #aeb6c0; background: #f9fafb; }
.button.primary { border-color: #161a20; background: #161a20; color: #fff; }
.button.primary:hover { background: #2a3038; }
.button-quiet { color: var(--text-soft); }
.button svg { width: 17px; height: 17px; }
.export-button { margin-left: 2px; }
.loading { cursor: wait !important; opacity: .7; }

.metrics { display: grid; margin-bottom: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.metrics-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metrics-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metrics article { display: flex; min-height: 116px; align-items: center; gap: 17px; padding: 20px; border-right: 1px solid var(--border); }
.metrics article:last-child { border-right: 0; }
.metric-icon { display: grid; width: 46px; height: 46px; flex: 0 0 auto; place-items: center; border-radius: 6px; }
.metric-icon svg { width: 22px; height: 22px; }
.metric-icon.blue { background: var(--blue-soft); color: var(--blue); }
.metric-icon.amber { background: var(--amber-soft); color: var(--amber); }
.metric-icon.green { background: var(--green-soft); color: var(--green); }
.metric-icon.red { background: var(--red-soft); color: var(--red); }
.metrics article > div { display: grid; }
.metrics article span:not(.metric-icon) { color: #353c46; font-size: 12px; }
.metrics strong { margin: 2px 0 1px; font-size: 22px; font-weight: 500; line-height: 1.15; font-variant-numeric: tabular-nums; }
.metrics strong em { font-size: 13px; font-style: normal; }
.metrics small { color: var(--text-faint); font-size: 11px; }
.metrics .metric-text { max-width: 230px; overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }

.data-card, .calendar-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { height: 60px; padding: 0 18px; border-bottom: 1px solid var(--border); background: var(--surface-soft); color: #4e5661; font-size: 11px; font-weight: 550; text-align: left; white-space: nowrap; }
td { min-height: 96px; padding: 17px 18px; border-bottom: 1px solid var(--border); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background var(--ease); }
tbody tr:hover { background: #fcfcfd; }
td strong { display: block; margin-bottom: 5px; font-size: 12px; font-weight: 600; }
td small { display: block; max-width: 210px; overflow: hidden; color: var(--text-faint); font-size: 11px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
td a[href^="tel"] { display: block; margin-bottom: 5px; font-size: 12px; }
.requests-table { min-width: 1216px; }
.requests-table th:nth-child(1) { width: 56px; }
.requests-table th:nth-child(2) { width: 120px; }
.requests-table th:nth-child(3) { width: 145px; }
.requests-table th:nth-child(4) { width: 140px; }
.requests-table th:nth-child(5) { width: 175px; }
.requests-table th:nth-child(6) { width: 145px; }
.requests-table th:nth-child(7) { width: 125px; }
.requests-table th:nth-child(8) { min-width: 440px; }
.select-column { padding-right: 6px; padding-left: 12px; vertical-align: middle; }
.selection-control {
  position: relative;
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  cursor: pointer;
}
.selection-control input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.selection-control span {
  display: block;
  width: 18px;
  height: 18px;
  border: 1px solid #aeb6c1;
  border-radius: 4px;
  background: #fff;
  transition: background var(--ease), border var(--ease), box-shadow var(--ease);
}
.selection-control input:checked + span {
  border-color: var(--blue);
  background: var(--blue);
  box-shadow: inset 0 0 0 4px var(--blue), inset 0 0 0 5px #fff;
}
.selection-control input:indeterminate + span {
  border-color: var(--blue);
  background: linear-gradient(var(--blue), var(--blue)) center / 9px 2px no-repeat #fff;
}
.selection-control input:focus-visible + span {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgb(23 105 219 / 18%);
}
.requests-table tr.is-selected { background: #f4f8ff; }
.requests-table tr.is-selected:hover { background: #f4f8ff; }
.parameter { display: flex; align-items: center; gap: 6px; margin: 0 0 5px; font-size: 11px; white-space: nowrap; }
.parameter svg { width: 14px; height: 14px; }
.status { display: inline-flex; min-height: 25px; align-items: center; padding: 3px 9px; border-radius: 5px; font-size: 11px; font-weight: 500; white-space: nowrap; }
.status-new { background: var(--blue-soft); color: #155fbf; }
.status-pending { background: #f0f2f4; color: #596371; }
.status-reviewing, .status-clarification { background: var(--amber-soft); color: #9a6506; }
.status-confirmed { background: var(--green-soft); color: #218448; }
.status-rejected { background: var(--red-soft); color: #c7322c; }
.status-cancelled { background: #f0f2f4; color: #6c7581; }
.delivery-error { margin-top: 6px; color: var(--red); }
.actions-cell { padding-top: 14px; }
.row-actions { display: flex; align-items: center; gap: 7px; }
.row-actions form { margin: 0; }
.action-button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  background: #fff;
  font-size: 10px;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--ease), border var(--ease);
}
.action-button:hover { background: #f8f9fa; border-color: #aeb7c1; }
.action-button svg { width: 15px; height: 15px; }
.action-button.confirm svg { color: var(--green); }
.action-button.clarify { border-color: #ecd69f; color: #a16d0b; }
.action-button.reject svg { color: var(--red); }
.action-button:disabled { opacity: .42; cursor: not-allowed; background: #f5f6f7; }
.comment-button {
  display: flex;
  max-width: 100%;
  min-height: 31px;
  align-items: center;
  gap: 6px;
  margin: 3px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-faint);
  font-size: 10px;
  cursor: pointer;
}
.comment-button svg { width: 14px; height: 14px; flex: 0 0 auto; }
.row-subactions { display: flex; min-height: 31px; align-items: center; gap: 14px; }
.row-subactions form { margin: 0; }
.table-footer { display: flex; min-height: 64px; align-items: center; justify-content: space-between; padding: 0 6px 0 18px; border-top: 1px solid var(--border); color: var(--text-soft); font-size: 11px; }
.pagination { display: flex; align-items: center; gap: 6px; }
.pagination a { display: grid; min-width: 34px; height: 34px; place-items: center; padding: 0 8px; border: 1px solid var(--border-strong); border-radius: 5px; background: #fff; color: #4d5662; }
.pagination a.active { border-color: #171b21; background: #171b21; color: #fff; }
.pagination a svg { width: 15px; height: 15px; }
.pagination a:first-child svg { transform: rotate(180deg); }
.pagination span { padding: 0 4px; }
.empty-state { display: grid; min-height: 210px; place-items: center; align-content: center; gap: 7px; color: var(--text-faint); text-align: center; }
.empty-state > svg { width: 34px; height: 34px; margin-bottom: 5px; }
.empty-state strong { color: #49515d; font-size: 14px; }

.bulk-toolbar {
  position: sticky;
  z-index: 45;
  top: calc(var(--topbar-height) + 10px);
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 14px;
  padding: 8px 10px 8px 16px;
  border: 1px solid #2d3540;
  border-radius: 8px;
  background: #171c23;
  box-shadow: 0 12px 34px rgb(17 24 33 / 18%);
  color: #fff;
}
.bulk-toolbar[hidden] { display: none; }
.bulk-summary, .bulk-controls { display: flex; align-items: center; gap: 10px; }
.bulk-count {
  display: grid;
  min-width: 30px;
  height: 30px;
  place-items: center;
  padding: 0 8px;
  border-radius: 15px;
  background: #fff;
  color: #171c23;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.bulk-toolbar .text-button { margin-left: 8px; color: #bfc6d0; }
.bulk-toolbar .text-button:hover { color: #fff; }
.bulk-toolbar select {
  width: 220px;
  min-height: 40px;
  border-color: #4b5563;
  background: #252b34;
  color: #fff;
}
.bulk-toolbar .button.primary { border-color: #fff; background: #fff; color: #171c23; }
.bulk-toolbar .button.primary:hover { background: #edf0f3; }
.bulk-dialog-summary { padding: 18px 24px 0; }
.bulk-dialog-summary strong { font-size: 14px; }
.bulk-dialog-summary p { margin: 5px 0 0; color: var(--text-soft); font-size: 12px; }

.action-dialog { width: min(520px, calc(100vw - 28px)); padding: 0; border: 1px solid var(--border); border-radius: 10px; background: #fff; box-shadow: 0 26px 80px rgb(16 23 33 / 30%); }
.action-dialog::backdrop { background: rgb(11 15 20 / 52%); backdrop-filter: blur(2px); }
.action-dialog header { display: flex; align-items: flex-start; justify-content: space-between; padding: 22px 24px 18px; border-bottom: 1px solid var(--border); }
.eyebrow { display: block; margin-bottom: 4px; color: var(--text-faint); font-size: 10px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; }
.action-dialog h2, .section-heading h2, .calendar-toolbar h2, .data-card h2, .data-card h3 { margin: 0; font-size: 18px; font-weight: 650; }
.dialog-field { display: grid; gap: 7px; padding: 20px 24px 0; }
.dialog-field[hidden] { display: none; }
.dialog-field label, .proxy-source-form label { font-size: 12px; font-weight: 600; }
textarea, select, .login-card input {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  transition: border var(--ease), box-shadow var(--ease);
}
textarea { resize: vertical; padding: 11px 12px; line-height: 1.5; }
select { min-height: 42px; padding: 0 11px; }
.dialog-field small { color: var(--text-faint); font-size: 11px; }
.action-dialog footer { display: flex; justify-content: flex-end; gap: 8px; padding: 22px 24px 24px; }

.clients-filter { margin-top: -8px; }
.clients-table { min-width: 920px; }
.client-cell { display: flex; align-items: center; gap: 10px; }
.client-avatar { width: 34px; height: 34px; background: #282e36; font-size: 12px; }
.client-cell strong { margin: 0; }

.calendar-toolbar, .section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.calendar-toolbar h2 { font-size: 21px; }
.calendar-controls { display: flex; align-items: center; gap: 7px; }
.calendar-controls .icon-button { border-color: var(--border-strong); background: #fff; }
.flip { transform: rotate(180deg); }
.calendar-card { overflow: hidden; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-weekdays { border-bottom: 1px solid var(--border); background: var(--surface-soft); }
.calendar-weekdays span { padding: 12px 13px; color: var(--text-faint); font-size: 11px; font-weight: 600; text-align: right; }
.calendar-grid article { min-height: 126px; padding: 10px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); background: #fff; }
.calendar-grid article:nth-child(7n) { border-right: 0; }
.calendar-grid article.outside { background: #fafbfc; color: #b0b6be; }
.calendar-grid time { display: grid; width: 28px; height: 28px; place-items: center; margin-left: auto; border-radius: 50%; font-size: 11px; font-variant-numeric: tabular-nums; }
.calendar-grid article.today time { background: #171b21; color: #fff; }
.calendar-events { display: grid; gap: 4px; margin-top: 7px; }
.calendar-event { display: flex; min-height: 25px; align-items: center; justify-content: space-between; padding: 3px 7px; border-left: 2px solid; border-radius: 3px; font-size: 10px; }
.calendar-event.blue { border-color: var(--blue); background: var(--blue-soft); color: #155fbf; }
.calendar-event.amber { border-color: var(--amber); background: var(--amber-soft); color: #8a5b05; }
.calendar-event.green { border-color: var(--green); background: var(--green-soft); color: #17733e; }

.stats-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(270px, 1fr); gap: 20px; }
.chart-card, .summary-card { padding: 22px; }
.data-card > header { display: flex; align-items: flex-start; justify-content: space-between; padding-bottom: 20px; }
.bar-chart { display: flex; min-height: 310px; align-items: flex-end; gap: 12px; padding-top: 35px; border-top: 1px solid var(--border); }
.bar-column { display: grid; height: 250px; flex: 1; grid-template-rows: 20px 1fr 24px; align-items: end; text-align: center; }
.bar-value { color: var(--text-soft); font-size: 10px; opacity: 0; transition: opacity var(--ease); }
.bar-column:hover .bar-value { opacity: 1; }
.bar-track { position: relative; display: flex; height: 100%; align-items: flex-end; justify-content: center; border-bottom: 1px solid var(--border); }
.bar-track span { display: block; width: min(28px, 70%); min-height: 2px; border-radius: 3px 3px 0 0; background: #252b33; transition: background var(--ease); }
.bar-column:hover .bar-track span { background: var(--blue); }
.bar-column small { align-self: end; padding-top: 7px; color: var(--text-faint); font-size: 9px; }
.summary-card dl { margin: 0; border-top: 1px solid var(--border); }
.summary-card dl div { display: flex; min-height: 62px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); }
.summary-card dt { color: var(--text-soft); }
.summary-card dd { margin: 0; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }

.settings-layout { display: grid; grid-template-columns: 205px minmax(0, 1fr); gap: 34px; }
.settings-nav { display: flex; flex-direction: column; gap: 7px; }
.settings-nav > .eyebrow { margin: 1px 12px 8px; }
.settings-nav a { display: flex; min-height: 46px; align-items: center; gap: 11px; padding: 0 12px; border-radius: 6px; color: var(--text-soft); }
.settings-nav a.active { background: #e9ecf0; color: var(--text); font-weight: 600; }
.settings-nav a svg { width: 18px; height: 18px; }
.settings-nav .chevron { width: 14px; margin-left: auto; }
.section-heading p { max-width: 680px; margin: 7px 0 0; color: var(--text-soft); font-size: 12px; }
.system-pill { display: inline-flex; min-height: 32px; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid #bde2ca; border-radius: 16px; background: #f1faf4; color: #237545; font-size: 11px; }
.system-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgb(21 148 81 / 11%); }
.system-pill.warning { border-color: #eddbad; background: #fff9ea; color: #93630b; }
.system-pill.warning i { background: var(--amber); }
.proxy-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.proxy-card { padding: 22px; }
.proxy-card > header { border-bottom: 1px solid var(--border); }
.proxy-details { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; margin: 0 0 20px; }
.proxy-details div { min-width: 0; padding: 12px 0; border-bottom: 1px solid var(--border); }
.proxy-details .full { grid-column: 1 / -1; }
.proxy-details dt { margin-bottom: 4px; color: var(--text-faint); font-size: 10px; }
.proxy-details dd { margin: 0; overflow: hidden; font-size: 11px; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.proxy-details .error-detail dd { color: var(--red); white-space: normal; }
.proxy-source-form { display: grid; gap: 8px; }
.proxy-source-form textarea { min-height: 86px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 2px; }
.proxy-secondary-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 16px; padding-top: 15px; border-top: 1px solid var(--border); }
.text-button { min-height: 32px; padding: 0; border: 0; background: transparent; color: #46505c; font-size: 11px; cursor: pointer; }
.text-button:hover { color: var(--blue); }
.text-button.danger { margin-left: auto; color: var(--red); }
.events-card { margin-top: 18px; padding: 22px; }
.event-list { border-top: 1px solid var(--border); }
.event-list article { display: grid; grid-template-columns: 10px 1fr; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--border); }
.event-dot { width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: var(--green); }
.event-dot.warning { background: var(--amber); }
.event-dot.error { background: var(--red); }
.event-list strong { display: block; font-size: 11px; font-weight: 550; }
.event-list small { display: block; margin-top: 3px; color: var(--text-faint); font-size: 10px; }

.login-page { display: grid; min-height: 100dvh; place-items: center; padding: 24px; background: radial-gradient(circle at 15% 10%, #252d37 0, transparent 30%), #11161d; }
.login-card { width: min(430px, 100%); padding: 38px; border: 1px solid #e4e7eb; border-radius: 10px; background: #fff; box-shadow: 0 28px 90px rgb(0 0 0 / 35%); }
.login-brand { display: flex; align-items: center; flex-direction: column; margin-bottom: 34px; color: #181d23; letter-spacing: .38em; }
.login-brand span { font-size: 25px; line-height: 1; }
.login-brand small { margin-top: 8px; font-size: 10px; letter-spacing: .44em; }
.login-heading h1 { margin: 0; font-size: 26px; letter-spacing: -.02em; }
.login-heading p { margin: 8px 0 22px; color: var(--text-soft); }
.login-card form { display: grid; }
.login-card label { margin: 12px 0 6px; font-size: 12px; font-weight: 600; }
.login-card input { height: 44px; padding: 0 12px; }
.login-submit { width: 100%; min-height: 44px; margin-top: 22px; }
.login-error { margin: 0 0 12px; padding: 11px 12px; border: 1px solid #efc2bf; border-radius: 6px; background: var(--red-soft); color: #ae302b; font-size: 12px; }
.login-footnote { margin: 24px 0 0; color: var(--text-faint); font-size: 10px; text-align: center; }

@media (max-width: 1280px) {
  .content { padding-right: 22px; padding-left: 22px; }
  .filter-row { align-items: flex-start; flex-direction: column; gap: 12px; }
  .filters { width: 100%; min-width: 0; flex-wrap: wrap; }
  .search-field { min-width: 240px; flex: 1 1 260px; }
  .select-field { flex: 0 0 158px; }
  .select-field.compact { flex-basis: 142px; }
  .date-field { flex: 0 0 138px; }
  .metrics article { padding: 16px; }
  .proxy-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1024px) {
  :root { --sidebar-width: 230px; --topbar-height: 70px; }
  .sidebar { transform: translateX(-100%); }
  .sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-open .sidebar-scrim { display: block; }
  .app-shell { margin-left: 0; }
  .topbar { padding: 0 18px; }
  .topbar h1 { margin-left: 12px; }
  .metrics-four { grid-template-columns: repeat(2, 1fr); }
  .metrics-four article:nth-child(2) { border-right: 0; }
  .metrics-four article:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { display: none; }
}

@media (max-width: 720px) {
  body { font-size: 13px; }
  .content { padding: 20px 14px 40px; }
  .topbar { padding: 0 10px; }
  .topbar h1 { font-size: 17px; }
  .admin-name, .profile-chevron, .notification-button { display: none; }
  .filter-row { overflow: visible; }
  .request-kind-tabs { overflow-x: auto; }
  .tabs { gap: 21px; }
  .status-tabs { width: 100%; min-width: 0; max-width: 100%; overflow-x: auto; }
  .filters { display: grid; min-width: 0; grid-template-columns: 1fr 1fr; }
  .search-field, .search-field.wide { width: auto; grid-column: 1 / -1; }
  .select-field, .select-field.compact { width: auto; }
  .date-field { width: auto; }
  .date-separator { display: none; }
  .filters .button { min-height: 44px; }
  .metrics-three, .metrics-four { grid-template-columns: 1fr; }
  .metrics article, .metrics-four article:nth-child(2) { min-height: 92px; border-right: 0; border-bottom: 1px solid var(--border); }
  .metrics article:last-child { border-bottom: 0; }
  .table-scroll { overflow: visible; }
  .requests-table, .clients-table { min-width: 0; }
  table, tbody, tr, td { display: block; }
  thead { display: none; }
  tbody { display: grid; gap: 12px; padding: 12px; }
  tbody tr { display: grid; padding: 8px 14px 14px; border: 1px solid var(--border); border-radius: 7px; background: #fff; }
  tbody tr:hover { background: #fff; }
  td { display: grid; min-height: 0; grid-template-columns: 108px 1fr; padding: 10px 0; border-bottom: 1px solid var(--border); }
  td::before { color: var(--text-faint); content: attr(data-label); font-size: 10px; }
  td:last-child { border-bottom: 0; }
  .select-column {
    min-height: 50px;
    align-items: center;
    grid-template-columns: 108px 1fr;
    padding: 3px 0;
  }
  .select-column .selection-control { justify-self: start; }
  .actions-cell { display: block; }
  .actions-cell::before { display: block; margin-bottom: 8px; }
  .row-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .action-button, .row-actions form { width: 100%; }
  .action-button { min-height: 44px; justify-content: center; }
  .comment-button { min-height: 44px; }
  .bulk-toolbar {
    top: calc(var(--topbar-height) + 6px);
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
  }
  .bulk-summary { justify-content: space-between; }
  .bulk-controls { display: grid; grid-template-columns: 1fr auto; }
  .bulk-toolbar select { width: 100%; min-height: 44px; }
  .bulk-toolbar .button { min-height: 44px; }
  .table-footer { padding: 12px; flex-direction: column; gap: 12px; }
  .calendar-grid article { min-height: 86px; padding: 6px; }
  .calendar-event { overflow: hidden; padding: 3px 4px; text-indent: -9999px; }
  .calendar-event strong { text-indent: 0; }
  .stats-grid { grid-template-columns: 1fr; }
  .bar-chart { gap: 4px; }
  .bar-track span { width: 75%; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 14px; }
  .proxy-details { grid-template-columns: 1fr; }
  .proxy-card { padding: 16px; }
  .form-actions { align-items: stretch; flex-direction: column; }
  .form-actions .button { min-height: 44px; }
  .login-card { padding: 30px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
