/* ─── Brand tokens ────────────────────────────────────────────────── */
:root {
  --bg: #0B0F14;
  --bg-2: #111820;
  --bg-3: #171F2A;
  --bg-4: #1E2836;
  --border: rgba(255,255,255,0.07);
  --text: #F2EFE9;
  --text-muted: #9CA3AF;
  --amber: #F5A623;
  --amber-dark: #D4891A;
  --green: #22C55E;
  --red: #EF4444;
  --blue: #3B82F6;
  --font-head: 'Barlow Condensed', sans-serif;
  --font-body: 'Inter', sans-serif;
}

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

html { scroll-behavior: smooth; }

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

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

code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.88em;
  background: rgba(255,255,255,0.06);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  color: var(--amber);
}

/* ─── Buttons ─────────────────────────────────────────────────────── */
.btn-amber {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  background: var(--amber); color: #0B0F14;
  font-weight: 700; font-size: 0.9rem; letter-spacing: 0.02em;
  padding: 0.6rem 1.4rem; border-radius: 6px; border: none; cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  text-decoration: none; white-space: nowrap;
}
.btn-amber:hover { background: var(--amber-dark); color: #0B0F14; transform: translateY(-1px); }
.btn-amber.btn-lg { padding: 0.8rem 2rem; font-size: 1rem; }

.btn-outline {
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--text);
  border: 1.5px solid rgba(242,239,233,0.35); border-radius: 6px;
  font-weight: 500; font-size: 0.9rem; padding: 0.6rem 1.4rem;
  cursor: pointer; text-decoration: none; transition: border-color 0.15s, background 0.15s;
  white-space: nowrap;
}
.btn-outline:hover { border-color: var(--amber); color: var(--amber); background: rgba(245,166,35,0.05); }
.btn-outline.btn-lg { padding: 0.8rem 2rem; font-size: 1rem; }
.btn-outline.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.8rem; }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-4); color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 6px;
  font-size: 0.85rem; font-weight: 500; padding: 0.5rem 1rem;
  cursor: pointer; text-decoration: none; transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.btn-ghost:hover { background: var(--bg-3); color: var(--text); }
.btn-ghost.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.8rem; }

.btn-ghost.text-red { color: var(--red); border-color: rgba(239,68,68,0.3); }
.btn-ghost.text-red:hover { background: rgba(239,68,68,0.1); }

.link-btn { background: none; border: none; color: var(--amber); cursor: pointer; font-size: inherit; padding: 0; text-decoration: underline; }
.w-full { width: 100%; }

/* ─── Flash messages ──────────────────────────────────────────────── */
.flash-container { position: fixed; top: 1rem; right: 1rem; z-index: 9999; display: flex; flex-direction: column; gap: 0.5rem; max-width: 420px; }
.flash {
  padding: 0.75rem 1rem; border-radius: 8px; font-size: 0.88rem;
  display: flex; align-items: flex-start; gap: 0.75rem;
  border: 1px solid; backdrop-filter: blur(12px);
}
.flash-close { background: none; border: none; cursor: pointer; font-size: 1.1rem; margin-left: auto; opacity: 0.5; }
.flash-success { background: rgba(34,197,94,0.12); border-color: rgba(34,197,94,0.3); color: #86efac; }
.flash-error { background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.3); color: #fca5a5; }
.flash-warning { background: rgba(245,166,35,0.12); border-color: rgba(245,166,35,0.3); color: #fcd34d; }
.flash-info { background: rgba(59,130,246,0.12); border-color: rgba(59,130,246,0.3); color: #93c5fd; }

/* ─── App nav ─────────────────────────────────────────────────────── */
.app-nav {
  height: 56px; background: rgba(11,15,20,0.95); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100;
}
.nav-inner { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; height: 100%; display: flex; align-items: center; gap: 2rem; }
.nav-logo { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; }
.logo-img { height: 36px; width: auto; object-fit: contain; }
.logo-text-fallback { font-family: var(--font-head); font-size: 1.5rem; font-weight: 800; color: var(--text); letter-spacing: -0.01em; }
.logo-r { color: var(--amber); }
.nav-links { display: flex; align-items: center; gap: 0.25rem; flex: 1; }
.nav-link {
  padding: 0.4rem 0.85rem; border-radius: 5px; font-size: 0.88rem; font-weight: 500;
  color: var(--text-muted); text-decoration: none; transition: color 0.15s, background 0.15s;
  display: flex; align-items: center; gap: 0.4rem; position: relative;
}
.nav-link:hover { color: var(--text); background: var(--bg-4); }
.nav-link.active { color: var(--amber); }
.badge-count {
  background: var(--red); color: white; font-size: 0.7rem; font-weight: 700;
  padding: 0.1rem 0.35rem; border-radius: 99px; min-width: 18px; text-align: center;
}
.nav-right { display: flex; align-items: center; gap: 1rem; margin-left: auto; }
.nav-org { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }
.nav-user { font-size: 0.85rem; color: var(--text); font-weight: 500; }
.nav-logout { font-size: 0.82rem; color: var(--text-muted); text-decoration: none; }
.nav-logout:hover { color: var(--text); }

/* ─── Page layout ─────────────────────────────────────────────────── */
.app-body { min-height: calc(100vh - 56px); }
.page-container { max-width: 1280px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }

.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1.5rem; margin-bottom: 2rem; flex-wrap: wrap;
}
.page-title { font-family: var(--font-head); font-size: 2rem; font-weight: 800; color: var(--text); line-height: 1.1; }
.header-actions { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }

.eyebrow {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 0.4rem; color: var(--text-muted);
}
.eyebrow.amber { color: var(--amber); }

.breadcrumb { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1.25rem; }
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--amber); }

/* ─── Section card ────────────────────────────────────────────────── */
.section-card {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px;
  padding: 1.5rem; margin-bottom: 1.5rem;
}
.section-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.section-card-title { font-family: var(--font-head); font-size: 1.15rem; font-weight: 700; color: var(--text); }
.section-link { font-size: 0.85rem; color: var(--amber); text-decoration: none; }
.section-link:hover { color: var(--amber-dark); }

/* ─── Critical banner ─────────────────────────────────────────────── */
.critical-banner {
  background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.3);
  border-radius: 8px; padding: 0.8rem 1.25rem; margin-bottom: 1.5rem;
  display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
  color: #fca5a5; font-size: 0.9rem;
}
.critical-pulse {
  width: 10px; height: 10px; border-radius: 50%; background: var(--red);
  flex-shrink: 0; animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(1.3)} }
.banner-link { margin-left: auto; color: var(--red); font-weight: 600; font-size: 0.85rem; }

/* ─── Stats row ───────────────────────────────────────────────────── */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card { background: var(--bg-2); border: 1px solid var(--border); border-radius: 8px; padding: 1.25rem 1.5rem; }
.stat-label-sm { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; color: var(--text-muted); text-transform: uppercase; margin-bottom: 0.4rem; }
.stat-big { font-family: var(--font-head); font-size: 2rem; font-weight: 800; color: var(--text); }
.text-red { color: var(--red); }

/* ─── Asset grid ──────────────────────────────────────────────────── */
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.asset-card {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px;
  padding: 1.25rem; text-decoration: none; color: var(--text);
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.asset-card:hover { border-color: rgba(245,166,35,0.3); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.3); color: var(--text); }
.asset-card--critical { border-color: rgba(239,68,68,0.3); }
.asset-card-header { display: flex; align-items: center; gap: 0.5rem; }
.asset-status-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.asset-type-badge { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em; color: var(--text-muted); text-transform: uppercase; margin-right: auto; }
.asset-alert-badge { font-size: 0.7rem; font-weight: 700; background: rgba(239,68,68,0.15); color: var(--red); padding: 0.15rem 0.5rem; border-radius: 4px; }
.asset-name { font-family: var(--font-head); font-size: 1.1rem; font-weight: 700; color: var(--text); }
.asset-location { font-size: 0.8rem; color: var(--text-muted); }
.asset-status-line { display: flex; align-items: center; gap: 0.5rem; }
.confidence { font-size: 0.75rem; color: var(--text-muted); }
.asset-summary { font-size: 0.82rem; color: var(--text-muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.asset-footer { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--text-muted); margin-top: auto; padding-top: 0.5rem; border-top: 1px solid var(--border); }
.text-muted { color: var(--text-muted); }

/* ─── Status pills ────────────────────────────────────────────────── */
.status-pill {
  display: inline-flex; align-items: center; font-size: 0.68rem; font-weight: 800;
  letter-spacing: 0.08em; padding: 0.2rem 0.55rem; border-radius: 4px;
}
.status-pill--lg { font-size: 0.8rem; padding: 0.3rem 0.8rem; }
.status-healthy { background: rgba(34,197,94,0.15); color: var(--green); }
.status-watch { background: rgba(245,166,35,0.15); color: var(--amber); }
.status-warning { background: rgba(245,166,35,0.2); color: var(--amber); }
.status-critical { background: rgba(239,68,68,0.15); color: var(--red); animation: pulse 2s ease-in-out infinite; }
.status-unknown { background: rgba(107,114,128,0.15); color: #6B7280; }

/* ─── Alert rows ──────────────────────────────────────────────────── */
.alert-row { display: flex; align-items: center; gap: 1rem; padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
.alert-row:last-child { border-bottom: none; }
.alert-row--critical { border-left: 3px solid var(--red); padding-left: 1rem; }
.alert-row--warning { border-left: 3px solid var(--amber); padding-left: 1rem; }
.alert-severity { font-size: 0.65rem; font-weight: 800; letter-spacing: 0.1em; padding: 0.2rem 0.5rem; border-radius: 3px; white-space: nowrap; }
.severity-critical { background: rgba(239,68,68,0.15); color: var(--red); }
.severity-warning { background: rgba(245,166,35,0.15); color: var(--amber); }
.severity-info { background: rgba(59,130,246,0.15); color: var(--blue); }
.alert-info { flex: 1; min-width: 0; }
.alert-title { font-size: 0.88rem; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.alert-meta { font-size: 0.78rem; color: var(--text-muted); }

/* ─── Alert full cards ────────────────────────────────────────────── */
.alerts-list { display: flex; flex-direction: column; gap: 1rem; }
.alert-full-card { background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 1.5rem; }
.alert-full--critical { border-left: 4px solid var(--red); }
.alert-full--warning { border-left: 4px solid var(--amber); }
.alert-full--info { border-left: 4px solid var(--blue); }
.alert-full-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; flex-wrap: wrap; gap: 0.5rem; }
.alert-full-left { display: flex; align-items: center; gap: 0.5rem; }
.alert-severity-badge { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.1em; padding: 0.2rem 0.55rem; border-radius: 3px; }
.alert-status-chip { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.08em; padding: 0.2rem 0.55rem; border-radius: 3px; }
.status-chip--open { background: rgba(239,68,68,0.1); color: var(--red); }
.status-chip--acknowledged { background: rgba(245,166,35,0.1); color: var(--amber); }
.status-chip--resolved { background: rgba(34,197,94,0.1); color: var(--green); }
.alert-full-date { font-size: 0.8rem; color: var(--text-muted); }
.alert-full-title { font-family: var(--font-head); font-size: 1.15rem; font-weight: 700; color: var(--text); margin-bottom: 0.3rem; }
.alert-asset-link { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 1.25rem; }
.alert-asset-link a { color: var(--amber); }
.alert-full-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.alert-field-label { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.3rem; }
.alert-field-value { font-size: 0.88rem; color: var(--text); line-height: 1.5; }
.action-text { color: #86efac; }
.urgency-critical { color: var(--red); font-weight: 600; }
.urgency-warning { color: var(--amber); font-weight: 600; }
.alert-full-actions { display: flex; gap: 0.5rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.resolved-note { font-size: 0.8rem; color: var(--green); padding-top: 1rem; border-top: 1px solid var(--border); }

/* ─── Asset detail ────────────────────────────────────────────────── */
.ai-summary-card {
  border-radius: 10px; padding: 1.25rem 1.5rem; margin-bottom: 1.5rem;
  border: 1px solid;
}
.ai-summary--healthy { background: rgba(34,197,94,0.06); border-color: rgba(34,197,94,0.2); }
.ai-summary--watch, .ai-summary--warning { background: rgba(245,166,35,0.06); border-color: rgba(245,166,35,0.2); }
.ai-summary--critical { background: rgba(239,68,68,0.06); border-color: rgba(239,68,68,0.25); }
.ai-badge { font-size: 0.65rem; font-weight: 800; letter-spacing: 0.12em; color: var(--amber); margin-bottom: 0.5rem; }
.ai-summary-text { font-size: 0.95rem; color: var(--text); line-height: 1.65; margin-bottom: 0.75rem; }
.ai-meta { font-size: 0.78rem; color: var(--text-muted); }

.period-tabs { display: flex; gap: 0.25rem; }
.period-tab { background: var(--bg-3); border: 1px solid var(--border); border-radius: 5px; padding: 0.3rem 0.7rem; font-size: 0.8rem; color: var(--text-muted); cursor: pointer; transition: all 0.15s; }
.period-tab.active { background: rgba(245,166,35,0.15); border-color: rgba(245,166,35,0.4); color: var(--amber); }
.period-tab:hover:not(.active) { background: var(--bg-4); color: var(--text); }

.charts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 1.25rem; }
.chart-card { background: var(--bg-3); border: 1px solid var(--border); border-radius: 8px; padding: 1rem; }
.chart-header { display: flex; align-items: baseline; gap: 0.5rem; margin-bottom: 0.75rem; flex-wrap: wrap; }
.chart-sensor-name { font-weight: 700; font-size: 0.9rem; color: var(--text); }
.chart-sensor-meta { font-size: 0.75rem; color: var(--text-muted); margin-right: auto; }
.chart-latest { font-family: var(--font-head); font-size: 1.1rem; font-weight: 800; color: var(--amber); }
.chart-wrap { height: 200px; }
.sensor-threshold { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.5rem; }

/* Alert detail row (inside asset detail) */
.alert-detail-row { padding: 1.25rem; border-bottom: 1px solid var(--border); }
.alert-detail-row:last-child { border-bottom: none; }
.alert-detail--critical { border-left: 3px solid var(--red); }
.alert-detail--warning { border-left: 3px solid var(--amber); }
.alert-detail-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.alert-date { font-size: 0.78rem; color: var(--text-muted); margin-left: auto; }
.alert-detail-title { font-weight: 600; font-size: 0.92rem; color: var(--text); margin-bottom: 0.75rem; }
.alert-detail-body { font-size: 0.83rem; color: var(--text-muted); line-height: 1.7; display: flex; flex-direction: column; gap: 0.25rem; }
.alert-detail-body strong { color: var(--text); }
.alert-actions { display: flex; gap: 0.5rem; margin-top: 0.75rem; }

/* Log table */
.log-status { font-size: 0.75rem; font-weight: 700; }
.log-success { color: var(--green); }
.log-error { color: var(--red); }

/* ─── Forms ───────────────────────────────────────────────────────── */
.field-group { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1rem; }
.field-label { font-size: 0.82rem; font-weight: 600; color: var(--text); letter-spacing: 0.01em; }
.field-input {
  background: var(--bg-3); border: 1px solid rgba(255,255,255,0.1); border-radius: 6px;
  color: var(--text); font-family: var(--font-body); font-size: 0.9rem;
  padding: 0.6rem 0.85rem; transition: border-color 0.15s; width: 100%;
}
.field-input:focus { outline: none; border-color: rgba(245,166,35,0.5); background: var(--bg-4); }
.field-input::placeholder { color: var(--text-muted); }
select.field-input { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239CA3AF' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.75rem center; padding-right: 2rem; }
textarea.field-input { resize: vertical; min-height: 80px; }
.auth-form { display: flex; flex-direction: column; gap: 0; }
.inline-form { display: flex; align-items: flex-end; gap: 0.5rem; flex-wrap: wrap; }
.inline-form .field-input { width: auto; flex: 1; min-width: 150px; }

/* ─── Auth pages ──────────────────────────────────────────────────── */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem; background: radial-gradient(ellipse at 50% 0%, rgba(245,166,35,0.06) 0%, transparent 60%), var(--bg); }
.auth-card { background: var(--bg-2); border: 1px solid var(--border); border-radius: 14px; padding: 2.5rem; width: 100%; max-width: 440px; }
.auth-logo { text-align: center; margin-bottom: 1.25rem; }
.auth-logo img { max-height: 60px; }
.auth-title { font-family: var(--font-head); font-size: 1.6rem; font-weight: 800; text-align: center; margin-bottom: 1.5rem; color: var(--text); }
.auth-footer { text-align: center; margin-top: 1.25rem; font-size: 0.85rem; color: var(--text-muted); }
.auth-seed-note { margin-top: 1.5rem; padding: 0.75rem; background: var(--bg-3); border-radius: 6px; font-size: 0.8rem; color: var(--text-muted); text-align: center; }

/* ─── Landing page ────────────────────────────────────────────────── */
.landing { overflow-x: hidden; }

/* Fixed nav */
.landing-nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; background: rgba(11,15,20,0.88); backdrop-filter: blur(18px); border-bottom: 1px solid var(--border); height: 64px; }
.landing-nav-inner { max-width: 1200px; margin: 0 auto; padding: 0 2rem; height: 100%; display: flex; align-items: center; gap: 2.5rem; }
.landing-logo { flex-shrink: 0; }
.logo-img-lg { height: 44px; width: auto; }
.landing-nav-links { display: flex; gap: 0.5rem; flex: 1; }
.landing-nav-links a { font-size: 0.88rem; font-weight: 500; color: var(--text-muted); padding: 0.3rem 0.75rem; border-radius: 5px; text-decoration: none; transition: color 0.15s; }
.landing-nav-links a:hover { color: var(--text); }
.landing-nav-ctas { display: flex; gap: 0.75rem; align-items: center; margin-left: auto; }

/* Full-page scroll sections */
.page-section {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 100px 2rem 4rem;
}
.page-section-inner { width: 100%; }

/* ── Hero page ── */
.hero-page {
  background:
    linear-gradient(180deg, rgba(11,15,20,0.55) 0%, rgba(11,15,20,0.75) 50%, rgba(11,15,20,0.97) 100%),
    url('https://images.unsplash.com/photo-1581093458791-9f3c3250a8e2?w=1920&q=80') center/cover no-repeat;
  flex-direction: column;
}
.hero-bg-overlay {
  position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 80%, rgba(245,166,35,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-grid {
  position: absolute; inset: 0; z-index: 0;
  background-image: linear-gradient(rgba(245,166,35,0.04) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(245,166,35,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 40%, black 20%, transparent 100%);
}
.hero-inner { position: relative; z-index: 1; max-width: 880px; margin: 0 auto; text-align: center; }
.hero-eyebrow { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.18em; color: var(--amber); text-transform: uppercase; margin-bottom: 1.5rem; }
.hero-headline { font-family: var(--font-head); font-size: clamp(2.8rem, 6vw, 4.8rem); font-weight: 800; line-height: 1.04; color: var(--text); margin-bottom: 1.5rem; text-shadow: 0 2px 32px rgba(0,0,0,0.5); }
.hero-headline .amber { color: var(--amber); }
.hero-sub { font-size: 1.1rem; color: rgba(242,239,233,0.8); line-height: 1.75; max-width: 660px; margin: 0 auto 2.5rem; }
.hero-ctas { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 4rem; }
.hero-stats { display: flex; align-items: center; justify-content: center; gap: 0; flex-wrap: wrap; }
.stat { padding: 0 2.5rem; text-align: center; }
.stat-num { font-family: var(--font-head); font-size: 2.4rem; font-weight: 800; color: var(--amber); }
.stat-label { font-size: 0.78rem; color: rgba(242,239,233,0.6); }
.stat-divider { width: 1px; height: 40px; background: rgba(255,255,255,0.15); }

/* Scroll hint chevron */
.scroll-hint {
  position: absolute; bottom: 2.5rem; left: 50%; transform: translateX(-50%);
  color: rgba(245,166,35,0.5); z-index: 2; text-decoration: none;
  animation: bounce 2.2s ease-in-out infinite;
  transition: color 0.2s;
}
.scroll-hint:hover { color: var(--amber); }
@keyframes bounce { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(8px)} }

/* ── Platform page ── */
.platform-page { background: var(--bg); }

.section-inner { max-width: 1100px; margin: 0 auto; }
.section-headline { font-family: var(--font-head); font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; color: var(--text); margin-bottom: 3rem; text-align: center; }
.page-section .eyebrow { text-align: center; display: block; }
.page-section .section-inner { text-align: center; }
.page-section .steps { text-align: left; }
.page-section .solutions-grid-lg { text-align: left; }
.page-section .pricing-grid { text-align: left; }
.page-section .platform-stats-row { text-align: center; }

.steps { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: start; gap: 1.5rem; }
.step-num { font-family: var(--font-head); font-size: 3rem; font-weight: 800; color: rgba(245,166,35,0.18); line-height: 1; margin-bottom: 0.5rem; }
.step-icon-wrap { margin-bottom: 0.75rem; }
.step h3 { font-family: var(--font-head); font-size: 1.3rem; font-weight: 700; color: var(--text); margin-bottom: 0.5rem; }
.step p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.65; }
.step-arrow { font-size: 1.5rem; color: var(--amber); opacity: 0.35; align-self: center; margin-top: 3.5rem; }

.platform-stats-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin-top: 3.5rem; }
.pstat { background: var(--bg-2); padding: 1.5rem; text-align: center; display: flex; flex-direction: column; gap: 0.4rem; }
.pstat-num { font-family: var(--font-head); font-size: 1.8rem; font-weight: 800; color: var(--amber); }
.pstat-label { font-size: 0.78rem; color: var(--text-muted); }

/* ── Solutions page ── */
.solutions-page {
  background:
    linear-gradient(135deg, rgba(11,15,20,0.92) 0%, rgba(17,24,32,0.95) 100%),
    url('https://images.unsplash.com/photo-1565017228876-c03893878f19?w=1920&q=80') center/cover no-repeat fixed;
}
.solutions-bg {
  position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(ellipse 60% 50% at 80% 50%, rgba(245,166,35,0.05) 0%, transparent 70%);
  pointer-events: none;
}
.solutions-page .section-inner { position: relative; z-index: 1; }

.solutions-grid-lg { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; }
.solution-card-lg {
  background: rgba(17,24,32,0.85); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px; padding: 2rem 1.75rem;
  backdrop-filter: blur(8px);
  transition: border-color 0.25s, transform 0.2s, box-shadow 0.25s;
}
.solution-card-lg:hover { border-color: rgba(245,166,35,0.3); transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,0.4); }
.sol-icon-lg { margin-bottom: 1rem; }
.solution-card-lg h4 { font-family: var(--font-head); font-size: 1.2rem; font-weight: 700; color: var(--text); margin-bottom: 0.6rem; }
.solution-card-lg p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.65; margin-bottom: 1rem; }
.sol-features { list-style: none; display: flex; flex-direction: column; gap: 0.35rem; }
.sol-features li { font-size: 0.8rem; color: rgba(156,163,175,0.8); padding-left: 1.1rem; position: relative; }
.sol-features li::before { content: '→'; position: absolute; left: 0; color: rgba(245,166,35,0.5); font-size: 0.75rem; }

/* ── Pricing page ── */
.pricing-page { background: var(--bg-2); }

.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; }
.pricing-card { background: var(--bg-3); border: 1px solid var(--border); border-radius: 12px; padding: 2rem; position: relative; }
.pricing-featured { border-color: rgba(245,166,35,0.45); background: rgba(245,166,35,0.04); box-shadow: 0 0 40px rgba(245,166,35,0.06); }
.plan-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--amber); color: #0B0F14; font-size: 0.65rem; font-weight: 800; letter-spacing: 0.1em; padding: 0.2rem 0.75rem; border-radius: 99px; white-space: nowrap; }
.plan-name { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.75rem; }
.plan-price { font-family: var(--font-head); font-size: 2.5rem; font-weight: 800; color: var(--text); margin-bottom: 1.5rem; }
.plan-price span { font-size: 1rem; font-weight: 400; color: var(--text-muted); }
.plan-features { list-style: none; margin-bottom: 1.5rem; display: flex; flex-direction: column; gap: 0.5rem; }
.plan-features li { font-size: 0.88rem; color: var(--text-muted); padding-left: 1.25rem; position: relative; }
.plan-features li::before { content: '✓'; position: absolute; left: 0; color: var(--amber); font-weight: 700; }

/* ── Footer ── */
.landing-footer { background: #080C11; border-top: 1px solid var(--border); padding: 2.5rem 2rem 1.5rem; }
.footer-inner { max-width: 1200px; margin: 0 auto 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.footer-tag { font-size: 0.68rem; letter-spacing: 0.12em; color: var(--text-muted); text-transform: uppercase; margin-top: 0.25rem; }
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-links a { font-size: 0.85rem; color: var(--text-muted); text-decoration: none; }
.footer-links a:hover { color: var(--amber); }
.footer-social { display: flex; align-items: center; gap: 0.75rem; }
.linkedin-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: var(--text-muted); text-decoration: none; font-size: 0.85rem;
  padding: 0.4rem 0.85rem; border: 1px solid var(--border); border-radius: 6px;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.linkedin-link:hover { color: #fff; border-color: #0A66C2; background: rgba(10,102,194,0.12); }
.linkedin-icon { width: 18px; height: 18px; flex-shrink: 0; }
.footer-copy { max-width: 1200px; margin: 0 auto; font-size: 0.75rem; color: rgba(156,163,175,0.45); padding-top: 1.25rem; border-top: 1px solid rgba(255,255,255,0.04); }

/* Keep old solution-card for any other uses */
.solutions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.25rem; }
.solution-card { background: var(--bg-3); border: 1px solid var(--border); border-radius: 10px; padding: 1.5rem; }
.sol-icon { font-size: 1.8rem; margin-bottom: 0.75rem; }
.solution-card h4 { font-family: var(--font-head); font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 0.5rem; }
.solution-card p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; }

/* Responsive overrides for landing */
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; }
  .step-arrow { display: none; }
  .platform-stats-row { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 600px) {
  .platform-stats-row { grid-template-columns: 1fr 1fr; }
  .landing-nav-links { display: none; }
  .hero-ctas { flex-direction: column; align-items: center; }
  .hero-stats { flex-direction: column; gap: 1rem; }
  .stat-divider { display: none; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
}

/* ─── Onboarding ──────────────────────────────────────────────────── */
.steps-indicator { display: flex; align-items: center; justify-content: center; margin-bottom: 2.5rem; gap: 0; }
.step-ind { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; }
.step-dot { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 0.85rem; font-weight: 700; color: var(--text-muted); background: var(--bg-2); transition: all 0.2s; }
.step-ind.active .step-dot { border-color: var(--amber); color: var(--amber); background: rgba(245,166,35,0.1); }
.step-ind.done .step-dot { border-color: var(--green); background: rgba(34,197,94,0.15); color: var(--green); }
.step-ind-label { font-size: 0.72rem; font-weight: 600; color: var(--text-muted); letter-spacing: 0.05em; }
.step-ind.active .step-ind-label { color: var(--amber); }
.step-line { width: 60px; height: 2px; background: var(--border); margin: 0 0.5rem; position: relative; top: -12px; }
.step-line.done { background: rgba(34,197,94,0.4); }
.sensor-row { display: flex; gap: 0.5rem; margin-bottom: 0.75rem; flex-wrap: wrap; }
.sensor-row .field-input { flex: 1; min-width: 120px; }

/* ─── Settings ────────────────────────────────────────────────────── */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 1.5rem; }
.settings-row { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
.settings-row:last-child { border-bottom: none; }
.settings-label { font-size: 0.82rem; color: var(--text-muted); font-weight: 500; }
.settings-value { font-size: 0.9rem; color: var(--text); font-weight: 500; display: flex; align-items: center; gap: 0.5rem; }
.api-key-display { display: flex; align-items: center; gap: 0.75rem; background: var(--bg-3); border: 1px solid var(--border); border-radius: 8px; padding: 0.75rem 1rem; }
.api-key-display code { flex: 1; word-break: break-all; font-size: 0.82rem; background: none; padding: 0; }
.upgrade-link { font-size: 0.8rem; color: var(--amber); }
.plan-badge { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; padding: 0.2rem 0.6rem; border-radius: 4px; }
.plan-starter { background: rgba(107,114,128,0.15); color: #9CA3AF; }
.plan-growth { background: rgba(245,166,35,0.15); color: var(--amber); }
.plan-enterprise { background: rgba(34,197,94,0.15); color: var(--green); }
.role-badge { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; padding: 0.15rem 0.5rem; border-radius: 3px; }
.role-admin { background: rgba(245,166,35,0.15); color: var(--amber); }
.role-viewer { background: rgba(107,114,128,0.12); color: #9CA3AF; }

/* ─── Tables ──────────────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.data-table th { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); padding: 0.6rem 1rem 0.6rem 0; border-bottom: 1px solid var(--border); text-align: left; }
.data-table td { padding: 0.75rem 1rem 0.75rem 0; border-bottom: 1px solid rgba(255,255,255,0.04); color: var(--text); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }

/* ─── Filter bar ──────────────────────────────────────────────────── */
.filter-bar { display: flex; gap: 0.75rem; align-items: center; margin-bottom: 1.5rem; flex-wrap: wrap; }
.filter-select { width: auto; flex: 0 1 auto; }

/* ─── API docs ────────────────────────────────────────────────────── */
.info-banner { background: rgba(245,166,35,0.08); border: 1px solid rgba(245,166,35,0.2); border-radius: 8px; padding: 1rem 1.25rem; margin-bottom: 1.5rem; display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; font-size: 0.9rem; }
.docs-toc { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.docs-toc a { font-size: 0.8rem; color: var(--text-muted); text-decoration: none; padding: 0.3rem 0.6rem; background: var(--bg-2); border: 1px solid var(--border); border-radius: 5px; transition: color 0.15s, border-color 0.15s; }
.docs-toc a:hover { color: var(--amber); border-color: rgba(245,166,35,0.3); }
.doc-meta { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; flex-wrap: wrap; }
.method-badge { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; padding: 0.2rem 0.6rem; border-radius: 4px; background: rgba(245,166,35,0.15); color: var(--amber); }
.method-get { background: rgba(34,197,94,0.15); color: var(--green); }
.doc-sub { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; color: var(--text-muted); text-transform: uppercase; margin: 1rem 0 0.5rem; }
.code-block { background: #080C11; border: 1px solid var(--border); border-radius: 8px; padding: 1.25rem; margin-bottom: 1rem; position: relative; overflow-x: auto; }
.code-lang { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; color: var(--amber); text-transform: uppercase; margin-bottom: 0.5rem; }
.code-block pre { font-family: 'SF Mono', 'Fira Code', monospace; font-size: 0.83rem; color: #E2E8F0; line-height: 1.7; margin: 0; white-space: pre-wrap; word-break: break-word; }
.tab-bar { display: flex; gap: 0.25rem; margin-bottom: 1rem; }
.tab { background: var(--bg-3); border: 1px solid var(--border); border-radius: 5px; padding: 0.35rem 0.85rem; font-size: 0.82rem; color: var(--text-muted); cursor: pointer; transition: all 0.15s; }
.tab.active { background: rgba(245,166,35,0.15); border-color: rgba(245,166,35,0.4); color: var(--amber); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ─── Empty state ─────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 4rem 2rem; color: var(--text-muted); }
.empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state h3 { font-family: var(--font-head); font-size: 1.4rem; font-weight: 700; color: var(--text); margin-bottom: 0.5rem; }
.empty-state p { margin-bottom: 1.5rem; }

/* ─── Live Demo Machine widget ───────────────────────────────────── */
.live-machine-card { border-color: rgba(16,185,129,0.2); }

.live-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: rgba(16,185,129,0.12); border: 1px solid rgba(16,185,129,0.3);
  color: #10B981; font-size: 0.65rem; font-weight: 800; letter-spacing: 0.12em;
  padding: 0.2rem 0.6rem; border-radius: 99px;
}
.live-pulse {
  width: 7px; height: 7px; border-radius: 50%; background: #10B981;
  animation: livepulse 1.2s ease-in-out infinite;
}
@keyframes livepulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.4;transform:scale(0.7)} }

.live-sensors-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; }
@media (max-width: 900px) { .live-sensors-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 500px) { .live-sensors-grid { grid-template-columns: 1fr 1fr; } }

.live-sensor-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: 0.2rem;
}
.live-sensor-label { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em; color: #6B7280; text-transform: uppercase; }
.live-sensor-val   { font-family: var(--font-head); font-size: 2rem; font-weight: 800; color: var(--text); line-height: 1.1; transition: color 0.2s; }
.live-sensor-unit  { font-size: 0.72rem; color: #6B7280; margin-bottom: 0.5rem; }
.live-sensor-bar-track { height: 4px; background: rgba(255,255,255,0.07); border-radius: 2px; overflow: hidden; }
.live-sensor-bar   { height: 100%; border-radius: 2px; transition: width 0.6s ease, background 0.4s; }
.live-sensor-range { font-size: 0.68rem; color: #4B5563; margin-top: 0.35rem; }

.live-flash { animation: flash-val 0.35s ease; }
@keyframes flash-val { 0%{color:rgba(16,185,129,0.9)} 100%{color:var(--text)} }

/* Status pills (reused across app) */
.pill-healthy  { background: rgba(16,185,129,0.12); color: #10B981; border-color: rgba(16,185,129,0.3); }
.pill-watch    { background: rgba(245,166,35,0.12);  color: #F5A623; border-color: rgba(245,166,35,0.3); }
.pill-critical { background: rgba(239,68,68,0.12);   color: #EF4444; border-color: rgba(239,68,68,0.3); }

/* ─── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-org, .nav-user { display: none; }
  .page-header { flex-direction: column; }
  .asset-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .charts-grid { grid-template-columns: 1fr; }
  .alert-full-body { grid-template-columns: 1fr; }
}
