/* ============================================================
   eDouleia - Global Stylesheet
   Simple, clean, no animations, responsive on all resolutions
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #0075ff;
  --primary-dark: #005fd1;
  --primary-light: #e6f1ff;
  --accent: #ff9100;
  --text: #111827;
  --text-soft: #4b5563;
  --muted: #6b7280;
  --bg: #f3f4f6;
  --card: #ffffff;
  --border: #e5e7eb;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --success: #047857;
  --success-bg: #ecfdf5;
  --warn: #b45309;
  --warn-bg: #fffbeb;
  --radius: 18px;
}

html { font-size: 19px; }

/* Dark theme (set via data-theme by js/common.js; user choice in profile) */
html[data-theme="dark"] {
  --primary: #2f8bff;
  --primary-dark: #5da4ff;
  --primary-light: #16293f;
  --text: #f3f4f6;
  --text-soft: #c6ccd6;
  --muted: #8f97a5;
  --bg: #0f1520;
  --card: #1a2230;
  --border: #2d3748;
  --danger-bg: #2f1618;
  --success-bg: #0e2b21;
  --warn-bg: #2d2308;
}

body {
  font-family: "Arimo", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 1rem; }

.icon { width: 22px; height: 22px; flex-shrink: 0; vertical-align: middle; }
.icon-sm { width: 18px; height: 18px; }
.icon-lg { width: 32px; height: 32px; }

.container { max-width: 1300px; margin: 0 auto; padding: 0 24px; }

.hidden { display: none !important; }

/* ---------------- Header / Navigation ---------------- */

.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 24px;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand img { height: 62px; width: auto; }
.brand span { color: var(--primary); }

.main-nav { display: flex; align-items: center; gap: 4px; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 8px;
  color: var(--text-soft);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
}
.nav-link:hover { background: var(--bg); text-decoration: none; color: var(--text); }
.nav-link.active { background: var(--bg); color: var(--text-soft); }

.nav-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--danger);
  color: #fff;
  border-radius: 9px;
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  color: var(--text);
}

/* ---------------- Buttons ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }

.btn-outline { background: var(--card); color: var(--text); border-color: var(--border); }
.btn-outline:hover { background: var(--bg); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }

.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #e07f00; }

.btn-ghost { background: transparent; color: var(--primary); border: none; }
.btn-ghost:hover { background: var(--primary-light); }

.btn-block { width: 100%; }
.btn-sm { padding: 7px 12px; font-size: 0.85rem; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ---------------- Forms ---------------- */

.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--text);
}
.form-group .hint { font-size: 0.8rem; color: var(--muted); margin-top: 4px; }

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  color: var(--text);
}
.form-control:focus { outline: 2px solid var(--primary); outline-offset: -1px; border-color: var(--primary); }
textarea.form-control { resize: vertical; min-height: 110px; }

.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }

.required-star { color: var(--danger); }

/* ---------------- Alerts / messages ---------------- */

.alert {
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.alert-error { background: var(--danger-bg); color: var(--danger); border: 1px solid #fecaca; }
.alert-success { background: var(--success-bg); color: var(--success); border: 1px solid #a7f3d0; }
.alert-warn { background: var(--warn-bg); color: var(--warn); border: 1px solid #fde68a; }
.alert-info { background: var(--primary-light); color: var(--primary-dark); border: 1px solid #c3d5f7; }

/* ---------------- Cards ---------------- */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.page-title { font-size: 1.9rem; font-weight: 700; margin: 30px 0 6px; }
.page-subtitle { color: var(--muted); margin-bottom: 24px; }

/* ---------------- Avatars ---------------- */

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  overflow: hidden;
  flex-shrink: 0;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 38px; height: 38px; font-size: 0.85rem; }
.avatar-lg { width: 104px; height: 104px; font-size: 2rem; }

/* ---------------- Landing page ---------------- */

.hero {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 70px 0;
  text-align: center;
}
.hero h1 { font-size: 2.6rem; line-height: 1.2; max-width: 720px; margin: 0 auto 18px; }
.hero h1 span { color: var(--primary); }
.hero p { font-size: 1.15rem; color: var(--text-soft); max-width: 620px; margin: 0 auto 30px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.stats-row {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 48px;
  flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-item strong { font-size: 1.6rem; color: var(--primary); display: block; }
.stat-item small { color: var(--muted); }

.section { padding: 60px 0; }
.section-alt { background: var(--card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-title { text-align: center; font-size: 1.9rem; margin-bottom: 10px; }
.section-desc { text-align: center; color: var(--muted); max-width: 560px; margin: 0 auto 40px; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}
.section-alt .feature-card { background: var(--bg); }
.feature-icon {
  width: 54px;
  height: 54px;
  border-radius: 10px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.feature-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.feature-card p { color: var(--text-soft); font-size: 0.92rem; }

.step-num {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  font-size: 1.1rem;
}

.category-chip {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  color: var(--text);
}
.category-chip:hover { border-color: var(--primary); text-decoration: none; }
.category-chip .icon { color: var(--primary); }

.faq-item { border-bottom: 1px solid var(--border); padding: 18px 0; }
.faq-item h4 { margin-bottom: 6px; font-size: 1rem; }
.faq-item p { color: var(--text-soft); font-size: 0.93rem; }

.cta-banner {
  background: var(--primary);
  border-radius: var(--radius);
  padding: 48px 32px;
  text-align: center;
  color: #fff;
}
.cta-banner h2 { font-size: 1.8rem; margin-bottom: 10px; }
.cta-banner p { opacity: 0.9; margin-bottom: 24px; }
.cta-banner .btn { background: #fff; color: var(--primary); }

.site-footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 40px 0 24px;
  margin-top: 0;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; margin-bottom: 28px; }
.footer-grid h4 { font-size: 0.95rem; margin-bottom: 12px; }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: var(--text-soft); font-size: 0.9rem; }
.footer-note { text-align: center; color: var(--muted); font-size: 0.85rem; border-top: 1px solid var(--border); padding-top: 20px; }

/* ---------------- Auth page ---------------- */

.auth-wrap {
  min-height: calc(100vh - 84px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 20px;
}

/* Photo backdrop (bg.jpg) behind the auth / onboarding cards */
.auth-bg {
  background:
    linear-gradient(rgba(0, 30, 70, 0.55), rgba(0, 30, 70, 0.55)),
    url("../bg.jpg") center / cover no-repeat;
}

.auth-card { width: 100%; max-width: 500px; }

.tabs {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 24px;
  background: var(--card);
}
.tab-btn {
  flex: 1;
  padding: 11px;
  background: var(--card);
  border: none;
  font-weight: 600;
  color: var(--muted);
  font-size: 0.95rem;
}
.tab-btn.active { background: var(--primary); color: #fff; }
.tab-btn.tab-accent.active { background: var(--accent); }

/* ---------------- Onboarding ---------------- */

.role-options { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px; }
.role-option {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 16px;
  text-align: center;
  background: var(--card);
  cursor: pointer;
}
.role-option.selected { border-color: #9ca3af; background: var(--bg); }
.role-option .feature-icon { margin: 0 auto 12px; }
.role-option h3 { font-size: 1rem; margin-bottom: 4px; }
.role-option p { font-size: 0.83rem; color: var(--muted); }

/* ---------------- Jobs page ---------------- */

.filters-bar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr auto;
  gap: 10px;
  margin-bottom: 24px;
  align-items: end;
}
.filters-bar .form-group { margin-bottom: 0; }

.jobs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 20px; }

.job-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.job-card-head { display: flex; align-items: center; gap: 12px; }
.job-card-head .who { min-width: 0; }
.job-card-head .who strong { display: block; font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job-card-head .who small { color: var(--muted); font-size: 0.78rem; }

.job-title { font-size: 1.12rem; font-weight: 700; }
.job-desc {
  color: var(--text-soft);
  font-size: 0.92rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.job-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 0.8rem;
  color: var(--text-soft);
}
.meta-chip .icon-sm { color: var(--primary); }
.meta-chip.salary { background: var(--success-bg); color: var(--success); border-color: #a7f3d0; }
.meta-chip.salary .icon-sm { color: var(--success); }

/* Sensitive image warning box */
.img-warning {
  background: var(--warn-bg);
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 18px 14px;
  text-align: center;
}
.img-warning p { font-size: 0.85rem; color: var(--warn); margin-bottom: 10px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.job-image { border-radius: 8px; max-height: 260px; object-fit: cover; width: 100%; }

.job-actions { display: flex; gap: 8px; margin-top: auto; flex-wrap: wrap; }
.job-actions .btn { flex: 1; }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}
.empty-state .icon-lg { width: 48px; height: 48px; margin: 0 auto 14px; display: block; color: var(--border); }

/* ---------------- Profile ---------------- */

.profile-layout { display: grid; grid-template-columns: 340px 1fr; gap: 26px; align-items: start; }

.profile-side { text-align: center; }
.profile-side .avatar-lg { margin: 0 auto 14px; }
.profile-side h2 { font-size: 1.2rem; }
.profile-side .role-tag {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  margin: 8px 0 16px;
}

.my-post-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.my-post-row:last-child { border-bottom: none; }
.my-post-row .info { min-width: 0; }
.my-post-row .info strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.my-post-row .info small { color: var(--muted); }

.limit-bar { background: var(--bg); border-radius: 999px; height: 8px; overflow: hidden; margin-top: 8px; }
.limit-bar > div { height: 100%; background: var(--primary); }

/* ---------------- Inbox / Chat ---------------- */

.inbox-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  height: calc(100vh - 210px);
  min-height: 520px;
}

.inbox-side { border-right: 1px solid var(--border); display: flex; flex-direction: column; min-width: 0; }

.inbox-tabs { display: flex; border-bottom: 1px solid var(--border); }
.inbox-tab {
  flex: 1;
  padding: 13px;
  background: none;
  border: none;
  font-weight: 600;
  color: var(--muted);
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-bottom: 2px solid transparent;
}
.inbox-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.conv-list { overflow-y: auto; flex: 1; }

.conv-item {
  display: flex;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  align-items: center;
}
.conv-item:hover { background: var(--bg); }
.conv-item.active { background: var(--bg); }
.conv-item .conv-body { flex: 1; min-width: 0; }
.conv-item .conv-top { display: flex; justify-content: space-between; gap: 8px; }
.conv-item .conv-top strong { font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-item .conv-top time { font-size: 0.72rem; color: var(--muted); flex-shrink: 0; }
.conv-item .conv-preview {
  font-size: 0.83rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.conv-item .unread-dot { width: 10px; height: 10px; background: var(--primary); border-radius: 50%; flex-shrink: 0; }

.news-item { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.news-item h4 { font-size: 0.92rem; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.news-item h4 .icon-sm { color: var(--primary); }
.news-item p { font-size: 0.84rem; color: var(--text-soft); }
.news-item time { font-size: 0.74rem; color: var(--muted); }

.chat-pane { display: flex; flex-direction: column; min-width: 0; }

.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.chat-header strong { font-size: 0.98rem; }
.chat-header small { color: var(--muted); display: block; font-size: 0.78rem; }
.chat-back { display: none; background: none; border: none; color: var(--text); padding: 6px; }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--bg);
}

.day-divider {
  text-align: center;
  margin: 14px 0 8px;
}
.day-divider span {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 14px;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
}

.msg-row { display: flex; }
.msg-row.mine { justify-content: flex-end; }

.msg-bubble {
  max-width: 72%;
  padding: 9px 13px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 0.92rem;
  word-wrap: break-word;
}
.msg-row.mine .msg-bubble { background: var(--primary); color: #fff; border-color: var(--primary); }
.msg-time {
  display: block;
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 3px;
  text-align: right;
}
.msg-row.mine .msg-time { color: #cdd9f6; }

.read-receipt {
  text-align: right;
  font-size: 0.72rem;
  color: var(--muted);
  padding-right: 6px;
  margin-top: -2px;
}

.chat-input-bar {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--card);
}
.chat-input-bar input { flex: 1; }

.chat-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  gap: 10px;
  padding: 20px;
  text-align: center;
}

/* ---------------- Dropdown menu (3 dots) ---------------- */

.menu-wrap { position: relative; margin-left: auto; }

.icon-btn {
  background: none;
  border: none;
  padding: 8px;
  border-radius: 8px;
  color: var(--text-soft);
  cursor: pointer;
  display: flex;
  align-items: center;
}
.icon-btn:hover { background: var(--bg); }

.dropdown {
  position: absolute;
  right: 0;
  top: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  min-width: 230px;
  z-index: 150;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
.dropdown button, .dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  background: none;
  border: none;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
}
.dropdown button:hover, .dropdown a:hover { background: var(--bg); text-decoration: none; }
.dropdown .danger { color: var(--danger); }

/* ---------------- Post view modal ---------------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal {
  background: var(--card);
  border-radius: var(--radius);
  max-width: 740px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 26px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
}

.modal .job-desc-full {
  white-space: pre-wrap;
  color: var(--text-soft);
  font-size: 0.95rem;
  margin: 10px 0 14px;
  word-wrap: break-word;
}

/* ---------------- Official account star badge ---------------- */

.official-star {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  color: var(--primary);
  margin-left: 5px;
  cursor: pointer;
}

/* ---------------- Typing indicator ---------------- */

.typing-note { color: var(--primary) !important; font-weight: 600; }

/* ---------------- Confirm / message dialog ---------------- */

.confirm-box { max-width: 480px; text-align: center; padding: 32px 28px; }
.confirm-icon {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--danger-bg);
  color: var(--danger);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.confirm-icon .icon { width: 28px; height: 28px; }
.confirm-icon.info { background: var(--primary-light); color: var(--primary); }
.confirm-box h3 { font-size: 1.25rem; margin-bottom: 8px; }
.confirm-box p { color: var(--text-soft); font-size: 0.95rem; margin-bottom: 24px; }
.confirm-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.confirm-actions .btn { min-width: 140px; }

/* ---------------- User search (inbox sidebar) ---------------- */

.user-search { padding: 12px 14px; border-bottom: 1px solid var(--border); }
.user-search input { border-radius: 999px; padding: 9px 16px; font-size: 0.92rem; }
.conv-item .btn { flex-shrink: 0; }

/* ---------------- Public profile page ---------------- */

.user-post-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.user-post-row:last-child { border-bottom: none; }
.user-post-row .info { min-width: 0; }
.user-post-row .info strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-post-row .info small { color: var(--muted); }

/* ---------------- Responsive ---------------- */

@media (max-width: 900px) {
  html { font-size: 17px; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .filters-bar { grid-template-columns: 1fr 1fr; }
  .profile-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 2rem; }
}

@media (max-width: 760px) {
  .header-inner { height: 70px; }
  .brand img { height: 50px; }
  .menu-toggle { display: flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 10px 16px 16px;
    gap: 6px;
  }
  .main-nav.open { display: flex; }

  .inbox-layout { grid-template-columns: 1fr; height: calc(100vh - 170px); }
  .inbox-side.chat-open { display: none; }
  .chat-pane { display: none; }
  .chat-pane.chat-open { display: flex; }
  .chat-back { display: block; }
}

@media (max-width: 560px) {
  html { font-size: 16px; }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .filters-bar { grid-template-columns: 1fr; }
  .form-row { flex-direction: column; gap: 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .role-options { grid-template-columns: 1fr; }
  .hero { padding: 46px 0; }
  .hero h1 { font-size: 1.6rem; }
  .stats-row { gap: 24px; }
  .jobs-grid { grid-template-columns: 1fr; }
  .msg-bubble { max-width: 85%; }
  .page-title { font-size: 1.3rem; }
}
