/* =============================================
   MARINTIS - Main CSS
   marintis.mahaintra.com
   ============================================= */

:root {
  --blue-50: #EEF1F6;
  --blue-100: #D9DFE8;
  --blue-400: #1E3358;
  --blue-500: #041533;
  --blue-600: #0B2447;
  --blue-700: #030F26;
  --navy: #041533;
  --navy-light: #1A2E4A;
  --text: #1A2340;
  --text-muted: #6B7A96;
  --text-light: #A0AABF;
  --border: #E2E8F4;
  --bg: #F6F8FD;
  --white: #FFFFFF;
  --green: #0EA55A;
  --green-bg: #ECFDF5;
  --red: #E53E3E;
  --red-bg: #FFF5F5;
  --orange: #F59E0B;
  --orange-bg: #FFFBEB;
  --purple: #7C3AED;
  --shadow-sm: 0 1px 3px rgba(4,21,51,0.08), 0 1px 2px rgba(4,21,51,0.04);
  --shadow-md: 0 4px 16px rgba(4,21,51,0.10), 0 2px 6px rgba(4,21,51,0.06);
  --shadow-lg: 0 8px 32px rgba(4,21,51,0.14), 0 4px 12px rgba(4,21,51,0.08);
  --radius: 12px;
  --radius-lg: 20px;
  --font: 'Plus Jakarta Sans', sans-serif;
}

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

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

a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
input, select, textarea, button { font-family: var(--font); }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- BUTTONS ---- */
.btn-primary {
  background: var(--blue-500);
  color: #fff;
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-primary:hover { background: var(--blue-600); transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--blue-500);
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  border: 1.5px solid var(--blue-500);
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
}
.btn-outline:hover { background: var(--blue-50); }

.btn-danger {
  background: var(--red);
  color: #fff;
  padding: 8px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  border: none;
  cursor: pointer;
}

.btn-success {
  background: var(--green);
  color: #fff;
  padding: 8px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  border: none;
  cursor: pointer;
}

/* ---- NAVBAR ---- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo { height: 34px; object-fit: contain; }
.nav-tagline { font-size: 11px; color: var(--text-muted); font-weight: 500; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--blue-500); }

.nav-toggle { display: none; background: none; border: none; font-size: 20px; cursor: pointer; }

/* ---- HERO ---- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 0 60px;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #F1F4F9 0%, #ECEFF5 40%, #F8FAFE 100%);
  z-index: 0;
}

.hero-wave {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 120px;
  background: linear-gradient(180deg, transparent, var(--bg));
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue-50);
  color: var(--blue-600);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
  border: 1px solid var(--blue-100);
}

.hero-content h1 {
  font-size: 54px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  color: var(--navy);
}

.text-gradient {
  background: linear-gradient(135deg, #041533, #0B2447);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-content p {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 460px;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-bottom: 40px;
}

.btn-hero-primary {
  background: var(--blue-500);
  color: #fff;
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(4,21,51,0.3);
}
.btn-hero-primary:hover { background: var(--blue-600); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(4,21,51,0.4); }

.btn-hero-secondary {
  background: #fff;
  color: var(--text);
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  border: 1.5px solid var(--border);
  transition: all 0.2s;
}
.btn-hero-secondary:hover { border-color: var(--blue-400); color: var(--blue-500); }

.hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
}

.stat { display: flex; flex-direction: column; }
.stat strong { font-size: 18px; font-weight: 800; color: var(--navy); }
.stat span { font-size: 12px; color: var(--text-muted); }
.stat-divider { color: var(--border); font-size: 20px; }

/* ---- DASHBOARD PREVIEW ---- */
.dashboard-preview {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--border);
  overflow: hidden;
}

.preview-header {
  background: #F8FAFC;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--border);
}

.preview-dot { width: 10px; height: 10px; border-radius: 50%; }
.preview-dot.red { background: #FF5F56; }
.preview-dot.yellow { background: #FFBD2E; }
.preview-dot.green { background: #27C93F; }
.preview-title { margin-left: 8px; font-size: 12px; font-weight: 600; color: var(--text-muted); }

.preview-body { padding: 16px; }

.preview-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }

.prev-card {
  padding: 12px;
  border-radius: 10px;
}
.prev-card.blue { background: linear-gradient(135deg, #EEF1F6, #D9DFE8); }
.prev-card.green { background: linear-gradient(135deg, #ECFDF5, #D1FAE5); }

.prev-card-label { font-size: 10px; color: var(--text-muted); font-weight: 500; margin-bottom: 4px; }
.prev-card-value { font-size: 14px; font-weight: 800; color: var(--navy); }
.prev-card-sub { font-size: 10px; color: var(--green); margin-top: 2px; }

.preview-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 60px;
  margin-bottom: 16px;
  padding: 0 4px;
}

.chart-bar {
  flex: 1;
  background: linear-gradient(180deg, var(--blue-500), var(--blue-400));
  border-radius: 4px 4px 0 0;
  opacity: 0.7;
}
.chart-bar:last-child { opacity: 1; }

.preview-items { display: flex; flex-direction: column; gap: 6px; }

.prev-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}
.prev-item span:last-child { margin-left: auto; font-weight: 700; color: var(--blue-500); }
.item-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--blue-400); flex-shrink: 0; }

/* ---- FEATURES ---- */
.features { padding: 96px 0; background: #fff; }

.section-header {
  text-align: center;
  margin-bottom: 56px;
}
.section-header h2 {
  font-size: 38px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.section-header p {
  font-size: 16px;
  color: var(--text-muted);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: all 0.2s;
}
.feature-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ---- PRICING ---- */
.pricing { padding: 96px 0; }
.pricing .container { display: flex; flex-direction: column; align-items: center; }

.pricing-card {
  max-width: 420px;
  width: 100%;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 48px;
  box-shadow: var(--shadow-lg);
  border: 2px solid var(--blue-400);
  position: relative;
  text-align: center;
}

.pricing-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--blue-500);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 16px;
  border-radius: 100px;
}

.pricing-price {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  margin-bottom: 4px;
}
.price-currency { font-size: 20px; font-weight: 700; color: var(--navy); padding-top: 8px; }
.price-amount { font-size: 56px; font-weight: 800; color: var(--navy); letter-spacing: -0.04em; }
.price-period { font-size: 14px; color: var(--text-muted); padding-top: 32px; }
.pricing-name { font-size: 16px; font-weight: 600; color: var(--text-muted); margin-bottom: 32px; }

.pricing-features {
  list-style: none;
  text-align: left;
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pricing-features li {
  font-size: 14px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-pricing {
  display: block;
  background: var(--blue-500);
  color: #fff;
  padding: 14px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  text-align: center;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(4,21,51,0.3);
}
.btn-pricing:hover { background: var(--blue-600); }

/* ---- FOOTER ---- */
.footer { background: var(--navy); color: rgba(255,255,255,0.7); padding: 64px 0 32px; }

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand img { margin-bottom: 12px; }
.footer-brand p { font-size: 13px; line-height: 1.7; }

.footer-links h4 { color: #fff; font-size: 14px; font-weight: 700; margin-bottom: 16px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 13px; color: rgba(255,255,255,0.6); transition: color 0.2s; }
.footer-links a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  font-size: 13px;
  color: rgba(255,255,255,0.4);
}

/* =============================================
   AUTH PAGES (login forms)
   ============================================= */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #EEF1F6 0%, #F8FAFE 100%);
  padding: 24px;
}

.auth-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 48px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.auth-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 32px; }
.auth-logo img { height: 40px; }
.auth-logo-text h3 { font-size: 16px; font-weight: 800; color: var(--navy); }
.auth-logo-text span { font-size: 11px; color: var(--text-muted); }

.auth-title { font-size: 26px; font-weight: 800; color: var(--navy); margin-bottom: 6px; }
.auth-subtitle { font-size: 14px; color: var(--text-muted); margin-bottom: 32px; }

/* ---- FORM STYLES ---- */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.form-label .req { color: var(--red); margin-left: 2px; }

.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-control:focus {
  border-color: var(--blue-400);
  box-shadow: 0 0 0 3px rgba(4,21,51,0.1);
}
.form-control.is-invalid { border-color: var(--red); }
.form-hint { font-size: 12px; color: var(--text-light); margin-top: 5px; }
.form-error { font-size: 12px; color: var(--red); margin-top: 5px; }

.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

.input-group { position: relative; }
.input-group .form-control { padding-right: 44px; }
.input-suffix {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--text-muted);
  cursor: pointer;
}

/* Upload Area */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--bg);
}
.upload-area:hover { border-color: var(--blue-400); background: var(--blue-50); }
.upload-area.has-file { border-color: var(--green); background: var(--green-bg); }
.upload-icon { font-size: 28px; margin-bottom: 8px; }
.upload-text { font-size: 13px; color: var(--text-muted); }
.upload-text strong { color: var(--blue-500); }
.upload-input { display: none; }

/* Checkbox & Radio */
.form-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
}
.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--blue-500);
}

/* Select */
select.form-control { cursor: pointer; }

   PUBLIC LANDING PAGE (index.php) — layout fixes + responsive
   ================================================================ */
.public-page { overflow-x: hidden; }
.public-page.menu-lock { overflow: hidden; }

.nav-links a.btn-primary { color: #fff; }
.nav-links a.btn-outline { color: var(--blue-500); }
.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin-right: -8px;
  color: var(--navy); border-radius: 10px; -webkit-tap-highlight-color: transparent;
}
.nav-toggle:active { background: var(--blue-50); }

.hero { isolation: isolate; }
.hero .container { width: 100%; z-index: auto; }
.hero-visual { display: flex; justify-content: center; }
.hero-img {
  display: block; width: 100%; max-width: 540px; height: auto;
  /* latar putih gambar melebur dengan latar hero */
  mix-blend-mode: multiply;
  /* pudar halus hanya di tepi bawah, supaya apron tidak terpotong kasar */
  -webkit-mask-image: linear-gradient(to bottom, #000 90%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 90%, transparent 100%);
}

.pricing-features li { align-items: flex-start; }
.pf-check {
  flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%;
  background: var(--green-bg); color: var(--green);
  display: inline-flex; align-items: center; justify-content: center; margin-top: 1px;
}
.pf-check svg { width: 13px; height: 13px; stroke-width: 3; }
.hero-badge svg { flex-shrink: 0; }

/* ---- Tablet ---- */
@media (max-width: 900px) {
  .hero { min-height: auto; padding: 96px 0 40px; }
  .hero .container { grid-template-columns: 1fr; gap: 24px; }
  .hero-content { text-align: center; }
  .hero-content h1 { font-size: 44px; }
  .hero-content p { margin-left: auto; margin-right: auto; }
  .hero-actions, .hero-stats { justify-content: center; }
  .hero-visual { order: 2; }
  .hero-img { max-width: 480px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px 24px; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ---- Mobile ---- */
@media (max-width: 768px) {
  .nav-container { padding: 0 16px; height: 60px; }
  .nav-logo { height: 28px; }
  .nav-toggle { display: inline-flex; }

  .nav-links {
    position: fixed; top: 60px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 12px 16px 20px;
    background: #fff; border-bottom: 1px solid var(--border);
    box-shadow: 0 16px 32px rgba(4,21,51,.12);
    max-height: calc(100vh - 60px); overflow-y: auto;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }
  .navbar.menu-open .nav-links { opacity: 1; visibility: visible; transform: none; }
  .nav-links a { padding: 12px 8px; font-size: 15px; }
  .nav-links a.nav-anchor { border-bottom: 1px solid var(--border); }
  .nav-links a.btn-outline, .nav-links a.btn-primary { justify-content: center; padding: 13px 20px; margin-top: 8px; }

  .hero { padding: 84px 0 32px; }
  .container { padding: 0 18px; }
  .hero-content h1 { font-size: 34px; line-height: 1.15; }
  .hero-content p { font-size: 15px; margin-bottom: 24px; }
  .hero-actions { flex-direction: column; gap: 10px; margin-bottom: 28px; }
  .btn-hero-primary, .btn-hero-secondary { text-align: center; padding: 14px 20px; }
  .hero-stats { gap: 16px; flex-wrap: wrap; }
  .stat { align-items: center; }
  .stat strong { font-size: 16px; }
  .stat-divider { display: none; }
  .hero-stats { justify-content: space-between; }
  .hero-img { max-width: 420px; }

  .features, .pricing { padding: 56px 0; }
  .section-header { margin-bottom: 32px; }
  .section-header h2 { font-size: 26px; }
  .section-header p { font-size: 14px; }
  .features-grid { grid-template-columns: 1fr; gap: 14px; }
  .feature-card { padding: 20px; display: grid; grid-template-columns: 48px 1fr; column-gap: 16px; align-items: start; }
  .feature-card .feature-icon { grid-row: span 2; margin-bottom: 0; }
  .feature-card h3 { margin-bottom: 4px; align-self: end; }

  .pricing-card { padding: 36px 22px 28px; }
  .price-amount { font-size: 46px; }

  .footer { padding: 44px 0 24px; }
  .footer-grid { gap: 28px 16px; margin-bottom: 32px; }
}

@media (max-width: 400px) {
  .hero-content h1 { font-size: 30px; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ================================================================
   HARDWARE — katalog produk (3 kolom PC, 2 kolom mobile)
   Kartu selalu sama tinggi: gambar rasio tetap, title & deskripsi
   dikunci 2 baris, harga + tombol menempel di bawah.
   ================================================================ */
.hw-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}
.hw-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow .18s, transform .18s, border-color .18s;
}
.hw-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--blue-100); }
.hw-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #F1F5F9;
  overflow: hidden;
  flex-shrink: 0;
}
.hw-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.hw-thumb-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #CBD5E1; }
.hw-count {
  position: absolute; right: 8px; bottom: 8px;
  background: rgba(4,21,51,.72); color: #fff;
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 100px;
}
.hw-body { display: flex; flex-direction: column; flex: 1; padding: 14px; gap: 6px; min-width: 0; }
.hw-title {
  font-size: 14px; font-weight: 700; color: var(--navy);
  line-height: 1.35; height: 2.7em;            /* tepat 2 baris */
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; word-break: break-word;
}
.hw-desc {
  font-size: 12px; color: var(--text-muted);
  line-height: 1.5; height: 3em;               /* tepat 2 baris */
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; word-break: break-word;
}
.hw-price { margin-top: auto; padding-top: 6px; font-size: 16px; font-weight: 800; color: var(--blue-500); white-space: nowrap; }
.hw-buy { width: 100%; justify-content: center; margin-top: 8px; }

.hw-empty { grid-column: 1 / -1; text-align: center; padding: 56px 16px; color: var(--text-muted); background: #fff; border: 1px dashed var(--border); border-radius: 14px; }

/* Detail / galeri */
.hw-gallery-main { width: 100%; aspect-ratio: 1 / 1; border-radius: 12px; overflow: hidden; background: #F1F5F9; }
.hw-gallery-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hw-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.hw-thumbs button { flex: 0 0 60px; width: 60px; height: 60px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: #F1F5F9; cursor: pointer; }
.hw-thumbs button.on { border-color: var(--blue-500); }
.hw-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hw-detail-title { font-size: 17px; font-weight: 800; color: var(--navy); margin: 14px 0 4px; word-break: break-word; }
.hw-detail-price { font-size: 20px; font-weight: 800; color: var(--blue-500); margin-bottom: 10px; }
.hw-detail-desc { font-size: 13px; color: var(--text); line-height: 1.7; white-space: pre-line; word-break: break-word; }

/* Master: editor gambar */
.hw-img-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.hw-img-item { position: relative; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; background: #F1F5F9; border: 2px solid transparent; }
.hw-img-item.cover { border-color: var(--blue-500); }
.hw-img-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hw-img-item .hw-x { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: none; background: rgba(4,21,51,.75); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.hw-img-item .hw-star { position: absolute; left: 4px; bottom: 4px; font-size: 10px; font-weight: 700; border: none; border-radius: 100px; padding: 2px 7px; cursor: pointer; background: rgba(255,255,255,.92); color: var(--navy); }
.hw-img-item.cover .hw-star { background: var(--blue-500); color: #fff; cursor: default; }

/* Tab */
.hw-tabs { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.hw-tabs a { padding: 8px 16px; border-radius: 10px; border: 2px solid var(--border); background: #fff; font-size: 13px; font-weight: 600; color: var(--text); }
.hw-tabs a.on { background: var(--blue-500); border-color: var(--blue-500); color: #fff; }

.hw-thumb-sm { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; background: #F1F5F9; display: block; }

@media (max-width: 768px) {
  .hw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .hw-body { padding: 10px; }
  .hw-title { font-size: 13px; }
  .hw-price { font-size: 14px; }
  .hw-img-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Hardware — halaman publik / landing */
.hw-section { padding: 120px 0 72px; min-height: 70vh; }
.hw-section .section-header { margin-bottom: 36px; }
.hw-home { padding: 96px 0; background: #fff; }
.hw-home .section-header { margin-bottom: 40px; }
.hw-more { text-align: center; margin-top: 32px; }
.hw-more a { display: inline-flex; padding: 12px 28px; border-radius: 10px; font-weight: 700; font-size: 14px; }
@media (max-width: 768px) {
  .hw-section { padding: 92px 0 48px; }
  .hw-home { padding: 56px 0; }
  .hw-section .section-header h2, .hw-home .section-header h2 { font-size: 26px; }
}

/* ── Feature card link style ─────────────────────────────────────────────── */
a.feature-card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform .18s, box-shadow .18s, border-color .18s;
  position: relative;
}
a.feature-card-link:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(4,21,51,.13);
  border-color: var(--blue-500);
}
a.feature-card-link:hover .feature-icon {
  background: var(--blue-500) !important;
  color: #fff !important;
}
a.feature-card-link:hover .feature-icon svg {
  stroke: #fff;
}
.feature-link {
  display: inline-block;
  margin-top: auto;
  padding-top: 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--blue-500);
  letter-spacing: .01em;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .18s, transform .18s;
}
a.feature-card-link:hover .feature-link {
  opacity: 1;
  transform: translateX(0);
}
/* =============================================
   TENANT DASHBOARD — Design System v2
   App-shell: sidebar (desktop) + bottom tab bar (mobile)
   ============================================= */

:root {
  --ink-1: #0F1729;
  --ink-2: #5B6478;
  --ink-3: #9AA3B5;
  --line: #E8EBF2;
  --canvas: #F4F6FB;
  --surface: #FFFFFF;
  --ok: #12B76A;
  --ok-bg: #ECFDF3;
  --warn: #F79009;
  --warn-bg: #FFF7E6;
  --bad: #F04438;
  --bad-bg: #FEF0EF;
  --r-sm: 9px;
  --r-md: 13px;
  --r-lg: 18px;
  --sh-sm: 0 1px 2px rgba(15,23,41,.05), 0 1px 1px rgba(15,23,41,.03);
  --sh-md: 0 6px 20px rgba(15,23,41,.07);
  --sh-lg: 0 16px 40px rgba(15,23,41,.14);
  --nav-w: 232px;
}

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

body.dashboard-layout {
  background: var(--canvas);
  color: var(--ink-1);
  min-height: 100vh;
  display: flex;
  -webkit-tap-highlight-color: transparent;
}

/* ─────────────────────────────────────────────
   DESKTOP SIDE NAV
───────────────────────────────────────────── */
.side-nav {
  width: var(--nav-w);
  flex-shrink: 0;
  background: var(--navy);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  transition: transform .25s ease;
}

.side-nav-brand {
  padding: 20px 20px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.side-nav-brand img { height: 26px; object-fit: contain; }

.side-nav-status {
  margin: 0 16px 14px;
  padding: 11px 13px;
  border-radius: var(--r-md);
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.08);
}
.side-nav-status .lbl { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; color: rgba(255,255,255,.4); text-transform: uppercase; margin-bottom: 3px; }
.side-nav-status .val { font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.side-nav-status .dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.side-nav-status.ok  .dot { background: #34D399; box-shadow: 0 0 0 3px rgba(52,211,153,.18); }
.side-nav-status.warn .dot { background: #FBBF24; box-shadow: 0 0 0 3px rgba(251,191,36,.18); }
.side-nav-status.bad .dot { background: #F87171; box-shadow: 0 0 0 3px rgba(248,113,113,.18); }
.side-nav-status.ok  .val { color: #6EE7B7; }
.side-nav-status.warn .val { color: #FCD34D; }
.side-nav-status.bad .val { color: #FCA5A5; }

.side-nav-scroll { flex: 1; overflow-y: auto; padding: 4px 12px 12px; }
.side-nav-group-lbl { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.28); padding: 14px 10px 6px; }

.side-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 11px;
  border-radius: var(--r-sm);
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(255,255,255,.62);
  text-decoration: none;
  margin-bottom: 1px;
  transition: background .12s, color .12s;
  position: relative;
}
.side-nav a svg { flex-shrink: 0; opacity: .85; }
.side-nav a:hover { background: rgba(255,255,255,.05); color: #fff; }
.side-nav a.active { background: rgba(255,255,255,.12); color: #fff; font-weight: 700; }
.side-nav a.active svg { opacity: 1; color: #fff; }
.side-nav a.active::before {
  content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px;
  background: #fff; border-radius: 0 3px 3px 0;
}

.side-nav-foot { padding: 12px; border-top: 1px solid rgba(255,255,255,.07); }
.side-nav-foot a { color: rgba(248,113,113,.85) !important; }
.side-nav-foot a:hover { background: rgba(248,113,113,.1) !important; color: #fca5a5 !important; }

/* ─────────────────────────────────────────────
   MAIN CONTENT + TOPBAR
───────────────────────────────────────────── */
.main-content {
  margin-left: var(--nav-w);
  flex: 1;
  min-width: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
}

.tbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(244,246,251,.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 16px 28px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.tbar-icon {
  width: 38px; height: 38px; border-radius: var(--r-md);
  background: var(--blue-50); color: var(--blue-500);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.tbar-text { flex: 1; min-width: 0; }
.tbar-title { font-size: 17px; font-weight: 800; color: var(--ink-1); line-height: 1.25; }
.tbar-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 1px; }
.tbar-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }
.tbar-uid { font-family: 'SF Mono', ui-monospace, monospace; font-size: 11.5px; font-weight: 700; color: var(--blue-500); background: var(--blue-50); padding: 5px 10px; border-radius: 100px; }

.page { padding: 22px 28px 100px; max-width: 1280px; }

/* ─────────────────────────────────────────────
   MOBILE: bottom tab bar + more-sheet
───────────────────────────────────────────── */
.bottom-nav { display: none; }
.more-sheet-backdrop { display: none; }

@media (max-width: 1023px) {
  .side-nav { transform: translateX(-100%); }
  .side-nav.open { transform: translateX(0); box-shadow: var(--sh-lg); }
  .main-content { margin-left: 0; }
  .page { padding: 16px 14px 90px; }
  .tbar { padding: 14px 16px; }
  .tbar-title { font-size: 15.5px; }
  .tbar-uid { display: none; }

  .bottom-nav {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 150;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -4px 20px rgba(15,23,41,.06);
  }
  .bn-item {
    flex: 1;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; padding: 6px 2px;
    text-decoration: none; color: var(--ink-3);
    border: none; background: none; font-family: inherit; cursor: pointer;
  }
  .bn-item svg { width: 21px; height: 21px; }
  .bn-item span { font-size: 10px; font-weight: 600; }
  .bn-item.active { color: var(--blue-500); }
  .bn-item.active svg { color: var(--blue-500); }

  .more-sheet-backdrop {
    display: block;
    position: fixed; inset: 0; z-index: 250;
    background: rgba(10,20,35,.4);
    opacity: 0; pointer-events: none;
    transition: opacity .2s;
  }
  .more-sheet-backdrop.show { opacity: 1; pointer-events: auto; }
  .more-sheet {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 260;
    background: #fff;
    border-radius: 22px 22px 0 0;
    padding: 8px 14px calc(18px + env(safe-area-inset-bottom, 0px));
    transform: translateY(100%);
    transition: transform .28s cubic-bezier(.32,.72,0,1);
    max-height: 72vh; overflow-y: auto;
    box-shadow: 0 -10px 40px rgba(15,23,41,.2);
  }
  .more-sheet-backdrop.show .more-sheet { transform: translateY(0); }
  .more-sheet-handle { width: 36px; height: 4px; background: var(--line); border-radius: 3px; margin: 6px auto 14px; }
  .more-sheet-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 4px 6px; }
  .more-sheet a, .more-sheet button.ms-item {
    display: flex; flex-direction: column; align-items: center; gap: 7px;
    padding: 14px 6px; border-radius: 14px; text-decoration: none;
    color: var(--ink-1); border: none; background: none; font-family: inherit; cursor: pointer;
  }
  .more-sheet a:active, .more-sheet button.ms-item:active { background: var(--canvas); }
  .more-sheet .ms-ic { width: 44px; height: 44px; border-radius: 13px; background: var(--blue-50); color: var(--blue-500); display: flex; align-items: center; justify-content: center; }
  .more-sheet span { font-size: 11.5px; font-weight: 600; text-align: center; line-height: 1.25; }
  .more-sheet .ms-ic.danger { background: var(--bad-bg); color: var(--bad); }
  .more-sheet .ms-divider { grid-column: 1/-1; height: 1px; background: var(--line); margin: 6px 0; }
}

/* ─────────────────────────────────────────────
   CARD / SECTION
───────────────────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  box-shadow: var(--sh-sm);
}
.card-header {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 16px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.card-title { font-size: 14.5px; font-weight: 800; color: var(--ink-1); display: flex; align-items: center; gap: 8px; }
.card-title svg { color: var(--blue-500); }

/* ─────────────────────────────────────────────
   GRIDS
───────────────────────────────────────────── */
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.g3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.g4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; }
.gauto { display: grid; grid-template-columns: repeat(auto-fill,minmax(220px,1fr)); gap: 14px; }
@media (max-width: 900px) { .g3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px) {
  .g2, .g3, .g4 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .gauto { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) {
  .g2 { grid-template-columns: 1fr; }
}

/* ─────────────────────────────────────────────
   STAT CARD
───────────────────────────────────────────── */
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 16px 18px; display: flex; align-items: center; gap: 13px; box-shadow: var(--sh-sm);
}
.stat-ic { width: 42px; height: 42px; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-v { font-size: 21px; font-weight: 800; color: var(--ink-1); line-height: 1.15; letter-spacing: -.01em; }
.stat-l { font-size: 12px; color: var(--ink-3); margin-top: 2px; font-weight: 500; }
@media (max-width: 700px) {
  .stat { padding: 13px 14px; gap: 10px; }
  .stat-ic { width: 36px; height: 36px; }
  .stat-v { font-size: 17px; }
  .stat-l { font-size: 11px; }
}

/* ─────────────────────────────────────────────
   BANNER (trial / expiry)
───────────────────────────────────────────── */
.banner { border-radius: var(--r-lg); padding: 16px 18px; display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.banner-ic { width: 40px; height: 40px; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.banner-title { font-weight: 800; font-size: 14px; }
.banner-sub { font-size: 12.5px; margin-top: 2px; opacity: .85; }
.banner-cta { flex-shrink: 0; padding: 9px 16px; border-radius: 10px; font-weight: 700; font-size: 12.5px; text-decoration: none; white-space: nowrap; }
.banner.ok   { background: var(--ok-bg); border: 1px solid #A7F3D0; }
.banner.ok   .banner-ic { background: var(--ok); color: #fff; }
.banner.ok   .banner-title { color: #067647; }
.banner.ok   .banner-sub { color: #067647; }
.banner.ok   .banner-cta { background: var(--ok); color: #fff; }
.banner.warn { background: var(--warn-bg); border: 1px solid #FDE4B0; }
.banner.warn .banner-ic { background: var(--warn); color: #fff; }
.banner.warn .banner-title { color: #93400E; }
.banner.warn .banner-sub { color: #93400E; }
.banner.warn .banner-cta { background: var(--warn); color: #fff; }
.banner.bad  { background: var(--bad-bg); border: 1px solid #FDB8B3; }
.banner.bad  .banner-ic { background: var(--bad); color: #fff; }
.banner.bad  .banner-title { color: #91221A; }
.banner.bad  .banner-sub { color: #91221A; }
.banner.bad  .banner-cta { background: var(--bad); color: #fff; }
@media (max-width: 560px) {
  .banner { flex-wrap: wrap; }
  .banner-cta { width: 100%; text-align: center; order: 3; }
}

/* ─────────────────────────────────────────────
   RESPONSIVE TABLE (rtable) — becomes cards on mobile
───────────────────────────────────────────── */
.rtable-wrap { overflow-x: auto; }
table.rtable { width: 100%; border-collapse: collapse; }
table.rtable th {
  text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--ink-3); padding: 11px 18px; background: #FAFBFD;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.rtable td { padding: 13px 18px; font-size: 13.5px; border-bottom: 1px solid #F1F3F9; color: var(--ink-1); vertical-align: middle; }
table.rtable tbody tr:last-child td { border-bottom: none; }
table.rtable tbody tr:hover td { background: #FAFBFF; }

@media (max-width: 760px) {
  table.rtable thead { display: none; }
  table.rtable, table.rtable tbody, table.rtable tr, table.rtable td { display: block; width: 100%; }
  table.rtable tr {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
    margin-bottom: 10px; padding: 4px 14px; box-shadow: var(--sh-sm);
  }
  table.rtable td {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 9px 0; border-bottom: 1px solid #F1F3F9; text-align: right;
  }
  table.rtable td:last-child { border-bottom: none; }
  table.rtable td::before {
    content: attr(data-label); font-size: 11.5px; font-weight: 700; color: var(--ink-3);
    text-align: left; flex-shrink: 0;
  }
  table.rtable td[data-label=""]::before,
  table.rtable td:not([data-label])::before { content: ''; }
}

/* ─────────────────────────────────────────────
   BADGES
───────────────────────────────────────────── */
.bd { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 100px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.bd-ok   { background: var(--ok-bg); color: #067647; }
.bd-bad  { background: var(--bad-bg); color: #91221A; }
.bd-warn { background: var(--warn-bg); color: #93400E; }
.bd-info { background: var(--blue-50); color: var(--blue-600); }
.bd-mute { background: #F1F3F9; color: var(--ink-2); }

/* ─────────────────────────────────────────────
   BUTTONS (dashboard scope reuse .btn-primary/.btn-outline)
───────────────────────────────────────────── */
.btn-sm { padding: 7px 13px !important; font-size: 12.5px !important; border-radius: 9px !important; }
.btn-icon { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 9px; font-size: 12px; font-weight: 700; border: 1.5px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer; transition: .12s; text-decoration: none; }
.btn-icon:hover { border-color: var(--blue-500); color: var(--blue-500); }
.btn-icon.danger { border-color: #FDCDC9; color: var(--bad); }
.btn-icon.danger:hover { background: var(--bad-bg); }
.btn-block { width: 100%; justify-content: center; }

/* ─────────────────────────────────────────────
   EMPTY STATE
───────────────────────────────────────────── */
.empty { text-align: center; padding: 52px 20px; color: var(--ink-3); }
.empty svg { opacity: .35; margin-bottom: 14px; }
.empty p { font-size: 13.5px; line-height: 1.6; }
.empty a { color: var(--blue-500); font-weight: 700; }

/* ─────────────────────────────────────────────
   FORM (dashboard scope)
───────────────────────────────────────────── */
.fld { margin-bottom: 14px; }
.fld label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.fld input, .fld select, .fld textarea {
  width: 100%; padding: 10px 13px; border: 1.5px solid var(--line); border-radius: var(--r-sm);
  font-size: 14px; font-family: inherit; color: var(--ink-1); background: #fff; transition: border-color .12s;
}
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: none; border-color: var(--blue-500); }
.fld .hint { font-size: 11.5px; color: var(--ink-3); margin-top: 4px; }

/* ─────────────────────────────────────────────
   MODAL (bottom sheet on mobile)
───────────────────────────────────────────── */
.ov { position: fixed; inset: 0; z-index: 400; background: rgba(10,20,35,.45); display: flex; align-items: center; justify-content: center; padding: 20px; }
.dlg { background: #fff; border-radius: var(--r-lg); width: 100%; box-shadow: var(--sh-lg); max-height: 90vh; display: flex; flex-direction: column; }
.dlg-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.dlg-title { font-size: 15.5px; font-weight: 800; color: var(--ink-1); display: flex; align-items: center; gap: 8px; }
.dlg-x { width: 30px; height: 30px; border-radius: 8px; border: none; background: var(--canvas); color: var(--ink-2); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.dlg-body { padding: 20px 22px; overflow-y: auto; }
@media (max-width: 640px) {
  .ov { align-items: flex-end; padding: 0; }
  .dlg { border-radius: 20px 20px 0 0; max-height: 92vh; }
}

/* ─────────────────────────────────────────────
   TOAST
───────────────────────────────────────────── */
.toast, .toast-x { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink-1); color: #fff; padding: 12px 20px; border-radius: 11px; font-size: 13px; font-weight: 600; box-shadow: var(--sh-lg); z-index: 500; display: flex; align-items: center; gap: 8px; max-width: 90vw; }
.toast.success { background: var(--ok); }
.toast.error   { background: var(--bad); }
.toast.info    { background: var(--ink-1); }
@media (max-width: 1023px) { .toast, .toast-x { bottom: 82px; left: 16px; right: 16px; transform: none; max-width: none; } }

/* ─────────────────────────────────────────────
   COMPAT LAYER — legacy classes still used by hardware.php
───────────────────────────────────────────── */
.btn { display:inline-flex; align-items:center; gap:6px; padding:9px 16px; border-radius:10px; font-size:13px; font-weight:700; border:1.5px solid var(--line); background:#fff; color:var(--ink-2); cursor:pointer; text-decoration:none; font-family:inherit; transition:.12s; }
.btn:hover { border-color:var(--blue-500); color:var(--blue-500); }
.btn.btn-primary, .btn.btn-primary:hover, .btn.btn-primary:focus, .btn.btn-primary:active { color:#fff; }
.btn.btn-primary { background:var(--blue-500); border-color:var(--blue-500); }
.btn.btn-primary:hover { background:var(--blue-600); border-color:var(--blue-600); }
.badge { display:inline-flex; align-items:center; gap:4px; padding:3px 10px; border-radius:100px; font-size:11px; font-weight:700; white-space:nowrap; }
.badge-success { background:var(--ok-bg); color:#067647; }
.badge-danger  { background:var(--bad-bg); color:#91221A; }
.badge-warning { background:var(--warn-bg); color:#93400E; }
.badge-primary { background:var(--blue-50); color:var(--blue-600); }
.table-wrapper { overflow-x:auto; }
table.data-table { width:100%; border-collapse:collapse; }
table.data-table th { text-align:left; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:var(--ink-3); padding:11px 16px; background:#FAFBFD; border-bottom:1px solid var(--line); white-space:nowrap; }
table.data-table td { padding:12px 16px; font-size:13px; border-bottom:1px solid #F1F3F9; }
@media (max-width:760px){
  table.data-table thead{display:none}
  table.data-table, table.data-table tbody, table.data-table tr, table.data-table td{display:block;width:100%}
  table.data-table tr{background:#fff;border:1px solid var(--line);border-radius:12px;margin-bottom:10px;padding:4px 14px}
  table.data-table td{border-bottom:1px solid #F1F3F9;padding:9px 0}
  table.data-table td:last-child{border-bottom:none}
}

/* Legacy modal classes compat (used by hardware.php) */
.modal-backdrop { display:none; position:fixed; inset:0; z-index:400; background:rgba(10,20,35,.45); align-items:center; justify-content:center; padding:20px; }
.modal-backdrop.show { display:flex; }
.modal-backdrop .modal { background:#fff; border-radius:var(--r-lg); width:100%; max-width:520px; box-shadow:var(--sh-lg); max-height:90vh; display:flex; flex-direction:column; margin:0 auto; }
.modal-header { display:flex; align-items:center; justify-content:space-between; padding:18px 22px; border-bottom:1px solid var(--line); flex-shrink:0; }
.modal-title { font-size:15.5px; font-weight:800; color:var(--ink-1); display:flex; align-items:center; gap:8px; }
.modal-close { width:30px; height:30px; border-radius:8px; border:none; background:var(--canvas); color:var(--ink-2); display:flex; align-items:center; justify-content:center; cursor:pointer; font-size:0; }
.modal-close::before { content:'✕'; font-size:15px; line-height:1; }
.modal-close:hover { background:var(--bad-bg); color:var(--bad); }
.modal-body { padding:20px 22px; overflow-y:auto; }
.modal-footer { display:flex; justify-content:flex-end; gap:10px; padding:16px 22px; border-top:1px solid var(--line); flex-shrink:0; }
@media (max-width:640px) {
  .modal-backdrop { align-items:flex-end; padding:0; }
  .modal-backdrop .modal { border-radius:20px 20px 0 0; max-height:92vh; max-width:none; }
}

/* ═══════════════════════════════════════════════════════════
   MASTER ADMIN PANEL — restyled to match new design system
   (keeps original class names used across master/*.php so no
   markup rewrite is needed; just re-skinned with new tokens)
═══════════════════════════════════════════════════════════ */

body:has(.dashboard-layout) { margin: 0; }
.dashboard-layout {
  display: flex;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--ink-1);
}

/* Sidebar (dark, fixed — desktop; slide-in overlay — mobile) */
.dashboard-layout > .sidebar {
  width: var(--nav-w);
  flex-shrink: 0;
  background: var(--navy);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  transition: transform .25s ease;
}
.sidebar-brand { padding: 20px 20px 18px; display: flex; align-items: center; gap: 10px; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 6px 12px 12px; display: flex; flex-direction: column; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: var(--r-sm);
  font-size: 13.5px; font-weight: 500; color: rgba(255,255,255,.62); text-decoration: none;
  margin-bottom: 2px; transition: background .12s, color .12s; position: relative;
}
.sidebar-nav a svg { flex-shrink: 0; opacity: .85; }
.sidebar-nav a:hover { background: rgba(255,255,255,.05); color: #fff; }
.sidebar-nav a.active { background: rgba(255,255,255,.12); color: #fff; font-weight: 700; }
.sidebar-nav a.active svg { opacity: 1; color: #fff; }
.sidebar-nav a.active::before {
  content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px;
  background: #fff; border-radius: 0 3px 3px 0;
}
.sidebar-nav a[style*="color:var(--red)"] { color: rgba(248,113,113,.85) !important; margin-top: auto; }
.sidebar-nav a[style*="color:var(--red)"]:hover { background: rgba(248,113,113,.1); color: #fca5a5 !important; }

.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(10,20,35,.5); z-index: 190; }
.sidebar-overlay.visible { display: block; }

/* Main content + topbar (mirrors .tbar look) */
.dashboard-layout > .main-content { margin-left: var(--nav-w); flex: 1; min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 60;
  background: rgba(244,246,251,.85); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); padding: 16px 28px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.topbar-title { font-size: 17px; font-weight: 800; color: var(--ink-1); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.topbar-user { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--ink-2); background: #fff; border: 1.5px solid var(--line); padding: 7px 13px; border-radius: 100px; }
.sidebar-toggle { display: none; width: 36px; height: 36px; border-radius: 9px; border: 1.5px solid var(--line); background: #fff; align-items: center; justify-content: center; cursor: pointer; color: var(--ink-2); }

.page-content { padding: 22px 28px 60px; max-width: 1280px; }

/* Stat card (old naming) → same look as .stat */
.stat-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 16px 18px; display: flex; align-items: center; gap: 13px; box-shadow: var(--sh-sm);
}
.stat-icon { width: 42px; height: 42px; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-value { font-size: 21px; font-weight: 800; color: var(--ink-1); line-height: 1.15; letter-spacing: -.01em; }
.stat-label { font-size: 12px; color: var(--ink-3); margin-top: 2px; font-weight: 500; }

@media (max-width: 1023px) {
  .dashboard-layout > .sidebar { transform: translateX(-100%); box-shadow: var(--sh-lg); }
  .dashboard-layout > .sidebar.open { transform: translateX(0); }
  .dashboard-layout > .main-content { margin-left: 0; }
  .topbar { padding: 14px 16px; }
  .topbar-title { font-size: 15.5px; }
  .sidebar-toggle { display: flex; }
  .page-content { padding: 16px 14px 60px; }
  .stat-card { padding: 13px 14px; gap: 10px; }
  .stat-icon { width: 36px; height: 36px; }
  .stat-value { font-size: 17px; }
  .stat-label { font-size: 11px; }
}

/* Master panel — additional small components */
.stat-info { display: flex; flex-direction: column; gap: 1px; }
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.page-title { font-size: 19px; font-weight: 800; color: var(--ink-1); margin: 0; }
.page-subtitle { font-size: 13px; color: var(--ink-3); margin: 3px 0 0; }
.topbar-subtitle { font-size: 12px; color: var(--ink-3); margin-top: 1px; }
.uid-badge { font-family: 'SF Mono', ui-monospace, monospace; font-size: 11.5px; font-weight: 700; color: var(--blue-500); background: var(--blue-50); padding: 4px 9px; border-radius: 100px; white-space: nowrap; }
.upload-hint { font-size: 11.5px; color: var(--ink-3); margin-top: 6px; }
.text-blue { color: var(--blue-500) !important; }
.font-mono { font-family: 'SF Mono', ui-monospace, monospace; }
.w-100 { width: 100%; }
.alert { padding: 12px 16px; border-radius: 11px; font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.alert-success { background: var(--ok-bg); color: #067647; border: 1px solid #A7F3D0; }
.alert-error   { background: var(--bad-bg); color: #91221A; border: 1px solid #FDB8B3; }
@media (max-width: 700px) {
  .page-header { flex-direction: column; align-items: flex-start; }
  .page-title { font-size: 17px; }
}
