/* ============================================================
   barox NMS Portal — Design System
   Primary: Night Blue #002D4E  |  Amber #F7A600
   ============================================================ */

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:       #002D4E;
  --navy-dark:  #001829;
  --navy-mid:   #003A63;
  --navy-light: #0A4A7A;
  --amber:      #F7A600;
  --amber-dark: #C48500;
  --amber-dim:  rgba(247,166,0,0.15);
  --white:      #FFFFFF;
  --gray:       #8BA3B8;
  --gray-dim:   #4A6A85;
  --red:        #E05555;
  --green:      #4CAF7D;
  --border:     rgba(247,166,0,0.18);
  --border-mid: rgba(247,166,0,0.30);
  --radius:     4px;
  --radius-md:  6px;
  --radius-lg:  8px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  background: var(--navy-dark);
  color: var(--white);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 15px;
  line-height: 1.6;
}

a { color: var(--amber); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Navigation ──────────────────────────────────────────── */
.nav {
  background: var(--navy);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  flex-shrink: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-mark {
  width: 30px;
  height: 30px;
  background: var(--amber);
  clip-path: polygon(0 0, 100% 0, 100% 68%, 68% 100%, 0 100%);
  flex-shrink: 0;
}

.logo-text {
  font-family: 'Barlow Condensed', 'IBM Plex Sans', sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--white);
}

.logo-text span { color: var(--amber); }
.logo-sub { color: var(--gray); font-weight: 400; font-size: 14px; margin-left: 4px; }

.nav-actions { display: flex; gap: 10px; align-items: center; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  border: none;
  cursor: pointer;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  padding: 8px 20px;
  border-radius: var(--radius);
  transition: all .15s;
  display: inline-block;
  text-decoration: none;
  white-space: nowrap;
}

.btn-amber {
  background: var(--amber);
  color: #000;
  letter-spacing: .2px;
}
.btn-amber:hover { background: #ffc020; text-decoration: none; }
.btn-amber:active { transform: scale(0.98); }

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--border-mid);
}
.btn-outline:hover { border-color: var(--amber); color: var(--amber); text-decoration: none; }

.btn-ghost {
  background: transparent;
  color: var(--gray);
  border: none;
  padding: 8px 12px;
  font-size: 13px;
}
.btn-ghost:hover { color: var(--white); text-decoration: none; }

.btn-sm { padding: 6px 14px; font-size: 12.5px; }
.btn-lg { padding: 13px 32px; font-size: 15px; font-weight: 600; }

.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #c94444; }

.btn[disabled], .btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Badge / Tag ─────────────────────────────────────────── */
.badge-user {
  background: var(--navy-mid);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius);
  padding: 4px 12px;
  font-size: 12.5px;
  color: var(--amber);
}

.badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .8px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 2px;
}

.badge-active    { background: rgba(76,175,125,0.12); border: 1px solid rgba(76,175,125,0.3); color: var(--green); }
.badge-expired   { background: rgba(224,85,85,0.12);  border: 1px solid rgba(224,85,85,0.3);  color: var(--red); }
.badge-available { background: var(--amber-dim);       border: 1px solid rgba(247,166,0,0.4); color: var(--amber); }

/* ── Flash Messages ──────────────────────────────────────── */
.flash {
  max-width: 760px;
  margin: 1rem auto;
  padding: .75rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: .88rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.flash-success { background: rgba(76,175,125,0.1);  border: 1px solid rgba(76,175,125,0.3); color: #6fcf6f; }
.flash-error   { background: rgba(224,85,85,0.1);   border: 1px solid rgba(224,85,85,0.3);  color: #ff8080; }
.flash-info    { background: var(--amber-dim);       border: 1px solid var(--border-mid);    color: var(--amber); }
.flash-icon    { font-weight: 700; font-size: 1rem; }

/* ── Layout Wrappers ─────────────────────────────────────── */
.page-content { flex: 1; }
.container    { max-width: 900px; margin: 0 auto; padding: 0 1.5rem; }
.wrap-sm      { max-width: 520px; margin: 0 auto; padding: 0 1.5rem; }
.wrap-md      { max-width: 680px; margin: 0 auto; padding: 0 1.5rem; }

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  padding: 5rem 1.5rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% -10%, rgba(247,166,0,0.07), transparent);
  pointer-events: none;
}

.hero-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--amber);
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}

.hero-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.5px;
  margin-bottom: 1.4rem;
}

.hero-title .accent { color: var(--amber); }

.hero-sub {
  font-size: 1rem;
  color: var(--gray);
  max-width: 500px;
  margin: 0 auto 2.5rem;
  line-height: 1.75;
}

.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── Divider ─────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 0; }

/* ── Section ─────────────────────────────────────────────── */
.section { padding: 3.5rem 1.5rem; max-width: 900px; margin: 0 auto; }
.section-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: .4px;
  margin-bottom: .4rem;
}
.section-sub { color: var(--gray); font-size: .88rem; margin-bottom: 2rem; }

/* ── Feature Cards ───────────────────────────────────────── */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }

.feature-card {
  background: rgba(0,45,78,0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color .2s;
}
.feature-card:hover { border-color: var(--border-mid); }

.feature-icon {
  width: 36px;
  height: 36px;
  margin-bottom: 1rem;
}

.fi-shield {
  width: 28px; height: 32px;
  background: var(--amber);
  clip-path: polygon(50% 0%,100% 18%,100% 58%,50% 100%,0% 58%,0% 18%);
}
.fi-key {
  width: 30px; height: 14px;
  background: var(--amber);
  border-radius: 7px;
  position: relative;
  margin-top: 10px;
}
.fi-key::after {
  content: '';
  position: absolute;
  right: -12px; top: -5px;
  width: 12px; height: 24px;
  border: 3px solid var(--amber);
  border-radius: 4px;
}
.fi-clock {
  width: 30px; height: 30px;
  border: 3px solid var(--amber);
  border-radius: 50%;
  margin-top: 2px;
}

.feature-title { font-size: .95rem; font-weight: 600; margin-bottom: .4rem; }
.feature-text  { font-size: .82rem; color: var(--gray); line-height: 1.65; }

/* ── Steps ───────────────────────────────────────────────── */
.steps {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-top: 2rem;
  gap: 0;
}
.step-item {
  flex: 1;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1rem .5rem;
  position: relative;
}
.step-item:not(:last-child)::after {
  content: '→';
  position: absolute;
  right: -10px;
  top: 24px;
  color: var(--amber);
  font-size: 16px;
}
.step-num {
  width: 50px; height: 50px;
  border: 2px solid var(--amber);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--amber);
  margin-bottom: .75rem;
}
.step-title { font-size: .9rem; font-weight: 600; margin-bottom: .3rem; }
.step-label { font-size: .78rem; color: var(--gray); line-height: 1.5; }

/* ── Card ────────────────────────────────────────────────── */
.card {
  background: rgba(0,45,78,0.55);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  padding: 2rem;
}
.card-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: .3px;
  margin-bottom: 1.5rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--border);
}

/* ── Buy / Stepper ───────────────────────────────────────── */
.buy-wrap { max-width: 660px; margin: 2.5rem auto; padding: 0 1.5rem 4rem; }

.stepper {
  display: flex;
  gap: 0;
  margin-bottom: 2.5rem;
  position: relative;
}
.stepper::before {
  content: '';
  position: absolute;
  top: 13px;
  left: 10%;
  right: 10%;
  height: 1px;
  background: var(--border);
}

.s-item { flex: 1; text-align: center; position: relative; z-index: 1; }
.s-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border-mid);
  background: var(--navy-dark);
  margin: 0 auto 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--gray);
  transition: all .25s;
}
.s-dot.active { border-color: var(--amber); background: var(--amber); color: #000; }
.s-dot.done   { border-color: var(--amber); background: var(--amber); color: #000; }

.s-label { font-size: 11px; color: var(--gray); transition: color .2s; }
.s-label.active { color: var(--amber); font-weight: 500; }

/* ── License Package ─────────────────────────────────────── */
.license-pkg {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  transition: all .2s;
}
.license-pkg:hover,
.license-pkg.selected { border-color: var(--amber); background: rgba(247,166,0,0.05); }

.pkg-radio {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid var(--amber);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pkg-radio.sel::after {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--amber);
  display: block;
}

.pkg-name { font-weight: 600; font-size: .95rem; }
.pkg-desc { font-size: .8rem; color: var(--gray); margin-top: 3px; }
.pkg-price { margin-left: auto; text-align: right; flex-shrink: 0; }
.price-val {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--amber);
}
.price-per { font-size: .72rem; color: var(--gray); }

/* ── Forms ───────────────────────────────────────────────── */
.form-group { margin-bottom: 1.2rem; }

label {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--gray);
  letter-spacing: .6px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

input[type=text],
input[type=email],
input[type=password],
input[type=tel] {
  width: 100%;
  background: var(--navy-dark);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius);
  padding: 10px 14px;
  color: var(--white);
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: .9rem;
  outline: none;
  transition: border-color .2s;
}
input:focus { border-color: var(--amber); box-shadow: 0 0 0 2px rgba(247,166,0,0.1); }
input::placeholder { color: var(--gray-dim); }

.input-mono {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.help-text { font-size: .75rem; color: var(--gray); margin-top: 5px; line-height: 1.5; }
.field-error { font-size: .75rem; color: #ff8080; margin-top: 4px; }

/* ── Summary Box ─────────────────────────────────────────── */
.summary-box {
  background: rgba(0,24,41,0.7);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}
.sum-row { display: flex; justify-content: space-between; font-size: .85rem; padding: 4px 0; }
.sum-row.total {
  font-weight: 600;
  font-size: .95rem;
  color: var(--amber);
  border-top: 1px solid var(--border);
  margin-top: .5rem;
  padding-top: .75rem;
}

/* ── Payment ─────────────────────────────────────────────── */
.pay-row { display: flex; gap: 12px; }
.pay-field { flex: 1; }

.card-visual {
  background: var(--navy-mid);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  height: 80px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}
.card-chip { width: 28px; height: 20px; background: var(--amber); border-radius: 3px; opacity: .75; }
.card-network { font-size: 11px; font-weight: 600; color: var(--gray); letter-spacing: 1px; }

.stripe-note {
  font-size: .77rem;
  color: var(--gray);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: .75rem;
  padding: .65rem .9rem;
  background: rgba(247,166,0,0.04);
  border-radius: var(--radius);
  border-left: 2px solid var(--amber);
  line-height: 1.5;
}
.stripe-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--amber);
  letter-spacing: 1px;
  white-space: nowrap;
  margin-top: 1px;
}

.btn-row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 1.75rem; }

/* ── Success Page ────────────────────────────────────────── */
.success-wrap {
  max-width: 600px;
  margin: 3rem auto;
  padding: 0 1.5rem 4rem;
  text-align: center;
}
.success-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: rgba(247,166,0,0.08);
  border: 2px solid var(--amber);
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.checkmark { width: 32px; height: 32px; stroke: var(--amber); fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.success-title { font-family: 'Barlow Condensed', sans-serif; font-size: 2.2rem; font-weight: 800; margin-bottom: .75rem; }
.success-sub { color: var(--gray); margin-bottom: 2rem; line-height: 1.7; }

.lic-meta { text-align: left; margin-bottom: 1.5rem; }
.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .82rem;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.meta-row:last-child { border-bottom: none; }
.meta-key { color: var(--gray); }
.meta-val { font-family: 'JetBrains Mono', monospace; font-size: .78rem; }

.lic-preview {
  background: var(--navy-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  text-align: left;
  font-family: 'JetBrains Mono', monospace;
  font-size: .7rem;
  color: var(--amber);
  line-height: 1.5;
  margin-bottom: 1.5rem;
  max-height: 160px;
  overflow: auto;
  word-break: break-all;
}

/* ── Login / Register ────────────────────────────────────── */
.auth-wrap { max-width: 420px; margin: 4rem auto; padding: 0 1.5rem 4rem; }
.auth-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.9rem;
  font-weight: 700;
  margin-bottom: .4rem;
}
.auth-sub { color: var(--gray); font-size: .9rem; margin-bottom: 2rem; }
.auth-footer { font-size: .82rem; color: var(--gray); text-align: center; margin-top: 1.25rem; }
.link-inline { color: var(--amber); text-decoration: none; }
.link-inline:hover { text-decoration: underline; }

/* ── Portal ──────────────────────────────────────────────── */
.portal-wrap { max-width: 780px; margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }
.portal-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem; }
.portal-greeting { font-family: 'Barlow Condensed', sans-serif; font-size: 1.7rem; font-weight: 700; }
.portal-sub { color: var(--gray); font-size: .85rem; margin-top: 3px; }

.lic-card {
  background: rgba(0,45,78,0.55);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1.5rem;
}
.lic-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.5rem; gap: 1rem; }
.lic-product { font-size: 1rem; font-weight: 600; color: var(--amber); }
.lic-product-sub { font-size: .8rem; color: var(--gray); margin-top: 3px; }

.lic-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 1.5rem; }
.lic-field { background: rgba(0,24,41,0.5); border-radius: var(--radius); padding: .75rem 1rem; }
.lf-label { font-size: 10px; font-weight: 600; letter-spacing: .8px; color: var(--gray); text-transform: uppercase; margin-bottom: 4px; }
.lf-val { font-family: 'JetBrains Mono', monospace; font-size: .82rem; }

.progress-wrap { margin-bottom: 1.5rem; }
.progress-label { display: flex; justify-content: space-between; font-size: .78rem; color: var(--gray); margin-bottom: 6px; }
.progress-bar { height: 4px; background: rgba(247,166,0,0.1); border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--amber); border-radius: 2px; }
.progress-fill.warning { background: var(--red); }

.lic-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.history-card {
  background: rgba(0,45,78,0.4);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.hist-title { font-size: .9rem; font-weight: 600; margin-bottom: 1rem; color: var(--gray); text-transform: uppercase; letter-spacing: .5px; font-size: 11px; }
.hist-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .65rem 0;
  border-bottom: 1px solid var(--border);
  font-size: .82rem;
  flex-wrap: wrap;
  gap: .5rem;
}
.hist-row:last-child { border-bottom: none; }
.hist-inv { font-family: 'JetBrains Mono', monospace; font-size: .78rem; color: var(--amber); }
.hist-date { color: var(--gray); }
.hist-amt { font-weight: 500; }

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--gray);
}
.empty-state-icon { font-size: 2.5rem; margin-bottom: 1rem; opacity: .5; }
.empty-state-title { font-size: 1rem; font-weight: 600; margin-bottom: .5rem; color: var(--white); }
.empty-state-text { font-size: .85rem; line-height: 1.6; }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  background: var(--navy);
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  margin-top: auto;
}
.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-logo {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--amber);
  letter-spacing: 1px;
}
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { font-size: .82rem; color: var(--gray); text-decoration: none; }
.footer-links a:hover { color: var(--white); }
.footer-copy { font-size: .78rem; color: var(--gray-dim); }

/* ── Loading spinner ─────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid rgba(0,0,0,0.3);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Utility ─────────────────────────────────────────────── */
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.text-center { text-align: center; }
.text-amber { color: var(--amber); }
.text-gray  { color: var(--gray); }
.text-sm    { font-size: .85rem; }
.mono { font-family: 'JetBrains Mono', monospace; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 600px) {
  .nav { padding: 0 1rem; }
  .nav .btn-ghost { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .lic-grid { grid-template-columns: 1fr; }
  .step-item:not(:last-child)::after { display: none; }
  .portal-header { flex-direction: column; }
  .footer-inner { flex-direction: column; text-align: center; }
  .pay-row { flex-direction: column; }
}
