:root {
  --brand: #4f46e5;
  --brand-dark: #3730a3;
  --brand-light: #eef2ff;
  --ink: #1e1b2e;
  --muted: #6b6880;
  --line: #e6e4f0;
  --bg: #f7f7fb;
  --card: #fff;
  --green: #0d8a4f;
  --red: #c0392b;
  --amber: #b7791f;
  --radius: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "Hind Siliguri", system-ui, sans-serif; background: var(--bg); color: var(--ink); line-height: 1.65; font-size: 16px; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--brand); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1 { font-size: clamp(24px, 3.4vw, 34px); line-height: 1.3; }
h2 { font-size: 21px; margin-bottom: 12px; }
h3 { font-size: 17px; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.req { color: var(--red); }
code { font-family: ui-monospace, Consolas, monospace; font-size: 14px; background: var(--brand-light); color: var(--brand-dark); padding: 2px 8px; border-radius: 6px; word-break: break-all; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.main { flex: 1; padding-top: 32px; padding-bottom: 60px; }

/* ---------- Top bar ---------- */
.topbar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; color: var(--ink); }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--brand), #9333ea); }
.topbar nav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.topbar nav a:not(.btn) { color: var(--ink); font-weight: 500; }
.topbar nav a:not(.btn):hover { color: var(--brand); }
.topbar form { display: inline; }
.who { color: var(--muted); font-weight: 600; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-weight: 600; cursor: pointer; color: var(--ink); white-space: nowrap; }
.btn:hover { border-color: var(--brand); color: var(--brand); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 14px; }
.btn-lg { padding: 14px 28px; font-size: 17px; }
.btn.danger { color: var(--red); }
.btn.danger:hover { border-color: var(--red); }
.btn.ok { color: var(--green); border-color: var(--green); }
.btn-block { width: 100%; }
button:disabled { opacity: .55; cursor: wait; }

/* ---------- Cards, alerts, pills ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; background: #fff7e6; border: 1px solid #f3d9a4; }
.alert.success { background: #e9f7ef; border-color: #b5dfc6; color: #0a5c36; }
.alert.error { background: #fdecea; border-color: #f5c2bc; color: #8e2a1f; }
.alert.info { background: var(--brand-light); border-color: #c7d2fe; color: var(--brand-dark); }
.pill { display: inline-block; font-size: 12.5px; font-weight: 600; padding: 2px 11px; border-radius: 99px; white-space: nowrap; }
.pill.green { background: #e9f7ef; color: #0a5c36; }
.pill.gray { background: #eeedf3; color: var(--muted); }
.pill.amber { background: #fff3dc; color: var(--amber); }
.pill.red { background: #fdecea; color: var(--red); }
.pill.blue { background: var(--brand-light); color: var(--brand-dark); }
.empty { text-align: center; color: var(--muted); padding: 26px 0; }

/* ---------- Forms ---------- */
.form label { display: block; font-weight: 600; font-size: 14.5px; margin-bottom: 14px; }
.form input:not([type=checkbox]):not([type=radio]), .form select, .form textarea { display: block; width: 100%; margin-top: 5px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-weight: 400; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79, 70, 229, .15); }
.form small { display: block; font-weight: 400; color: var(--muted); margin-top: 4px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.check { display: flex !important; align-items: center; gap: 8px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
.auth { max-width: 440px; margin: 20px auto; }

/* ---------- Landing ---------- */
.hero { text-align: center; padding: 50px 0 40px; }
.hero h1 { font-size: clamp(30px, 5vw, 48px); max-width: 760px; margin: 0 auto 14px; }
.hero h1 span { background: linear-gradient(90deg, var(--brand), #9333ea); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); font-size: 18px; max-width: 620px; margin: 0 auto 26px; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 10px 0 50px; }
.how { text-align: center; margin: 0; }
.how b { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--brand-light); color: var(--brand); margin: 0 auto 10px; font-size: 18px; }
.how p { color: var(--muted); font-size: 14.5px; }
.demos { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.demo { display: flex; flex-direction: column; padding: 0; overflow: hidden; margin: 0; }
.demo .shot { height: 150px; display: grid; place-items: center; color: #fff; font-size: 22px; font-weight: 700; text-align: center; padding: 16px; }
.demo .body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.demo ul { list-style: none; margin: 12px 0 18px; display: grid; gap: 6px; font-size: 14.5px; }
.demo li::before { content: "✓ "; color: var(--green); font-weight: 700; }
.demo .actions { margin-top: auto; display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Tables ---------- */
.table-card { padding: 0; overflow: hidden; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 13px; color: var(--muted); background: #fbfbfe; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.right { text-align: right; }
.actions-cell { white-space: nowrap; }
.actions-cell form { display: inline; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-grid .card { margin: 0; }
.stat-grid span { color: var(--muted); font-size: 14px; }
.stat-grid strong { display: block; font-size: 28px; color: var(--brand-dark); }
.tabs { display: flex; gap: 4px; margin-bottom: 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tabs a { padding: 9px 16px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--brand); border-color: var(--brand); }

/* ---------- Site page: install progress ---------- */
.ns-box { display: grid; gap: 8px; margin: 12px 0; }
.ns { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border: 1px dashed #c7d2fe; border-radius: 10px; background: var(--brand-light); }
.ns code { background: none; padding: 0; font-size: 16px; font-weight: 600; }
.copy { border: 0; background: #fff; color: var(--brand); border-radius: 8px; padding: 5px 12px; font-weight: 600; cursor: pointer; font-size: 13px; }
.progress-steps { list-style: none; display: grid; gap: 4px; margin: 6px 0 18px; }
.progress-steps li { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--muted); }
.progress-steps li::before { content: ""; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); flex-shrink: 0; display: grid; place-items: center; font-size: 12px; }
.progress-steps li.done { color: var(--ink); }
.progress-steps li.done::before { content: "✓"; background: var(--green); border-color: var(--green); color: #fff; }
.progress-steps li.now { color: var(--brand-dark); background: var(--brand-light); font-weight: 600; }
.progress-steps li.now::before { border-color: var(--brand); border-top-color: transparent; animation: spin 1s linear infinite; }
.progress-steps li.now.paused::before { animation: none; border-color: var(--amber); }
.progress-steps li.bad { color: var(--red); background: #fdecea; }
.progress-steps li.bad::before { content: "!"; border-color: var(--red); color: var(--red); }
@keyframes spin { to { transform: rotate(360deg); } }
.live-box { text-align: center; padding: 10px 0; }
.live-box .big { font-size: 22px; font-weight: 700; color: var(--green); margin-bottom: 6px; }
.live-box .links { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 8px 16px; }
.kv dt { color: var(--muted); }

.footer { border-top: 1px solid var(--line); background: #fff; padding: 18px 0; font-size: 14px; color: var(--muted); }
.footer .wrap { display: flex; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap; }

@media (max-width: 760px) {
  .steps, .stat-grid { grid-template-columns: 1fr 1fr; }
  .row2 { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 8px; }
  .who { display: none; }
  /* ছোট পর্দায় উপরের বার এক লাইনে: নাম ভাঙে না, কম জরুরি লিংক লুকানো */
  .brand { white-space: nowrap; font-size: 17px; gap: 8px; }
  .topbar .wrap { gap: 10px; padding: 0 14px; }
  .topbar nav { flex-wrap: nowrap; gap: 10px; font-size: 14.5px; }
  .topbar nav a[href$="#demos"] { display: none; }
  .topbar nav .btn-sm { padding: 6px 11px; }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { border-bottom: 1px solid var(--line); padding: 10px 14px; }
  .table td { border: 0; padding: 4px 0; }
  .table td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: 12.5px; }
  .right { text-align: left; }
}

/* ---------- Payment ---------- */
.pay-track { list-style: none; display: flex; gap: 8px; margin: 0 0 20px; }
.pay-track li { flex: 1; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--line); color: var(--muted); font-weight: 600; font-size: 14.5px; }
.pay-track b { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #eeedf3; flex-shrink: 0; font-size: 14px; }
.pay-track li.now { border-color: #e2136e; color: var(--ink); box-shadow: 0 0 0 3px rgba(226, 19, 110, .1); }
.pay-track li.now b { background: #e2136e; color: #fff; }
.pay-wrap { display: grid; grid-template-columns: 1.15fr 1fr; gap: 20px; align-items: start; }
.pay-wrap .card { margin: 0 0 20px; }
.pay-lines { display: grid; grid-template-columns: 110px 1fr; gap: 10px 14px; padding-bottom: 16px; border-bottom: 1px dashed var(--line); }
.pay-lines dt { color: var(--muted); }
.pay-lines dd { font-weight: 600; word-break: break-word; }
.pay-incl-title { font-size: 13.5px; color: var(--muted); font-weight: 600; margin: 14px 0 6px; }
.pay-incl { list-style: none; display: grid; gap: 5px; font-size: 14.5px; }
.pay-incl li::before { content: "✓ "; color: var(--green); font-weight: 700; }
.pay-total { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; padding: 14px 16px; border-radius: 12px; background: var(--brand-light); }
.pay-total span { font-weight: 600; color: var(--brand-dark); }
.pay-total strong { font-size: 24px; color: var(--brand-dark); }
.pay-box { text-align: center; border-top: 4px solid #e2136e; box-shadow: 0 14px 34px rgba(30, 27, 46, .08); position: sticky; top: 84px; }
.pay-chip { display: inline-block; font-size: 12.5px; font-weight: 600; padding: 3px 12px; border-radius: 99px; background: #e9f7ef; color: #0a5c36; }
.pay-chip::before { content: "🔒 "; }
.pay-label { color: var(--muted); margin-top: 14px; font-size: 14.5px; }
.pay-amount { font-size: 46px; line-height: 1.2; font-weight: 700; color: var(--ink); margin: 2px 0 18px; }
.btn-bkash { background: #e2136e; border-color: #e2136e; color: #fff; box-shadow: 0 8px 20px rgba(226, 19, 110, .28); }
.btn-bkash:hover { background: #c40f5f; border-color: #c40f5f; color: #fff; }
.bk-mark { background: #fff; color: #e2136e; font-weight: 700; font-size: 13px; padding: 2px 9px; border-radius: 6px; }
.pay-notes { list-style: none; display: grid; gap: 6px; margin-top: 18px; text-align: left; font-size: 13.5px; color: var(--muted); }
.pay-notes li::before { content: "• "; color: #e2136e; font-weight: 700; }
@media (max-width: 760px) {
  .pay-wrap { grid-template-columns: 1fr; }
  .pay-box { position: static; order: -1; }
  .pay-track li span { display: none; }
  .pay-track li.now span { display: inline; }
  .pay-track li { flex: 0 0 auto; padding: 8px 10px; }
  .pay-track li.now { flex: 1; }
}
.demo-price { font-size: 22px; font-weight: 700; color: var(--brand-dark); margin: 2px 0 6px; }
.demo-price small { font-size: 13px; font-weight: 500; color: var(--muted); }

/* ---------- Admin shell ---------- */
body.admin .wrap { max-width: 1320px; }
.adm { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 28px; align-items: start; }
.adm-side { position: sticky; top: 88px; background: #1e1b2e; color: #c9c6dc; border-radius: 18px; padding: 18px 12px; }
.adm-cap { font-size: 12px; letter-spacing: .04em; color: #8f8ba8; font-weight: 600; padding: 0 12px 10px; }
.adm-side nav { display: grid; gap: 4px; }
.adm-side nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 11px; color: #c9c6dc; font-weight: 600; }
.adm-side nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.adm-side nav a.on { background: linear-gradient(135deg, var(--brand), #9333ea); color: #fff; box-shadow: 0 8px 18px rgba(79, 70, 229, .35); }
.adm-side nav svg { flex-shrink: 0; }
.adm-badge { margin-left: auto; min-width: 22px; text-align: center; font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: #f59e0b; color: #1e1b2e; }
.adm-out { display: block; margin-top: 16px; padding: 12px 12px 2px; border-top: 1px solid rgba(255, 255, 255, .1); color: #8f8ba8; font-size: 14px; }
.adm-out:hover { color: #fff; }
.adm-head { margin-bottom: 22px; }
.adm-head h1 { font-size: 28px; }

.stat-grid .stat { display: flex; align-items: center; gap: 14px; padding: 18px 20px; position: relative; overflow: hidden; }
.stat i { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; flex-shrink: 0; font-style: normal; }
.stat i svg { width: 23px; height: 23px; }
.stat span { display: block; line-height: 1.35; }
.stat strong { font-size: 30px; line-height: 1.25; color: var(--ink); }
.stat strong.sm { font-size: 20px; padding-top: 4px; }
.stat::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.stat i { background: var(--cb); color: var(--c); }
.stat.amber { --c: #d97706; --cb: #fff3dc; }
.stat.green { --c: #0d8a4f; --cb: #e9f7ef; }
.stat.red { --c: #c0392b; --cb: #fdecea; }
.stat.blue { --c: #4f46e5; --cb: #eef2ff; }
.stat.pink { --c: #e2136e; --cb: #fde7f1; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chips a { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 99px; background: #fff; border: 1px solid var(--line); color: var(--muted); font-weight: 600; font-size: 14.5px; }
.chips a:hover { border-color: var(--brand); color: var(--brand); }
.chips a b { font-size: 12.5px; min-width: 22px; text-align: center; padding: 0 6px; border-radius: 99px; background: #eeedf3; color: var(--muted); }
.chips a.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.chips a.on b { background: rgba(255, 255, 255, .22); color: #fff; }

.who-cell { display: flex; align-items: center; gap: 12px; }
.avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; background: linear-gradient(135deg, var(--brand), #9333ea); color: #fff; font-weight: 700; }
body.admin .table-card { box-shadow: 0 10px 28px rgba(30, 27, 46, .05); }
body.admin .table th { text-transform: none; letter-spacing: 0; padding: 13px 18px; }
body.admin .table td { padding: 16px 18px; }
body.admin .table tbody tr:hover { background: #fbfbfe; }
body.admin .actions-cell { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; white-space: normal; }
body.admin .actions-cell form { display: flex; }
body.admin .btn.ok { background: var(--green); color: #fff; }
body.admin .btn.ok:hover { background: #0a6f40; border-color: #0a6f40; color: #fff; }

@media (max-width: 1100px) {
  .adm { grid-template-columns: 1fr; gap: 18px; }
  .adm-side { position: static; padding: 8px; border-radius: 14px; }
  .adm-cap, .adm-out { display: none; }
  .adm-side nav { display: flex; overflow-x: auto; }
  .adm-side nav a { white-space: nowrap; padding: 9px 12px; }
  body.admin .stat-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .adm-side nav a span:not(.adm-badge) { font-size: 14px; }
  .stat strong { font-size: 24px; }
  .stat i { width: 38px; height: 38px; }
  body.admin .actions-cell { justify-content: flex-start; }
}
@media (max-width: 1240px) { body.admin .stat-grid { grid-template-columns: 1fr 1fr; } }
body.admin .table-card { overflow-x: auto; }
.nowrap { white-space: nowrap; display: inline-block; }
body.admin td.actions-cell { display: table-cell; white-space: normal; min-width: 150px; }
body.admin .actions-cell form { display: inline-flex; }
body.admin .actions-cell > * { margin: 2px 0 2px 4px; }
body.admin .table td, body.admin .table th { padding-left: 14px; padding-right: 14px; }
.who-cell .small { word-break: break-word; }

/* ---------- Packages ---------- */
.plan-pick { margin-bottom: 16px; }
.plan-title { font-weight: 600; font-size: 14.5px; margin-bottom: 6px; }
.plan-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form .plan-opt { position: relative; display: block; margin: 0; padding: 16px 16px 14px 46px; border: 2px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; }
.plan-opt[hidden] { display: none; }
.plan-opt input { position: absolute; left: 16px; top: 20px; width: 18px; height: 18px; accent-color: var(--brand); }
.plan-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-light); box-shadow: 0 0 0 3px rgba(79, 70, 229, .12); }
.plan-name { display: block; font-weight: 600; }
.plan-save { font-style: normal; font-size: 12px; font-weight: 700; margin-left: 6px; padding: 1px 9px; border-radius: 99px; background: #e9f7ef; color: #0a5c36; }
.plan-price { display: block; font-size: 26px; line-height: 1.3; color: var(--brand-dark); }
.form .plan-opt small { margin-top: 0; }
.demo-price .sep { font-size: 13px; font-weight: 500; color: var(--muted); margin: 0 8px; }
.sub-card { display: flex; justify-content: space-between; align-items: center; gap: 16px 24px; flex-wrap: wrap; border-left: 4px solid var(--green); }
.sub-card.soon { border-left-color: #d97706; }
.sub-card.expired { border-left-color: var(--red); background: #fffafa; }
.sub-card h2 { margin: 8px 0 2px; }
.sub-actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 760px) { .plan-opts { grid-template-columns: 1fr; } }

/* ---------- Package picker & per-site price ---------- */
.plan-opts { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.plan-save { background: var(--brand-light); color: var(--brand-dark); }
.plan-price small { display: inline; font-size: 13.5px; font-weight: 500; color: var(--muted); }
.plan-lines { list-style: none; display: grid; gap: 3px; margin-top: 8px; font-size: 13.5px; font-weight: 400; color: var(--ink); }
.plan-lines li::before { content: "✓ "; color: var(--green); font-weight: 700; }
.sub-switch { position: relative; }
.sub-switch summary { list-style: none; cursor: pointer; }
.sub-switch summary::-webkit-details-marker { display: none; }
.sub-list { position: absolute; right: 0; top: calc(100% + 8px); z-index: 5; min-width: 260px; display: grid; gap: 8px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 34px rgba(30, 27, 46, .14); }
.price-edit { margin-top: 4px; }
.price-edit summary { cursor: pointer; color: var(--brand); }
.price-edit form { display: flex; gap: 6px; margin-top: 6px; }
.price-edit input { width: 96px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; }
@media (max-width: 760px) { .sub-list { position: static; margin-top: 8px; } }
.demo-links { margin: -6px 0 16px; font-size: 14px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.update-card { display: flex; justify-content: space-between; align-items: center; gap: 14px 24px; flex-wrap: wrap; border-left: 4px solid var(--brand); background: var(--brand-light); }
