@import url("./layout.2f3d6883392d.css");
:root {
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: #1c263c;
  background: #f5f7fb;
  font-synthesis: none;
  --accent: #5865ed;
  --accent-soft: #eef0ff;
  --accent-deep: #454fd1;
  --ink: #1c263c;
  --muted: #7b869a;
  --line: #e8ecf3;
  --card: #fff;
  --bg: #f5f7fb;
  --sidebar: #111b30;
  --success: #128567;
  --danger: #cc4c58;
  color-scheme: light;
}
:root[data-theme="violet"] {
  --accent: #8b5cf6;
  --accent-soft: #f3eeff;
  --accent-deep: #7341d8;
  --sidebar: #201832;
}
:root[data-theme="emerald"] {
  --accent: #138e79;
  --accent-soft: #e6f6f0;
  --accent-deep: #096c5b;
  --sidebar: #102c2a;
}
:root[data-theme="sunset"] {
  --accent: #c16845;
  --accent-soft: #fff0e9;
  --accent-deep: #a14d30;
  --sidebar: #30211d;
}
:root[data-theme="midnight"] {
  --accent: #939dfc;
  --accent-soft: #29334d;
  --accent-deep: #b5bcff;
  --ink: #e6eaf5;
  --muted: #97a4bb;
  --line: #303b50;
  --card: #1d293e;
  --bg: #142033;
  --sidebar: #0b1424;
  color: #e6eaf5;
  background: #142033;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
a {
  color: var(--accent);
  text-decoration: none;
}
img {
  max-width: 100%;
}
.icon {
  width: 19px;
  height: 19px;
  vertical-align: middle;
  flex-shrink: 0;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 29px;
  letter-spacing: -1px;
  line-height: 1.25;
  margin-bottom: 8px;
}
h2 {
  font-size: 18px;
  letter-spacing: -0.4px;
}
h3 {
  font-size: 15px;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.eyebrow {
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.8px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 650;
  background: var(--accent-soft);
  color: var(--accent);
}
.pill:before {
  content: "";
  width: 5px;
  height: 5px;
  background: currentColor;
  border-radius: 50%;
}
.pill.POSTED,
.pill.ACTIVE,
.pill.OPEN {
  background: #e8f7f0;
  color: #148564;
}
.pill.CANCELLED,
.pill.BLOCKED,
.pill.LOCKED {
  background: #fff0f1;
  color: #bc4d58;
}
.pill.REVERSED,
.pill.CLOSED {
  background: #edf0f5;
  color: #69768b;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
  padding: 11px 15px;
  font-weight: 600;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}
.btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  box-shadow: 0 4px 10px #5565eb1c;
}
.btn.primary:hover {
  background: var(--accent-deep);
}
.btn.danger {
  color: var(--danger);
}
.btn.text {
  background: transparent;
  border-color: transparent;
  padding: 7px;
}
.icon-btn {
  padding: 8px;
  background: transparent;
  border: 0;
  color: var(--muted);
  border-radius: 7px;
}
.icon-btn:hover {
  color: var(--accent);
  background: var(--accent-soft);
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 3px 6px #18254602;
}
.error {
  color: var(--danger);
  font-size: 13px;
  line-height: 1.6;
}
.empty {
  padding: 60px 20px;
  text-align: center;
}
.empty .icon {
  width: 34px;
  height: 34px;
  color: var(--accent);
  margin-bottom: 14px;
}
.empty h3 {
  margin: 0 0 8px;
}
.empty p {
  max-width: 340px;
  margin: 0 auto 20px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}
.spinner {
  width: 22px;
  height: 22px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.boot {
  min-height: 80vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 20px;
  color: var(--muted);
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 7px;
  color: var(--ink);
}
input,
select,
textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--card);
  color: var(--ink);
  font-size: 13px;
  transition: border 0.15s;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}
input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}
input::placeholder,
textarea::placeholder {
  color: #a1aabb;
}
textarea {
  min-height: 85px;
  resize: vertical;
}
.field {
  margin-bottom: 18px;
}
.field small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
  margin-top: 6px;
}
.check {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}
.span-2 {
  grid-column: 1/-1;
}
.section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--muted);
  padding: 17px 0 13px;
  border-top: 1px solid var(--line);
  margin: 8px 0;
}
.field-error {
  font-weight: 400;
  color: var(--danger);
}
dialog {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 15px;
  width: min(780px, 95vw);
  max-height: 92dvh;
  padding: 0;
  box-shadow: 0 30px 100px #08102644;
}
dialog::backdrop {
  background: #101c3699;
  backdrop-filter: blur(4px);
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 25px 28px 20px;
  border-bottom: 1px solid var(--line);
}
.dialog-head h2 {
  margin: 0 0 5px;
}
.dialog-body {
  padding: 24px 28px;
  max-height: 68dvh;
  overflow: auto;
}
.dialog-footer {
  padding: 17px 28px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--line);
  position: sticky;
  bottom: 0;
  background: var(--card);
}
.line-item {
  display: grid;
  grid-template-columns: 2fr 0.8fr 1fr 35px;
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
  padding: 12px;
  background: var(--bg);
  border-radius: 8px;
}
.line-item .field {
  margin: 0;
}
.line-item .line-extra {
  grid-column: 1/-1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.detail-grid dt {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
}
.detail-grid dd {
  font-size: 13px;
  margin: 0;
  word-break: break-word;
}
.detail-grid pre {
  white-space: pre-wrap;
  font-size: 11px;
}
.palette {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.swatch {
  width: 110px;
  text-align: left;
  padding: 14px;
  border-radius: 10px;
  border: 2px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-size: 12px;
}
.swatch b {
  display: block;
  width: 100%;
  height: 40px;
  border-radius: 6px;
  margin-bottom: 10px;
}
.swatch.selected {
  border-color: var(--accent);
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  max-width: min(550px, 90vw);
  border-radius: 9px;
  background: var(--sidebar);
  color: white;
  font-size: 13px;
  padding: 0;
  box-shadow: 0 6px 30px #11182730;
}
#toast.visible {
  padding: 14px 20px;
}

svg.icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tax-document { white-space: nowrap; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.lookup-control { display: flex; gap: 8px; align-items: center; }
.lookup-control select { flex: 1; min-width: 0; }
.lookup-control .icon-btn { flex-shrink: 0; border: 1px solid var(--line); }
#lookup { width: min(640px, 95vw); }
.lookup-results { display: grid; gap: 8px; max-height: 48dvh; overflow-y: auto; }
.lookup-option { display: grid; gap: 5px; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--card); color: var(--ink); cursor: pointer; }
.lookup-option:hover, .lookup-option:focus-visible { border-color: var(--accent); }
.lookup-option span { font-size: 12px; color: var(--muted); }
.stock-warning { padding-left: 20px; line-height: 1.7; }
