/* jobmarket.so — dashboard styles */

/* ---- Base ---- */
body.dash {
  background: #f4f6f9;
  min-height: 100vh;
  font-family: var(--font-body, 'Inter', sans-serif);
}

/* ---- Top header bar ---- */
.dash-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.dash-header-in {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 28px;
  height: 60px;
}
.dash-brand { flex: 0 0 auto; display: flex; align-items: center; }
.dash-brand .logo { height: 30px; width: auto; display: block; }
.dash-header-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 20px;
}
.dash-role-chip {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  background: #e8f4fd;
  color: #1a6fa8;
}
.dash-role-admin { background: #fef3e2; color: #9a6700; }
.dash-user-email {
  font-size: 0.82rem;
  color: #64748b;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

/* ---- Page body ---- */
.dash-body {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  max-width: 1280px;
  margin: 36px auto 64px;
  padding: 0 28px;
}
.dash-body-full {
  grid-template-columns: 1fr;
}

/* ---- Sidebar ---- */
.dash-sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.dash-sidebar-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 28px 22px 24px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.sidebar-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #103a5b 0%, #159fe6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  font-family: var(--font-head, 'IBM Plex Sans', sans-serif);
}
.sidebar-org {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 8px;
}
.sidebar-hint {
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.5;
}
.sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar-link {
  display: block;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 500;
  color: #475569;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.sidebar-link:hover { background: #f1f5f9; color: #103a5b; }

/* ---- Main content area ---- */
.dash-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

/* ---- Cards ---- */
.dash-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px 26px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.dash-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}
.dash-card-head h2 {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.dash-card-form { border-top: 3px solid #159fe6; }

/* ---- Stats ---- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.stat {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  position: relative;
  overflow: hidden;
}
.stat::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: #159fe6;
  border-radius: 0 0 14px 14px;
}
.stat b {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: #103a5b;
  font-family: var(--font-head, 'IBM Plex Sans', sans-serif);
  line-height: 1.1;
  margin-bottom: 4px;
}
.stat span { font-size: 0.78rem; color: #64748b; font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; }
.stat-skeleton { animation: pulse 1.4s ease-in-out infinite; min-height: 82px; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.45} }

/* ---- Status dot ---- */
.dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-warn { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,0.18); }
.dot-ok   { background: #10b981; }

/* ---- Auth (login/sign-up) ---- */
.auth-box { max-width: 430px; margin: 8vh auto 0; padding: 0 16px; }
.auth-box .dash-top { justify-content: center; border-bottom: none; margin-bottom: 20px; padding-bottom: 0; }
.auth-box .dash-card { padding: 32px 32px 36px; border-radius: 18px; }
.auth-tabs { display: flex; gap: 4px; margin-bottom: 22px; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 11px; padding: 4px; }
.auth-tabs button { flex: 1; padding: 9px; border: none; background: transparent; border-radius: 8px; cursor: pointer; font-family: inherit; font-weight: 500; font-size: 0.9rem; color: #64748b; transition: all .15s; }
.auth-tabs button.active { background: #fff; color: #1e293b; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }

/* Patch: auth-box uses old .dash-top class for centering logo */
.dash-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; padding-bottom: 16px; border-bottom: 1px solid #e2e8f0; }
.dash-top .logo { height: 32px; width: auto; }

/* ---- Fields ---- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.83rem; font-weight: 500; margin-bottom: 6px; color: #374151; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid #d1d9e0;
  border-radius: 9px;
  font: inherit;
  font-size: 0.92rem;
  background: #fff;
  color: #1e293b;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: #159fe6;
  box-shadow: 0 0 0 3px rgba(21,159,230,0.12);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input.bad, .field select.bad, .field textarea.bad { border-color: #ef4444; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.req { color: #ef4444; }

/* ---- Messages ---- */
.msg { padding: 13px 16px; border-radius: 10px; font-size: 0.9rem; margin-bottom: 16px; }
.msg.err  { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.msg.ok   { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.msg.info { background: #f8fafc; color: #475569; border: 1px solid #e2e8f0; }

/* ---- Table ---- */
table.dash-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
table.dash-table th, table.dash-table td { text-align: left; padding: 13px 12px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
table.dash-table th { color: #94a3b8; font-weight: 600; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; background: #f8fafc; }
table.dash-table th:first-child { border-radius: 8px 0 0 8px; }
table.dash-table th:last-child  { border-radius: 0 8px 8px 0; }
table.dash-table tbody tr { transition: background .1s; }
table.dash-table tbody tr:hover { background: #f8fafc; }
table.dash-table tbody tr:last-child td { border-bottom: none; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.row-actions button { font-size: 0.78rem; padding: 6px 12px; border-radius: 7px; }

/* ---- Badges ---- */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 600; text-transform: capitalize; white-space: nowrap; }
.badge-pending_review { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.badge-published      { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.badge-rejected       { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.badge-draft          { background: #f8fafc; color: #64748b; border: 1px solid #e2e8f0; }
.badge-archived       { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }

/* ---- Buttons (shared small variant) ---- */
.btn-sm { padding: 7px 14px !important; font-size: 0.82rem !important; }
.btn-block { width: 100%; text-align: center; justify-content: center; }

/* ---- Payment / billing (kept for JS compat) ---- */
.bill-summary { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: #f8fafc; border-radius: 10px; margin-bottom: 16px; }
.pay-methods  { display: grid; gap: 10px; margin-bottom: 14px; }
.pay-opt { display: flex; align-items: center; gap: 12px; padding: 13px; border: 1px solid #e2e8f0; border-radius: 10px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.pay-opt:hover { border-color: #94a3b8; }
.pay-opt.sel   { border-color: #159fe6; box-shadow: 0 0 0 3px rgba(21,159,230,0.12); }
.pay-opt .pm   { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-weight: 700; }

/* ---- Description field ---- */
.field-hint { font-size: 0.78rem; color: #64748b; margin: -2px 0 8px; line-height: 1.5; }
.desc-area {
  min-height: 240px !important;
  line-height: 1.7 !important;
  font-size: 0.94rem !important;
  font-family: 'Inter', sans-serif !important;
  padding: 14px 15px !important;
}

/* ---- File input ---- */
.field-file {
  display: block;
  width: 100%;
  padding: 10px 13px;
  border: 2px dashed #d1d9e0;
  border-radius: 9px;
  font: inherit;
  font-size: 0.88rem;
  color: #475569;
  background: #f8fafc;
  cursor: pointer;
  transition: border-color .15s;
}
.field-file:hover { border-color: #159fe6; }
.field-file-existing { font-size: 0.8rem; color: #166534; margin-top: 6px; }
.file-status { font-size: 0.82rem; margin-top: 6px; min-height: 1px; }
.file-status.ok { color: #166534; font-weight: 500; }
.field-file-existing a { color: #159fe6; }
.upload-progress { font-size: 0.83rem; color: #64748b; margin-top: 6px; }

/* ---- Utility ---- */
.empty { text-align: center; padding: 48px 16px; color: #94a3b8; font-size: 0.9rem; }
.hidden { display: none !important; }
.dash-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---- Featured star (admin table) ---- */
.feat-star { color: #d99a00; font-size: 1rem; }

/* ---- Traffic chart ---- */
.traffic-note { font-size: 0.78rem; color: #94a3b8; }
.tchart { display: flex; align-items: flex-end; gap: 6px; height: 70px; padding: 6px 2px 0; }
.tbar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; }
.tbar span { width: 100%; max-width: 26px; background: linear-gradient(180deg, #159fe6, #103a5b); border-radius: 4px 4px 0 0; transition: opacity .15s; }
.tbar:hover span { opacity: 0.75; }
.tbar small { font-size: 0.62rem; color: #94a3b8; }

/* ---- Employer stats strip ---- */
.emp-stats {
  display: flex;
  gap: 14px;
  margin-bottom: 4px;
}
.emp-stat {
  flex: 1;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.emp-stat b {
  display: block;
  font-size: 1.7rem;
  font-weight: 700;
  color: #103a5b;
  font-family: var(--font-head, 'IBM Plex Sans', sans-serif);
  line-height: 1.1;
}
.emp-stat span { font-size: 0.75rem; color: #64748b; font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; }

/* ---- Employer listing cards ---- */
.emp-listing-grid { display: flex; flex-direction: column; gap: 12px; }
.elc {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 18px;
  transition: box-shadow .15s;
}
.elc:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.elc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.elc-title { font-weight: 600; color: #1e293b; font-size: 0.95rem; }
.elc-org  { font-size: 0.8rem; color: #64748b; margin-top: 2px; }
.elc-meta { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.elc-cat  { font-size: 0.75rem; font-weight: 500; color: #475569; background: #f1f5f9; padding: 3px 9px; border-radius: 999px; }
.elc-deadline { font-size: 0.75rem; color: #94a3b8; }
.elc-note { font-size: 0.8rem; color: #9b2c2c; background: #fef2f2; border-radius: 7px; padding: 7px 10px; margin-bottom: 10px; }
.elc-actions { display: flex; gap: 8px; }
.empty-state { text-align: center; padding: 40px 16px; }
.empty-state p { color: #64748b; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .dash-body { grid-template-columns: 1fr; }
  .dash-sidebar { flex-direction: row; flex-wrap: wrap; }
  .dash-sidebar-card { flex: 1 1 220px; text-align: left; }
  .sidebar-avatar { margin: 0 0 10px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .dash-header-in { padding: 0 16px; }
  .dash-body { padding: 0 14px; margin-top: 24px; }
  .dash-card { padding: 18px 16px; }
  .grid2 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  table.dash-table { display: block; overflow-x: auto; }
  .dash-user-email { display: none; }
}
