:root {
  color-scheme: dark;
  --bg: #151816;
  --panel: #1e2520;
  --line: #354139;
  --text: #f0f2e9;
  --muted: #a2ada4;
  --green: #cbf3c0;
  --danger: #ffb3a6;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  min-height: 100svh;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select,
label[role='button'] {
  -webkit-tap-highlight-color: transparent;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
label:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 5px;
}
.shell {
  width: min(100% - 48px, 500px);
  margin: auto;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
header {
  display: flex;
  justify-content: center;
  padding: 68px 0 48px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 34px;
  font-weight: 750;
  letter-spacing: -1.6px;
}
.brand-dot {
  color: var(--green);
}
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: 24px;
}
.drop-zone {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  transition:
    background 0.2s,
    border-color 0.2s;
}
.drop-zone.dragging {
  background: #253626;
  border-color: var(--green);
}
.drop-target {
  min-height: 270px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 13px;
  cursor: pointer;
  padding: 35px 20px;
  text-align: center;
}
.drop-icon {
  width: 50px;
  height: 60px;
  color: var(--green);
  margin-bottom: 10px;
}
.drop-icon svg {
  width: 100%;
  height: 100%;
}
.drop-note {
  color: var(--muted);
  font-size: 10px;
  margin: 16px 0 0;
}
.drop-target .muted {
  font-size: 13px;
}
.drop-title {
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.8px;
}
.text-link {
  color: var(--green);
  border-bottom: 1px solid #829c7a;
}
.muted {
  color: var(--muted);
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
footer {
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  padding: 28px 0 34px;
  letter-spacing: 0.15px;
}
.status {
  min-height: 20px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  margin: 18px 0 0;
}
.status.error,
.error {
  color: var(--danger);
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px;
}
.file-row {
  display: flex;
  align-items: center;
  gap: 15px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.file-icon {
  width: 48px;
  height: 54px;
  flex-shrink: 0;
  border: 1px solid #526455;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: var(--green);
  font-size: 22px;
}
.file-info {
  min-width: 0;
  flex: 1;
}
.file-glyph {
  width: 34px;
  height: 42px;
}
.file-icon.has-thumbnail {
  width: 68px;
  height: 68px;
  overflow: hidden;
  border-color: var(--line);
}
.file-icon.has-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.receipt-file,
.shared-file {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 18px 0;
}
.shared-file h1 {
  min-width: 0;
  overflow-wrap: anywhere;
  margin: 0;
}
.file-name {
  font-weight: 700;
  overflow-wrap: anywhere;
  margin: 0 0 5px;
}
.file-size {
  font-size: 13px;
  color: var(--muted);
}
.change-file {
  display: block;
  border: 0;
  background: transparent;
  color: var(--green);
  padding: 8px 0 0;
  font-size: 12px;
  cursor: pointer;
}
.icon-button {
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 8px;
  cursor: pointer;
  font-size: 22px;
}
.form-grid {
  display: grid;
  gap: 22px;
  padding: 24px 0;
}
.field {
  display: grid;
  gap: 9px;
  font-size: 12px;
}
.field input,
.field select,
.search-input {
  width: 100%;
  border: 1px solid #3c473f;
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  padding: 12px;
  min-height: 46px;
}
.field input::placeholder {
  color: #7d8a80;
}
.field small {
  color: var(--muted);
  line-height: 1.5;
}
.toggle-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 12px;
  line-height: 1.5;
  cursor: pointer;
}
.toggle-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
  margin-top: 2px;
  flex-shrink: 0;
}
.toggle-row small {
  display: block;
  color: var(--muted);
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 12px 20px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: var(--green);
  color: #1a271b;
  font-weight: 700;
  cursor: pointer;
}
.button:hover {
  background: #e0fad9;
}
.button:disabled {
  cursor: wait;
  opacity: 0.55;
}
.button.full {
  width: 100%;
}
.button.secondary {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}
.button.secondary:hover {
  background: #28312a;
}
.button.danger {
  background: #3f2925;
  color: var(--danger);
  border-color: #654038;
}
.small-note {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  text-align: center;
  margin: 15px 0 0;
}
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.actions > * {
  flex: 1;
}
h1 {
  font-size: 27px;
  letter-spacing: -0.7px;
  margin: 0 0 12px;
}
h2 {
  font-size: 18px;
  margin: 0 0 18px;
}
p {
  line-height: 1.6;
}
.eyebrow {
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--green);
  margin: 0 0 12px;
}
.receipt-head {
  margin-bottom: 25px;
}
.link-row {
  margin: 20px 0;
}
.link-label {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
  display: block;
}
.link-box {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.link-box input {
  flex: 1;
  width: 0;
  border: 0;
  padding: 13px;
  background: var(--bg);
  font-size: 12px;
  color: var(--muted);
  font-family: ui-monospace, monospace;
}
.copy-button {
  background: #29372b;
  color: var(--green);
  border: 0;
  border-left: 1px solid var(--line);
  cursor: pointer;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
}
.private-link {
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
.badge {
  display: inline-block;
  border: 1px solid var(--line);
  padding: 5px 9px;
  border-radius: 6px;
  font-size: 11px;
  margin: 0 5px 8px 0;
  color: var(--muted);
}
progress {
  width: 100%;
  height: 8px;
  accent-color: var(--green);
  margin: 20px 0;
}
.preview-image {
  display: block;
  max-width: 100%;
  max-height: 450px;
  width: 100%;
  object-fit: contain;
  background: var(--bg);
  margin: 18px auto 24px;
  border-radius: 8px;
}
.preview-text {
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 400px;
  background: #121612;
  padding: 18px;
  font-size: 13px;
  line-height: 1.5;
}
.admin-shell {
  width: min(100% - 40px, 1080px);
}
.admin-shell header {
  padding: 36px 0;
  justify-content: space-between;
}
.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 20px 0;
}
.admin-toolbar input {
  flex: 1;
  min-width: 180px;
}
.stats {
  display: flex;
  gap: 24px;
  font-size: 14px;
  color: var(--muted);
  margin: 18px 0;
}
.table-scroll {
  overflow: auto;
}
table {
  min-width: 700px;
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}
th {
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
}
th,
td {
  padding: 17px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
td .button {
  min-height: 34px;
  font-size: 12px;
  padding: 7px 12px;
}
.table-name {
  display: block;
  font-weight: 700;
  max-width: 280px;
  overflow-wrap: anywhere;
}
.table-detail {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 7px;
  max-width: 280px;
  overflow-wrap: anywhere;
}
.empty {
  text-align: center;
  color: var(--muted);
  padding: 35px;
}
@media (max-width: 600px) {
  header {
    padding: 48px 0 36px;
  }
  .card {
    padding: 22px;
  }
  .drop-target {
    min-height: 240px;
  }
  .brand {
    font-size: 30px;
  }
  footer {
    padding: 35px 0 26px;
  }
  .admin-shell {
    width: calc(100% - 24px);
  }
  .admin-shell .card {
    padding: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

[hidden] {
  display: none !important;
}
.file-name {
  font-size: 16px;
  letter-spacing: -0.3px;
}
.file-icon {
  border-radius: 6px;
}
.file-icon.has-thumbnail {
  width: 64px;
  height: 72px;
}
.upload-settings {
  grid-template-columns: 1fr 1fr;
  gap: 22px 16px;
}
.upload-settings .toggle-row {
  grid-column: 1 / -1;
}
.upload-settings .field {
  color: var(--muted);
  font-size: 12px;
  align-content: start;
}
.upload-settings .field small {
  font-size: 10px;
}
.upload-submit {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
.upload-submit > span {
  font-size: 10px;
}
.button {
  font-size: 13px;
}
.share-card .shared-file h1 {
  font-size: 20px;
  letter-spacing: -0.4px;
}
.share-card .actions {
  margin-top: 22px;
}
.share-card .preview-text {
  border-radius: 8px;
  margin-top: 18px;
}
.receipt-file .muted {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  overflow-wrap: anywhere;
}
.admin-shell main {
  justify-content: flex-start;
}
.admin-shell .table-scroll {
  border: 1px solid var(--line);
  border-radius: 8px;
}
.admin-shell th {
  background: #1a201c;
  padding-block: 14px;
}
.admin-shell td:last-child .button {
  margin: 0 5px 8px 0;
}
.admin-toolbar h1 {
  margin: 0 auto 0 0;
}
.admin-toolbar {
  gap: 10px;
}
.admin-shell .stats {
  padding: 18px 0;
  border-block: 1px solid var(--line);
}
.login-card {
  max-width: 500px;
  width: 100%;
  margin-inline: auto;
}
@media (max-width: 600px) {
  .upload-settings {
    gap: 18px 12px;
  }
  .upload-settings input,
  .upload-settings select {
    font-size: 12px;
    min-width: 0;
    padding: 10px;
  }
  .file-name {
    font-size: 14px;
  }
  .file-row {
    gap: 12px;
  }
  .file-icon.has-thumbnail {
    width: 56px;
    height: 64px;
  }
  .share-card .shared-file h1 {
    font-size: 18px;
  }
  .upload-submit > span {
    font-size: 9px;
  }
  .admin-shell header .brand {
    font-size: 28px;
  }
  .admin-toolbar input {
    min-width: 140px;
  }
  .admin-shell .stats {
    font-size: 12px;
    line-height: 1.6;
  }
}
