/* HUDpilot app — styles mirror hudpilot.com (panther-safari/index.html).
   Navy and slate blue = structure. Amber and peach = action and emphasis. */
:root {
  --navy: #111419;
  --navy-2: #171b22;
  --line: rgba(133, 148, 171, 0.18);
  --slate: #8594ab;
  --slate-light: #b4bfd0;
  --text: #dfe4ec;
  --amber: #d69b4b;
  --amber-light: #e6b36f;
  --peach: #f3c98a;
  --ink: #14110c;            /* dark text on amber */
  --danger: #e57373;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--navy);
  color: var(--text);
  font: 16px/1.6 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 16px;
  overflow-x: hidden;
  position: relative;
}

/* Background: drifting amber + slate glows and a faint grid, as in the site's hero */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(620px 620px at 12% 8%, rgba(214, 155, 75, 0.22), transparent 65%),
    radial-gradient(560px 560px at 92% 30%, rgba(133, 148, 171, 0.2), transparent 65%),
    radial-gradient(700px 600px at 55% 110%, rgba(214, 155, 75, 0.14), transparent 65%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(133, 148, 171, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(133, 148, 171, 0.12) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 75%);
}

/* Card: gradient panel, amber-tinted border, glowing top edge, amber halo behind */
.card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  padding: 40px 34px 34px;
  border: 1px solid rgba(214, 155, 75, 0.45);
  border-radius: 20px;
  background:
    radial-gradient(500px 220px at 50% 0%, rgba(214, 155, 75, 0.1), transparent 70%),
    linear-gradient(180deg, #1b2029, #14181f);
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(214, 155, 75, 0.08),
    0 0 90px rgba(214, 155, 75, 0.28),
    0 0 180px rgba(214, 155, 75, 0.14);
}
.card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(230, 179, 111, 0.95), transparent);
}

/* Logo: matches the nav logo on hudpilot.com exactly */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Montserrat', 'Inter', system-ui, sans-serif;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.6;
  color: #fff;
  text-decoration: none;
  margin-bottom: 28px;
  width: max-content;
}
.logo b { font-weight: 800; }
.logo span { font-weight: 400; color: var(--slate); }
.logo img { width: 28px; height: 28px; }

h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0 0 8px;
}

/* Key word of each headline: the site's amber-to-peach headline gradient */
.hl {
  background: linear-gradient(100deg, var(--amber) 0%, var(--peach) 45%, var(--amber) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sub { color: var(--slate-light); margin: 0 0 28px; }

label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--slate-light);
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

input {
  width: 100%;
  padding: 13px 14px;
  margin-bottom: 18px;
  background: var(--navy);
  border: 1px solid rgba(133, 148, 171, 0.3);
  border-radius: 10px;
  color: #fff;
  font: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input::placeholder { color: var(--slate); }
input:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(214, 155, 75, 0.32), 0 0 24px rgba(214, 155, 75, 0.3);
}

/* Primary button: amber with glow, peach hover and the site's light sweep */
button, .button {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 14px;
  border: 0;
  border-radius: 10px;
  background: var(--amber);
  color: var(--ink);
  font: 700 16px 'Inter', sans-serif;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: block;
  box-shadow: 0 8px 24px rgba(214, 155, 75, 0.25);
  transition: background 0.15s, box-shadow 0.15s, transform 0.15s;
}
button::after, .button::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s;
}
button:hover, .button:hover {
  background: var(--peach);
  box-shadow: 0 10px 34px rgba(214, 155, 75, 0.55), 0 0 0 1px rgba(243, 201, 138, 0.5);
  transform: translateY(-1px);
}
button:hover::after, .button:hover::after { left: 130%; }
button:disabled { opacity: 0.6; cursor: wait; transform: none; }

/* Secondary button: structure (slate), as the site's ghost buttons */
button.ghost {
  background: transparent;
  color: var(--slate-light);
  border: 1px solid rgba(133, 148, 171, 0.4);
  box-shadow: none;
}
button.ghost::after { display: none; }
button.ghost:hover {
  color: #fff;
  border-color: #aebcd2;
  background: rgba(133, 148, 171, 0.08);
  box-shadow: 0 0 0 1px rgba(133, 148, 171, 0.35) inset;
}

/* Action links in amber */
.switch { margin: 22px 0 0; text-align: center; color: var(--slate); font-size: 14px; }
.switch a { color: var(--amber); font-weight: 600; text-decoration: none; }
.switch a:hover { color: var(--peach); text-decoration: underline; text-underline-offset: 3px; }
.switch a.quiet { color: var(--slate-light); font-weight: 500; }
.switch a.quiet:hover { color: var(--amber-light); }

.msg { padding: 12px 14px; border-radius: 10px; font-size: 14px; margin-bottom: 18px; }
.msg.error { background: rgba(229, 115, 115, 0.12); border: 1px solid rgba(229, 115, 115, 0.3); color: var(--danger); }
.msg.ok { background: rgba(214, 155, 75, 0.1); border: 1px solid rgba(214, 155, 75, 0.45); color: var(--amber-light); }

/* Home: account facts */
.fact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.fact span { color: var(--slate); }
.fact strong { color: #fff; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.fact + button { margin-top: 28px; }

.pill {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink) !important;
  background: var(--amber);
  border-radius: 999px;
  padding: 4px 12px;
  box-shadow: 0 0 16px rgba(214, 155, 75, 0.35);
}

/* Phones: a little less padding so long values (emails) fit on one line */
@media (max-width: 480px) {
  .card { padding: 32px 22px 26px; }
  h1 { font-size: 30px; }
  .fact strong { font-size: 14px; }
}

/* ===== Dashboard screens (SOP upload, tab review) ===== */
.card.wide { max-width: 920px; }
body.top { align-items: flex-start; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.topbar .logo { margin-bottom: 0; }
.topbar a.back { color: var(--slate-light); font-size: 14px; text-decoration: none; }
.topbar a.back:hover { color: var(--amber-light); }

textarea {
  width: 100%;
  min-height: 220px;
  padding: 13px 14px;
  margin-bottom: 18px;
  background: var(--navy);
  border: 1px solid rgba(133, 148, 171, 0.3);
  border-radius: 10px;
  color: #fff;
  font: 15px/1.55 'Inter', system-ui, sans-serif;
  resize: vertical;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea::placeholder { color: var(--slate); }
textarea:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(214, 155, 75, 0.32), 0 0 24px rgba(214, 155, 75, 0.3);
}

/* Paste / Upload switch */
.segmented { display: flex; gap: 6px; padding: 4px; margin-bottom: 18px; background: var(--navy); border: 1px solid var(--line); border-radius: 12px; }
.segmented button {
  flex: 1; padding: 10px; background: transparent; color: var(--slate-light);
  box-shadow: none; font-weight: 600; font-size: 14px;
}
.segmented button::after { display: none; }
.segmented button:hover { background: rgba(133, 148, 171, 0.1); color: #fff; transform: none; box-shadow: none; }
.segmented button.on { background: rgba(214, 155, 75, 0.14); color: var(--amber-light); box-shadow: 0 0 0 1px rgba(214, 155, 75, 0.6) inset; }

.drop {
  display: block; text-align: center; padding: 40px 20px; margin-bottom: 18px; cursor: pointer;
  border: 1.5px dashed rgba(214, 155, 75, 0.45); border-radius: 14px;
  background: radial-gradient(400px 160px at 50% 0%, rgba(214, 155, 75, 0.08), transparent 70%);
  color: var(--slate-light); transition: border-color 0.15s, background 0.15s;
  text-transform: none; letter-spacing: 0; font-size: 15px; font-weight: 400;
}
.drop:hover, .drop.over { border-color: var(--amber); background-color: rgba(214, 155, 75, 0.06); }
.drop strong { display: block; color: var(--amber-light); font-size: 16px; margin-bottom: 4px; }
.drop small { color: var(--slate); }
.drop input { display: none; }

.hint { color: var(--slate); font-size: 13.5px; margin: -8px 0 18px; }

/* Building progress */
.building { text-align: center; padding: 20px 0 8px; }
.building .bar { height: 6px; border-radius: 999px; background: rgba(133, 148, 171, 0.2); overflow: hidden; margin: 18px 0 14px; }
.building .bar i {
  display: block; height: 100%; width: 40%; border-radius: 999px;
  background: linear-gradient(90deg, #d69b4b, #f0c27f);
  animation: slide 1.4s ease-in-out infinite;
}
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }
.building p { color: var(--slate-light); margin: 0; }

/* Review: tab strip + items */
.tabstrip { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.tabstrip button {
  width: auto; padding: 8px 14px; font-size: 13.5px; font-weight: 600;
  background: var(--navy); color: var(--slate-light);
  border: 1px solid rgba(133, 148, 171, 0.3); box-shadow: none;
}
.tabstrip button::after { display: none; }
.tabstrip button:hover { background: var(--navy); color: #fff; border-color: rgba(214, 155, 75, 0.5); transform: none; box-shadow: none; }
.tabstrip button.on { color: var(--amber-light); border-color: var(--amber); background: rgba(214, 155, 75, 0.1); }
.tabstrip button small { margin-left: 6px; color: var(--slate); font-weight: 500; }
.tabstrip button.on small { color: var(--amber); }

.tabhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.tabhead h2 { font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-size: 24px; margin: 0; color: #fff; }
.badge {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--slate-light); border: 1px solid rgba(133, 148, 171, 0.45); border-radius: 999px; padding: 3px 10px;
}

.item {
  position: relative; padding: 16px; margin-bottom: 12px; border-radius: 12px;
  background: rgba(17, 20, 25, 0.6); border: 1px solid var(--line); border-top: 2px solid rgba(214, 155, 75, 0.6);
}
.item input { margin-bottom: 10px; font-weight: 600; }
.item textarea { min-height: 90px; margin-bottom: 0; }
.item .remove {
  position: absolute; top: 27px; right: 24px; width: auto; padding: 4px 10px; font-size: 12px; font-weight: 600;
  background: transparent; color: var(--slate); border: 1px solid transparent; box-shadow: none;
}
.item .remove::after { display: none; }
.item .remove:hover { color: var(--danger); border-color: rgba(229, 115, 115, 0.4); background: transparent; transform: none; box-shadow: none; }
.item.has-remove input { padding-right: 84px; }

.empty {
  text-align: center; padding: 30px 20px; margin-bottom: 12px; border-radius: 12px;
  border: 1.5px dashed rgba(133, 148, 171, 0.35); color: var(--slate);
}

.actions { display: flex; gap: 12px; margin-top: 18px; }
.actions button { flex: 1; }
.saved-note { text-align: center; color: var(--amber-light); font-size: 14px; min-height: 22px; margin-top: 12px; }

.next { display: grid; gap: 12px; margin-top: 28px; }
.next .button.ghost-link {
  background: transparent; color: var(--amber-light); border: 1px solid rgba(214, 155, 75, 0.6); box-shadow: none;
}
.next .button.ghost-link::after { display: none; }
.next .button.ghost-link:hover { background: rgba(214, 155, 75, 0.1); color: var(--peach); }
.next + button { margin-top: 12px; }

@media (max-width: 480px) {
  .actions { flex-direction: column; }
  .tabhead h2 { font-size: 21px; }
}

/* ===== Demo mode, approvals, blind spots ===== */
.label-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.label-row label { margin: 0; }
button.small, .button.small { width: auto; padding: 7px 12px; font-size: 13px; }

body.demo { padding-top: 76px; }
.demo-banner {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 50;
  max-width: calc(100% - 32px); padding: 8px 16px; border-radius: 999px;
  background: rgba(23, 27, 34, 0.92); backdrop-filter: blur(8px);
  border: 1px solid rgba(214, 155, 75, 0.6); color: var(--slate-light); font-size: 13.5px; text-align: center;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45), 0 0 24px rgba(214, 155, 75, 0.25);
}
.demo-banner b { color: var(--amber-light); }

.tabhead-right { display: flex; align-items: center; gap: 10px; }
.badge.ok { color: var(--ink); background: var(--amber); border-color: var(--amber); box-shadow: 0 0 14px rgba(214, 155, 75, 0.4); }
button.approve { width: auto; padding: 8px 16px; font-size: 14px; }
.tabstrip button em { font-style: normal; color: var(--amber); margin-right: 5px; }

.flags {
  margin-bottom: 24px; padding: 16px 18px; border-radius: 14px;
  border: 1px solid rgba(214, 155, 75, 0.55);
  background: radial-gradient(400px 160px at 0% 0%, rgba(214, 155, 75, 0.12), transparent 70%), rgba(17, 20, 25, 0.6);
}
.flags-head { display: flex; align-items: center; gap: 10px; font-weight: 700; color: #fff; margin-bottom: 10px; }
.flags-head small { font-weight: 400; color: var(--slate); font-size: 13px; }
.flags-head .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 8px 2px rgba(214, 155, 75, 0.8); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 14px 5px rgba(214, 155, 75, 0.95); } }
.flag { display: flex; justify-content: space-between; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.flag b { color: #fff; font-weight: 600; }
.flag b span { color: var(--amber-light); }
.flag p { margin: 4px 0 0; color: var(--slate-light); font-size: 14.5px; }
.flag-actions { display: flex; gap: 8px; align-items: flex-start; flex-shrink: 0; }

/* Walkthrough */
.tour-lit { position: relative; z-index: 40; border-radius: 12px; box-shadow: 0 0 0 3px var(--amber), 0 0 34px rgba(214, 155, 75, 0.55) !important; }
.tour-tip {
  position: absolute; z-index: 60; padding: 18px 18px 16px; border-radius: 16px;
  background: #1b2029; border: 1px solid rgba(214, 155, 75, 0.7); color: var(--text);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(214, 155, 75, 0.25);
}
.tour-tip::before {
  content: ""; position: absolute; top: -7px; left: calc(var(--arrow, 32px) - 6px); width: 12px; height: 12px; transform: rotate(45deg);
  background: #1b2029; border-left: 1px solid rgba(214, 155, 75, 0.7); border-top: 1px solid rgba(214, 155, 75, 0.7);
}
.tour-tip.above::before { top: auto; bottom: -7px; transform: rotate(225deg); }
.tour-tip h3 { font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-size: 20px; color: #fff; margin: 4px 0 6px; }
.tour-tip p { margin: 0 0 14px; font-size: 14.5px; color: var(--slate-light); }
.tour-count { font-size: 11.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--amber); }
.tour-buttons { display: flex; gap: 10px; justify-content: flex-end; }
.tour-buttons button, .tour-buttons .button { width: auto; padding: 9px 16px; font-size: 14px; }
.tour-tip.final {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(440px, calc(100% - 32px)); padding: 30px 28px 26px; text-align: center;
}
.tour-tip.final::before { display: none; }
.tour-tip.final h3 { font-size: 28px; }
.tour-tip.final .tour-buttons { flex-direction: column; }
.tour-tip.final .tour-buttons .button, .tour-tip.final .tour-buttons button { width: 100%; padding: 13px; font-size: 15px; }
.tour-shade { position: fixed; inset: 0; z-index: 55; background: rgba(10, 12, 16, 0.7); backdrop-filter: blur(3px); }
.tour-restart {
  position: fixed; right: 16px; bottom: 16px; z-index: 50; width: auto; padding: 10px 16px; font-size: 14px;
}

@media (max-width: 600px) {
  .tabhead { flex-wrap: wrap; }
  .flag { flex-direction: column; }
  .demo-banner { position: absolute; width: calc(100% - 32px); font-size: 12.5px; border-radius: 12px; }
  body.demo { padding-top: 84px; }
}
