/* DEMO / MOCK / TEST DATA: isolated local prototype styles. */
:root {
  color-scheme: light;
  --page: #edf3f9;
  --panel: #ffffff;
  --line: #dce5ef;
  --text: #1f2a3d;
  --muted: #7a8798;
  --blue: #2275f2;
  --blue-deep: #0f4fb7;
  --nav: #173963;
  --nav-deep: #102d4f;
  --green: #19a84b;
  --gold: #e7a334;
  --red: #e54848;
  --shadow: 0 16px 36px rgba(31, 42, 61, 0.1);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--text);
  font-size: 14px;
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

a {
  color: var(--blue);
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin: 0;
  letter-spacing: 0;
}

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 58px 1fr auto;
  background: #eef4fb;
}

.login-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
  padding: 0 64px;
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid #e4edf6;
}

.mini-logo {
  display: grid;
  line-height: 1.05;
  color: #e9442d;
  font-weight: 700;
}

.mini-logo small {
  color: #e9442d;
  font-size: 10px;
  font-weight: 600;
}

.login-stage {
  display: grid;
  grid-template-columns: 390px 360px;
  justify-content: center;
  align-content: center;
  gap: 0;
  min-height: 620px;
}

.promo-board,
.login-card {
  min-height: 430px;
}

.promo-board {
  position: relative;
  overflow: hidden;
  border: 8px solid #fff;
  border-right: 0;
  border-radius: 4px 0 0 4px;
  background:
    linear-gradient(135deg, rgba(6, 16, 38, 0.92), rgba(8, 27, 70, 0.85)),
    radial-gradient(circle at 70% 45%, rgba(33, 196, 255, 0.48), transparent 24%),
    linear-gradient(135deg, #030711, #0c1e48 50%, #05060a);
  box-shadow: var(--shadow);
}

.promo-board::before,
.promo-board::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(44, 212, 255, 0.42);
  transform: rotate(35deg);
}

.promo-board::before {
  width: 220px;
  height: 78px;
  left: 86px;
  top: 154px;
  background: linear-gradient(90deg, rgba(34, 117, 242, 0.1), rgba(0, 221, 255, 0.38));
}

.promo-board::after {
  width: 118px;
  height: 118px;
  right: 76px;
  bottom: 96px;
  border-radius: 999px;
}

.promo-content {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  gap: 18px;
  height: 100%;
  padding: 44px 38px;
  color: #fff;
}

.promo-content p {
  font-size: 24px;
  font-weight: 700;
}

.promo-content h1 {
  max-width: 300px;
  color: #cfe9ff;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.8;
}

.promo-line {
  width: 120px;
  height: 2px;
  background: linear-gradient(90deg, #2fd4ff, transparent);
}

.cert-row {
  display: flex;
  gap: 12px;
}

.cert-row span {
  min-width: 122px;
  padding: 7px 10px;
  border: 1px solid rgba(94, 213, 255, 0.55);
  background: linear-gradient(90deg, rgba(27, 145, 240, 0.8), rgba(54, 205, 255, 0.4));
  color: #dff6ff;
  font-size: 13px;
}

.login-card {
  position: relative;
  padding: 48px 42px 28px;
  background: var(--panel);
  border: 1px solid #e4edf6;
  border-left: 0;
  border-radius: 0 4px 4px 0;
  box-shadow: var(--shadow);
}

.qr-corner {
  position: absolute;
  right: 0;
  top: 0;
  width: 86px;
  height: 72px;
  padding: 12px 10px;
  clip-path: polygon(100% 0, 100% 100%, 0 0);
  background: #e9f3ff;
  color: var(--blue);
  font-size: 12px;
  text-align: right;
  border: 0;
}

.login-tabs {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
}

.tab {
  padding: 0;
  color: var(--muted);
  background: transparent;
  font-size: 16px;
}

.tab.active {
  color: var(--text);
  font-weight: 600;
}

.tab + .tab {
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.login-form {
  display: grid;
  gap: 18px;
}

label {
  display: grid;
  gap: 8px;
  color: #4a5a6d;
}

input,
select {
  height: 38px;
  width: 100%;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #f8fbff;
  color: var(--text);
}

input:focus,
select:focus {
  outline: 2px solid rgba(34, 117, 242, 0.16);
  border-color: var(--blue);
}

.login-options,
.form-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}

.checkline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.checkline input {
  width: 14px;
  height: 14px;
}

.login-button {
  height: 42px;
  margin-top: 18px;
  border-radius: 2px;
  background: linear-gradient(90deg, #0f66ee, #1d55f2);
  color: #fff;
  font-size: 16px;
}

.form-error {
  color: var(--red);
}

.login-footer {
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 28px 16px;
  color: #9aa6b6;
  font-size: 12px;
}

.login-footer nav {
  display: flex;
  gap: 58px;
  margin-bottom: 6px;
}

.login-footer a {
  color: #65758b;
}

.admin-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
}

.side-menu {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--nav);
  color: #d9e8f8;
}

.tower-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 92px;
  padding: 18px 20px;
  background: var(--nav-deep);
}

.tower-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 4px;
  background: linear-gradient(180deg, #f8c56a, #c9862d);
  color: #173963;
  font-weight: 800;
}

.tower-logo strong {
  display: block;
  font-size: 16px;
}

.tower-logo small {
  display: block;
  margin-top: 4px;
  color: #9fb6cf;
}

.menu-scroll {
  overflow: auto;
  padding: 18px 0 28px;
}

.menu-group {
  margin-bottom: 16px;
}

.menu-group p {
  padding: 0 24px 8px;
  color: #8fa7c2;
  font-size: 13px;
}

.menu-item {
  display: block;
  width: 100%;
  height: 36px;
  padding: 0 24px;
  color: #d9e8f8;
  background: transparent;
  text-align: left;
}

.menu-item:hover,
.menu-item.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.main-panel {
  min-width: 0;
  padding: 0 28px 28px;
  background: #f2f6fb;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  margin: 0 -28px 18px;
  padding: 0 28px;
  background: #fff;
  border-bottom: 1px solid #e4edf6;
}

.admin-topbar h2 {
  font-size: 22px;
}

.admin-topbar p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.test-data-mark {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid #ead7a6;
  border-radius: 3px;
  color: #8a5900;
  background: #fff8e8;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.top-actions button,
.panel-head button {
  height: 32px;
  padding: 0 12px;
  border: 1px solid #d6e3f2;
  border-radius: 3px;
  background: #fff;
  color: #4f6380;
}

#viewerPreviewBtn.active {
  border-color: #2275f2;
  background: #eef5ff;
  color: #0f4fb7;
}

.dot {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  margin-left: 4px;
  border-radius: 999px;
  background: #ff6464;
  color: #fff;
  font-size: 12px;
}

.user-pill {
  height: 32px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #d6e3f2;
  border-radius: 3px;
  background: #f8fbff;
}

.notice-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 44px;
  margin-bottom: 18px;
  padding: 0 18px;
  border-radius: 4px;
  background: #fff;
  border: 1px solid #e4edf6;
}

.notice-bar span {
  color: var(--blue);
  font-weight: 700;
}

.notice-bar p {
  flex: 1;
  color: #5c6e84;
}

.view {
  display: none;
}

.active-view {
  display: block;
}

.guide-panel {
  display: grid;
  grid-template-columns: minmax(310px, 0.48fr) minmax(420px, 1fr);
  gap: 24px;
  margin-bottom: 18px;
  padding: 20px 24px;
  background: #fff;
  border: 1px solid #e4edf6;
  border-radius: 4px;
}

.guide-panel h3 {
  margin-bottom: 14px;
  font-size: 18px;
}

.steps {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  padding: 12px 14px;
  border-radius: 3px;
  color: #4f6380;
  background: #f5f8fc;
  font-weight: 600;
}

.steps li.active {
  color: #173963;
  background: #eaf2fb;
}

.cloud-card {
  display: grid;
  align-content: center;
  gap: 22px;
  min-height: 230px;
  padding: 30px 36px;
  border-radius: 4px;
  background:
    radial-gradient(circle at 82% 44%, rgba(61, 166, 255, 0.3), transparent 24%),
    linear-gradient(90deg, #f9fbff, #f4f9ff);
}

.cloud-card p {
  font-size: 20px;
  font-weight: 700;
}

.flow {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #33618f;
}

.flow i {
  width: 30px;
  height: 2px;
  background: #64a9ff;
}

.cloud-card button {
  width: 140px;
  height: 38px;
  border-radius: 3px;
  background: var(--blue);
  color: #fff;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.summary-card,
.panel {
  border: 1px solid #e4edf6;
  border-radius: 4px;
  background: #fff;
}

.summary-card {
  padding: 20px;
}

.summary-card span {
  color: #697b91;
}

.summary-card strong {
  display: block;
  margin-top: 12px;
  color: #2088ff;
  font-size: 26px;
  letter-spacing: 0;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.9fr);
  gap: 18px;
}

.panel {
  margin-bottom: 18px;
  padding: 18px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.panel-head h3 {
  font-size: 17px;
}

.panel-head p,
.panel-head span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.bar-chart {
  display: grid;
  grid-template-columns: repeat(12, minmax(42px, 1fr));
  align-items: end;
  gap: 10px;
  min-height: 252px;
  padding: 12px 4px 0;
}

.bar-item {
  display: grid;
  align-items: end;
  gap: 8px;
  color: #7a8798;
  font-size: 12px;
  text-align: center;
}

.bar {
  min-height: 8px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, #3b94ff, #1769d8);
}

.bar.future {
  background: linear-gradient(180deg, #9fb2c8, #74879e);
}

.mix-chart {
  display: grid;
  gap: 16px;
  padding-top: 8px;
}

.mix-row {
  display: grid;
  gap: 7px;
}

.mix-label {
  display: flex;
  justify-content: space-between;
  color: #4f6380;
  font-size: 13px;
}

.mix-track {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: #e8eff7;
}

.mix-fill {
  height: 100%;
  border-radius: inherit;
}

.table-wrap {
  overflow: auto;
  border: 1px solid #e4edf6;
  border-radius: 3px;
}

.viewer-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.viewer-summary-card {
  min-width: 0;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.viewer-summary-card span,
.viewer-summary-card p {
  color: var(--muted);
}

.viewer-summary-card strong {
  display: block;
  margin: 12px 0 8px;
  color: var(--primary);
  font-size: 30px;
  line-height: 1.2;
}

.viewer-summary-card p {
  margin: 0;
}

.viewer-daily-table td:last-child,
.viewer-daily-table th:last-child {
  text-align: right;
}

.viewer-daily-table table {
  min-width: 0;
}

@media (max-width: 520px) {
  .viewer-summary-grid {
    grid-template-columns: 1fr;
  }

  .viewer-summary-card {
    padding: 18px;
  }

  .viewer-summary-card strong {
    font-size: 26px;
  }
}

.admin-overview-only {
  display: block;
}

.director-summary-grid.admin-overview-only,
.director-grid.admin-overview-only {
  display: grid;
}

.is-audit .admin-overview-only {
  display: none;
}

.published-overview {
  display: none;
  gap: 24px;
  max-width: 100%;
  min-width: 0;
}

.is-audit .published-overview {
  display: grid;
}

.published-overview-head,
.published-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.published-overview-head h3 {
  font-size: 20px;
}

.published-overview-head p,
.published-block-head p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.published-period-switch {
  flex: 0 0 auto;
}

.published-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  border-top: 1px solid #dce6f0;
  border-left: 1px solid #dce6f0;
}

.published-summary-grid > div {
  min-width: 0;
  padding: 14px 16px;
  border-right: 1px solid #dce6f0;
  border-bottom: 1px solid #dce6f0;
}

.published-summary-grid dt {
  color: #6f8093;
  font-size: 12px;
}

.published-summary-grid dd {
  margin: 7px 0 0;
  overflow-wrap: anywhere;
  color: #20374f;
  font-size: 18px;
  font-weight: 700;
}

.published-overview-block {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.published-block-head h4 {
  font-size: 15px;
}

.published-trend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  align-items: end;
  gap: 10px;
  min-height: 224px;
  padding: 12px 0 0;
  border-bottom: 1px solid #dce6f0;
}

.published-trend-item {
  display: grid;
  grid-template-rows: auto 140px auto auto;
  min-width: 0;
  gap: 5px;
  color: #536a84;
  font-size: 12px;
  text-align: center;
}

.published-trend-value,
.published-trend-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.published-trend-bar {
  display: flex;
  align-items: end;
  justify-content: center;
  min-height: 0;
}

.published-trend-bar i {
  width: min(30px, 60%);
  border-radius: 3px 3px 0 0;
  background: #2275f2;
}

.published-trend-item strong {
  color: #38516c;
  font-size: 12px;
}

@media (max-width: 760px) {
  .published-overview-head,
  .published-block-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .published-overview-head > *,
  .published-block-head > * {
    min-width: 0;
  }

  .published-period-switch {
    width: 100%;
    max-width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .published-period-switch button {
    flex: 1 1 0;
    min-width: 0;
    padding-inline: 8px;
    white-space: normal;
  }
}

table {
  width: 100%;
  min-width: 840px;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid #edf2f7;
  text-align: right;
  white-space: nowrap;
}

th:first-child,
td:first-child,
th:nth-child(6),
td:nth-child(6),
th:nth-child(7),
td:nth-child(7) {
  text-align: left;
}

th {
  color: #697b91;
  background: #f4f7fb;
  font-weight: 600;
}

tr:last-child td {
  border-bottom: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: #eef5ff;
  color: #2275f2;
  font-size: 12px;
}

.filing-banner {
  border-left: 4px solid #2275f2;
  background: linear-gradient(100deg, #f7fbff, #ffffff 65%);
}

.filing-banner h3 {
  margin: 12px 0 8px;
}

.filing-banner p,
.summary-card p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.6;
}

.ticketing-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.segmented-control {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  max-width: 100%;
  padding: 3px;
  border: 1px solid #dce7f2;
  border-radius: 4px;
  background: #f4f7fb;
}

.segmented-control button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 3px;
  color: #53677f;
  background: transparent;
  font-weight: 600;
}

.segmented-control button:hover,
.segmented-control button:focus-visible {
  color: #184d87;
  background: #eaf2fb;
}

.segmented-control button.active {
  border-color: #c8daee;
  color: #173963;
  background: #fff;
  box-shadow: 0 1px 3px rgba(31, 63, 98, 0.08);
}

.workspace-switch,
.settlement-switch {
  margin-bottom: 16px;
}

.source-payment-grid > .panel {
  min-width: 0;
}

.export-button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 3px;
  color: #fff;
  background: #2275f2;
  font-weight: 700;
}

.export-button:disabled {
  cursor: not-allowed;
  color: #7d8b9e;
  background: #e5ebf2;
}

.source-payment-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.period-only-panel {
  min-height: 260px;
}

.selectable-table tbody tr {
  cursor: pointer;
}

.selectable-table tbody tr:hover,
.selectable-table tbody tr:focus-visible {
  outline: none;
  background: #f2f7fd;
}

.record-detail {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid #dbe7f3;
  border-left: 4px solid #2275f2;
  border-radius: 3px;
  background: #f8fbff;
}

.record-detail h4 {
  margin-bottom: 12px;
  color: #173963;
  font-size: 15px;
}

.record-detail dl {
  display: grid;
  grid-template-columns: minmax(110px, 0.3fr) minmax(0, 1fr);
  gap: 8px 16px;
  margin: 0;
}

.record-detail dt {
  color: #718198;
}

.record-detail dd {
  min-width: 0;
  margin: 0;
  color: #263b57;
  overflow-wrap: anywhere;
}

.source-tag,
.grade {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-right: 8px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.source-tag.actual { background: #e8f7ee; color: #178044; }
.source-tag.provisional { background: #fff4d8; color: #a26600; }
.source-tag.pending,
.pending-pill { background: #fff0ef; color: #b54139; }
.neutral-pill { background: #eef2f6; color: #56677c; }

.filing-table th:nth-child(4),
.filing-table td:nth-child(4),
.filing-table th:nth-child(5),
.filing-table td:nth-child(5),
.evidence-table th,
.evidence-table td {
  text-align: left;
  white-space: normal;
  line-height: 1.55;
}

.evidence-table { min-width: 1180px; }
.wide-table { min-width: 1180px; }
.grade-a { background: #dff5e8; color: #13783f; }
.grade-b { background: #eaf2ff; color: #245fae; }
.grade-c { background: #fff4d8; color: #a26600; }
.grade-d { background: #fff0ef; color: #b54139; }

.field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 10px;
}

.field-grid span {
  padding: 12px 14px;
  border: 1px solid #e4edf6;
  border-radius: 3px;
  background: #f8fafc;
  color: #4f6380;
}

.daily-table {
  max-height: calc(100vh - 226px);
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.module-toolbar {
  gap: 18px;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-row select,
.editor-form input,
.editor-form select {
  height: 36px;
  min-width: 150px;
  padding: 0 10px;
  border: 1px solid #d6e3f2;
  border-radius: 3px;
  color: #263b57;
  background: #fff;
}

.editor-panel {
  background: #fff;
}

.editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.editor-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.editor-head button {
  height: 30px;
  padding: 0 10px;
  border: 1px solid #d6e3f2;
  border-radius: 3px;
  color: #53677f;
  background: #fff;
}

.editor-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 14px;
  align-items: end;
}

.editor-form label {
  display: grid;
  gap: 7px;
  color: #4f6380;
  font-size: 13px;
}

.editor-form input,
.editor-form select {
  width: 100%;
  min-width: 0;
}

.readonly-fields {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 10px 12px;
  border: 1px solid #e4edf6;
  border-radius: 3px;
  color: #60728a;
  background: #f7f9fc;
  font-size: 13px;
}

.primary-button {
  min-width: 104px;
  background: #2275f2;
}

.empty-cell {
  height: 96px;
  color: var(--muted);
  text-align: center !important;
}

#products th:nth-child(2),
#products td:nth-child(2),
#inventory th:first-child,
#inventory td:first-child,
#categories th:nth-child(2),
#categories td:nth-child(2),
#orders th:nth-child(2),
#orders td:nth-child(2),
#orders th:nth-child(3),
#orders td:nth-child(3) {
  text-align: left;
}

.account-panel {
  max-width: 720px;
}

.account-form {
  display: grid;
  gap: 16px;
  max-width: 420px;
}

.account-form .small-button {
  width: 120px;
  margin-top: 4px;
}

.edit-input {
  width: 112px;
  height: 32px;
  text-align: right;
}

.small-button {
  height: 30px;
  padding: 0 11px;
  border-radius: 2px;
  background: var(--green);
  color: #fff;
}

.locked {
  color: var(--muted);
}

.toast {
  position: fixed;
  right: 28px;
  top: 82px;
  z-index: 20;
  max-width: min(380px, calc(100vw - 40px));
  padding: 14px 16px;
  border: 1px solid #cfe0f4;
  border-left: 4px solid var(--blue);
  border-radius: 4px;
  background: #fff;
  color: #334866;
  box-shadow: 0 12px 28px rgba(31, 42, 61, 0.16);
  line-height: 1.6;
}

@media (max-width: 1100px) {
  .login-stage {
    grid-template-columns: minmax(320px, 420px);
  }

  .promo-board {
    display: none;
  }

  .login-card {
    border: 1px solid #e4edf6;
    border-radius: 4px;
  }

  .guide-panel,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .source-payment-grid {
    grid-template-columns: 1fr;
  }

  .ticketing-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .period-switch,
  .workspace-switch,
  .settlement-switch {
    display: flex;
    width: 100%;
  }

  .period-switch button,
  .workspace-switch button,
  .settlement-switch button {
    flex: 1 0 auto;
  }
}

@media (max-width: 1180px) {
  .admin-layout {
    display: block;
    width: 100%;
    max-width: 100vw;
  }

  .side-menu {
    min-height: auto;
    width: 100%;
    max-width: 100vw;
  }

  .tower-logo {
    min-height: 72px;
    padding: 12px 16px;
  }

  .tower-icon {
    width: 40px;
    height: 40px;
  }

  .tower-logo strong {
    font-size: 15px;
  }

  .tower-logo small {
    font-size: 12px;
  }

  .menu-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 12px 14px;
    scrollbar-width: none;
  }

  .menu-scroll::-webkit-scrollbar {
    display: none;
  }

  .menu-group {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
    margin: 0;
  }

  .menu-group p {
    padding: 0 6px 0 0;
    color: #9fb6cf;
    white-space: nowrap;
  }

  .menu-item {
    width: auto;
    height: 34px;
    padding: 0 12px;
    border-radius: 3px;
    white-space: nowrap;
  }

  .main-panel {
    width: 100%;
    max-width: 100vw;
    padding: 0 12px 18px;
  }

  .admin-topbar {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    min-height: auto;
    margin: 0 -12px 12px;
    padding: 14px 12px;
  }

  .admin-topbar h2 {
    font-size: 21px;
  }

  .top-actions {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
    gap: 8px;
  }

  .top-actions button,
  .user-pill {
    height: 34px;
  }

  .notice-bar {
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    line-height: 1.55;
  }

  .notice-bar p {
    min-width: 0;
  }

  .guide-panel {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px;
  }

  .guide-panel h3 {
    font-size: 17px;
  }

  .steps li {
    padding: 10px 12px;
  }

  .cloud-card {
    display: none;
  }

  .summary-grid,
  .settings-grid,
  .field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .editor-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .module-toolbar,
  .filter-row {
    align-items: stretch;
    width: 100%;
  }

  .filter-row select {
    flex: 1 1 0;
    min-width: 0;
  }

  .summary-card {
    padding: 14px;
  }

  .summary-card strong {
    font-size: 22px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 14px;
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .bar-chart {
    grid-template-columns: repeat(6, minmax(32px, 1fr));
    min-height: 210px;
    overflow-x: auto;
  }

  .table-wrap {
    width: 100%;
    max-width: calc(100vw - 24px);
  }

  table {
    min-width: 720px;
  }

  th,
  td {
    padding: 10px 12px;
  }

  .daily-table {
    max-height: none;
  }

  .account-form {
    max-width: 100%;
  }

  .toast {
    left: 12px;
    right: 12px;
    top: 74px;
    max-width: none;
  }
}

@media (max-width: 520px) {
  .summary-grid,
  .settings-grid,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .editor-form,
  .filter-row {
    grid-template-columns: 1fr;
  }

  .filter-row {
    display: grid;
  }

  .menu-group p {
    display: none;
  }

  .top-actions button,
  .user-pill {
    padding: 0 10px;
  }

  .login-stage {
    min-height: 560px;
    padding: 0 16px;
  }

  .login-card {
    padding: 44px 24px 24px;
  }

  .login-top {
    padding: 0 18px;
  }

  .login-footer nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px 24px;
  }

  .record-detail dl {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .record-detail dd {
    margin-bottom: 8px;
  }
}

/* Task 5: annual director, full catalog, and dense ticket workspaces. */
.topbar-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #d6e3f2;
  border-radius: 3px;
  color: #4f6380;
  background: #fff;
  font-size: 22px;
  line-height: 1;
}

.sidebar-toggle {
  display: none;
  font-size: 19px;
}

.director-summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.director-metric {
  min-width: 0;
  padding: 16px;
  border: 1px solid #dce5ef;
  border-top: 3px solid #9aa9bb;
  border-radius: 4px;
  background: #fff;
}

.director-metric > span,
.workspace-summary span {
  color: #687a90;
  font-size: 13px;
}

.director-metric strong {
  display: block;
  margin-top: 10px;
  color: #20364f;
  font-size: 21px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.director-metric p {
  margin-top: 7px;
  color: #7a8798;
  font-size: 12px;
}

.metric-published { border-top-color: #2d9560; }
.metric-planned { border-top-color: #6c7f95; }
.metric-date { border-top-color: #2275f2; }
.metric-warning { border-top-color: #d69a24; }
.metric-exception { border-top-color: #c65a51; }

.director-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(260px, 0.8fr);
  gap: 18px;
}

.status-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #66788e;
  font-size: 12px;
}

.status-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-legend i {
  width: 9px;
  height: 9px;
  border-radius: 2px;
}

.legend-published { background: #2d9560; }
.legend-planned { background: #9aa9bb; }

.director-trend {
  display: grid;
  grid-template-columns: repeat(12, minmax(38px, 1fr));
  align-items: end;
  gap: 9px;
  min-height: 238px;
  padding-top: 8px;
}

.director-bar {
  display: grid;
  align-items: end;
  gap: 8px;
  color: #718198;
  font-size: 12px;
  text-align: center;
}

.bar-stack {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 3px;
  height: 196px;
}

.bar-stack span {
  width: min(15px, 42%);
  min-height: 0;
  border-radius: 2px 2px 0 0;
}

.published-segment { background: #2d9560; }
.planned-segment { background: #9aa9bb; }

.director-focus-panel dl {
  display: grid;
  gap: 2px;
  margin: 0 0 16px;
}

.director-focus-panel dl div,
.detail-list div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid #edf2f7;
}

.director-focus-panel dt,
.detail-list dt {
  color: #718198;
}

.director-focus-panel dd,
.detail-list dd {
  margin: 0;
  color: #263b57;
  font-weight: 700;
  text-align: right;
}

.director-focus-panel button {
  width: 100%;
  height: 34px;
  border-radius: 3px;
  color: #fff;
  background: #2275f2;
}

.status-locked { background: #e8f7ee; color: #178044; }
.status-planned { background: #eef2f6; color: #56677c; }
.status-mixed { background: #fff4d8; color: #956000; }

.product-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px 180px auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.product-toolbar input,
.product-toolbar select {
  height: 36px;
  background: #fff;
}

.search-field {
  display: block;
}

.result-count {
  min-width: 58px;
  color: #61738a;
  text-align: right;
  white-space: nowrap;
}

.product-table {
  min-width: 1180px;
}

.product-table th,
.product-table td {
  text-align: right;
}

.product-table th:first-child,
.product-table td:first-child,
.product-table th:nth-child(2),
.product-table td:nth-child(2),
.product-table th:nth-child(3),
.product-table td:nth-child(3) {
  text-align: left;
}

.product-table td:first-child strong,
.product-table td small {
  display: block;
}

.product-table td small {
  max-width: 220px;
  margin-top: 4px;
  overflow: hidden;
  color: #8a98aa;
  font-size: 11px;
  text-overflow: ellipsis;
}

.danger-value {
  color: #b54139;
  font-weight: 700;
}

.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  color: #6a7c91;
  font-size: 13px;
}

.table-pagination > div {
  display: flex;
  gap: 4px;
}

.table-pagination button {
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid #d6e3f2;
  border-radius: 3px;
  color: #53677f;
  background: #fff;
}

.table-pagination button.active {
  border-color: #2275f2;
  color: #fff;
  background: #2275f2;
}

.table-pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.workspace-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.workspace-summary article {
  padding: 13px 14px;
  border: 1px solid #dce5ef;
  border-radius: 4px;
  background: #fff;
}

.workspace-summary strong,
.workspace-summary small {
  display: block;
}

.workspace-summary strong {
  margin-top: 6px;
  color: #20364f;
  font-size: 19px;
}

.workspace-summary small {
  margin-top: 4px;
  color: #8390a1;
}

.drawer-open {
  overflow: hidden;
}

.drawer-open::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(20, 37, 58, 0.28);
}

.detail-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 45;
  width: min(460px, 94vw);
  overflow-y: auto;
  border-left: 1px solid #dce5ef;
  background: #fff;
  box-shadow: -16px 0 34px rgba(31, 42, 61, 0.16);
}

.detail-drawer > header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 78px;
  padding: 16px 20px;
  border-bottom: 1px solid #e4edf6;
  background: #fff;
}

.detail-drawer .icon-button {
  width: 44px;
  height: 44px;
}

.detail-drawer h3 {
  margin-top: 4px;
  font-size: 18px;
}

.drawer-kicker {
  color: #718198;
  font-size: 12px;
}

.drawer-body {
  padding: 20px;
}

.drawer-body section {
  padding: 18px 0 4px;
  border-bottom: 1px solid #e4edf6;
}

.drawer-body h4 {
  margin: 0 0 8px;
  color: #173963;
  font-size: 14px;
}

.drawer-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.drawer-status-row .source-tag {
  margin: 0;
}

.detail-list {
  margin: 0;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(20, 37, 58, 0.34);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1360px) {
  .director-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .sidebar-toggle {
    display: inline-grid;
  }

  .side-menu {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    width: min(300px, 86vw);
    min-height: 100vh;
    transform: translateX(-102%);
    transition: transform 180ms ease;
  }

  .mobile-menu-open .side-menu {
    transform: translateX(0);
  }

  .side-menu .menu-scroll {
    display: block;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 16px 0 24px;
  }

  .side-menu .menu-group {
    display: block;
    margin-bottom: 14px;
  }

  .side-menu .menu-group p {
    display: block;
    padding: 0 24px 8px;
  }

  .side-menu .menu-item {
    width: 100%;
    height: 38px;
    padding: 0 24px;
    border-radius: 0;
  }

  .director-grid {
    grid-template-columns: 1fr;
  }

  .director-trend {
    min-width: 680px;
  }

  .director-grid .wide {
    overflow-x: auto;
  }

  .product-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .search-field,
  .result-count {
    grid-column: 1 / -1;
  }

  .result-count {
    text-align: left;
  }

  .workspace-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .director-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .director-metric {
    padding: 13px;
  }

  .director-metric strong {
    font-size: 18px;
  }

  .product-toolbar {
    grid-template-columns: 1fr;
  }

  .search-field,
  .result-count {
    grid-column: auto;
  }

  .workspace-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace-summary article {
    padding: 11px;
  }

  .workspace-summary strong {
    font-size: 17px;
  }

  .table-pagination {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-drawer {
    width: 100vw;
  }
}

/* Task 6: concise daily operations workspace. */
.daily-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 2px 0 14px;
  padding: 0 2px 12px;
  border-bottom: 1px solid #dfe7ef;
}

.daily-page-head h3 {
  margin: 4px 0 0;
  color: #1f3652;
  font-size: 20px;
}

.daily-date {
  color: #667a90;
  font-size: 13px;
  font-weight: 700;
}

.daily-metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  margin: 0 0 16px;
  border: 1px solid #dce5ef;
  border-radius: 4px;
  background: #fff;
}

.daily-metric-strip > div {
  min-width: 0;
  padding: 14px 16px;
  border-right: 1px solid #e5ebf1;
  border-bottom: 1px solid #e5ebf1;
}

.daily-metric-strip > div:nth-child(4n) {
  border-right: 0;
}

.daily-metric-strip > div:nth-last-child(-n + 4) {
  border-bottom: 0;
}

.daily-metric-strip dt {
  color: #6f8093;
  font-size: 12px;
}

.daily-metric-strip dd {
  margin: 6px 0 0;
  overflow-wrap: anywhere;
  color: #1e3652;
  font-size: 18px;
  font-weight: 750;
}

.status-pending {
  background: #fff4d8;
  color: #8b5d00;
}

.status-returned {
  background: #fff0ef;
  color: #a9433d;
}

.daily-action-list {
  border-top: 1px solid #e5ebf1;
}

.daily-action-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 58px;
  padding: 10px 4px;
  border-bottom: 1px solid #e5ebf1;
  color: #263d58;
  background: transparent;
  text-align: left;
}

.daily-action-list button:hover {
  background: #f7fafc;
}

.daily-action-list span,
.daily-action-list strong,
.daily-action-list small {
  display: block;
}

.daily-action-list small {
  margin-top: 4px;
  color: #77889a;
  font-size: 12px;
}

.daily-action-list b {
  color: #2b7a66;
  font-size: 22px;
}

.daily-tabs {
  width: max-content;
  max-width: 100%;
  margin: 0 0 12px;
  overflow-x: auto;
}

.daily-tabs button {
  min-height: 44px;
  white-space: nowrap;
}

.daily-confirm-form {
  display: grid;
  grid-template-columns: minmax(180px, 0.55fr) minmax(220px, 1fr);
  gap: 16px 20px;
  max-width: 820px;
}

.daily-confirm-form > label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: #435b75;
  font-size: 13px;
  font-weight: 700;
}

.daily-confirm-form input[type="number"],
.daily-confirm-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #cbd8e6;
  border-radius: 3px;
  color: #243a54;
  background: #fff;
  font: inherit;
}

.daily-confirm-form input[type="number"] {
  height: 44px;
  padding: 0 11px;
}

.daily-confirm-form textarea {
  min-height: 104px;
  padding: 10px 11px;
  resize: vertical;
}

.daily-confirm-form .daily-checkline {
  display: flex;
  align-items: center;
  align-self: end;
  min-height: 44px;
  padding-bottom: 9px;
}

.daily-checkline input {
  width: 20px;
  height: 20px;
  margin: 0 9px 0 0;
}

.daily-note-field {
  grid-column: 1 / -1;
  position: relative;
}

.daily-note-field small {
  position: absolute;
  right: 9px;
  bottom: 8px;
  color: #8493a4;
  font-weight: 400;
}

.daily-confirm-form .small-button {
  width: max-content;
  min-width: 140px;
  min-height: 44px;
}

.daily-confirm-form :disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.daily-submit-status {
  max-width: 820px;
  min-height: 42px;
  margin: 16px 0 0;
  padding: 11px 12px;
  border-radius: 3px;
  font-size: 13px;
}

tr[data-daily-detail-kind] {
  cursor: pointer;
}

tr[data-daily-detail-kind]:hover,
tr[data-daily-detail-kind]:focus {
  outline: none;
  background: #eef7f4;
}

@media (max-width: 900px) {
  .sidebar-toggle {
    width: 44px;
    height: 44px;
  }

  .side-menu .menu-item {
    height: 44px;
  }

  .daily-metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .daily-metric-strip > div,
  .daily-metric-strip > div:nth-child(4n) {
    border-right: 1px solid #e5ebf1;
    border-bottom: 1px solid #e5ebf1;
  }

  .daily-metric-strip > div:nth-child(2n) {
    border-right: 0;
  }

  .daily-metric-strip > div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }
}

@media (max-width: 520px) {
  .daily-page-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }

  .daily-page-head h3 {
    font-size: 18px;
  }

  .daily-metric-strip > div {
    padding: 12px;
  }

  .daily-metric-strip dd {
    font-size: 16px;
  }

  .daily-confirm-form {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .daily-note-field {
    grid-column: auto;
  }

  .daily-confirm-form .daily-checkline {
    align-self: auto;
    padding-bottom: 0;
  }

  .daily-confirm-form .small-button {
    width: 100%;
  }
}

/* Task 7: daily audit workspace. */
.audit-metric-strip {
  grid-template-columns: repeat(3, minmax(150px, 1fr));
}

.audit-metric-strip > div,
.audit-metric-strip > div:nth-child(4n) {
  border-right: 1px solid #e5ebf1;
  border-bottom: 1px solid #e5ebf1;
}

.audit-metric-strip > div:nth-child(3n) {
  border-right: 0;
}

.audit-metric-strip > div:nth-last-child(-n + 3) {
  border-bottom: 0;
}

.audit-metric-pass {
  box-shadow: inset 3px 0 0 #2f8b61;
}

.audit-metric-warning {
  box-shadow: inset 3px 0 0 #c48a18;
}

.audit-metric-fail {
  box-shadow: inset 3px 0 0 #c4544d;
}

.audit-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  margin: 0;
  border-top: 1px solid #e2eaf2;
  border-left: 1px solid #e2eaf2;
}

.audit-facts > div {
  min-width: 0;
  padding: 13px 14px;
  border-right: 1px solid #e2eaf2;
  border-bottom: 1px solid #e2eaf2;
}

.audit-facts dt {
  color: #718398;
  font-size: 12px;
}

.audit-facts dd {
  margin: 6px 0 0;
  overflow-wrap: anywhere;
  color: #233c58;
  font-size: 14px;
  font-weight: 700;
}

.audit-review-form {
  display: grid;
  grid-template-columns: minmax(240px, 0.65fr) minmax(300px, 1fr);
  gap: 16px 22px;
  max-width: 860px;
}

.audit-review-form fieldset {
  display: flex;
  align-items: center;
  gap: 22px;
  min-width: 0;
  margin: 0;
  padding: 11px 14px;
  border: 1px solid #cbd8e6;
  border-radius: 3px;
}

.audit-review-form legend,
.audit-review-form > label {
  color: #435b75;
  font-size: 13px;
  font-weight: 700;
}

.audit-review-form fieldset label {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: #304963;
  font-size: 14px;
  font-weight: 600;
}

.audit-review-form input[type="radio"] {
  width: 20px;
  height: 20px;
  margin: 0 8px 0 0;
}

.audit-review-form > label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.audit-review-form textarea {
  width: 100%;
  min-width: 0;
  min-height: 104px;
  padding: 10px 11px;
  border: 1px solid #cbd8e6;
  border-radius: 3px;
  color: #243a54;
  background: #fff;
  font: inherit;
  resize: vertical;
}

.audit-review-form .small-button {
  width: max-content;
  min-width: 150px;
  min-height: 44px;
}

.audit-review-form :disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.daily-export-list {
  border-top: 1px solid #e2e9f1;
}

.daily-export-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
  padding: 14px 4px;
  border-bottom: 1px solid #e2e9f1;
}

.daily-export-list span {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.daily-export-list strong {
  color: #233a55;
  font-size: 15px;
}

.daily-export-list small {
  color: #718398;
  line-height: 1.5;
}

.daily-export-list .small-button {
  flex: 0 0 auto;
  min-width: 138px;
}

@media (max-width: 900px) {
  .audit-metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .audit-metric-strip > div,
  .audit-metric-strip > div:nth-child(3n) {
    border-right: 1px solid #e5ebf1;
    border-bottom: 1px solid #e5ebf1;
  }

  .audit-metric-strip > div:nth-child(2n) {
    border-right: 0;
  }

  .audit-metric-strip > div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .audit-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .audit-facts,
  .audit-review-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .audit-review-form fieldset {
    flex-wrap: wrap;
  }

  .audit-review-form .small-button {
    width: 100%;
  }

  .daily-export-list > div {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .daily-export-list .small-button {
    width: 100%;
  }
}

@media (max-width: 760px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .side-menu {
    width: min(300px, calc(100vw - 48px));
    max-width: calc(100vw - 48px);
    overflow: hidden;
  }

  .side-menu .menu-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
  }

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

  button,
  select,
  input:not([type="checkbox"]):not([type="radio"]) {
    min-height: 44px;
  }

  .top-actions button,
  .user-pill {
    height: 44px;
    min-height: 44px;
  }

  .audit-review-form fieldset label {
    min-height: 44px;
  }
}

@media (max-width: 390px) {
  .top-actions {
    gap: 6px;
  }

  .top-actions button {
    padding: 0 9px;
  }
}
