/* ============================================================
   home-api.css — Dedicated Home page styles with API states
   ============================================================ */

:root {
  --home-bg: #eef2ff;
  --home-card: #ffffff;
  --home-text: #1a1a2e;
  --home-muted: #6b7280;
  --home-blue: #2b5ce6;
  --home-blue-dark: #1a3fbf;
  --home-blue-soft: #dbe5ff;
  --home-border: #d0dcff;
  --home-shadow: 0 18px 48px rgba(43, 92, 230, 0.08);
  --home-success: #1a9e3f;
  --home-warning: #d97706;
  --home-danger: #dc2626;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: linear-gradient(180deg, #f7f9ff 0%, #eef2ff 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--home-text);
}

a { color: inherit; }
button, input, select { font: inherit; }

nav {
  position: sticky;
  top: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 32px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(208, 220, 255, 0.95);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.logo-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--home-blue-dark), var(--home-blue));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  box-shadow: 0 12px 30px rgba(43, 92, 230, 0.2);
}

.nav-logo span {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--home-blue-dark);
}

.nav-center {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  flex: 1;
}

.nav-tab {
  border: 1px solid transparent;
  background: transparent;
  color: rgba(26, 26, 46, 0.7);
  font-size: 15px;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: 999px;
  cursor: pointer;
  transition: 0.22s ease;
}

.nav-tab:hover,
.nav-tab.active {
  background: rgba(43, 92, 230, 0.12);
  color: var(--home-blue);
  border-color: rgba(43, 92, 230, 0.12);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-location,
.notif-btn,
.avatar,
.home-auth-link,
.home-auth-cta {
  flex-shrink: 0;
}

.nav-location {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(43, 92, 230, 0.08);
  color: rgba(26, 26, 46, 0.72);
  border: 1px solid rgba(43, 92, 230, 0.16);
  font-weight: 600;
  cursor: pointer;
}

.notif-btn,
.avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(43, 92, 230, 0.16);
  background: rgba(255, 255, 255, 0.98);
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.notif-dot {
  position: absolute;
  top: 11px;
  right: 11px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  border: 2px solid #fff;
}

.avatar {
  background: linear-gradient(135deg, var(--home-blue-dark), var(--home-blue));
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  overflow: visible;
}

#avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  pointer-events: none;
}

#avatar-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* A loaded photo always replaces its text/icon fallback. */
#avatar-img:not(.is-hidden) + #avatar-letter,
#sb-avatar-img:not(.is-hidden) + #sb-avatar-fallback,
#profile-photo-img:not(.is-hidden) + #profile-photo-fallback {
  display: none !important;
}

.avatar-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 210px;
  display: none;
  flex-direction: column;
  padding: 10px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(208, 220, 255, 0.95);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  z-index: 20;
}

.avatar-menu.open { display: flex; }
.avatar-menu a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--home-text);
  padding: 11px 12px;
  border-radius: 12px;
}
.avatar-menu a:hover { background: #eef2ff; }
.divider-line {
  height: 1px;
  background: var(--home-border);
  margin: 6px 0;
}

.home-auth-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.home-auth-link,
.home-auth-cta {
  text-decoration: none;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  padding: 11px 18px;
}

.home-auth-link {
  color: var(--home-blue);
  border: 1.5px solid var(--home-border);
  background: rgba(255, 255, 255, 0.98);
}

.home-auth-cta {
  color: #fff;
  border: none;
  background: linear-gradient(135deg, var(--home-blue-dark), var(--home-blue));
  box-shadow: 0 12px 26px rgba(43, 92, 230, 0.18);
}

.is-hidden,
[hidden] {
  display: none !important;
}

.is-inline-flex {
  display: inline-flex !important;
}

body.modal-open {
  overflow: hidden;
}

.job-count-label {
  font-size: 14px;
  color: #888;
  font-weight: 500;
}

/* ============================================================
   home.css — RozgarOne Home / Dashboard Page Styles
   ============================================================ */

/* ── HERO BANNER ── */
.hero {
  background: linear-gradient(135deg, #1A3FBF 0%, #2B5CE6 60%, #4f7ef7 100%);
  padding: 48px 40px 56px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  pointer-events: none;
}
.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  position: relative;
  z-index: 1;
}
.hero-left h1 { color: #fff; font-size: 28px; font-weight: 800; margin-bottom: 8px; }
.hero-title {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  line-height: 1.15;
  max-width: 100%;
  word-break: break-word;
}
.hero-title #hero-name {
  min-width: 0;
  overflow-wrap: anywhere;
}
.hero-title-emoji {
  flex: 0 0 auto;
}
.hero-left p  { color: rgba(255,255,255,.8); font-size: 15px; margin-bottom: 20px; }

.search-bar {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,.95);
  border-radius: 30px; padding: 8px 8px 8px 20px;
  max-width: 520px;
  box-shadow: 0 8px 32px rgba(0,0,0,.15);
}
.search-bar input {
  flex: 1; border: none; background: transparent;
  font-size: 14px; outline: none; color: #1a1a2e;
}
.search-bar input::placeholder { color: #aab; }
.search-bar button {
  background: linear-gradient(135deg, #1A3FBF, #2B5CE6);
  color: #fff; border: none; border-radius: 30px;
  padding: 10px 24px; font-size: 14px; font-weight: 700; cursor: pointer;
}

.hero-stats { display: flex; gap: 32px; margin-top: 24px; flex-wrap: wrap; }
.hero-stat .num { font-size: 22px; font-weight: 800; color: #fff; }
.hero-stat .lbl { font-size: 12px; color: rgba(255,255,255,.7); margin-top: 2px; }

.hero-right { display: flex; gap: 12px; flex-shrink: 0; }
.hero-card {
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 16px; padding: 20px 24px;
  color: #fff; min-width: 130px; text-align: center;
}
.hero-card .hc-icon { font-size: 26px; margin-bottom: 8px; }
.hero-card .hc-val  { font-size: 20px; font-weight: 800; }
.hero-card .hc-lbl  { font-size: 11px; opacity: .8; }

/* ── MAIN LAYOUT ── */
.main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 40px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
}

/* ── FILTER CHIPS ── */
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.chip {
  padding: 8px 18px; border-radius: 30px; font-size: 14px; font-weight: 500;
  cursor: pointer; border: 1.5px solid #D0DCFF; background: #fff;
  color: #555; transition: all .2s;
}
.chip.active, .chip:hover { background: #2B5CE6; color: #fff; border-color: #2B5CE6; }

/* ── SECTION HEADER ── */
.sec-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.sec-header h2 { font-size: 18px; font-weight: 800; color: #1a1a2e; }
.see-all { color: #2B5CE6; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; }
.see-all:hover { text-decoration: underline; }

/* ── JOB CARD ── */
.job-card {
  background: #fff; border-radius: 16px; padding: 20px;
  box-shadow: 0 2px 16px rgba(43,92,230,.07);
  border: 1px solid transparent; transition: all .2s;
  cursor: pointer; margin-bottom: 16px;
}
.job-card:hover {
  border-color: #2B5CE6;
  box-shadow: 0 4px 24px rgba(43,92,230,.14);
  transform: translateY(-2px);
}
.jc-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 10px; }
.jc-company { display: flex; align-items: center; gap: 10px; }
.company-logo {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0; background: #EAF0FF;
}
.jc-company-name { font-size: 13px; color: #888; }
.jc-title { font-size: 17px; font-weight: 800; color: #1a1a2e; margin: 6px 0 10px; }
.tag {
  font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 8px; white-space: nowrap;
}
.tag-urgent  { background: #FEF3C7; color: #D97706; }
.tag-new     { background: #DCFCE7; color: #16A34A; }
.tag-hot     { background: #FEE2E2; color: #DC2626; }
.jc-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.jc-meta span { font-size: 13px; color: #888; display: flex; align-items: center; gap: 4px; }
.jc-salary { font-size: 20px; font-weight: 800; color: #1A9E3F; }
.jc-salary small { font-size: 13px; font-weight: 400; color: #888; }
.jc-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 14px; padding-top: 14px; border-top: 1px solid #D0DCFF;
}
.apply-btn {
  background: linear-gradient(135deg, #1A3FBF, #2B5CE6);
  color: #fff; border: none; border-radius: 30px;
  padding: 10px 24px; font-size: 14px; font-weight: 700; cursor: pointer;
  transition: opacity .2s;
}
.apply-btn:hover { opacity: .9; }
.save-btn {
  width: 38px; height: 38px; border-radius: 50%;
  background: #EAF0FF; border: 1.5px solid #D0DCFF;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 18px; transition: all .2s;
}
.save-btn:hover { background: #D0DCFF; }
.save-btn.is-busy {
  opacity: .7;
  pointer-events: none;
}

/* ── SKELETON LOADER ── */
.skeleton {
  background: linear-gradient(90deg, #f0f4ff 25%, #e0e8ff 50%, #f0f4ff 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-card {
  background: #fff; border-radius: 16px; padding: 20px;
  margin-bottom: 16px; box-shadow: 0 2px 16px rgba(43,92,230,.07);
}
.sk-line { height: 14px; margin-bottom: 10px; }
.sk-line-42 { width: 42%; }
.sk-line-64 { width: 64%; }
.sk-line-52 { width: 52%; }
.sk-line-gap { margin-top: 8px; }
.sk-title { height: 20px; width: 70%; margin-bottom: 14px; }
.sk-btn   { height: 40px; width: 120px; border-radius: 30px; }
.skeleton-footer {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.skeleton-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
}

/* ── ERROR STATE ── */
.error-state {
  text-align: center; padding: 60px 20px; color: #888;
}
.error-state .err-icon { font-size: 48px; margin-bottom: 12px; }
.error-state h3 { font-size: 18px; font-weight: 700; color: #1a1a2e; margin-bottom: 8px; }
.error-state p  { font-size: 14px; margin-bottom: 20px; }
.retry-btn {
  background: linear-gradient(135deg, #1A3FBF, #2B5CE6);
  color: #fff; border: none; border-radius: 30px;
  padding: 10px 24px; font-size: 14px; font-weight: 700; cursor: pointer;
}

/* ── EMPTY STATE ── */
.empty-state { text-align: center; padding: 60px 20px; color: #888; }
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }

/* ── SIDEBAR ── */
.sidebar {}
.sidebar-card {
  background: #fff; border-radius: 16px; padding: 20px;
  box-shadow: 0 2px 16px rgba(43,92,230,.07); margin-bottom: 20px;
}
.sidebar-card h3 { font-size: 15px; font-weight: 700; color: #1a1a2e; margin-bottom: 16px; }

/* Profile widget */
.profile-widget { text-align: center; padding: 8px 0; }
.pw-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, #1A3FBF, #2B5CE6);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; margin: 0 auto 12px;
}
.pw-name  { font-size: 16px; font-weight: 800; color: #1a1a2e; }
.pw-role  { font-size: 12px; color: #888; margin-top: 2px; }
.pw-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: #EAF0FF; color: #2B5CE6;
  font-size: 11px; font-weight: 600; padding: 4px 12px;
  border-radius: 20px; margin-top: 10px;
}
.pw-stats { display: flex; gap: 0; margin-top: 16px; border-top: 1px solid #D0DCFF; padding-top: 16px; }
.pw-stat  { flex: 1; text-align: center; }
.pw-stat .v { font-size: 18px; font-weight: 800; color: #1a1a2e; }
.pw-stat .l { font-size: 11px; color: #888; margin-top: 2px; }
.pw-stat + .pw-stat { border-left: 1px solid #D0DCFF; }
.edit-profile-btn {
  width: 100%; margin-top: 14px; padding: 9px;
  border-radius: 30px; background: #EAF0FF; color: #2B5CE6;
  border: 1.5px solid #D0DCFF; font-size: 13px; font-weight: 600; cursor: pointer;
}
.edit-profile-btn:hover { background: #D0DCFF; }

/* Quick stats */
.qs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qs-item {
  background: #EAF0FF; border-radius: 12px; padding: 12px;
  display: flex; flex-direction: column; gap: 4px;
}
.qs-item .qi { font-size: 20px; }
.qs-item .qv { font-size: 16px; font-weight: 800; color: #1a1a2e; }
.qs-item .ql { font-size: 11px; color: #888; }

/* Trending */
.trend-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid #D0DCFF; cursor: pointer;
}
.trend-item:last-child { border-bottom: none; }
.trend-rank {
  width: 26px; height: 26px; border-radius: 8px;
  background: #EAF0FF; color: #2B5CE6;
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.trend-info .ti { font-size: 13px; font-weight: 600; color: #1a1a2e; }
.trend-info .ts { font-size: 11px; color: #888; }
.trend-count { margin-left: auto; font-size: 12px; font-weight: 600; color: #2B5CE6; }

/* ── JOB DETAIL MODAL ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,.5);
  display: none; align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff; border-radius: 20px; width: min(560px, calc(100vw - 24px)); box-sizing: border-box;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.modal-header {
  background: linear-gradient(135deg, #1A3FBF, #2B5CE6);
  padding: 24px 28px; border-radius: 20px 20px 0 0;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.modal-header > div:first-child { min-width: 0; }
.modal-header h2 { color: #fff; font-size: 20px; font-weight: 800; }
.modal-header p  { color: rgba(255,255,255,.8); font-size: 13px; margin-top: 4px; }
.modal-header-actions { display: flex; align-items: flex-start; gap: 10px; flex: 0 1 auto; min-width: 0; }
.modal-review-box {
  display: grid; grid-template-columns: auto auto; grid-template-areas: "label stars" "summary summary";
  align-items: center; column-gap: 8px; row-gap: 4px; max-width: 260px; min-height: 30px; padding: 7px 10px;
  border: 1px solid rgba(255,255,255,.42); border-radius: 14px;
  background: rgba(255,255,255,.18); color: #fff;
}
.modal-review-box[hidden] { display: none; }
.modal-review-box span { grid-area: label; font-size: 12px; font-weight: 800; white-space: nowrap; }
.modal-review-stars { grid-area: stars; display: flex; align-items: center; gap: 1px; }
.modal-review-stars button {
  width: 18px; height: 18px; padding: 0; border: 0; background: transparent;
  color: rgba(255,255,255,.55); font-size: 16px; line-height: 1; cursor: pointer;
}
.modal-review-stars button:hover,
.modal-review-stars button.active { color: #ffd84d; }
.modal-review-box small { grid-area: summary; min-width: 0; color: rgba(255,255,255,.82); font-size: 11px; line-height: 1.35; overflow-wrap: anywhere; }
.modal-review-box.is-saving { opacity: .72; pointer-events: none; }
.modal-review-box.is-reviewed { border-color: rgba(255,216,77,.8); background: rgba(255,216,77,.16); }
.modal-close {
  background: rgba(255,255,255,.2); border: none; border-radius: 50%;
  width: 30px; height: 30px; color: #fff; font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.modal-body { padding: 24px 28px; }
.detail-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.detail-chip {
  display: flex; align-items: center; gap: 6px;
  background: #EAF0FF; border: 1px solid #D0DCFF;
  border-radius: 20px; padding: 5px 12px; font-size: 12px; color: #555;
}
.modal-salary { font-size: 26px; font-weight: 800; color: #1A9E3F; margin-bottom: 18px; }
.modal-salary small { font-size: 13px; font-weight: 400; color: #888; }
.modal-section { margin-bottom: 18px; }
.modal-section h4 {
  font-size: 13px; font-weight: 700; color: #1A3FBF;
  letter-spacing: .5px; text-transform: uppercase; margin-bottom: 8px;
}
.modal-section p  { font-size: 14px; color: #555; line-height: 1.7; }
.modal-section ul { padding-left: 18px; }
.modal-section ul li { font-size: 14px; color: #555; margin-bottom: 5px; line-height: 1.6; }
.modal-apply {
  width: 100%; height: 50px;
  background: linear-gradient(135deg, #1A3FBF, #2B5CE6);
  color: #fff; border: none; border-radius: 30px;
  font-size: 15px; font-weight: 700; cursor: pointer; transition: opacity .2s;
}
.modal-apply:hover { opacity: .9; }

/* ── SIGNUP PROMPT MODAL ── */
.signup-prompt-modal {
  background: #fff; border-radius: 20px; width: 100%; max-width: 400px;
  padding: 36px 28px; text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.2); position: relative;
}
.sp-icon  { font-size: 44px; margin-bottom: 14px; }
.sp-title { font-size: 1.3rem; font-weight: 800; color: #1a1a2e; margin-bottom: 8px; }
.sp-sub   { font-size: 13px; color: #666; margin-bottom: 22px; line-height: 1.6; }
.sp-btn-primary {
  display: block; width: 100%;
  background: linear-gradient(135deg, #1A3FBF, #2B5CE6);
  color: #fff; padding: 13px; border-radius: 30px;
  font-size: 14px; font-weight: 700; text-decoration: none; margin-bottom: 10px;
}
.sp-btn-secondary {
  display: block; width: 100%;
  background: #EAF0FF; color: #2B5CE6; padding: 12px; border-radius: 30px;
  font-size: 14px; font-weight: 600; text-decoration: none;
}
.sp-note { font-size: 11px; color: #aab; margin-top: 14px; }

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 32px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #1a1a2e; color: #fff; padding: 12px 24px;
  border-radius: 30px; font-size: 14px; font-weight: 600;
  z-index: 999; transition: transform .3s ease; pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); }

.worker-reset-modal{position:fixed;inset:0;z-index:120;display:none;align-items:center;justify-content:center;padding:24px}
.worker-reset-modal.open{display:flex}
.worker-reset-backdrop{position:absolute;inset:0;background:rgba(17,23,43,.46);backdrop-filter:blur(4px)}
.worker-reset-dialog{position:relative;z-index:1;width:min(620px,calc(100vw - 32px));padding:30px;border:0;border-radius:20px;background:#fff;box-shadow:0 26px 70px rgba(17,31,78,.24);box-sizing:border-box}
.worker-reset-dialog *{box-sizing:border-box}
.worker-reset-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:26px}
.worker-reset-head h2{margin:0;color:#1c2140;font-size:30px;font-weight:500;line-height:1.1}
.worker-reset-x{display:grid;place-items:center;width:42px;height:42px;border:0;border-radius:50%;background:#f2f6ff;color:#1c2140;font:inherit;font-size:34px;font-weight:300;line-height:1;appearance:none;cursor:pointer}
.worker-reset-field{display:block;margin-bottom:18px;color:#606574;font-size:17px;font-weight:500}
.worker-reset-field span{display:block;margin-bottom:8px}
.worker-reset-input-wrap{display:flex;align-items:center;border:1px solid #cfd7e3;background:#fff}
.worker-reset-input-wrap:focus-within{border-color:#3154d5;box-shadow:0 0 0 3px rgba(49,84,213,.12)}
.worker-reset-input-wrap input{flex:1;min-width:0;height:48px;border:0;padding:0 14px;color:#1c2140;background:transparent;font-size:18px;outline:0}
.worker-reset-input-wrap button{height:48px;border:0;padding:0 14px;background:transparent;color:#586072;font:inherit;font-size:13px;font-weight:700;appearance:none;cursor:pointer}
.worker-reset-hint{margin:10px 0 12px;color:#8b93a3;font-size:14px;line-height:1.35;font-weight:500}
.worker-reset-status{min-height:22px;margin:0 0 18px;color:#68728a;font-size:14px;font-weight:600}
.worker-reset-status.error{color:#d93f3f}
.worker-reset-status.loading{color:#3154d5}
.worker-reset-actions{display:flex;align-items:center;gap:16px}
.worker-reset-submit{padding:13px 24px;border:0;border-radius:8px;background:#2e73c8;color:#fff;font:inherit;font-size:18px;font-weight:600;appearance:none;cursor:pointer}
.worker-reset-submit:disabled{opacity:.65;cursor:wait}
.worker-reset-cancel{padding:12px 10px;border:0;background:transparent;color:#2e73c8;font:inherit;font-size:18px;font-weight:500;appearance:none;cursor:pointer}
@media(max-width:560px){.worker-reset-dialog{padding:22px}.worker-reset-head h2{font-size:25px}.worker-reset-field{font-size:15px}.worker-reset-input-wrap input{font-size:16px}.worker-reset-hint{font-size:14px}.worker-reset-actions{align-items:stretch;flex-direction:column}.worker-reset-submit,.worker-reset-cancel{width:100%}}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .main { grid-template-columns: 1fr; padding: 24px 20px; }
  .sidebar { display: none; }
  .hero { padding: 36px 20px 44px; }
  .hero-right { display: none; }
}
@media (max-width: 640px) {
  .hero-stats { gap: 20px; }
  .hero-left h1 { font-size: 22px; }
}


/* ── API/STATE HELPERS ── */
.status-stack {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.status-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #eaf0ff;
  color: var(--home-blue);
}

.status-note.error {
  background: #fee2e2;
  color: var(--home-danger);
}

.status-note.success {
  background: #dcfce7;
  color: var(--home-success);
}

.feed-meta {
  font-size: 13px;
  color: #7c86a2;
}

.job-card-grid {
  display: grid;
  gap: 16px;
}

.job-card.is-browse {
  margin-bottom: 0;
}

.job-card.is-stale {
  border-style: dashed;
}

.meta-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 14px;
}

.empty-state strong,
.error-state strong {
  display: block;
  color: var(--home-text);
  margin-bottom: 6px;
}

.retry-btn,
.secondary-btn {
  background: linear-gradient(135deg, var(--home-blue-dark), var(--home-blue));
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.secondary-btn {
  background: #eaf0ff;
  color: var(--home-blue);
}

#browse-city option,
#browse-skill option {
  background: #fff;
  color: var(--home-text);
}

.section-empty {
  background: #fff;
  border: 1px dashed var(--home-border);
  border-radius: 18px;
  padding: 28px;
  text-align: center;
  color: var(--home-muted);
}

.section-empty-full {
  width: 100%;
}

.worker-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 40px;
}

.browse-hero,
.applications-hero {
  margin-bottom: 24px;
}

.browse-hero {
  border-radius: 20px;
  padding: 32px;
  background: linear-gradient(135deg, var(--home-blue-dark), var(--home-blue));
  color: #fff;
}

.browse-hero h2,
.applications-hero h2 {
  margin: 0 0 8px;
  font-weight: 900;
}

.browse-hero h2 {
  font-size: 24px;
}

.browse-hero p,
.applications-hero p {
  margin: 0;
  line-height: 1.7;
}

.browse-hero p {
  margin-bottom: 20px;
  color: rgba(255, 255, 255, .82);
}

.browse-search-row,
.applications-filter-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(160px, 1fr));
  gap: 14px;
  margin: 18px 0 24px;
}

.browse-search-box,
.browse-select,
.applications-filter-grid input,
.applications-filter-grid select {
  width: 100%;
  min-height: 48px;
  border: 1.5px solid var(--home-border);
  border-radius: 16px;
  background: #fff;
  color: var(--home-text);
  padding: 0 16px;
  outline: none;
}

.browse-hero .browse-search-box,
.browse-hero .browse-select {
  border: none;
  background: rgba(255, 255, 255, .15);
  color: #fff;
}

.browse-hero .browse-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.browse-hero .browse-search-box input {
  width: 100%;
  border: 0;
  background: transparent;
  color: #fff;
  outline: none;
}

.browse-hero .browse-search-box input::placeholder {
  color: rgba(255, 255, 255, .72);
}

.browse-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 22px;
}

.browse-filters {
  background: #fff;
  border: 1px solid var(--home-border);
  border-radius: 18px;
  padding: 18px;
  align-self: start;
}

.browse-filter-head,
.browse-results-head,
.applications-history-top,
.skills-tab-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.browse-filter-head span,
.browse-results-head span {
  color: var(--home-muted);
  font-size: 14px;
}

.browse-results-head {
  min-height: 44px;
  margin-bottom: 16px;
  padding: 0 4px;
}

#browse-sort {
  min-width: 210px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--home-border);
  border-radius: 8px;
  background: #fff;
  color: var(--home-text);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

#browse-sort:focus {
  outline: 2px solid rgba(43, 92, 230, 0.22);
  outline-offset: 2px;
}

@media (max-width: 760px) {
  .browse-layout {
    grid-template-columns: 1fr;
  }

  .browse-results-head {
    align-items: stretch;
  }

  #browse-sort {
    width: 100%;
  }
}

.browse-filter-head span {
  color: var(--home-text);
  font-weight: 800;
}

.browse-filter-head button {
  border: 0;
  background: transparent;
  color: var(--home-blue);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.browse-filter-group {
  margin-top: 18px;
}

.browse-filter-label {
  display: block;
  margin-bottom: 10px;
  color: var(--home-text);
  font-size: 13px;
  font-weight: 800;
}

.browse-salary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
  color: var(--home-muted);
  font-size: 12px;
}

#salary-range,
.browse-check input {
  accent-color: var(--home-blue);
}

.browse-check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--home-muted);
  font-size: 14px;
  margin: 8px 0;
}

.worker-panel,
.applications-history-card {
  background: #fff;
  border: 1px solid var(--home-border);
  border-radius: 22px;
  padding: 24px;
  box-shadow: var(--home-shadow);
}

.worker-panel h3,
.applications-history-card h3 {
  margin: 0;
  color: var(--home-text);
  font-size: 22px;
  font-weight: 900;
}

.skills-add-btn {
  border: none;
  border-radius: 999px;
  background: #eaf0ff;
  color: var(--home-blue);
  padding: 12px 22px;
  font-weight: 800;
  cursor: pointer;
}

.skills-tab-list {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.skills-tab-empty,
.skills-tab-row {
  border: 1px solid var(--home-border);
  border-radius: 14px;
  padding: 18px;
}

.skills-tab-empty {
  color: var(--home-muted);
  font-size: 15px;
  font-weight: 700;
}

.skills-tab-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.skills-tab-title {
  font-size: 18px;
  font-weight: 900;
  color: var(--home-text);
}

.skills-tab-meta {
  margin-top: 4px;
  font-size: 13px;
  color: #777;
}

.skills-tab-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.skills-tab-edit,
.skills-tab-delete {
  border: none;
  border-radius: 14px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.skills-tab-edit {
  background: #eaf0ff;
  color: var(--home-blue);
}

.skills-tab-delete {
  background: #fee2e2;
  color: #b91c1c;
}

.skills-add-card {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 22px;
  border: 2px dashed var(--home-border);
  border-radius: 18px;
  padding: 20px;
  cursor: pointer;
}

.skills-add-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #eaf0ff;
  color: var(--home-text);
  font-size: 24px;
  font-weight: 800;
}

.skills-add-card strong {
  display: block;
  color: var(--home-blue);
  font-size: 17px;
}

.skills-add-card span span {
  display: block;
  color: #777;
  font-size: 13px;
}

.applications-hero {
  margin-bottom: -82px;
  padding: 28px 28px 110px;
  border-radius: 24px;
  background: linear-gradient(135deg, #3154d5, #4169ea);
  color: #fff;
  box-shadow: 0 18px 46px rgba(58, 82, 170, .15);
}

.applications-hero > div {
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  opacity: .9;
}

.applications-hero h2 {
  font-size: 30px;
}

.applications-hero p {
  max-width: 720px;
  color: #dfe7ff;
  font-size: 15px;
}

.applications-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin: 20px 0;
}

.applications-stat-card {
  background: #fff;
  border: 1px solid var(--home-border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(43, 92, 230, .08);
}

.applications-stat-card div {
  margin-bottom: 10px;
  color: #888;
  font-size: 13px;
}

.applications-stat-card strong {
  display: block;
  color: var(--home-blue);
  font-size: 32px;
  font-weight: 800;
}

.applications-table-scroll {
  overflow-x: auto;
  margin-top: 16px;
}

.applications-history-top {
  align-items: flex-end;
  margin-bottom: 18px;
}

.applications-history-card p {
  margin: 6px 0 0;
  color: #7d88a7;
  font-size: 14px;
}

.applications-table {
  min-width: 850px;
}

.applications-table-head,
.application-row-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr .8fr .8fr .6fr;
  gap: 14px;
  align-items: center;
}

.applications-table-head {
  padding: 14px 20px;
  border-radius: 16px;
  background: var(--home-blue);
  color: #fff;
  font-weight: 800;
}

.application-row-grid {
  padding: 18px 20px;
  border-bottom: 1px solid #eef2ff;
}

.applications-empty-note {
  padding: 24px 8px;
  color: #6f7a94;
  font-size: 15px;
  font-weight: 700;
}

.application-company-name,
.application-job-title,
.application-date {
  color: var(--home-text);
  font-weight: 800;
}

.application-company-name,
.application-job-title {
  font-size: 16px;
}

.application-date {
  font-size: 15px;
}

.application-location,
.application-date-label {
  margin-top: 4px;
  color: #7d88a7;
}

.application-location {
  font-size: 13px;
}

.application-date-label {
  font-size: 12px;
}

.application-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.application-status-pill.status-applied {
  background: #e6f5ff;
  color: #2580c4;
}

.application-status-pill.status-under_review {
  background: #fff0cf;
  color: #bf8300;
}

.application-status-pill.status-shortlisted {
  background: #dcfce7;
  color: #15803d;
}

.application-status-pill.status-selected {
  background: #dcf8e7;
  color: #209255;
}

.application-status-pill.status-rejected {
  background: #ffe3e3;
  color: #d14949;
}

.application-action-button {
  min-width: 110px;
  padding: 10px 14px;
  border: none;
  border-radius: 12px;
  background: var(--home-blue);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.application-action-button.status-selected {
  background: var(--home-success);
}

.application-history-overlay.open {
  display: flex;
}

.application-history-modal {
  width: min(980px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100vh - 32px);
  padding: 24px;
  overflow: auto;
}

.application-history-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 20px;
}

.application-history-company {
  color: var(--home-text);
  font-size: 20px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.application-history-close {
  align-self: flex-start;
}

.application-history-body {
  display: grid;
  gap: 18px;
}

.application-history-grid,
.application-history-detail-grid {
  display: grid;
  grid-template-columns: minmax(200px, 0.8fr) minmax(0, 1.45fr);
  gap: 14px;
}

.application-history-grid {
  align-items: start;
}

.application-history-detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.application-history-panel,
.application-history-tile {
  border: 1px solid var(--home-border);
  border-radius: 16px;
  padding: 18px;
}

.application-history-panel.primary {
  background: #f8faff;
}

.application-history-kicker {
  color: var(--home-blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.application-history-title,
.application-history-value {
  margin-top: 6px;
  color: var(--home-text);
  font-weight: 900;
}

.application-history-title {
  font-size: 22px;
}

.application-history-sub,
.application-history-copy {
  margin-top: 6px;
  color: var(--home-muted);
}

.application-history-pill {
  grid-column: 1 / -1;
  margin: 0;
  padding: 16px 18px;
  border: 1px solid #d4e0ff;
  border-radius: 16px;
  background: #eaf0ff;
}

.centered {
  text-align: center;
}

.application-history-two {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.application-history-copy,
.application-history-value,
.application-history-sub,
.application-history-title {
  overflow-wrap: anywhere;
}

@media (max-width: 720px) {
  .application-history-modal {
    width: min(calc(100% - 20px), 560px);
    max-height: calc(100vh - 20px);
    padding: 18px;
  }

  .application-history-grid,
  .application-history-detail-grid,
  .application-history-two {
    grid-template-columns: 1fr;
  }

  .application-history-pill,
  .application-history-two {
    grid-column: auto;
  }

  .application-history-close {
    width: 100%;
  }
}

.signup-prompt-icon {
  font-size: 44px;
  margin-bottom: 14px;
}

.signup-prompt-title {
  margin: 0 0 8px;
  font-size: 1.3rem;
  font-weight: 800;
}

.signup-prompt-copy,
.signup-prompt-note {
  color: var(--home-muted);
}

.signup-prompt-copy {
  margin: 0 0 22px;
  font-size: 13px;
  line-height: 1.6;
}

.signup-prompt-actions {
  display: grid;
  gap: 10px;
}

.signup-prompt-primary,
.signup-prompt-secondary {
  display: block;
  border-radius: 999px;
  padding: 12px 16px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
}

.signup-prompt-primary {
  background: linear-gradient(135deg, var(--home-blue-dark), var(--home-blue));
  color: #fff;
}

.signup-prompt-secondary {
  background: #eaf0ff;
  color: var(--home-blue);
}

.signup-prompt-note {
  margin-top: 14px;
  font-size: 11px;
}

.browse-shell-card {
  background: #fff;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 2px 16px rgba(43, 92, 230, 0.07);
}

@media (max-width: 1200px) {
  nav {
    padding: 14px 20px;
    flex-wrap: wrap;
  }

  .nav-center {
    order: 3;
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 1024px) {
  .status-stack {
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  nav {
    gap: 14px;
    padding: 12px 14px;
  }

  .logo-icon {
    width: 44px;
    height: 44px;
    font-size: 24px;
  }

  .nav-logo span {
    font-size: 20px;
  }

  .nav-tab {
    padding: 10px 16px;
    font-size: 14px;
  }

  .nav-location {
    display: none;
  }

  #section-browse,
  #section-skills,
  #section-applications {
    padding: 24px 16px !important;
  }
}

@media (max-width: 640px) {
  .home-auth-actions {
    width: 100%;
    justify-content: stretch;
  }

  .home-auth-link,
  .home-auth-cta {
    flex: 1;
    text-align: center;
  }
}


#sb-avatar-img,
#profile-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

#sb-avatar-fallback,
#profile-photo-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.profile-editor-card {
  width: min(980px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: #fff;
  border-radius: 28px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.22);
  padding: 28px;
}

.profile-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.profile-editor-close {
  width: 42px;
  height: 42px;
  background: var(--home-blue-soft);
  border: 1px solid var(--home-border);
  color: var(--home-text);
  font-size: 25px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 6px 16px rgba(5, 78, 59, 0.1);
}

.profile-editor-close:hover,
.profile-editor-close:focus-visible {
  background: var(--home-text);
  color: #fff;
  outline: none;
}

.profile-editor-kicker {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--home-blue);
  margin-bottom: 6px;
}

.profile-editor-head h2 {
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: 800;
  color: var(--home-text);
}

.profile-editor-head p {
  margin: 0;
  font-size: 14px;
  color: var(--home-muted);
  line-height: 1.6;
}

.profile-editor-status {
  margin-bottom: 20px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #eaf0ff;
  color: var(--home-blue);
  font-size: 13px;
  font-weight: 700;
}

.profile-editor-status.success {
  background: #dcfce7;
  color: #15803d;
}

.profile-editor-status.error {
  background: #fee2e2;
  color: #b91c1c;
}

.profile-editor-status.loading {
  background: #eff6ff;
  color: #1d4ed8;
}

.profile-editor-grid {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 22px;
}

.profile-photo-card,
.profile-form-card {
  background: #f8faff;
  border: 1px solid var(--home-border);
  border-radius: 22px;
  padding: 22px;
}

.profile-photo-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.profile-photo-preview {
  position: relative;
  width: 154px;
  height: 154px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--home-blue-dark), var(--home-blue));
  color: #fff;
  font-size: 52px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 16px 34px rgba(43, 92, 230, 0.18);
}

.profile-photo-preview > img,
.profile-photo-preview > span {
  position: absolute;
  inset: 0;
}

.profile-photo-preview > img {
  z-index: 1;
  display: block;
  flex: none;
}

.profile-photo-preview > span {
  z-index: 0;
}

.profile-photo-note {
  margin: 0;
  text-align: center;
  font-size: 12px;
  line-height: 1.6;
  color: var(--home-muted);
}

.profile-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.profile-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.profile-field span {
  font-size: 13px;
  font-weight: 700;
  color: var(--home-text);
}

.profile-change-phone-btn {
  align-self: flex-start;
  margin-top: 2px;
  border: 1px solid var(--home-blue);
  border-radius: 10px;
  background: #fff;
  color: var(--home-blue);
  padding: 9px 13px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.profile-change-phone-btn:hover {
  background: #eef2ff;
}

.profile-phone-otp {
  display: none;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--home-border);
  border-radius: 18px;
  background: #f8faff;
  gap: 12px;
}

.profile-phone-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.54);
}

.profile-phone-modal.open {
  display: flex;
}

.profile-phone-modal-card {
  width: min(100%, 480px);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  border-radius: 24px;
  padding: 24px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.32);
}

.profile-phone-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 8px;
}

.profile-phone-modal-head p {
  margin: 0 0 5px;
  color: var(--home-blue);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.profile-phone-modal-head h3 {
  margin: 0;
  color: var(--home-text);
  font-size: 23px;
}

.profile-phone-modal-copy {
  margin: 0 0 20px;
  color: var(--home-muted);
  font-size: 14px;
  line-height: 1.5;
}

.profile-phone-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 2px 0 0;
}

.profile-phone-modal .profile-phone-otp {
  margin-top: 16px;
}

.profile-phone-modal .profile-phone-otp-status {
  display: block;
  min-height: 18px;
  margin: 12px 0 0;
}

.profile-phone-otp.open {
  display: grid;
}

.profile-phone-otp-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.profile-phone-otp-row input {
  flex: 1 1 180px;
  min-width: 180px;
}

.profile-phone-otp-btn {
  min-width: 132px;
  justify-content: center;
}

.profile-phone-otp-status {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
}

.profile-phone-otp-status.success {
  color: #15803d;
}

.profile-phone-otp-status.error {
  color: #b91c1c;
}

.profile-field input,
.profile-field textarea,
.profile-field select {
  width: 100%;
  border: 1px solid var(--home-border);
  border-radius: 14px;
  padding: 13px 14px;
  background: #fff;
  color: var(--home-text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.profile-field input:focus,
.profile-field textarea:focus,
.profile-field select:focus {
  border-color: var(--home-blue);
  box-shadow: 0 0 0 4px rgba(43, 92, 230, 0.1);
}

.profile-field input[readonly] {
  background: #eef2ff;
  color: #6b7280;
}

.profile-field input.profile-input-editable {
  background: #fff;
  color: var(--home-text);
}

.profile-field-no-margin {
  margin-bottom: 0;
}

.profile-form-grid-single {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-field-full {
  grid-column: 1 / -1;
}

.profile-step-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--home-border);
}

.profile-step-tab {
  border: 1px solid transparent;
  background: #f2f7ff;
  color: #7a879f;
  padding: 14px 20px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.2s ease;
}

.profile-step-tab.active {
  color: var(--home-blue);
  background: #e8f2ff;
  border-color: #d8e7ff;
}

.profile-step-panel {
  display: none;
}

.profile-step-panel.active {
  display: block;
}

.profile-address-card,
.profile-documents-card {
  border-top: 1px solid var(--home-border);
  padding-top: 18px;
  margin-top: 6px;
}

.profile-address-card h3,
.profile-documents-head h3 {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 800;
  color: var(--home-text);
}

.profile-checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 2px;
  font-size: 14px;
  font-weight: 700;
  color: var(--home-text);
}

.profile-checkbox-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--home-blue);
}

.profile-documents-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.profile-documents-head p {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--home-muted);
}

.profile-document-list {
  display: grid;
  gap: 12px;
}

.profile-document-item,
.profile-document-empty {
  border: 1px solid var(--home-border);
  border-radius: 16px;
  background: #fff;
  padding: 14px 16px;
}

.profile-document-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.profile-document-meta {
  min-width: 0;
}

.profile-document-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--home-text);
  word-break: break-word;
}

.profile-document-sub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--home-muted);
}

.profile-document-remove {
  border: none;
  background: #fee2e2;
  color: #b91c1c;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.profile-document-empty {
  text-align: center;
  color: var(--home-muted);
  font-size: 13px;
  font-weight: 600;
}

.profile-skills-block {
  border-top: 1px solid var(--home-border);
  padding-top: 18px;
}

.profile-skills-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.profile-skills-top h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 800;
}

.profile-skills-top p {
  margin: 0;
  font-size: 12px;
  color: var(--home-muted);
}

.profile-add-skill-btn {
  white-space: nowrap;
}

.profile-skill-editor {
  display: none;
  margin-bottom: 16px;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, #4c76d9, #5d88e6);
  border: 1px solid rgba(34, 68, 170, 0.24);
  box-shadow: 0 14px 26px rgba(44, 84, 190, 0.14);
}

.profile-skill-editor.open {
  display: block;
}

.profile-skill-editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 140px;
  gap: 14px;
  align-items: start;
}

.profile-skill-editor .profile-field > span,
.profile-skill-action-wrap > span {
  color: #fff;
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}

.profile-skill-action-wrap {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 0;
}

.profile-skill-save-btn {
  width: 120px;
  height: 47px;
  padding: 0 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  margin-top: 8px;
}

.profile-skill-table {
  display: grid;
  gap: 12px;
}

.profile-skill-table-head,
.profile-skill-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 24px;
  row-gap: 12px;
  align-items: center;
}

.profile-skill-table-head {
  padding: 16px 28px;
  border-radius: 999px;
  background: linear-gradient(135deg, #4c76d9, #5d88e6);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.profile-skill-table-head > span {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.profile-skill-table-head > span:first-child {
  justify-content: flex-start;
  text-align: left;
}

.profile-skill-entry-list {
  display: grid;
  gap: 12px;
}

.profile-skill-entry {
  padding: 18px 24px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(49, 84, 213, 0.08), rgba(65, 105, 234, 0.12));
  border: 1px solid rgba(49, 84, 213, 0.2);
}

.profile-skill-pill-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 47px;
  padding: 0 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, #4c76d9, #648fe8);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  text-align: center;
}

.profile-skill-entry-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
}

.profile-skill-action {
  border: none;
  border-radius: 14px;
  width: 100%;
  min-height: 47px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.profile-skill-action.edit {
  background: linear-gradient(135deg, #4c76d9, #648fe8);
  color: #fff;
}

.profile-skill-action.delete {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  color: #b91c1c;
}

.profile-skill-empty {
  border: 1px dashed var(--home-border);
  border-radius: 18px;
  background: #fff;
  padding: 18px;
  text-align: center;
  color: var(--home-muted);
  font-size: 13px;
  font-weight: 700;
}

.profile-skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-skill-pill {
  border: 1px solid var(--home-border);
  background: #fff;
  color: #54607d;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

.profile-skill-pill.active {
  background: linear-gradient(135deg, var(--home-blue-dark), var(--home-blue));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 12px 22px rgba(43, 92, 230, 0.2);
}

.profile-skill-pill:disabled {
  cursor: progress;
  opacity: 0.7;
}

.profile-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.profile-step-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

#profile-prev-btn[hidden],
#profile-save-btn[hidden] {
  display: none;
}

@media (max-width: 900px) {
  .profile-editor-grid {
    grid-template-columns: 1fr;
  }

  .profile-form-grid,
  .profile-form-grid-single {
    grid-template-columns: 1fr;
  }

  .profile-skill-editor-grid,
  .profile-skill-table-head,
  .profile-skill-entry {
    grid-template-columns: 1fr;
  }

  .profile-skill-entry-actions {
    justify-content: stretch;
  }

  .profile-skill-action {
    width: 100%;
  }

  .profile-documents-head,
  .profile-document-item,
  .profile-form-actions,
  .profile-step-actions {
    flex-direction: column;
    align-items: stretch;
  }
}


.lang-switcher-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(43, 92, 230, 0.08);
  border: 1px solid rgba(43, 92, 230, 0.16);
  color: rgba(26, 26, 46, 0.78);
}

.lang-icon {
  font-size: 14px;
  line-height: 1;
}

.lang-label {
  font-size: 12px;
  font-weight: 700;
}

.lang-select {
  border: none;
  background: transparent;
  color: #1a1a2e;
  font-size: 13px;
  font-weight: 700;
  outline: none;
  cursor: pointer;
}

.home-lang-switcher {
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

@media (max-width: 768px) {
  .home-lang-switcher .lang-label {
    display: none;
  }
}

@media (max-width: 640px) {
  .modal-overlay { align-items: flex-start; padding: 12px; box-sizing: border-box; overflow-y: auto; }
  .modal { width: 100%; max-height: calc(100vh - 24px); margin: auto 0; }
  .modal-header { padding: 18px; flex-direction: column; }
  .modal-header-actions { width: 100%; justify-content: space-between; }
  .modal-review-box { max-width: calc(100% - 40px); }
  .modal-body { padding: 20px 18px; }
}

/* Signed-in worker dashboard theme. Remove this block to restore the blue theme. */
body[data-user-role="worker"] {
  --home-bg: #f8e7c9;
  --home-card: #fffdf7;
  --home-text: #064e3b;
  --home-muted: #617265;
  --home-blue: #064e3b;
  --home-blue-dark: #043b2c;
  --home-blue-soft: #e8f1dc;
  --home-border: #c9d6bb;
  --home-shadow: 0 18px 48px rgba(6, 78, 59, 0.12);
  background: linear-gradient(180deg, #fff8ea 0%, #f8e7c9 100%);
}

body[data-user-role="worker"] nav {
  background: rgba(255, 253, 247, 0.96);
  border-bottom-color: rgba(201, 214, 187, 0.95);
  box-shadow: 0 8px 24px rgba(6, 78, 59, 0.08);
}

body[data-user-role="worker"] .nav-logo span { color: #064e3b; }
body[data-user-role="worker"] .logo-icon,
body[data-user-role="worker"] .avatar,
body[data-user-role="worker"] .hero,
body[data-user-role="worker"] .apply-btn,
body[data-user-role="worker"] .retry-btn,
body[data-user-role="worker"] .modal-header,
body[data-user-role="worker"] .modal-apply,
body[data-user-role="worker"] .sp-primary { background: linear-gradient(135deg, #043b2c, #064e3b); }

body[data-user-role="worker"] .hero { background: linear-gradient(135deg, #043b2c 0%, #064e3b 58%, #0b6a4f 100%); }
body[data-user-role="worker"] .search-bar button {
  background: linear-gradient(135deg, #043b2c, #064e3b);
}
body[data-user-role="worker"] .nav-tab { color: rgba(6, 78, 59, 0.72); }
body[data-user-role="worker"] .nav-tab:hover,
body[data-user-role="worker"] .nav-tab.active,
body[data-user-role="worker"] .nav-location,
body[data-user-role="worker"] .lang-switcher-inline {
  background: #e8f1dc;
  color: #064e3b;
  border-color: #c9d6bb;
}

body[data-user-role="worker"] .lang-select { color: #064e3b; }
body[data-user-role="worker"] .notif-btn,
body[data-user-role="worker"] .avatar-menu,
body[data-user-role="worker"] .job-card,
body[data-user-role="worker"] .sidebar-card,
body[data-user-role="worker"] .worker-profile,
body[data-user-role="worker"] .modal,
body[data-user-role="worker"] .signup-prompt-card { background: #fffdf7; border-color: #c9d6bb; }

body[data-user-role="worker"] .avatar-menu a:hover,
body[data-user-role="worker"] .save-btn,
body[data-user-role="worker"] .edit-profile-btn,
body[data-user-role="worker"] .qs-item,
body[data-user-role="worker"] .trend-icon,
body[data-user-role="worker"] .profile-verified,
body[data-user-role="worker"] .modal-chip,
body[data-user-role="worker"] .sp-secondary { background: #e8f1dc; color: #064e3b; border-color: #c9d6bb; }

body[data-user-role="worker"] .chip { border-color: #c9d6bb; background: #fffdf7; color: #315b49; }
body[data-user-role="worker"] .chip.active,
body[data-user-role="worker"] .chip:hover { background: #064e3b; border-color: #064e3b; color: #f8e7c9; }

body[data-user-role="worker"] .sec-header h2,
body[data-user-role="worker"] .jc-title,
body[data-user-role="worker"] .sidebar-card h3,
body[data-user-role="worker"] .pw-name,
body[data-user-role="worker"] .pw-stat .v,
body[data-user-role="worker"] .qs-item .qv,
body[data-user-role="worker"] .trend-info .ti,
body[data-user-role="worker"] .modal-section h3,
body[data-user-role="worker"] .sp-title,
body[data-user-role="worker"] .see-all,
body[data-user-role="worker"] .trend-count { color: #064e3b; }

body[data-user-role="worker"] .job-card:hover { border-color: #064e3b; }
body[data-user-role="worker"] .save-btn:hover,
body[data-user-role="worker"] .edit-profile-btn:hover { background: #d9e7cc; }
body[data-user-role="worker"] .jc-icon { background: #e8f1dc; }
body[data-user-role="worker"] .divider-line,
body[data-user-role="worker"] .pw-stats,
body[data-user-role="worker"] .job-card-footer { border-color: #c9d6bb; }

/* Worker Applications: match the signed-in Emerald Ink and Champagne dashboard palette. */
body[data-user-role="worker"] .applications-hero {
  background: linear-gradient(135deg, #043b2c 0%, #064e3b 58%, #0b6a4f 100%);
  box-shadow: 0 18px 46px rgba(6, 78, 59, .18);
}
body[data-user-role="worker"] .applications-hero p { color: #f8edd4; }
body[data-user-role="worker"] .applications-stat-card,
body[data-user-role="worker"] .applications-history-card {
  background: #fffdf7;
  border-color: #c9d6bb;
  box-shadow: 0 10px 30px rgba(6, 78, 59, .10);
}
body[data-user-role="worker"] .applications-stat-card div,
body[data-user-role="worker"] .applications-history-card p,
body[data-user-role="worker"] .applications-empty-note,
body[data-user-role="worker"] .application-location,
body[data-user-role="worker"] .application-date-label { color: #617265; }
body[data-user-role="worker"] .applications-table-head,
body[data-user-role="worker"] .application-action-button { background: #064e3b; }
body[data-user-role="worker"] .application-row-grid { border-bottom-color: #e7d9bb; }
body[data-user-role="worker"] .application-status-pill.status-applied { background: #e8f1dc; color: #064e3b; }


/* Worker location picker and nearby jobs */
.location-picker { position: relative; width: min(440px, 100%); padding: 32px; box-sizing: border-box; border-radius: 24px; background: var(--home-card); color: var(--home-text); box-shadow: var(--home-shadow); }
.location-picker-close { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--home-blue-soft); color: var(--home-text); font-size: 17px; cursor: pointer; }
.location-picker-icon { font-size: 32px; margin-bottom: 10px; }
.location-picker h2 { margin: 0 36px 8px 0; font-size: 24px; color: var(--home-text); }
.location-picker > p { color: var(--home-muted); line-height: 1.55; margin: 0 0 20px; }
.location-gps-button, .location-manual-button { width: 100%; border: 0; border-radius: 12px; padding: 13px 16px; font: inherit; font-weight: 800; cursor: pointer; }
.location-gps-button { color: #fff; background: var(--home-blue); }
.location-manual-button { margin-top: 16px; color: var(--home-text); background: var(--home-blue-soft); }
.location-picker-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 16px; color: var(--home-muted); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.location-picker-divider::before, .location-picker-divider::after { content: ''; flex: 1; height: 1px; background: var(--home-border); }
.location-picker label { display: block; margin: 12px 0 6px; color: var(--home-text); font-size: 13px; font-weight: 800; }
.location-picker input, .location-picker select { width: 100%; box-sizing: border-box; border: 1px solid var(--home-border); border-radius: 10px; background: #fff; color: var(--home-text); padding: 12px; font: inherit; }
.location-picker input:focus, .location-picker select:focus { outline: 2px solid rgba(6, 78, 59, .22); border-color: var(--home-blue); }
.location-picker-note { min-height: 20px; margin: 14px 0 0 !important; font-size: 12px; text-align: center; }
.location-picker-note.is-error { color: #b4233f; }
.location-change-link { margin-left: auto; border: 0; color: var(--home-blue); background: transparent; font: inherit; font-weight: 800; cursor: pointer; text-decoration: underline; }
.home-job-section { margin-top: 22px; }
.home-job-section h3 { color: var(--home-text); font-size: 19px; margin: 0 0 12px; }
.home-job-section h3 span { color: var(--home-muted); font-size: 14px; font-weight: 600; }
.other-jobs { padding-top: 24px; border-top: 1px solid var(--home-border); }
.location-empty { padding: 18px; border: 1px dashed var(--home-border); border-radius: 14px; color: var(--home-muted); background: var(--home-card); }
@media (max-width: 640px) { .location-picker { padding: 26px 20px; margin: auto 0; } .location-picker h2 { font-size: 21px; } }
