/* ============================================================
   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;
}

.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);
}

/* ============================================================
   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; }

/* ── 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-title { height: 20px; width: 70%; margin-bottom: 14px; }
.sk-btn   { height: 40px; width: 120px; border-radius: 30px; }

/* ── 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: 100%; max-width: 560px;
  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;
}
.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: center; gap: 10px; flex-shrink: 0; }
.modal-review-box {
  display: none; align-items: center; gap: 8px; min-height: 30px; padding: 6px 10px;
  border: 1px solid rgba(255,255,255,.42); border-radius: 999px;
  background: rgba(255,255,255,.18); color: #fff; white-space: nowrap;
}
.modal-review-box span { font-size: 12px; font-weight: 800; }
.modal-review-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.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); }

/* ── 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);
}

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

.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-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 {
  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-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 180px;
  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;
  gap: 0;
}

.profile-skill-save-btn {
  width: 100%;
  justify-content: center;
}

.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: 28px;
  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: 56px;
  padding: 10px 18px;
  border-radius: 999px;
  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: 999px;
  width: 100%;
  min-height: 56px;
  padding: 10px 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,
#profile-save-btn {
  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;
  }
}
