/* ═══════════════════════════════════════════════════════
   theme.css — TaskTrevor Design System
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;1,300&family=DM+Mono:wght@400;500&display=swap');

/* ── Variables ── */
:root {
  --bg:       #050c1a;
  --surface:  #0b1628;
  --surface2: #0f1e38;
  --border:   rgba(255,255,255,0.07);
  --cyan:     #00d4ff;
  --green:    #00f5a0;
  --amber:    #ffb800;
  --pink:     #ff4d8d;
  --white:    #f0f6ff;
  --muted:    #4a6080;
  --text:     #c8d8f0;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
ul, ol { list-style: none; padding: 0; }

/* ── Base ── */
html, body {
  width: 100%;
  min-height: 100vh;
  background: var(--bg);
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  overflow-x: hidden;
}

/* ── Noise grain overlay ── */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.5;
}

/* ── Background orbs ── */
.orb {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(120px);
  opacity: 0.12;
}
.orb-1 { width: 600px; height: 600px; top: -200px;  left: -100px;  background: var(--cyan); }
.orb-2 { width: 500px; height: 500px; bottom: -100px; right: -100px; background: var(--pink); }

/* ── Page wrapper ── */
.page-wrap {
  position: relative;
  z-index: 1;
}

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(0,245,160,0.2); }
  50%       { box-shadow: 0 0 0 7px rgba(0,245,160,0.05); }
}
.anim-fadeup   { animation: fadeUp 0.6s ease both; }
.anim-delay-1  { animation-delay: 0.05s; }
.anim-delay-2  { animation-delay: 0.1s;  }
.anim-delay-3  { animation-delay: 0.15s; }
.anim-delay-4  { animation-delay: 0.2s;  }
.anim-delay-5  { animation-delay: 0.25s; }
.anim-delay-6  { animation-delay: 0.3s;  }

/* ── Typography ── */
.eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--cyan);
  opacity: 0.85;
  display: block;
  margin-bottom: 10px;
}

h1, h2.display, .display-heading {
  font-family: 'Bebas Neue', sans-serif;
  color: var(--white);
  letter-spacing: 1px;
  line-height: 1.05;
}

/* ── Site Header ── */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 18px 20px;
  position: relative;
  z-index: 10;
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  letter-spacing: 1.5px;
  line-height: 1;
  color: var(--white);
  text-decoration: none;
  display: flex;
  align-items: center;
}
.wordmark-task    { color: var(--muted); }
.wordmark-trevor  { color: var(--cyan);  }
.wordmark-portal {
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  font-size: 0.85rem;
  letter-spacing: 0.01em;
  margin-left: 10px;
}

/* ── Navigation ── */
.nav-menu { position: relative; }

.nav-menu-btn {
  padding: 7px 14px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: border-color 0.2s, color 0.2s;
}
.nav-menu-btn:hover { border-color: var(--cyan); color: var(--cyan); }

.nav-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  min-width: 180px;
  overflow: hidden;
  z-index: 100;
}
.nav-dropdown.open { display: block; }

.nav-dropdown-item {
  display: block;
  padding: 12px 18px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.nav-dropdown-item:hover { background: rgba(255,255,255,0.04); color: var(--cyan); }
.nav-dropdown-item + .nav-dropdown-item { border-top: 1px solid var(--border); }

/* ── Layout Container ── */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  z-index: 1;
}

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: rgba(255,255,255,0.14);
}
/* Default card top accent (invisible) */
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
}

/* Accent variants */
.card-cyan::before  { background: var(--cyan);  box-shadow: 0 0 20px var(--cyan);  }
.card-green::before { background: var(--green); box-shadow: 0 0 20px var(--green); }
.card-amber::before { background: var(--amber); box-shadow: 0 0 20px var(--amber); }
.card-pink::before  { background: var(--pink);  box-shadow: 0 0 20px var(--pink);  }

.card-cyan  { box-shadow: inset 0 0 60px rgba(0,212,255,0.04);  }
.card-green { box-shadow: inset 0 0 60px rgba(0,245,160,0.04);  }
.card-amber { box-shadow: inset 0 0 60px rgba(255,184,0,0.04);  }
.card-pink  { box-shadow: inset 0 0 60px rgba(255,77,141,0.04); }

/* ── Section title (DM Mono eyebrow style) ── */
.section-title, .card-label {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}

.empty-msg {
  color: var(--muted);
  font-style: italic;
  font-size: 0.88rem;
}

/* ── Form Elements ── */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
textarea,
select {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.95rem;
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
  resize: none;
}
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0,212,255,0.08);
}

/* ── Buttons ── */
button[type="submit"],
.btn-primary,
.submit-btn {
  padding: 13px 24px;
  background: var(--cyan);
  color: var(--bg);
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  letter-spacing: 0.02em;
  width: 100%;
}
button[type="submit"]:hover, .btn-primary:hover, .submit-btn:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}
button[type="submit"]:disabled, .submit-btn:disabled {
  opacity: 0.35;
  cursor: default;
  transform: none;
}

.btn-ghost {
  padding: 8px 18px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  letter-spacing: 0.02em;
}
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }

.btn-ghost-sm {
  padding: 6px 12px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.btn-ghost-sm:hover { border-color: rgba(255,255,255,0.18); color: var(--text); }

.btn-advance {
  padding: 9px 18px;
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: border-color 0.15s, color 0.15s;
}
.btn-advance:hover { border-color: var(--cyan); color: var(--cyan); }

.btn-done {
  padding: 9px 18px;
  background: rgba(0,245,160,0.15);
  color: var(--green);
  border: 1px solid rgba(0,245,160,0.3);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: background 0.15s;
}
.btn-done:hover { background: rgba(0,245,160,0.25); }

.btn-pickup {
  padding: 8px 20px;
  background: var(--cyan);
  color: var(--bg);
  border: none;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: opacity 0.15s;
}
.btn-pickup:hover { opacity: 0.85; }

.copy-btn {
  padding: 7px 16px;
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  margin-top: 8px;
  transition: border-color 0.2s;
}
.copy-btn:hover { border-color: var(--cyan); }

/* ── Badges ── */
.badge {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 4px;
  display: inline-block;
}
.badge.up   { background: rgba(0,245,160,0.12); color: var(--green); border: 1px solid rgba(0,245,160,0.25); }
.badge.down { background: rgba(255,184,0,0.12);  color: var(--amber); border: 1px solid rgba(255,184,0,0.3); }

/* ── Type Badges ── */
.type-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-family: 'DM Mono', monospace;
  font-size: 0.67rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  flex-shrink: 0;
  line-height: 1.4;
}
.type-task     { background: rgba(99,102,241,0.15); color: #818cf8;      border: 1px solid rgba(99,102,241,0.3); }
.type-purchase { background: rgba(255,184,0,0.12);  color: var(--amber); border: 1px solid rgba(255,184,0,0.3); }
.type-fix      { background: rgba(255,77,141,0.12); color: var(--pink);  border: 1px solid rgba(255,77,141,0.3); }
.type-question { background: rgba(0,212,255,0.12);  color: var(--cyan);  border: 1px solid rgba(0,212,255,0.3); }
.type-other    { background: rgba(74,96,128,0.15);  color: var(--muted); border: 1px solid rgba(74,96,128,0.3); }

/* ── Stage Badge ── */
.stage-badge {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(0,245,160,0.1);
  color: var(--green);
  border: 1px solid rgba(0,245,160,0.25);
  border-radius: 99px;
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── Login Screen ── */
#login-screen {
  min-height: calc(100vh - 73px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  position: relative;
  z-index: 1;
  padding: 24px;
}

.login-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 380px;
  position: relative;
  overflow: hidden;
  animation: fadeUp 0.6s ease both;
}
.login-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--cyan);
  box-shadow: 0 0 20px var(--cyan);
}
.login-box h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  color: var(--white);
  margin-bottom: 24px;
  letter-spacing: 1px;
}
.login-box form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.login-box input,
.login-box button { width: 100%; }

#login-error { color: var(--pink); font-size: 0.85rem; margin-top: 10px; }

.login-home-btn {
  display: block;
  text-align: center;
  margin-top: 16px;
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
}
.login-home-btn:hover { color: var(--text); }

/* ── Progress Tracker ── */
.tracker-bar-bg {
  width: 100%;
  height: 8px;
  background: var(--surface2);
  border-radius: 999px;
  overflow: hidden;
}
.tracker-bar-fill {
  height: 100%;
  background: linear-gradient(to right, #00b374, var(--green));
  box-shadow: 0 0 10px rgba(0,245,160,0.4);
  border-radius: 999px;
  width: 0%;
  transition: width 0.5s ease;
}
.tracker-labels { display: flex; justify-content: space-between; }
.tracker-stage-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
  transition: color 0.3s ease;
}
.tracker-stage-label.stage-active   { color: var(--green); }
.tracker-stage-label.stage-complete { color: var(--text); }

/* ── Queue Items ── */
.queue-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.queue-item:last-child { border-bottom: none; }

.queue-pos {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  flex-shrink: 0;
}
.queue-name { font-weight: 500; font-size: 0.95rem; color: var(--text); }
.queue-code {
  margin-left: auto;
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  color: var(--muted);
}
.queue-item-body { display: flex; flex-direction: column; gap: 2px; }
.queue-timestamp { font-family: 'DM Mono', monospace; font-size: 0.72rem; color: var(--muted); }

/* ── Elapsed Timers ── */
.elapsed-timer {
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  color: var(--muted);
}
.public-elapsed-timer {
  font-family: 'DM Mono', monospace;
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--green);
  letter-spacing: 0.05em;
}

/* ── Stats Row ── */
.stats-row { display: flex; gap: 16px; margin-bottom: 20px; }
.stat-block { flex: 1; text-align: center; }
.stat-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 4px;
}
.stat-value {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.2rem;
  color: var(--green);
  letter-spacing: 1px;
  min-height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.queue-count-display {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.2rem;
  color: var(--white);
  letter-spacing: 1px;
}
.queue-avgwait-display { font-size: 0.85rem; color: var(--muted); margin-top: 6px; }

/* ── In Progress Card ── */
.current-card {
  display: block;
  background: var(--surface);
  border: 1px solid rgba(0,245,160,0.2);
  border-top: 2px solid var(--green);
  border-radius: 12px;
  padding: 20px;
  position: relative;
  box-shadow: inset 0 0 60px rgba(0,245,160,0.04);
}
.current-card-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.current-task-title { font-size: 1rem; font-weight: 600; color: var(--white); margin-bottom: 4px; }
.current-task-meta  { font-size: 0.82rem; color: var(--muted); margin-bottom: 8px; }

/* ── Done Items ── */
.done-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  gap: 10px;
  opacity: 0.65;
  transition: opacity 0.15s;
}
.done-item:last-child { border-bottom: none; }
.done-item:hover { opacity: 1; }
.done-item-info { display: flex; flex-direction: column; gap: 2px; }
.done-title { font-size: 0.88rem; color: var(--muted); }
.done-meta  { font-family: 'DM Mono', monospace; font-size: 0.72rem; color: var(--muted); opacity: 0.7; }
.done-note  { font-size: 0.78rem; color: var(--muted); font-style: italic; margin-top: 4px; }
.done-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ── Lookup Cards ── */
.lookup-card, .lcard {
  margin-top: 14px;
  padding: 16px 20px;
  border-radius: 10px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  background: var(--surface2);
}
.lookup-queued,    .lcard.queued     { border-left-color: var(--amber); box-shadow: inset 0 0 30px rgba(255,184,0,0.04); }
.lookup-inprogress,.lcard.inprogress { border-left-color: var(--green); box-shadow: inset 0 0 30px rgba(0,245,160,0.04); }
.lookup-done,      .lcard.done       { border-left-color: var(--muted); }
.lookup-notfound,  .lcard.notfound   { border-left-color: var(--border); color: var(--muted); font-size: 0.88rem; padding: 12px 16px; }
.lookup-code, .lcard-code { font-family: 'DM Mono', monospace; font-weight: 600; font-size: 1rem; color: var(--white); margin-bottom: 4px; }
.lookup-status, .lcard-status { font-size: 0.88rem; font-weight: 600; color: var(--text); }
.lookup-stage, .lcard-sub { font-size: 0.78rem; color: var(--muted); margin-top: 3px; }
.lookup-name { font-size: 0.78rem; color: var(--muted); margin-top: 4px; }
.last-completed { font-family: 'DM Mono', monospace; font-size: 0.8rem; color: var(--muted); margin-top: 4px; }
.lookup-prefix { font-family: 'DM Mono', monospace; font-size: 0.9rem; font-weight: 600; color: var(--muted); white-space: nowrap; }

/* ── Confirmation ── */
.confirm-card { text-align: center; padding: 12px 0; }
.confirm-title { font-family: 'Bebas Neue', sans-serif; font-size: 1.8rem; color: var(--white); margin-bottom: 20px; letter-spacing: 1px; }
.confirm-code-label { font-family: 'DM Mono', monospace; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 8px; }
.confirm-code { font-family: 'DM Mono', monospace; font-size: 2.2rem; font-weight: 500; letter-spacing: 0.05em; color: var(--cyan); margin-bottom: 12px; }
.confirm-note { font-size: 0.82rem; color: var(--muted); margin-bottom: 24px; }

/* ── Admin toast ── */
.admin-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--green);
  color: var(--bg);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 99px;
  box-shadow: 0 4px 20px rgba(0,245,160,0.3);
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  z-index: 999;
  white-space: nowrap;
}
.admin-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Admin action buttons ── */
.admin-btn {
  padding: 8px 18px;
  background: var(--cyan);
  color: var(--bg);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: opacity 0.2s;
  display: inline-block;
}
.admin-btn:hover { opacity: 0.85; }

/* ── Mobile ── */
@media (max-width: 480px) {
  .tracker-stage-label { font-size: 0.62rem; }
  .wordmark { font-size: 1.3rem; }
  .container { padding: 20px 16px; }
  .orb-1 { width: 300px; height: 300px; top: -150px; left: -150px; }
  .orb-2 { width: 250px; height: 250px; bottom: -150px; right: -150px; }
}
