:root {
  --go-red: #d71920;
  --go-yellow: #ffd84d;
  --ink: #18202a;
  --muted: #697586;
  --paper: #fffaf0;
  --card: #ffffff;
  --line: #eadfca;
  --danger: #c1121f;
  --hot: #ef6c00;
  --warm: #f4a261;
  --cool: #2a9d8f;
  --good: #557c55;
  --row-expired-bg: rgba(193, 18, 31, 0.08);
  --row-today-bg: rgba(239, 108, 0, 0.08);
  --row-soon3-bg: rgba(244, 162, 97, 0.12);
  --row-soon7-bg: rgba(42, 157, 143, 0.08);
  --shadow: 0 1.2vh 3vh rgba(24, 32, 42, 0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 216, 77, 0.42), transparent 30vw),
    linear-gradient(135deg, #fffaf0 0vw, #f7efe0 55vw, #fff7e7 100vw);
  overflow-y: auto;
}

button, input, textarea { font: inherit; }
button { cursor: pointer; }

.app-shell {
  width: min(92vw, 1800px);
  margin: 0 auto;
  padding: 4vh 0 6vh;
}

.hero-card, .panel {
  background: rgba(255, 255, 255, 0.88);
  border: 0.12vw solid rgba(234, 223, 202, 0.95);
  border-radius: 1.4vw;
  box-shadow: var(--shadow);
}

.hero-card {
  min-height: 18vh;
  padding: 3vh 3vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3vw;
  border-top: 1vh solid var(--go-red);
}

.eyebrow {
  margin: 0 0 1vh;
  color: var(--go-red);
  font-size: 1vw;
  font-weight: 800;
  letter-spacing: 0.14vw;
  text-transform: uppercase;
}

h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 1vh; font-size: clamp(42px, 4vw, 78px); line-height: 1; }
h2 { margin-bottom: 0.7vh; font-size: clamp(24px, 1.5vw, 34px); }
.subtitle, .panel p, .table-header p { color: var(--muted); }
.subtitle { margin-bottom: 0; font-size: clamp(16px, 1.15vw, 22px); }

.today-card {
  width: 18vw;
  padding: 2vh 1.6vw;
  border-radius: 1.2vw;
  background: var(--ink);
  color: white;
  text-align: center;
}
.today-card span { display: block; color: var(--go-yellow); font-size: 0.95vw; }
.today-card strong { display: block; margin-top: 0.6vh; font-size: 1.25vw; }

.input-grid {
  display: grid;
  grid-template-columns: 2fr 0.85fr;
  gap: 2vw;
  margin-top: 2.5vh;
}

.panel { padding: 2.5vh 2vw; }
.panel-header, .action-row, .controls-panel, .search-row, .table-header {
  display: flex;
  align-items: center;
  gap: 1vw;
}
.panel-header, .table-header { justify-content: space-between; }

textarea {
  width: 100%;
  height: 27vh;
  margin-top: 1.5vh;
  padding: 1.7vh 1.2vw;
  resize: vertical;
  border: 0.15vw solid var(--line);
  border-radius: 1vw;
  outline: none;
  background: #fffdf8;
}
textarea:focus, input:focus { border-color: var(--go-red); box-shadow: 0 0 0 0.22vw rgba(215, 25, 32, 0.14); }

.action-row { flex-wrap: wrap; margin-top: 1.4vh; }
button {
  border: none;
  border-radius: 999vw;
  padding: 1.1vh 1.5vw;
  font-weight: 800;
  transition: transform 160ms ease, opacity 160ms ease, background 160ms ease;
}
button:hover { transform: translateY(-0.2vh); }
.primary-btn { background: var(--go-red); color: white; }
.ghost-btn { background: #f0e7d8; color: var(--ink); }
.danger-btn { background: #ffe3e3; color: var(--danger); }
.message { min-height: 2.6vh; margin: 1.2vh 0 0; font-weight: 700; }

.stats-panel h2 { margin-bottom: 2vh; }
.stat-list { display: grid; gap: 1.2vh; }
.stat {
  min-height: 7vh;
  padding: 1.4vh 1.2vw;
  border-radius: 1vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-left: 0.6vw solid var(--good);
  background: #fffdf8;
}
.stat span { color: var(--muted); font-size: 1vw; }
.stat strong { font-size: 2vw; }
.stat.danger { border-left-color: var(--danger); }
.stat.hot { border-left-color: var(--hot); }
.stat.warm { border-left-color: var(--warm); }
.stat.cool { border-left-color: var(--cool); }

.controls-panel {
  margin-top: 2.5vh;
  justify-content: space-between;
  flex-wrap: wrap;
}
.control-group {
  display: flex;
  gap: 0.7vw;
  flex-wrap: wrap;
}
.control-group button {
  background: #f0e7d8;
  color: var(--ink);
}
.control-group button[data-tooltip] {
  position: relative;
}
.control-group button[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  top: calc(100% + 0.8vh);
  z-index: 20;
  min-width: max-content;
  max-width: 220px;
  padding: 0.7vh 0.8vw;
  border-radius: 0.45vw;
  background: rgba(24, 32, 42, 0.95);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -0.4vh);
  transition: opacity 140ms ease, transform 140ms ease;
  transition-delay: 0s;
  white-space: normal;
}
.control-group button[data-tooltip]:hover::after,
.control-group button[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
  transition-delay: 3s;
}
.control-group button.active {
  background: var(--ink);
  color: var(--go-yellow);
}
.search-row input {
  width: 24vw;
  padding: 1.1vh 1vw;
  border: 0.15vw solid var(--line);
  border-radius: 999vw;
  outline: none;
  background: #fffdf8;
}

.table-panel { margin-top: 2.5vh; padding-bottom: 3vh; }
.table-wrap { width: 100%; overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5vh;
  min-width: 1060px;
}
th, td {
  text-align: left;
  padding: 1.35vh 0.8vw;
  border-bottom: 0.12vw solid var(--line);
  vertical-align: middle;
}
th {
  position: sticky;
  top: 0;
  background: #fff6df;
  color: #5a4630;
  font-size: clamp(12px, 0.75vw, 15px);
  text-transform: uppercase;
  letter-spacing: 0.05vw;
}
td { font-size: clamp(14px, 0.82vw, 17px); }

@media (min-width: 561px) {
  table:not(.print-table) {
    table-layout: fixed;
  }

  table:not(.print-table) th:nth-child(1),
  table:not(.print-table) td:nth-child(1) {
    width: 56px;
    text-align: center;
  }

  table:not(.print-table) th:nth-child(2),
  table:not(.print-table) td:nth-child(2) {
    width: 108px;
  }

  table:not(.print-table) th:nth-child(3),
  table:not(.print-table) td:nth-child(3) {
    width: 122px;
  }

  table:not(.print-table) th:nth-child(4),
  table:not(.print-table) td:nth-child(4) {
    width: 86px;
  }

  table:not(.print-table) th:nth-child(6),
  table:not(.print-table) td:nth-child(6) {
    width: 56px;
  }

  table:not(.print-table) th:nth-child(7),
  table:not(.print-table) td:nth-child(7) {
    width: 86px;
  }

  table:not(.print-table) th:nth-child(8),
  table:not(.print-table) td:nth-child(8) {
    width: 76px;
  }

  table:not(.print-table) th:nth-child(9),
  table:not(.print-table) td:nth-child(9) {
    width: 108px;
  }

  table:not(.print-table) th:nth-child(10),
  table:not(.print-table) td:nth-child(10) {
    width: 180px;
  }

  table:not(.print-table) th:nth-child(11),
  table:not(.print-table) td:nth-child(11) {
    width: 178px;
  }
}

.load-more-row {
  display: flex;
  justify-content: center;
  margin-top: 1.5vh;
}

#loadMoreBtn[hidden] {
  display: none;
}

.skeleton-cell {
  display: block;
  width: 100%;
  height: 1.1em;
  border-radius: 999vw;
  background: linear-gradient(90deg, #f0e7d8, #fff6df, #f0e7d8);
  background-size: 200% 100%;
  animation: skeletonPulse 1.2s ease-in-out infinite;
}

@keyframes skeletonPulse {
  0% { background-position: 0% 50%; }
  100% { background-position: -200% 50%; }
}

.status-pill {
  display: inline-block;
  min-width: 82px;
  text-align: center;
  padding: 0.8vh 0.75vw;
  border-radius: 999vw;
  color: white;
  font-weight: 800;
  font-size: clamp(13px, 0.72vw, 15px);
  white-space: nowrap;
}
.expired { background: var(--danger); }
.today { background: var(--hot); }
.soon3 { background: var(--warm); color: #3b2600; }
.soon7 { background: var(--cool); }
.safe { background: var(--good); }
.unknown { background: #7d8597; }

.row-expired { background: var(--row-expired-bg); }
.row-today { background: var(--row-today-bg); }
.row-soon3 { background: var(--row-soon3-bg); }
.row-soon7 { background: var(--row-soon7-bg); }

@media print {
  body { background: white; }
  .hero-card, .paste-panel, .stats-panel, .controls-panel { display: none; }
  .app-shell { width: 98vw; padding: 1vh 0; }
  .panel { box-shadow: none; border: none; }
}

select {
  padding: 1.1vh 1vw;
  border: 0.15vw solid var(--line);
  border-radius: 999vw;
  outline: none;
  background: #fffdf8;
  color: var(--ink);
  font-weight: 700;
}

.toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5vw;
  padding: 1.1vh 1vw;
  border-radius: 999vw;
  background: #f0e7d8;
  font-weight: 800;
  white-space: nowrap;
}

.toggle-pill input,
.row-check {
  width: 1.05vw;
  height: 1.05vw;
  accent-color: var(--go-red);
}

.batch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7vw;
  justify-content: flex-end;
}

.stat.marked { border-left-color: #6d4c41; }

.desc-cell {
  min-width: 18vw;
  max-width: 24vw;
}

.muted-small {
  color: var(--muted);
  font-size: 0.85vw;
}

.markdown-note {
  display: grid;
  gap: 0.3vh;
  min-width: 0;
}

.markdown-note strong {
  color: #4a2c20;
  font-size: clamp(14px, 0.82vw, 16px);
  line-height: 1.2;
}

.markdown-note span,
.markdown-note em {
  color: var(--muted);
  font-size: clamp(12px, 0.72vw, 14px);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.row-marked {
  box-shadow: inset 0.45vw 0 0 #6d4c41;
}

.table-actions {
  min-width: 0;
}

.table-action-stack {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.mini-btn {
  padding: 0.65vh 0.75vw;
  margin: 0;
  font-size: clamp(13px, 0.72vw, 15px);
  background: #f0e7d8;
  color: var(--ink);
  line-height: 1;
  white-space: nowrap;
}

.delete-btn {
  background: #ffe3e3;
  color: var(--danger);
}

.barcode-box {
  display: grid;
  gap: 0.35vh;
  min-width: 10vw;
}

.barcode-box svg {
  width: 9.5vw;
  height: 4vh;
  background: white;
}

.barcode-box span,
.upc-text {
  font-size: clamp(12px, 0.68vw, 14px);
  letter-spacing: 0;
}

.stat.black {
  background: #292929;
  color: #fff7e8;
}

.qty-input {
  width: 4.3rem;
  min-width: 0;
  border: 0.08vw solid #d4d8dd;
  border-radius: 0.45vw;
  padding: 0.45vh 0.45vw;
  font: inherit;
  background: #fffef9;
}

.qty-input:focus {
  outline: 0.14vw solid #f3bd1b;
  border-color: #0d4f2f;
}

.unblacklist-btn {
  background: #292929;
  color: #fff7e8;
}

.blacklist-btn {
  background: #fff0c2;
  color: #332400;
}
#userBtn {
    padding: 0.75vh 1.2vw 0.75vh 0.75vw;
    border-radius: 999vw;
    border: 0.18vw solid var(--go-red);
    background: linear-gradient(135deg, #fffdf8 0%, #fff3c7 100%);
    color: var(--ink);
    box-shadow: 0 0.75vh 1.8vh rgba(215, 25, 32, 0.16);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75vw;
    min-height: 5.1vh;
    font-size: 0.98vw;
    position: relative;
    z-index: 10001;
    pointer-events: auto;
}

#userBtn:hover {
    background: linear-gradient(135deg, #ffffff 0%, #ffeaa0 100%);
    box-shadow: 0 1vh 2.4vh rgba(215, 25, 32, 0.22);
}

#userBtn img {
    width: 2.45vw;
    height: 2.45vw;
    border-radius: 50%;
    border: 0.14vw solid white;
    box-shadow: 0 0 0 0.16vw var(--go-red);
    object-fit: cover;
}

.userBtnText {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    column-gap: 0.35vw;
    row-gap: 0.05vh;
    text-align: left;
    line-height: 1.05;
}

.userStatusDot {
    width: 0.55vw;
    height: 0.55vw;
    min-width: 7px;
    min-height: 7px;
    border-radius: 50%;
    background: var(--good);
    box-shadow: 0 0 0 0.2vw rgba(85, 124, 85, 0.18);
}

.userBtnLabel {
    color: var(--go-red);
    font-size: 0.68vw;
    font-weight: 900;
    text-transform: uppercase;
}

#currentUserName {
    grid-column: 1 / -1;
    max-width: 12vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1vw;
    font-weight: 900;
}

#userPopupOverlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 10000;
    overflow-y: auto;
}

#userList {
    max-height: 68vh;
    overflow-y: auto;
    padding-right: 1vw;
}

#userPopup {
    position: relative;
    background: linear-gradient(180deg, #fffdf8 0%, #ffffff 42%);
    width: min(82vw, 1180px);
    max-width: 94vw;
    max-height: 88vh;
    margin: 4vh auto;
    padding: 1.4vh 1.4vw 2vh;
    border-radius: 1vw;
    border: 0.12vw solid var(--line);
    box-shadow: 0 2vh 5vh rgba(24, 32, 42, 0.24);
    overflow-y: auto;
}

#userPopup h2 {
    margin: 0 0 0.65rem;
    padding: 0.2vh 29rem 0 0;
    color: var(--ink);
    font-size: clamp(22px, 1.25vw, 28px);
    line-height: 1.2;
}

#userPopup > hr {
    display: none;
}

.userManagerHeaderActions {
    position: absolute;
    top: 0.65rem;
    right: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    max-width: calc(100% - 14rem);
}

#accountCreateToggleBtn {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    max-width: 15rem;
    overflow: hidden;
    text-overflow: ellipsis;
    justify-content: center;
    min-height: 34px;
    padding: 0.42rem 0.8rem;
    border: 1px solid rgba(234, 223, 202, 0.95);
    background: #f0e7d8;
    color: var(--ink);
    font-size: 0.76rem;
    font-weight: 900;
    white-space: nowrap;
}

#accountCreateToggleBtn[aria-expanded="true"] {
    background: var(--ink);
    color: var(--go-yellow);
}

.userManagerHeaderActions .userManagerCurrent {
    position: static;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    max-width: 17rem;
    margin: 0;
}

#userCreateControls {
    display: grid;
    grid-template-columns: auto minmax(170px, 1fr) auto auto minmax(150px, 0.8fr) minmax(150px, 0.8fr) auto;
    align-items: center;
    gap: 0.55rem;
    margin: 0 0 0.6rem;
    padding: 0.65rem;
    border: 1px solid rgba(234, 223, 202, 0.95);
    border-left: 5px solid var(--go-red);
    border-radius: 0.8rem;
    background:
        linear-gradient(90deg, rgba(255, 216, 77, 0.22), transparent 45%),
        #fffaf0;
}

#userCreateControls label {
    color: #5f4b34;
    font-size: 0.82rem;
    font-weight: 900;
    white-space: nowrap;
}

#userCreateControls input,
#userCreateControls select {
    width: 100%;
    min-width: 0;
    height: 34px;
    padding: 0 0.75rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink);
    font-size: 0.88rem;
    outline: none;
}

#userCreateControls input:focus,
#userCreateControls select:focus {
    border-color: var(--go-red);
    box-shadow: 0 0 0 3px rgba(215, 25, 32, 0.12);
}

#userCreateControls button {
    min-height: 34px;
    padding: 0.45rem 0.95rem;
    background: var(--ink);
    color: var(--go-yellow);
    font-size: 0.86rem;
    white-space: nowrap;
}

#userCreateControls button + button {
    background: #f0e7d8;
    color: var(--ink);
}

#userList {
    padding-top: 0.1rem;
}

.userManagerCurrent {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0.42rem 0.75rem;
    border: 1px solid rgba(234, 223, 202, 0.95);
    border-radius: 999px;
    background: #fffdf8;
    color: #5f4b34;
    font-size: 0.88rem;
}

.userManagerCurrent strong {
    color: var(--go-red);
    font-size: 0.76rem;
    letter-spacing: 0;
    text-transform: uppercase;
}

.userManagerCurrent span {
    color: var(--ink);
    font-weight: 800;
}


.userCard {
    border: 0.1vw solid #aaa;
    padding: 1.4vh 1.4vw;
    margin-top: 1.3vh;
    border-radius: 0.8vw;
    background: #ffffff;
    position: relative;
}

.userCardHeader {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.8rem;
}

.userCardImage {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 auto;
}

.userCardIdentity {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.userCardNameRow {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.userCardMeta {
    color: #6b7280;
    font-size: 12px;
}

.currentUserCard {
    border: 0.22vw solid var(--go-red);
    background: linear-gradient(135deg, #fffdf8 0%, #fff6d9 100%);
    box-shadow: 0 1vh 2.4vh rgba(215, 25, 32, 0.14);
}

.currentUserCard img {
    box-shadow: 0 0 0 0.18vw white, 0 0 0 0.35vw var(--go-red);
}

.currentUserBadge {
    display: inline-flex;
    align-items: center;
    border-radius: 999vw;
    padding: 0.42vh 0.72vw;
    background: var(--go-red);
    color: white;
    font-size: 0.78vw;
    font-weight: 900;
    line-height: 1;
}

.permissionBox {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0 1rem 0.55rem 0;
    line-height: 1.2;
}

.permissionBox:has(input:disabled) {
    color: #6b7280;
    cursor: not-allowed;
}

.permissionBox input:disabled {
    cursor: not-allowed;
}

.permissionEditor {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 0.85rem 1rem;
    margin-top: 0.7rem;
}

.permissionSection {
    margin-top: 0;
    padding: 0.75rem 0.85rem;
    border: 1px solid rgba(234, 223, 202, 0.95);
    border-radius: 0.65rem;
    background: #fffdf8;
}

.permissionSection strong {
    display: block;
    margin-bottom: 0.45rem;
}

.userCardActions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--line);
}

.customUploadBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0;
    padding: 0.7rem 1rem;

    border-radius: 999vw;

    background: #f0f0f0;

    cursor: pointer;

    font-size: 0.9vw;

    transition: 0.2s;
}

.customUploadBtn:hover {
    background: #dcdcdc;
}

.customUploadBtn input {
    display: none;
}
#topRightControls {
    position: absolute;
    top: 2vh;
    right: 2vw;
    display: flex;
    align-items: center;
    gap: 1vw;
    z-index: 9999;
    pointer-events: auto;
}

#settingsBtn,
#auditLogBtn {
    padding: 1vh 1.2vw;
    border-radius: 999vw;
    border: 0.15vw solid black;
    background: white;
    cursor: pointer;
    font-size: 1.2vw;
}

#settingsOverlay,
#auditLogOverlay,
#deletedItemsOverlay,
#printOptionsOverlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 10000;
    overflow-y: auto;
}

#settingsPopup,
#auditLogPopup,
#deletedItemsPopup,
#printOptionsPopup {
    background: white;
    width: 42vw;
    max-width: 90vw;
    max-height: 80vh;
    margin: 8vh auto;
    padding: 3vh 3vw;
    border-radius: 2vw;
    border: 0.2vw solid black;
    overflow-y: auto;
}

#auditLogPopup {
    width: min(76vw, 1100px);
    max-width: 94vw;
    max-height: 86vh;
    border-radius: 1vw;
    padding: 2.4vh 2.2vw;
}

#deletedItemsPopup {
    width: min(82vw, 1180px);
    max-width: 94vw;
    max-height: 86vh;
    border-radius: 1vw;
    padding: 2.4vh 2.2vw;
}

#printOptionsPopup {
    width: min(86vw, 1180px);
    max-width: 94vw;
    max-height: 88vh;
    border-radius: 1vw;
    padding: 2.4vh 2.2vw;
}

.auditLogHeader,
.deletedItemsHeader,
.printOptionsHeader {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2vw;
    margin-bottom: 1.6vh;
}

.auditLogHeader h2,
.deletedItemsHeader h2,
.printOptionsHeader h2 {
    margin-bottom: 0.4vh;
}

.auditLogHeader p,
.deletedItemsHeader p,
.printOptionsHeader p {
    margin: 0;
    color: var(--muted);
}

#closeAuditLogBtn,
#closeDeletedItemsBtn,
#closePrintOptionsBtn {
    border-radius: 999vw;
    padding: 0.9vh 1.2vw;
    background: var(--ink);
    color: white;
}

#settingsPopup input {
    width: 8vw;
    padding: 0.8vh 0.8vw;
}

#settingsPopup select {
    width: 14vw;
    border-radius: 999vw;
}

#settingsPopup button {
    padding: 1vh 1.4vw;
    border-radius: 999vw;
    border: 0.15vw solid black;
    background: white;
    cursor: pointer;
}

#auditLogList {
    display: grid;
    gap: 1.2vh;
    max-height: 68vh;
    overflow-y: auto;
    padding-right: 0.5vw;
}

.auditLogDay {
    border: 0.12vw solid var(--line);
    border-radius: 0.8vw;
    background: #fffdf8;
    overflow: hidden;
}

.auditLogDay summary {
    min-height: 6vh;
    padding: 1.2vh 1.2vw;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1vw;
    align-items: center;
    cursor: pointer;
    list-style: none;
    background: #fff6df;
}

.auditLogDay summary::-webkit-details-marker {
    display: none;
}

.auditLogDate {
    display: flex;
    align-items: center;
    gap: 0.8vw;
    min-width: 0;
}

.auditLogCaret {
    width: 1.5em;
    height: 1.5em;
    border-radius: 999vw;
    display: inline-grid;
    place-items: center;
    background: var(--ink);
    color: var(--go-yellow);
    font-size: 0.85em;
    flex: 0 0 auto;
}

.auditLogDay[open] .auditLogCaret {
    transform: rotate(90deg);
}

.auditLogDayTitle {
    font-weight: 900;
}

.auditLogCount {
    border-radius: 999vw;
    padding: 0.45vh 0.8vw;
    background: var(--ink);
    color: white;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}

.auditLogEntries {
    display: grid;
}

.auditLogEntry {
    display: grid;
    grid-template-columns: minmax(8vw, 11vw) minmax(9vw, 12vw) 1fr;
    gap: 1vw;
    padding: 1.2vh 1.2vw;
    border-top: 0.1vw solid var(--line);
    background: white;
}

.auditLogEntry:hover {
    background: #fffaf0;
}

.auditLogTime,
.auditLogAction,
.auditLogMeta {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.35;
}

.auditLogAction {
    font-weight: 900;
    color: var(--ink);
    word-break: break-word;
}

.auditLogDetails strong {
    display: block;
    margin-bottom: 0.35vh;
}

.auditLogMetadata {
    margin-top: 0.6vh;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
    word-break: break-word;
}

.auditLogEmpty {
    padding: 2vh 1.5vw;
    color: var(--muted);
    background: #fffdf8;
    border: 0.12vw solid var(--line);
    border-radius: 0.8vw;
}

#deletedItemsList {
    display: grid;
    gap: 1vh;
    max-height: 68vh;
    overflow-y: auto;
    padding-right: 0.5vw;
}

.deletedItemEntry {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(8vw, 0.7fr) auto;
    gap: 1vw;
    align-items: center;
    padding: 1.2vh 1.2vw;
    border: 0.12vw solid var(--line);
    border-radius: 0.8vw;
    background: #fffdf8;
}

.deletedItemEntry strong {
    display: block;
    margin-bottom: 0.35vh;
}

.deletedItemMeta {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
}

.deletedCountdown {
    display: inline-block;
    margin-top: 0.5vh;
    padding: 0.35vh 0.7vw;
    border-radius: 999vw;
    background: #fff6df;
    color: var(--danger);
    font-weight: 900;
}

.deletedItemActions {
    display: flex;
    gap: 0.6vw;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.deletedItemActions .restore-btn {
    background: var(--good);
    color: white;
}

.deletedItemActions .permanent-delete-btn {
    background: var(--danger);
    color: white;
}

.printOptionList,
.printSizeControl {
    display: grid;
    gap: 1vh;
    margin: 1.6vh 0;
}

.printOptionList label,
.printSizeControl label {
    display: flex;
    align-items: flex-start;
    gap: 0.8vw;
    padding: 1.1vh 1vw;
    border: 0.12vw solid var(--line);
    border-radius: 0.8vw;
    background: #fffdf8;
    font-weight: 800;
    cursor: pointer;
}

.printSizeControl {
    grid-template-columns: auto repeat(3, minmax(110px, 1fr));
    align-items: center;
}

.printSizeControl span {
    font-weight: 900;
    color: var(--ink);
}

.printSizeControl label {
    justify-content: center;
    padding: 0.9vh 1vw;
}

.printActionRow {
    display: flex;
    gap: 0.8vw;
    flex-wrap: wrap;
    margin: 1.4vh 0;
}

.printActionRow button {
    border-radius: 999vw;
    padding: 1vh 1.3vw;
    background: var(--ink);
    color: white;
    font-weight: 900;
}

.printActionRow button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.printSummaryBox {
    margin: 1vh 0;
    padding: 1.1vh 1vw;
    border: 0.12vw solid var(--line);
    border-radius: 0.8vw;
    background: #f8fafc;
    color: var(--muted);
    line-height: 1.4;
}

.printQualityNote {
    display: inline-block;
    margin-top: 0.4vh;
    color: var(--ink);
    font-weight: 800;
}

.printPreviewBox {
    margin-top: 1.4vh;
    border: 0.12vw solid var(--line);
    border-radius: 0.8vw;
    background: #f8fafc;
    padding: 1.2vh 1vw;
    position: relative;
}

.print-document {
    background: white;
    color: #111827;
    padding: 1.4vh 1.2vw;
    --print-preview-font-size: 12px;
    --print-font-size: 9px;
    --print-header-font-size: 14px;
    --print-meta-font-size: 8.5px;
    --print-count-font-size: 14px;
    --print-cell-padding: 2px 3px;
    --print-line-height: 1.15;
    font-size: var(--print-preview-font-size);
}

.print-size-small {
    --print-preview-font-size: 11px;
    --print-font-size: 11px;
    --print-header-font-size: 13px;
    --print-meta-font-size: 11px;
    --print-count-font-size: 13px;
    --print-cell-padding: 1px 2px;
    --print-line-height: 1.1;
}

.print-size-medium {
    --print-preview-font-size: 12px;
    --print-font-size: 12px;
    --print-header-font-size: 14px;
    --print-meta-font-size: 12px;
    --print-count-font-size: 14px;
    --print-cell-padding: 2px 3px;
    --print-line-height: 1.15;
}

.print-size-large {
    --print-preview-font-size: 13.5px;
    --print-font-size: 13.5px;
    --print-header-font-size: 16px;
    --print-meta-font-size: 13.5px;
    --print-count-font-size: 16px;
    --print-cell-padding: 3px 4px;
    --print-line-height: 1.2;
}

.print-doc-header {
    display: flex;
    justify-content: space-between;
    gap: 1.5vw;
    align-items: flex-start;
    margin-bottom: 1vh;
    border-bottom: 0.1vw solid #111827;
    padding-bottom: 0.8vh;
}

.print-table-scroll {
    max-height: 34vh;
    overflow: auto;
    border: 1px solid #d1d5db;
    border-radius: 0.5vw;
    background: white;
}

.print-doc-header h1 {
    margin: 0 0 0.35vh;
    font-size: 20px;
    line-height: 1.1;
}

.print-doc-header p {
    margin: 0.2vh 0;
    color: #374151;
}

.print-doc-count {
    text-align: right;
    min-width: 80px;
}

.print-doc-count strong {
    display: block;
    font-size: 22px;
}

.print-doc-count span {
    color: #374151;
    font-weight: 800;
}

.print-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

.print-table th,
.print-table td {
    font-size: inherit;
    border-right: 1px solid #d1d5db;
    border-bottom: 1px solid #d1d5db;
    padding: 4px 5px;
    text-align: left;
    vertical-align: top;
    word-break: break-word;
}

.print-table th {
    background: #eef2f7;
    font-weight: 900;
    position: sticky;
    top: 0;
    z-index: 2;
    box-shadow: 0 2px 0 #cbd5e1, 0 6px 12px rgba(15, 23, 42, 0.08);
}

.print-table thead {
    position: relative;
    z-index: 3;
}

.print-table tbody tr:first-child td {
    border-top: 0;
}

.print-table th:nth-child(1),
.print-table td:nth-child(1),
.print-table th:nth-child(2),
.print-table td:nth-child(2),
.print-table th:nth-child(6),
.print-table td:nth-child(6),
.print-table th:nth-child(7),
.print-table td:nth-child(7),
.print-table th:nth-child(8),
.print-table td:nth-child(8) {
    width: 8%;
}

.print-table th:nth-child(5),
.print-table td:nth-child(5) {
    width: 28%;
}

.print-page-footer {
    display: none;
}

@media (max-width: 1180px) {
    .app-shell {
        width: min(94vw, 1040px);
        padding: 2.5vh 0 4vh;
    }

    .hero-card,
    .panel {
        border-radius: 16px;
    }

    .hero-card {
        min-height: auto;
        padding: 2.5vh 3vw;
        align-items: flex-start;
        gap: 2vh;
    }

    h1 {
        font-size: clamp(34px, 6vw, 56px);
    }

    h2 {
        font-size: clamp(20px, 2.5vw, 26px);
    }

    .eyebrow,
    .subtitle,
    .panel p,
    .stat span,
    td,
    .markdown-note strong,
    .mini-btn,
    #userBtn,
    #currentUserName,
    .customUploadBtn {
        font-size: 16px;
    }

    th,
    .muted-small,
    .markdown-note span,
    .markdown-note em,
    .barcode-box span,
    .upc-text,
    .userBtnLabel {
        font-size: 13px;
    }

    button,
    select,
    .toggle-pill,
    .search-row input {
        min-height: 44px;
    }

    .input-grid {
        grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.55fr);
        gap: 18px;
    }

    .stats-panel {
        align-self: start;
    }

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

    .stat {
        min-height: 72px;
        padding: 14px;
        border-radius: 12px;
    }

    .stat strong {
        font-size: 30px;
    }

    .controls-panel,
    .table-header {
        align-items: flex-start;
    }

    .search-row {
        width: 100%;
        flex-wrap: wrap;
    }

    .search-row input {
        flex: 1 1 320px;
        width: auto;
    }

    .control-group {
        gap: 8px;
    }

    .control-group button,
    .batch-row button,
    .mini-btn {
        padding: 10px 12px;
    }

    .table-wrap {
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 1060px;
    }

    th,
    td {
        padding: 12px 10px;
    }

    .status-pill {
        min-width: 96px;
        font-size: 13px;
        padding: 8px 10px;
    }

    .desc-cell {
        min-width: 240px;
        max-width: 340px;
    }

    .markdown-note {
        min-width: 140px;
    }

    .table-actions {
        min-width: 150px;
    }

    .toggle-pill input,
    .row-check {
        width: 20px;
        height: 20px;
    }

    #topRightControls {
        position: static;
        flex-wrap: wrap;
        justify-content: flex-start;
        margin-top: 16px;
    }

    #userBtn img {
        width: 38px;
        height: 38px;
    }

    #currentUserName {
        max-width: 180px;
    }

    #userCreateControls {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    #userCreateControls label {
        grid-column: 1 / -1;
    }

    #userCreateControls button,
    #userCreateControls input,
    #userCreateControls select {
        min-height: 40px;
    }

    .permissionEditor {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }

    #settingsPopup {
        width: min(720px, 92vw);
        border-radius: 18px;
    }

    #userPopup {
        width: min(940px, 92vw);
        border-radius: 18px;
    }

    #settingsPopup input,
    #settingsPopup select {
        width: min(240px, 100%);
    }
}

@media (min-width: 1900px) and (min-height: 900px) {
    .app-shell {
        width: min(96vw, 2200px);
    }

    .table-panel table:not(.print-table) {
        width: 100%;
    }
}

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

    .app-shell {
        width: 94vw;
        padding-top: 16px;
    }

    .hero-card {
        flex-direction: column;
    }

    .today-card {
        width: 100%;
        border-radius: 14px;
        padding: 16px;
    }

    .today-card span,
    .today-card strong {
        font-size: 16px;
    }

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

    textarea {
        height: 220px;
        border-radius: 12px;
        padding: 14px;
    }

    .panel {
        padding: 18px;
    }

    .panel-header,
    .controls-panel,
    .table-header,
    .action-row,
    .search-row {
        align-items: stretch;
    }

    .panel-header,
    .table-header {
        flex-direction: column;
    }

    .stat-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .controls-title,
    .control-group,
    .search-row,
    .batch-row {
        width: 100%;
    }

    .control-group button,
    .batch-row button,
    .search-row select,
    .toggle-pill,
    #printBtn {
        flex: 1 1 auto;
    }

    .search-row input,
    .search-row select {
        width: 100%;
        flex-basis: 100%;
    }

    table {
        min-width: 980px;
    }

    #auditLogPopup,
    #deletedItemsPopup,
    #printOptionsPopup {
        width: 94vw;
        max-width: 94vw;
        padding: 18px;
        border-radius: 16px;
    }

    #topRightControls {
        z-index: 2;
    }

    #userBtn {
        z-index: auto;
    }

    body:has(#settingsOverlay[style*="display: block"]) #topRightControls,
    body:has(#auditLogOverlay[style*="display: block"]) #topRightControls,
    body:has(#deletedItemsOverlay[style*="display: block"]) #topRightControls,
    body:has(#printOptionsOverlay[style*="display: block"]) #topRightControls,
    body:has(#userPopupOverlay[style*="display: block"]) #topRightControls {
        display: none;
    }
}

@media (min-width: 561px) and (max-width: 820px) {
    .table-wrap {
        overflow-x: visible;
    }

    table:not(.print-table) {
        display: block;
        width: 100%;
        min-width: 0;
        margin-top: 12px;
        border-collapse: separate;
        border-spacing: 0;
    }

    table:not(.print-table) thead {
        display: none;
    }

    table:not(.print-table) tbody {
        display: grid;
        gap: 12px;
    }

    table:not(.print-table) tr {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        border: 1px solid var(--line);
        border-left: 5px solid var(--cool);
        border-radius: 14px;
        background: #fffdf8;
        overflow: hidden;
    }

    table:not(.print-table) tr.row-marked {
        box-shadow: inset 5px 0 0 #6d4c41;
    }

    table:not(.print-table) td {
        display: grid;
        width: auto !important;
        grid-template-columns: minmax(0, 1fr);
        align-content: start;
        gap: 4px;
        min-height: 0;
        padding: 10px 12px;
        border-bottom: 1px solid rgba(234, 223, 202, 0.75);
        font-size: 15px;
    }

    table:not(.print-table) td::before {
        color: #6b5a45;
        content: "";
        font-size: 11px;
        font-weight: 900;
        letter-spacing: 0;
        text-transform: uppercase;
    }

    table:not(.print-table) td:nth-child(1)::before { content: "Select"; }
    table:not(.print-table) td:nth-child(2)::before { content: "Status"; }
    table:not(.print-table) td:nth-child(3)::before { content: "UPC"; }
    table:not(.print-table) td:nth-child(4)::before { content: "Item #"; }
    table:not(.print-table) td:nth-child(5)::before { content: "Item"; }
    table:not(.print-table) td:nth-child(6)::before { content: "Dept"; }
    table:not(.print-table) td:nth-child(7)::before { content: "Qty"; }
    table:not(.print-table) td:nth-child(8)::before { content: "Retail"; }
    table:not(.print-table) td:nth-child(9)::before { content: "Expiry"; }
    table:not(.print-table) td:nth-child(10)::before { content: "Markdown"; }
    table:not(.print-table) td:nth-child(11)::before { content: "Actions"; }

    table:not(.print-table) td:nth-child(5),
    table:not(.print-table) td:nth-child(10),
    table:not(.print-table) td:nth-child(11) {
        grid-column: 1 / -1;
    }

    table:not(.print-table) td:nth-child(5) {
        font-size: 17px;
        font-weight: 900;
        word-break: break-word;
    }

    table:not(.print-table) td:nth-child(11) {
        display: grid;
    }

    table:not(.print-table) td:last-child {
        border-bottom: 0;
    }

    .table-action-stack {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .status-pill {
        min-width: 0;
        width: fit-content;
    }

    .desc-cell,
    .markdown-note,
    .table-actions {
        min-width: 0;
        max-width: none;
    }

    .qty-input {
        width: 5.2rem;
    }
}

@media (max-width: 850px) {
    #auditLogPopup {
        width: 94vw;
        padding: 2vh 4vw;
    }

    #deletedItemsPopup {
        width: 94vw;
        padding: 2vh 4vw;
    }

    #printOptionsPopup {
        width: 94vw;
        padding: 2vh 4vw;
    }

    .auditLogEntry {
        grid-template-columns: 1fr;
        gap: 0.5vh;
    }

    .auditLogTime,
    .auditLogAction,
    .auditLogMeta,
    .auditLogMetadata {
        font-size: 14px;
    }

    .auditLogCount {
        font-size: 12px;
    }

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

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

    .print-doc-header {
        display: block;
    }

    .print-doc-count {
        text-align: left;
        margin-top: 0.8vh;
    }

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

    .printSizeControl label {
        justify-content: flex-start;
    }
}

@media (max-width: 560px) {
    body {
        background: #fffaf0;
    }

    .app-shell {
        width: 100%;
        padding: 0 10px 24px;
    }

    .hero-card,
    .panel {
        border-radius: 0;
        border-left: none;
        border-right: none;
        box-shadow: none;
    }

    .hero-card {
        padding: 18px 14px;
        border-top-width: 8px;
    }

    h1 {
        font-size: 34px;
        line-height: 1.05;
    }

    .subtitle {
        font-size: 15px;
    }

    #loggedInUserLabel {
        display: none;
    }

    #topRightControls {
        gap: 8px;
        margin: 10px 0 12px;
    }

    #settingsBtn,
    #auditLogBtn,
    #superAdminBtn,
    #userBtn {
        min-height: 42px;
        padding: 8px 10px;
        font-size: 14px;
    }

    #userBtn {
        max-width: 100%;
    }

    #userBtn img {
        width: 32px;
        height: 32px;
    }

    #currentUserName {
        max-width: 130px;
        font-size: 14px;
    }

    .subtitle {
        margin-top: 8px;
        line-height: 1.25;
    }

    .paste-panel {
        display: none !important;
    }

    .stats-panel h2,
    .controls-title p,
    .table-header p {
        margin-bottom: 10px;
    }

    .stat-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .stat {
        min-height: 64px;
        padding: 10px;
        border-left-width: 6px;
    }

    .stat span {
        font-size: 13px;
    }

    .stat strong {
        font-size: 24px;
    }

    .controls-panel {
        gap: 14px;
    }

    .control-group {
        flex-wrap: wrap;
        overflow-x: visible;
        gap: 8px;
        padding-bottom: 0;
    }

    .control-group button {
        flex: 0 1 auto;
        white-space: nowrap;
        min-height: 40px;
        padding: 9px 12px;
    }

    .search-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .toggle-pill {
        display: none;
    }

    #printBtn {
        display: none !important;
    }

    .batch-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .batch-row button {
        min-height: 40px;
        padding: 9px 12px;
    }

    .table-panel {
        margin-top: 14px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .table-wrap {
        margin-left: -10px;
        margin-right: -10px;
        padding: 0 10px 8px;
        overflow-x: visible;
    }

    table {
        display: block;
        width: 100%;
        min-width: 0;
        margin-top: 10px;
        border-collapse: separate;
        border-spacing: 0;
    }

    thead {
        display: none;
    }

    tbody {
        display: grid;
        gap: 10px;
    }

    tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        border: 1px solid var(--line);
        border-left: 4px solid var(--cool);
        border-radius: 12px;
        background: #fffdf8;
        overflow: hidden;
    }

    tr.row-marked {
        box-shadow: inset 4px 0 0 #6d4c41;
    }

    td {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        align-content: start;
        gap: 3px;
        min-height: 0;
        padding: 7px 10px;
        border-bottom: 1px solid rgba(234, 223, 202, 0.75);
        font-size: 14px;
    }

    td::before {
        color: #6b5a45;
        content: "";
        font-size: 11px;
        font-weight: 900;
        letter-spacing: 0;
        text-transform: uppercase;
    }

    td:nth-child(5),
    td:nth-child(10),
    td:nth-child(11) {
        grid-column: 1 / -1;
    }

    td:nth-child(11) {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 6px;
    }

    td:nth-child(11)::before {
        flex: 0 0 100%;
    }

    td:nth-child(5) {
        font-size: 16px;
        font-weight: 900;
    }

    td:nth-child(1),
    td:nth-child(2) {
        align-items: center;
    }

    td:nth-child(2) {
        justify-items: start;
    }

    td:nth-child(1)::before { content: "Select"; }
    td:nth-child(2)::before { content: "Status"; }
    td:nth-child(3)::before { content: "UPC"; }
    td:nth-child(4)::before { content: "Item #"; }
    td:nth-child(5)::before { content: "Item"; }
    td:nth-child(6)::before { content: "Dept"; }
    td:nth-child(7)::before { content: "Qty"; }
    td:nth-child(8)::before { content: "Retail"; }
    td:nth-child(9)::before { content: "Expiry"; }
    td:nth-child(10)::before { content: "Markdown"; }
    td:nth-child(11)::before { content: "Actions"; }

    td:last-child {
        border-bottom: 0;
    }

    td:nth-last-child(2) {
        border-bottom: 1px solid rgba(234, 223, 202, 0.75);
    }

    .status-pill {
        min-width: 0;
        width: fit-content;
        padding: 7px 12px;
    }

    .desc-cell {
        min-width: 0;
        max-width: none;
        word-break: break-word;
    }

    .markdown-note {
        min-width: 0;
        gap: 2px;
    }

    .markdown-note strong {
        font-size: 14px;
    }

    .markdown-note span,
    .markdown-note em {
        font-size: 12px;
    }

    .table-actions {
        min-width: 0;
    }

    .table-action-stack {
        display: contents;
    }

    .mini-btn {
        display: inline-block;
        width: auto;
        margin: 3px 4px 3px 0;
        padding: 8px 10px;
        min-height: 34px;
        font-size: 13px;
    }

    .qty-input {
        width: 72px;
    }

    #userPopup,
    #settingsPopup,
    #auditLogPopup,
    #deletedItemsPopup,
    #printOptionsPopup {
        width: 100vw;
        max-width: 100vw;
        min-height: 100vh;
        max-height: none;
        margin: 0;
        padding: 18px 14px 28px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    #settingsOverlay {
        overflow-x: hidden;
    }

    #settingsPopup {
        width: 100%;
        min-width: 0;
        overflow-x: hidden;
    }

    #settingsPopup label {
        display: grid;
        grid-template-columns: 1fr;
        gap: 6px;
        max-width: 100%;
    }

    #settingsPopup input,
    #settingsPopup select {
        width: 100%;
        max-width: 100%;
    }

    #settingsPopup button {
        max-width: 100%;
        margin: 4px 0;
        white-space: normal;
    }

    #userList,
    #auditLogList,
    #deletedItemsList {
        max-height: none;
        overflow: visible;
    }

    .userManagerCurrent {
        position: static;
        margin-bottom: 0.5rem;
        flex-wrap: wrap;
    }

    .userManagerHeaderActions {
        position: static;
        flex-wrap: wrap;
        max-width: 100%;
        margin: 0 0 0.5rem;
    }

    #userPopup h2 {
        padding-right: 0;
    }

    .userCardHeader,
    .userCardNameRow,
    .userCardActions {
        align-items: flex-start;
    }

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

    .auditLogHeader,
    .deletedItemsHeader,
    .printOptionsHeader {
        display: grid;
        grid-template-columns: 1fr auto;
    }

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

    .deletedItemEntry,
    .auditLogEntry {
        grid-template-columns: 1fr;
    }

    .printPreviewBox {
        display: none;
    }
}

@media print {
    @page {
        margin: 0.25in;
    }

    html,
    body {
        width: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        background: white !important;
    }

    body > *:not(#printOptionsOverlay) {
        display: none !important;
    }

    #printOptionsOverlay {
        display: block !important;
        position: static !important;
        inset: auto !important;
        background: transparent !important;
        overflow: visible !important;
    }

    #printOptionsOverlay * {
        visibility: visible !important;
    }

    #printOptionsPopup {
        position: static !important;
        width: auto !important;
        max-width: none !important;
        max-height: none !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        overflow: visible !important;
    }

    .printOptionsHeader,
    .printOptionList,
    .printActionRow,
    .printSummaryBox {
        display: none !important;
    }

    #printPreview {
        display: block !important;
        position: static !important;
        max-height: none !important;
        overflow: visible !important;
        border: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        background: white !important;
    }

    .print-document {
        display: block !important;
        padding: 0 !important;
        font-size: var(--print-font-size) !important;
        break-before: avoid !important;
        page-break-before: avoid !important;
    }

    .print-table-scroll {
        max-height: none !important;
        overflow: visible !important;
        border: 0 !important;
        border-radius: 0 !important;
    }

    .print-doc-header {
        break-after: avoid;
        page-break-after: avoid;
        border-bottom: 1px solid #111827 !important;
        margin-bottom: 0.08in !important;
        padding-bottom: 0.05in !important;
    }

    .print-doc-header h1 {
        font-size: var(--print-header-font-size) !important;
    }

    .print-doc-header p {
        font-size: var(--print-meta-font-size) !important;
        margin: 0.01in 0 !important;
    }

    .print-doc-count strong {
        font-size: var(--print-count-font-size) !important;
    }

    .print-table {
        page-break-inside: auto;
    }

    .print-table thead {
        display: table-header-group;
    }

    .print-table tr {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .print-table th,
    .print-table td {
        font-size: inherit !important;
        padding: var(--print-cell-padding) !important;
        border-color: #a8b0bd !important;
        line-height: var(--print-line-height) !important;
    }

    .print-table th {
        position: static !important;
        box-shadow: none !important;
    }

    .print-page-footer {
        display: none !important;
    }
}

@media print and (orientation: portrait) {
    .print-size-small {
        --print-font-size: 8px;
        --print-meta-font-size: 8px;
        --print-header-font-size: 13px;
        --print-count-font-size: 13px;
        --print-cell-padding: 1px 2px;
        --print-line-height: 1.1;
    }

    .print-size-medium {
        --print-font-size: 9px;
        --print-meta-font-size: 8.5px;
        --print-header-font-size: 14px;
        --print-count-font-size: 14px;
        --print-cell-padding: 2px 3px;
        --print-line-height: 1.15;
    }

    .print-size-large {
        --print-font-size: 10.5px;
        --print-meta-font-size: 9.5px;
        --print-header-font-size: 16px;
        --print-count-font-size: 16px;
        --print-cell-padding: 3px 4px;
        --print-line-height: 1.2;
    }
}

.stat-click {
  cursor: pointer;
}

.stat-click:hover {
  transform: translateY(-0.2vh);
  opacity: 0.88;
}
