:root {
  --bg:#0f1115; --panel:#171a21; --panel2:#1d212a; --line:#2a2f3a; --text:#e7e9ee; --muted:#8b93a3;
  --accent:#5b8cff; --accent2:#4673e6; --danger:#ff5d6c; --ok:#3ecf8e; --warn:#f5b94a;
  --ring:rgba(91,140,255,.13);
  --shadow-sm:0 5px 15px rgba(0,0,0,.05);
  --shadow-lg:0 25px 70px rgba(0,0,0,.12);
}
@media (prefers-color-scheme: light) {
  :root { --bg:#f5f6f8; --panel:#fff; --panel2:#f0f2f6; --line:#dde1e8; --text:#1a1d24; --muted:#667085;
          --ring:rgba(70,115,230,.15); --shadow-sm:0 5px 15px rgba(20,30,60,.06); --shadow-lg:0 25px 70px rgba(20,30,60,.12); }
}

* { box-sizing:border-box; }
html { -webkit-text-size-adjust:100%; }
body {
  margin:0; background:var(--bg); color:var(--text);
  font:15px/1.5 system-ui,-apple-system,"Segoe UI",Roboto,"Noto Sans Bengali",sans-serif;
  -webkit-font-smoothing:antialiased;
}
a { color:var(--accent); }
h1 { font-size:1.35rem; margin:0; letter-spacing:-.01em; }
h2 { font-size:1rem; margin:0 0 14px; }
.muted { color:var(--muted); }
.small { font-size:.8rem; }
.hidden { display:none !important; }
.spacer { flex:1; }
.row { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.mt { margin-top:14px; }
.mb { margin-bottom:12px; }
.right { justify-content:flex-end; }

/* ---------- layout ---------- */
.wrap { max-width:1100px; margin:0 auto; padding:24px 16px 64px; }
.card { background:var(--panel); border:1px solid var(--line); border-radius:12px; padding:18px; margin-bottom:18px; }
.page-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:18px; flex-wrap:wrap; }

/* ---------- top navigation ---------- */
.nav { background:var(--panel); border-bottom:1px solid var(--line); position:sticky; top:0; z-index:20; }
.nav-inner { max-width:1100px; margin:0 auto; padding:10px 16px; display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.brand { font-weight:700; font-size:1.05rem; text-decoration:none; color:var(--text); letter-spacing:-.01em; }
.brand span { color:var(--accent); }
.nav-links { margin-left:auto; display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.nav-user { color:var(--muted); font-size:.85rem; max-width:180px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* ---------- forms ---------- */
label { display:block; font-size:.8rem; color:var(--muted); margin-bottom:4px; }
input[type=text], input[type=email], input[type=url], input[type=password], input[type=search], input[type=datetime-local] {
  width:100%; padding:10px 12px; background:var(--panel2); color:var(--text); border:1px solid var(--line);
  border-radius:8px; font:inherit; outline:none;
}
input:focus-visible, button:focus-visible, a:focus-visible, .tab:focus-visible {
  outline:2px solid var(--accent); outline-offset:2px;
}
input:focus { border-color:var(--accent); }
.field { margin-bottom:14px; }
.grid { display:grid; grid-template-columns:2fr 1fr 1fr 1fr; gap:12px; align-items:end; }
@media (max-width:800px) { .grid { grid-template-columns:1fr 1fr; } .grid .wide { grid-column:1/-1; } }
@media (max-width:480px) { .grid { grid-template-columns:1fr; } }
.check { display:flex; align-items:center; gap:8px; }
.check input { width:auto; }
.check label { margin:0; color:var(--text); font-size:.9rem; }
.hint { font-size:.78rem; color:var(--muted); margin-top:4px; }
.search { max-width:280px; }

/* ---------- buttons ---------- */
.btn, button {
  font:inherit; cursor:pointer; border:1px solid var(--line); background:var(--panel2); color:var(--text);
  padding:8px 13px; border-radius:8px; text-decoration:none; display:inline-block; line-height:1.3;
  transition:border-color .2s, background .2s, transform .15s;
}
.btn:hover, button:hover { border-color:var(--accent); }
.btn:active, button:active { transform:translateY(1px); }

/* =====================================
   PREMIUM AUTHENTICATION (Login & Signup)
===================================== */

.auth-body {
  min-height:100vh;
  display:flex; align-items:center; justify-content:center;
  padding:24px;
  background:
    radial-gradient(circle at 10% 15%, rgba(91,140,255,.16), transparent 35%),
    radial-gradient(circle at 90% 85%, rgba(70,115,230,.14), transparent 35%),
    var(--bg);
}

.auth-card {
  width:100%;
  max-width:430px;
  margin:0;
  padding:38px 34px;

  background:var(--panel);
  border:1px solid var(--line);
  border-radius:20px;
  box-shadow:var(--shadow-lg), var(--shadow-sm);

  animation:authAppear .55s cubic-bezier(.2,.7,.3,1);
}

@keyframes authAppear {
  from { opacity:0; transform:translateY(18px) scale(.985); }
  to   { opacity:1; transform:translateY(0)   scale(1); }
}

/* Brand */
.brand-line {
  display:inline-block;
  font-size:1.35rem;
  font-weight:800;
  letter-spacing:-1px;
  margin-bottom:24px;
  color:var(--text);
}
.brand-line span { color:var(--accent); }

/* Heading */
.auth-card h1 { font-size:1.8rem; font-weight:800; letter-spacing:-1px; margin-bottom:10px; }
.auth-card .muted { font-size:.92rem; line-height:1.7; }

/* Fields */
.auth-card .field { margin-bottom:20px; }
.auth-card label { font-size:.85rem; font-weight:600; margin-bottom:8px; color:var(--text); }

.auth-card input {
  width:100%;
  height:49px;
  padding:12px 15px;
  background:var(--panel2);
  color:var(--text);
  border:1px solid var(--line);
  border-radius:10px;
  font-size:.95rem;
  transition:border-color .25s, box-shadow .25s, background .25s;
}
.auth-card input:hover { border-color:var(--accent); }
.auth-card input:focus {
  border-color:var(--accent);
  outline:none;
  box-shadow:0 0 0 4px var(--ring);
}

/* Premium Button */
.auth-card button,
.auth-card .primary {
  width:100%;
  min-height:49px;
  border:none;
  border-radius:10px;
  background:linear-gradient(135deg, var(--accent), var(--accent2));
  color:#fff;
  font-size:.98rem;
  font-weight:700;
  cursor:pointer;
  transition:transform .2s, box-shadow .25s, filter .2s;
  box-shadow:0 7px 18px rgba(70,115,230,.25);
}
.auth-card button:hover {
  transform:translateY(-2px);
  box-shadow:0 10px 25px rgba(70,115,230,.35);
  filter:brightness(1.03);
}
.auth-card button:active { transform:translateY(0); }
.auth-card button:disabled { opacity:.6; cursor:not-allowed; transform:none; }

/* Footer */
.auth-foot { margin-top:25px; text-align:center; font-size:.9rem; }
.auth-foot a { font-weight:700; text-decoration:none; transition:color .2s; }
.auth-foot a:hover { text-decoration:underline; }

/* Notice */
.auth-card .notice {
  padding:12px 14px;
  margin-bottom:18px;
  border-radius:9px;
  font-size:.88rem;
  background:var(--panel2);
  border:1px solid var(--line);
}
.auth-card .notice.error { color:var(--danger); border-color:var(--danger); }
.auth-card .notice.ok    { color:var(--ok);    border-color:var(--ok); }
.auth-card .notice.warn  { color:var(--warn);  border-color:var(--warn); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .auth-card { animation:none; }
  * { transition:none !important; }
}

/* Mobile */
@media (max-width:480px) {
  .auth-body { padding:16px; }
  .auth-card { padding:28px 22px; border-radius:16px; }
  .auth-card h1 { font-size:1.55rem; }
  .brand-line { margin-bottom:20px; }
}