/* =====================================================================
   TechShilpo Job Portal — UI styles
   Mobile-first, responsive, no framework dependency.
   ===================================================================== */

:root {
  --brand:      #0b7285;     /* teal */
  --brand-dark: #095c6b;
  --brand-soft: #e3fafc;
  --accent:     #f76707;     /* orange */
  --ink:        #1a2027;
  --muted:      #5c6b7a;
  --line:       #e3e8ee;
  --bg:         #f5f7fa;
  --white:      #ffffff;
  --ok:         #2b8a3e;
  --warn:       #e8590c;
  --danger:     #c92a2a;
  --radius:     12px;
  --shadow:     0 2px 12px rgba(16,42,67,.08);
  --shadow-lg:  0 8px 30px rgba(16,42,67,.12);
  --maxw:       1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hind Siliguri", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 18px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 600; font-size: 15px; cursor: pointer; transition: .15s;
  background: var(--brand); color: #fff;
}
.btn:hover { background: var(--brand-dark); text-decoration: none; }
.btn.accent { background: var(--accent); }
.btn.accent:hover { background: #e8590c; }
.btn.ghost { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn.ghost:hover { background: var(--brand-soft); }
.btn.block { width: 100%; justify-content: center; }
.btn.sm { padding: 7px 13px; font-size: 13px; }
.btn:disabled { opacity: .6; cursor: not-allowed; }

/* ---- Header / nav ---- */
.site-header {
  background: var(--white); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand .logo {
  width: 36px; height: 36px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff; display: grid; place-items: center; font-size: 18px; font-weight: 800;
}
.brand small { color: var(--accent); font-weight: 700; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a { padding: 8px 12px; border-radius: 8px; color: var(--ink); font-weight: 500; }
.nav-links a:hover { background: var(--bg); text-decoration: none; }
.nav-toggle { display: none; background: none; border: 0; font-size: 26px; cursor: pointer; }

/* ---- Hero ---- */
.hero {
  background: linear-gradient(135deg, #0b7285 0%, #1098ad 55%, #0c8599 100%);
  color: #fff; padding: 64px 0 90px;
}
.hero h1 { font-size: clamp(28px, 5vw, 46px); margin: 0 0 12px; line-height: 1.15; }
.hero p { font-size: 18px; opacity: .95; max-width: 640px; margin: 0 0 26px; }
.hero .pill { display:inline-block; background: rgba(255,255,255,.18); padding: 5px 14px; border-radius: 999px; font-weight:600; font-size:14px; margin-bottom:16px;}

/* ---- Search bar ---- */
.search-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 14px; display: grid; grid-template-columns: 2fr 1.3fr auto; gap: 10px;
  max-width: 880px;
}
.search-card input, .search-card select {
  border: 1px solid var(--line); border-radius: 9px; padding: 12px 14px; font-size: 15px; width: 100%;
  color: var(--ink); background: #fff;
}
.search-card input:focus, .search-card select:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }

/* ---- Sections ---- */
section { padding: 48px 0; }
.section-head { display:flex; align-items:end; justify-content:space-between; margin-bottom: 22px; flex-wrap: wrap; gap: 10px;}
.section-head h2 { margin: 0; font-size: 26px; }
.section-head p { margin: 4px 0 0; color: var(--muted); }

/* ---- Category chips ---- */
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 12px; }
.cat-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; transition: .15s; cursor: pointer;
}
.cat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); text-decoration: none; }
.cat-card .ic { font-size: 24px; }
.cat-card h3 { margin: 8px 0 2px; font-size: 16px; color: var(--ink); }
.cat-card span { color: var(--muted); font-size: 13px; }

/* ---- Job cards ---- */
.job-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 16px; }
.job-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column; gap: 10px; transition: .15s;
}
.job-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.job-card h3 { margin: 0; font-size: 18px; }
.job-card h3 a { color: var(--ink); }
.job-card .company { color: var(--muted); font-weight: 600; font-size: 14px; }
.job-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-dark);
}
.tag.type { background: #fff4e6; color: var(--warn); }
.tag.src  { background: #f1f3f5; color: var(--muted); }
.job-card .desc { color: var(--muted); font-size: 14px; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.job-card .foot { display:flex; align-items:center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 12px; }
.salary { color: var(--ok); font-weight: 700; font-size: 14px; }

/* ---- Layout helpers ---- */
.layout { display: grid; grid-template-columns: 260px 1fr; gap: 22px; align-items: start; }
.card { background:#fff; border:1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.filters label { display:block; font-size: 13px; font-weight: 600; margin: 12px 0 5px; color: var(--muted); }
.filters input, .filters select { width: 100%; padding: 10px 12px; border:1px solid var(--line); border-radius: 9px; }

/* ---- Forms ---- */
.form-wrap { max-width: 460px; margin: 40px auto; }
.form-wrap.wide { max-width: 720px; }
.field { margin-bottom: 16px; }
.field label { display:block; font-weight:600; font-size:14px; margin-bottom:6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px; border:1px solid var(--line); border-radius: 9px; font-size: 15px; font-family: inherit;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.muted { color: var(--muted); }
.row2 { display:grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ---- Alerts / badges ---- */
.alert { padding: 12px 16px; border-radius: 9px; margin-bottom: 16px; font-size: 14px; display:none; }
.alert.show { display:block; }
.alert.error { background:#fff5f5; color: var(--danger); border:1px solid #ffc9c9; }
.alert.ok    { background:#ebfbee; color: var(--ok); border:1px solid #b2f2bb; }
.badge { padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge.applied { background:#e7f5ff; color:#1971c2; }
.badge.reviewed { background:#fff9db; color:#e67700; }
.badge.shortlisted { background:#ebfbee; color:#2b8a3e; }
.badge.rejected { background:#fff5f5; color:#c92a2a; }
.badge.hired { background:#d3f9d8; color:#2b8a3e; }
.badge.pending { background:#fff9db; color:#e67700; }
.badge.approved { background:#ebfbee; color:#2b8a3e; }

/* ---- Tables ---- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
.table-wrap { overflow-x: auto; }

/* ---- Tabs ---- */
.tabs { display:flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 20px; flex-wrap: wrap; }
.tab { padding: 10px 16px; cursor: pointer; border-bottom: 3px solid transparent; font-weight: 600; color: var(--muted); }
.tab.active { color: var(--brand); border-color: var(--brand); }
.tab-panel { display:none; }
.tab-panel.active { display:block; }

/* ---- Stats ---- */
.stat-grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap: 14px; }
.stat { background:#fff; border:1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.stat .n { font-size: 30px; font-weight: 800; color: var(--brand); }
.stat .l { color: var(--muted); font-size: 13px; }

/* ---- Footer ---- */
.site-footer { background: #0c1b22; color: #c3ced6; padding: 40px 0 24px; margin-top: 50px; }
.site-footer a { color: #9bd3dd; }
.foot-grid { display:grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
.site-footer h4 { color:#fff; margin: 0 0 12px; }
.site-footer .copy { border-top: 1px solid #1c2e37; margin-top: 28px; padding-top: 16px; font-size: 13px; }

/* ---- Misc ---- */
.center { text-align: center; }
.spinner { border: 3px solid var(--brand-soft); border-top-color: var(--brand); border-radius: 50%;
  width: 34px; height: 34px; animation: spin .8s linear infinite; margin: 30px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align:center; color: var(--muted); padding: 40px 0; }
.pagination { display:flex; gap: 8px; justify-content:center; margin-top: 28px; flex-wrap: wrap; }
.pagination button { padding: 8px 14px; border:1px solid var(--line); background:#fff; border-radius: 8px; cursor:pointer; }
.pagination button.active { background: var(--brand); color:#fff; border-color: var(--brand); }
.pagination button:disabled { opacity:.5; cursor: not-allowed; }
.hidden { display: none !important; }

/* ---- CV builder ---- */
.cv-layout { display:grid; grid-template-columns: 420px 1fr; gap: 22px; align-items: start; }
.cv-form .field { margin-bottom: 12px; }
.cv-form h3 { margin: 18px 0 8px; font-size: 16px; }
.cv-repeat { border:1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 10px; background:#fafcfe; }
.cv-preview-wrap { position: sticky; top: 84px; }
.tmpl-picker { display:flex; gap:8px; flex-wrap:wrap; margin-bottom: 12px; }
.tmpl-chip { padding:7px 13px; border:1px solid var(--line); border-radius:8px; cursor:pointer; font-size:13px; font-weight:600; background:#fff; }
.tmpl-chip.active { background: var(--brand); color:#fff; border-color: var(--brand); }

/* The printable CV document */
.cv-doc { background:#fff; width: 100%; max-width: 800px; margin: 0 auto; box-shadow: var(--shadow-lg);
  color:#222; font-size: 13.5px; line-height: 1.5; min-height: 1000px; }
.cv-doc h1 { margin:0; font-size: 28px; }
.cv-doc h2 { font-size: 15px; letter-spacing:.04em; text-transform: uppercase; margin: 18px 0 8px; }
.cv-doc .cv-contact { font-size: 12.5px; color:#555; }
.cv-doc .cv-item { margin-bottom: 12px; }
.cv-doc .cv-item .role { font-weight: 700; }
.cv-doc .cv-item .meta { color:#666; font-size: 12.5px; }
.cv-doc .cv-skills { display:flex; flex-wrap:wrap; gap:6px; }
.cv-doc .cv-skills span { background:#eef3f6; padding:3px 10px; border-radius:999px; font-size:12px; }

/* modern */
.cv-modern { padding: 0; }
.cv-modern .cv-head { background: linear-gradient(135deg,#0b7285,#1098ad); color:#fff; padding: 30px 36px; }
.cv-modern .cv-head h1 { color:#fff; } .cv-modern .cv-head .cv-contact { color:#e3fafc; }
.cv-modern .cv-body { padding: 24px 36px; }
.cv-modern h2 { color: var(--brand); border-bottom:2px solid var(--brand-soft); padding-bottom:4px; }

/* classic */
.cv-classic { padding: 40px 44px; font-family: Georgia,'Times New Roman',serif; }
.cv-classic .cv-head { text-align:center; border-bottom:3px double #333; padding-bottom:12px; }
.cv-classic h2 { border-bottom:1px solid #999; }

/* minimal */
.cv-minimal { padding: 44px 48px; }
.cv-minimal .cv-head h1 { font-weight: 400; letter-spacing: .02em; }
.cv-minimal h2 { color:#111; font-weight:600; border:0; padding:0; }

/* elegant */
.cv-elegant { padding: 38px 42px; }
.cv-elegant .cv-head { border-left: 6px solid var(--accent); padding-left: 16px; }
.cv-elegant h2 { color: var(--accent); }

/* two-column */
.cv-twocolumn { display:grid; grid-template-columns: 240px 1fr; min-height: 1000px; }
.cv-twocolumn .cv-side { background:#0c1b22; color:#dbe6ec; padding: 28px 22px; }
.cv-twocolumn .cv-side h1 { color:#fff; font-size: 22px; }
.cv-twocolumn .cv-side h2 { color:#7fd4e0; border:0; }
.cv-twocolumn .cv-side .cv-skills span { background:#15333d; color:#cfe8ee; }
.cv-twocolumn .cv-main { padding: 28px 30px; }
.cv-twocolumn .cv-main h2 { color: var(--brand); }

@media (max-width: 980px) { .cv-layout { grid-template-columns: 1fr; } .cv-preview-wrap { position: static; } }

/* Print: only the CV document */
@media print {
  body * { visibility: hidden !important; }
  #printArea, #printArea * { visibility: visible !important; }
  #printArea { position: absolute; left:0; top:0; width:100%; }
  .cv-doc { box-shadow:none !important; max-width:none; }
  @page { margin: 0; size: A4; }
}

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0; background:#fff; flex-direction: column;
    align-items: stretch; padding: 10px 18px; border-bottom: 1px solid var(--line); display: none;
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .search-card { grid-template-columns: 1fr; }
  .layout { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .row2 { grid-template-columns: 1fr; }
}
