:root {
  --yellow: #ffc107;
  --yellow-alt: #ffce3a;
  --gold: #d39e00;
  --dark: #282828;
  --dark-mid: #424242;
  --surface: #5b5b5b;
  --text-1: #f0f0f0;
  --text-2: #cccccc;
  --text-muted: #aaaaaa;
  --on-yellow: #282828;
  --warn: #ff5315;
  --alert: #ff0000;
  --green: #4caf50;
  --blue: #2196f3;
  --pink: #fd2e7e;
}

/* ─── CUSTOM SCROLLBARS ─── */
/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 193, 7, 0.25) rgba(40, 40, 40, 0.5);
}

/* Chrome, Edge, Safari */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(40, 40, 40, 0.4);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 193, 7, 0.25);
  border-radius: 4px;
  border: 1px solid rgba(255, 193, 7, 0.05);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 193, 7, 0.45);
}

::-webkit-scrollbar-thumb:active {
  background: var(--yellow);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--dark);
  color: var(--text-1);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;

  font-family: "Menbere", sans-serif;
  font-optical-sizing: auto;
  /* font-weight: 16px; */
  font-style: normal;

  -webkit-user-select: none;
  /* Safari */
  -moz-user-select: none;
  /* Firefox */
  -ms-user-select: none;
  /* IE10+/Edge */
  user-select: none;
  /* Standard */
  -webkit-touch-callout: none;
  /* iOS Safari */
}

/* ─── NOISE TEXTURE ─── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

/* ─── NAV ─── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 48px;
  background: rgba(40, 40, 40, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 193, 7, 0.15);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo svg {
  height: 38px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: color 0.2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--yellow);
  transition: width 0.25s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--yellow);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-cta {
  background: linear-gradient(135deg, var(--yellow), var(--gold));
  color: var(--on-yellow);
  border: none;
  padding: 10px 22px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  text-decoration: none;
}

.nav-cta:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* ─── HERO ─── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 48px 80px;
  overflow: hidden;
}

/* Diagonal amber grid lines */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 193, 7, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 193, 7, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

/* Glow blob */
.hero-glow {
  position: absolute;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 193, 7, 0.12) 0%, transparent 70%);
  top: -100px;
  right: -100px;
  pointer-events: none;
  animation: pulseGlow 6s ease-in-out infinite;
}

@keyframes pulseGlow {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.08);
    opacity: 0.75;
  }
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--yellow);
  text-transform: uppercase;
  margin-bottom: 24px;
  padding: 6px 14px;
  border: 1px solid rgba(255, 193, 7, 0.35);
  border-radius: 20px;
  background: rgba(255, 193, 7, 0.07);
}

.hero-eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--yellow);
  animation: blink 1.6s ease-in-out infinite;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.2;
  }
}

h1 {
  font-size: clamp(42px, 5.5vw, 76px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  color: var(--text-1);
}

@keyframes lineReveal {
  to {
    transform: scaleX(1);
  }
}

.btn-primary {
  background: linear-gradient(135deg, var(--yellow), var(--gold));
  color: var(--on-yellow);
  border: none;
  padding: 14px 32px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(255, 193, 7, 0.3);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255, 193, 7, 0.4);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-secondary {
  background: linear-gradient(135deg, var(--text-muted), var(--text-2));
  color: var(--on-yellow);
  border: none;
  padding: 14px 32px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(255, 193, 7, 0.3);
}

.btn-secondary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255, 193, 7, 0.4);
}

.btn-secondary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-ghost {
  color: var(--text-1);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.btn-ghost:hover {
  border-color: var(--yellow);
  color: var(--yellow);
}

.grad-blue {
  color: var(--text-1);
  background: linear-gradient(135deg, #578fc9, #00557d);
}

/* Hero visual — device mockup */
@keyframes floatUp {
  from {
    opacity: 0;
    /* transform: translateY(calc(-50% + 40px)); */
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    /* transform: translateY(-50%); */
    transform: translateY(-40px);
  }
}

.device-card {
  background: var(--dark-mid);
  border: 1px solid rgba(255, 193, 7, 0.2);
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04);
  position: relative;
  overflow: hidden;
}

.device-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--yellow), var(--gold), transparent);
}

.device-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.device-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-dot {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 20px;
  color: #4caf50;
  font-weight: 500;
}

.status-dot::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4caf50;
  animation: blink 1.4s ease-in-out infinite;
}

/* Vitals row */
@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.2;
  }
}

.vitals-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.vital-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 14px 12px;
  text-align: center;
}

.vital-icon {
  font-size: 20px;
  margin-bottom: 6px;
}

.vital-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--yellow);
  line-height: 1;
  margin-bottom: 4px;
}

.vital-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Mini map placeholder */
.map-controls-flex {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.map-addr {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

.map-addr .direct {
  font-size: 12px;
  color: var(--yellow);
}

.dev-req-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.dev-req-accr-body {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.dev-req-accr-body .split2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

@keyframes ripple {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }

  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

/* Battery bar */
.battery-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.battery-label {
  font-size: 15px;
  color: var(--text-muted);
  white-space: nowrap;
}

.battery-bar-wrap {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.battery-fill {
  height: 100%;
  /* width: 72%; */
  background: linear-gradient(90deg, var(--yellow), var(--gold));
  border-radius: 3px;
  animation: fillBar 1.5s 1s cubic-bezier(.16, 1, .3, 1) both;
}

@keyframes fillBar {
  from {
    width: 0;
  }

  to {
    width: var(--fill-width, 72%);
  }
}

.battery-pct {
  font-size: 12px;
  font-weight: 700;
  color: var(--yellow);
}

/* ─── STATS BAR ─── */

/* ─── SECTION COMMON ─── */
section {
  position: relative;
  z-index: 1;
  padding: 100px 48px;
}

.section-title {
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-1);
  margin-bottom: 16px;
}

/* ─── FEATURES ─── */

/* ─── HOW IT WORKS ─── */
.step {
  display: flex;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: background 0.2s;
}

.step:last-child {
  border-bottom: none;
}

/* Dashboard-style preview */

/* Alerts */
.alert-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.alert-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 12px 14px;
  animation: slideIn 0.4s ease both;
}

.alert-item:nth-child(2) {
  animation-delay: 0.15s;
}

.alert-item:nth-child(3) {
  animation-delay: 0.3s;
}

.alert-item:nth-child(4) {
  animation-delay: 0.45s;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.alert-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.alert-icon.yellow {
  background: rgba(255, 193, 7, 0.15);
}

.alert-icon.green {
  background: rgba(76, 175, 80, 0.15);
}

.alert-icon.blue {
  background: rgba(66, 165, 245, 0.15);
}

.alert-info {
  flex: 1;
}

.alert-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-1);
  margin-bottom: 2px;
}

.alert-time {
  font-size: 11px;
  color: var(--text-muted);
}

.alert-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.badge-warn {
  background: rgba(255, 193, 7, 0.15);
  color: var(--yellow);
}

.badge-ok {
  background: rgba(76, 175, 80, 0.15);
  color: #4caf50;
}

.badge-info {
  background: rgba(66, 165, 245, 0.15);
  color: #42a5f5;
}

/* ─── PRODUCTS / DEVICES ─── */
.spec-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 32px;
}

.spec-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
}

.spec-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  cursor: pointer;
}

.spec-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.3;
}

.spec-val {
  font-size: 11px;
  color: var(--text-muted);
}

/* Custom Form & Table */
input[type="checkbox"] {
  appearance: none;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  width: 18px;
  height: 18px;
  cursor: pointer;
  position: relative;
  transition: background 0.2s, border-color 0.2s;
}

input[type="checkbox"]:checked {
  background: var(--yellow);
  border-color: var(--yellow);
}

input[type="checkbox"]:checked::after {
  content: '✔';
  color: var(--on-yellow);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
}

input[type="range"] {
  appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--yellow);
  cursor: pointer;
  transition: transform 0.1s;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
}

.custom-table th {
  background: rgba(255, 255, 255, 0.04);
  padding: 12px;
  text-align: left;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.custom-table td {
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 14px;
}

.custom-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.custom-table tr.active-row {
  background: rgba(255, 193, 7, 0.1) !important;
}

.search-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 16px;
  align-items: end;
  margin-bottom: 24px;
}

/* Tabs Layout */
.tab-pane {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-pane.active {
  display: block;
}

.tab-pane .device-card {
  margin-bottom: 24px;
}

.tab-pane .device-card h3 {
  font-size: 16px;
  color: var(--text-1);
}

.tab-pane .device-card h3 i {
  margin-right: 10px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Page Loading */
#pageLoadingOverlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(40, 40, 40, 0.85);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 16px;
}

#pageLoadingOverlay.active {
  display: flex;
}

.page-spinner {
  width: 52px;
  height: 52px;
  border: 5px solid rgba(255, 193, 7, 0.25);
  border-top-color: var(--yellow);
  border-radius: 50%;
  animation: pageSpin 0.75s linear infinite;
}

.page-loading-text {
  color: var(--text-1);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-align: center;
}

@keyframes pageSpin {
  to {
    transform: rotate(360deg);
  }
}

/* ─── TESTIMONIALS ─── */

/* ─── CTA BAND ─── */

/* ─── FOOTER ─── */
footer {
  position: relative;
  z-index: 1;
  background: var(--dark);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 56px 48px 32px;
}

.social-btn {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
  color: var(--yellow);
}

.social-btn:hover {
  background: rgba(255, 193, 7, 0.15);
  border-color: rgba(255, 193, 7, 0.4);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copy {
  font-size: 12px;
  color: var(--text-muted);
}

.footer-copy a {
  color: var(--yellow);
  text-decoration: none;
}

/* ─── SCROLL ANIMATIONS ─── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s cubic-bezier(.16, 1, .3, 1), transform 0.65s cubic-bezier(.16, 1, .3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-2 {
  transition-delay: 0.2s;
}

/* ─── CONTACT FORM SECTION ─── */

/* ── Form card ── */

/* ── Grid helpers ── */

/* ── Field wrapper ── */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}

.field:last-child {
  margin-bottom: 0;
}

.field label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2);
}

.field label .req {
  color: var(--yellow);
  margin-left: 2px;
}

/* ── Inputs ── */
.f-input,
.f-select,
.f-textarea {
  background: var(--dark);
  color: var(--text-1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 11px 14px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}

.f-input::placeholder,
.f-textarea::placeholder {
  color: var(--surface);
}

.f-input:focus,
.f-select:focus,
.f-textarea:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.15);
}

.f-input.has-icon {
  padding-left: 40px;
}

.input-wrap {
  position: relative;
}

.input-wrap .icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  pointer-events: none;
  opacity: 0.55;
}

/* ── Select ── */
.f-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23aaaaaa' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
  cursor: pointer;
}

.f-select option {
  background: var(--dark-mid);
  color: var(--text-1);
}

/* ── Textarea ── */
.f-textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.6;
}

/* ── Range slider ── */
.f-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  cursor: pointer;
}

.f-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--yellow);
  border: 2px solid var(--dark);
  cursor: pointer;
  box-shadow: 0 0 6px rgba(255, 193, 7, 0.5);
  transition: transform 0.15s;
}

.f-range::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.f-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--yellow);
  border: 2px solid var(--dark);
  cursor: pointer;
}

.range-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
}

.range-labels span {
  font-size: 11px;
  color: var(--text-muted);
}

.range-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--yellow);
  text-align: right;
  margin-top: 4px;
}

/* ── Checkboxes & Radios ── */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.radio-group.inline {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 12px 24px;
}

.c-check,
.c-radio {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.c-check input[type="checkbox"],
.c-radio input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  background: var(--dark);
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  transition: border-color 0.2s, background 0.2s;
}

.c-radio input[type="radio"] {
  border-radius: 50%;
}

.c-check input[type="checkbox"]:checked,
.c-radio input[type="radio"]:checked {
  background: var(--yellow);
  border-color: var(--yellow);
}

.c-check input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 6px;
  height: 10px;
  border: 2px solid var(--on-yellow);
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.c-radio input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--on-yellow);
}

.c-check:hover input[type="checkbox"],
.c-radio:hover input[type="radio"] {
  border-color: var(--yellow);
}

.c-check span,
.c-radio span {
  font-size: 14px;
  color: var(--text-2);
}

/* ── Toggle switch ── */
.toggle-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.toggle-label {
  font-size: 14px;
  color: var(--text-2);
}

.toggle-label small {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle input {
  display: none;
}

.toggle-track {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s;
}

.toggle-thumb {
  position: absolute;
  left: 3px;
  top: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--surface);
  transition: transform 0.25s, background 0.25s;
  pointer-events: none;
}

.toggle input:checked~.toggle-track {
  background: rgba(255, 193, 7, 0.25);
  border-color: rgba(255, 193, 7, 0.5);
}

.toggle input:checked~.toggle-thumb {
  transform: translateX(20px);
  background: var(--yellow);
}

/* ── File upload ── */

/* ── Date & number ── */
.f-input[type="date"],
.f-input[type="number"] {
  color-scheme: dark;
}

/* ── Fieldset divider ── */
.form-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  margin: 28px 0;
}

.form-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 193, 7, 0.2);
}

/* ── Submit row ── */

/* ── Success state ── */
.stt-good {
  color: #96bb00;
}

.stt-normal {
  color: var(--yellow-alt);
}

.stt-bad {
  color: var(--alert);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .hero {
    flex-direction: column;
    padding-top: 100px;
  }
}

@media (max-width: 768px) {
  nav {
    padding: 12px 16px;
    gap: 0;
  }

  .nav-logo svg {
    height: 28px;
  }

  /* Links luôn hiển thị, thu nhỏ lại */
  .nav-links {
    gap: 16px;
  }

  .nav-links a {
    font-size: 12px;
    letter-spacing: 0;
  }

  .nav-links a::after {
    display: none;
  }

  /* CTA thu gọn thành icon giỏ hàng */
  .nav-cta {
    padding: 9px 10px;
    border-radius: 6px;
    gap: 0;
  }

  .nav-cta-label {
    display: none;
  }
}

@media (max-width: 640px) {
  nav {
    padding: 14px 20px;
  }

  .nav-links {
    display: flex;
  }

  .nav-logo {
    display: none;
  }

  section,
  .hero,
  footer {
    padding-left: 20px;
    padding-right: 20px;
  }

  .search-form-grid {
    grid-template-columns: 1fr;
  }

  .search-form-grid .btn-primary,
  .search-form-grid .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  .search-form-grid .btn-primary.duo,
  .search-form-grid .btn-secondary.duo {
    width: 40%;
  }

  .battery-fill {
    height: 100%;
    border-radius: 3px;
    animation: none;
  }

  .vital-value {
    font-size: 16px;
    margin-top: 5px;
  }
}

/* ── HERO DEVICE ── */
.hero-device {
  position: relative;
  z-index: 1;
  animation: floatUp 1s 0.3s cubic-bezier(.16, 1, .3, 1) both;
}

.device-3d {
  background: var(--dark-mid);
  border: 1px solid rgba(255, 193, 7, 0.25);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.04), 0 0 80px rgba(255, 193, 7, 0.08);
  position: relative;
  overflow: hidden;
}

.device-3d::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--yellow), var(--gold), transparent);
}

.device-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.device-3d-name {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.live-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(76, 175, 80, 0.15);
  border: 1px solid rgba(76, 175, 80, 0.35);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 0.06em;
}

.live-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: blink 1.4s ease-in-out infinite;
}

.live-badge.off {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgb(125 93 0);
  color: var(--text-2);
}

.live-badge.off::before {
  background: var(--text-2);
  animation: none
}

/* Device visual */
.tracker-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 16px 0 20px;
  position: relative;
}

.tracker-body {
  width: 120px;
  height: 120px;
  border-radius: 28px;
  background: linear-gradient(145deg, #3a3a3a, #222);
  border: 2px solid rgba(255, 193, 7, 0.3);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 0 40px rgba(255, 193, 7, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  position: relative;
  z-index: 2;
  animation: deviceFloat 4s ease-in-out infinite;
}

@keyframes deviceFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

.tracker-icon {
  font-size: 36px;
  line-height: 1;
  z-index: 1;
  margin-top: -30px;
}

.tracker-label {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--yellow);
  margin-top: -30px;
  width: 300px;
  text-align: center;
  z-index: 2;
}

/* Orbit rings */
.orbit-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 193, 7, 0.12);
  animation: orbitSpin linear infinite;
}

.orbit-ring:nth-child(1) {
  width: 170px;
  height: 170px;
  animation-duration: 12s;
}

.orbit-ring:nth-child(2) {
  width: 220px;
  height: 220px;
  animation-duration: 18s;
  animation-direction: reverse;
  border-color: rgba(253, 46, 126, 0.1);
}

.orbit-ring:nth-child(3) {
  width: 270px;
  height: 270px;
  animation-duration: 25s;
  border-color: rgba(33, 150, 243, 0.08);
}

@keyframes orbitSpin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.orbit-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
}

.orbit-ring:nth-child(1) .orbit-dot {
  background: var(--yellow);
  box-shadow: 0 0 8px var(--yellow);
}

.orbit-ring:nth-child(2) .orbit-dot {
  background: var(--pink);
  box-shadow: 0 0 8px var(--pink);
}

/* Info rows */
.info-rows {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.info-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 9px;
  padding: 9px 12px;
}

.info-row .ir-icon {
  font-size: 15px;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}

.info-row .ir-body {
  flex: 1;
  min-width: 0;
}

.info-row .ir-lbl {
  font-size: 9px;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 2px;
}

.info-row .ir-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.info-row .ir-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  flex-shrink: 0;
}

.ir-badge.ok {
  background: rgba(76, 175, 80, 0.15);
  color: var(--green);
  border: 1px solid rgba(76, 175, 80, 0.3);
}

.ir-badge.warn {
  background: rgba(255, 193, 7, 0.12);
  color: var(--yellow);
  border: 1px solid rgba(255, 193, 7, 0.3);
}

.ir-badge.info {
  background: rgba(33, 150, 243, 0.12);
  color: #64b5f6;
  border: 1px solid rgba(33, 150, 243, 0.3);
}

/* Last updated row */
.last-updated {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding: 0 2px;
}

.last-updated::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 5px var(--green);
  flex-shrink: 0;
  animation: blink 2s ease-in-out infinite;
}

.last-updated span {
  font-weight: 500;
  color: var(--text-2);
}

/* Alert ticker */
.alert-ticker {
  background: rgba(253, 46, 126, 0.08);
  border: 1px solid rgba(253, 46, 126, 0.2);
  border-radius: 8px;
  padding: 10px 14px;
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--pink);
  animation: alertPulse 2s ease-in-out infinite;
}

@keyframes alertPulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }
}

.alert-ticker .alert-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.alert-ticker .alert-txt {
  flex: 1;
}

.alert-ticker .alert-time {
  font-size: 10px;
  color: var(--text-muted);
}

/* History Chart Styles */
.history-chart-container {
  background: rgba(40, 40, 40, 0.4);
  border: 1px solid rgba(255, 193, 7, 0.15);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.4);
}

.history-chart-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.history-chart-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--yellow);
}

.history-chart-svg {
  width: 100%;
  height: 200px;
  display: block;
}

.history-chart-wrapper {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.history-chart-axis-y {
  width: 42px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0;
  box-sizing: border-box;
  flex-shrink: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.axis-y-spacer {
  height: 10%;
  flex-shrink: 0;
}

.axis-y-label {
  font-family: monospace;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1;
  padding-left: 6px;
  white-space: nowrap;
  font-weight: 500;
}

.history-chart-axis-x {
  display: flex;
  justify-content: space-between;
  margin-right: 42px;
  padding-left: 4.44%;
  padding-right: 0.44%;
  margin-top: 6px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  padding-top: 6px;
}

.axis-x-label {
  font-family: monospace;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1;
}

@media (max-width: 767px) {
  .history-chart-container {
    padding: 8px;
    margin-bottom: 16px;
  }

  .history-chart-title {
    margin-bottom: 8px;
  }

  .history-chart-value {
    font-size: 14px;
  }

  .history-chart-wrapper {
    gap: 4px;
  }

  .history-chart-svg {
    height: 130px;
  }

  .history-chart-axis-y {
    width: 38px;
  }

  .axis-y-label {
    font-size: 12px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.95);
    padding-left: 4px;
  }

  .history-chart-axis-x {
    margin-right: 38px;
    margin-top: 4px;
    padding-top: 4px;
  }

  .axis-x-label {
    font-size: 11px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.75);
  }
}