/* Uprising Jobs — public portal. Facebook-style: menu left, feed centre, rail right. */
:root {
  --bg: #f0f2f5;
  --card: #ffffff;
  --text: #1c1e21;
  --muted: #65676b;
  --line: #e4e6eb;
  --hover: #f2f3f5;
  --brand: #0f2a5c;
  --brand-2: #1b4fa8;
  --gold: #f2b31b;
  --gold-soft: #fff4d6;
  --green: #16a34a;
  --wa: #1fa855;
  --danger: #dc2626;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .12);
  --topbar-h: 60px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #18191a;
    --card: #242526;
    --text: #e4e6eb;
    --muted: #b0b3b8;
    --line: #3a3b3c;
    --hover: #303132;
    --brand: #8fb4ff;
    --brand-2: #5b8cf0;
    --gold-soft: #3a3019;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 Inter, "Hind Siliguri", "Noto Sans Bengali", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: inherit; text-decoration: none; }
img, video, iframe { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.25; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.hide-sm { display: inline; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  height: var(--topbar-h);
  background: var(--card);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .1);
}
.topbar-inner {
  max-width: 1320px; height: 100%; margin: 0 auto; padding: 0 16px;
  display: flex; align-items: center; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 8px; flex: none; }
.brand img { width: 36px; height: 36px; object-fit: contain; background: #fff; border-radius: 50%; padding: 2px; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-text strong { font-weight: 800; letter-spacing: .5px; color: var(--brand); font-size: 17px; }
.brand-text small { color: var(--gold); font-weight: 700; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; margin-top: 3px; }
.search {
  flex: 1; min-width: 0; max-width: 460px; display: flex; align-items: center; gap: 8px;
  background: var(--bg); border-radius: 999px; padding: 0 14px; height: 40px;
}
.search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; outline: none; }
.top-cta {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  background: var(--wa); color: #fff; font-weight: 600; padding: 9px 14px; border-radius: 999px; flex: none;
}
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--bg); color: var(--text);
  font-size: 18px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.menu-toggle { display: none; }

/* ---------- 3-column layout ---------- */
.layout {
  max-width: 1320px; margin: 0 auto; padding: 16px;
  display: grid; grid-template-columns: 290px minmax(0, 620px) 320px; gap: 24px; justify-content: center;
}
.left-col, .right-col { position: sticky; top: calc(var(--topbar-h) + 16px); align-self: start; max-height: calc(100vh - var(--topbar-h) - 32px); }
.left-scroll { max-height: inherit; overflow-y: auto; padding-right: 4px; scrollbar-width: thin; }
.right-col { overflow-y: auto; scrollbar-width: thin; display: flex; flex-direction: column; gap: 16px; }
.feed { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.posts { display: flex; flex-direction: column; gap: 16px; }

/* ---------- Left menu ---------- */
.profile-mini { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; }
.profile-mini img { width: 44px; height: 44px; object-fit: contain; border-radius: 50%; background: #fff; border: 1px solid var(--line); padding: 3px; }
.pm-name { font-weight: 700; }
.pm-sub { color: var(--muted); font-size: 13px; }
.menu { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.menu-title { margin: 14px 8px 6px; font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.menu-item { display: flex; align-items: center; gap: 12px; padding: 9px 8px; border-radius: 10px; font-weight: 500; }
.menu-item:hover { background: var(--hover); }
.menu-item.active { background: var(--gold-soft); font-weight: 700; }
.mi-ico { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; background: var(--card); border-radius: 50%; box-shadow: var(--shadow); flex: none; }
.mi-avatar { width: 32px; height: 32px; border-radius: 50%; color: #fff; font-weight: 700; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.mi-count { margin-left: auto; color: var(--muted); font-size: 13px; }
.chip-wrap { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 8px; }
.chip { padding: 5px 11px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 13px; }
.chip:hover { background: var(--hover); }
.chip.active { background: var(--brand-2); color: #fff; border-color: var(--brand-2); }
.left-foot { color: var(--muted); font-size: 12px; margin: 18px 8px; }
.menu-backdrop { display: none; }

/* ---------- Cards ---------- */
.cover-card, .post, .rail-card, .detail-card, .filter-head, .empty {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
}
.cover-card { overflow: hidden; }
.cover-img img { width: 100%; height: auto; aspect-ratio: 1640 / 690; object-fit: cover; object-position: center; }
.cover-body { display: flex; align-items: flex-end; gap: 14px; padding: 0 16px 14px; flex-wrap: wrap; }
.cover-logo { width: 84px; height: 84px; border-radius: 50%; border: 4px solid var(--card); background: #fff; object-fit: contain; padding: 6px; margin-top: -34px; box-shadow: var(--shadow); }
.cover-text { flex: 1; min-width: 200px; }
.cover-text h1 { font-size: 22px; font-weight: 800; }
.cover-text p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.cover-actions { display: flex; gap: 8px; }
.quick-cats { display: flex; gap: 8px; overflow-x: auto; padding: 0 16px 16px; scrollbar-width: none; }
.quick-cats::-webkit-scrollbar { display: none; }
.qc { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; background: var(--bg); font-weight: 600; font-size: 14px; }
.qc b { color: var(--brand-2); }
.filter-head { padding: 16px; }
.filter-head h1 { font-size: 20px; }
.filter-head p { margin: 4px 0 0; color: var(--muted); }
.filter-head a { color: var(--brand-2); font-weight: 600; }
.empty { padding: 28px 20px; text-align: center; color: var(--muted); }
.empty a { color: var(--brand-2); font-weight: 600; }

/* ---------- Post ---------- */
.post { overflow: hidden; }
.post-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px 0; }
.avatar { width: 42px; height: 42px; border-radius: 50%; color: #fff; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.post-meta { flex: 1; min-width: 0; }
.post-author { font-weight: 700; }
.post-author a:hover { text-decoration: underline; }
.verified { display: inline-flex; width: 16px; height: 16px; border-radius: 50%; background: var(--brand-2); color: #fff; font-size: 10px; align-items: center; justify-content: center; vertical-align: 1px; }
.post-sub { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-pill { flex: none; font-size: 12px; font-weight: 600; background: var(--bg); padding: 4px 10px; border-radius: 999px; color: var(--muted); }
.post-body { padding: 10px 16px 12px; }
.post-kicker { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: #9a3412; background: #ffedd5; padding: 2px 8px; border-radius: 6px; margin-bottom: 6px; }
.post-title { font-size: 19px; font-weight: 800; }
.post-title a:hover { color: var(--brand-2); }
.post-local { margin: 4px 0 0; font-family: "Hind Siliguri", "Noto Sans Bengali", Inter, sans-serif; color: var(--muted); font-weight: 600; }
.pay-line { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.pay { font-size: 18px; font-weight: 800; color: var(--green); }
.pay-label { font-size: 13px; color: var(--muted); }
.hl { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.hl li { font-size: 13px; background: var(--gold-soft); padding: 4px 10px; border-radius: 8px; font-weight: 500; }
.see-more { display: inline-block; margin-top: 8px; color: var(--brand-2); font-weight: 600; font-size: 14px; }
.post-media { display: block; background: #000; border-top: 1px solid var(--line); }
.post-media img { width: 100%; max-height: 780px; object-fit: contain; margin: 0 auto; background: #fff; }
.post-media video, .post-media iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; }
.post-stats { display: flex; gap: 14px; padding: 10px 16px; color: var(--muted); font-size: 13px; border-bottom: 1px solid var(--line); }
.post-stats span:last-child { margin-left: auto; }
.post-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px 8px; }
.act {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 4px; border-radius: 8px;
  font: 600 14px/1 Inter, system-ui, sans-serif; color: var(--muted); background: none; border: 0; cursor: pointer; white-space: nowrap;
}
.act:hover { background: var(--hover); }
.act-apply { color: #fff; background: var(--brand-2); }
.act-apply:hover { background: var(--brand); }
.act-closed { grid-column: span 1; color: var(--danger); font-size: 13px; }

/* ---------- Detail page ---------- */
.crumbs { font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--brand-2); }
.detail-card { padding: 18px; }
.detail-card h2 { font-size: 18px; margin-bottom: 8px; }
.detail-card h3 { font-size: 15px; margin: 18px 0 8px; }
.desc { margin: 0; white-space: normal; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 16px 0 0; }
.facts div { background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.facts dt { font-size: 12px; color: var(--muted); font-weight: 600; }
.facts dd { margin: 2px 0 0; font-weight: 700; }
.inc-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.inc-table th, .inc-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.inc-table td { font-weight: 700; color: var(--green); text-align: right; }
.ticks { margin: 0; padding-left: 0; list-style: none; }
.ticks li { padding: 4px 0 4px 26px; position: relative; }
.ticks li::before { content: "✔"; position: absolute; left: 4px; color: var(--green); font-weight: 700; }
.detail-card .chip-wrap { padding: 0; }
.cta-bar { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0 10px; }
.section-title { font-size: 17px; margin: 8px 4px -4px; }

/* ---------- Right rail ---------- */
.rail-card { padding: 14px 16px; }
.rail-card p { margin: 6px 0 10px; font-size: 14px; }
.rail-title { font-weight: 800; margin-bottom: 8px; }
.rail-job { display: flex; gap: 10px; padding: 8px 6px; border-radius: 8px; align-items: center; }
.rail-job:hover { background: var(--hover); }
.rj-text { display: flex; flex-direction: column; min-width: 0; }
.rj-text strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rj-text small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trust { border-left: 4px solid var(--green); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 16px; border-radius: 10px;
  font: 700 14px/1 Inter, system-ui, sans-serif; border: 0; cursor: pointer; text-align: center;
}
.btn-lg { padding: 13px 18px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--brand-2); color: #fff; }
.btn-primary:hover { background: var(--brand); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-ghost { background: var(--bg); color: var(--text); }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- Infinite scroll ---------- */
.loader { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 18px; color: var(--muted); }
.loader a { color: var(--brand-2); font-weight: 600; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand-2); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.end-note { text-align: center; color: var(--muted); padding: 10px 0 30px; }

/* ---------- Apply dialog ---------- */
dialog.apply { width: min(460px, calc(100vw - 24px)); border: 0; border-radius: 16px; padding: 0; background: var(--card); color: var(--text); box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
dialog.apply::backdrop { background: rgba(0, 0, 0, .55); }
.apply-form, .apply-done { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.apply-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.apply-kicker { font-size: 13px; color: var(--muted); font-weight: 600; }
.apply-head h3 { font-size: 18px; }
.apply-form label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--muted); }
.apply-form input, .apply-form select {
  font: 500 16px/1.2 Inter, system-ui, sans-serif; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); outline: none; width: 100%;
}
.apply-form input:focus, .apply-form select:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(27, 79, 168, .18); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.vehicle-q { border: 0; padding: 0; margin: 0; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.vehicle-q legend { font-size: 13px; font-weight: 600; color: var(--muted); padding: 0; margin-bottom: 6px; width: 100%; }
.apply-form label.radio { flex-direction: row; align-items: center; gap: 6px; font-size: 15px; color: var(--text); }
.apply-form label.radio input { width: auto; }
.apply-form label.consent { flex-direction: row; align-items: flex-start; gap: 8px; font-weight: 500; }
.apply-form label.consent input { width: 18px; height: 18px; margin-top: 1px; flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-error { margin: 0; color: var(--danger); font-weight: 600; font-size: 14px; }
.apply-done { text-align: center; align-items: stretch; }
.done-ico { font-size: 44px; }
.apply-done p { margin: 0; color: var(--muted); }

@media (max-width: 1180px) {
  .layout { grid-template-columns: 270px minmax(0, 640px); }
  .right-col { display: none; }
}
@media (max-width: 860px) {
  .layout { grid-template-columns: minmax(0, 1fr); padding: 12px 0; gap: 12px; }
  .feed { gap: 12px; }
  .posts { gap: 12px; }
  .cover-card, .post, .detail-card, .filter-head, .empty { border-radius: 0; }
  .crumbs, .section-title { padding: 0 12px; }
  .menu-toggle { display: inline-flex; }
  .left-col {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 60; width: min(310px, 86vw); max-height: none; height: 100vh; height: 100dvh;
    background: var(--card); padding: 14px 10px; transform: translateX(-105%); transition: transform .22s ease;
    box-shadow: 4px 0 24px rgba(0, 0, 0, .2);
  }
  .left-scroll { height: 100%; max-height: 100%; }
  body.menu-open .left-col { transform: none; }
  body.menu-open .menu-backdrop { display: block; position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .45); }
}
@media (max-width: 560px) {
  .hide-sm { display: none; }
  .top-cta { padding: 9px 11px; }
  .brand-text { display: none; }
  .topbar-inner { gap: 8px; padding: 0 12px; }
  .cover-text h1 { font-size: 19px; }
  .cover-actions { width: 100%; }
  .cover-actions .btn { flex: 1; }
  .post-title { font-size: 17px; }
  .cat-pill { display: none; }
  .act { font-size: 13px; gap: 4px; }
  .row2 { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
