/* TazkirIQue – no framework, light & dark */
:root {
  --bg: #f6f7fb; --surface: #ffffff; --surface-2: #f0f2f8; --text: #161a2b; --muted: #5d6478; --border: #e1e4ee;
  --brand: #4f46e5; --brand-2: #0ea5a4; --brand-ink: #ffffff; --brand-soft: #eef0ff;
  --ok: #0f9d58; --ok-soft: #e6f6ee; --warn: #b7791f; --warn-soft: #fff6e0; --bad: #d93030; --bad-soft: #fdecec; --info-soft: #e8f3ff;
  --radius: 14px; --shadow: 0 1px 2px rgba(16,24,40,.05), 0 4px 16px rgba(16,24,40,.06);
  --font: "Hind Siliguri", "Noto Sans Bengali", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
[data-theme="dark"] {
  --bg: #0d1020; --surface: #151a2e; --surface-2: #1c2240; --text: #e8eaf4; --muted: #9aa1b8; --border: #2a3152;
  --brand: #818cf8; --brand-2: #2dd4bf; --brand-ink: #0d1020; --brand-soft: #23295a;
  --ok: #34d399; --ok-soft: #12352a; --warn: #fbbf24; --warn-soft: #3a2f10; --bad: #f87171; --bad-soft: #3b1717; --info-soft: #172a45;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); font-size: 16px; line-height: 1.6; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 1.75rem; } h2 { font-size: 1.3rem; } h3 { font-size: 1.08rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); } .small { font-size: .875rem; } .center { text-align: center; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 12px; top: 12px; background: var(--surface); padding: 8px 12px; z-index: 99; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

/* Buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; border: 1px solid transparent; background: var(--brand); color: var(--brand-ink);
  padding: .6em 1.1em; border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none !important; white-space: nowrap; }
.btn:hover { filter: brightness(1.06); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-soft { background: var(--brand-soft); color: var(--brand); }
.btn-danger { background: var(--bad); color: #fff; } .btn-ok { background: var(--ok); color: #fff; }
.btn-sm { padding: .3em .7em; font-size: .875rem; border-radius: 8px; }
.btn-lg { padding: .8em 1.5em; font-size: 1.05rem; }
.btn-block { width: 100%; }
.linkbtn { background: none; border: 0; color: var(--brand); font: inherit; cursor: pointer; padding: 0; }
label { display: block; font-weight: 600; margin-bottom: .3em; font-size: .95rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=search], input[type=tel], select, textarea {
  width: 100%; padding: .65em .8em; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; }
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px var(--brand-soft); }
.field { margin-bottom: 1rem; }
.row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.check { display: flex; gap: .5em; align-items: center; font-weight: 500; }
.hint { font-size: .85rem; color: var(--muted); margin-top: .25em; }
.inline { display: inline; }

/* Cards & layout */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
.card + .card { margin-top: 1rem; }
.card-title { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .8rem; }
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; }
.stat .v { font-size: 1.7rem; font-weight: 700; } .stat .l { color: var(--muted); font-size: .9rem; }
.badge { display: inline-block; padding: .1em .6em; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--surface-2); color: var(--muted); }
.badge-ok { background: var(--ok-soft); color: var(--ok); } .badge-bad { background: var(--bad-soft); color: var(--bad); }
.badge-warn { background: var(--warn-soft); color: var(--warn); } .badge-brand { background: var(--brand-soft); color: var(--brand); }
.alert { padding: .8em 1em; border-radius: 10px; margin-bottom: 1rem; border: 1px solid transparent; }
.alert-success { background: var(--ok-soft); color: var(--ok); } .alert-error { background: var(--bad-soft); color: var(--bad); }
.alert-info { background: var(--info-soft); color: var(--text); } .alert-warn { background: var(--warn-soft); color: var(--warn); }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: .6em .7em; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 600; }
tr:hover td { background: var(--surface-2); }
.actions { display: flex; gap: .4rem; flex-wrap: wrap; }

/* Tabs & pagination */
.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; overflow-x: auto; }
.tabs a { padding: .55em .9em; color: var(--muted); border-bottom: 2px solid transparent; font-weight: 600; white-space: nowrap; }
.tabs a.on { color: var(--brand); border-color: var(--brand); text-decoration: none; }
.pager { display: flex; gap: .5rem; justify-content: center; align-items: center; margin-top: 1rem; }

/* Public header/footer */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 1rem; }
.logo { display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: 1.2rem; color: var(--text); text-decoration: none !important; }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); display: grid; place-items: center; color: #fff; font-size: 1rem; }
.logo b { color: var(--brand); }
.nav { display: flex; gap: .4rem; align-items: center; }
.nav a.navlink { color: var(--muted); padding: .4em .7em; font-weight: 500; }
.site-footer { border-top: 1px solid var(--border); padding: 2rem 0; margin-top: 3rem; color: var(--muted); font-size: .9rem; }
.site-footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }

/* Landing */
.hero { padding: 4.5rem 0 3rem; text-align: center; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: .4em; }
.hero h1 span { background: linear-gradient(90deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 680px; margin: 0 auto 1.6rem; }
.hero .cta { display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; }
.pill { display: inline-block; background: var(--brand-soft); color: var(--brand); padding: .25em .8em; border-radius: 999px; font-weight: 600; font-size: .85rem; margin-bottom: 1rem; }
.chat-demo { max-width: 460px; margin: 2.5rem auto 0; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 1rem; box-shadow: var(--shadow); }
.bubble { padding: .6em .9em; border-radius: 14px; margin: .45rem 0; max-width: 85%; white-space: pre-line; font-size: .95rem; }
.bubble.me { background: var(--brand); color: var(--brand-ink); margin-left: auto; border-bottom-right-radius: 4px; }
.bubble.bot { background: var(--surface-2); border-bottom-left-radius: 4px; }
.section { padding: 3rem 0; }
.section h2 { text-align: center; font-size: 1.8rem; }
.section .sub { text-align: center; color: var(--muted); max-width: 640px; margin: 0 auto 2rem; }
.feature .icon { font-size: 1.6rem; width: 48px; height: 48px; display: grid; place-items: center; background: var(--brand-soft); border-radius: 12px; margin-bottom: .7rem; }
.price { text-align: center; }
.price .amt { font-size: 2.2rem; font-weight: 700; margin: .3rem 0; }
.price.featured { border: 2px solid var(--brand); }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; position: relative; padding-left: 2.6rem; margin-bottom: 1rem; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: .8rem 1rem; margin-bottom: .6rem; }
.faq summary { cursor: pointer; font-weight: 600; }
.auth-box { max-width: 440px; margin: 3rem auto; }

/* App shell */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar { background: var(--surface); border-right: 1px solid var(--border); padding: 1rem; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: .3rem; }
.sidebar .logo { margin: .3rem .4rem 1.2rem; }
.sidebar a.item { display: flex; gap: .6rem; align-items: center; padding: .55em .8em; border-radius: 10px; color: var(--text); font-weight: 500; text-decoration: none; }
.sidebar a.item:hover { background: var(--surface-2); }
.sidebar a.item.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.sidebar .count { margin-left: auto; background: var(--bad); color: #fff; border-radius: 999px; font-size: .75rem; padding: 0 .5em; }
.sidebar .bottom { margin-top: auto; border-top: 1px solid var(--border); padding-top: .8rem; }
.main { padding: 1.5rem 2rem 3rem; min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.3rem; flex-wrap: wrap; }
.topbar h1 { margin: 0; font-size: 1.5rem; }
.bell { position: relative; }
.bell .dot { position: absolute; top: -4px; right: -4px; background: var(--bad); color: #fff; border-radius: 999px; font-size: .7rem; padding: 0 .45em; }
.notif-panel { position: absolute; right: 0; top: 110%; width: 320px; max-height: 400px; overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); z-index: 50; display: none; }
.notif-panel.open { display: block; }
.notif-panel .n { padding: .7rem .9rem; border-bottom: 1px solid var(--border); font-size: .9rem; }
.notif-panel .n.unread { background: var(--brand-soft); }
.mobile-nav { display: none; }

.quick { display: flex; gap: .6rem; }
.quick input { font-size: 1.05rem; padding: .8em 1em; }
.rem { display: flex; gap: .9rem; align-items: flex-start; padding: .9rem 0; border-bottom: 1px solid var(--border); }
.rem:last-child { border-bottom: 0; }
.rem .when { min-width: 120px; font-size: .88rem; color: var(--muted); }
.rem .body { flex: 1; min-width: 0; }
.rem .title { font-weight: 600; word-wrap: break-word; }
.rem.high .title::before { content: "❗ "; }
.rem.overdue .when { color: var(--bad); }
.sub-banner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.code-box { background: var(--surface-2); border: 1px dashed var(--border); border-radius: 10px; padding: 1rem; font-family: ui-monospace, Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-all; }
.big-code { font-size: 1.8rem; letter-spacing: .2em; font-weight: 700; text-align: center; padding: .6rem; background: var(--surface-2); border-radius: 12px; }
.files { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.file { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.file .thumb { height: 130px; background: var(--surface-2); display: grid; place-items: center; font-size: 2.5rem; overflow: hidden; }
.file .thumb img { width: 100%; height: 100%; object-fit: cover; }
.file .meta { padding: .7rem .8rem; flex: 1; }
.file .meta .t { font-weight: 600; word-break: break-word; }
.file .acts { display: flex; gap: .4rem; padding: 0 .8rem .8rem; flex-wrap: wrap; }
.pay-methods { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.pay-methods label { border: 2px solid var(--border); border-radius: 12px; padding: .8rem; cursor: pointer; display: flex; gap: .5rem; align-items: center; font-weight: 600; }
.pay-methods input { accent-color: var(--brand); }
.pay-methods label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.plan-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: .6rem; }
.plan-pick label { border: 2px solid var(--border); border-radius: 12px; padding: .7rem; text-align: center; cursor: pointer; font-weight: 600; }
.plan-pick label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.plan-pick input { position: absolute; opacity: 0; pointer-events: none; }
.plan-pick .p { display: block; font-size: 1.3rem; color: var(--brand); }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: .4rem 1rem; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; word-break: break-word; }
pre.json { background: var(--surface-2); padding: 1rem; border-radius: 10px; overflow: auto; font-size: .85rem; }

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main { padding: 1rem 1rem 5.5rem; }
  .mobile-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: var(--surface); border-top: 1px solid var(--border); z-index: 40; justify-content: space-around; padding: .4rem 0 calc(.4rem + env(safe-area-inset-bottom)); }
  .mobile-nav a { display: flex; flex-direction: column; align-items: center; font-size: .72rem; color: var(--muted); text-decoration: none; padding: .2rem .5rem; }
  .mobile-nav a.on { color: var(--brand); }
  .mobile-nav a span { font-size: 1.25rem; }
  .rem { flex-wrap: wrap; } .rem .when { min-width: 0; width: 100%; }
  .nav a.navlink { display: none; }
  .quick { flex-direction: column; }
  .kv { grid-template-columns: 1fr; }
  .kv dt { margin-top: .4rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Meeting recorder */
.rec-timer { font-size: 2.6rem; font-weight: 700; text-align: center; margin: .4rem 0 .8rem; letter-spacing: .05em; }
.recorder.recording .rec-timer { color: var(--bad); }
.recorder.recording #rec-btn { background: var(--bad); color: #fff; }
.recorder.recording .rec-timer::before { content: "● "; animation: blink 1s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }
