/* ───────────────────────────── AdhanOnline UI ─────────────────────────────
   One stylesheet for the public landing, auth, and the signed-in dashboard.
   Dark, calm palette with an emerald accent + warm gold highlight.            */

:root {
  --bg:        #0b1020;
  --bg-2:      #0e1428;
  --panel:     #141b31;
  --panel-2:   #1b2340;
  --line:      #27304f;
  --line-2:    #323c63;
  --ink:       #eef1fb;
  --mut:       #939dc4;
  --mut-2:     #6b749c;
  --acc:       #2dd4a7;   /* emerald */
  --acc-ink:   #04231b;
  --acc-2:     #36e0c0;
  --gold:      #e8c477;
  --danger:    #ff6b6b;
  --ok:        #2ecc71;
  --off:       #4a5276;
  --radius:    14px;
  --shadow:    0 18px 48px -20px rgba(0,0,0,.65);
  --maxw:      1120px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font: 15px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(1200px 700px at 70% -10%, #15224a 0%, transparent 55%), var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -0.01em; }
.mut { color: var(--mut); }
.center { text-align: center; }

/* ── Buttons & inputs ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border: 0; border-radius: 10px; cursor: pointer;
  font: inherit; font-weight: 650; color: var(--acc-ink);
  background: linear-gradient(180deg, var(--acc-2), var(--acc));
  box-shadow: 0 6px 18px -8px var(--acc); transition: transform .08s ease, filter .15s ease;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; filter: none; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-2); box-shadow: none; }
.btn.ghost:hover { background: var(--panel-2); }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid #52324a; box-shadow: none; }
.btn.danger:hover { background: #2a1c2b; }
.btn.block { width: 100%; }

label { display: block; font-size: 12px; font-weight: 600; color: var(--mut); margin: 12px 0 5px; }
input, select, textarea {
  width: 100%; padding: 10px 12px; background: var(--bg-2); color: var(--ink);
  border: 1px solid var(--line); border-radius: 9px; font: inherit; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--acc); box-shadow: 0 0 0 3px rgba(45,212,167,.14); }
input[type=file] { padding: 8px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.row > * { flex: 1; min-width: 150px; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; background: var(--panel-2); border: 1px solid var(--line); color: var(--mut); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--off); display: inline-block; }
.dot.on { background: var(--ok); box-shadow: 0 0 8px var(--ok); }

/* ── Landing: top nav ───────────────────────────────────────────────────── */
.nav { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(10px);
  background: rgba(11,16,32,.72); border-bottom: 1px solid var(--line); }
.nav-in { max-width: var(--maxw); margin: 0 auto; padding: 14px 22px;
  display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 18px; letter-spacing: -0.02em; }
.brand .mark { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 17px;
  background: linear-gradient(145deg, var(--acc-2), #1d9c7d); box-shadow: 0 6px 16px -6px var(--acc); }
.brand b { color: var(--gold); font-weight: 750; }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a.txt { padding: 8px 12px; color: var(--mut); font-weight: 600; border-radius: 8px; }
.nav-links a.txt:hover { color: var(--ink); }

/* ── Landing: hero ──────────────────────────────────────────────────────── */
.hero { max-width: var(--maxw); margin: 0 auto; padding: 70px 22px 40px; text-align: center; }
.hero .pill { display: inline-flex; gap: 8px; align-items: center; margin-bottom: 22px;
  padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--acc-2);
  background: rgba(45,212,167,.08); border: 1px solid rgba(45,212,167,.28); }
.hero h1 { font-size: clamp(34px, 6vw, 58px); font-weight: 800; letter-spacing: -0.03em; }
.hero h1 .grad { background: linear-gradient(120deg, var(--acc-2), var(--gold));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero p.lead { max-width: 640px; margin: 20px auto 30px; font-size: 18px; color: var(--mut); }
.hero .cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero .trust { margin-top: 20px; font-size: 13px; color: var(--mut-2); }

.mock { max-width: 960px; margin: 48px auto 0; padding: 0 22px; }
.mock-frame { border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(180deg, var(--panel), var(--bg-2));
  box-shadow: var(--shadow); overflow: hidden; }
.mock-bar { display: flex; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.mock-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--line-2); display: inline-block; }
.mock-body { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 22px; }
.mock-tile { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 16px; text-align: left; }
.mock-tile .k { font-size: 12px; color: var(--mut); }
.mock-tile .v { font-size: 20px; font-weight: 700; margin-top: 4px; }
.mock-tile .v small { color: var(--acc-2); font-size: 13px; font-weight: 600; }

/* ── Landing: sections ──────────────────────────────────────────────────── */
section.band { max-width: var(--maxw); margin: 0 auto; padding: 64px 22px; }
.sec-head { text-align: center; max-width: 620px; margin: 0 auto 40px; }
.sec-head .eyebrow { color: var(--acc-2); font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.sec-head h2 { font-size: clamp(26px, 4vw, 38px); font-weight: 800; margin: 10px 0; letter-spacing: -0.02em; }
.sec-head p { color: var(--mut); font-size: 16px; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
  transition: border-color .15s ease, transform .15s ease; }
.feature:hover { border-color: var(--line-2); transform: translateY(-2px); }
.feature .ico { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; font-size: 22px;
  background: rgba(45,212,167,.1); border: 1px solid rgba(45,212,167,.2); margin-bottom: 14px; }
.feature h3 { font-size: 17px; margin-bottom: 6px; }
.feature p { color: var(--mut); font-size: 14px; margin: 0; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; position: relative; }
.step .n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700;
  color: var(--acc-ink); background: linear-gradient(145deg, var(--acc-2), var(--acc)); margin-bottom: 12px; }
.step h3 { font-size: 16px; margin-bottom: 6px; }
.step p { color: var(--mut); font-size: 14px; margin: 0; }

.price { max-width: 460px; margin: 0 auto; background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line-2); border-radius: 18px; padding: 32px; text-align: center; box-shadow: var(--shadow); }
.price .amt { font-size: 52px; font-weight: 800; letter-spacing: -0.03em; }
.price .amt span { font-size: 17px; color: var(--mut); font-weight: 600; }
.price ul { list-style: none; padding: 0; margin: 22px 0; text-align: left; }
.price li { padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--mut); display: flex; gap: 10px; }
.price li::before { content: "✓"; color: var(--acc-2); font-weight: 800; }

footer.foot { border-top: 1px solid var(--line); margin-top: 40px; }
.foot-in { max-width: var(--maxw); margin: 0 auto; padding: 30px 22px; display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: 14px; color: var(--mut-2); font-size: 14px; }

/* ── Auth page ──────────────────────────────────────────────────────────── */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 30px 18px; }
.auth-card { width: 100%; max-width: 410px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 18px; padding: 30px; box-shadow: var(--shadow); }
.auth-card .brand { justify-content: center; margin-bottom: 8px; }
.auth-card h2 { text-align: center; font-size: 22px; }
.auth-card .sub { text-align: center; color: var(--mut); font-size: 14px; margin: 6px 0 18px; }
.seg { display: flex; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 4px; margin-bottom: 8px; }
.seg button { flex: 1; padding: 8px; border: 0; background: transparent; color: var(--mut); font: inherit;
  font-weight: 650; border-radius: 7px; cursor: pointer; }
.seg button.on { background: var(--panel-2); color: var(--ink); box-shadow: 0 1px 0 var(--line-2); }
.auth-foot { text-align: center; margin-top: 16px; font-size: 13px; color: var(--mut-2); }
.auth-foot a { color: var(--acc-2); }

/* ── Dashboard shell ────────────────────────────────────────────────────── */
.app-top { position: sticky; top: 0; z-index: 20; background: rgba(11,16,32,.8); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); }
.app-top-in { max-width: var(--maxw); margin: 0 auto; padding: 12px 22px; display: flex; align-items: center; justify-content: space-between; }
.app-user { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700;
  color: var(--acc-ink); background: linear-gradient(145deg, var(--gold), #c89b4f); }
.tabs { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 14px 14px; color: var(--mut); font-weight: 650; border-bottom: 2px solid transparent; cursor: pointer; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); border-bottom-color: var(--acc); }
main.wrap { max-width: var(--maxw); margin: 0 auto; padding: 24px 22px 60px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 0 0 18px; }
.card > h2 { font-size: 17px; margin-bottom: 4px; }
.card .hint { color: var(--mut); font-size: 13px; margin: 0 0 14px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2 { margin: 0; }

.section-title { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 16px; }
.section-title h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }

/* device cards */
.dev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.dev { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; cursor: pointer;
  transition: border-color .15s ease, transform .15s ease; }
.dev:hover { border-color: var(--acc); transform: translateY(-2px); }
.dev .dev-top { display: flex; justify-content: space-between; align-items: start; }
.dev h3 { font-size: 16px; }
.dev .sn { color: var(--mut-2); font-size: 12px; font-family: ui-monospace, monospace; }
.dev .meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 14px; color: var(--mut); font-size: 13px; }
.dev .meta b { color: var(--ink); font-weight: 650; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line); font-size: 14px; }
th { color: var(--mut); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }

.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pills label { display: inline-flex; align-items: center; gap: 7px; margin: 0; color: var(--ink);
  background: var(--bg-2); border: 1px solid var(--line); padding: 8px 13px; border-radius: 999px; cursor: pointer; font-weight: 600; }
.pills label:has(input:checked) { border-color: var(--acc); background: rgba(45,212,167,.1); color: var(--acc-2); }
.pills input { width: auto; }

.sheet { background: #06101c; border: 1px dashed var(--line-2); border-radius: 10px; padding: 14px; margin-top: 10px;
  font-family: ui-monospace, monospace; font-size: 13px; white-space: pre-wrap; color: var(--acc-2); }

/* audio library */
.audio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.audio-item { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.audio-item.off { opacity: .55; }
.audio-item .ai-top { display: flex; gap: 12px; align-items: center; }
.audio-item .ai-ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-size: 19px;
  background: rgba(232,196,119,.12); border: 1px solid rgba(232,196,119,.22); flex: 0 0 auto; }
.audio-item h4 { margin: 0; font-size: 15px; }
.audio-item .sub { color: var(--mut-2); font-size: 12px; }
.audio-item .ai-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.audio-item audio { width: 100%; height: 34px; }

.empty { text-align: center; padding: 48px 20px; color: var(--mut); border: 1px dashed var(--line-2); border-radius: var(--radius); }
.empty .big { font-size: 40px; margin-bottom: 10px; }

.back { display: inline-flex; align-items: center; gap: 6px; color: var(--acc-2); font-weight: 650; cursor: pointer; margin-bottom: 8px; }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(4,8,18,.7); display: grid; place-items: center; z-index: 50; padding: 18px; }
.modal { width: 100%; max-width: 440px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 16px;
  padding: 24px; box-shadow: var(--shadow); max-height: calc(100vh - 36px); overflow-y: auto; overscroll-behavior: contain; }
.modal h3 { font-size: 18px; margin-bottom: 6px; }
.modal .mx { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* toast */
#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--panel-2); border: 1px solid var(--line-2); padding: 12px 18px; border-radius: 10px;
  opacity: 0; transition: all .22s ease; pointer-events: none; box-shadow: var(--shadow); max-width: 90vw; font-weight: 600; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.err { border-color: var(--danger); color: #ffd4d4; }

.link { color: var(--acc-2); cursor: pointer; font-weight: 600; }
.spin { color: var(--mut); }

@media (max-width: 760px) {
  .grid, .steps, .mock-body { grid-template-columns: 1fr; }
  .nav-links a.txt { display: none; }
  .hero { padding-top: 48px; }
}

/* ── Location picker (Leaflet) + prayer-times preview ──────────────────────── */
.picker { margin: 0 0 14px; }
.picker .map { height: 280px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel-2); }
.picker .geo { display: flex; gap: 8px; margin-bottom: 8px; }
.picker .geo-q { flex: 1; }
.geo-results { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.geo-opt { text-align: left; background: var(--panel-2); border: 1px solid var(--line); color: var(--ink);
  padding: 8px 10px; border-radius: 8px; font-size: 13px; cursor: pointer; }
.geo-opt:hover { border-color: var(--acc); }
.geo-coords { font-size: 12px; margin-top: 8px; }
/* keep Leaflet controls/attribution legible on the dark panel */
.picker .leaflet-bar a, .picker .leaflet-control-attribution { color: #1a2238 !important; }
.picker .leaflet-control-attribution { background: rgba(255,255,255,.75); }

.times { margin: 4px 0 16px; padding: 14px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; }
.pt-head { font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.pt-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.pt { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.pt-k { font-size: 11px; color: var(--mut); text-transform: uppercase; letter-spacing: .04em; }
.pt-v { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--gold); }
.err-text { color: var(--danger); }
@media (max-width: 760px) { .pt-grid { grid-template-columns: repeat(3, 1fr); } }

/* ── Preset library: search + reciter groups ──────────────────────────────── */
.preset-tools { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.preset-search { flex: 1; max-width: 420px; }

/* ── Billing: limited-time one-time offer ──────────────────────────────────── */
.offer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
  background: linear-gradient(135deg, rgba(45,212,167,.1), rgba(232,196,119,.08));
  border: 1px solid var(--line-2); border-radius: 14px; padding: 18px 20px; }
.offer-prices { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.o-old { font-size: 20px; color: var(--mut-2); text-decoration: line-through; }
.o-new { font-size: 38px; font-weight: 800; color: var(--gold); letter-spacing: -0.02em; }
.o-save { font-size: 13px; font-weight: 700; color: var(--acc-ink); background: var(--acc); padding: 3px 9px; border-radius: 999px; }
.offer-timer { text-align: right; }
.ot-lbl { display: block; font-size: 12px; color: var(--mut); margin-bottom: 6px; font-weight: 600; }
.cd { display: flex; gap: 8px; }
.cd-cell { display: flex; flex-direction: column; align-items: center; min-width: 46px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 9px; padding: 6px 8px; }
.cd-cell b { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink); line-height: 1.1; }
.cd-cell i { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--mut); font-style: normal; }
.cd-done { color: var(--danger); font-weight: 700; }
@media (max-width: 560px) { .offer { justify-content: center; } .offer-timer { text-align: center; } }
.btable { width: 100%; border-collapse: collapse; }
.btable th { text-align: left; font-size: 12px; color: var(--mut); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.btable td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.btable td.ta-r, .ta-r { text-align: right; }

.price .amt .was { font-size: 20px; color: var(--mut-2); text-decoration: line-through; margin-right: 8px; -webkit-text-fill-color: var(--mut-2); }

/* ── Landing: real product showcase (replaces the fake dashboard mock) ─────── */
.showcase { max-width: 980px; margin: 44px auto 8px; padding: 0 22px; display: flex; gap: 22px;
  align-items: flex-end; justify-content: center; flex-wrap: wrap; }
.shot { margin: 0; border-radius: 18px; overflow: hidden; border: 1px solid #d7dbe6;
  background: radial-gradient(135% 100% at 50% 0%, #ffffff 0%, #e8ebf1 100%);
  box-shadow: 0 2px 0 rgba(255,255,255,.4) inset, 0 42px 70px -38px rgba(0,0,0,.8); }
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption { display: flex; justify-content: space-between; gap: 10px; padding: 11px 15px;
  font-size: 12.5px; color: #4a5168; background: #f2f4f9; border-top: 1px solid #e1e5ee; }
.shot figcaption span:last-child { color: #8089a0; }
.shot-main { flex: 1 1 420px; max-width: 450px; transform: rotate(-1.5deg); }
.shot-side { flex: 1 1 290px; max-width: 320px; transform: rotate(2deg); margin-bottom: 18px; }
@media (max-width: 640px) { .shot-main, .shot-side { transform: none; } }

/* ── Order modal: quantity stepper ────────────────────────────────────────── */
.qty { display: inline-flex; align-items: center; gap: 8px; }
.qty input { width: 72px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.qty .btn.sm { min-width: 38px; font-size: 18px; line-height: 1; padding: 6px 0; }

/* WhatsApp contact line in the order modal */
.wa-line { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; color: var(--acc-2); font-weight: 600; font-size: 14px; }
.wa-line b { color: var(--ink); }
.wa-line svg { flex: 0 0 auto; }
