:root{
  --bg:#0b1220;
  --bg2:#060a14;
  --panel: rgba(255,255,255,.08);
  --panel2: rgba(255,255,255,.12);
  --text:#eaf0ff;
  --muted: rgba(234,240,255,.72);
  --line: rgba(234,240,255,.14);
  --shadow: 0 22px 70px rgba(0,0,0,.42);
  --accent: rgba(120,160,255,.85);
  --gold: rgba(200,169,81,.85);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background:
    radial-gradient(1100px 680px at 18% 14%, rgba(120,160,255,.24), transparent 62%),
    radial-gradient(900px 620px at 84% 28%, rgba(200,169,81,.16), transparent 58%),
    linear-gradient(180deg, var(--bg), var(--bg2));
  color:var(--text);
}

body.light{
  --bg:#f6f8ff;
  --bg2:#eef2ff;
  --panel: rgba(0,0,0,.05);
  --panel2: rgba(0,0,0,.08);
  --text:#0b1220;
  --muted: rgba(11,18,32,.68);
  --line: rgba(11,18,32,.12);
  --shadow: 0 18px 60px rgba(0,0,0,.12);
}

a{color:inherit}
.topbar{
  position:sticky; top:0; z-index:10;
  display:flex; align-items:center; justify-content:space-between;
  padding:16px 18px;
  border-bottom:1px solid var(--line);
  background: rgba(10,14,26,.65);
  backdrop-filter: blur(12px);
}
body.light .topbar{background: rgba(246,248,255,.75)}

.brand{
  display:flex; gap:10px; align-items:center;
  font-weight:800; letter-spacing:.2px;
}
.logo{
  width:34px; height:34px; border-radius:12px;
  background: linear-gradient(135deg, rgba(120,160,255,.9), rgba(200,169,81,.75));
  box-shadow: var(--shadow);
}
.nav{
  display:flex; gap:8px; flex-wrap:wrap; align-items:center;
}

.pill{
  padding:8px 10px;
  border:1px solid var(--line);
  border-radius:999px;
  text-decoration:none;
  font-size:12px;
  opacity:.86;
}
.pill.active{background: var(--panel2); opacity:1}

.wrap{max-width:1120px; margin:0 auto; padding:22px 16px 64px}
.hero{
  border:1px solid var(--line);
  background: var(--panel);
  border-radius:24px;
  padding:18px;
  box-shadow: var(--shadow);
}
.hero h1{margin:0; font-size:28px}
.hero p{margin:10px 0 0; color:var(--muted); line-height:1.6}

.actions{display:flex; gap:10px; flex-wrap:wrap; margin-top:14px}
.btn{
  background: #111827;
  color:#fff;
  border:1px solid rgba(255,255,255,.16);
  padding:10px 14px;
  border-radius:14px;
  cursor:pointer;
  font-weight:700;
}
body.light .btn{background:#0b1220}
.btn:hover{filter:brightness(1.08)}
.btn.ghost{background: transparent; color:var(--text)}
.btn.small{padding:8px 10px; font-size:12px}

.status{margin-top:10px; color:var(--muted); font-size:13px}
.manual{
  margin-top:12px;
  padding:12px;
  border:1px solid var(--line);
  border-radius:18px;
  background: var(--panel);
}
.hidden{display:none}
.manualRow{display:flex; gap:10px; flex-wrap:wrap}
.input{
  flex:1; min-width:240px;
  background: rgba(0,0,0,.22);
  border:1px solid var(--line);
  border-radius:14px;
  padding:10px 12px;
  color:var(--text);
}
body.light .input{background: rgba(255,255,255,.7)}
.hint{margin-top:8px; color:var(--muted); font-size:12px}

.grid{display:grid; gap:14px; margin-top:14px; grid-template-columns:1fr}
@media(min-width: 960px){ .grid{grid-template-columns: 1fr 2fr} }

.card{
  border:1px solid var(--line);
  background: var(--panel);
  border-radius:24px;
  padding:16px;
  box-shadow: var(--shadow);
}
.cardTitle{font-weight:800; margin-bottom:12px}
.muted{color:var(--muted)}
.small{font-size:12px}

.kpis{display:flex; gap:10px; flex-wrap:wrap}
.kpi{
  border:1px solid var(--line);
  background: rgba(255,255,255,.05);
  padding:10px 12px;
  border-radius:16px;
  min-width: 180px;
}
.kpi .label{font-size:12px; color:var(--muted)}
.kpi .value{font-size:18px; font-weight:900; margin-top:4px}

.qiblaBox{display:flex; gap:14px; align-items:center; flex-wrap:wrap}
.dial{
  width:138px; height:138px;
  border-radius:999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.06);
  position:relative;
}
.north{
  position:absolute; top:10px; left:50%;
  transform:translateX(-50%);
  font-size:11px; color:var(--muted)
}
.needle{
  position:absolute;
  left:50%; top:50%;
  width:4px; height:58px;
  border-radius:6px;
  background: linear-gradient(#fff, rgba(255,255,255,.22));
  transform-origin: bottom;
}
.big{font-size:30px; font-weight:950}
.place{font-size:12px; color:var(--muted); line-height:1.5}

.tables{display:grid; gap:12px; grid-template-columns:1fr}
@media(min-width: 760px){ .tables{grid-template-columns:1fr 1fr} }

.subcard{
  border:1px solid var(--line);
  border-radius:20px;
  background: rgba(255,255,255,.05);
  padding:14px;
}
.subTitle{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  font-weight:900; font-size:13px; margin-bottom:10px;
}
.badge{
  font-size:11px;
  padding:6px 8px;
  border-radius:999px;
  border:1px solid var(--line);
  color:var(--muted);
}
.table .row{
  display:flex; justify-content:space-between;
  padding:8px 0;
  border-bottom:1px dashed rgba(234,240,255,.12);
  font-size:13px;
}
body.light .table .row{border-bottom:1px dashed rgba(11,18,32,.14)}
.table .row:last-child{border-bottom:none}
.table .k{color:var(--muted)}
.table .v{font-weight:900}
.table .d{font-weight:800; color: var(--gold)}

#map{
  height: 320px;
  border-radius: 18px;
  border:1px solid var(--line);
  overflow:hidden;
  margin-top: 12px;
}
.footer{
  margin-top:16px;
  color:var(--muted);
  font-size:12px;
  display:flex;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}