/* =====================================================================
   Poriborton.in — Static frontend styles
   Clean, minimal, government-portal-but-friendly. WCAG-AA friendly.
   ===================================================================== */
:root {
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --primary: #1D4ED8;
  --primary-hover: #1E40AF;
  --accent: #C2410C;
  --accent-hover: #9A3412;
  --text: #0F172A;
  --muted: #475569;
  --border: #E2E8F0;
  --soft: #F1F5F9;
  --success: #15803D;
  --warn: #B45309;
  --error: #B91C1C;
  --radius: 12px;
  --shadow: 0 6px 22px -8px rgba(15, 23, 42, .12);
  --hero-h: 280px;          /* compact hero height per user request */
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); }
body { font-family: 'Public Sans', system-ui, -apple-system, Segoe UI, sans-serif; line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1,h2,h3,h4 { font-family: 'Outfit', system-ui, sans-serif; letter-spacing: -.01em; margin: 0 0 .5rem; color: var(--text); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--primary); color: #fff; padding: .6rem 1rem; z-index: 9999; border-radius: 0 0 6px 0; }
.skip-link:focus { left: 0; }
[lang="bn"], .bn-font { font-family: 'Hind Siliguri','Public Sans',sans-serif; }
::selection { background: var(--accent); color: #fff; }

/* ---------- Layout ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.grid-3 { display: grid; grid-template-columns: 240px 1fr 280px; gap: 1.5rem; }
@media (max-width: 1023px) { .grid-3 { grid-template-columns: 1fr; } .grid-3 > aside { display: none; } .grid-3 > .feed-col { order: 1; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.95);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-row { display: flex; align-items: center; gap: 1rem; height: 64px; }
.brand { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.brand .logo {
  width: 36px; height: 36px; border-radius: 10px; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: grid; place-items: center; font-family: 'Outfit'; font-weight: 700;
}
.brand-text .title { font-family: 'Outfit'; font-weight: 700; font-size: 18px; line-height: 1; }
.brand-text .sub   { font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
nav.main-nav { display: flex; align-items: center; gap: .25rem; margin-left: .5rem; }
nav.main-nav a {
  padding: .5rem .75rem; border-radius: 8px;
  font-size: 14px; font-weight: 500; color: #1f2937;
}
nav.main-nav a:hover { background: var(--soft); text-decoration: none; }
nav.main-nav a.active { color: var(--primary); background: rgba(29,78,216,.08); }
.search-box { position: relative; flex: 1; max-width: 360px; }
.search-box input { width: 100%; padding: .55rem .75rem .55rem 2.1rem; border: 1px solid var(--border); border-radius: 10px; font-size: 14px; background: #fff; }
.search-box .icon { position: absolute; left: .65rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.btn-mobile-menu { display: none; }
@media (max-width: 900px) {
  nav.main-nav, .search-box { display: none; }
  .btn-mobile-menu { display: inline-flex; }
}
.mobile-drawer { display: none; padding: 1rem 0; border-top: 1px solid var(--border); }
.mobile-drawer.open { display: block; }
.mobile-drawer a { display: block; padding: .65rem .75rem; border-radius: 8px; font-weight: 500; }
.mobile-drawer a:hover { background: var(--soft); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .55rem 1rem; border-radius: 10px; border: 1px solid transparent;
  font-weight: 600; font-size: 14px; cursor: pointer; transition: background-color .15s ease, transform .1s ease, border-color .15s ease;
  min-height: 40px;
  text-decoration: none;
}
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-accent  { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-hover); }
.btn-outline { background: #fff; color: var(--text); border-color: var(--border); }
.btn-outline:hover { background: var(--soft); }
.btn-ghost   { background: transparent; color: var(--text); }
.btn-ghost:hover { background: var(--soft); }
.btn-sm { padding: .35rem .65rem; min-height: 32px; font-size: 13px; }
.btn-icon { width: 38px; padding: 0; }

/* ---------- Hero (compact) ---------- */
.hero {
  position: relative; min-height: var(--hero-h);
  background-image: linear-gradient(rgba(15,23,42,.78), rgba(29,78,216,.45)),
    url('https://static.prod-images.emergentagent.com/jobs/1e1e6c80-c852-48d7-9ef5-a7b199df1a21/images/f2133ad20e6fa1663f0e82631331f6794cb5920673530ebf6f390b69c7e8e58b.png');
  background-size: cover; background-position: center;
  color: #fff;
  border-bottom: 1px solid var(--border);
}
.hero-inner { padding: 2rem 0; display: flex; align-items: center; min-height: var(--hero-h); }
.hero h1 { color: #fff; font-size: clamp(1.5rem, 3vw, 2.25rem); margin: 0 0 .5rem; line-height: 1.15; max-width: 720px; }
.hero p  { color: rgba(255,255,255,.88); margin: 0 0 1rem; max-width: 580px; font-size: 1rem; }
.hero .badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(255,255,255,.12); padding: .25rem .65rem; border-radius: 999px;
  font-size: 11px; text-transform: uppercase; letter-spacing: .15em; font-weight: 600;
  margin-bottom: .65rem;
}
.hero .badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.hero .cta-row { display: flex; gap: .65rem; flex-wrap: wrap; }
.hero .stats { display: flex; gap: .75rem; margin-top: 1rem; flex-wrap: wrap; }
.hero .stat {
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15);
  border-radius: 10px; padding: .5rem .85rem; min-width: 100px;
}
.hero .stat.accent { background: rgba(194,65,12,.18); border-color: rgba(194,65,12,.5); }
.hero .stat .num { font-family: 'Outfit'; font-weight: 700; font-size: 1.25rem; }
.hero .stat .lbl { font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: rgba(255,255,255,.8); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem;
}
.card.hover:hover { box-shadow: var(--shadow); transition: box-shadow .2s ease; }
.card h3 { font-size: 1rem; margin: 0 0 .25rem; }

.sidebar { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 1rem; }
.side-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.side-card h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 0 0 .5rem; display: flex; align-items: center; gap: .4rem; }
.side-card .item { display: block; padding: .55rem 0; border-bottom: 1px solid var(--border); }
.side-card .item:last-child { border-bottom: none; }
.side-card .item .t { font-size: 14px; font-weight: 500; color: var(--text); }
.side-card .item .m { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---------- Filter list ---------- */
.filter-list { list-style: none; padding: 0; margin: 0; }
.filter-list button {
  display: block; width: 100%; text-align: left; padding: .5rem .75rem;
  border-radius: 8px; border: 0; background: transparent; cursor: pointer;
  font-size: 14px; color: var(--text); font-family: inherit;
}
.filter-list button:hover { background: var(--soft); }
.filter-list button.active { background: var(--primary); color: #fff; font-weight: 600; }

/* ---------- Feed posts ---------- */
.feed-col { min-width: 0; }
.feed-list { display: flex; flex-direction: column; gap: 1rem; }
.feed-post {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.1rem 1.1rem 0.9rem; animation: fadeUp .3s ease both;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.feed-post .head { display: flex; align-items: flex-start; gap: .65rem; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--soft); display: grid; place-items: center; font-weight: 700; color: var(--muted);
  flex-shrink: 0; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-block { min-width: 0; flex: 1; }
.author-name { font-size: 14px; font-weight: 600; }
.author-meta { font-size: 12px; color: var(--muted); display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; margin-top: 2px; }
.cat-badge {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
  padding: .2rem .5rem; border-radius: 6px; flex-shrink: 0;
}
.cat-current_issue   { background: #FEE2E2; color: #991B1B; }
.cat-things_we_want  { background: #FEF3C7; color: #92400E; }
.cat-what_we_can_do  { background: #DCFCE7; color: #166534; }
.cat-today           { background: #DBEAFE; color: #1E40AF; }
.cat-tomorrow        { background: #E0E7FF; color: #3730A3; }
.cat-story           { background: #FFEDD5; color: #9A3412; }

.feed-post .body { margin-top: .7rem; }
.feed-post .body h3 { font-size: 1.05rem; line-height: 1.3; margin: 0; cursor: pointer; }
.feed-post .body h3:hover { text-decoration: underline; }
.feed-post .body p { color: #1e293b; margin: .35rem 0 0; white-space: pre-line; }
.feed-post img.cover { display: block; max-width: 100%; max-height: 400px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); margin-top: .7rem; }
.feed-post .actions { margin-top: .8rem; padding-top: .65rem; border-top: 1px solid var(--border); display: flex; gap: .25rem; align-items: center; }
.feed-post .actions .btn-ghost.liked { color: #be123c; }
.status-pill { display: inline-flex; align-items: center; gap: .25rem; padding: .15rem .55rem; font-size: 11px; font-weight: 600; border-radius: 6px; text-transform: capitalize; }
.status-open { background: #FEE2E2; color: #991B1B; }
.status-acknowledged { background: #DBEAFE; color: #1E40AF; }
.status-in_progress  { background: #FEF3C7; color: #92400E; }
.status-closed       { background: #DCFCE7; color: #166534; }
.status-reopened     { background: #FFEDD5; color: #9A3412; }

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: 1rem; }
.form-row  { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 720px) { .form-row { grid-template-columns: 1fr; } }
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: .35rem; color: var(--text); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=tel], select, textarea {
  width: 100%; padding: .65rem .8rem; border: 1px solid var(--border); border-radius: 10px;
  font-size: 14px; font-family: inherit; background: #fff; color: var(--text);
}
textarea { resize: vertical; min-height: 96px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(29,78,216,.15); }
.help { font-size: 12px; color: var(--muted); margin-top: .25rem; }
.error-text { font-size: 13px; color: var(--error); margin-top: .35rem; }
.field-icon { position: relative; }
.field-icon input { padding-left: 2.2rem; }
.field-icon .icon { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.role-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.role-cards label {
  border: 1px solid var(--border); border-radius: 10px; padding: .65rem .5rem; text-align: center;
  cursor: pointer; transition: all .15s ease; font-weight: 500;
}
.role-cards input { display: none; }
.role-cards input:checked + span { color: var(--primary); }
.role-cards label.selected { border-color: var(--primary); background: rgba(29,78,216,.05); color: var(--primary); font-weight: 600; }

/* ---------- Auth pages ---------- */
.auth-wrap { min-height: calc(100vh - 64px); display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { .auth-wrap { grid-template-columns: 1fr; } .auth-side { display: none; } }
.auth-side {
  background-image: linear-gradient(rgba(15,23,42,.65), rgba(194,65,12,.4)),
    url('https://static.prod-images.emergentagent.com/jobs/1e1e6c80-c852-48d7-9ef5-a7b199df1a21/images/12a703cb13fb615ad67ad9b3a4c8791aa52d808c703ef1603bcec6690cc30fb1.png');
  background-size: cover; background-position: center; color: #fff;
  padding: 3rem 2rem; display: flex; align-items: flex-end;
}
.auth-side h2 { color: #fff; font-size: 2rem; line-height: 1.2; }
.auth-side p  { color: rgba(255,255,255,.85); max-width: 380px; }
.auth-form { padding: 2.5rem 2rem; max-width: 480px; margin: 0 auto; width: 100%; align-self: center; }
.auth-form h1 { font-size: 1.85rem; margin-bottom: .35rem; }
.auth-form .sub { color: var(--muted); margin-bottom: 1.5rem; }

/* OTP boxes */
.otp-row { display: flex; gap: .5rem; justify-content: center; }
.otp-row input {
  width: 44px; height: 52px; text-align: center; font-size: 1.5rem; font-weight: 600;
  border-radius: 10px; padding: 0;
}

/* ---------- Footer ---------- */
.site-footer { margin-top: 4rem; border-top: 1px solid var(--border); background: #fff; }
.site-footer .grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; padding: 2.5rem 0; }
@media (max-width: 720px) { .site-footer .grid { grid-template-columns: 1fr; } }
.site-footer h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--text); margin: 0 0 .65rem; }
.site-footer a { display: block; padding: .25rem 0; font-size: 14px; color: var(--muted); }
.site-footer .bottom { border-top: 1px solid var(--border); padding: 1rem 0; font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }

/* ---------- Toasts ---------- */
.toast-host {
  position: fixed; top: 80px; left: 50%; transform: translateX(-50%);
  z-index: 9999; display: flex; flex-direction: column; gap: .5rem;
}
.toast {
  background: #0F172A; color: #fff; padding: .7rem 1rem; border-radius: 10px;
  font-size: 14px; box-shadow: var(--shadow); animation: fadeUp .2s ease both;
  min-width: 200px;
}
.toast.success { background: #15803D; }
.toast.error   { background: #B91C1C; }

/* ---------- Modals (light) ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 100;
  display: none; align-items: center; justify-content: center; padding: 1rem;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: #fff; border-radius: 14px; max-width: 520px; width: 100%;
  padding: 1.5rem; box-shadow: 0 24px 64px -16px rgba(0,0,0,.4); max-height: 90vh; overflow: auto;
}

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; flex-wrap: wrap; }
.tabs button {
  background: transparent; border: 0; padding: .65rem .9rem; cursor: pointer; font-family: inherit;
  font-size: 14px; font-weight: 500; color: var(--muted); border-bottom: 2px solid transparent;
}
.tabs button.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeUp .2s ease both; }

/* ---------- Misc ---------- */
.muted { color: var(--muted); }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: .5rem; }
.gap-3 { gap: .75rem; }
.mt-1 { margin-top: .35rem; } .mt-2 { margin-top: .65rem; } .mt-3 { margin-top: 1rem; } .mt-4 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .35rem; } .mb-2 { margin-bottom: .65rem; } .mb-3 { margin-bottom: 1rem; }
.text-center { text-align: center; }
.empty {
  border: 1px dashed var(--border); border-radius: var(--radius); padding: 2rem;
  text-align: center; color: var(--muted);
}
.spinner {
  width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff;
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
.spinner.dark { border-color: rgba(15,23,42,.2); border-top-color: var(--primary); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Issue timeline ---------- */
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--border); padding-left: 1.25rem; }
.timeline li { position: relative; margin-bottom: 1rem; }
.timeline li::before {
  content: ''; position: absolute; left: -1.65rem; top: .35rem;
  width: 10px; height: 10px; border-radius: 50%; background: var(--primary); border: 2px solid #fff;
}

/* ---------- Pages (admin/official) ---------- */
.crud-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 900px) { .crud-grid { grid-template-columns: 1fr; } }
.list-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: .85rem 1rem; display: flex; align-items: flex-start; gap: .75rem;
}
.list-item .info { flex: 1; min-width: 0; }
.list-item .info .t { font-weight: 600; }
.list-item .info .m { font-size: 12px; color: var(--muted); margin-top: 2px; }
