/* ==========================================================================
   SANDY - WEB & APP DEVELOPMENT COMPANY
   Project, Device & Service Verification Portal & Admin Dashboard
   ========================================================================== */

:root {
  /* Light Theme (Default) */
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-input: #ffffff;
  --bg-card: #ffffff;
  
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-dim: #94a3b8;

  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: #eff6ff;

  --green: #10b981;
  --green-soft: #ecfdf5;
  --amber: #f59e0b;
  --amber-soft: #fffbeb;
  --red: #ef4444;
  --red-soft: #fef2f2;
  --purple: #8b5cf6;
  --purple-soft: #f5f3ff;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 20px -3px rgba(0, 0, 0, 0.08);

  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

/* Dark Theme */
[data-theme="dark"] {
  --bg-page: #0b0f19;
  --bg-surface: #131b2e;
  --bg-subtle: #1a243b;
  --bg-input: #0b0f19;
  --bg-card: #131b2e;
  
  --border: #23304b;
  --border-strong: #334466;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --primary: #3b82f6;
  --primary-hover: #60a5fa;
  --primary-soft: rgba(59, 130, 246, 0.15);

  --green: #34d399;
  --green-soft: rgba(52, 211, 153, 0.15);
  --amber: #fbbf24;
  --amber-soft: rgba(251, 191, 36, 0.15);
  --red: #f87171;
  --red-soft: rgba(248, 113, 113, 0.15);
  --purple: #a78bfa;
  --purple-soft: rgba(167, 139, 250, 0.15);

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 20px -3px rgba(0, 0, 0, 0.5);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.hidden { display: none !important; }
.text-muted { color: var(--text-muted); }
.text-green { color: var(--green); }
.text-amber { color: var(--amber); }
.text-blue { color: var(--primary); }
.text-purple { color: var(--purple); }
.text-red { color: var(--red); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-bold { font-weight: 600; }
.font-mono { font-family: var(--font-mono); }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.justify-center { justify-content: center !important; }

/* ==========================================================================
   NAVIGATION BAR
   ========================================================================== */
.navbar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}

.nav-container {
  max-width: 1350px;
  margin: 0 auto;
  height: 68px;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  user-select: none;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.25);
  border: 2px solid var(--primary);
  background: var(--bg-surface);
  flex-shrink: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.brand:hover .brand-icon {
  transform: scale(1.05);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-text {
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  display: block;
  line-height: 1.1;
}

.brand-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
  display: block;
}

/* Tabs */
.nav-tabs {
  display: flex;
  background: var(--bg-subtle);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  gap: 3px;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 1rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.nav-tab i {
  width: 16px;
  height: 16px;
}

.nav-tab:hover {
  color: var(--text-main);
}

.nav-tab.active {
  background: var(--bg-surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.theme-toggle-btn:hover {
  color: var(--text-main);
  border-color: var(--border-strong);
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn i {
  width: 16px;
  height: 16px;
}

.btn-sm {
  padding: 0.35rem 0.8rem;
  font-size: 0.8rem;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: var(--bg-surface);
  border-color: var(--border);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
  border-color: var(--border-strong);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}

.btn-text {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.btn-text:hover {
  color: var(--primary-hover);
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.35rem;
  border-radius: var(--radius-sm);
  display: flex;
}

.btn-close:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}

/* ==========================================================================
   PAGE LAYOUT
   ========================================================================== */
.page-container {
  max-width: 1350px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.view-panel {
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   PUBLIC VIEW / HERO
   ========================================================================== */
.hero-clean {
  text-align: center;
  max-width: 760px;
  margin: 2.5rem auto 3rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.hero-badge i { width: 15px; height: 15px; }

.hero-heading {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.9rem;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 2.25rem;
}

/* Public Search Input */
.search-box-clean {
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 0.4rem 0.5rem 0.4rem 1.15rem;
  box-shadow: var(--shadow-md);
  gap: 0.6rem;
  transition: all 0.2s ease;
}

.search-box-clean:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

.search-icon {
  width: 20px;
  height: 20px;
  color: var(--text-dim);
}

.search-box-clean input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 1.05rem;
  color: var(--text-main);
  padding: 0.5rem 0;
}

.search-box-clean input::placeholder {
  color: var(--text-dim);
}

.btn-search {
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
}

.sample-tags {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
  font-size: 0.8rem;
}

.sample-label {
  color: var(--text-dim);
}

.sample-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sample-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
}

/* Public Results Area */
.results-area {
  max-width: 800px;
  margin: 0 auto 3rem;
  width: 100%;
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.results-title-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.results-title-group h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.result-card-clean {
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.result-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.result-device-brand {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  font-weight: 700;
}

.result-title {
  font-size: 1.35rem;
  font-weight: 800;
}

.result-serial {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.result-item-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.result-item-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}

/* Public Additional Services Pill List */
.pub-addons-section {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.pub-addons-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.pub-addons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}

.pub-addon-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pub-addon-name {
  font-weight: 600;
  font-size: 0.85rem;
}

.pub-addon-qty {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.result-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Feature Pillars Grid */
.info-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  max-width: 1050px;
  margin: 3.5rem auto 0;
}

.info-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.info-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.info-icon.text-blue { background: var(--primary-soft); color: var(--primary); }
.info-icon.text-green { background: var(--green-soft); color: var(--green); }
.info-icon.text-purple { background: var(--purple-soft); color: var(--purple); }

.info-card h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.info-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ==========================================================================
   ADMIN DASHBOARD
   ========================================================================== */
.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.dashboard-header h2 {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Stats Row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.35rem;
  box-shadow: var(--shadow-sm);
}

.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stat-icon {
  width: 20px;
  height: 20px;
}

.stat-num {
  font-size: 1.65rem;
  font-weight: 800;
  font-family: var(--font-mono);
  display: block;
}

.stat-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  display: block;
}

/* Table Toolbar */
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.85rem;
  gap: 0.5rem;
  flex: 1;
  min-width: 280px;
}

.search-input-wrap i {
  width: 16px;
  height: 16px;
  color: var(--text-dim);
}

.search-input-wrap input {
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--text-main);
  width: 100%;
}

.filters-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filters-wrap select {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.825rem;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  outline: none;
  font-weight: 500;
}

/* Master Records Table */
.table-container {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

.clean-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}

.clean-table th {
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.clean-table td {
  padding: 0.95rem 1.15rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.clean-table tbody tr:last-child td {
  border-bottom: none;
}

.clean-table tbody tr:hover {
  background: var(--bg-subtle);
}

.device-cell {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.device-title-text {
  font-weight: 700;
}

.serial-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-block;
}

.serial-tag:hover {
  text-decoration: underline;
}

.owner-cell {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.owner-name {
  font-weight: 600;
}

.owner-contact {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.addons-badge-btn {
  background: var(--purple-soft);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: var(--purple);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.15s ease;
}

.addons-badge-btn:hover {
  background: var(--purple);
  color: #ffffff;
}

/* Table Addon Items */
.table-addons-container {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.table-addon-item {
  display: flex;
  flex-direction: column;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.45rem;
  font-size: 0.75rem;
  line-height: 1.3;
}

.table-addon-name {
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table-addon-math {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.badge-purple {
  background: var(--purple-soft);
  color: var(--purple);
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.monthly-cost-cell {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--primary);
}

.visibility-indicator-tag {
  font-size: 0.72rem;
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-green { background: var(--green-soft); color: var(--green); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-blue { background: var(--primary-soft); color: var(--primary); }

/* Table Action Buttons */
.row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
}

.action-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.action-btn i { width: 14px; height: 14px; }

.action-btn:hover {
  color: var(--text-main);
  border-color: var(--border-strong);
  background: var(--bg-subtle);
}

.action-btn.btn-del:hover {
  color: var(--red);
  border-color: var(--red);
  background: var(--red-soft);
}

/* Empty State */
.empty-state {
  padding: 3.5rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.empty-icon {
  width: 40px;
  height: 40px;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}

/* ==========================================================================
   MODALS & FORMS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
  animation: fadeIn 0.15s ease;
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 620px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-lg { max-width: 860px; }
.modal-md { max-width: 600px; }
.modal-sm { max-width: 420px; }

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.modal-icon-badge {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 78vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
}

/* Form Sections */
.form-section-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.4rem;
}

.section-head-split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}

.form-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.label-split {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-item label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
}

.required-star { color: var(--red); }

.form-item input,
.form-item select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.8rem;
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.15s ease;
}

.form-item input:focus,
.form-item select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.readonly-input {
  background: var(--bg-subtle) !important;
  color: var(--text-muted) !important;
  cursor: not-allowed;
}

.form-error {
  font-size: 0.75rem;
  color: var(--red);
  min-height: 0.9rem;
}

/* ==========================================================================
   ADDITIONAL SERVICES BUILDER TABLE
   ========================================================================== */
.services-table-wrapper {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.services-builder-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.825rem;
}

.services-builder-table th {
  background: rgba(0, 0, 0, 0.03);
  padding: 0.5rem 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.services-builder-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.services-builder-table input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.55rem;
  font-family: inherit;
  font-size: 0.825rem;
  color: var(--text-main);
  outline: none;
}

.services-builder-table input:focus {
  border-color: var(--primary);
}

.services-empty-hint {
  padding: 1.25rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ==========================================================================
   CALCULATION SUMMARY CARD (LIVE FINANCIAL SUMMARY)
   ========================================================================== */
.calculation-summary-card {
  background: var(--bg-subtle);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.summary-stat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.summary-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.summary-stat-val {
  font-size: 1.15rem;
  font-weight: 800;
  font-family: var(--font-mono);
  transition: all 0.2s ease;
}

.highlight-stat {
  background: var(--primary-soft);
  border: 1px solid rgba(37, 99, 235, 0.25);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
}

.summary-stat-formula {
  font-size: 0.7rem;
  color: var(--primary);
  font-weight: 600;
}

.summary-divider {
  width: 1px;
  height: 38px;
  background: var(--border);
}

/* ==========================================================================
   ANIMATED COST REVEAL COMPONENT (PUBLIC VIEW)
   ========================================================================== */
.cost-reveal-wrapper {
  background: var(--bg-subtle);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: all 0.25s ease;
}

.cost-reveal-wrapper.revealed {
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}

.cost-reveal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cost-reveal-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.825rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.cost-reveal-title i {
  width: 16px;
  height: 16px;
}

.btn-reveal-cost {
  background: var(--bg-surface);
  border: 1.5px solid var(--primary);
  color: var(--primary);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-sm);
}

.btn-reveal-cost:hover {
  background: var(--primary);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-reveal-cost i {
  width: 14px;
  height: 14px;
}

.cost-anim-target {
  display: inline-block;
  letter-spacing: -0.02em;
}

.cost-masked {
  letter-spacing: 0.2em;
  color: var(--text-dim) !important;
  user-select: none;
}

/* ==========================================================================
   ADMIN PUBLIC VISIBILITY SWITCHES
   ========================================================================== */
.modal-md {
  max-width: 620px;
}

.visibility-grid,
.visibility-controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.85rem;
}

.visibility-item,
.vis-item {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.vis-title,
.vis-name {
  font-size: 0.825rem;
  font-weight: 700;
  color: var(--text-main);
}

.vis-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* iOS Style Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--border-strong);
  transition: .2s;
  border-radius: 999px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .2s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--primary);
}

input:checked + .slider:before {
  transform: translateX(16px);
}

/* ==========================================================================
   MANAGE SERVICES MODAL
   ========================================================================== */
.quick-add-service-form {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
}

.quick-services-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.quick-service-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.85rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

/* ==========================================================================
   QR PASSPORT
   ========================================================================== */
.qr-box {
  display: flex;
  justify-content: center;
  padding: 1rem;
  background: #ffffff;
  border-radius: var(--radius-md);
  margin: 0.5rem auto;
  width: 170px;
  height: 170px;
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   TOASTS
   ========================================================================== */
.toast-wrap {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 200;
}

.clean-toast {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.15rem;
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: fadeIn 0.15s ease;
}

.clean-toast.toast-success { border-left-color: var(--green); }
.clean-toast.toast-error { border-left-color: var(--red); }

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   PACKAGE COMPARISON & UPGRADE MODAL
   ========================================================================== */
.modal-lg {
  max-width: 900px;
}

.compare-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.compare-pkg-selector-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: center;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.pkg-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
}

.pkg-box-label {
  font-size: 0.725rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.pkg-box-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
}

.pkg-box-price {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: 0.2rem;
}

.compare-vs-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-weight: 800;
  font-size: 0.8rem;
}

/* Upgrade Financial Calculator Card */
.upgrade-calc-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.upgrade-calc-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.calc-breakdown-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.calc-breakdown-table tr {
  border-bottom: 1px dashed var(--border);
}

.calc-breakdown-table tr:last-child {
  border-bottom: none;
}

.calc-breakdown-table td {
  padding: 0.6rem 0;
}

.calc-breakdown-table .math-col {
  text-align: right;
  font-family: var(--font-mono);
  font-weight: 600;
}

.calc-item-credit {
  color: var(--green);
}

.calc-item-excluded {
  color: var(--amber);
}

.excluded-cert-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--amber-soft);
  color: var(--amber);
  border: 1px solid rgba(217, 119, 6, 0.25);
  border-radius: var(--radius-sm);
  padding: 0.15rem 0.5rem;
  font-size: 0.725rem;
  font-weight: 600;
  margin-left: 0.4rem;
}

.upgrade-final-banner {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(124, 58, 237, 0.08));
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.upgrade-final-label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-main);
}

.upgrade-final-math-hint {
  font-size: 0.775rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  font-family: var(--font-mono);
}

.upgrade-final-amount {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--primary);
  font-family: var(--font-mono);
}

/* Feature Comparison Columns */
.feature-comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.feature-col-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.feature-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.feature-col-title {
  font-size: 0.875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 280px;
  overflow-y: auto;
}

.feature-item-card {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.825rem;
  line-height: 1.4;
}

.feature-item-available {
  background: var(--green-soft);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: var(--text-main);
}

.feature-item-available .feature-check-icon {
  color: var(--green);
  font-weight: 800;
  margin-top: 1px;
}

.feature-item-available .already-avail-tag {
  color: var(--green);
  font-weight: 700;
  font-size: 0.75rem;
  margin-left: 0.3rem;
  background: rgba(16, 185, 129, 0.15);
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  white-space: nowrap;
}

.feature-item-new {
  background: var(--purple-soft);
  border: 1px solid rgba(124, 58, 237, 0.2);
  color: var(--text-main);
}

.feature-item-new .feature-new-icon {
  color: var(--purple);
  margin-top: 1px;
}

.feature-item-new .new-tag {
  color: var(--purple);
  font-weight: 700;
  font-size: 0.75rem;
  margin-left: 0.3rem;
  background: rgba(124, 58, 237, 0.15);
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  white-space: nowrap;
}

/* Green Dot Pulse */
.green-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--green);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
  margin-right: 0.35rem;
  vertical-align: middle;
}

/* ==========================================================================
   ADVANCED RESPONSIVE DESIGN SYSTEM (Mobile, Tablet, Laptop, Desktop)
   ========================================================================== */

/* Utility: Prevent unwanted horizontal scrolling on page container */
html, body {
  overflow-x: hidden;
  width: 100%;
  -webkit-text-size-adjust: 100%;
}

.app-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow-x: hidden;
}

/* Ensure images, canvases and QR codes scale responsively */
img, svg, canvas, .qr-box canvas {
  max-width: 100%;
  height: auto;
}

/* 1. Large Desktops & Wide Monitors (>= 1400px) */
@media (min-width: 1400px) {
  .nav-container,
  .page-container {
    max-width: 1400px;
  }
  .hero-clean {
    max-width: 840px;
  }
}

/* 2. Laptops & Standard Desktops (992px to 1199px) */
@media (max-width: 1199px) {
  .nav-container,
  .page-container {
    max-width: 100%;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 3. Tablets & Small Laptops (768px to 991px) */
@media (max-width: 991px) {
  .nav-container {
    height: 64px;
    padding: 0 1rem;
  }
  .page-container {
    padding: 1.5rem 1rem 3rem;
  }
  .hero-heading {
    font-size: clamp(1.85rem, 4vw, 2.3rem);
  }
  .hero-desc {
    font-size: 1rem;
    margin-bottom: 1.75rem;
  }
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
  }
  .stat-card {
    padding: 1rem 1.15rem;
  }
  .stat-num {
    font-size: 1.45rem;
  }
  .compare-pkg-selector-bar {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .compare-vs-icon {
    margin: 0 auto;
  }
  .feature-comparison-grid {
    grid-template-columns: 1fr;
  }
  .form-row-3 {
    grid-template-columns: 1fr 1fr;
  }
  .modal-card {
    max-width: 95%;
  }
}

/* 4. Mobile Devices & Small Tablets (<= 767px) */
@media (max-width: 767px) {
  /* Navigation Bar */
  .navbar {
    position: sticky;
    top: 0;
    z-index: 50;
  }

  .nav-container {
    height: auto;
    min-height: 58px;
    padding: 0.5rem 0.85rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .brand {
    gap: 0.5rem;
  }

  .brand-icon {
    width: 34px;
    height: 34px;
  }

  .brand-text {
    font-size: 1.05rem;
  }

  .brand-sub {
    font-size: 0.65rem;
  }

  .nav-tabs {
    order: 3;
    width: 100%;
    justify-content: center;
    margin-top: 0.25rem;
    padding: 3px;
  }

  .nav-tab {
    flex: 1;
    justify-content: center;
    padding: 0.45rem 0.5rem;
    font-size: 0.8rem;
  }

  .nav-right {
    gap: 0.4rem;
  }

  .btn {
    padding: 0.5rem 0.9rem;
    font-size: 0.825rem;
  }

  .btn-sm {
    padding: 0.35rem 0.65rem;
    font-size: 0.775rem;
  }

  /* Typography & Hero */
  .hero-clean {
    margin: 1.25rem auto 2rem;
    padding: 0;
  }

  .hero-heading {
    font-size: 1.65rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 0.65rem;
  }

  .hero-desc {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
  }

  /* Public Search Box */
  .search-box-clean {
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem;
    gap: 0.65rem;
    border-radius: var(--radius-md);
  }

  .search-box-clean input {
    font-size: 1rem;
    padding: 0.4rem 0.25rem;
    /* Prevent iOS auto-zoom on input focus */
    font-size: 16px;
  }

  .btn-search {
    width: 100%;
    padding: 0.75rem 1rem;
    justify-content: center;
    font-size: 0.95rem;
  }

  .sample-tags {
    margin-top: 1rem;
    gap: 0.4rem;
  }

  .sample-btn {
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
  }

  /* Public Verification Results */
  .results-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .result-card-clean {
    padding: 1.15rem;
    gap: 1.15rem;
  }

  .result-card-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .result-title {
    font-size: 1.2rem;
  }

  .result-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .pub-addons-grid {
    grid-template-columns: 1fr;
  }

  .result-card-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  /* Admin Dashboard Header */
  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
  }

  .dashboard-header h2 {
    font-size: 1.25rem;
  }

  .header-actions {
    width: 100%;
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .header-actions .btn {
    flex: 1 1 calc(50% - 0.4rem);
    justify-content: center;
    min-height: 36px;
  }

  /* Stats Row */
  .stats-row {
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    margin-bottom: 1.25rem;
  }

  .stat-card {
    padding: 0.85rem 0.95rem;
  }

  .stat-label {
    font-size: 0.7rem;
  }

  .stat-num {
    font-size: 1.3rem;
  }

  .stat-sub {
    font-size: 0.68rem;
  }

  /* Toolbar */
  .table-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  .search-input-wrap {
    min-width: 0;
    width: 100%;
  }

  .search-input-wrap input {
    font-size: 16px; /* Prevents mobile zoom */
  }

  .filters-wrap {
    width: 100%;
    flex-wrap: wrap;
  }

  .filters-wrap select {
    flex: 1;
    min-width: 130px;
    font-size: 16px; /* Prevents mobile zoom */
    padding: 0.5rem 0.65rem;
  }

  /* Table Container & Scrolling */
  .table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-sm);
  }

  .clean-table {
    min-width: 860px; /* Ensures readable column widths on mobile horizontal scroll */
  }

  .clean-table th,
  .clean-table td {
    padding: 0.75rem 0.85rem;
  }

  /* Form Layouts */
  .form-row-3,
  .form-row-2 {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .form-item input,
  .form-item select,
  .form-item textarea {
    font-size: 16px !important; /* Prevents auto zoom */
    padding: 0.6rem 0.75rem;
  }

  /* Calculation Summary Card */
  .calculation-summary-card {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 1rem;
  }

  .summary-divider {
    display: none;
  }

  .summary-stat {
    width: 100%;
    justify-content: space-between;
    flex-direction: row;
    align-items: center;
  }

  .highlight-stat {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Modals on Mobile (Sheet Style) */
  .modal-overlay {
    padding: 0.5rem;
    align-items: flex-end;
  }

  .modal-card {
    max-width: 100%;
    max-height: 94vh;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
  }

  .modal-header {
    padding: 1rem 1.15rem;
  }

  .modal-body {
    padding: 1rem 1.15rem;
    max-height: calc(94vh - 125px);
  }

  .modal-footer {
    padding: 0.85rem 1.15rem;
    flex-direction: column-reverse;
    gap: 0.5rem;
  }

  .modal-footer .btn {
    width: 100%;
    min-height: 42px;
  }

  /* Package Comparison Modal */
  .compare-pkg-selector-bar {
    grid-template-columns: 1fr;
    gap: 0.65rem;
    padding: 0.85rem;
  }

  .upgrade-final-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
  }

  .upgrade-final-amount {
    font-size: 1.4rem;
  }

  .feature-comparison-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  /* QR Modal on Mobile */
  .modal-sm {
    max-width: 100%;
  }

  .qr-box {
    width: 150px;
    height: 150px;
    padding: 0.75rem;
  }

  /* Visibility Switches Grid */
  .visibility-grid,
  .visibility-controls-grid {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .visibility-item,
  .vis-item {
    padding: 0.65rem 0.85rem;
  }
}

/* 5. Extra Small Mobile Devices (<= 420px) */
@media (max-width: 420px) {
  .brand-sub {
    display: none;
  }

  .nav-container {
    padding: 0.4rem 0.65rem;
  }

  .nav-tab span {
    font-size: 0.75rem;
  }

  .page-container {
    padding: 1rem 0.65rem 2.5rem;
  }

  .hero-heading {
    font-size: 1.45rem;
  }

  .stats-row {
    grid-template-columns: 1fr;
  }

  .stat-num {
    font-size: 1.35rem;
  }

  .header-actions .btn {
    flex: 1 1 100%;
  }
}


