/* BuddyTracker 2.0 */
:root {
  /* Light Theme Defaults */
  --bg-body: #f5f7fa;
  --bg-card: #ffffff;
  --bg-header: #ffffff;
  --bg-hover: #f8fafc;
  --bg-input: #ffffff;
  --bg-modal: #ffffff;
  --bg-overlay: rgba(255, 255, 255, 0.97);
  --bg-code: #f3f4f6;
  --bg-box: #f8f9fa;

  --text-main: #1a1a2e;
  --text-muted: #6b7280;
  --text-subtitle: #666666;
  --text-placeholder: #9ca3af;

  --border-color: #e5e7eb;
  --border-input: #dddddd;

  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-text: #ffffff;

  --success: #16a34a;
  --success-hover: #15803d;
  --danger: #dc2626;

  --badge-active-bg: #dcfce7;
  --badge-active-text: #16a34a;
  --badge-idle-bg: #f3f4f6;
  --badge-idle-text: #6b7280;
  --badge-role-bg: #dbeafe;
  --badge-role-text: #2563eb;
  --device-token-bg: #eff6ff;
  --device-token-text: #2563eb;

  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-modal: 0 20px 60px rgba(0, 0, 0, 0.2);
  --shadow-float: 0 4px 20px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] {
  --bg-body: #0f172a;
  --bg-card: #1e293b;
  --bg-header: #1e293b;
  --bg-hover: #334155;
  --bg-input: #0f172a;
  --bg-modal: #1e293b;
  --bg-overlay: rgba(30, 41, 59, 0.97);
  --bg-code: #334155;
  --bg-box: #334155;

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-subtitle: #cbd5e1;
  --text-placeholder: #64748b;

  --border-color: #334155;
  --border-input: #475569;

  --primary: #3b82f6;
  --primary-hover: #2563eb;

  --success: #22c55e;
  --success-hover: #16a34a;
  --danger: #ef4444;

  --badge-active-bg: #064e3b;
  --badge-active-text: #4ade80;
  --badge-idle-bg: #334155;
  --badge-idle-text: #94a3b8;
  --badge-role-bg: #1e3a8a;
  --badge-role-text: #60a5fa;
  --device-token-bg: #1e3a8a;
  --device-token-text: #93c5fd;

  --shadow-card: none;
  --shadow-modal: 0 20px 60px rgba(0, 0, 0, 0.5);
  --shadow-float: 0 4px 20px rgba(0, 0, 0, 0.5);
}

[x-cloak] {
  display: none !important;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-body);
  color: var(--text-main);
}

/* ── Login View ── */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.login-card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 40px;
  width: 380px;
  max-width: 90%;
  box-shadow: var(--shadow-modal);
  text-align: center;
}

.login-card h1 {
  margin: 0 0 8px;
  font-size: 1.8em;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.login-card .subtitle {
  color: var(--text-subtitle);
  margin: 0 0 30px;
  font-size: 0.95em;
}

.login-divider {
  display: flex;
  align-items: center;
  margin: 24px 0;
  color: var(--text-placeholder);
  font-size: 0.85em;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-input);
}

.login-divider span {
  padding: 0 12px;
}

.input-group {
  position: relative;
  margin-bottom: 12px;
}

.input-group input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-input);
  background: var(--bg-input);
  color: var(--text-main);
  border-radius: 8px;
  font-size: 1em;
  outline: none;
  transition: border-color 0.2s;
}

.input-group input:focus {
  border-color: var(--primary);
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1em;
  font-weight: 500;
  text-align: center;
  width: 100%;
  transition: background 0.2s, opacity 0.2s;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

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

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

.btn-google {
  background: var(--bg-card);
  border: 1px solid var(--border-input);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

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

.btn-green {
  background: var(--success);
  color: white;
}

.btn-green:hover:not(:disabled) {
  background: var(--success-hover);
}

.btn-red {
  background: var(--danger);
  color: white;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-input);
  color: var(--text-main);
}

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

.btn-sm {
  padding: 6px 12px;
  font-size: 0.85em;
  width: auto;
}

/* ── Dashboard ── */
.dashboard {
  min-height: 100vh;
  background: url('/img/bt_feature_graphic_snowmobile.webp') no-repeat center center fixed;
  background-size: cover;
}

.dash-header {
  background: rgba(15, 23, 42, 0.8) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dash-header h1 {
  margin: 0;
  font-size: 1.3em;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Section heading icons ── */
.section-icon {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  flex-shrink: 0;
}

.logo-icon {
  width: 24px;
  height: 24px;
  vertical-align: middle;
  flex-shrink: 0;
}

/* ── Howto Section ── */
.howto-section details {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
}

.howto-section details[open] {
  border-color: #c7d2fe;
}

[data-theme="dark"] .howto-section details[open] {
  border-color: #1e3a8a;
}

.howto-section summary {
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95em;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
}

.howto-section summary::-webkit-details-marker {
  display: none;
}

.howto-section summary::before {
  content: '\25B6';
  font-size: 0.7em;
  transition: transform 0.2s;
}

.howto-section details[open] summary::before {
  transform: rotate(90deg);
}

.howto-section .howto-body {
  padding: 14px;
  font-size: 0.9em;
  line-height: 1.7;
  color: var(--text-main);
}

.howto-section .howto-body p {
  margin: 6px 0;
}

.howto-section .howto-body code {
  background: var(--bg-code);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.9em;
}

.howto-section .howto-body .config-box {
  background: var(--bg-box);
  padding: 10px 14px;
  border-radius: 8px;
  margin: 8px 0;
  font-size: 0.95em;
}

.howto-section .howto-body ul {
  margin: 6px 0;
  padding-left: 20px;
}

.howto-section .howto-body li {
  margin: 4px 0;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--border-color);
}

.dash-content {
  max-width: 800px;
  margin: 24px auto;
  padding: 0 16px;
}

.dash-section {
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
}

.dash-section h2 {
  margin: 0 0 16px;
  font-size: 1.15em;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ── Group List ── */
.group-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.2);
  transition: background 0.15s;
}

.group-card:hover {
  background: rgba(255, 255, 255, 0.1);
}

.group-card .name {
  font-weight: 600;
  font-size: 1em;
}

.group-card .meta {
  font-size: 0.8em;
  color: var(--text-muted);
  margin-top: 2px;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75em;
  font-weight: 500;
}

.badge-active {
  background: var(--badge-active-bg);
  color: var(--badge-active-text);
}

.badge-idle {
  background: var(--badge-idle-bg);
  color: var(--badge-idle-text);
}

.badge-role {
  background: var(--badge-role-bg);
  color: var(--badge-role-text);
}

/* ── Device List ── */
.device-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  margin-bottom: 8px;
}

.device-token {
  font-family: monospace;
  font-size: 0.8em;
  color: var(--device-token-text);
  background: var(--device-token-bg);
  padding: 2px 6px;
  border-radius: 4px;
  user-select: all;
}

/* ── Map View ── */
#map {
  width: 100%;
  height: 100vh;
  background: #ddd;
}

[data-theme="dark"] #map {
  background: #222;
}

/* Map Dark Mode Filter */
[data-theme="dark"] .leaflet-layer,
[data-theme="dark"] .leaflet-control-layers,
[data-theme="dark"] .leaflet-control-zoom-in,
[data-theme="dark"] .leaflet-control-zoom-out,
[data-theme="dark"] .leaflet-control-attribution {
  filter: invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%);
}

.ui-overlay {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--bg-overlay);
  padding: 15px;
  z-index: 1000;
  border-radius: 12px;
  box-shadow: var(--shadow-float);
  width: 340px;
  max-width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  transition: all 0.3s ease;
  color: var(--text-main);
}

.ui-overlay.minimized {
  width: 40px;
  height: 40px;
  padding: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.ui-overlay.minimized .panel-content,
.ui-overlay.minimized .panel-header-text {
  display: none;
}

.toggle-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  background: transparent;
  border: none;
  font-size: 1.2em;
  cursor: pointer;
  width: 30px;
  height: 30px;
  z-index: 1001;
  color: var(--text-main);
}

.minimized .toggle-btn {
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  font-size: 1.5em;
}

/* ── Buddy List (Map Panel) ── */
.buddy-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 6px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9em;
}

.buddy-item:last-child {
  border-bottom: none;
}

.buddy-item:hover {
  background: var(--bg-hover);
}

.color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
  flex-shrink: 0;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  margin-left: 6px;
}

.leaflet-overlay-pane svg path {
  vector-effect: non-scaling-stroke;
}

.skoter-overlay {
  opacity: 1 !important;
  /*mix-blend-mode: multiply;*/
  filter: url(#enhance-red-grid);
}

/* ── Modals ── */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}

.modal-box {
  background: var(--bg-modal);
  padding: 24px;
  border-radius: 12px;
  max-width: 90%;
  width: 400px;
  box-shadow: var(--shadow-modal);
  color: var(--text-main);
}

.modal-box h3 {
  margin: 0 0 16px;
}

.modal-box input,
.modal-box textarea,
.modal-box select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-input);
  background: var(--bg-input);
  color: var(--text-main);
  border-radius: 8px;
  font-size: 0.95em;
  margin-bottom: 12px;
  outline: none;
}

.modal-box input:focus,
.modal-box textarea:focus {
  border-color: var(--primary);
}

/* ── Search Dropdown ── */
.search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--shadow-float);
  z-index: 10;
  max-height: 200px;
  overflow-y: auto;
}

.search-result-item {
  padding: 10px 12px;
  cursor: pointer;
  transition: background 0.15s;
}

.search-result-item:hover {
  background: var(--bg-hover);
}

.search-result-item:first-child {
  border-radius: 8px 8px 0 0;
}

.search-result-item:last-child {
  border-radius: 0 0 8px 8px;
}

/* ── Trail History Select ── */
.trail-select {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--border-input);
  background: var(--bg-input);
  color: var(--text-main);
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 0.9em;
}

/* ── Toast overrides ── */
.toast-bottom-right {
  bottom: 20px !important;
  right: 20px !important;
}

/* ── Misc ── */
.text-muted {
  color: var(--text-muted);
}

.text-sm {
  font-size: 0.85em;
}

.mt-2 {
  margin-top: 8px;
}

.mt-3 {
  margin-top: 12px;
}

.mb-2 {
  margin-bottom: 8px;
}

.mb-3 {
  margin-bottom: 12px;
}

.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 {
  gap: 8px;
}

.hidden {
  display: none !important;
}

.empty-state {
  text-align: center;
  padding: 30px;
  color: var(--text-placeholder);
}

.empty-state p {
  margin: 8px 0;
}

/* Spinner */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── Responsive ── */
.group-header-row {
  display: flex;
  align-items: center;
  width: 100%;
}

.group-actions {
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .dash-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .user-menu {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
  }

  .group-header-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .group-actions {
    margin-top: 12px;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px !important;
  }

  .group-actions .btn {
    flex: 1 1 auto;
    text-align: center;
    padding: 8px 6px;
    font-size: 0.85em;
  }

  /* Toggle button specific targeting */
  .group-actions .btn-toggle {
    flex: 0 0 auto;
    width: 36px;
  }

  /* Push badge to the right */
  .group-actions .badge {
    margin-left: auto;
  }
}

/* ══════════════════════════════════════════
   Landing Page
   ══════════════════════════════════════════ */

.landing-page {
  overflow-x: hidden;
  position: relative;
  background: url('/img/bt_feature_graphic_snowmobile.webp') no-repeat center center fixed;
  background-size: cover;
}

.glass-panel {
  background: rgba(15, 23, 42, 0.45) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

.hero-graphic {
  width: 100%;
  max-width: 500px;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.floating {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-20px);
  }

  100% {
    transform: translateY(0px);
  }
}

.feature-device-img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

#landing-bg-canvas {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 2;
}

/* ── Sticky Nav ── */
.landing-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 12px 0;
  transition: background 0.3s, box-shadow 0.3s;
}

.landing-nav--solid {
  background: rgba(15, 23, 42, 0.8) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.landing-nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.landing-nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.15em;
  color: #fff;
  text-decoration: none;
}

.landing-nav--solid .landing-nav-logo {
  color: var(--text-main);
}

.landing-nav-links {
  display: flex;
  gap: 24px;
}

.landing-nav-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.9em;
  font-weight: 500;
  transition: color 0.2s;
}

.landing-nav-links a:hover {
  color: #fff;
}

.landing-nav--solid .landing-nav-links a {
  color: var(--text-muted);
}

.landing-nav--solid .landing-nav-links a:hover {
  color: var(--text-main);
}

.landing-nav-cta {
  width: auto;
  padding: 8px 20px;
  text-decoration: none;
}

.landing-hero-cta {
  text-decoration: none;
  display: inline-block;
}

/* ── Hero ── */
.landing-hero {
  background: transparent;
  padding: 120px 24px 80px;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.landing-hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 60px;
  width: 100%;
}

.landing-hero-text {
  flex: 1;
}

.landing-hero-text h1 {
  font-size: 2.8em;
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  margin: 0 0 20px;
}

.landing-hero-sub {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.15em;
  line-height: 1.6;
  margin: 0 0 32px;
  max-width: 480px;
}

.landing-hero-cta.landing-hero-cta {
  padding: 14px 36px;
  font-size: 1.1em;
}

.landing-hero-mockup {
  flex: 0 0 auto;
}

/* ── Phone Mockup ── */
.phone-mockup {
  width: 280px;
  height: 560px;
  background: #111;
  border-radius: 36px;
  padding: 12px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), inset 0 0 0 2px #333;
}

.phone-notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 24px;
  background: #111;
  border-radius: 0 0 16px 16px;
  z-index: 2;
}

.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 26px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(160deg, #1a2a3a 0%, #0d1b2a 100%);
}

.phone-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.phone-map-bg {
  position: absolute;
  inset: 0;
  opacity: 0.15;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 30px 30px;
}

.phone-dot {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  animation: phone-pulse 2s ease-in-out infinite;
  box-shadow: 0 0 8px currentColor;
}

.phone-dot::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid currentColor;
  opacity: 0.3;
  animation: phone-ring 2s ease-in-out infinite;
}

.phone-dot-1 {
  top: 30%;
  left: 35%;
  color: #3b82f6;
  background: #3b82f6;
}

.phone-dot-2 {
  top: 50%;
  left: 60%;
  color: #22c55e;
  background: #22c55e;
  animation-delay: 0.5s;
}

.phone-dot-3 {
  top: 65%;
  left: 30%;
  color: #f59e0b;
  background: #f59e0b;
  animation-delay: 1s;
}

.phone-dot-4 {
  top: 40%;
  left: 70%;
  color: #ef4444;
  background: #ef4444;
  animation-delay: 1.5s;
}

.phone-dot-2::after {
  animation-delay: 0.5s;
}

.phone-dot-3::after {
  animation-delay: 1s;
}

.phone-dot-4::after {
  animation-delay: 1.5s;
}

.phone-trail {
  position: absolute;
  border: none;
  height: 2px;
  opacity: 0.3;
}

.phone-trail-1 {
  top: 37%;
  left: 42%;
  width: 50px;
  transform: rotate(25deg);
  background: linear-gradient(90deg, #3b82f6, transparent);
}

.phone-trail-2 {
  top: 57%;
  left: 38%;
  width: 60px;
  transform: rotate(-15deg);
  background: linear-gradient(90deg, #22c55e, transparent);
}

@keyframes phone-pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.2);
    opacity: 0.8;
  }
}

@keyframes phone-ring {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.3;
  }

  50% {
    transform: scale(1.6);
    opacity: 0;
  }
}

/* ── Landing Sections ── */
.landing-section {
  padding: 80px 24px;
  background: transparent;
}

.landing-section--alt {
  background: rgba(15, 23, 42, 0.3);
}

.landing-container {
  max-width: 1100px;
  margin: 0 auto;
}

.landing-section-title {
  text-align: center;
  font-size: 2em;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--text-main);
}

.landing-section-sub {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.1em;
  margin: 0 0 48px;
}

/* ── Features Grid ── */
.landing-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.landing-feature-card {
  border-radius: 12px;
  padding: 28px 24px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.landing-feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-float);
}

.landing-feature-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
}

.landing-feature-icon svg {
  width: 100%;
  height: 100%;
}

.landing-feature-card h3 {
  margin: 0 0 8px;
  font-size: 1.1em;
  color: var(--text-main);
}

.landing-feature-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9em;
  line-height: 1.5;
}

/* ── Modes Grid ── */
.landing-modes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.landing-mode-card {
  border-radius: 12px;
  padding: 32px 24px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.landing-mode-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-float);
}

.landing-mode-card--highlight {
  background: rgba(30, 58, 138, 0.5) !important;
  color: #fff;
}

.landing-mode-card--highlight h3,
.landing-mode-card--highlight p {
  color: #fff;
}

.landing-mode-card--highlight p {
  opacity: 0.8;
}

.landing-mode-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 16px;
  color: var(--primary);
}

.landing-mode-card--highlight .landing-mode-icon {
  color: #60a5fa;
}

.landing-mode-icon svg {
  width: 100%;
  height: 100%;
}

.landing-mode-card h3 {
  margin: 0 0 8px;
  font-size: 1.15em;
  color: var(--text-main);
}

.landing-mode-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9em;
  line-height: 1.5;
}

/* ── Terms Card ── */
.landing-terms-card {
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 32px;
}

.landing-terms-card h4 {
  margin: 24px 0 8px;
  font-size: 1em;
  color: var(--text-main);
}

.landing-terms-card h4:first-child {
  margin-top: 0;
}

.landing-terms-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9em;
  line-height: 1.6;
}

/* ── Sign In Section ── */
#signin .login-card {
  box-shadow: var(--shadow-modal);
}

/* ── Footer ── */
.landing-footer {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 24px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85em;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.landing-footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.landing-footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
}

.landing-footer-links {
  display: flex;
  gap: 20px;
}

.landing-footer-links a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
}

.landing-footer-links a:hover {
  color: #fff;
}

/* ── Docs Grid ── */
.landing-docs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.landing-docs-card {
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 24px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.landing-docs-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-float);
}

.landing-docs-card h4 {
  margin: 0 0 12px;
  font-size: 1em;
  color: var(--text-main);
}

.landing-docs-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9em;
  line-height: 1.6;
}

.landing-docs-card ol {
  margin: 0;
  padding-left: 20px;
  color: var(--text-muted);
  font-size: 0.9em;
  line-height: 1.8;
}

/* ── Contact Button ── */
.landing-contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  background: var(--primary);
  color: var(--primary-text);
  border-radius: 10px;
  font-size: 1.1em;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.landing-contact-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-float);
}

/* ── Landing Responsive ── */
@media (max-width: 768px) {
  .landing-nav-links {
    display: none;
  }

  .landing-hero-inner {
    flex-direction: column;
    text-align: center;
  }

  .landing-hero-text h1 {
    font-size: 2em;
  }

  .landing-hero-sub {
    margin-left: auto;
    margin-right: auto;
  }

  .landing-hero-cta {
    margin: 0 auto;
  }

  .phone-mockup {
    width: 220px;
    height: 440px;
    border-radius: 28px;
  }

  .phone-screen {
    border-radius: 20px;
  }

  .landing-features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .landing-modes-grid {
    grid-template-columns: 1fr;
  }

  .landing-docs-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .landing-hero {
    padding: 100px 16px 60px;
  }

  .landing-hero-text h1 {
    font-size: 1.7em;
  }

  .landing-section {
    padding: 60px 16px;
  }

  .landing-features-grid {
    grid-template-columns: 1fr;
  }

  .landing-footer-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}