@import url('https://fonts.googleapis.com/css2?family=VT323&family=Share+Tech+Mono&display=swap');

/* ── Variables ─────────────────────────────────────────────────── */
:root {
  --bg:           #0c0c0c;
  --surface:      #161616;
  --panel:        #1e1e1e;
  --panel-hover:  #252525;
  --border:       #2e2e2e;
  --border-light: #404040;
  --green:        #4caf26;
  --green-dim:    #2d6b15;
  --green-glow:   rgba(76,175,38,0.15);
  --gold:         #e8b53a;
  --gold-dim:     #7a5c12;
  --red:          #c0392b;
  --red-dim:      #6b1a12;
  --blue:         #3a8fc0;
  --text:         #ddd;
  --text-muted:   #777;
  --text-dim:     #444;
  --font-pixel:   'VT323', monospace;
  --font-mono:    'Share Tech Mono', 'Courier New', monospace;
  --radius:       2px;
}

/* ── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Scrollbar ─────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }

/* ── Typography ────────────────────────────────────────────────── */
h1, h2, h3, h4 { font-family: var(--font-pixel); font-weight: normal; letter-spacing: 1px; }

/* ── Utilities ─────────────────────────────────────────────────── */
.hidden { display: none !important; }

.mc-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-top-color: var(--border-light);
  border-left-color: var(--border-light);
}

/* ── Nav ───────────────────────────────────────────────────────── */
nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  font-family: var(--font-pixel);
  font-size: 26px;
  color: var(--green);
  text-shadow: 0 0 20px var(--green-glow);
  text-decoration: none;
  letter-spacing: 2px;
}

.nav-brand span { color: var(--gold); }

.nav-links { display: flex; gap: 4px; }

.nav-link {
  font-family: var(--font-pixel);
  font-size: 18px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.nav-link:hover, .nav-link.active {
  color: var(--green);
  border-color: var(--green-dim);
  background: var(--green-glow);
}

.nav-badge {
  font-size: 11px;
  background: var(--green-dim);
  color: var(--green);
  padding: 1px 6px;
  border-radius: 8px;
  margin-left: 6px;
  font-family: var(--font-mono);
  vertical-align: middle;
}

/* ── Page layout ───────────────────────────────────────────────── */
.page { max-width: 900px; margin: 0 auto; padding: 32px 20px 80px; }

.page-header { margin-bottom: 32px; }
.page-header h1 { font-size: 42px; color: var(--green); }
.page-header p { color: var(--text-muted); margin-top: 4px; font-size: 14px; }

/* ── Buttons ───────────────────────────────────────────────────── */
.btn {
  font-family: var(--font-pixel);
  font-size: 18px;
  padding: 8px 20px;
  border: 1px solid var(--border-light);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  border-radius: var(--radius);
  transition: background 0.12s, border-color 0.12s, transform 0.08s;
  letter-spacing: 1px;
  white-space: nowrap;
}

.btn:hover { background: var(--panel-hover); border-color: var(--text-muted); }
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--green-dim);
  border-color: var(--green);
  color: #9eff6e;
}
.btn-primary:hover { background: #3a8c1c; }

.btn-danger {
  background: var(--red-dim);
  border-color: var(--red);
  color: #ff8a80;
}
.btn-danger:hover { background: #8b1a12; }

.btn-gold {
  background: var(--gold-dim);
  border-color: var(--gold);
  color: var(--gold);
}
.btn-gold:hover { background: #9a730e; }

.btn-sm { font-size: 14px; padding: 4px 12px; }

/* ── Inputs ────────────────────────────────────────────────────── */
input[type="text"], input[type="number"], input[type="password"], input[type="email"] {
  background: #111;
  border: 1px solid var(--border);
  border-top-color: var(--border-light);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 15px;
  padding: 8px 12px;
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}

input:focus {
  border-color: var(--green-dim);
  box-shadow: 0 0 0 2px var(--green-glow);
}

input[type="number"] { -moz-appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; }

/* ── Calculator section ────────────────────────────────────────── */
.calc-card {
  padding: 24px;
  margin-bottom: 24px;
}

.calc-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.calc-field { display: flex; flex-direction: column; gap: 6px; }
.calc-field label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }

.calc-field-item { flex: 1; min-width: 220px; }
.calc-field-qty  { width: 100px; }

#qty-input { width: 100px; text-align: center; }

/* Search dropdown */
#search-wrap { position: relative; }

#search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #111;
  border: 1px solid var(--border-light);
  z-index: 200;
  max-height: 260px;
  overflow-y: auto;
  margin-top: 2px;
}

.drop-item {
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  transition: background 0.1s;
}
.drop-item:hover, .drop-item.active { background: var(--panel-hover); color: var(--green); }
.drop-output { color: var(--text-dim); font-size: 12px; }

.selected-display {
  background: #0a0a0a;
  border: 1px solid var(--border);
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-muted);
  border-radius: var(--radius);
  margin-top: 6px;
}
.selected-display span { color: var(--gold); font-family: var(--font-pixel); font-size: 16px; }

/* ── Results ───────────────────────────────────────────────────── */
#results-placeholder {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dim);
  font-size: 13px;
  border: 1px dashed var(--border);
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.results-title {
  font-family: var(--font-pixel);
  font-size: 28px;
  color: var(--gold);
}

.results-meta {
  font-size: 13px;
  color: var(--text-muted);
}

.result-section { margin-bottom: 32px; }

.section-title {
  font-family: var(--font-pixel);
  font-size: 22px;
  color: var(--text);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 2px;
  font-family: var(--font-mono);
  letter-spacing: 1px;
  vertical-align: middle;
}
.tag-raw   { background: var(--red-dim);  color: #ff8a80; border: 1px solid var(--red); }
.tag-steps { background: var(--gold-dim); color: var(--gold); border: 1px solid var(--gold); }
.tag-all   { background: #0d2d1a; color: var(--green); border: 1px solid var(--green-dim); }
.tag-craft { background: #0d1e2d; color: #7bbfe8;   border: 1px solid #1e5c80; }

/* Raw materials grid */
.raw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
}

.raw-card {
  background: #111;
  border: 1px solid var(--border);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 3px solid var(--red);
  transition: border-color 0.15s;
}
.raw-card:hover { border-color: var(--border-light); border-left-color: var(--gold); }

.crafted-card {
  background: #111;
  border: 1px solid var(--border);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 3px solid var(--blue);
  transition: border-color 0.15s;
}
.crafted-card:hover { border-color: var(--border-light); border-left-color: var(--gold); }

.raw-qty {
  font-family: var(--font-pixel);
  font-size: 22px;
  color: var(--gold);
  min-width: 28px;
  text-align: right;
  line-height: 1;
}

.raw-info  { display: flex; flex-direction: column; gap: 2px; }
.raw-name  { font-size: 13px; color: var(--text); line-height: 1.3; }
.raw-stacks { font-size: 10px; color: var(--text-muted); font-family: var(--font-mono); }

/* Crafting steps */
.steps-list { display: flex; flex-direction: column; gap: 8px; }

.step-card {
  background: #111;
  border: 1px solid var(--border);
  border-left: 3px solid var(--green-dim);
  padding: 12px 16px;
  transition: border-left-color 0.15s;
}
.step-card:hover { border-left-color: var(--green); }

.step-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.step-num {
  font-family: var(--font-pixel);
  font-size: 20px;
  color: var(--green);
  min-width: 28px;
  line-height: 1;
}

.step-name {
  font-family: var(--font-pixel);
  font-size: 20px;
  color: var(--text);
  flex: 1;
}

.step-counts { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.step-arrow { color: var(--text-dim); }
.step-produce { color: var(--green); }
.step-leftover { color: var(--gold-dim); font-style: italic; }

.step-ingredients {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ing-tag {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 2px;
  border: 1px solid;
  white-space: nowrap;
}
.ing-raw    { background: rgba(192,57,43,0.1); border-color: var(--red-dim); color: #ff8a80; }
.ing-crafted { background: rgba(58,143,192,0.1); border-color: #1e5c80; color: #7bbfe8; }
.ing-per { color: var(--text-dim); margin-left: 4px; }

/* ── Ingredient tip tooltip ─────────────────────────────────────── */
.tip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 13px;
  height: 13px;
  background: var(--gold-dim);
  color: var(--gold);
  border-radius: 50%;
  font-size: 9px;
  font-weight: bold;
  cursor: help;
  margin-left: 5px;
  vertical-align: middle;
  flex-shrink: 0;
  font-family: var(--font-mono);
}
.tip-bubble {
  display: none;
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%);
  background: #1a1508;
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  font-size: 11px;
  font-family: var(--font-mono);
  padding: 6px 10px;
  border-radius: var(--radius);
  white-space: normal;
  width: max-content;
  max-width: 220px;
  z-index: 200;
  pointer-events: none;
  line-height: 1.5;
}
.tip-bubble::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--gold-dim);
}
.tip-icon:hover .tip-bubble { display: block; }

/* ── Admin panel ───────────────────────────────────────────────── */
.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 700px) { .admin-grid { grid-template-columns: 1fr; } }

.admin-section { padding: 20px; }
.admin-section-title {
  font-family: var(--font-pixel);
  font-size: 22px;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.toolbar input { max-width: 220px; }

/* Recipe list */
.recipe-list { display: flex; flex-direction: column; gap: 4px; max-height: 480px; overflow-y: auto; }

.list-empty { padding: 24px; text-align: center; color: var(--text-dim); font-size: 13px; }

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  background: #111;
  transition: border-color 0.1s, background 0.1s;
}
.list-item:hover { border-color: var(--border-light); background: #141414; }

.list-item-info { flex: 1; min-width: 0; }
.list-item-name { font-family: var(--font-pixel); font-size: 17px; color: var(--text); }
.list-item-meta { font-size: 12px; color: var(--text-dim); display: block; }

.list-item-actions { display: flex; gap: 4px; flex-shrink: 0; }

.btn-edit   { background: rgba(58,143,192,0.15); border-color: #1e5c80; color: #7bbfe8; }
.btn-edit:hover { background: rgba(58,143,192,0.3); }
.btn-delete { background: var(--red-dim); border-color: var(--red); color: #ff8a80; }
.btn-delete:hover { background: #8b1a12; }
.btn-remove-ing { background: var(--red-dim); border-color: var(--red); color: #ff8a80; padding: 4px 10px; }

/* Form section */
#form-section { margin-top: 24px; }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }

.ing-rows-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

#ingredients-container { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }

.ing-row {
  display: grid;
  grid-template-columns: 1fr 72px auto;
  grid-template-rows: auto auto;
  gap: 6px 8px;
  align-items: center;
}
.ing-tip-input {
  grid-column: 1 / -1;
  background: var(--bg);
  border: 1px dashed var(--border);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: var(--radius);
  width: 100%;
}
.ing-tip-input:focus { outline: none; border-color: var(--gold-dim); color: var(--text); }
.ing-tip-input::placeholder { opacity: 0.5; }

.ing-name-wrap { position: relative; min-width: 0; }

.ing-autocomplete {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #111;
  border: 1px solid var(--border-light);
  z-index: 200;
  max-height: 180px;
  overflow-y: auto;
  margin-top: 1px;
}

.ing-drop-item {
  padding: 6px 12px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.1s;
}
.ing-drop-item:hover { background: var(--panel-hover); color: var(--green); }

.ing-qty-input { width: 72px; }

.form-actions { display: flex; gap: 8px; margin-top: 20px; }

/* ── Recipe tabs ───────────────────────────────────────────────── */
.recipe-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.tab-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 5px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
}
.tab-btn:hover { border-color: var(--border-light); color: var(--text); }
.tab-btn.active { background: var(--green-dim); border-color: var(--green); color: var(--green); }

/* ── Status badges (calculator + list) ────────────────────────── */
.status-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: bold;
  padding: 2px 7px;
  border-radius: var(--radius);
  letter-spacing: 0.5px;
  vertical-align: middle;
}
.badge-complete { background: rgba(76,175,38,0.15); border: 1px solid var(--green-dim); color: var(--green); }
.badge-wip      { background: rgba(232,181,58,0.15); border: 1px solid var(--gold-dim);  color: var(--gold); }

/* ── Move button ───────────────────────────────────────────────── */
.btn-move { background: rgba(232,181,58,0.1); border-color: var(--gold-dim); color: var(--gold); }
.btn-move:hover { background: rgba(232,181,58,0.25); }

/* ── Status select ─────────────────────────────────────────────── */
.form-select {
  background: #111;
  border: 1px solid var(--border);
  border-top-color: var(--border-light);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 15px;
  padding: 8px 12px;
  border-radius: var(--radius);
  width: 100%;
  cursor: pointer;
}
.form-select:focus { border-color: var(--green-dim); outline: none; box-shadow: 0 0 0 2px var(--green-glow); }

/* ── Raw Blocks section ────────────────────────────────────────── */
.blocks-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.block-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #111;
  border: 1px solid var(--border-light);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 4px 10px;
  border-radius: var(--radius);
}

.block-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0;
  transition: color 0.1s;
}
.block-remove:hover { color: #ff8a80; }

.form-error { color: #ff8a80; font-size: 13px; margin-top: 8px; min-height: 18px; }

/* ── Login screen ──────────────────────────────────────────────── */
#login-screen {
  max-width: 360px;
  margin: 80px auto;
  padding: 32px;
  text-align: center;
}

.login-icon {
  font-family: var(--font-pixel);
  font-size: 60px;
  color: var(--green);
  line-height: 1;
  margin-bottom: 12px;
}

#login-screen h2 { font-size: 30px; color: var(--text); margin-bottom: 6px; }
#login-screen p { font-size: 13px; color: var(--text-muted); margin-bottom: 24px; }

.login-form { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.login-form input { text-align: center; letter-spacing: 2px; }

#login-error { color: #ff8a80; font-size: 13px; text-align: center; min-height: 18px; }

/* ── Admin tools bar ───────────────────────────────────────────── */
.admin-tools-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
}

/* ── Toast ─────────────────────────────────────────────────────── */
#toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--green-dim);
  border: 1px solid var(--green);
  color: #9eff6e;
  font-family: var(--font-pixel);
  font-size: 18px;
  padding: 10px 20px;
  border-radius: var(--radius);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  z-index: 1000;
}
#toast.show { opacity: 1; transform: translateY(0); }

/* ── Shake animation ───────────────────────────────────────────── */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}
.shake { animation: shake 0.35s ease; }

/* ── Suggestions tab (admin) ───────────────────────────────────── */
.suggestions-badge {
  display: inline-block;
  background: var(--gold-dim);
  color: var(--gold);
  font-size: 10px;
  font-family: var(--font-mono);
  padding: 1px 5px;
  border-radius: 8px;
  margin-left: 4px;
  vertical-align: middle;
}

.suggestions-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }

.suggestion-card {
  background: #0f0f0f;
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold-dim);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.suggestion-name {
  font-family: var(--font-pixel);
  font-size: 17px;
  color: var(--gold);
}

.suggestion-notes {
  font-size: 13px;
  color: var(--text);
  white-space: pre-wrap;
}

.suggestion-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.suggestion-delete { align-self: flex-start; margin-top: 4px; }

/* ── Checklist checkboxes ──────────────────────────────────────── */
.step-check,
.mat-check {
  appearance: none;
  -webkit-appearance: none;
  width: 17px;
  height: 17px;
  border: 2px solid var(--border-light);
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  transition: background 0.15s, border-color 0.15s;
}
.step-check:hover, .mat-check:hover { border-color: var(--green); }
.step-check:checked, .mat-check:checked {
  background: var(--green);
  border-color: var(--green);
}
.step-check:checked::after, .mat-check:checked::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #fff;
  font-family: var(--font-mono);
}

/* Checked step card */
.step-done { opacity: 0.4; }
.step-done .step-name { text-decoration: line-through; text-decoration-color: var(--green); }

/* Checked material card */
.mat-done { opacity: 0.4; }
.mat-done .raw-name { text-decoration: line-through; }

/* Clickable raw material card */
.checkable-card { cursor: pointer; user-select: none; gap: 8px; }

/* All done message in overview */
.checklist-complete {
  grid-column: 1 / -1;
  font-family: var(--font-pixel);
  font-size: 18px;
  color: var(--green);
  text-align: center;
  padding: 20px;
  background: var(--green-glow);
  border: 1px solid var(--green-dim);
  letter-spacing: 1px;
}

/* ── Suggest Recipe Button ─────────────────────────────────────── */
.calc-suggest-row {
  border-top: 1px solid var(--border);
  margin-top: 14px;
  padding-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.btn-suggest-recipe {
  background: none;
  border-color: var(--border);
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.btn-suggest-recipe:hover {
  background: none;
  color: var(--gold);
  border-color: var(--gold-dim);
}

/* ── Suggest Recipe Modal ──────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.modal-box {
  background: var(--surface);
  border: 1px solid var(--border-light);
  padding: 28px 32px;
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-title {
  font-family: var(--font-pixel);
  font-size: 18px;
  color: var(--gold);
  margin: 0;
}

.modal-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

.modal-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-field label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-required { color: var(--red); }
.modal-optional { color: var(--text-muted); font-size: 11px; text-transform: none; }

.modal-field input,
.modal-field textarea {
  background: #0c0c0c;
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 8px 10px;
  outline: none;
  resize: vertical;
  transition: border-color 0.15s;
}
.modal-field input:focus,
.modal-field textarea:focus { border-color: var(--gold); }

.modal-error {
  font-size: 13px;
  color: #ff8a80;
  background: rgba(192, 57, 43, 0.1);
  border: 1px solid var(--red-dim);
  padding: 8px 10px;
}

.modal-success {
  font-size: 13px;
  color: var(--green);
  background: var(--green-glow);
  border: 1px solid var(--green-dim);
  padding: 8px 10px;
}

.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .calc-row { flex-direction: column; }
  .calc-field-qty, #qty-input { width: 100%; }
  .admin-grid { grid-template-columns: 1fr; }
  nav { padding: 0 12px; }
  .nav-brand { font-size: 20px; }
}