/* ==========================================================================
   India Staffing Portal — Design System
   No framework. No unused CSS. Ships light, loads fast.
   ========================================================================== */

:root {
  /* Color tokens */
  --paper:        #F7F7F2;
  --paper-dim:     #EFEEE6;
  --ink:          #152238;
  --ink-soft:     #4A5568;
  --scrub-green:  #0F6B5C;
  --scrub-green-dark: #0B5347;
  --brass:        #A97C40;
  --brass-light:  #C9A25F;
  --stamp-red:    #B23A2E;
  --line:         #D8D5C8;

  /* Type */
  --font-display: 'Zilla Slab', Georgia, serif;
  --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  /* Spacing scale */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 5rem;

  --radius: 4px;
  --max-width: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  font-size: 16px;
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 var(--space-2); }
h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); font-weight: 600; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 600; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 var(--space-2); color: var(--ink-soft); }

a { color: var(--scrub-green); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

:focus-visible {
  outline: 2px solid var(--scrub-green);
  outline-offset: 2px;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass);
  font-weight: 600;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.75em 1.4em;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--scrub-green); color: #fff; }
.btn-primary:hover { background: var(--scrub-green-dark); }
.btn-outline { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--paper); }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
  flex-wrap: wrap;
}
.logo {
  display: inline-flex;
  align-items: center;
}
.logo:hover { text-decoration: none; }
.logo-img {
  height: 52px;
  width: auto;
  display: block;
}

/* nav-panel holds BOTH the nav links and the action buttons — on desktop
   it's just an inline row; on mobile the whole thing collapses together
   behind one hamburger, so nothing gets left behind un-collapsed the way
   individual pieces did before. */
.nav-panel {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex: 1 1 auto;
  justify-content: flex-end;
  min-width: 0;
}

.main-nav ul { list-style: none; display: flex; gap: var(--space-3); margin: 0; padding: 0; }
.main-nav a { color: var(--ink); font-weight: 500; font-size: 0.95rem; white-space: nowrap; }
.main-nav a:hover { color: var(--scrub-green); text-decoration: none; }

.header-actions { display: flex; gap: var(--space-2); align-items: center; }
.bell-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  padding: 0.4rem;
}
.bell-link:hover { color: var(--scrub-green); text-decoration: none; }
.bell-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--stamp-red);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  min-width: 15px;
  height: 15px;
  line-height: 15px;
  border-radius: 999px;
  text-align: center;
  padding: 0 2px;
}
/* Text label next to the bell — hidden on desktop (icon + badge is enough
   there), shown on mobile where it sits in a full-width stacked list and
   a bare icon alone reads ambiguously. */
.bell-label { display: none; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
}

@media (max-width: 860px) {
  .nav-toggle { display: block; order: 2; }
  .logo { order: 1; flex: 1 1 auto; min-width: 0; margin-right: var(--space-2); }
  .logo-img { height: 38px; }

  .nav-panel {
    display: none;
    order: 3;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-3);
    margin-top: var(--space-3);
    padding-top: var(--space-3);
    border-top: 1px solid var(--line);
  }
  .nav-panel.is-open { display: flex; }

  .main-nav ul { flex-direction: column; gap: var(--space-1); }
  .main-nav a { display: block; padding: 0.5em 0; }

  .header-actions { flex-direction: column; align-items: stretch; gap: var(--space-2); }
  .header-actions .btn { width: 100%; justify-content: center; }
  .bell-link {
    align-self: stretch;
    justify-content: flex-start;
    gap: 0.6em;
    padding: 0.5em 0;
  }
  .bell-label { display: inline; font-size: 0.95rem; color: var(--ink); }
  .bell-badge { position: static; margin-left: auto; }
}

/* ---------- Hero: "Duty Roster Board" ---------- */
.hero {
  background: var(--ink);
  color: var(--paper);
  padding: var(--space-6) 0;
  position: relative;
  overflow: hidden;
}
.hero-board {
  background: var(--paper);
  color: var(--ink);
  border-radius: 6px;
  padding: var(--space-4);
  box-shadow: 0 12px 0 rgba(0,0,0,0.15);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-5);
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
}
.hero-copy .eyebrow { color: var(--brass-light); }
.hero h1 { color: var(--paper); }
.hero-copy p.lede {
  font-size: 1.1rem;
  color: #C9CEDA;
  max-width: 46ch;
}
.hero-ctas { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-top: var(--space-3); }

.hero-stats {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid rgba(255,255,255,0.15);
}
.hero-stat .num {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--brass-light);
  display: block;
}
.hero-stat .label { font-size: 0.8rem; color: #A9AFC0; }

/* ---------- Roster board (mini job token preview in hero) ---------- */
.roster-board { display: flex; flex-direction: column; gap: var(--space-2); }
.roster-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  border-bottom: 1px dashed var(--line);
  padding-bottom: var(--space-1);
  margin-bottom: var(--space-1);
}
.mini-token {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.8rem;
  background: var(--paper-dim);
  border-radius: 3px;
  font-size: 0.85rem;
}
.mini-token .token-no {
  font-family: var(--font-mono);
  color: var(--brass);
  font-weight: 600;
}

/* ---------- Section shell ---------- */
.section { padding: var(--space-6) 0; }
.section-alt { background: var(--paper-dim); }
.section-head {
  max-width: 640px;
  margin: 0 auto var(--space-5);
  text-align: center;
}
.section-head.left { margin: 0 0 var(--space-5); text-align: left; }

/* ---------- How it works (genuinely sequential) ---------- */
.steps-cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); }
@media (max-width: 780px) { .steps-cols { grid-template-columns: 1fr; } }
.steps-col h3 { display: flex; align-items: center; gap: 0.5em; }
.steps-list { list-style: none; margin: var(--space-3) 0 0; padding: 0; counter-reset: step; }
.steps-list li {
  counter-increment: step;
  position: relative;
  padding-left: 2.6rem;
  margin-bottom: var(--space-3);
}
.steps-list li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.8rem;
  height: 1.8rem;
  border: 1.5px solid var(--brass);
  color: var(--brass);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
}
.steps-list strong { display: block; margin-bottom: 0.2rem; }
.steps-list p { margin: 0; font-size: 0.92rem; }

/* ---------- Token slip job cards ---------- */
.token-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-3);
}
.token-slip {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: var(--space-3);
  position: relative;
  background-image:
    radial-gradient(circle at 0 50%, var(--paper-dim) 6px, transparent 7px),
    radial-gradient(circle at 100% 50%, var(--paper-dim) 6px, transparent 7px);
  background-repeat: no-repeat;
  background-position: left center, right center;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.token-slip:hover { box-shadow: 0 6px 18px rgba(21,34,56,0.08); transform: translateY(-2px); }
.token-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px dashed var(--line);
  padding-bottom: var(--space-1);
  margin-bottom: var(--space-2);
}
.token-no {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--brass);
  font-weight: 600;
}
.badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2em 0.55em;
  border-radius: 2px;
  font-weight: 600;
}
.badge-urgent { background: rgba(178,58,46,0.1); color: var(--stamp-red); }
.badge-verified { background: rgba(15,107,92,0.1); color: var(--scrub-green); }
.badge-neutral { background: var(--paper-dim); color: var(--ink-soft); }

.token-slip h3 { margin-bottom: 0.2rem; font-size: 1.05rem; }
.token-meta { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: var(--space-2); }
.token-meta span:not(:last-child)::after { content: '·'; margin: 0 0.4em; color: var(--line); }
.token-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px dashed var(--line);
}
.token-salary { font-family: var(--font-mono); font-weight: 600; font-size: 0.9rem; }

.section-cta-row { text-align: center; margin-top: var(--space-4); }

/* ---------- Trust / verification bar ---------- */
.trust-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  text-align: center;
}
@media (max-width: 780px) { .trust-bar { grid-template-columns: 1fr 1fr; } }
.trust-item .icon { color: var(--scrub-green); margin-bottom: var(--space-1); }
.trust-item h3 { font-size: 0.95rem; margin-bottom: 0.2rem; }
.trust-item p { font-size: 0.85rem; margin: 0; }

/* ---------- FAQ (also feeds AI answer engines via schema) ---------- */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--line); padding: var(--space-3) 0; }
.faq-item h3 { font-size: 1.02rem; margin-bottom: 0.4rem; }
.faq-item p { font-size: 0.95rem; margin: 0; }

/* ---------- City/specialty SEO links ---------- */
.link-cloud { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.link-cloud a {
  font-size: 0.85rem;
  color: var(--ink-soft);
  background: var(--paper-dim);
  padding: 0.35em 0.8em;
  border-radius: 999px;
}
.link-cloud a:hover { color: var(--scrub-green); text-decoration: none; background: #E4EFEC; }
.link-cloud a.active { color: #fff; background: var(--scrub-green); }

/* ---------- Final CTA band ---------- */
.cta-band {
  background: var(--scrub-green);
  color: #fff;
  padding: var(--space-5) 0;
  text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #D7EDE8; max-width: 50ch; margin-left: auto; margin-right: auto; }
.cta-band .btn-outline { border-color: #fff; color: #fff; }
.cta-band .btn-outline:hover { background: #fff; color: var(--scrub-green); }

/* ---------- Forms (registration, OTP, login) ---------- */
form label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: var(--space-2);
}
form input[type="text"],
form input[type="email"],
form input[type="tel"],
form input[type="password"],
form select,
form textarea {
  display: block;
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.7em 0.9em;
  font-family: var(--font-body);
  font-size: 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}
form input:focus, form select:focus, form textarea:focus {
  outline: none;
  border-color: var(--scrub-green);
  box-shadow: 0 0 0 3px rgba(15,107,92,0.12);
}
form button[type="submit"] { margin-top: var(--space-2); width: 100%; justify-content: center; }

.form-error {
  background: rgba(178,58,46,0.08);
  color: var(--stamp-red);
  border: 1px solid rgba(178,58,46,0.25);
  padding: 0.7em 1em;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: var(--space-2);
}
.form-success {
  background: rgba(15,107,92,0.08);
  color: var(--scrub-green-dark);
  border: 1px solid rgba(15,107,92,0.25);
  padding: 0.7em 1em;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: var(--space-2);
}

/* ---------- Dashboard filter bar ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: flex-end;
  background: var(--paper-dim);
  padding: var(--space-2);
  border-radius: var(--radius);
  margin-top: var(--space-3);
}
.filter-bar input[type="text"], .filter-bar select {
  margin-top: 0;
  width: auto;
  flex: 1 1 160px;
}
.filter-bar .btn { flex: 0 0 auto; }

.badge-applied { background: rgba(21,34,56,0.08); color: var(--ink); }

/* ---------- Admin: stat cards ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-2);
  margin-top: var(--space-3);
}
.stat-card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  background: var(--paper-dim);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-3);
  color: var(--ink);
  text-decoration: none;
}
.stat-card:hover { text-decoration: none; box-shadow: 0 4px 12px rgba(21,34,56,0.06); }
.stat-card-alert { border-color: var(--stamp-red); background: rgba(178,58,46,0.06); }
.stat-num { font-family: var(--font-mono); font-size: 1.8rem; font-weight: 600; }
.stat-label { font-size: 0.82rem; color: var(--ink-soft); }

/* ---------- Admin: filter tabs ---------- */
.table-filters {
  display: flex;
  gap: 0.4rem;
  margin: var(--space-3) 0;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.table-filters a {
  padding: 0.5em 0.9em;
  font-size: 0.9rem;
  color: var(--ink-soft);
  border-bottom: 2px solid transparent;
}
.table-filters a:hover { text-decoration: none; color: var(--ink); }
.table-filters a.active { color: var(--scrub-green); border-color: var(--scrub-green); font-weight: 600; }

/* ---------- Admin: data table ---------- */
.admin-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: #fff;
}
.admin-table th, .admin-table td {
  padding: 0.7em 0.8em;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.admin-table th {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.admin-table tr:hover td { background: var(--paper-dim); }
.table-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.table-actions form { display: inline; }

.btn-sm { padding: 0.35em 0.8em; font-size: 0.82rem; }

.status-pill {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  padding: 0.2em 0.6em;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
}
.status-pending_approval, .status-pending { background: rgba(169,124,64,0.12); color: var(--brass); }
.status-active, .status-approved, .status-published { background: rgba(15,107,92,0.1); color: var(--scrub-green); }
.status-closed, .status-rejected, .status-suspended { background: rgba(178,58,46,0.08); color: var(--stamp-red); }
.status-draft { background: rgba(21,34,56,0.06); color: var(--ink-soft); }

/* ---------- Blog ---------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-4);
}
.blog-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-3);
}
.blog-card-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--brass);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
}
.blog-card h3 { margin-bottom: 0.5rem; }
.blog-card h3 a { color: var(--ink); }
.blog-card h3 a:hover { color: var(--scrub-green); text-decoration: none; }
.blog-card-link { font-size: 0.9rem; font-weight: 600; }

.blog-content { margin-top: 1.5rem; font-size: 1.02rem; }
.blog-content p { margin-bottom: 1.2rem; color: var(--ink); line-height: 1.7; }
.blog-content img { border-radius: 6px; margin: 1.5rem 0; max-width: 100%; }

/* ---------- Rich text editor (blog, doctor bio) ---------- */
.rte-wrapper { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 0.4rem; background: #fff; }
.rte-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding: 0.5rem;
  background: var(--paper-dim);
  border-bottom: 1px solid var(--line);
}
.rte-btn {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35em 0.7em;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}
.rte-btn:hover { background: var(--scrub-green); color: #fff; border-color: var(--scrub-green); }
.rte-editor {
  min-height: 180px;
  padding: 0.8em 1em;
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink);
  outline: none;
}
.rte-editor:focus { box-shadow: inset 0 0 0 2px rgba(15,107,92,0.15); }
.rte-editor h2 { font-family: var(--font-display); font-size: 1.3rem; margin: 0.6em 0 0.3em; }
.rte-editor h3 { font-family: var(--font-display); font-size: 1.1rem; margin: 0.5em 0 0.3em; }
.rte-editor p { margin: 0 0 0.8em; color: var(--ink); }
.rte-editor ul, .rte-editor ol { margin: 0 0 0.8em 1.2em; }
.rte-editor a { color: var(--scrub-green); }

/* ---------- Support chat threads ---------- */
.chat-thread { display: flex; flex-direction: column; gap: 0.8rem; margin: 1.5rem 0; }
.chat-bubble {
  max-width: 75%;
  padding: 0.7em 1em;
  border-radius: 10px;
  font-size: 0.92rem;
}
.chat-bubble-mine { align-self: flex-end; background: var(--scrub-green); color: #fff; border-bottom-right-radius: 2px; }
.chat-bubble-theirs { align-self: flex-start; background: var(--paper-dim); color: var(--ink); border-bottom-left-radius: 2px; }
.chat-meta { font-size: 0.72rem; opacity: 0.75; margin-top: 0.3rem; display: block; }

/* ---------- Notifications ---------- */
.notif-item {
  display: block;
  padding: 0.9em 1em;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.notif-item:hover { background: var(--paper-dim); text-decoration: none; }
.notif-item.unread { background: rgba(15,107,92,0.05); font-weight: 600; }
.notif-time { display: block; font-size: 0.78rem; color: var(--ink-soft); font-weight: 400; margin-top: 0.2rem; }

/* ---------- Promo banner (optional feature highlights) ---------- */
.promo-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  background: rgba(169,124,64,0.08);
  border-left: 3px solid var(--brass);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-3);
  margin: var(--space-3) 0;
}
.promo-banner p { margin: 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #B7BECF;
  padding: var(--space-5) 0 var(--space-3);
  font-size: 0.88rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 {
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-2);
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 0.5rem; }
.footer-grid a { color: #B7BECF; }
.footer-grid a:hover { color: #fff; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-3);
  flex-wrap: wrap;
  gap: var(--space-2);
}
