/* DUKAN DARI — Look A theme: soft lavender bg, white extra-rounded cards, coral accents */
:root {
  --bg: #E9E6F7;
  --card: #ffffff;
  --accent: #FF6B4A;
  --accent-dark: #E5533A;
  --ink: #2B2440;
  --muted: #8A84A6;
  --radius: 22px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
/* Watermark removed 2026-10-13 */
main { flex: 1; position: relative; z-index: 1; width: 100%; max-width: 480px; margin: 0 auto; padding: 20px 16px 32px; }
.center { text-align: center; }
.logo { width: 120px; height: 120px; object-fit: contain; border-radius: 28px; background: #fff; padding: 8px; box-shadow: 0 6px 20px rgba(43,36,64,.12); }
.logo-sm { width: 44px; height: 44px; object-fit: contain; border-radius: 14px; background: #fff; }
h1.brand { font-size: 34px; letter-spacing: 2px; margin: 14px 0 4px; }
.tagline { color: var(--muted); font-size: 15px; margin: 0 0 24px; }
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 8px 24px rgba(43,36,64,.10);
  margin-bottom: 16px;
}
.card h2 { margin: 0 0 14px; font-size: 20px; }
label { display: block; font-size: 14px; font-weight: 600; margin: 12px 0 6px; }
input[type=text], input[type=password], input[type=tel], input[type=email] {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  border: 2px solid #E3E0F2;
  border-radius: 16px;
  background: #FBFAFF;
  color: var(--ink);
}
input:focus { outline: none; border-color: var(--accent); }
.btn {
  display: block;
  width: 100%;
  padding: 15px;
  margin-top: 18px;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(255,107,74,.35);
}
.btn:active { background: var(--accent-dark); transform: scale(.99); }
.btn-outline {
  background: #fff; color: var(--accent);
  border: 2px solid var(--accent);
  box-shadow: none;
}
.link { display: block; text-align: center; margin-top: 14px; color: var(--accent); font-weight: 600; text-decoration: none; }
.error {
  display: none;
  background: #FDECEA;
  color: #B3261E;
  border-radius: 14px;
  padding: 12px 14px;
  margin-top: 14px;
  font-size: 14px;
}
.ok-msg {
  display: none;
  background: #E7F6EC;
  color: #1B7A3D;
  border-radius: 14px;
  padding: 12px 14px;
  margin-top: 14px;
  font-size: 14px;
}
.hint { font-size: 13px; color: var(--muted); margin-top: 8px; }
header.topbar {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(6px);
  padding: 10px 16px;
  border-bottom: 1px solid #E3E0F2;
}
header.topbar .spacer { flex: 1; }
header.topbar .who { font-size: 13px; color: var(--muted); }
.btn-logout {
  width: auto; margin: 0; padding: 9px 18px; font-size: 14px;
}
footer.app-footer {
  position: relative; z-index: 1;
  text-align: center;
  padding: 18px 12px 26px;
  color: var(--ink);
}
footer.app-footer .f-brand { font-weight: 800; letter-spacing: 3px; font-size: 15px; }
footer.app-footer .f-tag { color: var(--muted); font-size: 13px; margin-top: 4px; }
.back-row { margin-bottom: 12px; }
.back-btn {
  display: inline-block; text-decoration: none; color: var(--ink);
  background: #fff; border-radius: 999px; padding: 8px 16px;
  font-weight: 700; box-shadow: 0 4px 12px rgba(43,36,64,.08);
}

/* Phase 2 — nav cards, tables, forms */
.nav-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.nav-card {
  background: #fff; border-radius: var(--radius); padding: 22px 12px;
  text-align: center; text-decoration: none; color: var(--ink); font-weight: 700;
  box-shadow: 0 8px 24px rgba(43,36,64,.10);
}
.nav-card:active { transform: scale(.97); }
.nav-card.voice-card {
  background: linear-gradient(135deg, #FF8A5C, #FF6B3D);
  color: #fff;
  box-shadow: 0 8px 24px rgba(255,107,61,.35);
}
/* Referral section */
.ref-box {
  background: #F7F4FF; border: 1px dashed #B9A8E8; border-radius: var(--radius);
  padding: 14px 16px; margin: 12px 0; line-height: 2;
}
.ref-box .lbl { color: #6B5B8E; font-size: 14px; }
.ref-code {
  background: #fff; border: 1px solid #D9CFF5; border-radius: 8px;
  padding: 4px 12px; font-size: 18px; letter-spacing: 1px; color: #4A2F8F;
}
.points-line strong { font-size: 22px; color: #2E7D32; }
.btn-sm { padding: 6px 12px; font-size: 13px; margin-left: 8px; }
.nav-ico { font-size: 34px; margin-bottom: 8px; }
.trial-badge {
  display: inline-block; background: #FFF1EC; color: var(--accent-dark);
  border: 1px solid #FFD9CE; border-radius: 999px; padding: 6px 14px;
  font-size: 13px; font-weight: 700; margin-top: 6px;
}
select, input[type=number], input[type=date] {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  border: 2px solid #E3E0F2;
  border-radius: 16px;
  background: #FBFAFF;
  color: var(--ink);
}
select:focus, input[type=number]:focus, input[type=date]:focus { outline: none; border-color: var(--accent); }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; min-width: 0; }
.btn-sm { width: auto; display: inline-block; margin: 0 6px 0 0; padding: 8px 16px; font-size: 14px; }
.btn-danger { background: #fff; color: #B3261E; border: 2px solid #B3261E; box-shadow: none; }
.btn-ghost { background: #F1EFFA; color: var(--ink); box-shadow: none; }
.tbl-wrap { overflow-x: auto; margin: 0 -4px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { text-align: left; padding: 10px 8px; border-bottom: 1px solid #EDEBF7; white-space: nowrap; }
.tbl th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
.tbl .num { text-align: right; }
.pills { display: flex; gap: 10px; margin-top: 6px; }
.pill {
  flex: 1; text-align: center; padding: 12px 6px; border-radius: 16px;
  border: 2px solid #E3E0F2; background: #fff; font-weight: 700; cursor: pointer; font-size: 14px;
}
.pill.active { border-color: var(--accent); background: #FFF1EC; color: var(--accent-dark); }
.rec-row { display: flex; align-items: center; gap: 8px; padding: 10px 4px; border-bottom: 1px solid #EDEBF7; }
.rec-row .grow { flex: 1; min-width: 0; }
.rec-row .t1 { font-weight: 700; }
.rec-row .t2 { font-size: 12px; color: var(--muted); }
.icon-btn { border: none; background: #F1EFFA; border-radius: 12px; padding: 8px 12px; font-size: 13px; font-weight: 700; color: var(--ink); cursor: pointer; }
.icon-btn.del { background: #FDECEA; color: #B3261E; }
.total-line { display: flex; justify-content: space-between; font-weight: 800; font-size: 18px; padding: 12px 4px 0; }
.empty { text-align: center; color: var(--muted); padding: 18px 0; font-size: 14px; }

/* Phase 4 — subscription banner, badges, admin */
.sub-banner {
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
  font-size: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(43,36,64,.10);
}
.sub-banner.warn { background: #FFF6E9; border: 2px solid #F5B942; color: #8A5A00; }
.sub-banner.bad { background: #FDECEA; border: 2px solid #E5484D; color: #B3261E; }
.sub-banner a { font-weight: 700; color: inherit; }
.badge {
  display: inline-block; padding: 5px 14px; border-radius: 999px;
  font-size: 12px; font-weight: 800; letter-spacing: .5px;
}
.badge-trial { background: #EDE9FB; color: #5B4B9E; }
.badge-ok { background: #E7F6EC; color: #1B7A3D; }
.badge-bad { background: #FDECEA; color: #B3261E; }
.badge-warn { background: #FFF6E9; color: #8A5A00; }
.kv {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 9px 2px; border-bottom: 1px solid #EDEBF7; font-size: 14px;
}
.kv .k { color: var(--muted); flex-shrink: 0; }
.kv .v { font-weight: 700; text-align: right; word-break: break-word; }
.acct {
  border: 2px solid #E3E0F2; border-radius: 16px;
  padding: 14px; margin-top: 12px; background: #FBFAFF;
}
.acct .m { font-weight: 800; font-size: 16px; }
.acct .n {
  font-size: 18px; font-weight: 800; letter-spacing: 1px;
  margin: 6px 0; color: var(--accent-dark); word-break: break-all;
}
.pwd-box {
  background: #FFF6E9; border: 2px dashed #F5B942;
  border-radius: 16px; padding: 16px; margin-top: 14px; text-align: center;
}
.pwd-box .pw { font-size: 26px; font-weight: 800; letter-spacing: 2px; margin: 10px 0; word-break: break-all; }
.shot { width: 100%; border-radius: 16px; border: 2px solid #E3E0F2; margin-top: 10px; }
.req-card { border: 2px solid #E3E0F2; border-radius: 18px; padding: 14px; margin-top: 12px; background: #fff; }
.req-card .t1 { font-weight: 800; font-size: 16px; }
.req-card .t2 { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.stat { background: #F6F4FD; border-radius: 14px; padding: 10px 6px; text-align: center; }
.stat .n { font-size: 18px; font-weight: 800; }
.stat .l { font-size: 11px; color: var(--muted); margin-top: 2px; }
input[type=file] {
  width: 100%; padding: 12px; font-size: 14px;
  border: 2px dashed #C9C3E8; border-radius: 16px;
  background: #FBFAFF; color: var(--ink);
}

/* Phase 5 — AI Assistant chat */
.chat-box {
  display: flex; flex-direction: column; gap: 10px;
  min-height: 45vh; padding-bottom: 6px;
}
.bubble {
  max-width: 84%; padding: 12px 15px; border-radius: 18px;
  font-size: 15px; line-height: 1.45; word-break: break-word;
}
.bubble.user {
  align-self: flex-end; background: var(--accent); color: #fff;
  border-bottom-right-radius: 6px;
  box-shadow: 0 4px 12px rgba(255,107,74,.30);
}
.bubble.bot {
  align-self: flex-start; background: #fff;
  border-bottom-left-radius: 6px;
  box-shadow: 0 4px 12px rgba(43,36,64,.08);
}
.bubble.dots::after { content: "…"; animation: blink 1s infinite; }
@keyframes blink { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
.draft-card {
  border: 2px solid var(--accent); border-radius: var(--radius);
  background: #fff; padding: 16px; margin: 12px 0;
  box-shadow: 0 8px 24px rgba(255,107,74,.18);
}
.draft-card h3 { margin: 0 0 8px; color: var(--accent-dark); font-size: 17px; }
.draft-party { font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.draft-total {
  display: flex; justify-content: space-between;
  font-weight: 800; font-size: 18px; margin: 10px 0 14px;
}
.btn-grey { background: #F1EFFA; color: var(--ink); box-shadow: none; }
.input-bar {
  position: sticky; bottom: 0; z-index: 2;
  display: flex; gap: 8px; align-items: center;
  background: rgba(255,255,255,.95); backdrop-filter: blur(6px);
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid #E3E0F2;
  width: 100%; max-width: 480px; margin: 0 auto;
}
.input-bar input[type=text] { flex: 1; min-width: 0; border-radius: 999px; padding: 12px 16px; }
.chat-btn {
  width: 46px; height: 46px; flex-shrink: 0;
  border-radius: 999px; border: none; font-size: 20px; cursor: pointer;
  background: #fff; box-shadow: 0 4px 12px rgba(43,36,64,.10);
}
.chat-btn.send-btn {
  background: var(--accent); color: #fff;
  box-shadow: 0 6px 16px rgba(255,107,74,.35);
}
.chat-btn.rec { background: #B3261E; color: #fff; animation: blink 1s infinite; }
.hidden-file { display: none; }
.rec-hint {
  display: none; position: fixed; z-index: 5;
  left: 50%; bottom: 96px; transform: translateX(-50%);
  background: #B3261E; color: #fff; font-weight: 700; font-size: 14px;
  padding: 10px 18px; border-radius: 999px;
  box-shadow: 0 8px 24px rgba(179,38,30,.4);
  max-width: 92vw; text-align: center;
}
.rec-hint.show { display: block; }
.toast {
  display: none; position: fixed; z-index: 5;
  left: 50%; bottom: 96px; transform: translateX(-50%);
  background: #1B7A3D; color: #fff; font-weight: 700; font-size: 15px;
  padding: 12px 22px; border-radius: 999px;
  box-shadow: 0 8px 24px rgba(27,122,61,.4);
  max-width: 92vw; text-align: center;
}
.toast.show { display: block; }

/* ===== GLOBAL DARK PREMIUM THEME (poster style) — 2026-10-13 ===== */
body { background: linear-gradient(180deg,#0d1230 0%,#1a1a2e 60%,#141428 100%) !important; color: #fff !important; }
.topbar { background: rgba(13,18,48,.95) !important; border-bottom: 1px solid rgba(255,215,0,.2) !important; }
.topbar strong, .topbar .who, .topbar .brand { color: #fff !important; }
.card { background: rgba(255,255,255,.06) !important; border: 1px solid rgba(255,215,0,.15) !important; color: #fff !important; }
.card h2, .card h3 { color: #FFD700 !important; }
.hint { color: rgba(255,255,255,.65) !important; }
label { color: rgba(255,255,255,.85) !important; }
input, select, textarea { background: rgba(255,255,255,.08) !important; border: 1px solid rgba(255,215,0,.25) !important; color: #fff !important; }
input::placeholder, textarea::placeholder { color: rgba(255,255,255,.4) !important; }
input:focus, select:focus, textarea:focus { border-color: #FFD700 !important; box-shadow: 0 0 0 3px rgba(255,215,0,.15) !important; outline: none; }
select option { background: #1a1a2e; color: #fff; }
.tbl { color: #fff !important; }
.tbl thead th { background: rgba(255,215,0,.1) !important; color: #FFD700 !important; }
.tbl tbody tr { border-bottom: 1px solid rgba(255,255,255,.08) !important; }
.tbl tbody tr:hover { background: rgba(255,255,255,.05) !important; }
.tbl td { color: rgba(255,255,255,.9) !important; }
.app-footer { color: rgba(255,255,255,.5) !important; }
.app-footer .f-brand { color: #FFD700 !important; }
.btn { background: linear-gradient(135deg,#FF6B4A,#FF8A5C) !important; transition: all .3s !important; position: relative; overflow: hidden; }
.btn:hover { transform: translateY(-2px) !important; box-shadow: 0 8px 24px rgba(255,107,74,.45) !important; }
.btn-outline, .btn.btn-outline { background: transparent !important; border: 2px solid #FFD700 !important; color: #FFD700 !important; }
.btn-sm { background: linear-gradient(135deg,#FF6B4A,#FF8A5C) !important; }
.badge, .trial-badge { background: rgba(255,215,0,.15) !important; color: #FFD700 !important; border: 1px solid rgba(255,215,0,.3) !important; }
.badge-ok { background: rgba(62,207,142,.15) !important; color: #3ECF8E !important; border-color: rgba(62,207,142,.4) !important; }
.badge-warn { background: rgba(255,215,0,.15) !important; color: #FFD700 !important; }
.badge-bad { background: rgba(255,80,80,.15) !important; color: #FF8080 !important; border-color: rgba(255,80,80,.4) !important; }
.nav-card { background: rgba(255,255,255,.06) !important; border: 1px solid rgba(255,215,0,.15) !important; color: #fff !important; transition: all .3s !important; }
.nav-card:hover { transform: translateY(-4px) !important; border-color: #FFD700 !important; box-shadow: 0 12px 28px rgba(255,215,0,.2) !important; }
.stat { background: rgba(255,255,255,.06) !important; border: 1px solid rgba(255,215,0,.15) !important; }
.stat .n { color: #FFD700 !important; }
.stat .l { color: rgba(255,255,255,.65) !important; }
.pills .pill, span.pill { background: rgba(255,255,255,.08) !important; color: #FFD700 !important; border: 1px solid rgba(255,215,0,.25) !important; }
.empty { color: rgba(255,255,255,.5) !important; }
.error { background: rgba(255,80,80,.12) !important; border: 1px solid rgba(255,80,80,.3) !important; color: #FF9999 !important; }
.ok-msg { background: rgba(62,207,142,.12) !important; border: 1px solid rgba(62,207,142,.3) !important; color: #7BE8B0 !important; }
a.link, .link { color: #FFD700 !important; }
.sub-banner { background: rgba(255,215,0,.1) !important; border: 1px solid rgba(255,215,0,.3) !important; color: #FFD700 !important; }
.ref-code { color: #FFD700 !important; }
.ref-box { background: rgba(255,255,255,.05) !important; border: 1px solid rgba(255,215,0,.2) !important; }

/* ===== POSTER-STYLE INNER PAGES (laptop screen jaisa) — 2026-10-13 ===== */
.stat-row { display: flex; gap: 14px; flex-wrap: wrap; margin: 16px 0; }
.stat { flex: 1; min-width: 140px; background: linear-gradient(135deg, rgba(255,255,255,.09), rgba(255,255,255,.04)) !important; border: 1px solid rgba(255,215,0,.2) !important; border-radius: 18px !important; padding: 18px 14px !important; text-align: center; transition: all .3s !important; }
.stat:hover { transform: translateY(-4px) !important; border-color: #FFD700 !important; box-shadow: 0 12px 30px rgba(255,215,0,.18) !important; }
.stat .n { font-size: 1.7rem !important; font-weight: 900 !important; color: #FFD700 !important; }
.stat .l { font-size: .82rem !important; color: rgba(255,255,255,.65) !important; margin-top: 4px; }
.tbl-wrap { border-radius: 16px; overflow: hidden; border: 1px solid rgba(255,215,0,.15); }
.page-title { color: #FFD700 !important; font-size: 1.5rem; margin-bottom: 4px; }
.card { border-radius: 20px !important; box-shadow: 0 8px 30px rgba(0,0,0,.25) !important; }
h2 { color: #FFD700 !important; }
.back-btn { color: #FFD700 !important; }
.search-box input { border-radius: 14px !important; }
.action-row .btn { border-radius: 12px !important; }

/* ===== PAYMENT CARDS FIX ===== */
.acct { background: rgba(255,255,255,.07) !important; border: 2px solid rgba(255,215,0,.25) !important; }
.acct .m { color: #FFD700 !important; }
.acct .n { color: #FF6B4A !important; }
.acct .hint { color: rgba(255,255,255,.7) !important; }

/* ===== AI ASSISTANT DARK FIX ===== */
.bubble.bot { background: rgba(255,255,255,.09) !important; color: #fff !important; border: 1px solid rgba(255,215,0,.2) !important; }
.bubble.user { background: linear-gradient(135deg,#FF6B4A,#FF8A5C) !important; }
.draft-card { background: rgba(255,255,255,.07) !important; border: 2px solid #FFD700 !important; color: #fff !important; }
.draft-card h3 { color: #FFD700 !important; }
.draft-party { color: rgba(255,255,255,.7) !important; }
.draft-total { color: #FFD700 !important; }
.btn-grey { background: rgba(255,255,255,.12) !important; color: #fff !important; }
.input-bar { background: rgba(13,18,48,.95) !important; border-top: 1px solid rgba(255,215,0,.2) !important; padding: 12px !important; }
.chat-box { background: transparent !important; }

/* ===== CHATBOT-STYLE POLISH ===== */
.chat-box { padding: 16px 12px !important; }
.bubble { animation: bubbleIn .25s ease-out; }
@keyframes bubbleIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.bubble.bot { border-bottom-left-radius: 6px !important; }
.bubble.user { border-bottom-right-radius: 6px !important; }
.input-bar { border-radius: 20px 20px 0 0 !important; }
.chat-btn { width: 44px; height: 44px; border-radius: 50% !important; font-size: 20px; transition: all .25s !important; }
.chat-btn:hover { transform: scale(1.1) !important; }
.chat-btn.send-btn { background: linear-gradient(135deg,#FF6B4A,#FF8A5C) !important; box-shadow: 0 4px 14px rgba(255,107,74,.4) !important; }
#chatInput { border-radius: 24px !important; padding: 12px 18px !important; font-size: 15px !important; }
