@import url('https://fonts.googleapis.com/css2?family=Titillium+Web:ital,wght@0,300;0,400;0,600;0,700;0,900;1,300;1,400&display=swap');

:root {
  --blue: #1464aa;
  --blue-dark: #0f4f88;
  --blue-light: #d2ebfa;
  --blue-mid: #4a90c8;
  --green: #96c846;
  --green-dark: #7ab038;
  --white: #ffffff;
  --gray-50: #f7fafd;
  --gray-100: #eef3f8;
  --gray-200: #dce8f2;
  --gray-400: #8aabbf;
  --text: #0d2137;
  --text-muted: #5a7a95;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 2px 8px rgba(20,100,170,0.08);
  --shadow: 0 4px 24px rgba(20,100,170,0.12);
  --shadow-lg: 0 8px 40px rgba(20,100,170,0.18);
  --nav-height: 68px;
  --sidebar-width: 260px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Titillium Web', sans-serif;
  background: var(--gray-50);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); }

img { max-width: 100%; }

/* ── TYPOGRAPHY ── */
h1,h2,h3,h4,h5 { font-family: 'Titillium Web', sans-serif; font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(2rem, 4vw, 3.4rem); letter-spacing: -0.5px; }
h2 { font-size: clamp(1.5rem, 2.5vw, 2.2rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.6rem 1.4rem; border-radius: 6px;
  font-family: 'Titillium Web', sans-serif;
  font-weight: 600; font-size: 0.9rem;
  cursor: pointer; border: none; transition: all 0.2s;
  text-decoration: none; white-space: nowrap;
}
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-dark); color: var(--white); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(20,100,170,0.3); }
.btn-green { background: var(--green); color: var(--white); }
.btn-green:hover { background: var(--green-dark); color: var(--white); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--blue); border: 1.5px solid var(--blue); }
.btn-outline:hover { background: var(--blue-light); color: var(--blue); }
.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--gray-200); }
.btn-ghost:hover { background: var(--gray-100); color: var(--text); }
.btn-danger { background: #dc2626; color: white; }
.btn-danger:hover { background: #b91c1c; color: white; }
.btn-sm { padding: 0.35rem 0.9rem; font-size: 0.82rem; }
.btn-lg { padding: 0.85rem 2rem; font-size: 1rem; }

/* ── NAV ── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--nav-height);
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  display: flex; align-items: center;
  padding: 0 2rem;
  gap: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.navbar-brand {
  font-size: 1.35rem; font-weight: 900;
  color: var(--blue); letter-spacing: -0.3px;
  flex-shrink: 0;
}
.navbar-brand span { color: var(--green); }

.navbar-search {
  flex: 1; max-width: 380px;
  position: relative;
}
.navbar-search input {
  width: 100%; padding: 0.5rem 1rem 0.5rem 2.5rem;
  border: 1.5px solid var(--gray-200); border-radius: 6px;
  background: var(--gray-50); font-family: inherit; font-size: 0.88rem;
  transition: border-color 0.2s;
}
.navbar-search input:focus { outline: none; border-color: var(--blue); background: white; }
.navbar-search .search-icon {
  position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); width: 16px; height: 16px;
}

.navbar-links {
  display: flex; align-items: center; gap: 0.25rem;
  list-style: none; margin-left: auto;
}
.navbar-links a {
  display: flex; flex-direction: column; align-items: center;
  padding: 0.4rem 0.75rem; border-radius: var(--radius-sm);
  color: var(--text-muted); font-size: 0.75rem; font-weight: 600;
  transition: all 0.2s; gap: 2px; text-decoration: none;
}
.navbar-links a svg { width: 20px; height: 20px; }
.navbar-links a:hover, .navbar-links a.active {
  color: var(--blue); background: var(--blue-light);
}
.navbar-links .notif-badge {
  position: relative;
}
.navbar-links .badge {
  position: absolute; top: 2px; right: 4px;
  background: var(--green); color: white;
  font-size: 0.6rem; font-weight: 700;
  padding: 1px 4px; border-radius: 10px; min-width: 16px; text-align: center;
}

/* ── NAV PROFILE DROPDOWN (click-toggled, scroll-proof fixed position) ── */
.nav-profile-wrap { position: relative; flex-shrink: 0; }

.nav-avatar-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--blue); color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem;
  cursor: pointer; border: 2px solid var(--blue-light);
  overflow: hidden; padding: 0;
  transition: box-shadow 0.2s;
}
.nav-avatar-btn:hover { box-shadow: 0 0 0 3px rgba(20,100,170,0.2); }
.nav-avatar-btn img { width: 100%; height: 100%; object-fit: cover; }
.nav-avatar-btn[aria-expanded=true] { box-shadow: 0 0 0 3px rgba(20,100,170,0.3); }

/* Menu is portalled to body via JS so position:fixed works regardless of overflow */
.nav-profile-menu {
  display: none;
  position: fixed;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 230px;
  z-index: 9999;
  overflow: hidden;
  animation: ddFadeIn 0.15s ease;
}
.nav-profile-menu.open { display: block; }

@keyframes ddFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.npm-header {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 1rem 1.1rem 0.85rem;
}
.npm-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--blue); color: white; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; overflow: hidden; flex-shrink: 0;
}
.npm-avatar img { width: 100%; height: 100%; object-fit: cover; }
.npm-name { font-weight: 700; font-size: 0.88rem; color: var(--text); }
.npm-headline { font-size: 0.73rem; color: var(--text-muted); margin-top: 1px; }
.npm-divider { border: none; border-top: 1px solid var(--gray-100); margin: 0.2rem 0; }

.npm-item {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.6rem 1.1rem; color: var(--text);
  font-size: 0.86rem; font-weight: 600;
  transition: background 0.15s; text-decoration: none;
  white-space: nowrap;
}
.npm-item svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--text-muted); }
.npm-item:hover { background: var(--gray-50); color: var(--blue); }
.npm-item:hover svg { color: var(--blue); }
.npm-item-danger { color: #dc2626; }
.npm-item-danger svg { color: #dc2626; }
.npm-item-danger:hover { background: #fef2f2; color: #b91c1c; }

/* ── LAYOUT ── */
.page-wrapper {
  padding-top: var(--nav-height);
  min-height: 100vh;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container-sm { max-width: 720px; margin: 0 auto; padding: 0 1.5rem; }

.app-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr 300px;
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
  align-items: start;
}

.app-layout-2col {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem;
  align-items: start;
}

/* ── SIDEBAR ── */
.sidebar { position: sticky; top: calc(var(--nav-height) + 1rem); }
.sidebar-card {
  background: white; border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  overflow: hidden; margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}
.sidebar-nav { list-style: none; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem 1.1rem; color: var(--text-muted);
  font-size: 0.9rem; font-weight: 600;
  transition: all 0.15s; border-left: 3px solid transparent;
}
.sidebar-nav a:hover, .sidebar-nav a.active {
  color: var(--blue); background: var(--gray-50);
  border-left-color: var(--blue);
}
.sidebar-nav a svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ── CARDS ── */
.card {
  background: white; border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}
.card-header {
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--gray-100);
  display: flex; align-items: center; justify-content: space-between;
}
.card-header h3 { font-size: 0.95rem; color: var(--text); }
.card-body { padding: 1.4rem; }
.card-footer {
  padding: 0.85rem 1.4rem;
  border-top: 1px solid var(--gray-100);
  background: var(--gray-50);
}

/* ── FORMS ── */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block; margin-bottom: 0.4rem;
  font-weight: 600; font-size: 0.88rem; color: var(--text);
}
.form-control {
  width: 100%; padding: 0.6rem 0.9rem;
  border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 0.9rem; color: var(--text);
  background: white; transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(20,100,170,0.1);
}
select.form-control { cursor: pointer; }
.form-control.is-invalid { border-color: #dc2626; }
.form-hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.3rem; }
.form-error { font-size: 0.78rem; color: #dc2626; margin-top: 0.3rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ── TAGS / BADGES ── */
.tag {
  display: inline-flex; align-items: center;
  padding: 0.2rem 0.65rem; border-radius: 4px;
  font-size: 0.75rem; font-weight: 600;
  background: var(--blue-light); color: var(--blue);
}
.tag-green { background: #eaf5d4; color: #4a7a12; }
.tag-gray { background: var(--gray-100); color: var(--text-muted); }
.tag-outline { background: transparent; border: 1px solid var(--gray-200); color: var(--text-muted); }

.badge {
  display: inline-block; padding: 0.2rem 0.55rem;
  border-radius: 20px; font-size: 0.72rem; font-weight: 700;
}
.badge-blue { background: var(--blue); color: white; }
.badge-green { background: var(--green); color: white; }
.badge-gray { background: var(--gray-200); color: var(--text-muted); }
.badge-yellow { background: #fbbf24; color: #78350f; }
.badge-red { background: #fee2e2; color: #dc2626; }

/* ── ALERTS / MESSAGES ── */
.messages-list { margin-bottom: 1rem; }
.alert {
  padding: 0.75rem 1rem; border-radius: var(--radius-sm);
  font-size: 0.88rem; font-weight: 600;
  margin-bottom: 0.5rem;
  border-left: 4px solid;
}
.alert-success { background: #f0fdf4; color: #166534; border-color: #22c55e; }
.alert-warning { background: #fffbeb; color: #92400e; border-color: #f59e0b; }
.alert-error { background: #fef2f2; color: #991b1b; border-color: #ef4444; }
.alert-info { background: var(--blue-light); color: var(--blue-dark); border-color: var(--blue); }

/* ── AVATAR ── */
.avatar {
  border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: var(--blue); display: flex; align-items: center;
  justify-content: center; font-weight: 700; color: white;
}
.avatar-sm { width: 36px; height: 36px; font-size: 0.85rem; }
.avatar-md { width: 48px; height: 48px; font-size: 1rem; }
.avatar-lg { width: 80px; height: 80px; font-size: 1.5rem; }
.avatar-xl { width: 110px; height: 110px; font-size: 2rem; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ── DIVIDER ── */
.divider { border: none; border-top: 1px solid var(--gray-200); margin: 1rem 0; }

/* ── GRID UTILITIES ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.25rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 1.25rem; }

/* ── FLEX UTILITIES ── */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

/* ── TEXT UTILITIES ── */
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.82rem; }
.text-xs { font-size: 0.75rem; }
.text-blue { color: var(--blue); }
.text-green { color: var(--green-dark); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }

/* ── SPACING ── */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* ────────────────────────────────── */
/*  PAGE-SPECIFIC STYLES             */
/* ────────────────────────────────── */

/* ── HOME HERO ── */
.hero {
  min-height: 100vh;
  display: grid; grid-template-columns: 1fr 1fr;
  align-items: center; gap: 4rem;
  padding: calc(var(--nav-height) + 4rem) 5% 5rem;
  background: linear-gradient(145deg, var(--white) 0%, #e8f4fd 100%);
  position: relative; overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute; bottom: -100px; right: -100px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(20,100,170,0.06) 0%, transparent 70%);
  border-radius: 50%;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: white; border: 1px solid var(--blue-light);
  padding: 0.35rem 0.9rem; border-radius: 20px;
  font-size: 0.8rem; font-weight: 600; color: var(--blue);
  margin-bottom: 1.25rem; box-shadow: var(--shadow-sm);
}
.hero-eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity:1; transform:scale(1); } 50% { opacity:0.6; transform:scale(1.3); } }

.hero h1 { color: var(--text); margin-bottom: 1.1rem; }
.hero h1 .highlight { color: var(--blue); }
.hero p { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 2rem; max-width: 480px; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.hero-stats { display: flex; gap: 2.5rem; }
.hero-stat .num { font-size: 1.7rem; font-weight: 900; color: var(--blue); line-height: 1; }
.hero-stat .label { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }

.hero-visual { display: flex; flex-direction: column; gap: 1rem; animation: slideUp 0.8s ease both; }
@keyframes slideUp { from { opacity:0; transform:translateY(30px); } to { opacity:1; transform:translateY(0); } }

.profile-card {
  background: white; border-radius: var(--radius);
  padding: 1.2rem; border: 1px solid var(--gray-200);
  box-shadow: var(--shadow); transition: transform 0.3s;
}
.profile-card:hover { transform: translateY(-3px); }
.profile-card.featured { border-left: 3px solid var(--blue); }
.match-row { display: flex; justify-content: space-between; align-items: center; margin-top: 0.75rem; }
.match-pct { font-size: 0.95rem; font-weight: 900; color: var(--green-dark); }
.progress-bar { height: 4px; background: var(--gray-200); border-radius: 2px; margin-top: 4px; }
.progress-fill { height: 100%; border-radius: 2px; background: var(--green); transition: width 1.5s ease; }

.job-preview-card {
  background: var(--blue); color: white;
  border-radius: var(--radius); padding: 1.2rem;
  box-shadow: 0 8px 24px rgba(20,100,170,0.25);
}
.job-preview-card .company { font-size: 0.75rem; opacity: 0.7; }
.job-preview-card .title { font-size: 1rem; font-weight: 700; margin: 0.2rem 0 0.6rem; }
.job-preview-card .meta { display: flex; gap: 1rem; font-size: 0.78rem; opacity: 0.8; }
.quick-apply-btn {
  margin-top: 0.85rem; width: 100%; padding: 0.5rem;
  background: rgba(255,255,255,0.15); color: white;
  border: 1px solid rgba(255,255,255,0.3); border-radius: 6px;
  font-family: inherit; font-weight: 600; font-size: 0.85rem;
  cursor: pointer; transition: background 0.2s;
}
.quick-apply-btn:hover { background: rgba(255,255,255,0.25); }

/* ── HOW SECTION ── */
.section { padding: 80px 5%; }
.section-alt { background: var(--gray-100); }
.section-label { font-size: 0.75rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--green-dark); margin-bottom: 0.6rem; }
.section-title { margin-bottom: 0.75rem; }
.section-sub { font-size: 1rem; color: var(--text-muted); max-width: 560px; }

.step-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.75rem; margin-top: 3rem; }
.step-card {
  background: white; border-radius: var(--radius);
  padding: 1.75rem; border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm); transition: box-shadow 0.3s, transform 0.3s;
  position: relative;
}
.step-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.step-num { font-size: 3rem; font-weight: 900; color: var(--blue-light); line-height: 1; margin-bottom: 0.75rem; }
.step-icon { width: 44px; height: 44px; background: var(--blue); border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 0.9rem; }
.step-icon svg { width: 22px; height: 22px; color: white; }
.step-card h3 { margin-bottom: 0.5rem; }
.step-card p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.65; }

/* ── FEATURES ── */
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 3rem; }
.feature-item {
  background: white; border-radius: var(--radius);
  padding: 1.75rem; border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm); transition: all 0.3s;
}
.feature-item:hover { border-color: var(--blue-light); box-shadow: var(--shadow); }
.feature-item.wide { grid-column: span 2; display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; }
.feature-icon-wrap { width: 44px; height: 44px; background: var(--blue-light); border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; }
.feature-icon-wrap svg { width: 22px; height: 22px; color: var(--blue); }
.feature-item h3 { margin-bottom: 0.4rem; }
.feature-item p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.65; }

/* ── JOB CARDS ── */
.job-card {
  background: white; border-radius: var(--radius);
  padding: 1.4rem; border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm); transition: all 0.25s;
  position: relative; overflow: hidden;
}
.job-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--blue); transform: scaleX(0); transform-origin: left;
  transition: transform 0.25s;
}
.job-card:hover { border-color: var(--blue-light); box-shadow: var(--shadow); transform: translateY(-2px); }
.job-card:hover::before { transform: scaleX(1); }

.job-company-header { display: flex; align-items: flex-start; gap: 0.85rem; margin-bottom: 0.85rem; }
.company-logo-box {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--blue); display: flex; align-items: center;
  justify-content: center; font-weight: 900; font-size: 0.85rem;
  color: white; flex-shrink: 0; overflow: hidden;
}
.company-logo-box img { width: 100%; height: 100%; object-fit: cover; }
.job-company { font-size: 0.82rem; color: var(--text-muted); font-weight: 600; }
.job-title { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 0.6rem; }
.job-title:hover { color: var(--blue); }
.job-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.9rem; }
.job-footer { display: flex; align-items: center; justify-content: space-between; }
.job-salary { font-weight: 700; font-size: 0.9rem; color: var(--blue); }
.job-posted { font-size: 0.75rem; color: var(--text-muted); }

/* ── PROFILE PAGE ── */
.profile-cover {
  height: 180px;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-mid) 100%);
  border-radius: var(--radius) var(--radius) 0 0;
  position: relative;
}
.profile-cover-inner { position: relative; }
.profile-avatar-wrap {
  position: absolute; bottom: -50px; left: 1.5rem;
  z-index: 10;
}
.profile-info-bar {
  background: white; border-radius: 0 0 var(--radius) var(--radius);
  border: 1px solid var(--gray-200); border-top: none;
  padding: 3.75rem 1.5rem 1.25rem;
  box-shadow: var(--shadow-sm);
}
.profile-name { font-size: 1.4rem; font-weight: 900; }
.profile-headline { color: var(--text-muted); font-size: 0.92rem; margin-top: 0.2rem; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 0.75rem; color: var(--text-muted); font-size: 0.82rem; }
.profile-meta span { display: flex; align-items: center; gap: 0.3rem; }
.profile-meta svg { width: 14px; height: 14px; }
.profile-actions { display: flex; gap: 0.75rem; margin-top: 1rem; }

.profile-section { background: white; border-radius: var(--radius); border: 1px solid var(--gray-200); box-shadow: var(--shadow-sm); margin-bottom: 1rem; overflow: hidden; }
.profile-section-header { padding: 1rem 1.4rem; border-bottom: 1px solid var(--gray-100); display: flex; align-items: center; justify-content: space-between; }
.profile-section-header h3 { font-size: 0.95rem; }
.profile-section-body { padding: 1.4rem; }

.experience-item { display: flex; gap: 1rem; padding: 0.85rem 0; border-bottom: 1px solid var(--gray-100); }
.experience-item:last-child { border-bottom: none; }
.exp-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--blue); margin-top: 6px; flex-shrink: 0; }
.exp-title { font-weight: 700; font-size: 0.92rem; }
.exp-company { font-size: 0.82rem; color: var(--text-muted); }
.exp-period { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }

/* ── DASHBOARD ── */
.stats-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card {
  background: white; border-radius: var(--radius); padding: 1.2rem 1.4rem;
  border: 1px solid var(--gray-200); box-shadow: var(--shadow-sm);
}
.stat-card .s-num { font-size: 1.8rem; font-weight: 900; color: var(--blue); line-height: 1; }
.stat-card .s-label { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; }
.stat-card .s-change { font-size: 0.75rem; color: var(--green-dark); margin-top: 4px; font-weight: 600; }

/* ── FEED ── */
.post-compose {
  background: white; border-radius: var(--radius);
  border: 1px solid var(--gray-200); padding: 1.1rem;
  margin-bottom: 1rem; box-shadow: var(--shadow-sm);
}
.post-compose-row { display: flex; align-items: flex-start; gap: 0.75rem; }
.post-textarea {
  width: 100%; box-sizing: border-box;
  border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm);
  padding: 0.65rem 0.9rem; font-family: inherit; font-size: 0.9rem;
  resize: none; transition: border-color 0.2s;
  min-height: 80px; display: block;
}
.post-textarea:focus { outline: none; border-color: var(--blue); }
.post-actions-row { display: flex; align-items: center; justify-content: flex-end; gap: 0.75rem; margin-top: 0.75rem; }

.post-card {
  background: white; border-radius: var(--radius);
  border: 1px solid var(--gray-200); margin-bottom: 0.85rem;
  box-shadow: var(--shadow-sm);
  overflow: hidden; /* clip carousel to card corners */
}
.post-header { display: flex; align-items: flex-start; justify-content: space-between; padding: 1rem 1.1rem 0.6rem; }
.post-author-info { display: flex; align-items: center; gap: 0.75rem; }
.post-name { font-weight: 700; font-size: 0.92rem; }
.post-meta { font-size: 0.75rem; color: var(--text-muted); }
.post-content { padding: 0 1.1rem 0.85rem; font-size: 0.9rem; line-height: 1.65; }
.post-image { width: 100%; max-height: 400px; object-fit: cover; }
.post-reactions { display: flex; align-items: center; gap: 1rem; padding: 0.7rem 1.1rem; border-top: 1px solid var(--gray-100); }
.reaction-btn {
  display: flex; align-items: center; gap: 0.35rem;
  background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: 0.82rem; color: var(--text-muted);
  font-weight: 600; padding: 0.3rem 0.5rem; border-radius: 6px;
  transition: all 0.15s;
}
.reaction-btn:hover, .reaction-btn.liked { color: var(--blue); background: var(--blue-light); }
.reaction-btn svg { width: 16px; height: 16px; }

.comment-section { padding: 0 1.1rem 1rem; }
.comment-item { display: flex; gap: 0.6rem; margin-top: 0.65rem; }
.comment-bubble { background: var(--gray-50); border-radius: var(--radius-sm); padding: 0.5rem 0.8rem; flex: 1; font-size: 0.82rem; }
.comment-author { font-weight: 700; font-size: 0.8rem; margin-bottom: 2px; }
.comment-form { display: flex; gap: 0.6rem; margin-top: 0.75rem; }
.comment-input { flex: 1; border: 1.5px solid var(--gray-200); border-radius: 20px; padding: 0.4rem 0.9rem; font-family: inherit; font-size: 0.85rem; }
.comment-input:focus { outline: none; border-color: var(--blue); }

/* ── MESSAGES ── */
.messages-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  height: calc(100vh - var(--nav-height) - 3rem);
  background: white; border-radius: var(--radius);
  border: 1px solid var(--gray-200); overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.msg-sidebar { border-right: 1px solid var(--gray-100); overflow-y: auto; }
.msg-sidebar-header { padding: 1rem; border-bottom: 1px solid var(--gray-100); }
.msg-sidebar-header h3 { font-size: 0.95rem; }
.msg-thread {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.85rem 1rem; cursor: pointer;
  border-bottom: 1px solid var(--gray-50); transition: background 0.15s;
}
.msg-thread:hover, .msg-thread.active { background: var(--blue-light); }
.msg-thread-name { font-weight: 600; font-size: 0.88rem; }
.msg-thread-preview { font-size: 0.75rem; color: var(--text-muted); }
.msg-main { display: flex; flex-direction: column; }
.msg-header { padding: 1rem; border-bottom: 1px solid var(--gray-100); }
.msg-body { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem; }
.msg-bubble {
  max-width: 65%; padding: 0.6rem 0.9rem;
  border-radius: 16px; font-size: 0.88rem; line-height: 1.5;
}
.msg-bubble.sent { background: var(--blue); color: white; margin-left: auto; border-bottom-right-radius: 4px; }
.msg-bubble.received { background: var(--gray-100); color: var(--text); border-bottom-left-radius: 4px; }
.msg-time { font-size: 0.7rem; opacity: 0.6; margin-top: 3px; }
.msg-footer { padding: 0.85rem; border-top: 1px solid var(--gray-100); display: flex; gap: 0.75rem; }
.msg-input { flex: 1; border: 1.5px solid var(--gray-200); border-radius: 20px; padding: 0.55rem 1rem; font-family: inherit; font-size: 0.88rem; }
.msg-input:focus { outline: none; border-color: var(--blue); }

/* ── NOTIFICATIONS ── */
.notif-item {
  display: flex; align-items: flex-start; gap: 0.85rem;
  padding: 1rem 1.2rem; border-bottom: 1px solid var(--gray-100);
  transition: background 0.15s;
}
.notif-item.unread { background: #f0f8ff; }
.notif-item:hover { background: var(--gray-50); }
.notif-icon { width: 36px; height: 36px; border-radius: 50%; background: var(--blue-light); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.notif-icon svg { width: 16px; height: 16px; color: var(--blue); }
.notif-text { font-size: 0.88rem; line-height: 1.5; }
.notif-time { font-size: 0.72rem; color: var(--text-muted); margin-top: 3px; }

/* ── APPLICATION STATUS ── */
.status-pending { background: #fef3c7; color: #92400e; }
.status-reviewed { background: var(--blue-light); color: var(--blue); }
.status-shortlisted { background: #eaf5d4; color: #4a7a12; }
.status-rejected { background: #fee2e2; color: #dc2626; }
.status-hired { background: #d1fae5; color: #065f46; }

/* ── TALENT CARD ── */
.talent-card {
  background: white; border-radius: var(--radius);
  border: 1px solid var(--gray-200); padding: 1.4rem;
  box-shadow: var(--shadow-sm); text-align: center;
  transition: all 0.25s;
}
.talent-card:hover { border-color: var(--blue-light); box-shadow: var(--shadow); transform: translateY(-2px); }
.talent-card .name { font-weight: 700; font-size: 0.95rem; margin: 0.6rem 0 0.2rem; }
.talent-card .role { font-size: 0.8rem; color: var(--text-muted); }
.talent-card .location-tag { font-size: 0.75rem; color: var(--text-muted); margin: 0.4rem 0 0.75rem; }
.talent-card .skills { display: flex; flex-wrap: wrap; gap: 0.3rem; justify-content: center; margin-bottom: 0.9rem; }

/* ── PORTFOLIO GRID ── */
.portfolio-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.25rem; }
.portfolio-item {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--gray-200); background: white;
  box-shadow: var(--shadow-sm); transition: all 0.25s;
}
.portfolio-item:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.portfolio-thumb {
  height: 160px; background: var(--blue-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
  overflow: hidden;
}
.portfolio-thumb img { width: 100%; height: 100%; object-fit: cover; }
.portfolio-info { padding: 1rem; }
.portfolio-info h4 { font-size: 0.92rem; margin-bottom: 0.25rem; }
.portfolio-info p { font-size: 0.8rem; color: var(--text-muted); line-height: 1.55; }
.portfolio-links { display: flex; gap: 0.5rem; margin-top: 0.75rem; }

/* ── SEARCH / FILTER BAR ── */
.filter-bar {
  background: white; border-radius: var(--radius);
  border: 1px solid var(--gray-200); padding: 1.1rem 1.4rem;
  margin-bottom: 1.25rem; box-shadow: var(--shadow-sm);
  display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end;
}
.filter-group { display: flex; flex-direction: column; gap: 0.3rem; flex: 1; min-width: 140px; }
.filter-group label { font-size: 0.75rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.filter-group select, .filter-group input { padding: 0.5rem 0.75rem; border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm); font-family: inherit; font-size: 0.88rem; }
.filter-group select:focus, .filter-group input:focus { outline: none; border-color: var(--blue); }

/* ── SECTION TAG ── */
.open-to-work-badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: #eaf5d4; color: #4a7a12; border: 1px solid #c1e092;
  padding: 0.25rem 0.75rem; border-radius: 20px;
  font-size: 0.75rem; font-weight: 700;
}
.open-to-work-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

/* ── FOOTER ── */
.site-footer {
  background: #0a1929; color: rgba(255,255,255,0.55);
  padding: 60px 5% 28px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; margin-bottom: 2.5rem; }
.footer-brand { font-size: 1.3rem; font-weight: 900; color: white; margin-bottom: 0.75rem; }
.footer-brand span { color: var(--green); }
.footer-desc { font-size: 0.85rem; line-height: 1.75; max-width: 280px; }
.footer-col h4 { font-family: 'Titillium Web', sans-serif; font-weight: 700; font-size: 0.85rem; color: white; margin-bottom: 0.9rem; text-transform: uppercase; letter-spacing: 0.5px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.45rem; }
.footer-col a { font-size: 0.85rem; color: rgba(255,255,255,0.5); transition: color 0.2s; }
.footer-col a:hover { color: var(--green); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.07); padding-top: 1.4rem; display: flex; justify-content: space-between; font-size: 0.8rem; }
.footer-bottom a { color: var(--green); }

/* ── TESTIMONIALS ── */
.testimonials-section { background: var(--blue); padding: 80px 5%; }
.testimonials-section .section-label { color: var(--green); }
.testimonials-section .section-title { color: white; }
.testi-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; margin-top: 3rem; }
.testi-card {
  background: rgba(255,255,255,0.09); border-radius: var(--radius);
  padding: 1.6rem; border: 1px solid rgba(255,255,255,0.12);
  transition: background 0.25s;
}
.testi-card:hover { background: rgba(255,255,255,0.14); }
.quote-mark { font-size: 2.5rem; font-weight: 900; color: var(--green); line-height: 1; margin-bottom: 0.6rem; }
.testi-text { font-size: 0.88rem; color: rgba(255,255,255,0.85); line-height: 1.7; margin-bottom: 1.1rem; }
.testi-author { display: flex; align-items: center; gap: 0.75rem; }
.testi-av { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,0.18); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem; color: white; }
.testi-name { font-weight: 700; font-size: 0.88rem; color: white; }
.testi-role { font-size: 0.75rem; color: rgba(255,255,255,0.55); }

/* ── CTA SECTION ── */
.cta-section { background: linear-gradient(135deg, var(--blue-light) 0%, white 100%); padding: 90px 5%; text-align: center; }
.cta-section .section-title { margin-bottom: 0.85rem; }
.cta-section .section-sub { margin: 0 auto 2rem; }
.cta-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── PAGINATION ── */
.pagination { display: flex; align-items: center; justify-content: center; gap: 0.35rem; margin-top: 2rem; }
.page-btn {
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  border-radius: 6px; font-size: 0.85rem; font-weight: 600;
  border: 1px solid var(--gray-200); background: white; color: var(--text-muted);
  cursor: pointer; transition: all 0.15s;
}
.page-btn:hover, .page-btn.active { background: var(--blue); color: white; border-color: var(--blue); }

/* ── EMPTY STATE ── */
.empty-state { text-align: center; padding: 3rem 1rem; }
.empty-state svg { width: 56px; height: 56px; color: var(--gray-400); margin-bottom: 1rem; }
.empty-state h3 { font-size: 1rem; margin-bottom: 0.4rem; }
.empty-state p { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 1.25rem; }

/* ── ANIMATIONS ── */
.fade-up {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .app-layout { grid-template-columns: 220px 1fr; }
  .app-layout > :last-child { display: none; }
}


/* ══════════════════════════════════════════
   PATCH: Click-toggled nav dropdown
══════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════
   NAV DROPDOWN — click-toggle, fixed position, scroll-safe
   ═══════════════════════════════════════════════════ */
.nav-profile-wrap { position: relative; flex-shrink: 0; }

.nav-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--blue); color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem; cursor: pointer;
  border: 2px solid var(--blue-light); overflow: hidden;
  transition: box-shadow 0.2s; outline: none; padding: 0;
}
.nav-avatar:hover, .nav-avatar:focus { box-shadow: 0 0 0 3px rgba(20,100,170,0.25); }
.nav-avatar[aria-expanded="true"] { box-shadow: 0 0 0 3px rgba(20,100,170,0.35); }
.nav-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* FIXED so it doesn't move on scroll, always anchored below navbar */
.nav-dropdown-menu {
  display: none;
  position: fixed;
  top: calc(var(--nav-height) + 8px);
  right: 1rem;
  width: 248px;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.14), 0 2px 8px rgba(0,0,0,0.06);
  z-index: 99999;
  overflow: hidden;
}
.nav-dropdown-menu.open {
  display: block;
  animation: ddSlideIn 0.15s ease;
}
@keyframes ddSlideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.nav-dropdown-header {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 1rem 1.1rem;
  background: linear-gradient(135deg, var(--blue-light), #e8f4ff);
}
.nav-dd-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--blue); color: white; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1rem; overflow: hidden;
  border: 2px solid white;
}
.nav-dd-avatar img { width: 100%; height: 100%; object-fit: cover; }

.dd-divider { border: none; border-top: 1px solid var(--gray-100); margin: 0.3rem 0; }

.dd-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.65rem 1.1rem; color: var(--text);
  font-size: 0.875rem; font-weight: 600; text-decoration: none;
  transition: background 0.12s;
}
.dd-item:hover { background: var(--gray-50); color: var(--blue); }
.dd-item svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--text-muted); }
.dd-item:hover svg { color: var(--blue); }
.dd-item-danger { color: #dc2626; }
.dd-item-danger svg { color: #dc2626; }
.dd-item-danger:hover { background: #fff5f5; color: #dc2626; }

.nav-notif-dot {
  position: absolute; top: -2px; right: -2px;
  background: var(--green); color: white;
  font-size: 0.6rem; font-weight: 700;
  padding: 1px 4px; border-radius: 10px;
  min-width: 16px; text-align: center; pointer-events: none;
}

/* ═══════════════════════════════════════════════════
   SETTINGS PAGE
   ═══════════════════════════════════════════════════ */
.settings-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  align-items: start;
}
@media (max-width: 700px) {
  .settings-layout { grid-template-columns: 1fr; }
}
.settings-nav { list-style: none; }
.settings-nav a {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.65rem 0.9rem; border-radius: 8px;
  color: var(--text-muted); font-size: 0.88rem; font-weight: 600;
  text-decoration: none; transition: all 0.15s;
}
.settings-nav a:hover { background: var(--gray-50); color: var(--text); }
.settings-nav a.active { background: var(--blue-light); color: var(--blue); }
.settings-nav a svg { width: 17px; height: 17px; }

.settings-section { display: none; }
.settings-section.active { display: block; }

.settings-card {
  background: white; border-radius: var(--radius);
  border: 1px solid var(--gray-200); margin-bottom: 1rem;
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.settings-card-header {
  padding: 1rem 1.3rem;
  border-bottom: 1px solid var(--gray-100);
}
.settings-card-header h3 { font-size: 0.95rem; margin: 0; }
.settings-card-header p { font-size: 0.8rem; color: var(--text-muted); margin: 3px 0 0; }
.settings-card-body { padding: 0.5rem 1.3rem 1.3rem; }

.toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--gray-50);
}
.toggle-row:last-child { border-bottom: none; }
.toggle-label h4 { font-size: 0.88rem; font-weight: 600; margin: 0; }
.toggle-label p { font-size: 0.77rem; color: var(--text-muted); margin: 2px 0 0; }

.toggle-switch { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider {
  position: absolute; inset: 0; cursor: pointer;
  background: var(--gray-200); border-radius: 24px; transition: 0.25s;
}
.toggle-slider::before {
  content: ''; position: absolute;
  height: 18px; width: 18px; left: 3px; bottom: 3px;
  background: white; border-radius: 50%; transition: 0.25s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.toggle-switch input:checked + .toggle-slider { background: var(--blue); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ═══════════════════════════════════════════════════
   EMOJI REACTIONS
   ═══════════════════════════════════════════════════ */
.post-reactions-bar {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.4rem 1.1rem 0;
  flex-wrap: wrap; min-height: 28px;
}
.reaction-pill {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.22rem 0.6rem; border-radius: 20px;
  background: var(--gray-50); border: 1.5px solid var(--gray-200);
  font-size: 0.82rem; cursor: pointer; transition: all 0.15s;
  font-family: inherit; line-height: 1;
}
.reaction-pill:hover { border-color: var(--blue); background: var(--blue-light); }
.reaction-pill.mine { border-color: var(--blue); background: var(--blue-light); color: var(--blue); font-weight: 700; }
.reaction-pill .r-emoji { font-size: 1rem; line-height: 1; }
.reaction-pill .r-count { font-weight: 700; font-size: 0.78rem; }

/* Emoji picker popup */
.emoji-picker-wrap { position: relative; display: inline-flex; align-items: center; }
.emoji-trigger-btn {
  display: flex; align-items: center; gap: 0.35rem;
  padding: 0.35rem 0.75rem; border-radius: 20px;
  border: 1px solid var(--gray-200); background: white;
  color: var(--text-muted); font-size: 0.82rem; font-weight: 600;
  cursor: pointer; transition: all 0.15s; font-family: inherit;
}
.emoji-trigger-btn:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-light); }
.emoji-trigger-btn svg { width: 15px; height: 15px; }

.emoji-picker-popup {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 40px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.13);
  padding: 0.45rem 0.6rem;
  z-index: 2000;
  align-items: center;
  gap: 0.15rem;
  white-space: nowrap;
}
.emoji-picker-popup.open { display: flex; animation: ddSlideIn 0.12s ease; }
.emoji-opt {
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: transparent; cursor: pointer; font-size: 1.25rem;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.15s, background 0.15s;
}
.emoji-opt:hover { transform: scale(1.35); background: var(--gray-100); }

/* ═══════════════════════════════════════════════════
   INLINE POST & COMMENT EDITING
   ═══════════════════════════════════════════════════ */
.post-edit-wrap { display: none; margin-top: 0.5rem; }
.post-edit-wrap.visible { display: block; }
.post-edit-textarea {
  width: 100%; border: 1.5px solid var(--blue);
  border-radius: 8px; padding: 0.6rem 0.75rem;
  font-family: inherit; font-size: 0.9rem;
  resize: none; outline: none; line-height: 1.6;
}
.post-edit-actions { display: flex; gap: 0.5rem; margin-top: 0.4rem; }

.comment-text-wrap { display: block; }
.comment-edit-wrap { display: none; }
.comment-edit-wrap.visible { display: flex; gap: 0.4rem; align-items: flex-start; flex: 1; }
.comment-edit-textarea {
  flex: 1; border: 1.5px solid var(--blue);
  border-radius: 8px; padding: 0.35rem 0.6rem;
  font-family: inherit; font-size: 0.82rem; resize: none; outline: none;
}

/* ═══════════════════════════════════════════════════
   INSTAGRAM-STYLE CHAT DOCK
   ═══════════════════════════════════════════════════ */
.chat-dock {
  position: fixed;
  bottom: 0;
  right: 1.5rem;
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  z-index: 8000;
}

/* Launcher bubble */
.chat-launcher {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--blue); color: white; border: none;
  cursor: pointer; box-shadow: 0 4px 18px rgba(20,100,170,0.4);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px; transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}
.chat-launcher:hover { transform: scale(1.08); box-shadow: 0 6px 24px rgba(20,100,170,0.5); }
.chat-launcher svg { width: 24px; height: 24px; }
.chat-launcher-badge {
  position: absolute; top: -2px; right: -2px;
  background: var(--green); color: white; font-size: 0.6rem; font-weight: 700;
  padding: 2px 5px; border-radius: 10px; min-width: 17px; text-align: center;
  border: 1.5px solid white;
}

/* Chat contact list popup */
.chat-list-popup {
  display: none;
  position: fixed;
  bottom: 72px; right: 1.5rem;
  width: 300px;
  background: white;
  border-radius: 12px;
  border: 1px solid var(--gray-200);
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  z-index: 8001;
  overflow: hidden;
  animation: ddSlideIn 0.15s ease;
}
.chat-list-popup.open { display: block; }
.chat-list-header {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--gray-100);
  font-weight: 700; font-size: 0.9rem;
  display: flex; align-items: center; justify-content: space-between;
}
.chat-contact-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem 1rem; cursor: pointer;
  transition: background 0.15s; border: none; background: none;
  width: 100%; text-align: left;
}
.chat-contact-item:hover { background: var(--gray-50); }
.chat-contact-name { font-size: 0.87rem; font-weight: 600; }
.chat-contact-preview { font-size: 0.75rem; color: var(--text-muted); }

/* Chat windows */
.chat-window {
  width: 330px;
  background: white;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -2px 24px rgba(0,0,0,0.12), 0 0 0 1px var(--gray-200);
  display: flex; flex-direction: column;
  max-height: 470px;
  overflow: hidden;
  transition: max-height 0.2s ease;
}
.chat-window.minimized { max-height: 54px; }

.chat-win-header {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.7rem 0.85rem;
  background: white;
  border-bottom: 1px solid var(--gray-100);
  cursor: pointer; flex-shrink: 0;
  border-radius: 16px 16px 0 0;
  user-select: none;
}
.chat-win-av {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--blue); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 700; flex-shrink: 0;
  overflow: hidden; position: relative;
}
.chat-win-av img { width: 100%; height: 100%; object-fit: cover; }
.chat-online-dot {
  position: absolute; bottom: 0; right: 0;
  width: 9px; height: 9px; border-radius: 50%;
  background: #22c55e; border: 1.5px solid white;
}
.chat-win-name { font-weight: 700; font-size: 0.87rem; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-win-controls { display: flex; gap: 0.2rem; flex-shrink: 0; }
.chat-ctrl-btn {
  width: 28px; height: 28px; border-radius: 50%; border: none;
  background: transparent; cursor: pointer; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.chat-ctrl-btn:hover { background: var(--gray-100); color: var(--text); }
.chat-ctrl-btn svg { width: 15px; height: 15px; }

.chat-win-body {
  flex: 1; overflow-y: auto; padding: 0.75rem;
  display: flex; flex-direction: column; gap: 0.4rem;
  background: #f8f9fb;
  scroll-behavior: smooth;
}

.chat-msg-row { display: flex; align-items: flex-end; gap: 0.35rem; }
.chat-msg-row.sent { flex-direction: row-reverse; }
.chat-bubble {
  max-width: 72%; padding: 0.55rem 0.85rem;
  border-radius: 18px; font-size: 0.86rem; line-height: 1.55;
  word-break: break-word;
}
.chat-bubble.received {
  background: white; color: var(--text);
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}
.chat-bubble.sent {
  background: var(--blue); color: white;
  border-bottom-right-radius: 4px;
}
.bubble-time {
  font-size: 0.64rem; margin-top: 3px; opacity: 0.55; text-align: right;
}
.chat-bubble.sent .bubble-time { color: rgba(255,255,255,0.7); }

/* Typing indicator */
.chat-typing-row {
  display: none; align-items: center; gap: 0.35rem;
  padding: 0.3rem 0; min-height: 24px;
}
.chat-typing-row.visible { display: flex; }
.chat-typing-bubble {
  background: white; padding: 0.5rem 0.75rem; border-radius: 16px;
  display: flex; gap: 4px; align-items: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}
.t-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--text-muted); animation: tBounce 1.3s infinite;
}
.t-dot:nth-child(2) { animation-delay: 0.18s; }
.t-dot:nth-child(3) { animation-delay: 0.36s; }
@keyframes tBounce { 0%,60%,100% { transform: translateY(0); } 30% { transform: translateY(-5px); } }

/* Footer toolbar */
.chat-win-footer {
  display: flex; align-items: center; gap: 0.35rem;
  padding: 0.6rem 0.7rem;
  border-top: 1px solid var(--gray-100);
  background: white; flex-shrink: 0;
}
.chat-tool-btn {
  width: 32px; height: 32px; border-radius: 50%; border: none;
  background: transparent; cursor: pointer; color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background 0.15s;
}
.chat-tool-btn:hover { background: var(--blue-light); }
.chat-tool-btn svg { width: 18px; height: 18px; }
.chat-tool-btn.recording { color: #dc2626; animation: recPulse 1s infinite; }
@keyframes recPulse { 0%,100% { opacity:1; } 50% { opacity:0.4; } }

.chat-input-pill {
  flex: 1; background: var(--gray-100); border-radius: 22px;
  display: flex; align-items: center; padding: 0.3rem 0.85rem;
  gap: 0.4rem;
}
.chat-text-input {
  flex: 1; border: none; background: transparent;
  font-family: inherit; font-size: 0.86rem;
  outline: none; resize: none; max-height: 80px;
  overflow-y: auto; padding: 0.15rem 0; line-height: 1.4;
}
.chat-send-btn {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--blue); border: none; cursor: pointer;
  color: white; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background 0.15s, opacity 0.15s;
  opacity: 0.5;
}
.chat-send-btn.active { opacity: 1; }
.chat-send-btn:hover.active { background: var(--blue-dark); }
.chat-send-btn svg { width: 14px; height: 14px; }

/* Media in bubbles */
.bubble-media img, .bubble-media video {
  max-width: 100%; border-radius: 12px; display: block;
}
.bubble-audio audio { max-width: 200px; }


/* ── ATTACH PREVIEW BAR (chat) ── */
.attach-preview {
  display: none; align-items: center; gap: 0.6rem;
  padding: 0.5rem 1rem; background: var(--blue-light);
  border-top: 1px solid var(--gray-200); font-size: 0.82rem;
}
.attach-preview.visible { display: flex; }
.attach-preview-thumb { width: 36px; height: 36px; border-radius: 6px; object-fit: cover; }
.attach-preview-name { flex: 1; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-remove { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 1rem; padding: 0 0.25rem; }
.attach-remove:hover { color: #dc2626; }

/* ── RECORDING WAVEFORM BARS ── */
.rec-waveform { display: flex; align-items: center; gap: 3px; flex: 1; padding: 0 0.5rem; }
.rec-wave-bar {
  width: 3px; background: #dc2626; border-radius: 2px;
  animation: wavePulse 0.8s infinite alternate;
}
.rec-wave-bar:nth-child(2) { animation-delay: 0.1s; }
.rec-wave-bar:nth-child(3) { animation-delay: 0.2s; }
.rec-wave-bar:nth-child(4) { animation-delay: 0.3s; }
.rec-wave-bar:nth-child(5) { animation-delay: 0.4s; }
@keyframes wavePulse { from { transform: scaleY(0.4); } to { transform: scaleY(1.5); } }

/* ── TYPING INDICATOR ── */
.typing-indicator { display: none; }
.typing-indicator.visible { display: flex; }

/* ── IG STATUS DOT ── */
.ig-status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

/* ── PHONE INPUT GROUP — cross-browser incl. Safari ── */
.phone-input-group {
  display: flex;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius);
  overflow: hidden;
  background: white;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
}
.phone-input-group:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(20, 100, 170, 0.1);
}
.phone-code-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border: none !important;
  border-right: 1.5px solid var(--gray-300) !important;
  border-radius: 0 !important;
  background: var(--gray-50) !important;
  padding: 0.6rem 1.6rem 0.6rem 0.65rem !important;
  font-size: 0.82rem !important;
  font-family: inherit !important;
  color: var(--text) !important;
  cursor: pointer !important;
  outline: none !important;
  width: 130px !important;
  flex: 0 0 130px !important;
  box-shadow: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2364748b'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.5rem center !important;
}
.phone-number-input {
  -webkit-appearance: none;
  appearance: none;
  border: none !important;
  border-radius: 0 !important;
  padding: 0.6rem 0.85rem !important;
  font-size: 0.9rem !important;
  font-family: inherit !important;
  flex: 1 1 auto !important;
  width: 0 !important;
  min-width: 80px !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* ── SETTINGS THEME OPTION ── */
.theme-opt {
  border: 2px solid var(--gray-200);
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}
.theme-opt.selected,
label:has(input:checked) .theme-opt {
  border-color: var(--blue);
  background: var(--blue-light);
}

/* ══════════════════════════════════════════════
   NAVBAR LOGO
   ══════════════════════════════════════════════ */
.navbar-logo {
  height: 34px;
  width: auto;
  max-width: 160px;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}
.navbar-brand { display: flex; align-items: center; text-decoration: none; gap: 0; }
.footer-brand img { height: 30px; width: auto; max-width: 150px; display: block; }
img[alt="PostIn"] { max-width: 160px; height: auto; }

/* ══════════════════════════════════════════════
   DARK MODE — all CSS custom-property overrides
   ══════════════════════════════════════════════ */
[data-theme="dark"] {
  --bg:           #0f1117;
  --bg-alt:       #1a1d27;
  --surface:      #1e2130;
  --surface-2:    #252839;
  --border:       #2d3048;
  --text:         #e2e8f0;
  --text-muted:   #8892a4;
  --blue:         #4a90d9;
  --blue-light:   rgba(74,144,217,0.12);
  --green:        #5cb85c;
  --green-dark:   #4cae4c;
  --gray-50:      #1e2130;
  --gray-100:     #252839;
  --gray-200:     #2d3048;
  --gray-300:     #3a3f5c;
  --gray-400:     #5a6080;
  --shadow:       0 1px 6px rgba(0,0,0,0.4);
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.3);
  --shadow-lg:    0 8px 30px rgba(0,0,0,0.5);
}

[data-theme="dark"] body              { background: var(--bg); color: var(--text); }
[data-theme="dark"] .navbar           { background: var(--surface); border-bottom-color: var(--border); }
[data-theme="dark"] .card,
[data-theme="dark"] .settings-card,
[data-theme="dark"] .post-card,
[data-theme="dark"] .job-card,
[data-theme="dark"] .talent-card      { background: var(--surface); border-color: var(--border); }
[data-theme="dark"] .form-control,
[data-theme="dark"] .phone-number-input,
[data-theme="dark"] .phone-code-select { background: var(--surface-2); color: var(--text); border-color: var(--border); }
[data-theme="dark"] .btn-outline      { border-color: var(--gray-300); color: var(--text); }
[data-theme="dark"] .btn-outline:hover { background: var(--surface-2); }
[data-theme="dark"] .btn-ghost        { color: var(--text-muted); }
[data-theme="dark"] .btn-ghost:hover  { background: var(--surface-2); color: var(--text); }
[data-theme="dark"] .sidebar-card,
[data-theme="dark"] .filter-bar       { background: var(--surface); border-color: var(--border); }
[data-theme="dark"] .navbar-search input { background: var(--surface-2); color: var(--text); border-color: var(--border); }
[data-theme="dark"] .navbar-search input::placeholder { color: var(--text-muted); }
[data-theme="dark"] .tag              { background: var(--surface-2); color: var(--text-muted); }
[data-theme="dark"] .tag-green        { background: rgba(92,184,92,0.15); color: var(--green); }
[data-theme="dark"] .nav-profile-menu { background: var(--surface); border-color: var(--border); }
[data-theme="dark"] .npm-item:hover   { background: var(--surface-2); }
[data-theme="dark"] .npm-divider      { background: var(--border); }
[data-theme="dark"] .ig-chat,
[data-theme="dark"] .ig-sidebar,
[data-theme="dark"] .ig-main          { background: var(--surface); }
[data-theme="dark"] .ig-sidebar       { border-right-color: var(--border); }
[data-theme="dark"] .ig-bubble.received { background: var(--surface-2); color: var(--text); }
[data-theme="dark"] .post-compose     { background: var(--surface); border-color: var(--border); }
[data-theme="dark"] .post-textarea    { background: transparent; color: var(--text); }
[data-theme="dark"] .notif-item       { border-bottom-color: var(--border); }
[data-theme="dark"] .notif-item.unread { background: var(--blue-light); }
[data-theme="dark"] .settings-layout aside > div { background: var(--surface); border-color: var(--border); }
[data-theme="dark"] .settings-nav a   { color: var(--text-muted); }
[data-theme="dark"] .settings-nav a:hover,
[data-theme="dark"] .settings-nav a.active { background: var(--blue-light); color: var(--blue); }
[data-theme="dark"] .toggle-row       { border-bottom-color: var(--border); }
[data-theme="dark"] .toggle-slider    { background: var(--gray-300); }
[data-theme="dark"] input:checked ~ .toggle-slider { background: var(--blue); }
[data-theme="dark"] .hero             { background: linear-gradient(135deg, #0d1b2e 0%, #122040 100%); }
[data-theme="dark"] .section-alt      { background: var(--bg-alt); }
[data-theme="dark"] .step-card        { background: var(--surface); border-color: var(--border); }
[data-theme="dark"] .feature-item     { background: var(--surface); border-color: var(--border); }
[data-theme="dark"] .site-footer      { background: #0a0d14; border-top-color: var(--border); }
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="password"],
[data-theme="dark"] input[type="number"],
[data-theme="dark"] input[type="url"],
[data-theme="dark"] input[type="date"],
[data-theme="dark"] select,
[data-theme="dark"] textarea           { background: var(--surface-2); color: var(--text); border-color: var(--border); }
[data-theme="dark"] .filter-group input,
[data-theme="dark"] .filter-group select { background: var(--surface-2); color: var(--text); border-color: var(--border); }

/* ── DARK MODE ADDITIONS ── */
[data-theme="dark"] .page-wrapper    { background: var(--bg); }
[data-theme="dark"] .app-layout      { background: var(--bg); }
[data-theme="dark"] .container,
[data-theme="dark"] .container-sm    { color: var(--text); }
[data-theme="dark"] h1,[data-theme="dark"] h2,[data-theme="dark"] h3,
[data-theme="dark"] h4,[data-theme="dark"] h5 { color: var(--text); }
[data-theme="dark"] .post-author-info a { color: var(--text) !important; }
[data-theme="dark"] .card-header     { border-bottom-color: var(--border); color: var(--text); }
[data-theme="dark"] .card-body       { color: var(--text); }
[data-theme="dark"] .sidebar-nav a   { color: var(--text-muted); }
[data-theme="dark"] .sidebar-nav a:hover,
[data-theme="dark"] .sidebar-nav a.active { color: var(--blue); background: var(--blue-light); }
[data-theme="dark"] .job-card .job-title { color: var(--text); }
[data-theme="dark"] .job-card .job-company { color: var(--text-muted); }
[data-theme="dark"] .company-logo-box { background: var(--surface-2); color: var(--text); border-color: var(--border); }
[data-theme="dark"] .notif-badge     { background: var(--surface-2); color: var(--text); border-color: var(--border); }
[data-theme="dark"] .ig-thread:hover { background: var(--surface-2); }
[data-theme="dark"] .ig-thread.active { background: rgba(74,144,217,0.15); }
[data-theme="dark"] .ig-search input { background: var(--surface-2); color: var(--text); }
[data-theme="dark"] .ig-chat-header  { border-bottom-color: var(--border); }
[data-theme="dark"] .ig-body         { background: var(--bg); }
[data-theme="dark"] .chat-footer     { border-top-color: var(--border); background: var(--surface); }
[data-theme="dark"] .chat-text-input { background: var(--surface-2); color: var(--text); }
[data-theme="dark"] .post-compose textarea::placeholder { color: var(--text-muted); }
[data-theme="dark"] .settings-section { color: var(--text); }
[data-theme="dark"] .org-cover-wrap  { background: linear-gradient(135deg, #0d1b2e 0%, #122040 100%); }
[data-theme="dark"] .talent-card .name { color: var(--text); }
[data-theme="dark"] .talent-card .role { color: var(--text-muted); }
[data-theme="dark"] .alert           { background: var(--surface-2); color: var(--text); border-color: var(--border); }
[data-theme="dark"] .alert-info      { background: rgba(74,144,217,0.15); color: var(--blue); border-color: var(--blue); }
[data-theme="dark"] .alert-success   { background: rgba(92,184,92,0.12); color: var(--green); border-color: var(--green); }
[data-theme="dark"] .alert-error, [data-theme="dark"] .alert-danger { background: rgba(220,38,38,0.12); color: #f87171; border-color: #dc2626; }
[data-theme="dark"] .npm-header      { background: var(--surface); }
[data-theme="dark"] .npm-name        { color: var(--text); }
[data-theme="dark"] .npm-headline    { color: var(--text-muted); }
[data-theme="dark"] .btn-primary     { background: var(--blue); }
[data-theme="dark"] .reply-box       { background: var(--surface-2); border-color: var(--border); }
[data-theme="dark"] .comment-item    { border-bottom-color: var(--border); color: var(--text); }
[data-theme="dark"] .filter-bar      { background: var(--surface); border-color: var(--border); }
[data-theme="dark"] .filter-group label { color: var(--text-muted); }
[data-theme="dark"] .theme-opt       { border-color: var(--border); color: var(--text); background: var(--surface-2); }
[data-theme="dark"] .theme-opt.selected,
[data-theme="dark"] label:has(input:checked) .theme-opt { border-color: var(--blue); background: rgba(74,144,217,0.15); }
[data-theme="dark"] .testimonial-card { background: var(--surface); border-color: var(--border); }
[data-theme="dark"] .open-to-work-badge { background: rgba(92,184,92,0.15); color: var(--green); }
[data-theme="dark"] .job-salary      { color: var(--green); }
[data-theme="dark"] .reply-form textarea { background: var(--surface-2); color: var(--text); border-color: var(--border); }

/* ══════════════════════════════════════════════════════
   POSTIN — LINKEDIN-STYLE FEED & MOBILE
   ══════════════════════════════════════════════════════ */

/* ── Compose box ── */
.compose-actions-bar {
  display: flex; align-items: center; gap: 0.25rem;
  padding-top: 0.65rem; margin-top: 0.65rem;
  border-top: 1px solid var(--gray-200);
}
.post-start-btn {
  flex: 1; background: transparent; border: 1.5px solid var(--gray-300);
  border-radius: 40px; padding: 0.65rem 1.1rem; text-align: left;
  color: var(--text-muted); font-size: 0.92rem; cursor: pointer;
  font-family: inherit; transition: background 0.15s, border-color 0.15s;
}
.post-start-btn:hover { background: var(--gray-50); border-color: var(--gray-400); }
.compose-action-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.45rem 0.85rem; border-radius: 8px; cursor: pointer;
  font-size: 0.83rem; font-weight: 700; color: var(--text-muted);
  border: none; background: transparent; font-family: inherit;
  transition: background 0.15s;
}
.compose-action-btn:hover { background: var(--gray-100); color: var(--text); }

/* ── Post card menu trigger ── */
.post-menu-trigger {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  border: none; background: none; cursor: pointer; color: var(--text-muted);
  transition: background 0.15s;
}
.post-menu-trigger:hover { background: var(--gray-100); color: var(--text); }
/* Post context menu — hidden by default, shown when .open */
.post-context-menu {
  display: none;
  position: absolute; top: calc(100% + 4px); right: 0;
  background: white; border: 1px solid var(--gray-200);
  border-radius: 10px; box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  z-index: 400; min-width: 160px; overflow: hidden;
  animation: ddSlideIn 0.12s ease;
}
.post-context-menu.open { display: block; }
.post-menu-item {
  display: flex; align-items: center; gap: 0.6rem;
  width: 100%; padding: 0.65rem 1rem; background: none;
  border: none; cursor: pointer; font-family: inherit;
  font-size: 0.87rem; font-weight: 600; color: var(--text);
  text-align: left; transition: background 0.12s;
}
.post-menu-item:hover { background: var(--gray-50); }
.post-menu-item-danger { color: #dc2626; }
.post-menu-item-danger:hover { background: #fff5f5; }

/* ── Reaction summary row ── */
.post-reaction-summary {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.3rem 1rem 0; min-height: 22px;
}
.li-reaction-pills { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.li-reaction-pill { font-size: 0.8rem; color: var(--text-muted); }
.li-comment-count-btn {
  font-size: 0.8rem; color: var(--text-muted); background: none;
  border: none; cursor: pointer; padding: 0; font-family: inherit;
}
.li-comment-count-btn:hover { color: var(--blue); text-decoration: underline; }

/* ── LinkedIn action bar ── */
.li-action-bar {
  display: flex; align-items: stretch;
  padding: 0.15rem 0.5rem;
  border-top: 1px solid var(--gray-200);
}
.li-action-wrap { position: relative; flex: 1; display: flex; }
.li-action-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; flex: 1; padding: 0.55rem 0.25rem; border-radius: 6px;
  background: none; border: none; cursor: pointer; font-family: inherit;
  font-size: 0.78rem; font-weight: 700; color: var(--text-muted);
  transition: background 0.15s, color 0.15s; white-space: nowrap;
}
.li-action-btn svg { width: 20px; height: 20px; }
.li-action-btn:hover { background: var(--gray-100); color: var(--text); }
.li-action-btn.reacted { color: var(--blue); }
.li-action-btn.reacted svg { stroke: var(--blue); }

/* ── Emoji flyout — position:fixed so post-card overflow:hidden never clips it ── */
.li-emoji-bar {
  position: fixed;  /* fixed = viewport-relative, escapes all overflow:hidden ancestors */
  background: white; border: 1px solid var(--gray-200);
  border-radius: 32px; padding: 6px 10px;
  display: flex; gap: 6px; align-items: center;
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
  opacity: 0; pointer-events: none;
  transition: opacity 0.15s, transform 0.15s;
  z-index: 9000; white-space: nowrap;
  transform: translateY(4px);
}
.li-emoji-bar.visible {
  opacity: 1; pointer-events: auto;
  transform: translateY(0);
}
.li-emoji-btn {
  font-size: 1.5rem; background: none; border: none; cursor: pointer;
  border-radius: 50%; padding: 2px; line-height: 1;
  transition: transform 0.12s;
}
.li-emoji-btn:hover { transform: scale(1.35); }

/* ── Multi-image grid ── */
.post-img-grid {
  display: grid; gap: 2px;
  border-radius: 0; overflow: hidden; max-height: 500px;
}
.post-img-grid.post-img-count-1 { grid-template-columns: 1fr; }
.post-img-grid.post-img-count-2 { grid-template-columns: 1fr 1fr; }
.post-img-grid.post-img-count-3 { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; }
.post-img-grid.post-img-count-3 .post-grid-img:first-child { grid-row: span 2; }
.post-img-grid.post-img-count-4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.post-img-grid.post-img-count-5,
.post-img-grid.post-img-count-6 { grid-template-columns: 1fr 1fr 1fr; grid-template-rows: 1fr 1fr; }
.post-grid-img {
  width: 100%; height: 220px; max-height: 400px; object-fit: cover;
  cursor: zoom-in; transition: filter 0.15s; display: block;
}
.post-img-grid.post-img-count-1 .post-grid-img { height: auto; max-height: 500px; }
.post-grid-img:hover { filter: brightness(0.93); }

/* ── Comment bubble wrap ── */
.comment-bubble-wrap { display: block; }
.comment-edit-wrap { display: none; }
.comment-edit-wrap.visible { display: block; }

/* ── Dark mode ── */
[data-theme="dark"] .post-start-btn { border-color: var(--border); color: var(--text-muted); }
[data-theme="dark"] .post-start-btn:hover { background: var(--surface-2); }
[data-theme="dark"] .compose-action-btn:hover { background: var(--surface-2); color: var(--text); }
[data-theme="dark"] .li-action-bar { border-top-color: var(--border); }
[data-theme="dark"] .li-action-btn:hover { background: var(--surface-2); }
[data-theme="dark"] .li-emoji-bar { background: var(--surface); border-color: var(--border); }
[data-theme="dark"] .post-reaction-summary { color: var(--text-muted); }
[data-theme="dark"] .compose-actions-bar { border-top-color: var(--border); }
[data-theme="dark"] .post-menu-trigger:hover { background: var(--surface-2); }
[data-theme="dark"] .post-context-menu { background: var(--surface); border-color: var(--border); }
[data-theme="dark"] .post-menu-item { color: var(--text); }
[data-theme="dark"] .post-menu-item:hover { background: var(--surface-2); }

/* ══════════════════════════════════════════════════════
   MOBILE BOTTOM NAV
   ══════════════════════════════════════════════════════ */
.mobile-bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  background: white; border-top: 1px solid var(--gray-200);
  z-index: 900; height: 54px;
  align-items: stretch; justify-content: space-around;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.07);
}
.mobile-nav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; flex: 1; padding: 0.3rem 0.5rem;
  color: var(--text-muted); font-size: 0.62rem; font-weight: 700;
  text-decoration: none; border: none; background: none;
  cursor: pointer; font-family: inherit; position: relative;
  transition: color 0.15s;
}
.mobile-nav-item svg { width: 22px; height: 22px; }
.mobile-nav-item.active { color: var(--blue); }
.mobile-nav-dot {
  position: absolute; top: 4px; right: 12px;
  background: #e02020; color: white; border-radius: 10px;
  font-size: 0.55rem; padding: 1px 4px; min-width: 14px;
  text-align: center; font-weight: 700;
}
[data-theme="dark"] .mobile-bottom-nav { background: var(--surface); border-top-color: var(--border); }

/* ══════════════════════════════════════════════════════
   MOBILE RESPONSIVE — max-width 768px
   ══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Homepage sections */
  .hero { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .app-layout-2col { grid-template-columns: 1fr; }
  .step-cards, .feature-grid, .testi-grid { grid-template-columns: 1fr; }
  .feature-item.wide { grid-column: span 1; grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  /* Navbar compact */
  .navbar { padding: 0 0.85rem; height: 54px; }
  .navbar-links { display: none !important; }
  .navbar-search { max-width: 180px; }
  .navbar-logo { height: 26px; }

  /* Body offset for fixed navbar */
  .page-wrapper { padding-top: 54px; padding-bottom: 62px; }

  /* Show bottom nav */
  .mobile-bottom-nav { display: flex; }

  /* Feed full width */
  .app-layout { display: block !important; }
  .sidebar { display: none !important; }

  /* Cards full-bleed */
  .post-compose,
  .post-card { border-radius: 0; border-left: none; border-right: none; margin-bottom: 8px; }

  /* Action buttons */
  .li-action-btn { font-size: 0.7rem; padding: 0.5rem 0.15rem; }

  /* Grids */
  .grid-3, .grid-4 { grid-template-columns: 1fr !important; }
  .grid-2 { grid-template-columns: 1fr 1fr !important; }

  /* Settings */
  .settings-layout { padding: 1rem 0.75rem 5rem; grid-template-columns: 1fr; }

  /* Messages */
  .ig-layout { flex-direction: column; }
  .ig-sidebar { width: 100%; max-height: 40vh; border-right: none; border-bottom: 1px solid var(--gray-200); }

  /* Profile */
  .profile-layout { grid-template-columns: 1fr !important; }

  /* Org cover */
  #orgHeaderCard .org-cover-wrap { height: 130px !important; }
}

@media (max-width: 480px) {
  /* Very small phones: hide action label text */
  .li-action-btn span { font-size: 0.68rem; }
  .compose-action-btn span { display: none; }
  .compose-action-btn { padding: 0.5rem; }
}

/* ══════════════════════════════════════════════════════
   POST MEDIA CAROUSEL
   ══════════════════════════════════════════════════════ */
.post-carousel {
  position: relative;
  width: 100%;
  /* 16:9 box — consistent across all posts */
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  background: #000;
}
.carousel-track {
  position: absolute;
  inset: 0;
  display: flex;
  transition: transform 0.3s ease;
  will-change: transform;
}
.carousel-slide {
  min-width: 100%;
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}
.carousel-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;  /* never crop — white bg fills gaps */
  display: block;
  background: #ffffff;
}
.carousel-slide video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain; /* video letterboxed with black bg */
  display: block;
  background: #000;
}
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,0.55); color: white; border: none;
  width: 36px; height: 36px; border-radius: 50%;
  font-size: 1.4rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 10; transition: background 0.15s;
  padding: 0; padding-bottom: 2px;
}
.carousel-btn:hover { background: rgba(0,0,0,0.8); }
.carousel-prev { left: 8px; }
.carousel-next { right: 8px; }
.carousel-dots {
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 5px; z-index: 10;
}
.carousel-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,0.5); cursor: pointer; transition: background 0.15s;
}
.carousel-dot.active { background: white; }
.carousel-counter {
  position: absolute; top: 8px; right: 10px;
  background: rgba(0,0,0,0.5); color: white;
  font-size: 0.72rem; padding: 2px 8px; border-radius: 10px;
  z-index: 10;
}
[data-theme="dark"] .carousel-btn { background: rgba(255,255,255,0.15); }
[data-theme="dark"] .carousel-btn:hover { background: rgba(255,255,255,0.3); }

/* ══════════════════════════════════════════════════════
   IMAGE LIGHTBOX
   ══════════════════════════════════════════════════════ */
#imgLightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.92);
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
#imgLightbox.open {
  display: flex;
}
#imgLightbox #lbImg {
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
  cursor: default;
  user-select: none;
}
#lbClose {
  position: fixed;
  top: 1rem;
  right: 1.25rem;
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  font-size: 1.6rem;
  cursor: pointer;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 0.15s;
  z-index: 10000;
}
#lbClose:hover { background: rgba(255,255,255,0.3); }

/* ── PROFILE PAGE DARK MODE ── */
[data-theme="dark"] .profile-info-bar {
  background: var(--surface);
  border-color: var(--border);
}
[data-theme="dark"] .profile-name { color: var(--text); }
[data-theme="dark"] .profile-headline { color: var(--text-muted); }
[data-theme="dark"] .profile-meta { color: var(--text-muted); }
[data-theme="dark"] .profile-section {
  background: var(--surface);
  border-color: var(--border);
}
[data-theme="dark"] .profile-section-header {
  border-bottom-color: var(--border);
}
[data-theme="dark"] .profile-section-header h3 { color: var(--text); }
[data-theme="dark"] .profile-section-body { color: var(--text); }
[data-theme="dark"] .experience-item { border-bottom-color: var(--border); }
[data-theme="dark"] .exp-company { color: var(--text-muted); }
[data-theme="dark"] .card-header { background: var(--surface); border-bottom-color: var(--border); }
[data-theme="dark"] .card-header h3 { color: var(--text); }
[data-theme="dark"] .card { background: var(--surface); border-color: var(--border); }
[data-theme="dark"] .card-body { background: var(--surface); color: var(--text); }

/* ── NATIVE SELECT — Safari-compatible ── */
select,
select.form-control,
.filter-group select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: white;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.25rem !important;
  cursor: pointer;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.4;
  min-height: 38px;
}
select:focus,
select.form-control:focus,
.filter-group select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(20,100,170,0.1);
}
[data-theme="dark"] select,
[data-theme="dark"] select.form-control,
[data-theme="dark"] .filter-group select {
  background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23aaa' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  border-color: var(--border);
  color: var(--text);
}

/* ══════════════════════════════════════════════════════
   AUTH / VERIFICATION PAGE LAYOUT
   ══════════════════════════════════════════════════════ */
.auth-outer {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, var(--blue-light) 0%, white 60%);
}
.auth-card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 8px 40px rgba(20,100,170,0.12), 0 2px 8px rgba(0,0,0,0.06);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 440px;
  /* Never stretch full width */
  flex-shrink: 0;
}
.auth-icon {
  width: 76px; height: 76px;
  border-radius: 50%;
  background: var(--blue-light);
  color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.4rem;
  font-size: 2rem;
}
.auth-title {
  font-size: 1.5rem; font-weight: 900;
  text-align: center; margin: 0 0 0.5rem;
  color: var(--text);
}
.auth-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.75rem;
  line-height: 1.6;
}
.auth-phone-display {
  text-align: center;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--blue);
  margin-bottom: 1.75rem;
  letter-spacing: 0.5px;
}
.auth-back-link {
  display: block;
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.auth-back-link:hover { color: var(--blue); }

[data-theme="dark"] .auth-outer { background: linear-gradient(135deg, var(--surface-2) 0%, var(--surface) 60%); }
[data-theme="dark"] .auth-card { background: var(--surface); box-shadow: 0 8px 40px rgba(0,0,0,0.3); }
[data-theme="dark"] .auth-title { color: var(--text); }

/* OTP code input — large, centered, monospace */
input[name="code"] {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.5rem;
  font-family: 'Courier New', monospace;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 2px solid var(--gray-200);
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
input[name="code"]:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(20,100,170,0.1);
}
[data-theme="dark"] input[name="code"] {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text);
}

/* ══════════════════════════════════════════════════════
   LINK PREVIEW CARD
   ══════════════════════════════════════════════════════ */
.link-preview-card {
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: box-shadow 0.15s;
  margin: 0.5rem 1rem 0.25rem;
  background: var(--gray-50);
}
.link-preview-card:hover { box-shadow: var(--shadow); }
.link-preview-card img {
  width: 100%; max-height: 200px;
  object-fit: cover; display: block;
}
.link-preview-body {
  padding: 0.65rem 0.85rem 0.75rem;
}
.link-preview-site {
  font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--text-muted);
  margin-bottom: 0.2rem;
}
.link-preview-title {
  font-weight: 700; font-size: 0.9rem;
  color: var(--text); line-height: 1.35;
  margin-bottom: 0.2rem;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.link-preview-desc {
  font-size: 0.8rem; color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
[data-theme="dark"] .link-preview-card { background: var(--surface-2); border-color: var(--border); }
[data-theme="dark"] .link-preview-title { color: var(--text); }
