﻿/* =========================
   ICY CHILL-LOC THEME
   ========================= */

:root{
  --bg0:#040810;
  --bg1:#0A1428;
  --bg2:#0D1A32;
  --panel: rgba(200,240,255,0.04);
  --panel2: rgba(200,240,255,0.08);
  --panel-frost: rgba(180,230,255,0.06);
  --stroke: rgba(150,220,255,0.12);
  --stroke-frost: rgba(200,240,255,0.18);
  --text:#E8F4FF;
  --muted: rgba(200,230,255,0.80);
  --muted2: rgba(180,210,240,0.60);

  --accent:#5FE3F8;      /* ice cyan - slightly cooler */
  --accent-glow:#9AF5FF; /* frost highlight */
  --accent2:#89C4FF;     /* ice blue instead of violet */
  --accent3:#22D8A0;     /* cool teal green */
  --warn:#FFB84D;
  --danger:#FF6B6B;

  --frost-blue: rgba(95,227,248,0.15);
  --frost-white: rgba(200,240,255,0.08);
  --ice-shimmer: linear-gradient(135deg, rgba(150,240,255,0.12) 0%, rgba(100,200,255,0.05) 50%, rgba(150,240,255,0.10) 100%);

  --shadow: 0 20px 60px rgba(0,0,0,0.55), 0 0 40px rgba(95,227,248,0.05);
  --shadow2: 0 10px 24px rgba(0,0,0,0.40), 0 0 20px rgba(95,227,248,0.03);
  --shadow-frost: 0 8px 32px rgba(95,227,248,0.08), 0 16px 48px rgba(0,0,0,0.35);
  --radius: 18px;
}

*,*::before,*::after{ box-sizing:border-box; margin:0; padding:0; }
html,body{ height:100%; margin:0; padding:0; }
body{
  margin:0;
  padding:0;
  color:var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
  background:
    /*
    radial-gradient(2px 2px at 15% 25%, rgba(255,255,255,0.5), transparent),
    radial-gradient(3px 3px at 35% 15%, rgba(200,245,255,0.4), transparent),
    radial-gradient(2px 2px at 55% 45%, rgba(255,255,255,0.35), transparent),
    radial-gradient(1px 1px at 75% 35%, rgba(200,240,255,0.45), transparent),
    radial-gradient(2px 2px at 85% 55%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 25% 65%, rgba(200,245,255,0.4), transparent),
    radial-gradient(2px 2px at 65% 75%, rgba(255,255,255,0.35), transparent),
    radial-gradient(1px 1px at 45% 85%, rgba(200,240,255,0.3), transparent),
    /* Icy mist layers - soft horizontal fog bands */
    linear-gradient(180deg, 
      transparent 0%, 
      rgba(180,230,255,0.04) 15%,
      rgba(200,245,255,0.08) 25%,
      transparent 35%,
      rgba(150,220,255,0.05) 50%,
      transparent 60%,
      rgba(180,235,255,0.06) 75%,
      rgba(200,245,255,0.03) 90%,
      transparent 100%),
    /* Cold mist orbs */
    radial-gradient(ellipse 1600px 900px at 0% 20%, rgba(180,235,255,0.20), transparent 50%),
    radial-gradient(ellipse 1400px 800px at 100% 30%, rgba(150,220,255,0.18), transparent 45%),
    radial-gradient(ellipse 1200px 700px at 50% 100%, rgba(95,227,248,0.12), transparent 50%),
    radial-gradient(ellipse 800px 500px at 20% 70%, rgba(137,196,255,0.10), transparent 45%),
    radial-gradient(ellipse 900px 600px at 80% 80%, rgba(180,235,255,0.08), transparent 50%),
    /* Center frost glow */
    radial-gradient(ellipse 1000px 600px at 50% 40%, rgba(200,245,255,0.06), transparent 60%),
    /* Deep frozen base */
    linear-gradient(180deg, 
      #030608 0%, 
      #051018 20%, 
      #081420 45%, 
      #0A1828 70%, 
      #0C1C30 100%);
  line-height:1.55;
  background-attachment: fixed;
  position: relative;
}

/* Animated mist overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse 100% 50% at 50% 0%, rgba(200,245,255,0.03), transparent 70%),
    radial-gradient(ellipse 80% 40% at 30% 100%, rgba(150,220,255,0.025), transparent 60%),
    radial-gradient(ellipse 70% 35% at 80% 50%, rgba(180,235,255,0.02), transparent 55%);
  pointer-events: none;
  z-index: 0;
  animation: mistDrift 20s ease-in-out infinite alternate;
}

@keyframes mistDrift {
  0% { opacity: 0.7; transform: translateX(-2%) translateY(0); }
  50% { opacity: 1; }
  100% { opacity: 0.8; transform: translateX(2%) translateY(-1%); }
}

/* Ensure content is above mist */
body > *:not(#snow):not(#temp-buddy):not(#mist) {
  position: relative;
  z-index: 1;
}

/* Layout helpers */
.container{
  width:min(1120px, calc(100% - 36px));
  margin:0 auto;
}
.section{
  padding:56px 0;
   background:
     radial-gradient(900px 500px at 10% 10%, rgba(103,232,249,0.06), transparent 60%),
     radial-gradient(700px 400px at 90% 15%, rgba(167,139,250,0.05), transparent 55%),
     linear-gradient(180deg, #040810 0%, #0A1024 100%);
}
@media (max-width: 900px){
  .grid-2,.grid-3{ grid-template-columns:1fr; }
  .section{ padding:40px 0; }
}

/* Top nav - Icy Mist Glass */
.nav{
  position:sticky;
  top:0;
  z-index:50;
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  background: 
    linear-gradient(180deg, rgba(180,235,255,0.06) 0%, rgba(10,20,40,0.70) 100%),
    rgba(5,12,25,0.65);
  border-bottom:1px solid rgba(180,235,255,0.18);
  box-shadow: 
    0 4px 30px rgba(0,0,0,0.35), 
    0 1px 0 rgba(255,255,255,0.08) inset,
    0 0 60px rgba(150,220,255,0.03);
}
.nav-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 0;
}
.brand{
  display:flex;
  gap:12px;
  align-items:center;
  text-decoration:none;
  color:var(--text);
  font-weight:800;
  letter-spacing:0.3px;
  transition: transform 0.2s ease;
}
.brand:hover{
  transform: scale(1.02);
}
.brand-logo{
  width:42px;
  height:42px;
  border-radius:10px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(95,227,248,0.4)) drop-shadow(0 4px 12px rgba(0,0,0,0.4));
  transition: filter 0.2s ease;
}
.brand:hover .brand-logo{
  filter: drop-shadow(0 0 18px rgba(95,227,248,0.6)) drop-shadow(0 4px 12px rgba(0,0,0,0.4));
}
.brand-text{
  font-size: 18px;
  background: linear-gradient(135deg, #E8F4FF 0%, #9AF5FF 50%, #E8F4FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
}
.nav a{
  color:var(--muted);
  text-decoration:none;
  font-weight:600;
  margin-left:16px;
  transition: color 0.15s ease;
}
.nav a:hover{ 
  color:var(--accent); 
}

/* Shortcuts drawer */
.tool-drawer{
  position:fixed;
  left:16px;
  top:110px;
  z-index:45;
  display:flex;
  flex-direction:column;
  gap:10px;
  pointer-events:none;
}
.tool-drawer-toggle{
  pointer-events:auto;
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.18);
  background: rgba(7,10,18,0.72);
  color:var(--text);
  font-weight:700;
  box-shadow: var(--shadow2);
  cursor:pointer;
}
.tool-drawer-icon{
  font-size:12px;
  letter-spacing:1px;
}
.tool-drawer-panel{
  pointer-events:auto;
  width:240px;
  padding:14px;
  border-radius:16px;
  background: var(--panel);
  border:1px solid var(--stroke);
  box-shadow: var(--shadow);
  transform: translateX(-130%);
  transition: transform .2s ease;
}
.tool-drawer.open .tool-drawer-panel{
  transform: translateX(0);
}
.tool-drawer-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.tool-drawer-close{
  border:1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.05);
  color:var(--text);
  border-radius:999px;
  padding:6px 10px;
  font-size:12px;
  font-weight:700;
  cursor:pointer;
}
.tool-drawer-list{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.tool-drawer-list a{
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  color:var(--text);
  text-decoration:none;
  font-weight:600;
}
.tool-drawer-list a:hover{
  background: rgba(103,232,249,0.10);
  border-color: rgba(103,232,249,0.35);
}
.tool-drawer-scrim{
  display:none;
}

/* Update banner */
.update-banner{
  background: linear-gradient(135deg, rgba(95,227,248,0.12), rgba(137,196,255,0.10));
  border-bottom:1px solid rgba(95,227,248,0.15);
  padding:4px 0 4px 0;
}
.update-banner .container{
  display:flex;
  gap:16px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
}
.update-tag{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 12px;
  border-radius:999px;
  background: rgba(7,10,18,0.7);
  border:1px solid rgba(255,255,255,0.16);
  font-weight:700;
  font-size:12px;
  letter-spacing:0.4px;
  text-transform:uppercase;
}
.update-title{
  font-weight:700;
}
.update-list{
  margin:0;
  padding-left:16px;
  color:var(--muted);
  font-size:13px;
  max-width:720px;
}
.update-actions{ display:flex; gap:10px; flex-wrap:wrap; }
@media (max-width: 900px){
  .update-list{ padding-left:18px; }
}

@media (max-width: 900px){
  .tool-drawer{
    left:12px;
    top:90px;
  }
  .tool-drawer-panel{
    position:fixed;
    left:0;
    top:0;
    bottom:0;
    width:min(320px, 85vw);
    padding:18px;
    border-radius:0 18px 18px 0;
    background: linear-gradient(180deg, rgba(7,10,18,0.98), rgba(7,10,18,0.95));
    transform: translateX(-110%);
    z-index:60;
  }
  .tool-drawer.open .tool-drawer-panel{
    transform: translateX(0);
  }
  .tool-drawer-scrim{
    display:block;
    position:fixed;
    inset:0;
    background: rgba(0,0,0,0.45);
    opacity:0;
    pointer-events:none;
    transition: opacity .2s ease;
    z-index:55;
  }
  .tool-drawer.open .tool-drawer-scrim{
    opacity:1;
    pointer-events:auto;
  }
}

/* Hero - Icy Edition */
.hero {
  position: relative;
  padding: 60px 0 60px;
  min-height: auto;
  display: flex;
  align-items: center;
}
.hero::before{
  content: '';
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse 800px 500px at 20% 30%, rgba(95,227,248,0.08), transparent 60%),
    radial-gradient(ellipse 600px 400px at 80% 60%, rgba(137,196,255,0.06), transparent 50%);
  pointer-events: none;
}
.hero-grid{
  display:grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap:32px;
  align-items:center;
}
.hero-logo{
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
}
.hero-logo img{
  width:min(580px, 90vw);
  height:auto;
  border-radius: 16px;
  filter: brightness(1) saturate(1.05) drop-shadow(0 0 40px rgba(95,227,248,0.25)) drop-shadow(0 18px 42px rgba(0,0,0,0.45));
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.kicker{
  display:inline-flex;
  gap:10px;
  align-items:center;
  padding:8px 14px;
  border:1px solid rgba(95,227,248,0.20);
  border-radius:999px;
  background: rgba(95,227,248,0.06);
  color:var(--muted);
  font-weight:600;
  font-size:14px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.kicker .dot{
  width:9px; height:9px;
  border-radius:50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(95,227,248,0.15), 0 0 12px rgba(95,227,248,0.4);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 6px rgba(150,220,255,0.15), 0 0 12px rgba(150,220,255,0.4); }
  50% { box-shadow: 0 0 0 10px rgba(150,220,255,0.08), 0 0 25px rgba(180,235,255,0.6); }
}
.h1{
  margin:16px 0 10px;
  font-size: clamp(34px, 4.2vw, 56px);
  line-height:1.05;
  letter-spacing:-0.6px;
  background: linear-gradient(135deg, 
    rgba(255,255,255,0.95) 0%, 
    rgba(200,245,255,1) 25%, 
    rgba(180,235,255,0.95) 50%, 
    rgba(200,245,255,1) 75%, 
    rgba(255,255,255,0.95) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 60px rgba(180,235,255,0.3);
  filter: drop-shadow(0 0 30px rgba(150,220,255,0.15));
}
.lead{
  font-size: clamp(16px, 1.5vw, 18px);
  color: var(--muted);
  max-width: 62ch;
}
.hero-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:18px;
}
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:12px 16px;
  border-radius: 14px;
  border:1px solid rgba(180,235,255,0.18);
  background: 
    linear-gradient(135deg, rgba(200,245,255,0.08) 0%, rgba(150,220,255,0.04) 100%),
    rgba(180,235,255,0.04);
  color:var(--text);
  text-decoration:none;
  font-weight:700;
  box-shadow: 
    0 4px 16px rgba(0,0,0,0.25),
    0 0 30px rgba(150,220,255,0.03),
    inset 0 1px 0 rgba(255,255,255,0.06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform .14s ease, background .14s ease, border-color .14s ease, box-shadow .14s ease;
}
.btn:hover{
  transform: translateY(-2px);
  background: 
    linear-gradient(135deg, rgba(200,245,255,0.14) 0%, rgba(150,220,255,0.08) 100%),
    rgba(180,235,255,0.08);
  border-color: rgba(180,235,255,0.35);
  box-shadow:
    0 8px 24px rgba(0,0,0,0.3),
    0 0 40px rgba(150,220,255,0.08),
    inset 0 1px 0 rgba(255,255,255,0.10);
}
.btn-primary{
  background:
    linear-gradient(135deg, rgba(180,245,255,0.95) 0%, rgba(95,227,248,0.90) 35%, rgba(137,196,255,0.85) 65%, rgba(180,245,255,0.90) 100%);
  border-color: rgba(255,255,255,0.40);
  color:#041525;
  font-weight: 800;
  text-shadow: 0 1px 0 rgba(255,255,255,0.25);
  position: relative;
  overflow: hidden;
  box-shadow:
    0 4px 20px rgba(0,0,0,0.25),
    0 0 40px rgba(150,220,255,0.15),
    inset 0 1px 0 rgba(255,255,255,0.40);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.btn-primary::before{
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
  transition: left 0.5s ease;
}
.btn-primary:hover::before{
  left: 100%;
}
.btn-primary:hover{
  transform: translateY(-2px);
  box-shadow:
    0 0 30px rgba(150,220,255,0.5),
    0 0 60px rgba(95,227,248,0.3),
    0 8px 32px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.50);
  border-color: rgba(255,255,255,0.6);
}

/* Secondary button ice-glow hover */
.btn:not(.btn-primary):hover{
  box-shadow:
    0 8px 24px rgba(0,0,0,0.3),
    0 0 40px rgba(150,220,255,0.10);
}

/* Cards - Frosted Glass with Icy Mist */
.card{
  background: 
    linear-gradient(135deg, rgba(200,245,255,0.08) 0%, rgba(150,220,255,0.03) 50%, rgba(200,245,255,0.06) 100%),
    rgba(180,235,255,0.04);
  border:1px solid rgba(180,235,255,0.15);
  border-radius: var(--radius);
  box-shadow: 
    0 8px 32px rgba(0,0,0,0.35),
    0 0 60px rgba(150,220,255,0.05),
    inset 0 1px 0 rgba(255,255,255,0.08);
  padding:18px;
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  position: relative;
  overflow: hidden;
  transition: transform .22s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow .22s ease,
              border-color .22s ease,
              background .22s ease;
}
.card::before{
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 10%, rgba(255,255,255,0.5) 50%, transparent 90%);
  pointer-events: none;
}
.card::after{
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse 100% 60% at 50% 0%, rgba(200,245,255,0.06), transparent 70%);
  pointer-events: none;
}
.card:hover{
  transform: translateY(-4px);
  background: 
    linear-gradient(135deg, rgba(200,245,255,0.12) 0%, rgba(150,220,255,0.05) 50%, rgba(200,245,255,0.10) 100%),
    rgba(180,235,255,0.06);
  box-shadow:
    0 24px 48px rgba(0,0,0,0.45),
    0 0 40px rgba(150,220,255,0.12),
    0 0 80px rgba(95,227,248,0.08),
    inset 0 1px 0 rgba(255,255,255,0.12);
  border-color: rgba(150,220,255,0.35);
}
.card h3{
  margin:0 0 8px;
  font-size:18px;
  letter-spacing: -0.2px;
}
.card p{ margin:0; color:var(--muted); }

/* Tables */
.table{
  width:100%;
  border-collapse: collapse;
  overflow:hidden;
  border-radius: 16px;
  border:1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
}
.table th, .table td{
  padding:12px 12px;
  border-bottom:1px solid rgba(255,255,255,0.08);
  text-align:left;
  color: var(--text);
  font-size: 14px;
}
.table th{
  color: var(--muted);
  font-weight: 800;
  letter-spacing: .2px;
  background: rgba(255,255,255,0.03);
}
.table tr:hover td{
  background: rgba(255,255,255,0.03);
}

/* Forms */
.input{
  width:100%;
  padding:12px 12px;
  border-radius: 14px;
  border:1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.25);
  color: var(--text);
  outline:none;
}
.input:focus{
  border-color: rgba(103,232,249,0.55);
  box-shadow: 0 0 0 5px rgba(103,232,249,0.10);
}
.label{
  display:block;
  margin:0 0 6px;
  color: var(--muted);
  font-weight:700;
  font-size: 13px;
}
.form-row{ margin-bottom: 12px; }
.error{
  color: #FFD1D1;
  background: rgba(239,68,68,0.12);
  border:1px solid rgba(239,68,68,0.22);
  padding:10px 12px;
  border-radius: 14px;
}
.success{
  color: #D8FFE6;
  background: rgba(34,197,94,0.12);
  border:1px solid rgba(34,197,94,0.22);
  padding:10px 12px;
  border-radius: 14px;
}

/* Footer - Icy Mist */
.footer{
  padding:40px 0 50px;
  color: var(--muted2);
  border-top: 1px solid rgba(180,235,255,0.12);
  margin-top: 24px;
  background: 
    linear-gradient(180deg, transparent 0%, rgba(5,12,25,0.5) 100%),
    radial-gradient(ellipse 100% 60% at 50% 100%, rgba(150,220,255,0.04), transparent 60%);
  position: relative;
}
.footer::before{
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 5%, rgba(180,235,255,0.25) 50%, transparent 95%);
}

/* Small utility - Icy Badge */
.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(180,235,255,0.15);
  background: 
    linear-gradient(135deg, rgba(200,245,255,0.08), rgba(150,220,255,0.04)),
    rgba(180,235,255,0.04);
  color: var(--muted);
  font-weight:700;
  font-size:12px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.badge.on{ color:#CFFFE0; border-color: rgba(34,216,160,0.25); background: rgba(34,216,160,0.12); }
.badge.off{ color:#FFD8D8; border-color: rgba(239,68,68,0.22); background: rgba(239,68,68,0.12); }

/* =========================
   MOBILE NAVIGATION
   ========================= */

/* Hamburger button - hidden on desktop */
.nav-toggle{
  display:none;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  width:44px;
  height:44px;
  padding:0;
  background:transparent;
  border:1px solid rgba(255,255,255,0.12);
  border-radius:12px;
  cursor:pointer;
  transition: background .2s ease, border-color .2s ease;
}
.nav-toggle:hover{
  background:rgba(255,255,255,0.06);
  border-color:rgba(255,255,255,0.20);
}
.hamburger,
.hamburger::before,
.hamburger::after{
  display:block;
  width:20px;
  height:2px;
  background:var(--text);
  border-radius:2px;
  transition: transform .25s ease, opacity .2s ease;
}
.hamburger{
  position:relative;
}
.hamburger::before,
.hamburger::after{
  content:'';
  position:absolute;
  left:0;
}
.hamburger::before{ top:-6px; }
.hamburger::after{ top:6px; }

/* Hamburger animation when open */
.nav-links.open + .nav-toggle .hamburger,
.nav-toggle[aria-expanded="true"] .hamburger{
  background:transparent;
}
.nav-links.open ~ .nav-toggle .hamburger::before,
.nav-toggle[aria-expanded="true"] .hamburger::before{
  transform: translateY(6px) rotate(45deg);
}
.nav-links.open ~ .nav-toggle .hamburger::after,
.nav-toggle[aria-expanded="true"] .hamburger::after{
  transform: translateY(-6px) rotate(-45deg);
}

/* Nav links container */
.nav-links{
  display:flex;
  align-items:center;
  gap:4px;
}
.nav-links a{
  padding:8px 14px;
  border-radius:10px;
  transition: background .15s ease, color .15s ease;
}
.nav-links a:hover{
  background:rgba(255,255,255,0.06);
}
.nav-links a.active{
  color:var(--accent);
}
.nav-login{
  margin-left:8px;
  background:rgba(103,232,249,0.12);
  border:1px solid rgba(103,232,249,0.25);
  color:var(--accent) !important;
}
.nav-login:hover{
  background:rgba(103,232,249,0.20) !important;
}

/* =========================
   MOBILE BREAKPOINT (768px)
   ========================= */
@media (max-width: 768px){
  /* Show hamburger */
  .nav-toggle{
    display:flex;
    order:3;
  }
  
  /* Mobile menu styling */
  .nav-links{
    position:fixed;
    top:0;
    right:0;
    width:min(320px, 85vw);
    height:100vh;
    flex-direction:column;
    align-items:stretch;
    gap:0;
    padding:80px 24px 32px;
    background:
      linear-gradient(180deg, rgba(10,16,36,0.98), rgba(7,10,18,0.99));
    border-left:1px solid rgba(255,255,255,0.10);
    box-shadow: -10px 0 40px rgba(0,0,0,0.5);
    transform: translateX(100%);
    transition: transform .3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index:100;
    pointer-events:none;
    visibility:hidden;
  }
  .nav-links.open{
    transform: translateX(0);
    pointer-events:auto;
    visibility:visible;
  }
  .nav-links a{
    padding:16px 18px;
    margin:0;
    font-size:17px;
    border-radius:14px;
    border-bottom:1px solid rgba(255,255,255,0.06);
  }
  .nav-links a:last-child{
    border-bottom:none;
    margin-top:16px;
  }
  .nav-login{
    text-align:center;
    margin-left:0;
  }
  
  /* Overlay when menu open */
  .nav-links::before{
    content:'';
    position:fixed;
    top:0;
    left:0;
    width:100vw;
    height:100vh;
    background:rgba(0,0,0,0.5);
    opacity:0;
    pointer-events:none;
    transition: opacity .3s ease;
    z-index:-1;
  }
  .nav-links.open::before{
    opacity:1;
    pointer-events:auto;
  }

  /* Login page: keep nav inline to avoid overlay blocking the form */
  body[data-page="login"] .nav-toggle{
    display:none;
  }
  body[data-page="login"] .nav-links{
    position:static;
    width:100%;
    height:auto;
    padding:12px 0 0;
    transform:none;
    background:transparent;
    border-left:none;
    box-shadow:none;
    visibility:visible;
    pointer-events:auto;
  }
  body[data-page="login"] .nav-links::before{
    display:none;
  }
  body[data-page="login"] .nav-links a{
    border-bottom:none;
    padding:10px 12px;
  }
  
  /* Hero adjustments */
  .hero{
    padding:48px 0 20px;
  }
  .h1{
    font-size:28px;
    line-height:1.15;
  }
  .lead{
    font-size:15px;
  }
  .hero-actions{
    flex-direction:column;
  }
  .hero-actions .btn{
    width:100%;
    justify-content:center;
    padding:16px 20px;
  }
  
  /* Larger touch targets */
  .btn{
    padding:14px 18px;
    min-height:48px;
  }
  
  /* Cards */
  .card{
    padding:20px;
  }
  
  /* Container padding */
  .container{
    width:calc(100% - 32px);
  }
  
  /* Section spacing */
  .section{
    padding:32px 0;
  }
  
  /* Tables scroll horizontally */
  .table-wrap{
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
    margin:0 -16px;
    padding:0 16px;
  }
  .table{
    min-width:500px;
  }
}

/* =========================
   SMALL MOBILE (480px)
   ========================= */
@media (max-width: 480px){
  .nav-inner{
    padding:12px 0;
  }
  .brand{
    font-size:15px;
  }
  .brand-badge{
    width:30px;
    height:30px;
  }
  .h1{
    font-size:24px;
  }
  .kicker{
    font-size:12px;
    padding:6px 10px;
  }
  .card h3{
    font-size:16px;
  }
}

/* =========================
   PAGE HERO (inner pages)
   ========================= */
.page-hero{
  padding:48px 0 32px;
}
.page-hero h1{
  margin:12px 0 8px;
  font-size: clamp(28px, 3.5vw, 44px);
  line-height:1.15;
  letter-spacing:-0.4px;
}
.page-hero p{
  color:var(--muted);
  font-size: clamp(15px, 1.4vw, 17px);
  max-width:60ch;
  margin:0;
}

/* Page grid for footer */
.page-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:24px;
}
@media (max-width: 768px){
  .page-hero{
    padding:32px 0 24px;
  }
  .page-grid{
    grid-template-columns:1fr;
    gap:16px;
    text-align:center;
  }
}

/* Login card specific */
.login-card{
  max-width:400px;
  margin:0 auto;
}
@media (max-width: 480px){
  .login-card{
    padding:24px 20px;
  }
}

/* =========================
   FEATURE CARDS & ICONS
   ========================= */
.feature-card{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.feature-icon{
  font-size:32px;
  line-height:1;
  margin-bottom:4px;
}
.feature-card h3{
  margin:0;
}
.feature-card p{
  margin:0;
  flex-grow:1;
}

/* =========================
   INTRO SECTION
   ========================= */
.intro-card{
  text-align:center;
  padding:32px 24px;
}
.intro-text{
  font-size:clamp(16px, 1.6vw, 19px);
  color:var(--muted);
  max-width:70ch;
  margin:0 auto 16px;
  line-height:1.7;
}
.intro-highlight{
  font-size:clamp(15px, 1.4vw, 17px);
  color:var(--accent);
  font-weight:600;
  margin:0;
}
.lead-sub{
  font-size:clamp(15px, 1.3vw, 17px);
  color:var(--muted2);
  margin-top:8px;
}
.hero-feature-list{
  margin:14px 0 0;
  padding:0;
  list-style:none;
  display:grid;
  gap:8px;
  color:var(--muted);
  font-size:14px;
}
.hero-feature-list li{
  position:relative;
  padding-left:18px;
}
.hero-feature-list li::before{
  content:'â€¢';
  position:absolute;
  left:0;
  color:var(--accent);
}

/* =========================
   SECTION TITLES - Icy
   ========================= */
.section-title{
  font-size:clamp(22px, 2.5vw, 32px);
  margin:0 0 24px;
  letter-spacing:-0.4px;
  font-weight: 800;
  background: linear-gradient(135deg, #E8F4FF 0%, #9AF5FF 50%, #E8F4FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* =========================
   SECTION FROST DIVIDERS
   ========================= */
.section-divider{
  height: 1px;
  border: none;
  margin: 0;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(95,227,248,0.35) 20%,
    rgba(137,196,255,0.30) 50%,
    rgba(95,227,248,0.35) 80%,
    transparent 100%);
}
.section::before{
  content: '';
  display: block;
  height: 1px;
  margin-bottom: 56px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(95,227,248,0.25) 25%,
    rgba(137,196,255,0.20) 50%,
    rgba(95,227,248,0.25) 75%,
    transparent 100%);
}
.section:first-of-type::before,
.hero + .section::before{
  display: none;
}

/* =========================
   DIFFERENTIATORS
   ========================= */
.differentiators{
  gap:24px;
}
.diff-item{
  padding:16px 0;
  border-bottom:1px solid rgba(255,255,255,0.08);
}
.diff-item:last-child{
  border-bottom:none;
}
.diff-item strong{
  display:block;
  font-size:16px;
  margin-bottom:4px;
}
.diff-item p{
  margin:0;
  color:var(--muted);
}

/* =========================
   FAQ ACCORDION
   ========================= */
.faq-list{
  display:flex;
  flex-direction:column;
  gap:12px;
  max-width:800px;
  margin:0 auto;
}
.faq-item{
  background:var(--panel);
  border:1px solid var(--stroke);
  border-radius:14px;
  overflow:hidden;
  transition: border-color .2s ease;
}
.faq-item[open]{
  border-color:rgba(103,232,249,0.3);
}
.faq-question{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:18px 20px;
  font-weight:700;
  font-size:16px;
  cursor:pointer;
  list-style:none;
  transition: background .15s ease;
}
.faq-question::-webkit-details-marker{
  display:none;
}
.faq-question::after{
  content:'+';
  font-size:20px;
  font-weight:400;
  color:var(--muted);
  transition: transform .2s ease;
}
.faq-item[open] .faq-question::after{
  content:'âˆ’';
  color:var(--accent);
}
.faq-question:hover{
  background:rgba(255,255,255,0.03);
}
.faq-answer{
  padding:0 20px 18px;
  margin:0;
  color:var(--muted);
  line-height:1.7;
}

/* =========================
   CTA CARDS
   ========================= */
.cta-card{
  background:
    linear-gradient(135deg, rgba(95,227,248,0.10), rgba(137,196,255,0.08)),
    var(--panel-frost);
  border-color:rgba(95,227,248,0.20);
}

/* =========================
   STACK ROW UTILITY
   ========================= */
.stack-row{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
}
.stack-row.center{
  align-items:center;
  justify-content:flex-start;
}
@media (max-width: 768px){
  .stack-row{
    flex-direction:column;
  }
  .stack-row .btn{
    width:100%;
    justify-content:center;
  }
}

/* Guided steps */
.step-flow{
  display:flex;
  flex-direction:column;
  gap:16px;
}
.step-flow-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:12px;
}
.step-card{
  display:flex;
  gap:12px;
  align-items:flex-start;
  padding:12px;
  border-radius:14px;
  border:1px solid var(--stroke);
  background: rgba(0,0,0,0.18);
}
.step-number{
  width:34px;
  height:34px;
  border-radius:10px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
  color:var(--accent);
  background: rgba(103,232,249,0.15);
}
.step-text strong{
  display:block;
  font-size:16px;
  margin-bottom:4px;
}
.callout{
  display:flex;
  gap:16px;
  align-items:center;
  justify-content:space-between;
  border-left: 4px solid rgba(103,232,249,0.5);
  padding:16px;
}
.callout-title{
  font-weight:800;
  font-size:18px;
  margin-bottom:6px;
}
.callout-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
@media (max-width: 900px){
  .step-flow-grid{
    grid-template-columns:1fr;
  }
  .callout{
    flex-direction:column;
    align-items:flex-start;
  }
}

/* =========================
   BRAND ENHANCEMENTS
   ========================= */

/* Logo/brand image support */
.brand-logo{
  width:34px;
  height:34px;
  border-radius:12px;
  box-shadow: var(--shadow2);
}

/* Improved brand name styling */
.brand-name{
  background: linear-gradient(135deg, var(--text) 0%, rgba(103,232,249,0.9) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
  letter-spacing: -0.2px;
}

/* Frost accent line for headers */
.frost-line{
  height: 3px;
  background: linear-gradient(90deg, 
    var(--accent) 0%, 
    var(--accent2) 50%, 
    transparent 100%);
  border-radius: 2px;
  margin: 12px 0;
}

/* Ice shimmer animation for special elements */
@keyframes iceShimmer{
  0%{ background-position: -200% center; }
  100%{ background-position: 200% center; }
}
.shimmer{
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(103,232,249,0.15) 50%, 
    transparent 100%);
  background-size: 200% 100%;
  animation: iceShimmer 3s linear infinite;
}

/* Status indicator pulses */
.status-pulse{
  position: relative;
}
.status-pulse::before{
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: inherit;
  animation: statusPulse 2s ease-out infinite;
  z-index: -1;
}
@keyframes statusPulse{
  0%{ transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
  100%{ transform: translate(-50%, -50%) scale(2.5); opacity: 0; }
}

/* Loading spinner with brand colors */
.spinner{
  width: 36px;
  height: 36px;
  border: 3px solid rgba(103,232,249,0.15);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin{
  to{ transform: rotate(360deg); }
}

/* Frost glass effect for overlays */
.frost-glass{
  background: rgba(10,16,36,0.75);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.08);
}

/* Brand accent borders */
.accent-border{
  border-left: 3px solid var(--accent);
  padding-left: 16px;
}
.accent-border-gradient{
  border-left: 3px solid transparent;
  border-image: linear-gradient(180deg, var(--accent), var(--accent2)) 1;
  padding-left: 16px;
}

/* =========================
   PWA INSTALL UI
   ========================= */

/* Install banner (slides up from bottom) */
.pwa-install-banner{
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: 16px;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
  pointer-events: none;
}
.pwa-install-banner.visible{
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.pwa-install-content{
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 600px;
  margin: 0 auto;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(15,23,42,0.98), rgba(10,16,36,0.95));
  border: 1px solid rgba(103,232,249,0.25);
  border-radius: 16px;
  box-shadow: 0 -4px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.05) inset;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}
.pwa-install-icon{
  flex-shrink: 0;
}
.pwa-install-icon img{
  width: 48px;
  height: 48px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.pwa-install-text{
  flex: 1;
  min-width: 0;
}
.pwa-install-text strong{
  display: block;
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
}
.pwa-install-text span{
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 2px;
}
.pwa-install-actions{
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.pwa-install-btn{
  padding: 10px 20px !important;
  font-size: 0.9rem !important;
}
.pwa-dismiss-btn{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  background: rgba(255,255,255,0.08);
  color: var(--muted);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.pwa-dismiss-btn:hover{
  background: rgba(255,255,255,0.15);
  color: var(--text);
}

/* Modal for manual install instructions */
.pwa-modal-overlay{
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0,0,0,0.7);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.2s ease;
}
.pwa-modal{
  max-width: 420px;
  padding: 28px;
  animation: slideUp 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.pwa-modal h3{
  margin: 0 0 16px 0;
  font-size: 1.25rem;
  color: var(--accent);
}
.pwa-instructions{
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}
.pwa-instructions ol{
  margin: 12px 0;
  padding-left: 20px;
}
.pwa-instructions li{
  margin-bottom: 8px;
}
.pwa-instructions a{
  color: var(--accent);
}
.pwa-modal-actions{
  margin-top: 20px;
  text-align: right;
}

@keyframes fadeIn{
  from{ opacity: 0; }
  to{ opacity: 1; }
}
@keyframes slideUp{
  from{ transform: translateY(20px); opacity: 0; }
  to{ transform: translateY(0); opacity: 1; }
}

/* Standalone mode adjustments */
@media (display-mode: standalone), (display-mode: window-controls-overlay){
  .nav{
    padding-top: env(titlebar-area-height, 0);
  }
  body{
    /* Extra padding for window controls overlay */
    padding-top: env(titlebar-area-height, 0);
  }
}

/* Window Controls Overlay (Edge/Chrome) */
@supports (app-region: drag){
  .nav.wco-enabled{
    app-region: drag;
  }
  .nav.wco-enabled .nav-links,
  .nav.wco-enabled .brand,
  .nav.wco-enabled button{
    app-region: no-drag;
  }
}

/* Enhanced WCO titlebar styling */
body.wco-enabled{
  --titlebar-height: env(titlebar-area-height, 0px);
}
body.wco-enabled .nav{
  position: fixed;
  top: 0;
  left: env(titlebar-area-x, 0);
  width: env(titlebar-area-width, 100%);
  height: var(--titlebar-height, 46px);
  min-height: 46px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  background: rgba(7,10,18,0.95);
  border-bottom: 1px solid rgba(103,232,249,0.15);
  z-index: 9999;
}
body.wco-enabled .nav-inner{
  width: 100%;
  padding: 0;
}
body.wco-enabled .brand{
  font-size: 0.95rem;
  gap: 8px;
}
body.wco-enabled .brand-badge{
  width: 26px;
  height: 26px;
  border-radius: 8px;
}
body.wco-enabled .brand-badge svg{
  width: 18px;
  height: 18px;
}
body.wco-enabled main,
body.wco-enabled .hero,
body.wco-enabled .page-hero,
body.wco-enabled section:first-of-type{
  padding-top: calc(var(--titlebar-height, 46px) + 20px);
}

/* =========================
   GLOBAL SEARCH (Ctrl+K)
   ========================= */

.chill-search-overlay{
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 10vh 20px 20px;
  background: rgba(0,0,0,0.7);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}
.chill-search-overlay.visible{
  opacity: 1;
  visibility: visible;
}
.chill-search-modal{
  width: 100%;
  max-width: 580px;
  background: linear-gradient(180deg, #1E293B 0%, #0F172A 100%);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.1);
  overflow: hidden;
  transform: translateY(-20px) scale(0.98);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.chill-search-overlay.visible .chill-search-modal{
  transform: translateY(0) scale(1);
}
.chill-search-header{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.chill-search-icon{
  width: 20px;
  height: 20px;
  stroke: rgba(255,255,255,0.4);
  flex-shrink: 0;
}
.chill-search-input{
  flex: 1;
  border: none;
  background: none;
  font-size: 16px;
  color: var(--text);
  outline: none;
}
.chill-search-input::placeholder{
  color: rgba(255,255,255,0.35);
}
.chill-search-kbd{
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.5);
  font-size: 11px;
  font-family: inherit;
}
.chill-search-results{
  max-height: 400px;
  overflow-y: auto;
}
.chill-search-section{
  padding: 8px 0;
}
.chill-search-section-title{
  padding: 8px 16px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.chill-search-item{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.15s;
}
.chill-search-item:hover,
.chill-search-item.selected{
  background: rgba(103,232,249,0.1);
}
.chill-search-item.selected{
  border-left: 3px solid var(--accent);
}
.chill-search-item-icon{
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}
.chill-search-item-icon svg{
  width: 16px;
  height: 16px;
  fill: var(--accent);
}
.chill-search-item-text{
  flex: 1;
  min-width: 0;
}
.chill-search-item-title{
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}
.chill-search-item-subtitle{
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}
.chill-search-item-type{
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
}
.chill-search-empty{
  padding: 32px;
  text-align: center;
  color: rgba(255,255,255,0.4);
}
.chill-search-footer{
  display: flex;
  gap: 16px;
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 12px;
  color: rgba(255,255,255,0.4);
}
.chill-search-footer kbd{
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255,255,255,0.08);
  font-family: inherit;
  margin-right: 4px;
}

/* Shortcuts Help Modal */
.chill-shortcuts-modal{
  width: 100%;
  max-width: 480px;
  padding: 24px;
  background: linear-gradient(180deg, #1E293B 0%, #0F172A 100%);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.chill-shortcuts-modal h3{
  margin: 0 0 20px 0;
  font-size: 18px;
  color: var(--text);
}
.chill-shortcuts-grid{
  display: grid;
  gap: 8px;
  margin-bottom: 20px;
}
.chill-shortcut-item{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
}
.chill-shortcut-item kbd{
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(103,232,249,0.15);
  color: var(--accent);
  font-size: 12px;
  font-family: inherit;
}
.chill-shortcut-item span{
  color: rgba(255,255,255,0.7);
  font-size: 13px;
}

/* =========================
   TOAST NOTIFICATIONS
   ========================= */

.chill-toast-container{
  position: fixed;
  bottom: 100px;
  right: 24px;
  z-index: 99998;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.chill-toast{
  padding: 12px 20px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1E293B, #0F172A);
  color: var(--text);
  font-size: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.1);
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.3s, transform 0.3s;
}
.chill-toast.visible{
  opacity: 1;
  transform: translateX(0);
}

/* =========================
   OFFLINE BANNER
   ========================= */

.chill-offline-banner{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 99997;
  padding: 10px 16px;
  background: linear-gradient(90deg, #DC2626, #EF4444);
  color: white;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transform: translateY(-100%);
  transition: transform 0.3s;
}
.chill-offline-banner.visible{
  transform: translateY(0);
}
.chill-offline-banner svg{
  width: 16px;
  height: 16px;
  fill: currentColor;
}
.chill-offline-banner.syncing{
  background: linear-gradient(90deg, #F59E0B, #D97706);
}
.chill-offline-banner.online{
  background: linear-gradient(90deg, #22C55E, #16A34A);
}

/* =========================
   LIGHT THEME
   ========================= */

body.light-theme{
  --bg0: #F8FAFC;
  --bg1: #F1F5F9;
  --panel: rgba(0,0,0,0.04);
  --panel2: rgba(0,0,0,0.06);
  --stroke: rgba(0,0,0,0.1);
  --text: #1E293B;
  --muted: rgba(30,41,59,0.7);
  --muted2: rgba(30,41,59,0.5);
}
body.light-theme{
  background:
    radial-gradient(1200px 700px at 10% 10%, rgba(103,232,249,0.08), transparent 60%),
    radial-gradient(1000px 600px at 90% 15%, rgba(167,139,250,0.08), transparent 55%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
}
body.light-theme .nav{
  background: rgba(248,250,252,0.85);
  border-bottom-color: rgba(0,0,0,0.08);
}
body.light-theme .card{
  background: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
body.light-theme .btn{
  background: rgba(0,0,0,0.05);
  color: var(--text);
}
body.light-theme .btn:hover{
  background: rgba(0,0,0,0.1);
}
body.light-theme .btn-primary{
  background: linear-gradient(135deg, #0EA5E9, #06B6D4);
  color: white;
}
body.light-theme .chill-search-modal,
body.light-theme .chill-shortcuts-modal,
body.light-theme .chill-toast{
  background: white;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
body.light-theme .chill-search-input{
  color: var(--text);
}
body.light-theme .chill-widget-panel{
  background: white;
}
body.light-theme .chill-widget-fab{
  background: linear-gradient(135deg, #F1F5F9, #E2E8F0);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* =========================
   FOCUS-VISIBLE ACCESSIBILITY
   ========================= */

/* Remove default focus outline */
*:focus{
  outline: none;
}

/* Keyboard-only focus styles */
*:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Buttons focus ring */
.btn:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  box-shadow:
    0 0 0 4px rgba(103,232,249,0.15),
    0 0 20px rgba(103,232,249,0.25);
}

/* Input focus override */
.input:focus-visible{
  outline: none;
  border-color: rgba(103,232,249,0.6);
  box-shadow: 0 0 0 4px rgba(103,232,249,0.12);
}

/* Card focus for interactive cards */
.card:focus-visible,
a.card:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-color: rgba(103,232,249,0.4);
}

/* Nav links focus */
.nav-links a:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  background: rgba(103,232,249,0.1);
}

/* Skip to content link (accessibility) */
.skip-link{
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 24px;
  background: var(--accent);
  color: var(--bg0);
  font-weight: 700;
  border-radius: 0 0 12px 12px;
  z-index: 99999;
  transition: top .2s ease;
}
.skip-link:focus{
  top: 0;
}

/* =========================
   PHONE GALLERY DOT INDICATORS
   ========================= */

.phone-gallery{
  position: relative;
}
.phone-dots{
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}
.phone-dot{
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.1);
  cursor: pointer;
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.phone-dot:hover{
  background: rgba(103,232,249,0.4);
  transform: scale(1.15);
}
.phone-dot.active{
  background: var(--accent);
  box-shadow: 0 0 12px rgba(103,232,249,0.5);
  transform: scale(1.2);
}

/* Scroll fade hints */
.phone-scroll{
  position: relative;
}
.phone-gallery::after{
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 60px;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--bg1));
  pointer-events: none;
  opacity: 0.8;
}

/* =========================
   ENHANCED FOOTER
   ========================= */

.footer{
  padding: 48px 0 32px;
  color: var(--muted);
  border-top: 1px solid transparent;
  margin-top: 48px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.2));
  position: relative;
}
.footer::before{
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(1120px, 90%);
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(103,232,249,0.3) 25%,
    rgba(167,139,250,0.25) 50%,
    rgba(103,232,249,0.3) 75%,
    transparent 100%);
}

.footer-grid{
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
}
.footer-brand{
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-weight: 800;
  font-size: 18px;
  color: var(--text);
}
.footer-brand .brand-logo{
  width: 36px;
  height: 36px;
  border-radius: 8px;
  filter: drop-shadow(0 0 8px rgba(95,227,248,0.3));
}
.footer-brand .brand-text{
  background: linear-gradient(135deg, #E8F4FF 0%, #9AF5FF 50%, #E8F4FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.footer-tagline{
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
}
.footer-social{
  display: flex;
  gap: 12px;
}
.footer-social a{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--muted);
  transition: background .2s, color .2s, transform .2s, border-color .2s;
}
.footer-social a:hover{
  background: rgba(103,232,249,0.15);
  border-color: rgba(103,232,249,0.3);
  color: var(--accent);
  transform: translateY(-2px);
}
.footer-social a svg{
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.footer-heading{
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text);
  margin-bottom: 16px;
}
.footer-links{
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links a{
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  transition: color .2s;
}
.footer-links a:hover{
  color: var(--accent);
}

.footer-contact p{
  margin: 0 0 8px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-contact svg{
  width: 16px;
  height: 16px;
  fill: var(--accent);
  flex-shrink: 0;
}

/* Partner Logos */
.footer-partners{
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  text-align: center;
}
.footer-partners .footer-heading{
  margin-bottom: 16px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.partner-logos{
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.partner-logo{
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  transition: all 0.3s ease;
}
.partner-logo:hover{
  background: rgba(255,255,255,0.1);
  border-color: rgba(102,168,222,0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.partner-logo img{
  max-height: 48px;
  max-width: 120px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: brightness(0.9);
  transition: filter 0.3s;
}
.partner-logo:hover img{
  filter: brightness(1);
}

.footer-bottom{
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--muted);
}
.footer-legal{
  display: flex;
  gap: 24px;
}
.footer-legal a{
  color: var(--muted);
  text-decoration: none;
  transition: color .2s;
}
.footer-legal a:hover{
  color: var(--muted);
}

@media (max-width: 900px){
  .footer-grid{
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}
@media (max-width: 600px){
  .footer{
    padding: 40px 0 28px;
  }
  .hero-grid{ grid-template-columns:1fr; }
  .hero-logo{ order:2; }
  .hero-logo img{ width:min(320px, 80vw); }
  .footer-grid{
    grid-template-columns: 1fr;
    gap: 28px;
    text-align: center;
  }
  .footer-social{
    justify-content: center;
  }
  .footer-links{
    align-items: center;
  }
  .footer-contact p{
    justify-content: center;
  }
  .footer-bottom{
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  .footer-legal{
    gap: 16px;
  }
}

/* =========================
   SNOW EFFECT â„ï¸
   ========================= */
#snow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
}

/* =========================
   AUTH GATE LOADING OVERLAY
   ========================= */
.auth-loading {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-deep, #040810);
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.auth-loading.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.auth-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(95, 227, 248, 0.15);
  border-top-color: var(--accent, #5FE3F8);
  border-radius: 50%;
  animation: authSpin 0.8s linear infinite;
}
.auth-loading-text {
  margin-top: 1rem;
  color: rgba(224, 230, 237, 0.5);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}
@keyframes authSpin {
  to { transform: rotate(360deg); }
}

/* Page reveal animation */
.page-reveal {
  animation: pageReveal 0.35s ease-out;
}
@keyframes pageReveal {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Role badge (canonical) */
.role-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.role-superadmin { background: rgba(248, 113, 113, 0.18); color: #f87171; }
.role-admin      { background: rgba(143, 233, 255, 0.18); color: var(--accent, #5FE3F8); }
.role-installer  { background: rgba(34, 216, 160, 0.18); color: #22D8A0; }
.role-viewer     { background: rgba(255, 255, 255, 0.10); color: rgba(224, 230, 237, 0.6); }

#mist {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
