
500;600;700;800;900&family=JetBrains+Mono:wght@600;700;800&display=swap');

:root {
  --brand: #006879;
  --brand-2: #0b8fdc;
  --brand-soft: #eaf5fd;
  --ink: #1b1c1c;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f8fafc;
  --surface: #ffffff;
  --ok: #0f8a5f;
  --danger: #b42318;
  --shadow: 0 18px 46px rgba(18, 39, 54, .08);
  --radius: 18px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 15% 0%, rgba(8,120,209,.07), transparent 34%),
    linear-gradient(180deg, #f8fbfd 0%, var(--bg) 100%);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body { min-height: 100vh; }
a { color: inherit; }
button, input { font: inherit; }

.shell {
  width: min(1040px, calc(100% - 28px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(8,120,209,.12));
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-copy strong {
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -.03em;
}

.brand-copy span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255,255,255,.92);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  color: #31424d;
  box-shadow: 0 5px 14px rgba(27, 47, 61, .04);
}

.card {
  background: rgba(255,255,255,.96);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  backdrop-filter: blur(8px);
}

.hero-card {
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand), #43c6ff);
}

.eyebrow {
  display: inline-block;
  margin-bottom: 5px;
  color: var(--brand);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1 {
  margin: 3px 0 8px;
  font-size: clamp(27px, 4vw, 38px);
  line-height: 1.08;
  letter-spacing: -.035em;
}

h2 {
  margin: 0 0 7px;
  font-size: 21px;
  letter-spacing: -.02em;
}

p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.tabs {
  display: flex;
  gap: 8px;
  margin: 22px 0 18px;
  padding: 5px;
  width: fit-content;
  border-radius: 12px;
  background: #f2f6f8;
  border: 1px solid #e4ecef;
}

.tab {
  border: 0;
  border-radius: 9px;
  padding: 10px 14px;
  background: transparent;
  color: #667780;
  font-weight: 800;
  cursor: pointer;
}

.tab.active {
  background: #fff;
  color: var(--brand);
  box-shadow: 0 4px 12px rgba(23,45,60,.07);
}

.hidden { display: none !important; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.form-grid .full { grid-column: 1 / -1; }

label {
  display: grid;
  gap: 7px;
  color: #50616b;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .02em;
}

input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #cfdbe2;
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: .18s ease;
}

input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(8,120,209,.10);
}

button, .primary {
  border: 0;
  border-radius: 11px;
  padding: 12px 16px;
  background: linear-gradient(180deg, #1688d8, var(--brand));
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 9px 18px rgba(8,120,209,.18);
}

.message {
  min-height: 22px;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--danger);
}

.message.ok { color: var(--ok); }

.note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.recent-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.recent-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fbfdfe;
  text-decoration: none;
  transition: .18s ease;
}

.recent-item:hover {
  transform: translateY(-1px);
  border-color: #b9d8eb;
  background: #fff;
}

.recent-item strong {
  color: var(--brand);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 14px;
  font-weight: 800;
}

.recent-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.receipt-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.receipt-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 13px;
  border: 1px solid #b9d9ef;
  border-radius: 10px;
  background: #fff;
  color: var(--brand);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .03em;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  overflow: hidden;
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.facts > div {
  min-height: 88px;
  padding: 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.facts span {
  display: block;
  margin-bottom: 7px;
  color: #82919a;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.facts strong {
  font-size: 14px;
  line-height: 1.35;
}

.total {
  color: var(--brand);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 22px !important;
}

.card-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 11px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: #0a5f9e;
  font-weight: 900;
  font-size: 12px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.secondary {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  box-shadow: none;
}

.receipt-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #e9f7f1;
  color: #08724f;
  font-size: 11px;
  font-weight: 900;
}

.receipt-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #11a56f;
}

@media print {
  body { background: #fff; }
  .topbar, .actions { display: none !important; }
  .shell { width: 100%; padding: 0; }
  .card { box-shadow: none; border-color: #d8e0e5; }
}

@media(max-width: 720px) {
  .shell { width: min(100% - 18px, 1040px); padding-top: 14px; }
  .topbar { align-items: flex-start; }
  .brand img { width: 46px; height: 46px; }
  .brand-copy strong { font-size: 18px; }
  .card { padding: 18px; border-radius: 16px; }
  .form-grid, .facts { grid-template-columns: 1fr; }
  .facts > div { min-height: auto; }
  .receipt-head { flex-direction: column; }
  .recent-item { align-items: flex-start; flex-direction: column; }
}

@media(max-width: 480px) {
  .topbar { flex-direction: column; }
  .back { align-self: flex-start; }
  .tabs { width: 100%; }
  .tab { flex: 1; }
}

.invoice-card select{width:100%;border:1px solid #cbd7db;border-radius:12px;padding:12px;background:#fff;color:#1b1c1c;font:inherit}
.invoice-form-actions{display:flex;justify-content:flex-end}
.invoice-result{margin-top:16px;padding:16px;border:1px solid #b9d8de;background:#f4fbfc;border-radius:14px;display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}
.invoice-result-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.button-link{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;border-radius:10px;padding:11px 15px;background:#006879;color:#fff;font-weight:700}
.button-link:hover{filter:brightness(.96)}
