/* ==========================================================================
   Militia Trading — site theme
   Built on top of Bootstrap 4 + Themify Icons only (the SaasLand style.css/
   main.js bundle was dropped: it mixes 80+ demo-page variants and fighting
   its dark-mode selectors page-by-page was less reliable than a small,
   self-contained dark theme). Pricing/cart imagery reused from the template.
   ========================================================================== */

:root {
  --bg: #050608;
  --bg-elevated: #0c0f16;
  --bg-card: #11141c;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #ffffff;
  --text-muted: #9aa0ac;
  --brand: #1352f0;
  --brand-light: #4d7dff;
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --radius: 12px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
}

a { color: var(--brand-light); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--text); text-decoration: none; }

h1, h2, h3, h4, h5, h6 { color: var(--text); font-weight: 700; letter-spacing: -0.02em; }

.text-muted-mt { color: var(--text-muted) !important; }

.container-narrow { max-width: 720px; margin: 0 auto; }

/* ---------- buttons ---------- */
.btn-brand {
  background: var(--brand);
  border: 1px solid var(--brand);
  color: #fff;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 8px;
  transition: background .15s ease, border-color .15s ease, transform .1s ease;
}
.btn-brand:hover { background: var(--brand-light); border-color: var(--brand-light); color: #fff; transform: translateY(-1px); }
.btn-brand:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn-outline-brand {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-weight: 600;
  padding: 11px 27px;
  border-radius: 8px;
  transition: border-color .15s ease, background .15s ease;
}
.btn-outline-brand:hover { border-color: var(--brand-light); background: rgba(19, 82, 240, 0.08); color: #fff; }

.btn-danger-outline {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: var(--danger);
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 14px;
}
.btn-danger-outline:hover { background: rgba(239, 68, 68, 0.1); color: var(--danger); }

/* ---------- header / nav ---------- */
.site-header {
  background: rgba(5, 6, 8, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.site-header .navbar-brand img { height: 105px; }
.navbar > .container,
.navbar > .container-fluid,
.navbar > .container-lg,
.navbar > .container-md,
.navbar > .container-sm,
.navbar > .container-xl,
.navbar > .container-xxl {
  display: flex;
  flex-wrap: inherit;
  align-items: center;
  justify-content: space-between;
  height: 109px;
}
.site-header .nav-link {
  color: var(--text-muted) !important;
  font-weight: 500;
  padding: 0.6rem 1rem !important;
}
.site-header .nav-link:hover, .site-header .nav-link.active { color: var(--text) !important; }
.site-header .navbar-toggler { border-color: var(--border-strong); }
.site-header .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,0.85)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.cart-icon-link { position: relative; color: var(--text) !important; font-size: 20px; margin-left: 25px; }
.cart-count-badge {
  position: absolute; top: -6px; right: -10px;
  background: var(--brand); color: #fff; font-size: 11px; font-weight: 700;
  border-radius: 50%; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center;
}

@media (max-width: 991px) {
  .site-header .navbar-collapse { padding-top: 1rem; border-top: 1px solid var(--border); margin-top: 1rem; }
}

/* ---------- hero ---------- */
.hero {
  padding: 160px 0 120px;
  background:
    linear-gradient(180deg, rgba(5, 6, 8, 0.55) 0%, rgba(5, 6, 8, 0.88) 65%, var(--bg) 100%),
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(19, 82, 240, 0.35), transparent),
    url('/assets/img/brand/hero-chart.jpg') center 30% / cover no-repeat,
    var(--bg);
  text-align: center;
  position: relative;
}
.hero h1 { font-size: 3.2rem; line-height: 1.15; margin-bottom: 22px; }
.hero h1 span { color: var(--brand-light); }
.hero p.lead { color: var(--text-muted); font-size: 1.2rem; max-width: 680px; margin: 0 auto 36px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(19, 82, 240, 0.12); border: 1px solid rgba(19, 82, 240, 0.3);
  color: var(--brand-light); font-size: 13px; font-weight: 600;
  padding: 6px 16px; border-radius: 100px; margin-bottom: 26px;
}
.hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); }

/* ---------- sections ---------- */
.section { padding: 90px 0; }
.section-alt { background: var(--bg-elevated); }
.section-title { text-align: center; margin-bottom: 60px; }
.section-title h2 { font-size: 2.2rem; margin-bottom: 14px; }
.section-title p { color: var(--text-muted); font-size: 1.05rem; max-width: 600px; margin: 0 auto; }

.feature-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px 28px; height: 100%; transition: border-color .15s ease, transform .15s ease;
}
.feature-card:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.feature-card .icon {
  width: 48px; height: 48px; border-radius: 10px;
  background: rgba(19, 82, 240, 0.14); color: var(--brand-light);
  display: flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: 18px;
}
.feature-card h5 { margin-bottom: 10px; }
.feature-card p { color: var(--text-muted); margin-bottom: 0; font-size: 0.95rem; }

.step-item { text-align: center; padding: 0 16px; }
.step-num {
  width: 44px; height: 44px; border-radius: 50%; background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; margin: 0 auto 18px;
}
.step-item h5 { margin-bottom: 10px; }
.step-item p { color: var(--text-muted); font-size: 0.92rem; }

.disclaimer-box {
  background: rgba(245, 158, 11, 0.08); border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius); padding: 20px 24px; color: var(--text-muted); font-size: 0.92rem;
}
.disclaimer-box strong { color: var(--warning); }

/* ---------- pricing ---------- */
.pricing-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 40px 32px; height: 100%; display: flex; flex-direction: column; position: relative;
  transition: border-color .15s ease, transform .15s ease;
}
.pricing-card:hover { transform: translateY(-4px); }
.pricing-card.popular { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), 0 20px 60px -20px rgba(19, 82, 240, 0.5); }
.pricing-card .badge-popular {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--brand); color: #fff; font-size: 12px; font-weight: 700;
  padding: 5px 16px; border-radius: 100px;
}
.pricing-card h5 { font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 6px; }
.pricing-card .price { font-size: 2.8rem; font-weight: 800; margin: 10px 0 4px; }
.pricing-card .price sub { font-size: 1rem; font-weight: 500; color: var(--text-muted); }
.pricing-card .plan-desc { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 26px; }
.pricing-card ul { list-style: none; padding: 0; margin: 0 0 30px; flex-grow: 1; }
.pricing-card ul li { padding: 9px 0; border-top: 1px solid var(--border); font-size: 0.94rem; display: flex; align-items: flex-start; gap: 10px; }
.pricing-card ul li:first-child { border-top: none; }
.pricing-card ul li i { color: var(--success); margin-top: 3px; }
.pricing-card ul li.disabled { color: var(--text-muted); }
.pricing-card ul li.disabled i { color: var(--text-muted); }

/* ---------- cart ---------- */
.cart-empty { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.cart-item {
  display: flex; align-items: center; gap: 20px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 16px;
}
.cart-item img { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; }
.cart-item .name { font-weight: 600; margin-bottom: 4px; }
.cart-item .meta { color: var(--text-muted); font-size: 0.88rem; }
.cart-item .price { font-weight: 700; font-size: 1.1rem; margin-left: auto; }
.cart-summary { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.cart-summary .row-line { display: flex; justify-content: space-between; padding: 10px 0; color: var(--text-muted); }
.cart-summary .row-line.total { color: var(--text); font-weight: 700; font-size: 1.15rem; border-top: 1px solid var(--border); margin-top: 10px; padding-top: 16px; }

/* ---------- forms / auth ---------- */
.auth-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 44px 40px; max-width: 460px; margin: 0 auto;
}
.form-control-dark {
  background: var(--bg-elevated); border: 1px solid var(--border-strong); color: var(--text);
  border-radius: 8px; padding: 11px 14px; width: 100%; font-size: 0.95rem;
}
.form-control-dark:focus { outline: none; border-color: var(--brand); background: var(--bg-elevated); color: var(--text); box-shadow: 0 0 0 3px rgba(19, 82, 240, 0.2); }
.form-control-dark::placeholder { color: #5c6270; }
label.form-label-dark { color: var(--text-muted); font-size: 0.88rem; font-weight: 500; margin-bottom: 6px; display: block; }
.form-error { color: var(--danger); font-size: 0.85rem; margin-top: 6px; min-height: 1.2em; }
.form-note { color: var(--text-muted); font-size: 0.85rem; margin-top: 22px; text-align: center; }

/* ---------- dashboard ---------- */
.dash-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; margin-bottom: 24px; }
.dash-card h4 { font-size: 1.15rem; margin-bottom: 20px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: 100px; font-size: 0.85rem; font-weight: 600; }
.status-pill.active { background: rgba(34, 197, 94, 0.14); color: var(--success); }
.status-pill.inactive, .status-pill.past_due { background: rgba(239, 68, 68, 0.14); color: var(--danger); }
.status-pill.unactivated { background: rgba(245, 158, 11, 0.14); color: var(--warning); }
.status-pill.deactivated { background: rgba(255, 255, 255, 0.08); color: var(--text-muted); }
.status-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.key-row { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.key-row:first-child { border-top: none; }
.key-row .key-value { font-family: 'SFMono-Regular', Consolas, monospace; font-size: 0.92rem; color: var(--text-muted); }
.key-row .key-meta { color: var(--text-muted); font-size: 0.82rem; }

.raw-key-box {
  background: var(--bg-elevated); border: 1px dashed var(--brand); border-radius: 8px;
  padding: 18px 20px; font-family: 'SFMono-Regular', Consolas, monospace; font-size: 1rem;
  word-break: break-all; margin: 16px 0; color: var(--text);
}

.slots-bar { background: var(--bg-elevated); border-radius: 100px; height: 8px; overflow: hidden; margin-top: 10px; }
.slots-bar .fill { background: var(--brand); height: 100%; }

/* ---------- footer ---------- */
.site-footer { background: var(--bg-elevated); border-top: 1px solid var(--border); padding: 60px 0 30px; }
.site-footer h6 { color: var(--text); font-size: 0.95rem; margin-bottom: 18px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { margin-bottom: 10px; }
.site-footer ul li a { color: var(--text-muted); font-size: 0.92rem; }
.site-footer ul li a:hover { color: var(--text); }
.site-footer .footer-brand img { height: 125px; margin-bottom: 16px; }
.site-footer .footer-brand p { color: var(--text-muted); font-size: 0.9rem; }
.site-footer .footer-bottom { border-top: 1px solid var(--border); margin-top: 40px; padding-top: 24px; color: var(--text-muted); font-size: 0.85rem; }

/* ---------- misc ---------- */
.page-header { padding: 60px 0 40px; text-align: center; border-bottom: 1px solid var(--border); }
.page-header h1 { font-size: 2.2rem; }
.spinner-brand { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.alert-dark-success { background: rgba(34, 197, 94, 0.1); border: 1px solid rgba(34, 197, 94, 0.35); color: var(--success); border-radius: 8px; padding: 14px 18px; font-size: 0.9rem; }
.alert-dark-danger { background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.35); color: var(--danger); border-radius: 8px; padding: 14px 18px; font-size: 0.9rem; }
