/* style.css — Voltage / Nebula theme for All 3D Print Service Quote Engine */

:root {
  --deep-space: #080B16;
  --space-panel: #121627;
  --space-panel-2: #0E1220;
  --space-inset: #0B0F1C;
  --voltage-purple: #6E2BD9;
  --voltage-purple-light: #9B6BF2;
  --neon-cyan: #2FE0F0;
  --neon-cyan-dim: #1A9DB3;
  --text-light: #EDEEFA;
  --text-mid: #B7BAD2;
  --text-dim: #7B7F9C;
  --line-soft: #232842;
  --line-softer: #1B2036;
  --danger: #FF5A6E;
  --radius: 16px;
  --radius-sm: 11px;
}

* { box-sizing: border-box; }

html, body { overflow-x: hidden; }

body {
  background: var(--deep-space);
  color: var(--text-light);
  font-family: 'Exo 2', system-ui, sans-serif;
  min-height: 100vh;
  position: relative;
}

/* ---- Ambient aurora background ---- */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60vw 50vh at 12% -5%, rgba(110, 43, 217, 0.22), transparent 60%),
    radial-gradient(55vw 50vh at 95% 8%, rgba(47, 224, 240, 0.14), transparent 55%),
    radial-gradient(70vw 60vh at 80% 100%, rgba(110, 43, 217, 0.16), transparent 60%),
    radial-gradient(50vw 50vh at 5% 95%, rgba(47, 224, 240, 0.08), transparent 55%);
  filter: saturate(1.1);
}

::selection { background: rgba(47, 224, 240, 0.28); color: #fff; }

/* ---- Nav ---- */
.voltage-nav {
  background: rgba(10, 13, 24, 0.72);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line-soft);
  padding: 0.7rem 0;
}

.brand-mark {
  font-family: 'Orbitron', sans-serif;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text-light);
}

.brand-logo {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  color: var(--neon-cyan);
  background: linear-gradient(145deg, rgba(47, 224, 240, 0.16), rgba(110, 43, 217, 0.22));
  border: 1px solid rgba(47, 224, 240, 0.3);
  box-shadow: 0 0 18px rgba(47, 224, 240, 0.18), inset 0 0 12px rgba(110, 43, 217, 0.2);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
}

.brand-sub {
  font-family: 'Exo 2', sans-serif;
  font-weight: 600;
  font-size: 0.6rem;
  color: var(--neon-cyan);
  letter-spacing: 0.32em;
  margin-top: 2px;
}

.nav-actions { display: flex; gap: 0.5rem; align-items: center; }

.btn-history {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--neon-cyan);
  background: rgba(47, 224, 240, 0.08);
  border: 1px solid rgba(47, 224, 240, 0.28);
  border-radius: 10px;
  padding: 0.45rem 0.9rem;
  transition: all 0.18s ease;
}
.btn-history:hover {
  background: rgba(47, 224, 240, 0.16);
  border-color: var(--neon-cyan);
  color: #fff;
  box-shadow: 0 0 16px rgba(47, 224, 240, 0.25);
}

/* ---- Panels ---- */
.panel-card {
  position: relative;
  background: linear-gradient(165deg, rgba(24, 29, 50, 0.85), rgba(14, 18, 32, 0.92));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 1.6rem;
  height: 100%;
  backdrop-filter: blur(6px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}
.panel-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  padding: 1px;
  background: linear-gradient(160deg, rgba(47, 224, 240, 0.35), transparent 40%, transparent 70%, rgba(110, 43, 217, 0.35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.6;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.panel-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text-light);
  text-transform: uppercase;
  margin: 0;
  position: relative;
  padding-left: 0.85rem;
}
.panel-title::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 4px; height: 1.05em;
  border-radius: 2px;
  background: linear-gradient(var(--neon-cyan), var(--voltage-purple));
  box-shadow: 0 0 10px rgba(47, 224, 240, 0.5);
}

.small-label {
  color: var(--text-mid);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}
.tiny-label {
  color: var(--text-dim);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.divider-line {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-soft) 20%, var(--line-soft) 80%, transparent);
  margin: 1.5rem 0 1.25rem;
  opacity: 1;
}

.text-dim { color: var(--text-dim) !important; }
.text-accent { color: var(--neon-cyan) !important; }

/* ---- Form controls ---- */
.form-control, .form-select {
  background: var(--space-inset);
  border: 1px solid var(--line-soft);
  color: var(--text-light);
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  font-size: 0.9rem;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.form-control-sm, .form-select-sm { border-radius: 8px; padding: 0.4rem 0.6rem; }

.form-control:focus, .form-select:focus {
  background: #0C111F;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 3px rgba(47, 224, 240, 0.14);
  color: var(--text-light);
}
.form-control::placeholder { color: #4E5273; }
.form-select option { background: var(--space-panel); color: var(--text-light); }

/* ---- Add line buttons ---- */
.line-items-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.add-btn-group { display: flex; gap: 0.5rem; }

.btn-add {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 9px;
  padding: 0.4rem 0.8rem;
  transition: all 0.18s ease;
}
.btn-add .plus { font-size: 1rem; line-height: 0; font-weight: 700; }

.btn-add-print {
  background: rgba(47, 224, 240, 0.1);
  border: 1px solid rgba(47, 224, 240, 0.32);
  color: var(--neon-cyan);
}
.btn-add-print:hover {
  background: rgba(47, 224, 240, 0.2);
  color: #fff;
  box-shadow: 0 0 14px rgba(47, 224, 240, 0.3);
}

.btn-add-design {
  background: rgba(110, 43, 217, 0.16);
  border: 1px solid rgba(155, 107, 242, 0.45);
  color: var(--voltage-purple-light);
}
.btn-add-design:hover {
  background: rgba(110, 43, 217, 0.28);
  color: #fff;
  box-shadow: 0 0 14px rgba(110, 43, 217, 0.35);
}

/* ---- Empty state ---- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-dim);
  border: 1px dashed var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(11, 15, 28, 0.4);
}
.empty-state svg { color: var(--voltage-purple-light); opacity: 0.7; }
.empty-state p { margin: 0; font-size: 0.85rem; line-height: 1.5; }
.empty-state p span { font-size: 0.8rem; }
.empty-state strong { color: var(--text-mid); font-weight: 600; }

/* ---- Line item cards ---- */
.line-item-card {
  position: relative;
  background: linear-gradient(180deg, rgba(20, 25, 44, 0.7), rgba(11, 15, 28, 0.7));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 0.95rem 1rem;
  margin-bottom: 0.8rem;
  animation: cardIn 0.28s ease;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.line-item-card.print-line  { border-left: 3px solid var(--neon-cyan); }
.line-item-card.design-line { border-left: 3px solid var(--voltage-purple-light); }

.line-item-header {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.line-item-tag {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.28rem 0.55rem;
  border-radius: 6px;
  white-space: nowrap;
}
.tag-print  { background: rgba(47, 224, 240, 0.16); color: var(--neon-cyan); }
.tag-design { background: rgba(110, 43, 217, 0.24); color: var(--voltage-purple-light); }

.line-label { background: transparent; border-color: var(--line-softer); }

.btn-remove-line {
  color: var(--text-dim);
  font-size: 1.25rem;
  line-height: 1;
  padding: 0 0.35rem;
  background: transparent;
  border: none;
  margin-left: auto;
  transition: color 0.15s ease, transform 0.15s ease;
}
.btn-remove-line:hover { color: var(--danger); transform: scale(1.15); }

.line-item-result {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin-top: 0.7rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--line-softer);
}
.line-total-value {
  font-weight: 700;
  color: var(--neon-cyan);
  font-family: 'Orbitron', sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0;
}

/* ---- Quote output ---- */
.quote-output-card {
  background: linear-gradient(165deg, rgba(28, 24, 56, 0.7), rgba(12, 16, 30, 0.95));
  display: flex;
  flex-direction: column;
}

.quote-status-badge {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 0.32rem 0.7rem;
  border-radius: 20px;
  background: rgba(123, 127, 156, 0.15);
  color: var(--text-dim);
  border: 1px solid var(--line-soft);
}
.quote-status-badge.saved {
  background: rgba(47, 224, 240, 0.16);
  color: var(--neon-cyan);
  border-color: rgba(47, 224, 240, 0.4);
  box-shadow: 0 0 14px rgba(47, 224, 240, 0.25);
}

.quote-preview-body {
  flex: 1 1 auto;
  min-height: 180px;
  font-size: 0.9rem;
}

.preview-placeholder {
  height: 100%;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  text-align: center;
  color: var(--text-dim);
}
.preview-placeholder svg { color: var(--voltage-purple-light); opacity: 0.6; }
.preview-placeholder p { margin: 0; font-size: 0.85rem; }

.quote-preview-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line-softer);
  animation: cardIn 0.25s ease;
}
.quote-preview-line:last-child { border-bottom: none; }
.quote-preview-line .item-desc { color: var(--text-light); }
.quote-preview-line .item-amount {
  color: var(--neon-cyan);
  font-weight: 700;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.86rem;
  white-space: nowrap;
}

.quote-totals {
  border-top: 1px solid var(--line-soft);
  margin-top: 1.1rem;
  padding-top: 0.95rem;
  font-size: 0.9rem;
  color: var(--text-mid);
}
.totals-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.32rem 0;
}

.total-row {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  border-top: 1px solid var(--line-soft);
  margin-top: 0.6rem;
  padding-top: 0.75rem;
}
.total-row span:last-child {
  background: linear-gradient(90deg, var(--neon-cyan), var(--voltage-purple-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 24px rgba(47, 224, 240, 0.35);
}

/* ---- Action buttons ---- */
.action-row {
  display: flex;
  gap: 0.7rem;
  margin-top: 1.3rem;
}
.action-row .btn {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 11px;
  padding: 0.7rem 1rem;
  transition: all 0.18s ease;
}

.btn-voltage-primary {
  background: linear-gradient(100deg, var(--voltage-purple), var(--voltage-purple-light) 55%, var(--neon-cyan));
  background-size: 180% 100%;
  border: none;
  color: #fff;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 24px rgba(110, 43, 217, 0.35);
}
.btn-voltage-primary:hover:not(:disabled) {
  background-position: 100% 0;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(47, 224, 240, 0.35);
}
.btn-voltage-primary:disabled { opacity: 0.35; box-shadow: none; }

.btn-voltage-outline {
  background: rgba(47, 224, 240, 0.05);
  border: 1px solid rgba(47, 224, 240, 0.35);
  color: var(--neon-cyan);
}
.btn-voltage-outline:hover:not(:disabled) {
  background: rgba(47, 224, 240, 0.14);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(47, 224, 240, 0.2);
}
.btn-voltage-outline:disabled { opacity: 0.35; }

/* ---- Offcanvas history ---- */
.voltage-offcanvas {
  background: linear-gradient(180deg, var(--space-panel), var(--space-panel-2));
  color: var(--text-light);
  border-left: 1px solid var(--line-soft);
  width: 360px;
}
.voltage-offcanvas .offcanvas-header { border-bottom: 1px solid var(--line-soft); }

.history-item {
  background: linear-gradient(180deg, rgba(20, 25, 44, 0.6), rgba(11, 15, 28, 0.6));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 0.85rem 0.9rem;
  margin-bottom: 0.65rem;
  transition: border-color 0.16s ease, transform 0.16s ease;
}
.history-item:hover { border-color: rgba(47, 224, 240, 0.35); transform: translateX(-2px); }
.history-item .h-name { font-weight: 600; color: var(--text-light); font-size: 0.92rem; }
.history-item .h-total {
  color: var(--neon-cyan);
  font-weight: 700;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.95rem;
}
.history-item .h-date { color: var(--text-dim); font-size: 0.74rem; margin-top: 1px; }

.history-pdf-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--voltage-purple-light);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.25rem 0.55rem;
  border-radius: 7px;
  border: 1px solid rgba(155, 107, 242, 0.3);
  transition: all 0.15s ease;
}
.history-pdf-link:hover { color: #fff; background: rgba(110, 43, 217, 0.22); border-color: var(--voltage-purple-light); }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--deep-space); }
::-webkit-scrollbar-thumb { background: var(--line-soft); border-radius: 6px; border: 2px solid var(--deep-space); }
::-webkit-scrollbar-thumb:hover { background: var(--voltage-purple); }

.quote-preview-line .item-meta { color: var(--text-dim); font-size: 0.78rem; }

/* ---- Settings page ---- */
.settings-hint {
  color: var(--text-mid);
  font-size: 0.88rem;
  background: rgba(47, 224, 240, 0.06);
  border: 1px solid rgba(47, 224, 240, 0.2);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin-bottom: 1.4rem;
}

.setting-field { margin-bottom: 1rem; }
.field-help { color: var(--text-dim); font-size: 0.72rem; margin: 0.3rem 0 0; }

.input-money {
  display: flex;
  align-items: center;
  background: var(--space-inset);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.input-money:focus-within {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 3px rgba(47, 224, 240, 0.14);
}
.input-money > span {
  color: var(--text-dim);
  font-weight: 600;
  padding: 0 0.65rem;
  font-size: 0.9rem;
}
.input-money .form-control,
.input-money .form-select {
  background: transparent;
  border: none;
  border-radius: 0;
}
.input-money .form-control:focus { box-shadow: none; }
.input-money.input-suffix > span { order: 2; }
.input-money.input-suffix .form-control { order: 1; }
.input-money.input-sm { border-radius: 8px; }

/* Filament list */
.filament-head,
.filament-row {
  display: grid;
  grid-template-columns: 1fr 130px 36px;
  gap: 0.6rem;
  align-items: center;
}
.filament-head {
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  padding: 0 0.2rem 0.4rem;
}
.filament-row { margin-bottom: 0.55rem; }
.filament-row .btn-remove-line { margin: 0; justify-self: center; }

.tier-block {
  background: rgba(11, 15, 28, 0.5);
  border: 1px solid var(--line-softer);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  margin-bottom: 0.85rem;
}

.btn-reset {
  color: var(--danger);
  border-color: rgba(255, 90, 110, 0.4);
  background: rgba(255, 90, 110, 0.08);
}
.btn-reset:hover { color: #fff; background: rgba(255, 90, 110, 0.2); border-color: var(--danger); box-shadow: 0 0 14px rgba(255, 90, 110, 0.3); }

/* ---- Toast ---- */
.toast-host {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1080;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: flex-end;
}
.app-toast {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: linear-gradient(120deg, #131a2e, #0d1120);
  border: 1px solid rgba(47, 224, 240, 0.45);
  color: var(--text-light);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.7rem 1.1rem;
  border-radius: 12px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45), 0 0 18px rgba(47, 224, 240, 0.18);
  opacity: 0;
  transform: translateY(12px) scale(0.97);
  transition: opacity 0.28s ease, transform 0.28s ease;
}
.app-toast.show { opacity: 1; transform: translateY(0) scale(1); }
.app-toast svg { color: var(--neon-cyan); flex-shrink: 0; }
.app-toast.toast-warn { border-color: rgba(255, 90, 110, 0.5); box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45), 0 0 18px rgba(255, 90, 110, 0.18); }
.app-toast.toast-warn svg { color: var(--danger); }

/* ---- Responsive ---- */
@media (max-width: 575.98px) {
  .panel-card { padding: 1.15rem; }
  .brand-text { font-size: 0.78rem; }
  .action-row { flex-direction: column; }
  .toast-host { left: 1rem; right: 1rem; align-items: stretch; }
}
