/* Theme: dark slate with orange accent. Tailwind handles layout; this file holds shared components. */
body { font-family: 'Barlow', system-ui, sans-serif; }
h1, h2, h3, .display { font-family: 'Barlow Condensed', 'Barlow', sans-serif; letter-spacing: .02em; }

.card { background: #0f172a; border: 1px solid #1e293b; border-radius: 10px; }
.label { display: block; font-size: .8rem; color: #94a3b8; margin-bottom: .25rem; }
.input { width: 100%; background: #020617; border: 1px solid #334155; border-radius: 8px; padding: .55rem .75rem; color: #e2e8f0; outline: none; }
.input:focus { border-color: #f97316; box-shadow: 0 0 0 2px rgba(249,115,22,.25); }
.input::placeholder { color: #64748b; }
.input:disabled { opacity: .6; }
select.input option { background: #0f172a; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .5rem .95rem; border-radius: 8px; font-weight: 600; font-size: .875rem; cursor: pointer; border: 1px solid transparent; transition: background .15s; }
.btn:focus-visible { outline: 2px solid #fdba74; outline-offset: 2px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: #f97316; color: #0b1220; }
.btn-primary:hover:not(:disabled) { background: #fb923c; }
.btn-ghost { background: #1e293b; color: #e2e8f0; }
.btn-ghost:hover:not(:disabled) { background: #334155; }
.btn-danger { background: #7f1d1d; color: #fecaca; }
.btn-danger:hover:not(:disabled) { background: #991b1b; }
.btn-sm { padding: .28rem .6rem; font-size: .78rem; }

.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th { text-align: left; color: #94a3b8; font-weight: 500; padding: .65rem .85rem; border-bottom: 1px solid #1e293b; white-space: nowrap; }
.tbl td { padding: .65rem .85rem; border-bottom: 1px solid #1e293b; white-space: nowrap; }
.tbl tbody tr:hover td { background: #0b1324; }
.tbl .empty, .tbl .loading { text-align: center; color: #94a3b8; padding: 2rem; white-space: normal; }

.badge { display: inline-block; padding: .12rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.badge-active { background: #14532d; color: #bbf7d0; }
.badge-expired { background: #7f1d1d; color: #fecaca; }
.badge-warn { background: #78350f; color: #fde68a; }

.stat { padding: 1.1rem 1.25rem; }
.stat .num { font-family: 'Barlow Condensed', sans-serif; font-size: 2.3rem; font-weight: 700; line-height: 1.1; }
.stat .cap { color: #94a3b8; font-size: .85rem; }

.nav-link { display: block; padding: .6rem 1rem; border-radius: 8px; color: #cbd5e1; border-left: 3px solid transparent; }
.nav-link:hover { background: #1e293b; }
.nav-link.active { background: #1e293b; color: #fb923c; border-left-color: #f97316; font-weight: 600; }

.modal { position: fixed; inset: 0; background: rgba(2,6,23,.78); display: flex; align-items: center; justify-content: center; padding: 1rem; z-index: 60; }
.modal.hidden { display: none; }
.modal-box { background: #0f172a; border: 1px solid #334155; border-radius: 12px; width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; padding: 1.25rem; }

#toasts { position: fixed; top: 1rem; right: 1rem; z-index: 100; display: flex; flex-direction: column; gap: .5rem; }
.toast { padding: .7rem 1rem; border-radius: 8px; font-size: .9rem; max-width: 340px; box-shadow: 0 6px 20px rgba(0,0,0,.4); border-left: 4px solid; background: #0f172a; }
.toast-success { border-color: #22c55e; }
.toast-error { border-color: #ef4444; }
.toast-warn { border-color: #f59e0b; }

.spinner { width: 1.1rem; height: 1.1rem; border: 2px solid #475569; border-top-color: #f97316; border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2s; } }

/* Receipt (printable) */
#receipt { background: #fff; color: #111; max-width: 440px; margin: 0 auto; padding: 1.5rem; border-radius: 8px; }
#receipt .row { display: flex; justify-content: space-between; padding: .35rem 0; border-bottom: 1px dashed #bbb; font-size: .92rem; }
@media print {
  body { background: #fff !important; }
  body * { visibility: hidden; }
  #receipt, #receipt * { visibility: visible; }
  #receipt { position: absolute; left: 0; top: 0; width: 100%; max-width: none; }
  .no-print { display: none !important; }
}
