@import url("./vendor/lottoshield/css2");
@import url("./vendor/lottoshield/all.min.css");
@import url("./vendor/lottoshield/OverlayScrollbars.min.css");
@import url("./vendor/lottoshield/adminlte.min.css");
@import url("./vendor/lottoshield/form.css");
@import url("./vendor/lottoshield/details-button.css");
@import url("./vendor/lottoshield/custom.css");
@import url("./vendor/lottoshield/ls-shared-controls.css");
@import url("./vendor/lottoshield/lottoshield-pro-theme.css");
@import url("./vendor/lottoshield/alignment.css");
@import url("./vendor/lottoshield/dataTables.bootstrap4.min.css");

:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --border: #ccd6e2;
  --border-strong: #ccd6e2;
  --divider: #d9e1ea;
  --divider-soft: #e2e7ee;
  --column-rule: rgba(217, 225, 234, 0.7);
  --text: #0b1d46;
  --muted: #56677d;
  --blue: #3f7edb;
  --blue-soft: #eaf2ff;
  --green: #18a058;
  --green-soft: #e7f7ec;
  --red: #e31928;
  --red-soft: #fff0f1;
  --amber: #f59e0b;
  --amber-soft: #fff7e6;
  --card-shadow: 0 1px 2px rgba(20, 30, 45, 0.05);
  --control-shadow: 0 1px 1px rgba(20, 30, 45, 0.04);
  --nav-width: 198px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.35;
}

button,
a {
  font: inherit;
}

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

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--nav-width) minmax(0, 1fr);
}

.workspace {
  min-width: 0;
  font-size: 13.5px;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 10px 12px;
  border-right: 1px solid var(--border);
  background: #ffffff;
  box-shadow: 2px 0 8px rgba(15, 36, 64, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  min-height: 38px;
}

.brand-logo {
  display: block;
  width: 174px;
  max-width: 100%;
  height: auto;
}

.store-card,
.user-card {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 9px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.store-logo {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: #5fb846;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  border: 0;
}

.store-name,
.user-name {
  font-weight: 800;
}

.store-meta,
.user-meta {
  color: #70819a;
  font-size: 11px;
  line-height: 1.25;
}

.nav-section {
  display: grid;
  gap: 3px;
}

.nav-label {
  margin: 2px 0 3px 6px;
  color: #8494aa;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-item {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 9px;
  border-radius: 18px;
  color: #253955;
  font-size: 12px;
  font-weight: 750;
}

.nav-item.active {
  background: #d9eaff;
  color: #0d2448;
}

.nav-icon,
.button-icon {
  width: 16px;
  height: 16px;
  display: inline-grid;
  place-items: center;
  color: currentColor;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 18px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.pill-blue {
  background: #dce9ff;
  color: var(--blue);
}

.pill-green {
  background: var(--green-soft);
  color: var(--green);
}

.pill-red {
  background: var(--red);
  color: #ffffff;
}

.pill-amber {
  background: #ffd329;
  color: #312500;
}

.sidebar-spacer {
  flex: 1;
}

.utility-nav {
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  font-weight: 800;
  background: linear-gradient(135deg, #49546b, #7b8497);
}

.main {
  min-width: 0;
  padding: 32px 40px 44px;
}

.topbar {
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 26px;
  border-bottom: 1px solid var(--border);
  background: #ffffff;
}

.topbar-left,
.topbar-actions,
.topbar-breadcrumb {
  display: flex;
  align-items: center;
}

.topbar-left {
  gap: 13px;
}

.topbar-actions {
  gap: 8px;
}

.menu-button {
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: #7c8da4;
  cursor: pointer;
}

.topbar-breadcrumb {
  gap: 7px;
  color: #7d8da3;
  font-size: 12px;
  font-weight: 750;
}

.topbar-breadcrumb a {
  color: #7d8da3;
}

.topbar-breadcrumb span:last-child {
  color: #182b47;
}

.topbar-date,
.admin-button {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fbfdff;
  color: #18324f;
  font-size: 12px;
  font-weight: 750;
}

.admin-button {
  border-radius: 6px;
}

.topline {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 14px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--card-shadow);
}

.breadcrumb {
  display: flex;
  gap: 9px;
  align-items: center;
  margin-bottom: 14px;
  color: var(--muted);
  font-weight: 700;
}

.breadcrumb a {
  color: var(--blue);
}

h1 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.12;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: 0;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.control-button,
.date-button,
.columns-button,
.report-link {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  color: #14233b;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--control-shadow);
}

.date-button {
  min-width: 238px;
  justify-content: space-between;
}

.date-button svg,
.control-button svg,
.columns-button svg,
.report-link svg,
.breadcrumb svg,
.topbar svg,
.row-action svg,
.nav-icon svg,
.button-icon svg,
.user-button svg,
.warning svg,
.clock svg,
.mini-check svg,
.check svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.topbar svg {
  width: 14px;
  height: 14px;
}

.user-button svg {
  width: 24px;
  height: 24px;
}

.user-button {
  width: 50px;
  height: 50px;
  border: 2px solid #70a0ff;
  border-radius: 50%;
  background: var(--surface);
  color: var(--blue);
  cursor: pointer;
}

.panel,
.metric-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--card-shadow);
}

.table-panel {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--divider);
  text-align: left;
  vertical-align: middle;
}

th {
  background: #f7f9fc;
  color: #56677d;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  white-space: nowrap;
}

.overview th {
  font-size: 11px;
  text-transform: uppercase;
  color: #56677d;
}

.overview td,
.issue-table td {
  color: #707070;
}

.issue-table th {
  color: #707070;
}

.overview th,
.overview td {
  padding-top: 11px;
  padding-bottom: 11px;
}

.section-stack {
  display: grid;
  gap: 14px;
}

.monitor-section {
  display: grid;
  gap: 10px;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 0 2px;
}

.section-heading span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.overview .report-link {
  min-height: auto;
  gap: 2px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--blue);
  font-size: 13px;
  line-height: 1.2;
  box-shadow: none;
}

.overview .report-link svg {
  width: 14px;
  height: 14px;
}

.overview .report-link:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.center {
  text-align: center;
}

.right {
  text-align: right;
}

.muted {
  color: var(--muted);
}

.date-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 205px;
}

.expandable-date-cell {
  gap: 10px;
}

.inline-display-link {
  color: #8ba0bf;
  font-size: 12px;
  font-weight: 700;
}

.inline-display-link:hover {
  color: var(--blue);
}

.date-title {
  color: #707070;
  font-weight: 850;
}

.report-date .date-title {
  color: var(--text);
}

.os-negative {
  color: var(--red);
  font-weight: 900;
}

.provisional {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-weight: 500;
}

.check {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 0;
  color: var(--green);
  font-weight: 900;
}

.mini-check {
  width: 18px;
  height: 18px;
  border: 0;
  color: var(--green);
}

.clock,
.warning {
  display: inline-grid;
  place-items: center;
  color: var(--amber);
}

.overview-current-day > td {
  background: #fbfdff;
}

.overview-expandable-row {
  cursor: pointer;
}

.overview-expandable-row:hover > td {
  background: #f3f7fc;
}

.currently-monitoring {
  display: inline-block;
  margin-left: 10px;
  color: #8ba0bf;
  font-size: 12px;
  font-weight: 700;
}

.overview-issues-row > td {
  padding: 0;
  background: #f4f8fd;
}

.current-audits-panel {
  border: 0;
  border-top: 1px solid var(--divider);
  border-radius: 0;
  box-shadow: none;
  overflow-x: auto;
  background: #f4f8fd;
}

.current-audit-block + .current-audit-block {
  border-top: 1px solid var(--divider);
}

.current-audit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  background: #f7f9fc;
  border-bottom: 1px solid var(--divider);
}

.current-audit-meta {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #556987;
  font-size: 13px;
  font-weight: 700;
}

.current-audit-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 999px;
  background: #20b8ad;
  box-shadow: 0 0 0 2px #eef8f7;
}

.current-audit-separator {
  color: #a0aec0;
}

.current-audit-user {
  color: #1f3557;
  font-weight: 800;
}

.current-audit-total {
  flex: 0 0 auto;
}

.issue-table th {
  padding: 10px 10px;
  background: #f7f9fc;
  color: #56677d;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  white-space: nowrap;
}

.issue-table .center {
  text-align: center;
}

.issue-table td {
  padding: 10px 10px;
}

.issue-table td:nth-child(5) {
  white-space: nowrap;
}

.issue-col-game {
  width: 17%;
}

.issue-col-game-number {
  width: 6%;
}

.issue-col-price {
  width: 6%;
}

.issue-col-pack {
  width: 9%;
}

.issue-col-tickets {
  width: 11%;
}

.issue-col-pos {
  width: 9%;
}

.issue-col-movement {
  width: 9%;
}

.issue-col-details {
  width: 33%;
}

.issue-table {
  table-layout: fixed;
  min-width: 1178px;
}

.issue-table td:first-child,
.issue-table td:first-child .game-name {
  white-space: nowrap;
}

.issue-table th:not(:last-child),
.issue-table td:not(:last-child) {
  border-right: 1px solid var(--column-rule);
}

.issue-icon {
  width: 16px;
  height: 16px;
}

.issue-icon-red {
  color: var(--red);
}

.issue-summary-row td {
  background: #ffffff;
}

.issue-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: block;
  margin-left: 1px;
}

.issue-status-dot-teal {
  background: #20b8ad;
  box-shadow: 0 0 0 2px #eef8f7;
}

.issue-status-dot-green {
  background: var(--green);
  box-shadow: 0 0 0 2px #e7f7ec;
}

.issue-status-dot-red {
  background: var(--red);
  box-shadow: 0 0 0 2px #fff1f3;
}

.issue-status-dot-blue {
  background: var(--blue);
  box-shadow: 0 0 0 2px #edf4ff;
}

.issue-status-dot-amber {
  background: #f2b515;
  box-shadow: 0 0 0 2px #fff8df;
}

.game-name-nowrap {
  white-space: nowrap;
}

.issue-inline-detail {
  display: grid;
  gap: 8px;
  padding: 2px 0;
}

.issue-inline-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.issue-inline-title {
  color: #14233b;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.1;
}

.issue-inline-detail-shortage .issue-inline-title {
  color: var(--red);
}

.partial-recovery-value {
  color: #18294c;
  font-weight: 700;
}

.issue-inline-copy {
  color: #707070;
  font-size: 12px;
  line-height: 1.45;
}

.issue-inline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  color: #707070;
  font-size: 12px;
}

.issue-head-link {
  color: #707070;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.issue-head-link:hover {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.status-with-dot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #173664;
  font-weight: 800;
}

.status-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 999px;
  display: inline-block;
}

.status-dot-amber {
  background: var(--amber);
  box-shadow: 0 0 0 2px #fff6e7;
}

.status-dot-blue {
  background: var(--blue);
  box-shadow: 0 0 0 2px #edf4ff;
}

.day-toggle {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #55677d;
  cursor: pointer;
}

.day-toggle-spacer {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}

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

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

.metric-card {
  min-height: 84px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  padding: 14px;
  text-align: center;
}

.metric-label {
  color: #14233b;
  font-size: 12px;
  font-weight: 900;
}

.metric-value {
  font-size: 24px;
  line-height: 1;
  font-weight: 900;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 50px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--divider);
  background: #ffffff;
}

.table-title {
  color: #14233b;
  font-size: 15px;
  font-weight: 900;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.columns-menu {
  position: relative;
}

.columns-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 10;
  width: 250px;
  display: none;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(20, 30, 45, 0.12);
}

.columns-menu.open .columns-popover {
  display: grid;
  gap: 8px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #173664;
  font-weight: 750;
}

.columns-popover-actions {
  display: flex;
  justify-content: flex-end;
  margin: 4px -2px -2px;
  padding-top: 10px;
  border-top: 1px solid var(--divider);
}

.columns-apply {
  min-height: 32px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: #14233b;
  font-weight: 850;
  cursor: pointer;
}

.columns-apply:hover {
  background: #f5f9ff;
}

.report-table th,
.report-table td {
  padding-top: 10px;
  padding-bottom: 10px;
  color: #707070;
  font-size: 12px;
  overflow-wrap: normal;
  word-break: normal;
}

.report-table th {
  color: #56677d;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  white-space: nowrap;
}

.report-table td:not(:first-child),
.overview td:not(:first-child),
.issue-table td:not(:last-child) {
  white-space: nowrap;
}

.issue-table td:last-child {
  white-space: normal;
}

.report-table {
  width: 100%;
  table-layout: fixed;
  min-width: 860px;
}

.audit-report-table th:not(:first-child),
.audit-report-table td:not(:first-child) {
  text-align: center;
}

.audit-report-table th:first-child,
.audit-report-table td:first-child {
  text-align: left;
}

.game-name {
  font-weight: 900;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stack-list {
  display: grid;
  gap: 4px;
}

.stack-list.multi-pack {
  gap: 7px;
}

.stack-list > div {
  min-height: 18px;
}

.stacked-note {
  display: block;
  margin-top: 2px;
}

.row-action {
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #0d2a63;
  cursor: pointer;
}

.row-action-spacer {
  width: 28px;
  height: 28px;
}

.state-cell {
  display: grid;
  grid-template-columns: minmax(48px, 1fr) 22px 28px;
  align-items: center;
  gap: 6px;
}

.status-primary {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 48px;
}

.audit-awaiting-scan {
  color: #526784;
  font-weight: 500;
  white-space: nowrap;
}

.audit-status-cell {
  position: relative;
  text-align: center;
  white-space: nowrap;
}

.audit-status-cell .mini-check {
  display: inline-flex;
  vertical-align: middle;
}

.audit-positive-value {
  color: #17233c;
  font-weight: 850;
}

.audit-status-clock {
  display: inline-flex;
  width: 20px;
  margin-left: 6px;
  vertical-align: middle;
}

.status-adjunct {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
}

.detail-row > td {
  padding: 0;
  background: #f4f8fd;
}

.detail-content {
  margin: 0;
  max-width: min(100%, calc(100vw - 48px));
  padding: 16px;
  border-top: 1px solid var(--divider);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(250px, 0.9fr) minmax(250px, 1fr);
  gap: 18px;
}

.shortage-detail-grid {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
}

.detail-block {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
  box-shadow: var(--card-shadow);
}

.detail-heading {
  margin: 0 0 12px;
  color: #14233b;
  font-size: 14px;
  font-weight: 900;
}

.history-table {
  width: 100%;
  table-layout: fixed;
}

.history-table th,
.history-table td {
  padding: 9px 8px;
  font-size: 13px;
}

.history-table th {
  color: #56677d;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.callout {
  border-left: 4px solid var(--red);
  background: var(--red-soft);
}

.pending-callout {
  max-width: min(100%, calc(100vw - 64px));
  border-color: #f4d19b;
  border-left-color: var(--amber);
  background: #fffefa;
}

.callout p {
  margin: 0;
  color: #263758;
}

.pending-scan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 0;
  margin-bottom: 14px;
}

.pending-scan-item {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 8px 18px;
}

.pending-scan-item + .pending-scan-item {
  border-left: 1px solid #f2dfbd;
}

.pending-icon {
  display: inline-grid;
  place-items: center;
  margin-top: 2px;
}

.scan-icon {
  color: var(--blue);
}

.pending-label {
  color: #071d4d;
  font-size: 13px;
  font-weight: 900;
}

.pending-value {
  margin-top: 2px;
  color: #071d4d;
  font-size: 18px;
  line-height: 1.1;
  font-weight: 900;
}

.pending-sub {
  margin-top: 4px;
  color: #173664;
  font-size: 12px;
  font-weight: 800;
}

.pending-info {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 10px 12px;
  border-radius: 6px;
  background: #eef5ff;
  color: #0d2a63;
}

.pending-info .button-icon {
  color: var(--blue);
  margin-top: 1px;
}

.pending-info p {
  margin: 0;
  color: #0d2a63;
  font-size: 13px;
}

.pending-info .pending-period {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.footer-note {
  padding: 11px 14px;
  border-top: 1px solid var(--divider-soft);
  color: var(--muted);
  font-size: 12px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  display: none;
  max-width: 320px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(18, 49, 99, 0.18);
  color: #173664;
  font-weight: 800;
}

.toast.visible {
  display: block;
}

@media (max-width: 1120px) {
  :root {
    --nav-width: 198px;
  }

  .summary-grid {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

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

@media (max-width: 980px) {
  .main {
    padding: 24px 18px 34px;
  }

  .topline {
    display: grid;
  }

  .controls {
    justify-content: flex-start;
  }

  .overview,
  .report-table {
    min-width: 900px;
  }

  .issue-table {
    min-width: 1178px;
  }

  .report-table {
    min-width: 860px;
  }

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

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

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

  .shortage-detail-grid {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .shortage-detail-grid {
    grid-template-columns: 1fr;
  }

  .audit-summary-grid {
    grid-template-columns: 1fr;
  }
}

.timeline-topbar-actions {
  display: none;
}

.audit-page h1,
.audit-page .subtitle,
.audit-page .metric-label,
.audit-page .metric-value:not(.os-negative),
.audit-page .table-title,
.audit-page .toolbar-actions .muted {
  color: #707070;
}

.timeline-page {
  max-width: 930px;
  margin: 0 auto;
  padding: 10px 18px 48px;
}

.timeline-game-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--card-shadow);
}

.timeline-game-art {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
}

.timeline-game-card h1 {
  margin: 0;
  color: #14233b;
  font-size: 26px;
  letter-spacing: 0;
}

.timeline-game-card h1 span {
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
}

.timeline-game-card p {
  margin: 5px 0 0;
  color: #657895;
  font-size: 14px;
}

.timeline-panel {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.timeline-toolbar {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 50px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--divider);
  background: #ffffff;
}

.timeline-label {
  color: #56677d;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.timeline-tabs {
  display: inline-flex;
  padding: 2px;
  border-radius: 10px;
  background: #edf2f7;
}

.timeline-tabs button {
  min-height: 30px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #65728a;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.timeline-tabs button.active {
  background: #fff;
  color: #182440;
  box-shadow: 0 1px 2px rgba(20, 30, 45, 0.12);
}

.timeline-body {
  position: relative;
  padding: 42px 34px 34px 142px;
}

.timeline-body::before {
  content: "";
  position: absolute;
  left: 126px;
  top: 72px;
  bottom: 42px;
  width: 2px;
  background: #dfe7f1;
}

.timeline-body h2 {
  margin: 0 0 24px;
  color: #14233b;
  font-size: 19px;
}

.timeline-event {
  position: relative;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 16px;
  margin: 0 0 14px;
}

.timeline-event > time {
  padding-top: 8px;
  color: #8ca0bf;
  font-size: 13px;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.timeline-dot {
  position: absolute;
  left: -25px;
  top: 10px;
  width: 10px;
  height: 10px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #229b72;
  box-shadow: 0 0 0 1px #b9d8d1;
}

.timeline-dot.movement {
  left: -29px;
  top: 4px;
  width: 22px;
  height: 22px;
  border: 0;
  background: #20b8ad;
  box-shadow: none;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  line-height: 22px;
  text-align: center;
}

.timeline-event-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--card-shadow);
}

.timeline-event-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-bottom: 1px dashed var(--divider);
  color: #14233b;
  font-size: 14px;
  font-weight: 850;
}

.shortage-pill {
  min-height: 18px;
  padding: 2px 8px;
  border-radius: 9px;
  background: #c8242d;
  color: #fff;
  font-size: 11px;
  line-height: 1.2;
}

.recovery-pill {
  min-height: 18px;
  padding: 2px 8px;
  border-radius: 9px;
  background: #f2b515;
  color: #17233c;
  font-size: 11px;
  line-height: 1.2;
}

.timeline-event-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 8px 12px;
  color: #6f84a5;
  font-size: 12px;
}

.timeline-event-details strong {
  display: block;
  margin-top: 2px;
  color: #102f67;
  font-size: 13px;
}

.timeline-event-copy {
  padding: 0 12px 10px;
  color: #6f84a5;
  font-size: 12px;
  line-height: 1.4;
}

.timeline-inline {
  padding: 8px 0;
  color: #1a2b4d;
  font-size: 14px;
}

.timeline-inline span {
  color: #91a1ba;
}

.timeline-game-link {
  color: inherit;
}

.timeline-game-link:hover {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 760px) {
  .timeline-page {
    padding: 0 0 30px;
  }

  .timeline-game-card h1 {
    font-size: 22px;
  }

  .timeline-body {
    padding: 32px 14px 30px 104px;
  }

  .timeline-body::before {
    left: 88px;
  }
}
