:root{
  --bg:#07152f;
  --bg2:#031022;
  --card:#0f2348;
  --card2:#11274f;
  --line:rgba(255,255,255,.08);
  --text:#ffffff;
  --muted:#a9bddf;
  --muted2:#c4d5ef;
  --green:#23c16b;
  --greenText:#6df3a4;
  --blue:#4fa0ff;
  --blueBg:rgba(79,160,255,.16);
  --gold:#ffc54d;
  --goldBg:rgba(255,197,77,.16);
  --red:#ff6480;
  --shadow:0 24px 80px rgba(0,0,0,.28);
}
*{box-sizing:border-box}
html,body{
  margin:0;
  padding:0;
  min-height:100%;
  background:
    radial-gradient(circle at top left, #0d2a63 0%, rgba(13,42,99,0) 30%),
    linear-gradient(180deg,var(--bg) 0%, var(--bg2) 100%);
  color:var(--text);
  font-family:Arial,Helvetica,sans-serif;
}
body{padding:12px}
button{font:inherit}
.app-shell{max-width:860px;margin:0 auto}
.topbar{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  margin-bottom:14px
}
.eyebrow{
  font-size:14px;
  color:#a6c6ff;
  letter-spacing:.08em;
  text-transform:uppercase;
  margin-bottom:6px
}
h1{margin:0;font-size:28px;line-height:1.1}
.top-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end
}
.lang-switch{display:flex;gap:6px}
.lang-btn,.ghost-btn,.primary-btn{
  border-radius:14px;
  border:1px solid var(--line);
  padding:10px 16px;
  background:rgba(255,255,255,.02);
  color:var(--text);
  cursor:pointer;
  transition:.2s ease;
}
.lang-btn{padding:8px 12px;font-size:14px}
.lang-btn.is-active{background:rgba(99,167,255,.14);border-color:rgba(99,167,255,.4)}
.primary-btn{background:#17366a}
.ghost-btn:hover,.primary-btn:hover,.lang-btn:hover{transform:translateY(-1px)}
.hidden{display:none!important}

.hero-card,.list-wrap{
  background:linear-gradient(180deg,var(--card) 0%, #0d2147 100%);
  border:1px solid var(--line);
  border-radius:22px;
  box-shadow:var(--shadow);
}
.hero-card{
  padding:18px 18px 16px;
  margin-bottom:14px;
}
.hero-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
  margin-bottom:14px;
}
.hero-block{
  min-height:94px;
  padding:14px 14px 12px;
  border:1px solid var(--line);
  border-radius:18px;
  background:linear-gradient(180deg,rgba(255,255,255,.03) 0%, rgba(255,255,255,.01) 100%);
}
.hero-right{text-align:right}
.hero-label{
  color:var(--muted);
  font-size:14px;
  margin-bottom:10px;
}
.hero-value{
  font-size:40px;
  line-height:1;
  font-weight:700;
}
.hero-value.small{
  font-size:20px;
  line-height:1.25;
  word-break:break-word;
}
.status-line{
  display:flex;
  align-items:center;
  gap:10px;
  font-size:20px;
}
.status-dot{
  width:14px;
  height:14px;
  border-radius:50%;
  display:inline-block;
  box-shadow:0 0 0 4px rgba(255,255,255,.04)
}
.status-dot.online{background:var(--green)}
.status-dot.offline{background:var(--red)}
.hero-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.list-wrap{
  padding:16px;
  margin-bottom:14px;
}
.section-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:12px;
}
.section-header h2{margin:0;font-size:18px}
.section-meta{color:var(--muted);font-size:14px}
.cards{display:grid;gap:8px}

.spot-card,.empty-card,.live-card{
  border-radius:16px;
  border:1px solid var(--line);
  background:linear-gradient(180deg,var(--card2) 0%, #0d2147 100%);
}
.ultra-card,.live-card{
  padding:10px 12px;
}
.empty-card{
  padding:18px;
  color:var(--muted);
  text-align:center;
}

.spot-row,.live-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
}
.spot-call,.live-call{
  margin:0;
  font-size:15px;
  line-height:1.2;
  font-weight:700;
}
.spot-line,.live-row2{
  font-size:13px;
  color:var(--muted2);
  margin-top:4px;
  line-height:1.35;
  font-weight:600;
}

.badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:62px;
  padding:6px 10px;
  border-radius:999px;
  font-size:11px;
  font-weight:700;
  letter-spacing:.03em;
  text-transform:uppercase;
}
.badge-live,.badge.live,.badge-live.badge{
  background:rgba(35,193,107,.16);
  color:var(--greenText);
}
.badge-new{
  background:var(--goldBg);
  color:var(--gold);
}
.badge-qsy{
  background:var(--blueBg);
  color:#8bc3ff;
}
.badge-qrt{
  background:rgba(255,100,128,.16);
  color:#ff98ab;
}

.secondary.hidden{display:none!important}

@media (max-width:700px){
  body{padding:10px}
  .topbar{flex-direction:column;align-items:stretch}
  .top-actions{justify-content:space-between}
  h1{font-size:24px}
  .hero-grid{grid-template-columns:1fr}
  .hero-block{min-height:auto}
  .hero-right{text-align:left}
  .hero-value{font-size:34px}
  .hero-value.small{font-size:18px}
  .hero-actions .ghost-btn,
  .hero-actions .primary-btn{flex:1 1 auto}
  .spot-call,.live-call{font-size:14px}
  .spot-line,.live-row2{font-size:12px}
}


/* === COMPACT HEADER === */
.compact-bar{
  margin-bottom:12px;
}

.compact-status{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border-radius:16px;
  background:rgba(36,59,110,.35);
  border:1px solid var(--line);
  font-size:14px;
}

.status-inline{
  display:flex;
  align-items:center;
  gap:8px;
}

.compact-status .status-dot{
  width:10px;
  height:10px;
}

.divider{
  opacity:.5;
}

.compact-actions{
  display:flex;
  gap:10px;
  margin-top:8px;
}

.compact-actions button{
  flex:1;
  height:38px;
  border-radius:14px;
}


/* v13 fix: compact top area + shorter notification button on mobile */
#notify-btn.is-active{
  background: rgba(35,193,107,.14);
  border-color: rgba(35,193,107,.34);
  color: var(--greenText);
}
#notify-btn.is-denied,
#notify-btn.is-blocked{
  background: rgba(255,100,128,.12);
  border-color: rgba(255,100,128,.30);
  color: #ffb0bf;
}
.hero-actions{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.hero-actions .primary-btn,
.hero-actions .ghost-btn{
  width:100%;
  min-width:0;
  text-align:center;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.top-actions .ghost-btn{
  white-space:nowrap;
}

@media (max-width:700px){
  .top-actions{
    display:grid;
    grid-template-columns:1fr auto;
    align-items:start;
    gap:10px;
  }
  .lang-switch{
    flex-wrap:wrap;
  }
  .top-actions #install-btn{
    justify-self:end;
    padding:8px 14px;
  }
  .hero-card{
    padding:16px 16px 14px;
  }
  .hero-grid{
    gap:12px;
    margin-bottom:12px;
  }
  .hero-block{
    padding:12px 13px 11px;
    border-radius:16px;
  }
  .hero-label{
    margin-bottom:8px;
  }
  .hero-actions{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
  }
  .hero-actions .ghost-btn,
  .hero-actions .primary-btn{
    flex:none;
    padding:10px 12px;
    border-radius:14px;
    font-size:14px;
  }
}


/* === v19 real layout fix === */
.topbar-v19{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:18px;
  margin-bottom:14px;
}

.brand-block{
  min-width:0;
  flex:0 1 auto;
}

.top-actions-v19{
  display:flex;
  align-items:flex-start;
  justify-content:flex-end;
  gap:10px;
  flex:1 1 auto;
  width:auto !important;
  margin-top:0;
}

.top-actions-left{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
}

.utility-btn{
  padding:8px 12px;
  min-height:38px;
  border-radius:12px;
  font-size:13px;
  white-space:nowrap;
}

.install-btn-v19{
  padding:8px 14px;
  min-height:38px;
  border-radius:12px;
  white-space:nowrap;
}

.hero-card-v19{
  padding:14px;
  margin-bottom:14px;
}

.hero-grid-hidden,
.hero-actions-hidden{
  display:none !important;
}

.compact-status{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border-radius:16px;
  background:rgba(36,59,110,.35);
  border:1px solid var(--line);
  font-size:14px;
  line-height:1.2;
}

.status-inline{
  display:flex;
  align-items:center;
  gap:8px;
}

.compact-inline{
  display:inline-flex;
  align-items:center;
  gap:6px;
}

.divider{
  opacity:.5;
}

#notify-btn.is-active{
  background: rgba(35,193,107,.14);
  border-color: rgba(35,193,107,.34);
  color: var(--greenText);
}
#notify-btn.is-denied,
#notify-btn.is-blocked{
  background: rgba(255,100,128,.12);
  border-color: rgba(255,100,128,.30);
  color: #ffb0bf;
}

@media (max-width:900px){
  .topbar-v19{
    flex-direction:column;
    align-items:stretch;
    gap:10px;
  }

  .top-actions-v19{
    justify-content:space-between;
    align-items:flex-start;
    gap:10px;
  }

  .top-actions-left{
    justify-content:flex-start;
  }
}

@media (max-width:700px){
  h1{
    font-size:20px;
    line-height:1.12;
  }

  .eyebrow{
    font-size:12px;
    margin-bottom:4px;
  }

  .topbar-v19{
    gap:8px;
    margin-bottom:10px;
  }

  .top-actions-v19{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:10px;
  }

  .top-actions-left{
    display:flex;
    align-items:center;
    gap:6px;
    flex-wrap:wrap;
    max-width:calc(100% - 110px);
  }

  .lang-switch{
    display:flex;
    gap:4px;
  }

  .lang-btn{
    padding:7px 10px;
    border-radius:12px;
    font-size:13px;
  }

  .utility-btn{
    padding:7px 10px;
    min-height:36px;
    font-size:12px;
    border-radius:12px;
  }

  .install-btn-v19{
    padding:7px 12px;
    min-height:36px;
    font-size:12px;
    border-radius:12px;
    flex:0 0 auto;
    align-self:flex-start;
  }

  .hero-card-v19{
    padding:12px;
    border-radius:20px;
    margin-bottom:12px;
  }

  .compact-status{
    gap:6px;
    padding:9px 10px;
    border-radius:14px;
    font-size:13px;
  }
}

@media (max-width:420px){
  .top-actions-v19{
    gap:8px;
  }

  .top-actions-left{
    max-width:calc(100% - 96px);
    gap:5px;
  }

  .lang-btn{
    padding:7px 9px;
    font-size:12px;
  }

  .utility-btn{
    padding:7px 9px;
    font-size:12px;
  }

  .install-btn-v19{
    padding:7px 10px;
    font-size:12px;
  }

  .compact-status{
    font-size:12px;
  }
}
