/* ============================================================
   HIMAZ Careers — module styles (forms, cards, dashboards, admin)
   Extends style.css design tokens (bone / ink / purple).
   ============================================================ */

/* ---------- Flash messages ---------- */
.flashwrap { margin-top: 96px; }
.flash {
  border-radius: 14px; padding: 14px 20px; font-size: 15px; font-weight: 500;
  margin-bottom: 10px; border: 1px solid transparent;
}
.flash--ok  { background: #E7F1EA; color: #1E5B38; border-color: #B9D8C4; }
.flash--err { background: #F6E7E7; color: #8A2B2B; border-color: #E1BEBE; }

/* ---------- Section paddings ---------- */
.sec-pad   { padding-top: clamp(120px, 14vh, 190px); padding-bottom: clamp(60px, 9vh, 120px); }
.pb-lg     { padding-bottom: clamp(70px, 10vh, 140px); }
.pt-sm     { padding-top: 120px; }

/* ---------- Simple page hero ---------- */
.page-hero { padding-top: clamp(130px, 15vh, 200px); padding-bottom: clamp(30px, 5vh, 60px); }
.page-hero p { color: var(--ink-soft); max-width: 60ch; margin-top: 18px; font-size: 18px; }
.crumbs { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--purple); }

/* ---------- Careers landing cards ---------- */
.cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 40px; }
.ccard {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-img);
  padding: 34px 30px; display: flex; flex-direction: column; gap: 14px;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.ccard:hover { transform: translateY(-6px); box-shadow: 0 26px 60px -30px rgba(21,21,21,.35); }
.ccard__ic {
  width: 54px; height: 54px; border-radius: 14px; background: var(--purple);
  display: grid; place-items: center; color: var(--white);
}
.ccard__ic svg { width: 26px; height: 26px; }
.ccard h3 { font-size: 22px; font-weight: 700; }
.ccard p { color: var(--ink-soft); font-size: 15.5px; }
.ccard .link-arrow { margin-top: auto; font-size: 14px; }
.ccard .link-arrow svg { width: 18px; height: 18px; }

/* ---------- Job list ---------- */
.jobs { display: flex; flex-direction: column; border-top: 1px solid var(--line); margin-top: 30px; }
.job {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 30px 6px; border-bottom: 1px solid var(--line); flex-wrap: wrap;
  transition: padding .4s var(--ease);
}
.job:hover { padding-left: 18px; }
.job h3 { font-size: clamp(20px, 2.4vw, 30px); font-weight: 700; display: flex; align-items: center; gap: 12px; }
.job__meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.job__meta span {
  font-size: 12.5px; letter-spacing: .04em; color: var(--ink-soft);
  background: var(--bone-2); border-radius: 999px; padding: 6px 14px;
}
.tagnew {
  font-family: var(--font-body); font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--white); background: var(--purple);
  border-radius: 999px; padding: 4px 10px;
}
.job__right { display: flex; align-items: center; gap: 14px; }

/* ---------- Buttons (module) ---------- */
.pill--ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.pill--ghost:hover { background: var(--ink); color: var(--bone); }
.pill--sm { padding: 12px 26px; font-size: 14px; }
.pill--purple { background: var(--purple); color: var(--white); }
.pill--purple:hover { background: var(--purple-deep); }
.pill--block { width: 100%; justify-content: center; }
.pill svg { width: 18px; height: 18px; }

/* ---------- Forms ---------- */
.formwrap { max-width: 720px; }
.formwrap--wide { max-width: 960px; }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-img);
  padding: clamp(26px, 4vw, 48px);
}
.field { margin-bottom: 20px; }
.field label { display: block; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 8px; }
.field .req { color: var(--purple); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--bone); border: 1.5px solid var(--line); border-radius: 12px;
  padding: 13px 16px; transition: border-color .3s var(--ease), background .3s var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--purple); background: var(--white);
}
.field textarea { min-height: 130px; resize: vertical; }
.field input[type="file"] { padding: 11px 14px; background: var(--white); cursor: pointer; }
.field small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 6px; }
.field .err-text { color: #8A2B2B; font-size: 13px; margin-top: 6px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.form-foot { margin-top: 10px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.form-note { font-size: 14px; color: var(--ink-soft); }
.form-note a { color: var(--purple); font-weight: 600; }

/* ---------- Password show/hide ---------- */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 50px; }
.pw-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; display: grid; place-items: center;
  color: var(--muted); border-radius: 9px; transition: color .2s var(--ease), background .2s var(--ease);
}
.pw-toggle:hover { color: var(--ink); background: var(--bone-2); }
.pw-toggle svg { width: 20px; height: 20px; pointer-events: none; }
.pw-toggle .icon-off { display: none; }
.pw-toggle.is-visible .icon-on { display: none; }
.pw-toggle.is-visible .icon-off { display: block; }
/* dark admin login variant */
.adminlogin .pw-toggle:hover { background: rgba(255,255,255,.08); color: #fff; }

.alert-inline {
  background: #F6E7E7; color: #8A2B2B; border: 1px solid #E1BEBE;
  border-radius: 12px; padding: 12px 16px; font-size: 14px; margin-bottom: 22px;
}
.alert-inline ul { margin-left: 18px; list-style: disc; }

/* ---------- Auth split ---------- */
.auth { min-height: 78vh; display: grid; place-items: center; padding: 130px 0 80px; }
.auth .card { width: 100%; max-width: 460px; }
.auth h1 { font-family: var(--font-display); text-transform: uppercase; font-size: 42px; line-height: 1; }
.auth p.sub { color: var(--ink-soft); margin: 8px 0 26px; }

/* ---------- Status pills ---------- */
.status {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600;
  letter-spacing: .03em; text-transform: capitalize; padding: 5px 13px; border-radius: 999px;
  background: var(--bone-2); color: var(--ink-soft);
}
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status--submitted, .status--new      { background: #E8EAF6; color: #3B3E9E; }
.status--under_review, .status--in_review, .status--reviewed { background: #FFF3DC; color: #8A5A00; }
.status--shortlisted, .status--contacted, .status--matched   { background: #E7F1EA; color: #1E5B38; }
.status--hired, .status--open          { background: #DCEFE4; color: #14713F; }
.status--rejected, .status--closed, .status--archived        { background: #F6E7E7; color: #8A2B2B; }

/* ---------- Dashboard ---------- */
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 34px; }
.stat-card {
  background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 24px 26px;
}
.stat-card b { font-family: var(--font-display); font-size: 46px; line-height: 1; color: var(--ink); display: block; }
.stat-card span { font-size: 13.5px; color: var(--ink-soft); letter-spacing: .03em; }
.stat-card a { color: var(--purple); }

/* ---------- Data tables ---------- */
.tablewrap { margin-top: 26px; overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--white); }
table.data { width: 100%; border-collapse: collapse; min-width: 640px; }
table.data th, table.data td { text-align: left; padding: 15px 18px; font-size: 14.5px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data th { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); background: var(--bone); }
table.data tr:last-child td { border-bottom: 0; }
table.data tr:hover td { background: var(--bone); }
table.data .row-title { font-weight: 700; }
.tbl-actions { display: flex; gap: 8px; }
.btn-mini {
  font-size: 13px; font-weight: 600; padding: 7px 14px; border-radius: 999px;
  border: 1.4px solid var(--ink); color: var(--ink); background: transparent; display: inline-flex; align-items: center; gap: 6px;
}
.btn-mini:hover { background: var(--ink); color: var(--bone); }
.btn-mini--purple { border-color: var(--purple); color: var(--purple); }
.btn-mini--purple:hover { background: var(--purple); color: var(--white); }
.btn-mini--danger { border-color: #8A2B2B; color: #8A2B2B; }
.btn-mini--danger:hover { background: #8A2B2B; color: #fff; }

.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty svg { width: 46px; height: 46px; margin: 0 auto 14px; color: var(--line); }

/* Scrollable table region (vertical scroll for snapshot lists) */
.tablewrap--scroll { max-height: 460px; overflow-y: auto; }
.tablewrap--scroll table.data thead th { position: sticky; top: 0; z-index: 1; }

/* Themed scrollbars for list containers */
.tablewrap { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.tablewrap::-webkit-scrollbar { height: 9px; width: 9px; }
.tablewrap::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
.tablewrap::-webkit-scrollbar-thumb:hover { background: var(--muted); }
.tablewrap::-webkit-scrollbar-track { background: transparent; }

/* ---------- Pagination ---------- */
.list-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; margin-top: 22px;
}
.list-count { font-size: 13.5px; color: var(--muted); }
.pager { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-left: auto; }
.pager__btn {
  display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600;
  padding: 9px 16px; border-radius: 999px; border: 1.5px solid var(--ink); color: var(--ink);
  transition: background .25s var(--ease), color .25s var(--ease);
}
.pager__btn svg { width: 16px; height: 16px; }
.pager__btn:hover { background: var(--ink); color: var(--bone); }
.pager__btn.is-disabled { opacity: .35; pointer-events: none; }
.pager__pages { display: flex; align-items: center; gap: 6px; }
.pager__pages a {
  display: grid; place-items: center; min-width: 38px; height: 38px; padding: 0 10px;
  border-radius: 10px; font-size: 14.5px; font-weight: 600; color: var(--ink-soft);
  border: 1.5px solid transparent; transition: all .25s var(--ease);
}
.pager__pages a:hover { border-color: var(--line); color: var(--ink); }
.pager__pages a.is-active { background: var(--purple); color: #fff; }
.pager__gap { color: var(--muted); padding: 0 2px; }

/* Pager on the dark admin — inherits fine, but ensure contrast on hover */
.admin__main .pager__btn { border-color: var(--ink); }

/* ---------- Detail view ---------- */
.detail-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; margin-top: 30px; align-items: start; }
.deflist { display: grid; grid-template-columns: 160px 1fr; gap: 10px 18px; font-size: 15px; }
.deflist dt { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
.deflist dd { color: var(--ink); }
.prose { white-space: pre-line; color: var(--ink-soft); line-height: 1.7; }

/* ============================================================
   ADMIN
   ============================================================ */
.admin { min-height: 100vh; display: grid; grid-template-columns: 264px 1fr; background: var(--bone); }
.admin__side {
  background: var(--ink); color: var(--bone); padding: 28px 22px; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
}
.admin__brand { display: flex; align-items: center; gap: 10px; margin-bottom: 34px; }
.admin__brand img { height: 30px; }
.admin__brand span { font-family: var(--font-display); text-transform: uppercase; font-size: 18px; letter-spacing: .04em; }
.admin__nav { display: flex; flex-direction: column; gap: 4px; }
.admin__nav a {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 11px;
  color: #C7C6BE; font-size: 15px; font-weight: 500; transition: background .25s var(--ease), color .25s var(--ease);
}
.admin__nav a svg { width: 19px; height: 19px; }
.admin__nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.admin__nav a.is-active { background: var(--purple); color: #fff; }
.admin__nav .badge { margin-left: auto; background: var(--purple); color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 8px; }
.admin__nav a.is-active .badge { background: rgba(255,255,255,.25); }
.admin__side-foot { margin-top: auto; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); font-size: 13.5px; color: #9C9B93; }
.admin__side-foot a { color: #C7C6BE; display: block; margin-top: 10px; }
.admin__side-foot a:hover { color: #fff; }

.admin__main { padding: 34px clamp(24px, 4vw, 56px); overflow-x: hidden; }
.admin__top { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.admin__top h1 { font-family: var(--font-display); text-transform: uppercase; font-size: clamp(30px, 4vw, 46px); line-height: 1; }
.admin__top .sub { color: var(--muted); font-size: 14px; margin-top: 4px; }

/* Admin login (standalone) */
.adminlogin { min-height: 100vh; display: grid; place-items: center; background: var(--ink); padding: 30px; }
.adminlogin .card { background: #1E1E1D; border-color: #333; color: var(--bone); width: 100%; max-width: 420px; }
.adminlogin h1 { font-family: var(--font-display); text-transform: uppercase; color: #fff; font-size: 34px; }
.adminlogin .field label { color: #A9A89F; }
.adminlogin .field input { background: #151515; border-color: #3A3A38; color: #fff; }
.adminlogin .field input:focus { border-color: var(--purple); background: #101010; }
.adminlogin .sub { color: #9C9B93; margin: 6px 0 24px; }
.adminlogin a.back { color: #9C9B93; font-size: 13px; }

/* ---------- Footer responsive fix (original CSS never collapsed it) ---------- */
@media (max-width: 900px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 40px 30px; }
  .footer__brand { grid-column: 1 / -1; }
  .footer__brand p { max-width: 460px; }
}
@media (max-width: 540px) {
  .footer__grid { grid-template-columns: 1fr; gap: 34px; }
  .footer__bar { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .cards3 { grid-template-columns: 1fr; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: 1fr; }
  .grid2 { grid-template-columns: 1fr; }
  .admin { grid-template-columns: 1fr; }
  .admin__side {
    position: static; height: auto; flex-direction: row; align-items: center; flex-wrap: wrap;
    gap: 10px 16px; padding: 14px 18px;
  }
  .admin__brand { margin-bottom: 0; }
  .admin__nav { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .admin__nav a { padding: 9px 12px; font-size: 13.5px; }
  .admin__side-foot { margin: 0 0 0 auto; border: 0; padding: 0; }
  .admin__side-foot a { display: inline; margin: 0 0 0 14px; }
  .deflist { grid-template-columns: 1fr; gap: 2px 0; }
  .deflist dd { margin-bottom: 12px; }
}
