/**
 * Netstack Portal — Public Pages (Landing, Login, Register, Shop)
 * Matches appliance UI: dark theme, cyan accent, Inter font.
 */

:root {
	--bg-dark: #0f172a;
	--bg-card: #1e293b;
	--accent: #38bdf8;
	--accent-hover: #7dd3fc;
	--text-primary: #e2e8f0;
	--text-muted: #94a3b8;
	--border: #334155;
	--green: #4ade80;
	--yellow: #facc15;
	--red: #f87171;
	--badge-green-bg: rgba(34,197,94,0.15);
	--badge-yellow-bg: rgba(234,179,8,0.15);
	--badge-red-bg: rgba(239,68,68,0.15);
	--badge-blue-bg: rgba(56,189,248,0.15);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
	background: var(--bg-dark);
	color: var(--text-primary);
	font-family: 'Inter', system-ui, -apple-system, sans-serif;
	min-height: 100vh;
	-webkit-font-smoothing: antialiased;
}

/* ── Top Navigation ─── */
.ns-topnav {
	position: fixed; top: 0; left: 0; right: 0; z-index: 100;
	background: rgba(15,23,42,0.92); backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--border);
	padding: 0 40px; height: 64px;
	display: flex; align-items: center; justify-content: space-between;
}
.ns-topnav-brand {
	font-size: 20px; font-weight: 700; color: var(--accent);
	text-decoration: none; letter-spacing: 0.5px;
	display: flex; align-items: center; gap: 8px;
}
.ns-topnav-brand svg { width: 22px; height: 22px; }
.ns-topnav-links { display: flex; gap: 4px; }
.ns-topnav-links a {
	padding: 8px 16px; border-radius: 6px;
	font-size: 14px; font-weight: 500; text-decoration: none;
	color: var(--text-muted); transition: all 0.15s;
}
.ns-topnav-links a:hover { color: var(--text-primary); }
.ns-topnav-links a.active { background: rgba(56,189,248,0.1); color: var(--accent); }
.ns-topnav-actions { display: flex; gap: 10px; align-items: center; }

/* ── Buttons ─── */
.ns-btn {
	display: inline-flex; align-items: center; gap: 6px;
	border-radius: 8px; font-weight: 600;
	font-family: 'Inter', system-ui, sans-serif;
	cursor: pointer; transition: all 0.15s;
	border: none; text-decoration: none;
	font-size: 14px; padding: 10px 20px;
}
.ns-btn-sm { font-size: 12px; padding: 6px 14px; }
.ns-btn-lg { font-size: 16px; padding: 14px 32px; }
.ns-btn-primary { background: var(--accent); color: var(--bg-dark); }
.ns-btn-primary:hover { background: var(--accent-hover); color: var(--bg-dark); }
.ns-btn-ghost { background: rgba(56,189,248,0.08); color: var(--accent); border: 1px solid rgba(56,189,248,0.15); }
.ns-btn-ghost:hover { background: rgba(56,189,248,0.12); color: var(--accent); }
.ns-btn-outline { background: transparent; color: var(--accent); border: 1px solid var(--border); }
.ns-btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* ── Cards ─── */
.ns-card {
	background: var(--bg-card); border-radius: 12px; padding: 20px;
	border: 1px solid var(--border); transition: all 0.2s;
}
.ns-card-hover:hover { border-color: var(--accent); transform: translateY(-2px); }

/* ── Badges ─── */
.ns-badge {
	display: inline-block; padding: 2px 10px; border-radius: 9999px;
	font-size: 11px; font-weight: 600;
}
.ns-badge-blue { background: var(--badge-blue-bg); color: var(--accent); }
.ns-badge-green { background: var(--badge-green-bg); color: var(--green); }
.ns-badge-red { background: var(--badge-red-bg); color: var(--red); }
.ns-badge-yellow { background: var(--badge-yellow-bg); color: var(--yellow); }

/* ── Form fields ─── */
.ns-field { margin-bottom: 16px; }
.ns-field label {
	display: block; font-size: 12px; font-weight: 500;
	color: var(--text-primary); margin-bottom: 6px;
}
.ns-field input {
	width: 100%; padding: 10px 14px; font-size: 14px;
	background: var(--bg-dark); color: var(--text-primary);
	border: 1px solid var(--border); border-radius: 8px;
	outline: none; font-family: 'Inter', system-ui, sans-serif;
}
.ns-field input:focus { border-color: var(--accent); }
.ns-field input::placeholder { color: #475569; }

/* ── Auth box (login/register) ─── */
.ns-auth-wrapper {
	padding-top: 64px; display: flex; align-items: center;
	justify-content: center; min-height: 100vh;
}
.ns-auth-box { width: 100%; max-width: 420px; }
.ns-auth-box .ns-card { padding: 40px 36px; }
.ns-auth-header {
	text-align: center; margin-bottom: 28px;
}
.ns-auth-logo {
	display: flex; align-items: center; justify-content: center;
	gap: 8px; margin-bottom: 8px;
}
.ns-auth-logo svg { width: 24px; height: 24px; color: var(--accent); }
.ns-auth-logo span { font-size: 22px; font-weight: 700; color: var(--accent); }
.ns-auth-subtitle { color: var(--text-muted); font-size: 14px; }
.ns-auth-footer {
	text-align: center; margin-top: 20px; color: var(--text-muted); font-size: 13px;
}
.ns-auth-footer a { color: var(--accent); text-decoration: none; }
.ns-auth-footer a:hover { text-decoration: underline; }
.ns-remember {
	display: flex; align-items: center; justify-content: space-between;
	margin-bottom: 20px;
}
.ns-remember label {
	display: flex; align-items: center; gap: 8px;
	color: var(--text-muted); font-size: 13px; cursor: pointer;
}
.ns-remember a { color: var(--accent); font-size: 13px; text-decoration: none; }

/* ── Status messages ─── */
.ns-error {
	background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3);
	color: var(--red); padding: 10px 14px; border-radius: 8px;
	font-size: 13px; margin-bottom: 16px;
}
.ns-success {
	background: rgba(52,211,153,0.1); border: 1px solid rgba(52,211,153,0.3);
	color: var(--green); padding: 14px; border-radius: 8px;
	font-size: 14px; text-align: center;
}
.ns-success a { color: var(--accent); text-decoration: none; }
.ns-test-banner {
	background: rgba(234,179,8,0.1); border: 1px solid rgba(234,179,8,0.3);
	color: var(--yellow); padding: 10px 20px; border-radius: 8px;
	text-align: center; margin-bottom: 30px; font-size: 13px;
}

/* ── Hero Section ─── */
.ns-hero {
	padding: 100px 40px 80px; max-width: 1200px; margin: 0 auto;
	display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
}
.ns-hero h1 {
	font-size: 48px; font-weight: 800; line-height: 1.1;
	margin: 20px 0 24px; color: var(--text-primary);
}
.ns-hero h1 span { color: var(--accent); }
.ns-hero p { font-size: 18px; color: var(--text-muted); line-height: 1.6; margin-bottom: 36px; max-width: 480px; }
.ns-hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── Dashboard Preview (hero right) ─── */
.ns-preview {
	background: var(--bg-card); border-radius: 16px;
	border: 1px solid var(--border); padding: 24px;
}
.ns-preview-dots {
	display: flex; align-items: center; gap: 10px; margin-bottom: 16px;
}
.ns-preview-dot { width: 10px; height: 10px; border-radius: 50%; }
.ns-preview-label { font-size: 12px; color: var(--text-muted); margin-left: 8px; }
.ns-preview-stats {
	display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px;
}
.ns-preview-stat {
	background: var(--bg-dark); border-radius: 8px; padding: 10px 8px;
	text-align: center; border: 1px solid var(--border);
}
.ns-preview-stat-val { font-size: 20px; font-weight: 700; }
.ns-preview-stat-lbl { font-size: 10px; color: var(--text-muted); margin-top: 2px; }
.ns-preview-row {
	display: flex; align-items: center; justify-content: space-between;
	padding: 8px 12px; font-size: 12px;
}
.ns-preview-row + .ns-preview-row { border-top: 1px solid rgba(51,65,85,0.4); }
.ns-preview-host { color: var(--text-primary); font-weight: 500; }
.ns-preview-ip { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--accent); }
.ns-preview-type { color: var(--text-muted); }

/* ── Feature Grid ─── */
.ns-features-section { padding: 80px 40px; max-width: 1200px; margin: 0 auto; }
.ns-section-header { text-align: center; margin-bottom: 48px; }
.ns-section-header h2 { font-size: 36px; font-weight: 700; margin: 16px 0 12px; }
.ns-section-header p { color: var(--text-muted); font-size: 16px; max-width: 560px; margin: 0 auto; }
.ns-features-grid {
	display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.ns-feature-icon {
	width: 40px; height: 40px; border-radius: 10px;
	background: var(--badge-blue-bg); color: var(--accent);
	display: flex; align-items: center; justify-content: center;
	margin-bottom: 14px;
}
.ns-feature-icon svg { width: 20px; height: 20px; }
.ns-feature-title { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.ns-feature-desc { font-size: 13px; color: var(--text-muted); line-height: 1.6; }

/* ── How It Works ─── */
.ns-steps-section {
	padding: 80px 40px; background: var(--bg-card);
	border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.ns-steps-grid {
	display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
	max-width: 1200px; margin: 0 auto;
}
.ns-step { text-align: center; }
.ns-step-num {
	width: 48px; height: 48px; border-radius: 50%;
	background: var(--badge-blue-bg); color: var(--accent);
	display: flex; align-items: center; justify-content: center;
	margin: 0 auto 16px; font-size: 18px; font-weight: 700;
}
.ns-step-icon { color: var(--accent); margin-bottom: 12px; }
.ns-step-icon svg { width: 24px; height: 24px; }
.ns-step h3 { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.ns-step p { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

/* ── CTA Section ─── */
.ns-cta { padding: 80px 40px; text-align: center; }
.ns-cta h2 { font-size: 36px; font-weight: 700; margin-bottom: 16px; }
.ns-cta p { color: var(--text-muted); font-size: 16px; margin-bottom: 32px; max-width: 480px; margin-left: auto; margin-right: auto; }
.ns-cta-buttons { display: flex; gap: 12px; justify-content: center; }

/* ── Footer ─── */
.ns-footer {
	border-top: 1px solid var(--border); padding: 32px 40px;
	display: flex; justify-content: space-between; align-items: center;
	max-width: 1200px; margin: 0 auto;
}
.ns-footer-brand { display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 13px; }
.ns-footer-brand svg { width: 16px; height: 16px; color: var(--accent); }
.ns-footer-copy { color: var(--text-muted); font-size: 12px; }

/* ── Shop / Pricing ─── */
.ns-shop-wrapper { max-width: 1200px; margin: 0 auto; padding: 60px 40px 0; }
.ns-shop-header { text-align: center; margin-bottom: 48px; }
.ns-shop-header h1 { font-size: 40px; font-weight: 800; margin: 20px 0 12px; }
.ns-shop-header p { color: var(--text-muted); font-size: 16px; max-width: 560px; margin: 0 auto; }

.ns-rate-card { max-width: 600px; margin: 0 auto 32px; }
.ns-rate-card h3 {
	font-size: 14px; font-weight: 600; margin-bottom: 14px;
	display: flex; align-items: center; gap: 8px;
}
.ns-rate-card svg { width: 16px; height: 16px; color: var(--accent); }
.ns-rate-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.ns-rate-item {
	text-align: center; padding: 10px 4px;
	background: var(--bg-dark); border-radius: 8px; border: 1px solid var(--border);
}
.ns-rate-value { font-size: 18px; font-weight: 700; color: var(--accent); }
.ns-rate-label { font-size: 10px; color: var(--text-muted); margin-top: 2px; }

.ns-plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 60px; }
.ns-plan-card {
	background: var(--bg-card); border-radius: 12px; padding: 28px 24px;
	border: 1px solid var(--border); position: relative;
}
.ns-plan-card.highlight { border-color: var(--accent); }
.ns-plan-popular {
	position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
	background: var(--accent); color: var(--bg-dark);
	font-size: 10px; font-weight: 700; padding: 4px 14px;
	border-radius: 10px; letter-spacing: 0.5px; white-space: nowrap;
}
.ns-plan-icon {
	width: 40px; height: 40px; border-radius: 10px;
	background: var(--badge-blue-bg); color: var(--accent);
	display: flex; align-items: center; justify-content: center;
	margin-bottom: 14px;
}
.ns-plan-icon svg { width: 20px; height: 20px; }
.ns-plan-title { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.ns-plan-desc { font-size: 13px; color: var(--text-muted); line-height: 1.5; margin-bottom: 20px; min-height: 40px; }
.ns-plan-features { border-top: 1px solid var(--border); padding-top: 16px; margin-bottom: 20px; }
.ns-plan-feature {
	display: flex; align-items: center; gap: 8px;
	padding: 5px 0; font-size: 13px;
}
.ns-plan-feature.enabled { color: var(--text-muted); }
.ns-plan-feature.disabled { color: #4b5563; }
.ns-plan-feature svg { width: 14px; height: 14px; flex-shrink: 0; }
.ns-plan-feature.enabled svg { color: var(--green); }
.ns-plan-feature.disabled svg { color: #4b5563; }

.ns-billing-info { margin-bottom: 60px; }
.ns-billing-info h2 { font-size: 18px; font-weight: 700; margin-bottom: 20px; }
.ns-billing-info-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.ns-billing-info-item h3 {
	font-size: 13px; font-weight: 600; color: var(--accent);
	text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px;
}
.ns-billing-info-item p { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

/* ── Responsive ─── */
@media (max-width: 1024px) {
	.ns-hero { grid-template-columns: 1fr; gap: 40px; }
	.ns-features-grid { grid-template-columns: repeat(2, 1fr); }
	.ns-steps-grid { grid-template-columns: repeat(2, 1fr); }
	.ns-plan-grid { grid-template-columns: 1fr; max-width: 420px; margin-left: auto; margin-right: auto; }
	.ns-billing-info-grid { grid-template-columns: repeat(2, 1fr); }
	.ns-rate-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
	.ns-topnav { padding: 0 16px; }
	.ns-topnav-links { display: none; }
	.ns-hero { padding: 80px 20px 40px; }
	.ns-hero h1 { font-size: 32px; }
	.ns-features-grid { grid-template-columns: 1fr; }
	.ns-steps-grid { grid-template-columns: 1fr; }
	.ns-features-section, .ns-cta { padding: 40px 20px; }
	.ns-shop-wrapper { padding: 40px 16px 0; }
	.ns-footer { flex-direction: column; gap: 12px; text-align: center; padding: 24px 16px; }
}
