:root {
  color-scheme: light;
  --sidebar-width: 216px;
  --sidebar-collapsed-width: 56px;
  --sidebar-inner-padding: 10px;
  --nav-item-padding-x: 8px;
  --nav-icon-size: 18px;
  --nav-icon-half: 9px;
  --nav-item-gap: 10px;
  --workspace: #f5f7fa;
  --surface: #ffffff;
  --surface-subtle: #fafbfc;
  --surface-hover: #f3f7ff;
  --text: #1f2329;
  --text-secondary: #59636e;
  --text-tertiary: #8a949f;
  --border: #e3e8ee;
  --border-strong: #d4dce5;
  --primary: #006eff;
  --primary-hover: #0057cc;
  --primary-soft: #edf5ff;
  --danger: #d93026;
  --danger-soft: #fff1f0;
  --warning: #b36b00;
  --warning-soft: #fff8e6;
  --success: #12805c;
  --success-soft: #ebf8f3;
  --shadow: 0 1px 2px rgb(31 35 41 / 4%);
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--workspace);
}

body {
  max-width: 100%;
  overflow-x: hidden;
  min-width: 320px;
  margin: 0;
  background: var(--workspace);
  color: var(--text);
  font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0;
}

button,
input,
select { font: inherit; }

button { cursor: pointer; }

a { color: inherit; text-decoration: none; }

button,
.button {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--primary);
  border-radius: 4px;
  padding: 5px 12px;
  background: var(--primary);
  color: #ffffff;
  font-size: 13px;
  line-height: 20px;
  white-space: nowrap;
}

button:hover,
.button:hover { background: var(--primary-hover); border-color: var(--primary-hover); }

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid rgb(0 110 255 / 28%);
  outline-offset: 1px;
}

button:disabled,
.button[aria-disabled="true"] { cursor: not-allowed; opacity: .58; }

input,
select {
  min-height: 32px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  padding: 5px 9px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  line-height: 20px;
}

input::placeholder { color: var(--text-tertiary); }

.sidebar-toggle {
  position: relative;
  width: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border-color: transparent;
  background: transparent;
  color: var(--text-secondary);
}

.sidebar-toggle:hover { border-color: var(--border); background: var(--surface-subtle); color: var(--text); }

.sidebar-toggle-glyph,
.sidebar-toggle-glyph::before,
.sidebar-toggle-glyph::after {
  position: absolute;
  left: 8px;
  width: 16px;
  height: 1px;
  border-radius: 1px;
  background: currentColor;
  content: "";
}

.sidebar-toggle-glyph { top: 15px; }
.sidebar-toggle-glyph::before { top: -5px; left: 0; }
.sidebar-toggle-glyph::after { top: 5px; left: 0; }

.app-sidebar {
  position: fixed;
  z-index: 20;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid var(--border);
  background: var(--surface);
  transition: width 160ms ease, transform 160ms ease;
}

.console-shell,
.console-workspace {
  min-width: 0;
  max-width: 100%;
}

.sidebar-brand {
  display: flex;
  height: 48px;
  min-height: 48px;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding: 0 10px;
}

.sidebar-brand-title {
  overflow: hidden;
  color: #161a1d;
  font-size: 16px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 14px var(--sidebar-inner-padding) 24px;
}

.nav-group-title {
  overflow: hidden;
  margin: 8px 0 6px;
  padding-left: calc(var(--nav-item-padding-x) + var(--nav-icon-size) + var(--nav-item-gap));
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 600;
  line-height: 24px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-group-title-system { margin-top: 24px; }

.nav-tree { margin: 2px 0; }

.nav-parent-row {
  display: flex;
  align-items: center;
  border-radius: 4px;
}

.nav-parent-row:hover { background: var(--surface-hover); }
.nav-parent-row.is-active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }

.nav-item {
  position: relative;
  display: flex;
  height: 36px;
  align-items: center;
  gap: var(--nav-item-gap);
  margin: 2px 0;
  border-radius: 4px;
  padding: 0 var(--nav-item-padding-x);
  color: #434c55;
  font-size: 14px;
  white-space: nowrap;
}

.nav-item:hover { background: var(--surface-hover); color: var(--primary); }
.nav-item.is-active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }

.nav-parent-row .nav-item {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  background: transparent;
  color: inherit;
}

.nav-parent-row .nav-item:hover { background: transparent; color: var(--primary); }

.nav-submenu-toggle {
  width: 32px;
  min-width: 32px;
  min-height: 36px;
  border: 0;
  border-radius: 0 4px 4px 0;
  padding: 0;
  background: transparent;
  color: var(--text-tertiary);
}

.nav-submenu-toggle:hover { border: 0; background: transparent; color: var(--primary); }

.nav-chevron {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px);
  transition: transform 140ms ease;
}

.nav-tree.is-open .nav-chevron { transform: rotate(225deg) translate(-1px, -1px); }

.nav-submenu {
  display: grid;
  gap: 1px;
  margin: 3px 0 6px calc(var(--nav-item-padding-x) + var(--nav-icon-half));
  border-left: 1px solid var(--border-strong);
  padding: 2px 0 2px 10px;
}

.nav-submenu[hidden] { display: none; }

.nav-submenu a {
  display: flex;
  min-height: 30px;
  align-items: center;
  border-radius: 3px;
  padding: 4px 8px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 20px;
  white-space: nowrap;
}

.nav-submenu a:hover { background: var(--surface-hover); color: var(--primary); }
.nav-submenu a.is-active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }

.nav-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-icon {
  position: relative;
  display: inline-block;
  width: var(--nav-icon-size);
  min-width: var(--nav-icon-size);
  height: var(--nav-icon-size);
  color: currentColor;
}

.nav-icon::before,
.nav-icon::after { position: absolute; box-sizing: border-box; content: ""; }

.nav-icon-mail::before {
  top: 3px;
  left: 1px;
  width: 16px;
  height: 12px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
}

.nav-icon-mail::after {
  top: 5px;
  left: 4px;
  width: 9px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}

.nav-icon-device::before {
  top: 2px;
  left: 1px;
  width: 16px;
  height: 12px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
}

.nav-icon-device::after {
  bottom: 1px;
  left: 5px;
  width: 8px;
  height: 3px;
  border-top: 1.5px solid currentColor;
  border-left: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
}

.nav-icon-overview::before {
  top: 2px;
  left: 1px;
  width: 5px;
  height: 14px;
  border-radius: 1px;
  background: currentColor;
  box-shadow: 6px 4px 0 currentColor, 12px -3px 0 currentColor;
}

.nav-icon-summary::before {
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
}

.nav-icon-summary::after {
  top: 6px;
  left: 5px;
  width: 8px;
  height: 1.5px;
  background: currentColor;
  box-shadow: 0 4px 0 currentColor;
}

.nav-icon-alert::before {
  top: 1px;
  left: 3px;
  width: 12px;
  height: 15px;
  border: 1.5px solid currentColor;
  border-radius: 8px 8px 3px 3px;
}

.nav-icon-alert::after {
  bottom: 0;
  left: 7px;
  width: 4px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.nav-icon-settings::before {
  top: 4px;
  left: 4px;
  width: 10px;
  height: 10px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  box-shadow: 0 -4px 0 -2px currentColor, 0 4px 0 -2px currentColor, 4px 0 0 -2px currentColor, -4px 0 0 -2px currentColor;
}

.nav-icon-settings::after {
  top: 7px;
  left: 7px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.nav-icon-account::before {
  top: 1px;
  left: 5px;
  width: 8px;
  height: 8px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}

.nav-icon-account::after {
  bottom: 1px;
  left: 2px;
  width: 14px;
  height: 8px;
  border: 1.5px solid currentColor;
  border-radius: 9px 9px 3px 3px;
}

.sidebar-overlay { display: none; }

.console-workspace {
  width: auto;
  min-width: 0;
  min-height: 100vh;
  margin-left: var(--sidebar-width);
  overflow-x: clip;
  padding: 20px 24px 32px;
  transition: margin-left 160ms ease;
}

.sidebar-collapsed .app-sidebar { width: var(--sidebar-collapsed-width); }
.sidebar-collapsed .console-workspace { margin-left: var(--sidebar-collapsed-width); }
.sidebar-collapsed .sidebar-brand { justify-content: center; padding: 0; }
.sidebar-collapsed .sidebar-brand-title { width: 0; opacity: 0; }
.sidebar-collapsed .sidebar-nav { padding-left: 8px; padding-right: 8px; }
.sidebar-collapsed .nav-group-title { height: 16px; margin: 10px 0 6px; font-size: 0; line-height: 16px; }
.sidebar-collapsed .nav-group-title::after { display: block; width: 18px; height: 1px; margin: 7px auto; background: var(--border-strong); content: ""; }
.sidebar-collapsed .nav-group-title-system { margin-top: 22px; }
.sidebar-collapsed .nav-item { justify-content: center; padding: 0; }
.sidebar-collapsed .nav-parent-row .nav-item { width: 100%; }
.sidebar-collapsed .nav-submenu-toggle,
.sidebar-collapsed .nav-submenu { display: none; }
.sidebar-collapsed .nav-label { width: 0; opacity: 0; }
.sidebar-collapsed .nav-item[data-tooltip]:hover::after {
  position: absolute;
  z-index: 40;
  top: 6px;
  left: calc(100% + 8px);
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: #30343b;
  color: #ffffff;
  content: attr(data-tooltip);
  font-size: 12px;
  font-weight: 400;
  line-height: 18px;
  white-space: nowrap;
}

.toolbar {
  display: flex;
  min-height: 44px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 16px;
}

.toolbar > div:first-child { min-width: 0; }

section[id] { scroll-margin-top: 14px; }

h1,
h2 { margin: 0; color: var(--text); font-weight: 600; }
h1 { font-size: 20px; line-height: 30px; }
h2 { font-size: 15px; line-height: 24px; }
p { margin: 5px 0 0; color: var(--text-secondary); font-size: 13px; line-height: 20px; }

.panel {
  min-width: 0;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 16px;
}

.panel > h2 + p { margin-top: 4px; }

.grid.two {
  display: grid;
  grid-template-columns: minmax(340px, 1fr) minmax(480px, 1.45fr);
  gap: 16px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.stats div {
  min-height: 86px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 14px 16px;
}

.stats strong { display: block; font-size: 26px; font-weight: 600; line-height: 32px; }
.stats span { display: block; margin-top: 3px; color: var(--text-secondary); font-size: 13px; }

.latest-mail-card {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.latest-mail-card > div {
  min-width: 0;
  min-height: 92px;
  border-right: 1px solid var(--border);
  padding: 14px 16px;
}

.latest-mail-card > div:last-child { border-right: 0; }

.latest-mail-card p:first-child {
  min-height: 20px;
  margin: 0 0 5px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 400;
}

.latest-mail-card strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 18px;
  font-weight: 600;
  line-height: 27px;
}

.latest-mail-card p { margin: 3px 0 0; }

.filters,
.upload {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-menu {
  min-height: 52px;
  margin: -16px -16px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-subtle);
  padding: 10px 16px;
}

.filter-menu strong { color: var(--text); font-size: 13px; white-space: nowrap; }

.filter-menu input:not([type="hidden"]),
.filter-menu select { max-width: 190px; }

.sticky-filter-bar {
  position: sticky;
  z-index: 9;
  top: 0;
}

.sticky-filter-panel {
  position: sticky;
  z-index: 8;
  top: 8px;
}

.compact-filter { justify-content: flex-start; margin-bottom: 0; }
.compact-filter label { min-width: 142px; }
.upload.secondary { margin-top: 10px; }

.inline-filter-label {
  flex-direction: row;
  align-items: center;
  gap: 7px;
  color: var(--text);
  white-space: nowrap;
}

.account-center-panel {
  max-width: 760px;
  padding: 0;
}

.account-center-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  padding: 18px 20px;
}

.account-center-heading h2 { font-size: 16px; }
.account-center-heading p { margin-top: 2px; }

.account-avatar {
  display: grid;
  width: 40px;
  min-width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 16px;
  font-weight: 600;
}

.account-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
}

.account-details > div {
  min-width: 0;
  border-right: 1px solid var(--border);
  padding: 16px 20px;
}

.account-details > div:last-child { border-right: 0; }
.account-details dt { color: var(--text-secondary); font-size: 13px; line-height: 20px; }
.account-details dd { margin: 4px 0 0; color: var(--text); font-size: 14px; font-weight: 500; line-height: 22px; }

.account-center-actions {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--border);
  padding: 14px 20px;
}

.account-center-actions form { margin: 0; }

.button-secondary {
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--text);
}

.button-secondary:hover { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }

.primary-action {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
}

.primary-action:hover { border-color: var(--primary-hover); background: var(--primary-hover); color: #ffffff; }

.daily-summary-filters {
  display: grid;
  grid-template-columns: repeat(8, minmax(118px, 1fr));
  align-items: end;
  gap: 10px;
  margin: 12px -16px -16px;
  border-top: 1px solid var(--border);
  background: var(--surface-subtle);
  padding: 12px 16px;
}

.summary-section-filter {
  position: sticky;
  z-index: 8;
  top: 8px;
  margin: 12px -16px 14px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface-subtle);
  padding: 10px 16px;
}

.summary-section-filter h3 {
  margin: 0 0 8px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
}

.daily-section-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  align-items: end;
  gap: 8px;
}

.daily-section-filters label,
.daily-section-filters .daily-filter-field {
  min-width: 0;
}

.daily-section-filters input,
.daily-section-filters select,
.daily-section-filters .locked-filter { width: 100%; min-width: 0; }

.daily-section-filters .daily-filter-actions {
  grid-column: 1 / -1;
  justify-self: start;
  flex-wrap: wrap;
}

.daily-summary-filters label,
.daily-filter-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
  color: var(--text-secondary);
  font-size: 13px;
}

.daily-summary-filters input:not([type="checkbox"]),
.daily-summary-filters select,
.daily-summary-filters .locked-filter { width: 100%; max-width: none; height: 32px; min-height: 32px; }

.daily-check-control {
  display: flex;
  min-height: 32px;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: var(--surface);
  padding: 5px 9px;
  color: var(--text);
}

.daily-check-control input { width: auto; min-height: auto; margin: 0; accent-color: var(--primary); }

.daily-filter-actions {
  display: flex;
  grid-column: span 2;
  align-items: center;
  gap: 8px;
}

.locked-filter {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: #f2f4f7;
  padding: 5px 9px;
  color: var(--text-secondary);
  font-size: 13px;
}

label { display: flex; flex-direction: column; gap: 4px; color: var(--text-secondary); font-size: 13px; }
label.check { flex-direction: row; align-items: center; gap: 6px; min-height: 32px; color: var(--text); white-space: nowrap; }
label.check input { min-height: auto; margin: 0; accent-color: var(--primary); }

.settings .form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(200px, 1fr));
  gap: 14px 16px;
  margin-top: 12px;
}

.settings .compact-grid { grid-template-columns: repeat(2, minmax(180px, 260px)); align-items: end; }
.settings > .panel + .panel { margin-top: 16px; }
.settings > button { margin-top: 0; }

.inline-form { display: inline-flex; align-items: center; gap: 6px; }
.inline-form input { width: 180px; }

.notice,
.error-box {
  margin: 0 0 16px;
  border: 1px solid;
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 20px;
}

.notice { border-color: #b7e4d0; background: var(--success-soft); color: var(--success); }
.error-box,
.error { border-color: #f0c1bd; background: var(--danger-soft); color: var(--danger); }
.error { margin: 0; padding: 8px 10px; border: 1px solid #f0c1bd; border-radius: 4px; }

.secondary-btn { border-color: var(--border-strong); background: var(--surface); color: var(--text-secondary); }
.secondary-btn:hover { border-color: #aebbc8; background: var(--surface-subtle); color: var(--text); }
.danger-btn { border-color: #f1c3bf; background: var(--surface); color: var(--danger); }
.danger-btn:hover { border-color: #e79690; background: var(--danger-soft); color: #b42318; }

.table-scroll { width: 100%; max-width: 100%; overflow-x: auto; }

.data-table-viewport {
  max-height: calc(100vh - 190px);
  overflow: auto;
  overscroll-behavior: contain;
}

.compact-summary-viewport { overflow-x: hidden; }

.data-table-viewport thead th {
  position: sticky;
  z-index: 3;
  top: 0;
  box-shadow: inset 0 1px 0 var(--border);
}

table { width: 100%; min-width: 100%; border-collapse: separate; border-spacing: 0; table-layout: auto; }

th,
td {
  border-bottom: 1px solid #edf0f3;
  padding: 9px 10px;
  color: var(--text);
  font-size: 13px;
  line-height: 20px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

th {
  border-top: 1px solid var(--border);
  background: var(--surface-subtle);
  color: var(--text-secondary);
  font-weight: 500;
}

th:first-child { border-left: 1px solid var(--border); }
th:last-child { border-right: 1px solid var(--border); }
tbody tr:hover td { background: #fbfdff; }
tbody tr:last-child td { border-bottom-color: var(--border); }
td.long-text,
.long-text { white-space: normal; text-align: left; }
.empty-table-cell { padding: 18px 12px; color: var(--text-tertiary); white-space: normal; }

.danger { color: var(--danger); font-weight: 600; }
.muted-small { margin-left: 5px; color: var(--text-tertiary); font-size: 12px; }
.error-inline { margin-left: 5px; color: var(--danger); font-size: 12px; }

.badge,
.status-pill {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 7px;
  background: #f7f9fb;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 18px;
  white-space: nowrap;
}

.badge.completed,
.badge.recovered,
.badge.manual_confirmed,
.badge.manual-confirmed,
.badge.confirmed_complete,
.badge.verified_completed,
.status-pill.published,
.status-pill.verified {
  border-color: #b7e4d0;
  background: var(--success-soft);
  color: var(--success);
}

.badge.running { border-color: #bed9ff; background: var(--primary-soft); color: var(--primary); }
.badge.stale,
.badge.zero_anomaly,
.badge.active,
.badge.mail_status_blocked,
.badge.failed,
.badge.manual_revoked,
.status-pill.abnormal { border-color: #f0c1bd; background: var(--danger-soft); color: var(--danger); }
.badge.not_started,
.badge.below_threshold,
.badge.disabled,
.badge.owner_not_enabled,
.badge.account_not_located,
.status-pill.unpublished { border-color: #f0d290; background: var(--warning-soft); color: var(--warning); }

.status-stack { display: grid; min-width: 128px; gap: 4px; justify-items: center; }
.low-week-rate-cell { background: var(--danger-soft); color: var(--danger); font-weight: 600; }

.summary-layout { display: block; }

.summary-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 8px 12px;
}

.summary-nav h2 { margin-right: 4px; color: var(--text-secondary); font-size: 13px; font-weight: 500; }
.summary-nav a { border: 1px solid transparent; border-radius: 3px; padding: 4px 8px; color: var(--text-secondary); font-size: 13px; white-space: nowrap; }
.summary-nav a:hover { border-color: #bed9ff; background: var(--primary-soft); color: var(--primary); }
.summary-content { min-width: 0; }

.summary-table th:first-child,
.summary-table td:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); }
.summary-table th:first-child { z-index: 4; background: var(--surface-subtle); }
.summary-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.summary-table th,
.summary-table td {
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 6px 4px;
  font-size: 12px;
  line-height: 17px;
  white-space: normal;
}

.device-summary-table .rate-summary-cell {
  width: 102px;
  border-left: 1px solid var(--border);
  padding-right: 8px;
  padding-left: 8px;
  overflow-wrap: normal;
  white-space: nowrap;
}

.duration-summary-table .duration-summary-cell { width: 96px; }

.summary-table th small { color: var(--text-tertiary); font-size: 11px; font-weight: 400; }
.summary-table .status-stack { min-width: 0; gap: 3px; }
.summary-table .status-pill { max-width: 100%; min-height: 18px; padding: 0 4px; font-size: 11px; line-height: 16px; white-space: normal; }
.account-summary-table th:nth-last-child(2) { width: 76px; }
.account-summary-table th:last-child { width: 88px; }
.account-status-editor {
  display: grid;
  justify-items: center;
  gap: 4px;
}
.account-status-editor select { width: 100%; min-width: 0; max-width: 100%; font-size: 11px; line-height: 16px; }
.account-status-editor .secondary-btn { min-height: 26px; padding: 3px 7px; font-size: 11px; }
.duration-summary-table th:first-child,
.duration-summary-table td:first-child { width: 88px; }

.summary-table .issue-action-heading,
.summary-table .issue-action-cell { width: 112px; }
.summary-table .issue-review-heading,
.summary-table .issue-review-cell { width: 124px; }

.issue-action-cell,
.issue-review-cell { vertical-align: middle; text-align: center; }
.issue-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-bottom: 4px; }
.issue-links a { color: var(--primary); font-size: 12px; }
.file-field {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  background: var(--surface);
  padding: 3px 7px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 12px;
}
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; clip-path: inset(50%); }
.issue-editor { text-align: left; }
.issue-editor summary { color: var(--primary); cursor: pointer; font-size: 12px; text-align: center; }
.issue-editor[open] { display: grid; gap: 7px; }
.issue-action-links { display: grid; gap: 5px; justify-items: center; }
.issue-record-link { color: var(--primary); font-size: 12px; line-height: 18px; text-decoration: underline; }
.compact-issue-editor > form {
  display: grid;
  gap: 7px;
  margin-top: 7px;
}
.compact-issue-editor label {
  display: grid;
  gap: 3px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 18px;
}

.compact-issue-editor input,
.compact-issue-editor textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  background: var(--surface);
  padding: 5px 7px;
  color: var(--text);
  font: inherit;
}

.compact-issue-editor textarea {
  min-height: 54px;
  resize: vertical;
  line-height: 18px;
}

.issue-upload-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.issue-upload-row .issue-links { margin: 0; }
.review-readonly { min-width: 0; overflow-wrap: anywhere; color: var(--text-secondary); line-height: 19px; }
.duration-value { display: inline-block; min-width: 32px; font-weight: 600; }
.duration-value.duration-normal { color: var(--success); }
.duration-value.duration-slow { color: #ad6800; background: #fff7e6; }
.duration-value.duration-severe { color: var(--danger); background: #fff1f0; }
.duration-detail-trigger {
  display: block;
  width: 100%;
  margin-top: 3px;
  border: 0;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  font-size: 11px;
  line-height: 16px;
  text-align: center;
}
.duration-detail-trigger:hover { text-decoration: underline; }
.duration-detail-dialog {
  width: min(900px, calc(100vw - 40px));
  max-width: 900px;
  max-height: min(86vh, 860px);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: var(--surface);
  box-shadow: 0 18px 48px rgba(28, 43, 65, .24);
  padding: 0;
}
.duration-detail-dialog::backdrop { background: rgba(16, 24, 40, .36); }
.duration-detail-panel { display: grid; max-height: min(86vh, 860px); grid-template-rows: auto auto minmax(0, 1fr) auto; }
.duration-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  padding: 16px 18px 12px;
}
.duration-detail-header h2 { margin: 0; font-size: 16px; line-height: 24px; }
.duration-detail-header p { margin: 4px 0 0; color: var(--text-secondary); font-size: 12px; line-height: 18px; }
.icon-action {
  display: inline-grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}
.icon-action:hover { border-color: var(--border-strong); background: var(--surface-subtle); color: var(--text); }
.duration-detail-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding: 10px 18px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 18px;
}
.duration-detail-summary strong { color: var(--text); font-weight: 600; }
.detail-reconciled { color: var(--success); }
.detail-warning,
.detail-note-warning { color: var(--danger); }
.duration-detail-table-wrap { min-height: 0; overflow: auto; padding: 0 18px; }
.duration-detail-table { width: 100%; min-width: 680px; table-layout: fixed; }
.duration-detail-table th,
.duration-detail-table td { padding: 8px 7px; font-size: 12px; line-height: 18px; }
.duration-detail-table th:nth-child(1) { width: 7%; }
.duration-detail-table th:nth-child(2) { width: 18%; }
.duration-detail-table th:nth-child(3) { width: 15%; }
.duration-detail-table th:nth-child(4) { width: 15%; }
.duration-detail-table th:nth-child(5) { width: 15%; }
.duration-detail-table th:nth-child(6) { width: 30%; }
.duration-detail-table .long-text { overflow-wrap: anywhere; }
.duration-detail-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--border);
  padding: 12px 18px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 18px;
}
.duration-detail-footer .primary-action { flex: 0 0 auto; }
.duration-detail-loading { min-width: 260px; padding: 26px; color: var(--text-secondary); text-align: center; }

.quantity-statistics { scroll-margin-top: 14px; }
.owner-daily-progress { scroll-margin-top: 14px; }
.owner-progress-total { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 6px 10px; margin: 2px 0 14px; color: var(--text-secondary); font-size: 13px; }
.owner-progress-total strong { color: var(--text); font-size: 16px; }
.owner-progress-table { width: 100%; min-width: 0; table-layout: fixed; }
.owner-progress-table th,
.owner-progress-table td { padding: 8px 6px; font-size: 13px; white-space: normal; }
.owner-progress-table th:nth-child(1) { width: 10%; }
.owner-progress-table th:nth-child(2) { width: 14%; }
.owner-progress-table th:nth-child(3) { width: 20%; }
.owner-progress-table th:nth-child(n+4) { width: 14%; }
.owner-progress-total-row th,
.owner-progress-total-row td { background: var(--surface-subtle); font-weight: 700; }
.owner-progress-completion { font-weight: 600; }
.owner-progress-completion-low { background: var(--danger-soft); color: var(--danger); }
.issue-reports { scroll-margin-top: 14px; }
.issue-reports-filter { margin: -16px -16px 14px; }
.issue-report-count { margin: 0 0 10px; color: var(--text-secondary); font-size: 13px; }
.issue-report-viewport { overflow-x: hidden; }
.issue-report-table { width: 100%; min-width: 0; table-layout: fixed; }
.issue-report-table th,
.issue-report-table td { min-width: 0; padding: 7px 5px; font-size: 12px; line-height: 18px; white-space: normal; overflow-wrap: anywhere; }
.issue-report-table th:nth-child(1) { width: 8%; }
.issue-report-table th:nth-child(2) { width: 5%; }
.issue-report-table th:nth-child(3) { width: 8%; }
.issue-report-table th:nth-child(4) { width: 9%; }
.issue-report-table th:nth-child(5),
.issue-report-table th:nth-child(6) { width: 7%; }
.issue-report-table th:nth-child(7) { width: 16%; }
.issue-report-table th:nth-child(8) { width: 8%; }
.issue-report-table th:nth-child(9) { width: 20%; }
.issue-report-table th:nth-child(10) { width: 12%; }
.issue-report-detail-cell { text-align: left; }
.issue-report-details { text-align: left; }
.issue-report-details summary { color: var(--primary); cursor: pointer; text-align: center; }
.issue-report-details dl { display: grid; gap: 4px; margin: 6px 0 0; }
.issue-report-details dt { color: var(--text-secondary); font-weight: 600; }
.issue-report-details dd { margin: 0; white-space: normal; }
.issue-report-attachments { display: grid; gap: 3px; justify-items: center; }
.issue-report-attachments a { color: var(--primary); text-decoration: underline; }
.issue-report-review { text-align: left; }
.issue-report-table td:last-child { display: grid; gap: 3px; justify-items: center; }
.issue-report-table td:last-child span { color: var(--text-tertiary); font-size: 11px; }
.quantity-statistics-filter { margin: 12px -16px 14px; }
.quantity-table { width: 100%; min-width: 0; table-layout: fixed; }
.quantity-table th,
.quantity-table td { padding: 7px 4px; font-size: 12px; white-space: normal; }
.quantity-table th:nth-child(1) { width: 7%; }
.quantity-table th:nth-child(2) { width: 6%; }
.quantity-table th:nth-child(3) { width: 8%; }
.quantity-table th:nth-child(4),
.quantity-table th:nth-child(5),
.quantity-table th:nth-child(9),
.quantity-table th:nth-child(11),
.quantity-table th:nth-child(12) { width: 6%; }
.quantity-table th:nth-child(6) { width: 8%; }
.quantity-table th:nth-child(7) { width: 7%; }
.quantity-table th:nth-child(8) { width: 9%; }
.quantity-table th:nth-child(10) { width: 8%; }
.quantity-table th:nth-child(13) { width: 7%; }
.quantity-table th:nth-child(14) { width: 10%; }
.quantity-table td { text-align: center; }
.quantity-table td:nth-child(2),
.quantity-table td:nth-child(3) { text-align: center; }
.quantity-table input { width: 100%; min-width: 0; }
.quantity-owner strong { display: block; }
.quantity-number-input { max-width: 72px; margin: 0 auto; text-align: center; }
.quantity-total-row > * { background: var(--primary-soft); font-weight: 600; }
.quantity-metric-completion { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px; align-items: center; }
.quantity-metric-completion button { min-height: 30px; padding: 4px 7px; }

.submission-ban-statistics { scroll-margin-top: 14px; }
.submission-ban-filter { margin: 12px -16px 14px; }
.submission-ban-table-viewport { overflow-x: hidden; }
.submission-ban-table { width: 100%; min-width: 0; table-layout: fixed; }
.submission-ban-table th,
.submission-ban-table td { padding: 8px 7px; font-size: 13px; white-space: normal; overflow-wrap: anywhere; }
.submission-ban-table th:nth-child(1) { width: 15%; }
.submission-ban-table th:nth-child(2) { width: 15%; }
.submission-ban-table th:nth-child(3) { width: 20%; }
.submission-ban-table th:nth-child(4) { width: 25%; }
.submission-ban-table th:nth-child(5) { width: 25%; }

.issue-action-cell .primary-action,
.issue-review-cell .primary-action { width: 100%; min-height: 28px; padding: 4px 7px; }

.verification-action { margin-top: 6px; }
.verification-action input[type="hidden"] { display: none; }
.mapping-editor { margin-top: 7px; }
.mapping-editor summary { color: var(--primary); cursor: pointer; }
.mapping-form { display: grid; min-width: 250px; gap: 6px; margin: 6px 0; }
.mapping-form input { width: 100%; }
.devices-table-viewport { overflow-x: hidden; }
.devices-table { width: 100%; min-width: 0; table-layout: fixed; }
.devices-table th,
.devices-table td { min-width: 0; overflow-wrap: anywhere; padding: 6px 4px; font-size: 12px; line-height: 17px; white-space: normal; }
.devices-table .device-col-region { width: 4.5%; }
.devices-table .device-col-device { width: 6%; }
.devices-table .device-col-owner { width: 6%; }
.devices-table .device-col-status { width: 6%; }
.devices-table .device-col-manual { width: 14%; }
.devices-table .device-col-progress-count { width: 5%; }
.devices-table .device-col-progress-rate { width: 5.5%; }
.devices-table .device-col-mail-account { width: 8%; }
.devices-table .device-col-completed-at { width: 8%; }
.devices-table .device-col-elapsed { width: 12%; }
.devices-table .device-col-alert-time { width: 7%; }
.devices-table .device-col-latest-account { width: 6%; }
.cycle-progress-cell,
.elapsed-cell,
.manual-confirm-cell { text-align: center; }
.manual-confirm-cell { display: grid; justify-items: center; gap: 4px; }
.manual-confirm-cell .inline-form { justify-content: center; }
.manual-account-editor { width: 100%; margin-top: 2px; }
.manual-account-editor summary { color: var(--primary); cursor: pointer; }
.manual-account-editor form { display: grid; gap: 4px; margin-top: 4px; }
.manual-account-editor select { width: 100%; min-width: 0; font-size: 12px; }
.manual-account-audit { display: block; color: var(--danger); font-size: 11px; line-height: 15px; overflow-wrap: anywhere; }
.processing-note-log { width: 100%; margin-top: 2px; text-align: left; }
.processing-note-log > strong { display: block; color: var(--text); font-size: 12px; line-height: 18px; text-align: center; }
.processing-note-form { display: grid; gap: 4px; margin-top: 5px; }
.processing-note-form textarea { width: 100%; min-height: 48px; resize: vertical; font-size: 12px; line-height: 17px; }
.processing-note-form .secondary-btn { justify-self: center; }
.processing-note-history { display: grid; gap: 4px; margin-top: 6px; }
.processing-note-history p { margin: 0; padding-top: 4px; border-top: 1px solid var(--border); color: var(--text); font-size: 11px; line-height: 16px; overflow-wrap: anywhere; }
.processing-note-history strong { margin-right: 5px; }
.processing-note-history span { margin-right: 6px; color: var(--muted); }
.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  padding: 10px 0 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 18px;
}
.pagination-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.pagination-link {
  display: inline-grid;
  min-width: 28px;
  min-height: 28px;
  place-items: center;
  padding: 0 7px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--surface);
  color: var(--primary);
  text-decoration: none;
}
.pagination-link:hover { border-color: var(--primary); background: var(--primary-soft); }
.pagination-link.is-current { border-color: var(--primary); background: var(--primary); color: #fff; }
.owner-progress-filter { margin: -16px -16px 14px; }
.cycle-progress-cell > *,
.elapsed-cell > * { display: block; margin: 3px auto; }
.cycle-progress-cell strong,
.elapsed-cell strong { font-size: 13px; }
.same-card-account { color: var(--text-secondary); }

.rate-dashboard-section { display: grid; gap: 16px; }
.rate-dashboard { scroll-margin-top: 14px; }
.rate-dashboard-filter {
  position: sticky;
  z-index: 8;
  top: 8px;
  margin: 12px -16px 14px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface-subtle);
  padding: 10px 16px;
}
.rate-filter-form { display: flex; align-items: end; gap: 8px; flex-wrap: wrap; }
.rate-filter-form label { display: grid; gap: 3px; color: var(--text-secondary); font-size: 12px; }
.rate-filter-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.rate-dashboard-table { width: 100%; table-layout: fixed; }
.rate-dashboard-table th,
.rate-dashboard-table td { padding: 8px; text-align: center; white-space: normal; }
.rate-dashboard-table th:first-child,
.rate-dashboard-table td:first-child { width: 34%; }
.rate-total-row > * { background: var(--primary-soft); color: var(--text); font-weight: 600; }
.admin-password-form .form-grid { margin-top: 12px; }
.admin-password-form .form-grid > button { align-self: end; justify-self: start; }
.settings-fieldset { border: 0; margin: 0; min-inline-size: 0; padding: 0; }
.settings-fieldset:disabled { opacity: 1; }
.settings-fieldset:disabled input,
.settings-fieldset:disabled select { color: var(--text); cursor: not-allowed; opacity: 0.7; }
.verification-task-table { min-width: 1280px; }
.verification-task-table td:last-child form { display: inline-flex; margin: 2px; }
.worker-summary { display: flex; flex-wrap: wrap; gap: 18px; margin: 10px 0 14px; color: var(--text-secondary); font-size: 13px; }
.token-code { display: block; overflow-wrap: anywhere; font-size: 13px; }
.profile-state { display: inline-block; margin: 2px 8px 2px 0; white-space: nowrap; }
.profile-state.healthy { color: var(--success); }
.profile-state.login_required,
.profile-state.blocked { color: var(--danger); }

.alerts-table { table-layout: fixed; }
.alerts-table th,
.alerts-table td { text-align: center; }
.alerts-table th:nth-child(3),
.alerts-table td:nth-child(3),
.alerts-table th:nth-child(4),
.alerts-table td:nth-child(4) { width: 120px; }
.alerts-table th:nth-child(8),
.alerts-table td:nth-child(8),
.alerts-table th:nth-child(9),
.alerts-table td:nth-child(9) { width: 145px; }

.account-admin-table { min-width: 760px; table-layout: fixed; }
.account-admin-table input,
.account-admin-table select { width: 100%; min-width: 110px; }
.account-admin-table td { vertical-align: middle; }
.account-admin-table td:nth-child(7) form { margin-bottom: 6px; }
.notify-cell { min-width: 420px; text-align: left; white-space: normal; }
.notify-cell label.check,
.notify-cell input { display: inline-flex; margin-right: 4px; vertical-align: middle; }
.notify-cell input { width: 100px; min-width: 100px; }
.notify-cell input[type="checkbox"] { width: auto; min-width: auto; }
.compact-inline { min-width: 170px; }
.compact-inline input { width: 130px; }
.alert-setting-summary { display: flex; align-items: center; gap: 10px; color: var(--text-secondary); }
.alert-global-form { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 14px; }
.advanced-alert-table { width: 100%; table-layout: fixed; }
.advanced-alert-table th,
.advanced-alert-table td { text-align: center; white-space: normal; }
.supervisor-alert-table th:last-child,
.supervisor-alert-table td:last-child { width: 48%; }
.owner-override-table th:nth-child(1),
.owner-override-table td:nth-child(1) { width: 15%; }
.owner-override-table th:nth-child(2),
.owner-override-table td:nth-child(2) { width: 13%; }
.owner-override-table th:nth-child(3),
.owner-override-table td:nth-child(3) { width: 12%; }
.owner-override-table th:nth-child(4),
.owner-override-table td:nth-child(4),
.owner-override-table th:nth-child(5),
.owner-override-table td:nth-child(5) { width: 13%; }
.owner-override-table th:nth-child(6),
.owner-override-table td:nth-child(6) { width: 34%; }
.advanced-alert-editor { text-align: left; }
.advanced-alert-editor summary { color: var(--primary); cursor: pointer; text-align: center; }
.advanced-alert-form { display: grid; grid-template-columns: repeat(2, minmax(140px, 1fr)); gap: 8px; margin-top: 10px; }
.advanced-alert-form label { display: grid; gap: 4px; color: var(--text-secondary); font-size: 12px; }
.advanced-alert-form label.check { display: flex; align-items: center; }
.advanced-alert-form input:not([type="checkbox"]) { width: 100%; min-width: 0; }
.advanced-alert-form > button { justify-self: start; }
.owner-override-form { grid-template-columns: 1fr; }
.advanced-alert-group { display: grid; grid-template-columns: repeat(2, minmax(130px, 1fr)); gap: 6px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.advanced-alert-group strong { grid-column: 1 / -1; color: var(--text-secondary); font-size: 12px; }
.advanced-alert-editor > form + form { margin-top: 8px; }

.secret-once code {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  border-radius: 3px;
  background: #20252b;
  padding: 7px 10px;
  color: #ffffff;
  font-size: 14px;
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--workspace);
}

.login-panel {
  width: min(380px, 100%);
  display: grid;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgb(31 35 41 / 8%);
  padding: 28px;
}

.login-panel h1 { padding-bottom: 12px; border-bottom: 1px solid var(--border); font-size: 20px; }
.login-panel button { width: 100%; }
.login-link { margin: 0; text-align: center; }
.login-link a { color: var(--primary); }

@media (max-width: 1180px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid.two { grid-template-columns: 1fr; }
  .latest-mail-card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .latest-mail-card > div:nth-child(2) { border-right: 0; }
  .latest-mail-card > div:nth-child(-n + 2) { border-bottom: 1px solid var(--border); }
}

@media (max-width: 900px) {
  .app-sidebar {
    width: var(--sidebar-collapsed-width);
    transform: translateX(0);
    box-shadow: 4px 0 16px rgb(31 35 41 / 12%);
  }

  .console-workspace { margin-left: var(--sidebar-collapsed-width); padding: 16px; }
  .sidebar-brand { justify-content: center; padding: 0; }
  .sidebar-brand-title { width: 0; opacity: 0; }
  .sidebar-nav { padding-left: 8px; padding-right: 8px; }
  .nav-group-title { height: 16px; margin: 10px 0 6px; font-size: 0; line-height: 16px; }
  .nav-group-title::after { display: block; width: 18px; height: 1px; margin: 7px auto; background: var(--border-strong); content: ""; }
  .nav-group-title-system { margin-top: 22px; }
  .nav-item { justify-content: center; padding: 0; }
  .nav-parent-row .nav-item { width: 100%; }
  .nav-submenu-toggle,
  .nav-submenu { display: none; }
  .nav-label { width: 0; opacity: 0; }

  .sidebar-mobile-open .app-sidebar { width: var(--sidebar-width); }
  .sidebar-mobile-open .console-workspace { margin-left: var(--sidebar-collapsed-width); }
  .sidebar-mobile-open .sidebar-brand { justify-content: flex-start; padding: 0 10px; }
  .sidebar-mobile-open .sidebar-brand-title { width: auto; opacity: 1; }
  .sidebar-mobile-open .sidebar-nav { padding-left: var(--sidebar-inner-padding); padding-right: var(--sidebar-inner-padding); }
  .sidebar-mobile-open .nav-group-title { height: auto; margin: 8px 0 6px; font-size: 12px; line-height: 24px; }
  .sidebar-mobile-open .nav-group-title::after { display: none; }
  .sidebar-mobile-open .nav-group-title-system { margin-top: 24px; }
  .sidebar-mobile-open .nav-item { justify-content: flex-start; padding: 0 var(--nav-item-padding-x); }
  .sidebar-mobile-open .nav-parent-row .nav-item { width: auto; }
  .sidebar-mobile-open .nav-submenu-toggle,
  .sidebar-mobile-open .nav-submenu { display: grid; }
  .sidebar-mobile-open .nav-submenu-toggle { display: inline-flex; }
  .sidebar-mobile-open .nav-submenu[hidden] { display: none; }
  .sidebar-mobile-open .nav-label { width: auto; opacity: 1; }
  .sidebar-mobile-open .sidebar-overlay { position: fixed; z-index: 19; inset: 0; display: block; width: 100%; border: 0; background: rgb(31 35 41 / 28%); padding: 0; }
  .toolbar { align-items: flex-start; flex-direction: column; gap: 8px; }
  .toolbar > .filters { width: 100%; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings .form-grid { grid-template-columns: 1fr; }
  .settings .compact-grid { grid-template-columns: 1fr; }
  .advanced-alert-form,
  .advanced-alert-group { grid-template-columns: 1fr; }
  .advanced-alert-group strong { grid-column: 1; }
  .latest-mail-card { grid-template-columns: 1fr; }
  .latest-mail-card > div { border-right: 0; border-bottom: 1px solid var(--border); }
  .latest-mail-card > div:last-child { border-bottom: 0; }
  .latest-mail-card > div:nth-child(-n + 2) { border-bottom: 1px solid var(--border); }
  .filter-menu { align-items: stretch; }
  .filter-menu input:not([type="hidden"]),
  .filter-menu select,
  .filter-menu label { width: 100%; max-width: none; }
  .filter-menu label.check { width: auto; }
  .daily-summary-filters { grid-template-columns: 1fr 1fr; }
  .daily-section-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .daily-filter-actions { grid-column: 1 / -1; }
  .summary-nav { flex-wrap: wrap; }
  .sticky-filter-panel { top: 4px; }
  .rate-dashboard-filter { top: 4px; }
  .data-table-viewport { max-height: 66vh; }
}

@media (max-width: 540px) {
  .console-workspace { padding: 14px; }
  .panel { padding: 14px; }
  .filter-menu { margin: -14px -14px 14px; padding: 10px 14px; }
  .daily-summary-filters { grid-template-columns: 1fr; margin: 12px -14px -14px; padding: 12px 14px; }
  .daily-filter-actions { grid-column: 1; flex-wrap: wrap; }
  .summary-section-filter { margin: 12px -14px 14px; padding: 10px 14px; }
  .daily-section-filters { grid-template-columns: 1fr; }
  .compact-summary-viewport { overflow-x: auto; }
  .summary-table { min-width: 780px; }
  .duration-detail-dialog { width: calc(100vw - 20px); max-height: 90vh; }
  .duration-detail-panel { max-height: 90vh; }
  .duration-detail-header,
  .duration-detail-footer { padding-left: 12px; padding-right: 12px; }
  .duration-detail-summary { gap: 5px 12px; padding: 9px 12px; }
  .duration-detail-table-wrap { padding: 0 10px; }
  .duration-detail-table { min-width: 0; }
  .duration-detail-table th,
  .duration-detail-table td { padding: 6px 3px; font-size: 11px; line-height: 16px; overflow-wrap: anywhere; }
  .duration-detail-footer { align-items: flex-start; flex-direction: column; }
  .account-notify-grid { grid-template-columns: 1fr; }
  .sticky-filter-panel,
  .sticky-filter-bar,
  .summary-section-filter,
  .rate-dashboard-filter { position: static; }
  .rate-dashboard-filter { margin: 12px -14px 14px; padding: 10px 14px; }
  .rate-filter-form { display: grid; grid-template-columns: 1fr; }
  .rate-filter-form input { width: 100%; }
  .stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stats div { min-height: 78px; padding: 12px; }
  .stats strong { font-size: 22px; }
  .summary-nav { padding: 8px; }
  .summary-nav h2 { flex-basis: 100%; }
  .account-details { grid-template-columns: 1fr; }
  .account-details > div { border-right: 0; border-bottom: 1px solid var(--border); }
  .account-details > div:last-child { border-bottom: 0; }
  .quantity-statistics-filter { margin: 12px -14px 14px; }
  .submission-ban-filter { margin: 12px -14px 14px; }
  .quantity-table { min-width: 0; }
  .duration-person-fields { grid-template-columns: 1fr; }
}
