/* Visionix licensing site - self-hosted stylesheet.
   Palette / typography reused from the previous Nuxt theme (main.css). */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #e50914;
  --primary-dark: #b20710;
  --secondary: #141414;
  --accent: #564d4d;
  --background: #000000;
  --surface: #1a1a1a;
  --surface-2: #232323;
  --text: #ffffff;
  --text-muted: #999999;
  --ok: #22c55e;
  --warn: #f59e0b;
  --info: #60a5fa;

  --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-card: linear-gradient(145deg, #1a1a2e 0%, #16213e 100%);
  --gradient-button: linear-gradient(90deg, #e50914 0%, #b20710 100%);

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Poppins', var(--font-sans);
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;

  --shadow-sm: 0 2px 8px rgba(0,0,0,.1);
  --shadow-md: 0 4px 16px rgba(0,0,0,.2);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.3);
  --shadow-glow: 0 0 20px rgba(229,9,20,.3);

  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
}

html { font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; scroll-behavior: smooth; }
body { font-family: var(--font-sans); background: var(--background); color: var(--text); line-height: 1.6; overflow-x: hidden; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; margin-bottom: var(--space-md); }
h1 { font-size: clamp(1.9rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.4rem, 4vw, 2.2rem); }
h3, .h3 { font-size: clamp(1.1rem, 3vw, 1.5rem); margin-bottom: var(--space-sm); }
p { margin-bottom: var(--space-sm); color: var(--text-muted); }
p strong { color: var(--text); }
a { color: var(--primary); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: #ff3b46; }
ul, ol { padding-left: 1.25rem; color: var(--text-muted); }
li { margin-bottom: .35rem; }
li strong { color: var(--text); }
code, .mono { font-family: var(--font-mono); font-size: .95em; }
code { background: var(--surface-2); padding: .1em .35em; border-radius: 4px; }
small, .small { font-size: .85em; }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; color: var(--primary); font-weight: 600; margin-bottom: var(--space-xs); }
.lead { font-size: 1.15rem; }
.fineprint { font-size: .85rem; color: var(--text-muted); margin-top: var(--space-md); }
.gradient-text { background: var(--gradient-hero); -webkit-background-clip: text; background-clip: text; color: transparent; }
.debug { background: var(--surface); padding: var(--space-sm); border-radius: var(--radius-sm); overflow: auto; font-size: .8rem; color: var(--warn); }

.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 var(--space-md); }
.section { padding: var(--space-2xl) 0; }
.section-alt { background: var(--secondary); }
.section-narrow .container { max-width: 720px; }

/* Header / footer */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(0,0,0,.85); backdrop-filter: blur(10px); border-bottom: 1px solid #222; }
.nav-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); min-height: 60px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--text); font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }
.brand:hover { color: var(--text); }
.site-nav { display: flex; gap: var(--space-md); }
.site-nav a { color: var(--text-muted); font-weight: 500; }
.site-nav a.active, .site-nav a:hover { color: var(--text); }
.site-footer { border-top: 1px solid #222; padding: var(--space-lg) 0; font-size: .9rem; }
.site-footer .disclaimer { max-width: 800px; }
.footer-links { display: flex; gap: var(--space-md); flex-wrap: wrap; margin-bottom: var(--space-sm); }
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--text); }
.copy { font-size: .8rem; }

/* Hero */
.hero { padding: var(--space-2xl) 0 var(--space-xl); background: radial-gradient(ellipse at top, rgba(229,9,20,.18), transparent 60%); }
.hero-subtitle { font-size: 1.15rem; max-width: 720px; }
.hero-cta { display: flex; gap: var(--space-sm); flex-wrap: wrap; margin: var(--space-md) 0; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); padding: .8rem 1.6rem; font-size: 1rem; font-weight: 600; font-family: inherit; border: none; border-radius: var(--radius-md); cursor: pointer; transition: all var(--transition-base); text-decoration: none; line-height: 1.2; }
.btn-primary { background: var(--gradient-button); color: var(--text); box-shadow: var(--shadow-md); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg), var(--shadow-glow); color: var(--text); }
.btn-secondary { background: var(--surface); color: var(--text); border: 2px solid var(--accent); }
.btn-secondary:hover { border-color: var(--primary); background: rgba(229,9,20,.1); color: var(--text); }
.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid #333; }
.btn-ghost:hover { color: var(--text); border-color: #666; }
.btn-danger { background: transparent; color: #ff6b6b; border: 1px solid #7a1d1d; }
.btn-danger:hover { background: rgba(229,9,20,.15); color: #fff; }
.btn-sm { padding: .4rem .8rem; font-size: .85rem; border-radius: var(--radius-sm); }
.btn-block { width: 100%; }
.btn-pay { font-size: 1.1rem; padding: 1rem 2rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.linklike { background: none; border: 0; color: var(--text-muted); font: inherit; cursor: pointer; padding: 0; }
.linklike:hover { color: var(--text); }

/* Cards / grid */
.grid { display: grid; gap: var(--space-md); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.gap { gap: var(--space-md); }
.gap-sm { gap: var(--space-sm); }
.card { background: var(--gradient-card); border-radius: var(--radius-lg); padding: var(--space-lg); box-shadow: var(--shadow-md); }
.card h3 { margin-bottom: var(--space-xs); }
.card p:last-child { margin-bottom: 0; }

.steps { list-style: none; padding: 0; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding-left: 3rem; margin-bottom: var(--space-md); color: var(--text-muted); }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--gradient-button); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; }

.faq details { background: var(--surface); border-radius: var(--radius-md); padding: var(--space-sm) var(--space-md); margin-bottom: var(--space-xs); }
.faq summary { cursor: pointer; font-weight: 600; color: var(--text); list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; float: right; color: var(--primary); font-weight: 700; }
.faq details[open] summary::after { content: '\2212'; }
.faq details p { margin: var(--space-xs) 0 0; }

/* Notices / badges */
.notice { border-radius: var(--radius-md); padding: var(--space-sm) var(--space-md); margin: var(--space-md) 0; border: 1px solid; background: var(--surface); color: var(--text); font-size: .95rem; }
.notice a { font-weight: 600; }
.notice-warn { border-color: rgba(245,158,11,.5); background: rgba(245,158,11,.08); }
.notice-err { border-color: rgba(229,9,20,.6); background: rgba(229,9,20,.1); }
.notice-ok { border-color: rgba(34,197,94,.6); background: rgba(34,197,94,.1); }
.notice-info { border-color: rgba(96,165,250,.5); background: rgba(96,165,250,.08); }
.badge { display: inline-block; padding: .2rem .65rem; border-radius: 999px; font-size: .78rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; background: #333; color: #ddd; vertical-align: middle; }
.badge-free { background: rgba(96,165,250,.2); color: #93c5fd; }
.badge-trial { background: rgba(245,158,11,.2); color: #fcd34d; }
.badge-licensed, .badge-o-approved { background: rgba(34,197,94,.2); color: #86efac; }
.badge-blocked, .badge-o-rejected { background: rgba(229,9,20,.2); color: #fca5a5; }
.badge-o-pending { background: rgba(245,158,11,.2); color: #fcd34d; }
.pill { display: inline-block; min-width: 1.4em; padding: 0 .4em; border-radius: 999px; background: var(--primary); color: #fff; font-size: .75rem; text-align: center; font-weight: 700; }

/* Forms */
input, textarea, select { width: 100%; padding: .8rem 1rem; font-size: 1rem; font-family: var(--font-sans); background: var(--surface); color: var(--text); border: 2px solid var(--accent); border-radius: var(--radius-md); transition: border-color var(--transition-fast); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(229,9,20,.15); }
input::placeholder, textarea::placeholder { color: #666; }
select option { background: var(--surface); }
input[type="checkbox"] { width: auto; margin-right: .4rem; }
.input-sm { padding: .4rem .6rem; font-size: .85rem; border-radius: var(--radius-sm); width: auto; max-width: 12rem; }
.field { display: block; margin-bottom: var(--space-sm); }
.field > span { display: block; font-size: .9rem; color: var(--text-muted); margin-bottom: .3rem; }
.field-inline { display: inline-flex; align-items: center; gap: .5rem; margin: 0; }
.field-inline > span { margin: 0; }
.check { display: inline-flex; align-items: center; color: var(--text); }
.stack > * + * { margin-top: var(--space-sm); }
.inline { display: inline; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: var(--space-sm); flex-wrap: wrap; }

.lookup-form { display: flex; gap: var(--space-xs); margin: var(--space-md) 0; }
.lookup-form input { text-transform: uppercase; letter-spacing: .12em; font-family: var(--font-mono); font-size: 1.25rem; }
.lookup-form .btn { white-space: nowrap; }
.help-box { background: var(--surface); border-radius: var(--radius-md); padding: var(--space-md); }
.help-box p:last-child { margin-bottom: 0; }

/* Device / order / plans */
.device-card { margin-top: var(--space-md); }
.device-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-sm); margin-bottom: var(--space-sm); }
.label { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); }
.code-big { font-family: var(--font-mono); font-size: clamp(2rem, 8vw, 2.8rem); letter-spacing: .18em; font-weight: 700; line-height: 1.1; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; margin: 0 0 var(--space-sm); }
.kv dt { color: var(--text-muted); font-size: .9rem; }
.kv dd { color: var(--text); word-break: break-word; }

.plans { display: grid; gap: var(--space-md); grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-bottom: var(--space-sm); }
.plans-single { grid-template-columns: minmax(0, 440px); }
.plan-card { background: var(--gradient-card); border: 2px solid transparent; border-radius: var(--radius-lg); padding: var(--space-lg); box-shadow: var(--shadow-md); display: flex; flex-direction: column; gap: .5rem; }
.plan-card:hover { border-color: rgba(229,9,20,.5); }
.plan-card-center { max-width: 440px; margin: 0 auto; text-align: center; align-items: center; }
.plan-name { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; }
.plan-price { font-family: var(--font-display); font-size: 2.4rem; font-weight: 800; line-height: 1; }
.plan-duration { color: var(--text-muted); text-transform: uppercase; letter-spacing: .1em; font-size: .8rem; }
.plan-note { font-size: .92rem; margin-bottom: .5rem; }
.plan-card .field { margin: .5rem 0; width: 100%; }

.order-ref { letter-spacing: .06em; word-break: break-all; }
.order-card { margin-bottom: var(--space-md); }
.status-box { display: flex; align-items: center; gap: .8rem; padding: var(--space-md); border-radius: var(--radius-md); border: 2px solid; font-weight: 600; font-size: 1.05rem; margin-bottom: var(--space-md); }
.status-dot { width: .9rem; height: .9rem; border-radius: 50%; flex: none; }
.status-pending { border-color: rgba(245,158,11,.6); background: rgba(245,158,11,.08); }
.status-pending .status-dot { background: var(--warn); animation: pulse 1.6s ease-in-out infinite; }
.status-approved { border-color: rgba(34,197,94,.7); background: rgba(34,197,94,.12); }
.status-approved .status-dot { background: var(--ok); }
.status-rejected { border-color: rgba(229,9,20,.7); background: rgba(229,9,20,.12); }
.status-rejected .status-dot { background: var(--primary); }
.steps-box { background: var(--surface); border-radius: var(--radius-md); padding: var(--space-md) var(--space-md) var(--space-xs); }
.steps-box.is-done { opacity: .5; }
.pay-row { margin: .6rem 0; }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.35); opacity: .6; } }

/* Platform chooser (/activate) and "Get the app" (landing) */
.platform-choice { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); margin: var(--space-md) 0 var(--space-lg); }
.choice-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .4rem; padding: var(--space-lg) var(--space-md); background: var(--gradient-card); border: 2px solid transparent; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); color: var(--text); transition: all var(--transition-base); }
.choice-card:hover, .choice-card:focus-visible { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-lg), var(--shadow-glow); color: var(--text); outline: none; }
.choice-icon { color: var(--primary); margin-bottom: .3rem; }
.choice-title { font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; }
.choice-sub { font-size: .9rem; color: var(--text-muted); }
.get-app .card { display: flex; flex-direction: column; }
.get-app .card .eyebrow { margin-bottom: .2rem; }
.get-app .fineprint { margin-top: auto; padding-top: var(--space-sm); }
.store-buttons { display: flex; gap: var(--space-sm); flex-wrap: wrap; margin: var(--space-sm) 0; }

/* Legal */
.legal h2 { font-size: 1.2rem; margin: var(--space-lg) 0 var(--space-xs); }
.legal ul, .legal ol { margin-bottom: var(--space-sm); }

/* ---------------- Admin ---------------- */
body.admin { background: #0b0b0b; }
.admin-wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 var(--space-md); }
.admin-header { background: #111; border-bottom: 1px solid #222; margin-bottom: var(--space-md); }
.admin-nav { display: flex; gap: var(--space-sm); flex-wrap: wrap; align-items: center; }
.admin-nav a { color: var(--text-muted); font-weight: 500; padding: .35rem .6rem; border-radius: var(--radius-sm); }
.admin-nav a.active, .admin-nav a:hover { color: var(--text); background: #1f1f1f; }
.admin-footer { padding: var(--space-lg) var(--space-md); color: #666; font-size: .8rem; }
.admin h1 { font-size: 1.7rem; margin-bottom: var(--space-sm); }
.panel { background: var(--surface); border: 1px solid #262626; border-radius: var(--radius-md); padding: var(--space-md); margin-bottom: var(--space-md); }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: var(--space-sm); flex-wrap: wrap; margin-bottom: var(--space-sm); }
.panel-head h1, .panel-head h2 { margin-bottom: 0; }
.auth-box { max-width: 420px; margin: var(--space-2xl) auto; background: var(--surface); padding: var(--space-lg); border-radius: var(--radius-lg); border: 1px solid #262626; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: var(--space-sm); }
.stat { background: #111; border-radius: var(--radius-sm); padding: .8rem; text-align: center; }
.stat-n { font-family: var(--font-display); font-size: 1.8rem; font-weight: 800; line-height: 1; }
.stat-l { font-size: .75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; margin-top: .3rem; }
.stat-hi { background: rgba(229,9,20,.15); }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid #262626; vertical-align: top; }
th { color: var(--text-muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
tr:hover td { background: rgba(255,255,255,.02); }
td.actions { white-space: nowrap; }
td.actions form { margin-right: .3rem; }
.reject-form .input-sm { max-width: 10rem; margin-right: .3rem; }
.search { display: flex; gap: .4rem; align-items: center; }
.search input { width: 18rem; max-width: 60vw; padding: .5rem .8rem; border-radius: var(--radius-sm); }
.tabs { display: flex; gap: .3rem; }
.tabs a { padding: .35rem .8rem; border-radius: 999px; color: var(--text-muted); background: #111; font-size: .9rem; }
.tabs a.active { background: var(--primary); color: #fff; }
.tabs-row { margin-bottom: var(--space-sm); flex-wrap: wrap; }
.log { list-style: none; padding: 0; font-size: .9rem; }
.log li { padding: .3rem 0; border-bottom: 1px solid #222; }
details.panel > summary { cursor: pointer; }
.plan-form .field { margin-bottom: .6rem; }

/* Responsive */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .platform-choice { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  :root { --space-lg: 1.5rem; --space-xl: 2rem; --space-2xl: 2.5rem; }
  .container { padding: 0 var(--space-sm); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .lookup-form { flex-direction: column; }
  .platform-choice { grid-template-columns: 1fr; }
  .store-buttons .btn { width: 100%; }
  .lookup-form .btn { width: 100%; }
  .plans-single { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: .1rem; }
  .kv dt { margin-top: .5rem; }
  .site-nav { gap: var(--space-sm); font-size: .95rem; }
  .btn-pay { width: 100%; }
}
