@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@600;700&display=swap");
:root {
  color-scheme: light;
  --bg: #f5f5f5;
  --surface: #ffffff;
  --soft: #f3f3f3;
  --line: #d4d4d4;
  --text: #222222;
  --muted: #666666;
  --accent: #8f1d2c;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #181818;
  --surface: #242424;
  --soft: #303030;
  --line: #4b4b4b;
  --text: #f2f2f2;
  --muted: #bcbcbc;
  --accent: #dc6a7a;
}
* {
  box-sizing: border-box;
}
html {
  min-width: 320px;
}
body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
}
img {
  max-width: 100%;
}
a {
  color: var(--accent);
}
.rise,
.rise-1,
.rise-2,
.rise-3 {
  animation: fade 0.25s ease;
}
@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.topnav {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 6px 18px 3px rgba(0, 0, 0, 0.16);
}
.nav-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  max-width: 1120px;
  min-height: 62px;
  margin: 0 auto;
  padding: 0 1.2rem;
}
.ll-wordmark {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: fit-content;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 1.2rem;
  font-weight: bold;
}
.ll-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: bold;
}
.nav-list {
  display: flex;
  gap: 0.55rem;
}
.nav-btn {
  min-height: 36px;
  padding: 0.45rem 0.75rem;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 0.88rem;
  transition: 0.5s;
}
.nav-btn:hover {
  background: var(--soft);
  color: var(--text);
  transform: scale(1.1);
}
.nav-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  font-weight: bold;
}
.theme-btn {
  display: grid;
  place-items: center;
  justify-self: end;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  font-size: 1.05rem;
  transition: 0.4s;
}
.theme-btn span {
  display: block;
  line-height: 1;
  transform: rotate(45deg);
}
.theme-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(1.05);
}
.theme-btn:focus-visible,
.nav-btn:focus-visible,
.ll-wordmark:focus-visible,
.btn:focus-visible,
.dropzone:focus-within,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(143, 29, 44, 0.22);
  outline-offset: 2px;
}
.main {
  max-width: 1120px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 96px 1.2rem 4rem;
}
.home-hero {
  padding: 4rem 3.5rem;
  border: 3px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(
      to bottom right,
      #ffffff 8%,
      rgba(255, 255, 255, 0.94) 42%,
      rgba(255, 255, 255, 0.22) 100%
    ),
    url("receipts-bg.png") center / cover;
}
html[data-theme="dark"] .home-hero {
  background:
    linear-gradient(
      to bottom right,
      #242424 8%,
      rgba(36, 36, 36, 0.95) 45%,
      rgba(36, 36, 36, 0.35) 100%
    ),
    url("receipts-bg.png") center / cover;
}
.home-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  align-items: center;
  gap: 4rem;
}
.ll-home-copy {
  max-width: 650px;
}
.ll-home-copy h1 {
  margin: 0 0 1.2rem;
  font-family: "Poppins", Arial, sans-serif;
  font-size: clamp(3.2rem, 6vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-shadow: 3px 3px 3px #d58a9c;
}
.ll-home-copy h1 span {
  color: var(--accent);
  text-shadow: 3px 3px 3px #8d8a8a;
}
.ll-home-copy h2 {
  max-width: 590px;
  margin: 0 0 1.7rem;
  color: var(--muted);
  font-size: 1.12rem;
  font-weight: normal;
  line-height: 1.65;
}
.hero-btn {
  min-width: 195px;
}
.ll-receipt-wrap {
  width: min(100%, 285px);
  margin: 0 auto;
  transform: rotate(3deg);
}
.ll-receipt-pin {
  display: none;
}
.ll-home-receipt {
  padding: 1.55rem;
  border: 3px solid #cccccc;
  border-radius: 9px;
  background: #ffffffb0;
  color: #222222;
  box-shadow: 0 7px 16px rgba(0, 0, 0, 0.12);
  transition: 0.2s ease;
}
.ll-home-receipt:hover {
  transform: translateY(-9px);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.22);
}
.ll-receipt-store {
  margin-bottom: 0.25rem;
  font-size: 1.15rem;
  font-weight: bold;
}
.ll-receipt-meta {
  margin-bottom: 1rem;
  color: #666666;
  font-size: 0.82rem;
}
.ll-receipt-line,
.ll-receipt-total {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.ll-receipt-line {
  padding: 0.45rem 0;
  border-bottom: 1px solid #dddddd;
  font-size: 0.9rem;
}
.ll-receipt-total {
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 2px solid #333333;
  font-size: 1rem;
  font-weight: bold;
}
.ll-receipt-note {
  margin-top: 0.9rem;
  color: #2e7d32;
  font-size: 0.85rem;
  font-weight: bold;
  text-align: right;
}
.ll-home-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.3rem;
}
.ll-home-stat {
  padding: 1.25rem;
  border: 3px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  transition: 0.15s ease;
}
.ll-home-stat:hover {
  transform: translateY(-2px);
}
.ll-home-stat:nth-child(1) {
  background: #edf0ff;
  border-color: #cfd5f8;
}
.ll-home-stat:nth-child(2) {
  background: #e8f4e9;
  border-color: #bddbbf;
}
.ll-home-stat:nth-child(3) {
  background: #fff3c4;
  border-color: #e7cf6e;
}
html[data-theme="dark"] .ll-home-stat:nth-child(1) {
  background: #2d3042;
  border-color: #515777;
}
html[data-theme="dark"] .ll-home-stat:nth-child(2) {
  background: #233828;
  border-color: #3f6748;
}
html[data-theme="dark"] .ll-home-stat:nth-child(3) {
  background: #40371e;
  border-color: #6d5d2e;
}
.ll-home-stat .value {
  display: block;
  color: var(--text);
  font-size: 1.9rem;
  font-weight: bold;
}
.ll-home-stat:nth-child(2) .value {
  color: #2e7d32;
}
.ll-home-stat:nth-child(3) .value {
  color: #8a6500;
}
html[data-theme="dark"] .ll-home-stat:nth-child(2) .value {
  color: #80cf86;
}
html[data-theme="dark"] .ll-home-stat:nth-child(3) .value {
  color: #ebc95c;
}
.ll-home-stat .label {
  color: var(--muted);
  font-size: 0.9rem;
}
.ll-page-head {
  margin-bottom: 1.5rem;
}
.ll-page-title {
  margin-bottom: 0.4rem;
  font-size: 2.35rem;
  font-weight: bold;
}
.ll-page-sub {
  max-width: 720px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}
.page-top {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 1rem;
}
.ll-rule {
  margin: 1.6rem 0 0.8rem;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: bold;
}
.ll-rule::after,
.upload-workspace::before,
.ll-upload-help span::before,
.ll-status::before {
  display: none;
}
.upload-workspace {
  padding: 1.5rem;
  border: 3px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.7rem;
}
.ll-upload-copy h3 {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
}
.ll-upload-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.ll-upload-help {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.8rem 0 1rem;
}
.ll-upload-help span {
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
  color: var(--muted);
  font-size: 0.76rem;
}
.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.dropzone {
  display: flex;
  min-height: 165px;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  border: 2px dashed #aaaaaa;
  border-radius: 10px;
  background: var(--soft);
  color: var(--muted);
  text-align: center;
  cursor: pointer;
}
.dropzone:hover,
.dropzone.drag {
  border-color: var(--accent);
  background: #f8ecee;
}
html[data-theme="dark"] .dropzone:hover,
html[data-theme="dark"] .dropzone.drag {
  background: #38262a;
}
.dropzone-inner {
  display: grid;
  justify-items: center;
  gap: 0.4rem;
}
.dropzone-inner b {
  color: var(--text);
}
.choose-btn {
  margin-top: 0.35rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--surface);
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: bold;
}
.upload-actions {
  margin-top: 0.9rem;
}
.upload-note {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}
.ll-empty-preview {
  display: flex;
  min-height: 285px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
  text-align: center;
}
.ll-empty-icon {
  position: relative;
  width: 54px;
  height: 67px;
  margin-bottom: 0.9rem;
  border: 2px solid #aaaaaa;
  border-radius: 5px;
  background: var(--surface);
}
.ll-empty-icon::before {
  content: "";
  position: absolute;
  top: 16px;
  right: 9px;
  left: 9px;
  height: 2px;
  background: #aaaaaa;
  box-shadow:
    0 11px 0 #aaaaaa,
    0 22px 0 #aaaaaa;
}
.ll-empty-icon::after {
  content: "+";
  position: absolute;
  right: -9px;
  bottom: -9px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  font-weight: bold;
}
.ll-empty-preview b {
  font-size: 0.95rem;
}
.ll-empty-preview p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}
.preview-card img {
  box-shadow: none;
}
.ll-file-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  padding-top: 0.55rem;
  color: var(--muted);
  font-size: 0.78rem;
}
.ll-field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 0.55rem 0 1rem;
}
.ll-field-grid-single {
  grid-template-columns: 1fr;
}
.ll-field {
  min-width: 0;
  min-height: 76px;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.ll-field:hover {
  background: var(--soft);
}
.ll-field-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: bold;
  text-transform: uppercase;
}
.ll-field-value {
  overflow: hidden;
  color: var(--text);
  font-size: 0.94rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ll-field-value.money {
  font-weight: bold;
}
.ll-pill,
.ll-status {
  display: inline-block;
  padding: 0.18rem 0.42rem;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: bold;
}
.ll-status {
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
}
.ll-pill.hi,
.ll-status.ok {
  border-color: #8dbd91;
  background: #e8f4e9;
  color: #2e7d32;
}
.ll-pill.mid,
.ll-status.pending {
  border-color: #e2c55c;
  background: #fff3c4;
  color: #806000;
}
.ll-pill.lo,
.ll-status.bad {
  border-color: #e4aaa5;
  background: #fdebea;
  color: #b42318;
}
html[data-theme="dark"] .ll-pill.hi,
html[data-theme="dark"] .ll-status.ok {
  border-color: #4b7952;
  background: #233828;
  color: #86d18c;
}
html[data-theme="dark"] .ll-pill.mid,
html[data-theme="dark"] .ll-status.pending {
  border-color: #75632d;
  background: #40371e;
  color: #ebc95c;
}
html[data-theme="dark"] .ll-pill.lo,
html[data-theme="dark"] .ll-status.bad {
  border-color: #75443f;
  background: #442522;
  color: #f18a81;
}
.ll-banner {
  margin: 0.55rem 0 1rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}
.ll-banner b {
  color: var(--text);
}
.ll-banner.ok {
  border-color: #8dbd91;
  background: #e8f4e9;
}
.ll-banner.pending {
  border-color: #e2c55c;
  background: #fff3c4;
}
.ll-banner.bad {
  border-color: #e4aaa5;
  background: #fdebea;
}
.ll-banner.bad b {
  color: #b42318;
}
html[data-theme="dark"] .ll-banner.ok {
  border-color: #4b7952;
  background: #233828;
}
html[data-theme="dark"] .ll-banner.pending {
  border-color: #75632d;
  background: #40371e;
}
html[data-theme="dark"] .ll-banner.bad {
  border-color: #75443f;
  background: #442522;
}
.mono,
.ll-banner .mono {
  font-family: Arial, Helvetica, sans-serif;
}
.ll-table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.ll-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  font-size: 0.88rem;
}
.ll-table th {
  padding: 0.7rem;
  border-bottom: 1px solid var(--line);
  background: var(--accent);
  color: #ffffff;
  font-size: 0.72rem;
  text-align: left;
  text-transform: uppercase;
}
.ll-table td {
  padding: 0.7rem;
  border-top: 1px solid var(--line); 
}
.ll-table tbody tr:hover {
  background: var(--soft);
}
.ll-table tr:last-child td {
  border-bottom: 0;
}
.ll-table td.num {
  text-align: right;
}
.ll-table td.money {
  font-weight: bold;
}
.review-count {
  margin-bottom: 1rem;
}
.review-list {
  display: grid;
  gap: 0.8rem;
}
.review-item {
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  transition: 0.4s;
}
.review-item summary {
  padding: 0.9rem;
  font-weight: bold;
  cursor: pointer;
}
.review-item[open] summary {
  border-bottom: 1px solid var(--line);
  background: var(--accent);
  color: #ffffff;
  transition: 0.4s;
}
.review-body {
  padding: 1rem;
}
.review-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1.4rem;
}
.correction-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
}
.other-fields {
  margin-top: 0.6rem;
}
.other-fields summary {
  padding: 0.6rem 15px;
  color: var(--text2);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 20px;
  margin-top: 20px;
}
.other-fields summary:hover {
  color: var(--line);
  transform: scale(1.005);
}
.ll-correction-label {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: bold;
  text-transform: uppercase;
}
.ll-correction-value {
  padding-top: 0.3rem;
  font-size: 0.9rem;
  word-break: break-word;
}
.ll-correction-help {
  padding-top: 0.25rem;
  color: var(--muted);
  font-size: 0.76rem;
}
.form-row {
  display: grid;
  gap: 0.4rem;
  margin-top: 1rem;
}
.form-row label {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: bold;
}
.text-input {
  width: 100%;
  min-height: 40px;
  padding: 0.55rem 0.65rem;
  border: 1px solid #aaaaaa;
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
}
.text-input:focus {
  border-color: var(--accent);
  outline: 2px solid rgba(143, 29, 44, 0.2);
}
.review-actions {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 0.7rem;
  margin-top: 1rem;
}
.review-actions .btn.primary {
  border-color: #2e7d32;
  background: #2e7d32;
}
.review-actions .btn.secondary {
  border-color: #d99994;
  background: #fdebea;
  color: #b42318;
}
.review-actions .btn.secondary:not(:disabled):hover {
  background: #b42318;
  color: #ffffff;
}
.ll-summary-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.7rem;
  margin: 0.35rem 0 1.4rem;
}
.ll-summary-item {
  min-width: 0;
  padding: 0.95rem;
  border: 2px solid var(--line);
  border-radius: 9px;
}
.ll-summary-item:nth-child(1),
.ll-summary-item:nth-child(2) {
  background: #e8f4e9;
  border-color: #bddbbf;
}
.ll-summary-item:nth-child(3) {
  background: #fff3c4;
  border-color: #e7cf6e;
}
.ll-summary-item:nth-child(4) {
  background: #fdebea;
  border-color: #e8b6b1;
}
.ll-summary-item:nth-child(5) {
  background: #edf0ff;
  border-color: #cfd5f8;
}
html[data-theme="dark"] .ll-summary-item:nth-child(1),
html[data-theme="dark"] .ll-summary-item:nth-child(2) {
  background: #233828;
  border-color: #3f6748;
}
html[data-theme="dark"] .ll-summary-item:nth-child(3) {
  background: #40371e;
  border-color: #6d5d2e;
}
html[data-theme="dark"] .ll-summary-item:nth-child(4) {
  background: #442522;
  border-color: #75443f;
}
html[data-theme="dark"] .ll-summary-item:nth-child(5) {
  background: #2d3042;
  border-color: #515777;
}
.ll-summary-value {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 1.12rem;
  font-weight: bold;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ll-summary-item:nth-child(1) .ll-summary-value,
.ll-summary-item:nth-child(2) .ll-summary-value {
  color: var(--text);
}
.ll-summary-item:nth-child(3) .ll-summary-value {
  color: var(--text);
}
.ll-summary-item:nth-child(4) .ll-summary-value {
  color: var(--text);
}
.ll-summary-label {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.76rem;
}
.records-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.records {
  min-width: 800px;
}
.records-head,
.records-row {
  display: grid;
  grid-template-columns: 1.7fr 1.25fr 2.3fr 1.35fr 1.65fr 0.85fr;
  gap: 0.7rem;
  align-items: start;
}
.records-head {
  padding: 0.8rem;
  background: var(--accent);
}
.records-row {
  padding: 0.65rem 0.8rem;
}
.records-row:hover {
  background: var(--soft);
}
.ll-row-text,
.ll-money-cell {
  padding-top: 0.35rem;
  font-size: 0.9rem;
  line-height: 1.45;
}
.ll-row-text .mono {
  color: var(--muted);
  font-size: 0.88rem;
}
.ll-money-cell {
  font-weight: bold;
}
.ll-col-head {
  color: #fcf3f3;
  font-size: 0.72rem;
  font-weight: bold;
  text-transform: uppercase;
}
.ll-records-line {
  margin: 0;
  border-top: 1px solid var(--line);
}
.detail {
  margin: 0 0.8rem 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 9px;
  background: var(--soft);
}
.detail-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 1.4rem;
}
.ll-doc-img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 420px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.caption {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}
.btn {
  min-height: 40px;
  padding: 0.55rem 0.85rem;
  border-radius: 7px;
  font-size: 0.88rem;
  font-weight: bold;
  transition: 0.15s ease;
}
.btn.primary {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #ffffff;
  transition: 0.4s;
}
.btn.primary:not(:disabled):hover {
  filter: brightness(0.88);
  transform: scale(1.05);
}
.btn.secondary {
  border: 1px solid #aaaaaa;
  background: var(--surface);
  color: var(--text);
  transition: 0.4s;
}
.btn.secondary:not(:disabled):hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(1.05);
}
.btn:disabled {
  opacity: 0.5;
}
.btn:disabled:hover {
  transform: none;
  filter: none;
  box-shadow: none;
}
.btn.full {
  width: 100%;
}
.btn.small {
  min-height: 34px;
  padding: 0.35rem 0.6rem;
  font-size: 0.8rem;
}
#reload {
  min-width: 38px;
  border-radius: 6px;
  font-size: 1rem;
}
.loader {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 0;
  color: var(--muted);
}
.loader::before {
  content: "";
  width: 15px;
  height: 15px;
  border: 2px solid #aaaaaa;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 1.2rem;
  z-index: 200;
  max-width: min(90vw, 420px);
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%);
}
.toast.show {
  opacity: 1;
}
.no-js {
  max-width: 500px;
  margin: 7rem auto;
  padding: 1rem;
  text-align: center;
}
.batch-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 0.6rem;
  max-height: 340px;
  overflow-y: auto;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--soft);
}
.batch-thumb {
  position: relative;
  margin: 0;
}
.batch-thumb img {
  display: block;
  width: 100%;
  height: 78px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}
.batch-thumb figcaption {
  overflow: hidden;
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 0.7rem;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.batch-drop {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid #b42318;
  border-radius: 50%;
  background: var(--surface);
  color: #b42318;
  font-size: 0.7rem;
  font-weight: bold;
}
.batch-drop:hover {
  background: #b42318;
  color: #ffffff;
}
.batch-progress {
  margin: 0.55rem 0 0.9rem;
}
.batch-progress-bar {
  height: 9px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
}
.batch-progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
  transition: width 0.25s;
}
.batch-progress-text {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}
.batch-why {
  color: var(--muted);
  font-size: 0.76rem;
}
.batch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.9rem;
}
.batch-more {
  width: 29px;
  height: 29px;
  padding: 2.5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font-size: 20px;
}
.batch-more:hover,
.batch-more.open {
  border-color: var(--accent);
  color: var(--accent);
}
.batch-more.open {
  transform: rotate(90deg);
}
.batch-detail > td {
  max-width: 0;
  padding: 0 !important;
  background: var(--soft);
}
.batch-detail-in {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: 1rem;
}
.batch-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 1.4rem;
  min-width: 0;
}
.batch-detail-grid > div {
  min-width: 0;
}
.batch-detail-grid .ll-doc-img {
  max-height: 330px;
}
.batch-detail-in .ll-table-wrap {
  overflow-x: auto;
}
@media (max-width: 850px) {
  .home-grid,
  .upload-grid,
  .review-grid,
  .detail-grid,
  .batch-detail-grid {
    grid-template-columns: 1fr;
  }
  .ll-summary-strip {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 640px) {
  .main {
    padding-top: 84px;
  }
  .nav-inner {
    gap: 0.35rem;
    padding: 0 0.65rem;
  }
  .ll-brand-text {
    display: none;
  }
  .nav-list {
    gap: 0.35rem;
  }
  .nav-btn {
    padding: 0.35rem 0.42rem;
    font-size: 0.74rem;
  }
  .theme-btn {
    width: 32px;
    height: 32px;
  }
  .home-hero {
    padding: 2rem 1.3rem;
  }
  .ll-home-copy h1 {
    font-size: 2.55rem;
  }
  .ll-home-stats,
  .ll-summary-strip,
  .ll-field-grid {
    grid-template-columns: 1fr;
  }
  .correction-row,
  .review-actions,
  .page-top {
    grid-template-columns: 1fr;
  }
  .review-actions span {
    display: none;
  }
  .ll-file-meta {
    flex-direction: column;
    gap: 0.2rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
.ll-flag-info {
  min-width: 0;
}

.ll-flag-meta {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.ll-flag-reason {
  display: grid;
  gap: 0.25rem;
  margin-top: 0.65rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid #e7cf6e;
  border-radius: 7px;
  background: #fff3c4;
  color: #5f4900;
  font-size: 0.82rem;
  line-height: 1.45;
}

.ll-flag-reason strong {
  font-size: 0.7rem;
  text-transform: uppercase;
}

html[data-theme="dark"] .ll-flag-reason {
  border-color: #6d5d2e;
  background: #40371e;
  color: #f0d979;
}
