:root {
  --teal: #14B8C4;
  --teal-deep: #0B8A94;
  --teal-soft: #B8EAEE;
  --teal-mist: #E8F8FA;
  --night: #0A1F2E;
  --night-soft: #1A3447;
  --cream: #FAF6EE;
  --cream-deep: #F2EBDD;
  --coral: #FF6B5A;
  --amber: #FFB84D;
  --ink: #1A2B3A;
  --ash: #6B7C8E;
  --line: #E5DFD0;
  --green: #2DBA85;
  --red: #E55D5D;
  --shadow-sm: 0 2px 8px rgba(10, 31, 46, 0.04);
  --shadow-md: 0 8px 24px rgba(10, 31, 46, 0.08);
  --shadow-lg: 0 20px 60px rgba(10, 31, 46, 0.12);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Cairo', 'Manrope', sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

body.lang-en {
  font-family: 'Manrope', 'Cairo', sans-serif;
  direction: ltr;
}

body.lang-en .display-font {
  font-family: 'Bricolage Grotesque', serif;
}

.display-font {
  font-family: 'Cairo', 'Bricolage Grotesque', serif;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* === GRAIN OVERLAY === */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.9' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* === NAV === */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 246, 238, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  cursor: pointer;
  text-decoration: none;
  color: var(--night);
}

.logo-mark {
  width: 44px;
  height: 44px;
  background: var(--night);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.logo-mark::after {
  content: '';
  position: absolute;
  inset: 4px;
  background: linear-gradient(135deg, var(--teal), var(--teal-deep));
  border-radius: 8px;
}

.logo-mark span {
  position: relative;
  color: var(--night);
  font-weight: 900;
  font-size: 1.3rem;
  z-index: 1;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.logo-text strong {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--night);
}

.logo-text small {
  font-size: 0.7rem;
  color: var(--ash);
  letter-spacing: 0.05em;
  margin-top: 2px;
}

.nav-links {
  display: flex;
  gap: 0.3rem;
  align-items: center;
}

.nav-link {
  padding: 0.6rem 1.1rem;
  border-radius: 10px;
  text-decoration: none;
  color: var(--night-soft);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  background: transparent;
  font-family: inherit;
}

.nav-link:hover {
  background: var(--teal-mist);
  color: var(--teal-deep);
}

.nav-link.active {
  background: var(--night);
  color: var(--cream);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.lang-toggle {
  background: var(--cream-deep);
  border: 1px solid var(--line);
  padding: 0.5rem 0.9rem;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--night);
  font-family: inherit;
  transition: all 0.2s;
}

.lang-toggle:hover { background: var(--teal-mist); border-color: var(--teal); }

.btn {
  padding: 0.7rem 1.4rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.92rem;
  border: none;
  cursor: pointer;
  transition: all 0.25s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: inherit;
}

.btn-primary {
  background: var(--night);
  color: var(--cream);
}

.btn-primary:hover {
  background: var(--teal-deep);
  transform: translateY(-1px);
}

.btn-teal {
  background: var(--teal);
  color: var(--night);
}

.btn-teal:hover {
  background: var(--teal-deep);
  color: var(--cream);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--night);
  border: 1px solid var(--night);
}

.btn-ghost:hover { background: var(--night); color: var(--cream); }

/* === VIEW SYSTEM === */
.view { display: none; animation: fadeUp 0.5s ease; }
.view.active { display: block; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === HERO === */
.hero {
  position: relative;
  padding: 5rem 2rem 4rem;
  overflow: hidden;
}

.hero-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--teal-mist);
  border: 1px solid var(--teal-soft);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--teal-deep);
  margin-bottom: 1.5rem;
}

.hero-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--teal);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(20, 184, 196, 0.5); }
  50% { box-shadow: 0 0 0 8px rgba(20, 184, 196, 0); }
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.8rem);
  font-weight: 900;
  line-height: 1.05;
  color: var(--night);
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
}

.hero h1 .accent {
  color: var(--teal-deep);
  position: relative;
  display: inline-block;
}

.hero h1 .accent::after {
  content: '';
  position: absolute;
  bottom: 0.05em;
  left: 0;
  right: 0;
  height: 0.18em;
  background: var(--teal);
  z-index: -1;
  opacity: 0.4;
  border-radius: 4px;
}

.hero p {
  font-size: 1.15rem;
  color: var(--night-soft);
  margin-bottom: 2rem;
  max-width: 540px;
  line-height: 1.7;
}

.hero-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 3rem; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  padding-top: 2rem;
  max-width: 540px;
}

.stat strong {
  display: block;
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--night);
  line-height: 1;
  font-family: 'Bricolage Grotesque', sans-serif;
}

.stat span {
  font-size: 0.85rem;
  color: var(--ash);
  margin-top: 0.3rem;
  display: block;
}

/* === HERO VISUAL === */
.hero-visual {
  position: relative;
  height: 540px;
}

.visual-card {
  position: absolute;
  background: white;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  padding: 1.2rem;
  border: 1px solid var(--line);
  transition: transform 0.4s;
}

.vc-main {
  inset-inline-end: 0;
  top: 20px;
  width: 320px;
  background: var(--night);
  color: var(--cream);
  padding: 1.8rem;
  border: none;
  z-index: 3;
  animation: floatA 6s ease-in-out infinite;
}

.vc-main::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  background: linear-gradient(135deg, var(--teal), transparent 50%);
  border-radius: 20px;
  z-index: -1;
}

@keyframes floatA {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes floatB {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

.vc-chat {
  inset-inline-start: 0;
  top: 100px;
  width: 280px;
  z-index: 2;
  animation: floatB 7s ease-in-out infinite;
}

.vc-job {
  inset-inline-end: 30px;
  bottom: 20px;
  width: 290px;
  z-index: 2;
  animation: floatA 8s ease-in-out infinite;
  animation-delay: -2s;
}

.vc-main .ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--teal);
  color: var(--night);
  padding: 0.3rem 0.7rem;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.vc-main h3 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 0.6rem;
}

.vc-main p {
  font-size: 0.85rem;
  color: rgba(250, 246, 238, 0.7);
  margin-bottom: 1.2rem;
  line-height: 1.5;
}

.match-bar {
  background: rgba(255,255,255,0.08);
  border-radius: 100px;
  height: 8px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.match-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--amber));
  width: 92%;
  border-radius: 100px;
  animation: fillGrow 2s ease-out;
}

@keyframes fillGrow { from { width: 0; } }

.match-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: rgba(250, 246, 238, 0.7);
}

.match-label strong { color: var(--teal); font-size: 0.9rem; }

.vc-chat .chat-msg {
  background: var(--teal-mist);
  padding: 0.7rem 1rem;
  border-radius: 14px;
  border-bottom-inline-start-radius: 4px;
  font-size: 0.85rem;
  color: var(--night);
  margin-bottom: 0.6rem;
  line-height: 1.4;
}

.vc-chat .chat-msg.user {
  background: var(--night);
  color: var(--cream);
  border-radius: 14px;
  border-bottom-inline-end-radius: 4px;
  margin-inline-start: 2rem;
}

.vc-job-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.8rem;
}

.vc-job-logo {
  width: 40px;
  height: 40px;
  background: var(--coral);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
}

.vc-job h4 { font-size: 0.95rem; font-weight: 800; color: var(--night); }
.vc-job small { font-size: 0.75rem; color: var(--ash); }
.vc-job-tags { display: flex; gap: 0.3rem; margin-top: 0.6rem; flex-wrap: wrap; }
.vc-job-tags span {
  background: var(--cream-deep);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.7rem;
  color: var(--night-soft);
  font-weight: 600;
}

/* === BG SHAPES === */
.hero::before {
  content: '';
  position: absolute;
  top: -100px;
  inset-inline-end: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--teal-soft), transparent 70%);
  opacity: 0.4;
  z-index: 0;
  border-radius: 50%;
}

/* === SECTIONS === */
.section {
  padding: 5rem 2rem;
  position: relative;
  z-index: 2;
}

.section-inner { max-width: 1400px; margin: 0 auto; }

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 3rem;
  gap: 2rem;
  flex-wrap: wrap;
}

.section-eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--teal-deep);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.7rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  color: var(--night);
  letter-spacing: -0.02em;
  line-height: 1.1;
  max-width: 700px;
}

.section-desc {
  color: var(--ash);
  max-width: 400px;
  font-size: 1rem;
}

/* === FEATURES GRID === */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
  cursor: pointer;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--teal);
}

.feature-card.dark {
  background: var(--night);
  color: var(--cream);
  border-color: var(--night);
}

.feature-card.dark .feature-title { color: var(--cream); }
.feature-card.dark .feature-desc { color: rgba(250,246,238,0.7); }

.feature-icon {
  width: 56px;
  height: 56px;
  background: var(--teal-mist);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
  color: var(--teal-deep);
}

.feature-card.dark .feature-icon {
  background: rgba(20, 184, 196, 0.15);
  color: var(--teal);
}

.feature-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--night);
  margin-bottom: 0.5rem;
}

.feature-desc {
  font-size: 0.92rem;
  color: var(--ash);
  line-height: 1.6;
}

.feature-arrow {
  position: absolute;
  top: 1.5rem;
  inset-inline-end: 1.5rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--cream-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

body.lang-ar .feature-arrow svg { transform: scaleX(-1); }

.feature-card:hover .feature-arrow {
  background: var(--teal);
  color: var(--night);
  transform: rotate(0deg);
}

.feature-card.dark .feature-arrow { background: rgba(255,255,255,0.1); color: var(--cream); }

/* === JOBS === */
.jobs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.2rem;
}

.job-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.5rem;
  transition: all 0.25s;
  cursor: pointer;
}

.job-card:hover {
  border-color: var(--teal);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.job-card-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.company-logo {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 1.1rem;
}

.bookmark-btn {
  background: var(--cream-deep);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ash);
  transition: all 0.2s;
}

.bookmark-btn:hover, .bookmark-btn.active {
  background: var(--night);
  color: var(--teal);
}

.job-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--night);
  margin-bottom: 0.3rem;
}

.job-company {
  font-size: 0.85rem;
  color: var(--ash);
  margin-bottom: 1rem;
}

.job-tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

.job-tag {
  background: var(--teal-mist);
  color: var(--teal-deep);
  padding: 0.3rem 0.7rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
}

.job-tag.amber { background: #FEF3D7; color: #B8830F; }
.job-tag.coral { background: #FFE4E0; color: #B8453A; }

.job-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.job-salary {
  font-weight: 800;
  color: var(--night);
  font-size: 1rem;
}

.job-salary small { font-size: 0.75rem; color: var(--ash); font-weight: 500; }

.job-location {
  font-size: 0.8rem;
  color: var(--ash);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* === AI CHAT VIEW === */
.chat-view {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  height: calc(100vh - 90px);
}

.chat-sidebar {
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-sidebar h3 {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--night);
}

.new-chat-btn {
  background: var(--night);
  color: var(--cream);
  padding: 0.8rem 1rem;
  border-radius: 12px;
  border: none;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  font-family: inherit;
  font-size: 0.92rem;
}

.new-chat-btn:hover { background: var(--teal-deep); }

.chat-history {
  flex: 1;
  overflow-y: auto;
}

.chat-history-item {
  padding: 0.7rem 0.9rem;
  background: var(--cream-deep);
  border-radius: 10px;
  margin-bottom: 0.5rem;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--night-soft);
  transition: all 0.2s;
}

.chat-history-item:hover, .chat-history-item.active {
  background: var(--teal-mist);
  color: var(--teal-deep);
}

.chat-history-item small {
  display: block;
  color: var(--ash);
  font-size: 0.7rem;
  margin-top: 0.2rem;
}

.chat-main {
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-header {
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.ai-avatar {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--teal), var(--teal-deep));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 900;
}

.chat-header h3 { font-size: 1rem; font-weight: 800; color: var(--night); }
.chat-header small { font-size: 0.8rem; color: var(--green); display: flex; align-items: center; gap: 0.3rem; }
.chat-header small::before { content: ''; width: 6px; height: 6px; background: var(--green); border-radius: 50%; }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.msg {
  max-width: 75%;
  padding: 0.9rem 1.2rem;
  border-radius: 16px;
  font-size: 0.95rem;
  line-height: 1.55;
  animation: msgIn 0.3s ease;
}

@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.msg.bot {
  background: var(--cream-deep);
  color: var(--night);
  align-self: flex-start;
  border-bottom-inline-start-radius: 4px;
}

.msg.user {
  background: var(--night);
  color: var(--cream);
  align-self: flex-end;
  border-bottom-inline-end-radius: 4px;
}

.msg.bot strong { color: var(--teal-deep); }

.quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.quick-reply {
  background: white;
  border: 1px solid var(--teal-soft);
  color: var(--teal-deep);
  padding: 0.5rem 0.9rem;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.quick-reply:hover {
  background: var(--teal);
  color: var(--night);
  border-color: var(--teal);
}

.job-suggestion {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
  margin-top: 0.7rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.job-suggestion .company-logo { width: 40px; height: 40px; font-size: 0.95rem; }
.job-suggestion-info { flex: 1; }
.job-suggestion-info h5 { font-size: 0.92rem; font-weight: 800; color: var(--night); margin-bottom: 0.1rem; }
.job-suggestion-info small { font-size: 0.78rem; color: var(--ash); }
.job-suggestion .btn { padding: 0.4rem 0.8rem; font-size: 0.8rem; }

.chat-input-wrap {
  padding: 1rem 1.5rem 1.2rem;
  border-top: 1px solid var(--line);
}

.chat-input {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: var(--cream-deep);
  border-radius: 14px;
  padding: 0.4rem 0.4rem 0.4rem 1rem;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.chat-input:focus-within { border-color: var(--teal); background: white; }

.chat-input input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 0.7rem 0;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--night);
}

.send-btn {
  background: var(--night);
  color: var(--teal);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.send-btn:hover { background: var(--teal-deep); color: var(--cream); transform: rotate(-15deg); }

body.lang-ar .send-btn svg { transform: scaleX(-1); }
body.lang-ar .send-btn:hover svg { transform: scaleX(-1) rotate(0deg); }

.typing-dots {
  display: inline-flex;
  gap: 4px;
  padding: 0.6rem 1rem;
}

.typing-dots span {
  width: 8px;
  height: 8px;
  background: var(--teal-deep);
  border-radius: 50%;
  animation: typing 1.4s infinite;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* === CV BUILDER === */
.cv-view {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.cv-form {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  border: 1px solid var(--line);
  max-height: calc(100vh - 130px);
  overflow-y: auto;
}

.cv-tabs {
  display: flex;
  gap: 0.3rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.cv-tab {
  padding: 0.7rem 1rem;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  color: var(--ash);
  font-size: 0.9rem;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
}

.cv-tab.active { color: var(--teal-deep); border-bottom-color: var(--teal); }

.cv-tab-content { display: none; }
.cv-tab-content.active { display: block; }

.form-group { margin-bottom: 1.2rem; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--night);
  margin-bottom: 0.4rem;
}

.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.92rem;
  background: var(--cream);
  color: var(--night);
  transition: all 0.2s;
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none;
  border-color: var(--teal);
  background: white;
}

.form-group textarea { min-height: 80px; resize: vertical; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.add-item-btn {
  background: var(--teal-mist);
  border: 1px dashed var(--teal);
  color: var(--teal-deep);
  padding: 0.6rem;
  width: 100%;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  transition: all 0.2s;
  margin-top: 0.5rem;
}

.add-item-btn:hover { background: var(--teal); color: var(--night); }

.cv-preview {
  background: white;
  border-radius: 20px;
  padding: 2.5rem;
  border: 1px solid var(--line);
  max-height: calc(100vh - 130px);
  overflow-y: auto;
  position: relative;
}

.cv-preview-actions {
  position: sticky;
  top: -2.5rem;
  margin: -2.5rem -2.5rem 1.5rem;
  padding: 1rem 2rem;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 0.5rem;
  justify-content: end;
  z-index: 10;
}

.cv-preview-actions .btn { padding: 0.5rem 0.9rem; font-size: 0.82rem; }

.cv-doc { font-family: 'Cairo', serif; }

.cv-header {
  border-bottom: 2px solid var(--night);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.cv-name {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--night);
  letter-spacing: -0.02em;
}

.cv-title-text {
  color: var(--teal-deep);
  font-weight: 700;
  margin-top: 0.3rem;
}

.cv-contact {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 0.7rem;
  font-size: 0.82rem;
  color: var(--ash);
}

.cv-contact span { display: flex; align-items: center; gap: 0.3rem; }

.cv-section { margin-bottom: 1.5rem; }

.cv-section h4 {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--teal-deep);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.6rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.3rem;
}

.cv-summary { font-size: 0.92rem; color: var(--night-soft); line-height: 1.7; }

.cv-item { margin-bottom: 0.9rem; padding-bottom: 0.9rem; border-bottom: 1px dashed var(--line); }
.cv-item:last-child { border-bottom: none; }

.cv-item-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.2rem;
  gap: 1rem;
}

.cv-item-title { font-weight: 800; color: var(--night); }
.cv-item-date { font-size: 0.78rem; color: var(--ash); white-space: nowrap; }
.cv-item-sub { color: var(--teal-deep); font-weight: 600; font-size: 0.88rem; margin-bottom: 0.2rem; }
.cv-item-desc { font-size: 0.85rem; color: var(--night-soft); line-height: 1.6; }

.skills-list { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.skill-chip {
  background: var(--teal-mist);
  color: var(--teal-deep);
  padding: 0.3rem 0.7rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
}

/* AI Review Box */
.ai-review {
  background: linear-gradient(135deg, var(--night), var(--night-soft));
  color: var(--cream);
  border-radius: 14px;
  padding: 1.2rem;
  margin-bottom: 1.5rem;
}

.ai-review-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}

.ai-review-head .ai-avatar { width: 32px; height: 32px; border-radius: 8px; font-size: 0.8rem; }
.ai-review-head h5 { font-size: 0.95rem; font-weight: 800; color: var(--cream); }
.ai-review-head small { font-size: 0.75rem; color: var(--teal); }

.ai-score {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.score-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: conic-gradient(var(--teal) 78%, rgba(255,255,255,0.1) 0);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.score-circle::before {
  content: '';
  position: absolute;
  inset: 6px;
  background: var(--night);
  border-radius: 50%;
}

.score-circle span {
  position: relative;
  z-index: 1;
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--teal);
}

.score-info h6 { font-size: 0.85rem; font-weight: 700; color: var(--cream); margin-bottom: 0.2rem; }
.score-info p { font-size: 0.78rem; color: rgba(250,246,238,0.6); }

.ai-tips { font-size: 0.82rem; color: rgba(250,246,238,0.85); }
.ai-tips li { margin-bottom: 0.4rem; padding-inline-start: 1.2rem; position: relative; list-style: none; }
.ai-tips li::before {
  content: '✓';
  position: absolute;
  inset-inline-start: 0;
  color: var(--teal);
  font-weight: 900;
}

/* === COURSES === */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.5rem;
}

.course-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  transition: all 0.3s;
  cursor: pointer;
}

.course-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.course-cover {
  height: 160px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.course-cover.c1 { background: linear-gradient(135deg, #14B8C4, #0B8A94); }
.course-cover.c2 { background: linear-gradient(135deg, #FF6B5A, #B8453A); }
.course-cover.c3 { background: linear-gradient(135deg, #FFB84D, #B8830F); }
.course-cover.c4 { background: linear-gradient(135deg, #2DBA85, #176B4D); }
.course-cover.c5 { background: linear-gradient(135deg, #6E66E0, #3D3691); }
.course-cover.c6 { background: linear-gradient(135deg, #E55D7E, #8C2E48); }

.course-cover svg { opacity: 0.9; }

.course-cover .badge {
  position: absolute;
  top: 1rem;
  inset-inline-end: 1rem;
  background: rgba(0,0,0,0.3);
  color: white;
  padding: 0.3rem 0.7rem;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.course-body { padding: 1.3rem; }

.course-cat {
  font-size: 0.72rem;
  color: var(--teal-deep);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.course-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--night);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.course-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.78rem;
  color: var(--ash);
  margin-bottom: 1rem;
}

.course-meta span { display: flex; align-items: center; gap: 0.3rem; }

.course-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.course-price {
  font-weight: 900;
  color: var(--night);
  font-size: 1.1rem;
}

.course-price.free { color: var(--green); }

/* === MODAL === */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 31, 46, 0.6);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.3s ease;
}

.modal-backdrop.show { display: flex; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--cream);
  border-radius: 24px;
  width: 100%;
  max-width: 460px;
  padding: 2.5rem;
  position: relative;
  animation: modalIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90vh;
  overflow-y: auto;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
  position: absolute;
  top: 1.2rem;
  inset-inline-end: 1.2rem;
  background: var(--cream-deep);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--night);
  transition: all 0.2s;
}

.modal-close:hover { background: var(--coral); color: white; }

.modal h2 { font-size: 1.6rem; font-weight: 900; color: var(--night); margin-bottom: 0.4rem; }
.modal-desc { color: var(--ash); margin-bottom: 1.8rem; font-size: 0.92rem; }

.auth-toggle {
  display: flex;
  background: var(--cream-deep);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 1.5rem;
}

.auth-toggle button {
  flex: 1;
  padding: 0.6rem;
  border: none;
  background: transparent;
  border-radius: 9px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  color: var(--ash);
  font-size: 0.88rem;
}

.auth-toggle button.active {
  background: var(--night);
  color: var(--cream);
}

.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.2rem 0;
  color: var(--ash);
  font-size: 0.8rem;
}

.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.social-btn {
  width: 100%;
  padding: 0.7rem;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
  color: var(--night);
  font-size: 0.9rem;
  transition: all 0.2s;
}

.social-btn:hover { background: var(--cream-deep); border-color: var(--night); }

/* === ADMIN === */
.admin-view {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.5rem;
}

.admin-sidebar {
  background: var(--night);
  color: var(--cream);
  border-radius: 20px;
  padding: 1.5rem;
  height: fit-content;
  position: sticky;
  top: 100px;
}

.admin-sidebar h4 {
  font-size: 0.75rem;
  color: var(--teal);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.admin-nav-item {
  padding: 0.7rem 1rem;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.3rem;
  color: rgba(250,246,238,0.7);
  transition: all 0.2s;
  font-weight: 600;
  font-size: 0.9rem;
}

.admin-nav-item:hover { background: rgba(255,255,255,0.05); color: var(--cream); }
.admin-nav-item.active { background: var(--teal); color: var(--night); }

.admin-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.stat-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.3rem;
  position: relative;
  overflow: hidden;
}

.stat-card .icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--teal-mist);
  color: var(--teal-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.8rem;
}

.stat-card .icon.coral { background: #FFE4E0; color: var(--coral); }
.stat-card .icon.amber { background: #FEF3D7; color: #B8830F; }
.stat-card .icon.green { background: #D9F1E5; color: var(--green); }

.stat-card .stat-num {
  font-size: 2rem;
  font-weight: 900;
  color: var(--night);
  font-family: 'Bricolage Grotesque', sans-serif;
  line-height: 1;
}

.stat-card .stat-label { font-size: 0.85rem; color: var(--ash); margin-top: 0.3rem; }

.stat-card .trend {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 0.5rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}

.trend.up { background: #D9F1E5; color: var(--green); }
.trend.down { background: #FFE4E0; color: var(--coral); }

.admin-panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.8rem;
}

.admin-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.admin-panel-head h3 { font-size: 1.2rem; font-weight: 800; color: var(--night); }

.chart-wrap {
  height: 240px;
  background: var(--cream);
  border-radius: 14px;
  padding: 1rem;
  display: flex;
  align-items: end;
  gap: 0.8rem;
}

.bar {
  flex: 1;
  background: linear-gradient(to top, var(--teal-deep), var(--teal));
  border-radius: 8px 8px 0 0;
  position: relative;
  transition: all 0.3s;
  cursor: pointer;
}

.bar:hover { opacity: 0.85; }

.bar small {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  color: var(--ash);
  white-space: nowrap;
}

.bar .val {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--night);
}

.admin-table { width: 100%; }
.admin-table th, .admin-table td {
  padding: 0.8rem;
  text-align: start;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--line);
}

.admin-table th {
  font-size: 0.75rem;
  color: var(--ash);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.user-row { display: flex; align-items: center; gap: 0.7rem; }

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--teal);
  color: var(--night);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
}

.status-pill {
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
}

.status-pill.active { background: #D9F1E5; color: var(--green); }
.status-pill.pending { background: #FEF3D7; color: #B8830F; }
.status-pill.banned { background: #FFE4E0; color: var(--coral); }

.row-action {
  background: var(--cream-deep);
  border: none;
  padding: 0.4rem 0.7rem;
  border-radius: 7px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--night);
  margin-inline-end: 0.3rem;
}

.row-action:hover { background: var(--teal); }
.row-action.danger:hover { background: var(--coral); color: white; }

/* === FILE UPLOAD ZONE === */
.upload-zone {
  border: 2px dashed var(--teal);
  background: var(--teal-mist);
  border-radius: 14px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.upload-zone:hover, .upload-zone.dragover {
  background: var(--teal-soft);
  transform: scale(1.01);
}

.upload-zone .icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  background: white;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal-deep);
}

.upload-zone h4 { font-size: 1.05rem; font-weight: 800; color: var(--night); margin-bottom: 0.3rem; }
.upload-zone p { font-size: 0.85rem; color: var(--ash); }
.upload-zone input { display: none; }

/* === FLOATING AI === */
.floating-ai {
  position: fixed;
  bottom: 1.5rem;
  inset-inline-end: 1.5rem;
  z-index: 50;
}

.fab {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--night);
  color: var(--teal);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s;
  position: relative;
}

.fab:hover { transform: scale(1.1) rotate(8deg); background: var(--teal-deep); color: var(--cream); }

.fab::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--teal), transparent 70%);
  opacity: 0.4;
  animation: pulse 2s infinite;
  z-index: -1;
}

/* === FOOTER === */
footer {
  background: var(--night);
  color: var(--cream);
  padding: 4rem 2rem 2rem;
  margin-top: 5rem;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  color: rgba(250,246,238,0.7);
  font-size: 0.9rem;
  margin-top: 1rem;
  max-width: 320px;
  line-height: 1.7;
}

.footer-col h5 {
  font-size: 0.9rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--teal);
}

.footer-col a {
  display: block;
  color: rgba(250,246,238,0.7);
  text-decoration: none;
  font-size: 0.88rem;
  margin-bottom: 0.5rem;
  transition: color 0.2s;
  cursor: pointer;
}

.footer-col a:hover { color: var(--teal); }

.footer-bot {
  max-width: 1400px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: rgba(250,246,238,0.5);
  flex-wrap: wrap;
  gap: 1rem;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .chat-view, .cv-view, .admin-view { grid-template-columns: 1fr; }
  .chat-sidebar { display: none; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  .nav-links { display: none; }
  .nav-inner { padding: 1rem; }
  .hero { padding: 3rem 1.2rem 2rem; }
  .section { padding: 3rem 1.2rem; }
  .modal { padding: 1.8rem; }
  .footer-inner { grid-template-columns: 1fr; }
  .stat strong { font-size: 1.7rem; }
  .form-row { grid-template-columns: 1fr; }
}

/* === RTL HELPERS === */
body.lang-en .nav-links { direction: ltr; }
body.lang-ar { font-feature-settings: 'kern' 1, 'liga' 1; }

/* Hide for English / show for Arabic */
.en-only { display: none; }
.ar-only { display: inline; }
body.lang-en .en-only { display: inline; }
body.lang-en .ar-only { display: none; }
body.lang-en .ar-only-block { display: none !important; }
body.lang-en .en-only-block { display: block !important; }
.en-only-block { display: none; }
.ar-only-block { display: block; }

/* Scrollbar styling */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--cream-deep); }
::-webkit-scrollbar-thumb { background: var(--teal-deep); border-radius: 100px; }
::-webkit-scrollbar-thumb:hover { background: var(--night); }

/* === TOAST NOTIFICATIONS === */
.toast-container {
  position: fixed;
  top: 90px;
  inset-inline-end: 1.5rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  pointer-events: none;
}

.toast {
  background: var(--night);
  color: var(--cream);
  padding: 0.9rem 1.2rem;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 280px;
  max-width: 380px;
  pointer-events: auto;
  animation: toastIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  border-inline-start: 4px solid var(--teal);
}

.toast.success { border-inline-start-color: var(--green); }
.toast.error { border-inline-start-color: var(--coral); }
.toast.info { border-inline-start-color: var(--teal); }
.toast.warn { border-inline-start-color: var(--amber); }

.toast-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.toast.success .toast-icon { background: rgba(45, 186, 133, 0.2); color: var(--green); }
.toast.error .toast-icon { background: rgba(255, 107, 90, 0.2); color: var(--coral); }
.toast.info .toast-icon { background: rgba(20, 184, 196, 0.2); color: var(--teal); }
.toast.warn .toast-icon { background: rgba(255, 184, 77, 0.2); color: var(--amber); }

.toast-body { flex: 1; font-size: 0.9rem; font-weight: 600; line-height: 1.4; }
.toast-body small { display: block; opacity: 0.7; font-weight: 400; margin-top: 0.2rem; font-size: 0.8rem; }

.toast.removing { animation: toastOut 0.3s ease forwards; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(20%); }
  to { opacity: 1; transform: translateX(0); }
}

body.lang-ar .toast { animation-name: toastInAr; }
@keyframes toastInAr {
  from { opacity: 0; transform: translateX(-20%); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateX(20%) scale(0.95); }
}

/* === DETAILS MODAL (Jobs & Courses) === */
.details-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 31, 46, 0.65);
  backdrop-filter: blur(8px);
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.3s ease;
}

.details-modal-backdrop.show { display: flex; }

.details-modal {
  background: var(--cream);
  border-radius: 24px;
  width: 100%;
  max-width: 720px;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  animation: modalIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.details-hero {
  padding: 2rem 2rem 1.5rem;
  position: relative;
  border-bottom: 1px solid var(--line);
}

.details-hero.dark { background: var(--night); color: var(--cream); border-radius: 24px 24px 0 0; }
.details-hero.dark .details-title { color: var(--cream); }
.details-hero.dark .details-sub { color: rgba(250,246,238,0.7); }

.details-close {
  position: absolute;
  top: 1.2rem;
  inset-inline-end: 1.2rem;
  background: rgba(255,255,255,0.1);
  color: white;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 5;
}

.details-close:hover { background: var(--coral); }

.details-head-row {
  display: flex;
  align-items: start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.details-logo {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 1.6rem;
  flex-shrink: 0;
}

.details-title {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--night);
  line-height: 1.2;
  margin-bottom: 0.3rem;
}

.details-sub {
  color: var(--ash);
  font-size: 0.95rem;
}

.details-tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.details-tags span {
  background: rgba(255,255,255,0.1);
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--teal);
}

.details-hero:not(.dark) .details-tags span {
  background: var(--teal-mist);
  color: var(--teal-deep);
}

.details-body {
  padding: 1.8rem 2rem;
}

.details-body h4 {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--teal-deep);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 1.5rem 0 0.7rem;
}

.details-body h4:first-child { margin-top: 0; }

.details-body p, .details-body li {
  color: var(--night-soft);
  font-size: 0.95rem;
  line-height: 1.7;
}

.details-body ul { padding-inline-start: 1.2rem; }
.details-body li { margin-bottom: 0.3rem; }

.details-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.8rem;
  margin: 1.2rem 0;
}

.details-stat {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem;
}

.details-stat strong {
  display: block;
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--night);
  font-family: 'Bricolage Grotesque', sans-serif;
}

.details-stat small {
  font-size: 0.75rem;
  color: var(--ash);
  display: block;
  margin-top: 0.2rem;
}

.details-actions {
  position: sticky;
  bottom: 0;
  background: var(--cream);
  padding: 1.2rem 2rem;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 0.7rem;
}

.details-actions .btn { flex: 1; justify-content: center; }

/* === APPLICATION FORM === */
.apply-form { padding: 1.5rem 2rem 0; }

/* === USER STATE (logged in) === */
.user-chip {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.4rem 0.4rem 0.8rem;
  background: var(--night);
  color: var(--cream);
  border-radius: 100px;
  font-weight: 700;
  font-size: 0.85rem;
}

body.logged-in .user-chip { display: inline-flex; }
body.logged-in .auth-btns { display: none; }

.user-chip-avatar {
  width: 30px;
  height: 30px;
  background: var(--teal);
  color: var(--night);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.8rem;
}

/* === PRINT STYLES (for CV) === */
@media print {
  body * { visibility: hidden; }
  .cv-doc, .cv-doc * { visibility: visible; }
  .cv-doc {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    padding: 1.5rem;
    background: white;
  }
  .cv-preview-actions, .ai-review { display: none !important; }
  body::before { display: none; }
}

/* === EMPTY STATE === */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--ash);
  grid-column: 1 / -1;
}

.empty-state svg {
  margin: 0 auto 1rem;
  opacity: 0.5;
}

.empty-state h4 {
  font-size: 1.1rem;
  color: var(--night);
  margin-bottom: 0.4rem;
  font-weight: 800;
}

/* ============================================================
   PHASE-1 ENHANCEMENTS · تحسينات المرحلة الأولى
   ============================================================ */

/* === SCROLL REVEAL ANIMATIONS === */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }
.reveal.d4 { transition-delay: 0.32s; }
.reveal.d5 { transition-delay: 0.40s; }
.reveal-left  { opacity: 0; transform: translateX(-32px); transition: opacity 0.7s cubic-bezier(0.22,1,0.36,1), transform 0.7s cubic-bezier(0.22,1,0.36,1); }
.reveal-left.in { opacity: 1; transform: none; }
.reveal-scale { opacity: 0; transform: scale(0.94); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22,1,0.36,1); }
.reveal-scale.in { opacity: 1; transform: none; }

/* حركة عدّاد الأرقام تظل ناعمة */
.count-up { font-variant-numeric: tabular-nums; }

/* لمسة تحرير: خط سفلي متحرك على روابط التنقل */
.nav-link { position: relative; }
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px; inset-inline-start: 50%;
  width: 0; height: 2px;
  background: var(--teal-deep);
  border-radius: 2px;
  transform: translateX(50%);
  transition: width 0.28s ease;
}
body.lang-en .nav-link::after { inset-inline-start: 50%; transform: translateX(-50%); }
.nav-link:hover::after, .nav-link.active::after { width: 18px; }

/* بطاقات الوظائف/الكورسات: رفع لطيف عند المرور */
.job-card, .course-card { transition: transform 0.3s cubic-bezier(0.22,1,0.36,1), box-shadow 0.3s ease, border-color 0.3s ease; }
.job-card:hover { transform: translateY(-4px); }
.course-card:hover { transform: translateY(-6px); }

/* احترام تفضيل تقليل الحركة */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .reveal, .reveal-left, .reveal-scale { opacity: 1 !important; transform: none !important; }
}

/* === ترقيم أقسام تحريري (مظهر مطبوع بلا طابع AI) === */
.section-head { position: relative; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-deep);
  margin-bottom: 0.7rem;
}
.eyebrow::before {
  content: '';
  width: 22px; height: 1px;
  background: var(--teal-deep);
  display: inline-block;
}

/* === ROLE SELECTOR (نوع الحساب) === */
.role-select { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; margin-bottom: 1.1rem; }
.role-card {
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 0.9rem 0.8rem;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
  background: var(--cream);
}
.role-card:hover { transform: translateY(-2px); }
.role-card.active { border-color: var(--teal-deep); background: var(--teal-mist); }
.role-card svg { color: var(--night); margin-bottom: 0.4rem; }
.role-card strong { display: block; font-size: 0.9rem; color: var(--night); }
.role-card small { color: var(--ash); font-size: 0.72rem; }
.role-card.active svg { color: var(--teal-deep); }

/* حقول ديناميكية للحساب */
.role-fields { display: none; }
.role-fields.show { display: block; }
.field-error { border-color: var(--red) !important; }
.form-hint { font-size: 0.74rem; color: var(--ash); margin-top: 0.3rem; }
.form-hint.err { color: var(--red); }

/* قوة كلمة المرور */
.pw-meter { height: 5px; border-radius: 4px; background: var(--cream-deep); margin-top: 0.5rem; overflow: hidden; }
.pw-meter > span { display: block; height: 100%; width: 0; border-radius: 4px; transition: width 0.3s ease, background 0.3s ease; }

/* === ACCOUNT VIEW (لوحة حسابي) === */
.account-wrap { max-width: 1100px; margin: 0 auto; padding: 2.5rem 2rem 4rem; }
.account-hero {
  background: var(--night);
  color: var(--cream);
  border-radius: 24px;
  padding: 2rem;
  display: flex;
  align-items: center;
  gap: 1.3rem;
  position: relative;
  overflow: hidden;
}
.account-hero::after {
  content: '';
  position: absolute;
  inset-inline-end: -60px; top: -60px;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(20,184,196,0.25), transparent 70%);
}
.account-avatar {
  width: 76px; height: 76px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--teal), var(--teal-deep));
  color: var(--night);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 2rem;
  flex-shrink: 0;
}
.account-hero h2 { font-size: 1.5rem; font-weight: 900; }
.account-role-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  margin-top: 0.5rem;
  background: rgba(20,184,196,0.18);
  color: var(--teal-soft);
  border: 1px solid rgba(20,184,196,0.3);
  padding: 0.25rem 0.8rem;
  border-radius: 100px;
  font-size: 0.76rem; font-weight: 700;
}
.account-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 1.5rem; }
.account-stat { background: white; border: 1px solid var(--line); border-radius: 16px; padding: 1.1rem; text-align: center; }
.account-stat strong { display: block; font-size: 1.6rem; font-weight: 900; color: var(--night); }
.account-stat small { color: var(--ash); font-size: 0.78rem; }
.account-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.4rem; margin-top: 1.5rem; }
.account-panel { background: white; border: 1px solid var(--line); border-radius: 18px; padding: 1.5rem; }
.account-panel h3 { font-size: 1.05rem; font-weight: 800; color: var(--night); margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem; }
.profile-row { display: flex; justify-content: space-between; padding: 0.7rem 0; border-bottom: 1px dashed var(--line); font-size: 0.9rem; }
.profile-row:last-child { border-bottom: none; }
.profile-row span:first-child { color: var(--ash); }
.profile-row span:last-child { color: var(--night); font-weight: 600; }
.saved-empty { color: var(--ash); font-size: 0.88rem; text-align: center; padding: 1.5rem 0; }
@media (max-width: 860px) {
  .account-grid { grid-template-columns: 1fr; }
  .account-stats { grid-template-columns: repeat(2, 1fr); }
  .account-hero { flex-direction: column; text-align: center; }
}

/* === CV: أيقونات التواصل SVG + قوالب === */
.cv-contact span { display: inline-flex; align-items: center; gap: 0.35rem; }
.cv-contact svg { flex-shrink: 0; opacity: 0.75; }

.tpl-select { display: flex; gap: 0.6rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.tpl-chip {
  border: 1.5px solid var(--line);
  background: var(--cream);
  border-radius: 10px;
  padding: 0.45rem 0.9rem;
  font-size: 0.82rem; font-weight: 700; color: var(--ash);
  cursor: pointer; font-family: inherit;
  transition: all 0.2s ease;
}
.tpl-chip.active { border-color: var(--teal-deep); color: var(--teal-deep); background: var(--teal-mist); }

/* قوالب السيرة */
.cv-doc.tpl-classic .cv-header { text-align: start; }
.cv-doc.tpl-modern .cv-header {
  background: var(--night); color: var(--cream);
  margin: -2.2rem -2.2rem 1.5rem; padding: 2rem 2.2rem; border-radius: 0;
}
.cv-doc.tpl-modern .cv-header .cv-name,
.cv-doc.tpl-modern .cv-header .cv-title-text { color: var(--cream); }
.cv-doc.tpl-modern .cv-section h4 { color: var(--teal-deep); }
.cv-doc.tpl-minimal .cv-section h4 { border: none; padding: 0; letter-spacing: 0.16em; font-size: 0.72rem; }
.cv-doc.tpl-minimal .cv-name { font-weight: 700; letter-spacing: -0.01em; }

/* شريط تحليل مراجعة CV */
.review-metrics { display: grid; gap: 0.65rem; margin: 0.9rem 0; }
.review-metric { }
.review-metric-top { display: flex; justify-content: space-between; font-size: 0.8rem; margin-bottom: 0.25rem; }
.review-metric-top span:first-child { color: var(--night); font-weight: 600; }
.review-metric-top span:last-child { color: var(--ash); font-variant-numeric: tabular-nums; }
.review-bar { height: 7px; background: var(--cream-deep); border-radius: 5px; overflow: hidden; }
.review-bar > i { display: block; height: 100%; border-radius: 5px; width: 0; transition: width 0.9s cubic-bezier(0.22,1,0.36,1); }
.review-bar > i.good { background: var(--green); }
.review-bar > i.mid  { background: var(--amber); }
.review-bar > i.low  { background: var(--red); }
.ai-tips li.warn::marker { color: var(--red); }
.ai-tips li.ok { color: var(--ash); }
.review-empty {
  border: 1.5px dashed var(--line); border-radius: 16px;
  padding: 1.4rem; text-align: center; color: var(--ash); font-size: 0.88rem;
}

/* منطقة لصق نص السيرة للمراجعة */
.paste-review textarea {
  width: 100%; min-height: 120px; resize: vertical;
  border: 1px solid var(--line); border-radius: 12px; padding: 0.8rem;
  font-family: inherit; font-size: 0.9rem; background: var(--cream);
}

/* === CHAT: تحسينات === */
.chat-source {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.7rem; color: var(--teal-deep); font-weight: 700;
  background: var(--teal-mist); border-radius: 100px; padding: 0.2rem 0.6rem;
  margin-top: 0.5rem;
}
.msg.bot strong { color: var(--night); }

/* === تحسين وسم "موثوق من" (شريط شركات) === */
.trust-strip { display: flex; align-items: center; gap: 2rem; flex-wrap: wrap; opacity: 0.55; margin-top: 2rem; }
.trust-strip span { font-weight: 800; font-size: 1.1rem; color: var(--ash); letter-spacing: -0.02em; }

/* شارة أمان في الفوتر */
.secure-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.76rem; color: var(--green); font-weight: 700;
}

/* === COUNTRY PICKER (منتقي الدولة) === */
.country-picker { position: relative; }
.country-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: var(--cream-deep); border: 1px solid var(--line);
  border-radius: 100px; padding: 0.45rem 0.8rem;
  font-family: inherit; font-size: 0.82rem; font-weight: 700;
  color: var(--night); cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.country-btn:hover { border-color: var(--teal-deep); }
.country-btn .caret { transition: transform 0.2s ease; opacity: 0.6; }
.country-picker.open .caret { transform: rotate(180deg); }
.country-menu {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0;
  min-width: 190px; background: white;
  border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-lg); padding: 0.4rem;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 200;
}
.country-picker.open .country-menu { opacity: 1; visibility: visible; transform: none; }
.country-item {
  display: flex; align-items: center; gap: 0.6rem; width: 100%;
  background: none; border: none; border-radius: 10px;
  padding: 0.6rem 0.7rem; cursor: pointer; font-family: inherit;
  font-size: 0.86rem; color: var(--ink); text-align: start;
  transition: background 0.15s ease;
}
.country-item:hover { background: var(--cream); }
.country-item.active { background: var(--teal-mist); color: var(--teal-deep); font-weight: 800; }
.country-item .co-code {
  margin-inline-start: auto; font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem; color: var(--ash);
}
.country-item .co-flag {
  width: 26px; height: 20px; border-radius: 4px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace; font-size: 0.62rem; font-weight: 700;
  background: var(--night); color: var(--teal-soft); letter-spacing: 0.03em;
}
@media (max-width: 900px) { .country-btn span { display: none; } }

/* === DIALECT CHIPS (اختيار اللهجة في الشات) === */
.dialect-bar {
  display: flex; align-items: center; gap: 0.35rem;
  padding: 0.6rem 1.5rem; border-bottom: 1px solid var(--line);
  background: var(--cream); flex-wrap: wrap;
}
.dialect-bar > small { color: var(--ash); font-size: 0.74rem; margin-inline-end: 0.2rem; }
.dialect-chip {
  border: 1px solid var(--line); background: white;
  border-radius: 100px; padding: 0.25rem 0.7rem;
  font-family: inherit; font-size: 0.76rem; font-weight: 700;
  color: var(--ash); cursor: pointer;
  transition: all 0.18s ease;
}
.dialect-chip:hover { border-color: var(--teal); color: var(--teal-deep); }
.dialect-chip.active { background: var(--night); border-color: var(--night); color: var(--teal-soft); }

/* شارة الدولة على بطاقة الوظيفة */
.job-country {
  display: inline-flex; align-items: center; gap: 0.25rem;
  font-family: 'JetBrains Mono', monospace; font-size: 0.64rem; font-weight: 700;
  color: var(--ash); border: 1px solid var(--line);
  border-radius: 5px; padding: 0.1rem 0.35rem; letter-spacing: 0.04em;
}

/* شبكة مجالات العمل حسب الدولة */
.fields-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 0.7rem; margin-top: 1.5rem;
}
.field-card {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  background: white; border: 1px solid var(--line); border-radius: 12px;
  padding: 0.8rem 0.9rem; cursor: pointer; font-family: inherit;
  font-size: 0.86rem; font-weight: 700; color: var(--night); text-align: start;
  transition: transform 0.2s cubic-bezier(0.22,1,0.36,1), border-color 0.2s ease, box-shadow 0.2s ease;
}
.field-card:hover { transform: translateY(-3px); border-color: var(--teal); box-shadow: var(--shadow-sm); }
.field-card.active { border-color: var(--teal-deep); background: var(--teal-mist); color: var(--teal-deep); }
.field-card .cnt {
  font-family: 'JetBrains Mono', monospace; font-size: 0.72rem;
  color: var(--ash); background: var(--cream-deep);
  border-radius: 100px; padding: 0.1rem 0.45rem; flex-shrink: 0;
}
.field-card.active .cnt { background: white; color: var(--teal-deep); }

/* حقل الهاتف مع مقدمة الدولة */
.phone-field { display: flex; gap: 0.5rem; align-items: stretch; }
.phone-dial {
  display: inline-flex; align-items: center; padding: 0 0.7rem;
  background: var(--cream-deep); border: 1px solid var(--line);
  border-radius: 12px; font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem; font-weight: 700; color: var(--night); white-space: nowrap;
}
.phone-field input { flex: 1; min-width: 0; }
.required-star { color: var(--red); margin-inline-start: 2px; }

/* زر عائم أعلى للصفحة */
.to-top {
  position: fixed; inset-inline-end: 1.5rem; bottom: 6.5rem; z-index: 90;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--night); color: var(--cream); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  box-shadow: var(--shadow-md);
}
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }

/* ============================================================
   جولة 4: كورسات مقالية · تسويق عقاري · لمسات تحريرية
   ============================================================ */

/* لمسات عامة (طابع مطبوع، بلا بهرجة) */
::selection { background: var(--teal-soft); color: var(--night); }
:focus-visible { outline: 2px solid var(--teal-deep); outline-offset: 2px; border-radius: 4px; }
.chat-messages { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.chat-messages::-webkit-scrollbar { width: 6px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }

/* === قسم التسويق العقاري في الرئيسية === */
.re-spotlight {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2.5rem;
  align-items: center;
  background: white;
  border: 1px solid var(--night);
  border-radius: 28px;
  padding: 3rem;
  position: relative;
  box-shadow: 6px 6px 0 var(--teal-soft);
}
.re-facts { display: flex; gap: 1.8rem; margin-top: 1.4rem; flex-wrap: wrap; }
.re-fact strong {
  display: block; font-size: 1.5rem; font-weight: 900; color: var(--teal-deep);
  font-variant-numeric: tabular-nums;
}
.re-fact small { color: var(--ash); font-size: 0.78rem; }
.re-spotlight-art { color: var(--night); opacity: 0.85; }
.re-spotlight-art svg { width: 100%; height: auto; display: block; }
@media (max-width: 860px) {
  .re-spotlight { grid-template-columns: 1fr; padding: 2rem; }
  .re-spotlight-art { max-width: 320px; margin: 0 auto; }
}

/* === بطاقة الكورس المميز + التقدّم === */
.course-card.featured { grid-column: span 2; display: grid; grid-template-columns: 0.9fr 1.1fr; }
.course-card.featured .course-cover { height: 100%; min-height: 220px; border-radius: 0; }
.course-card.featured .course-title { font-size: 1.25rem; }
@media (max-width: 760px) { .course-card.featured { grid-column: span 1; display: block; } .course-card.featured .course-cover { min-height: 150px; } }
.course-progress { margin: 0.7rem 0 0.2rem; }

/* === منهج الكورس (المراحل والمقالات) === */
.stage-block { margin-top: 1.1rem; }
.stage-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em;
  color: var(--teal-deep); text-transform: uppercase;
  padding-bottom: 0.4rem; border-bottom: 1px solid var(--line);
  margin-bottom: 0.5rem;
}
.lesson-row {
  display: flex; align-items: center; gap: 0.9rem; width: 100%;
  background: none; border: none; border-bottom: 1px dashed var(--line);
  padding: 0.75rem 0.3rem; cursor: pointer; font-family: inherit; text-align: start;
  transition: background 0.15s ease;
}
.lesson-row:hover { background: var(--cream); }
.lesson-row:last-child { border-bottom: none; }
.lesson-num {
  width: 30px; height: 30px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--line); border-radius: 50%;
  font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; font-weight: 600;
  color: var(--ash);
}
.lesson-row.done .lesson-num { background: var(--green); border-color: var(--green); color: white; }
.lesson-info { flex: 1; }
.lesson-info strong { display: block; font-size: 0.92rem; color: var(--night); font-weight: 700; }
.lesson-info small { color: var(--ash); font-size: 0.75rem; }
.lesson-row.done .lesson-info strong { color: var(--ash); }
.lesson-go { color: var(--ash); opacity: 0; transition: opacity 0.15s ease; flex-shrink: 0; }
body.lang-ar .lesson-go { transform: scaleX(-1); }
.lesson-row:hover .lesson-go { opacity: 1; }

/* === قارئ المقالات (طابع صحفي مطبوع) === */
.lesson-progress-track { position: fixed; top: 0; inset-inline: 0; height: 3px; z-index: 300; background: transparent; }
.lesson-progress { height: 100%; width: 0; background: var(--teal-deep); transition: width 0.1s linear; }
.lesson-wrap { max-width: 760px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.lesson-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; }
.lesson-crumb { color: var(--ash); font-size: 0.82rem; font-weight: 600; }
.lesson-article { background: white; border: 1px solid var(--line); border-radius: 20px; padding: 2.6rem 2.8rem; box-shadow: var(--shadow-sm); }
@media (max-width: 640px) { .lesson-article { padding: 1.6rem 1.3rem; } }
.lesson-head { border-bottom: 2px solid var(--night); padding-bottom: 1.3rem; margin-bottom: 1.6rem; }
.stage-chip {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.1em;
  color: var(--teal-deep); border: 1px solid var(--teal-deep);
  border-radius: 100px; padding: 0.22rem 0.75rem; margin-bottom: 0.9rem;
}
.lesson-head h1 { font-size: clamp(1.5rem, 4vw, 2.1rem); line-height: 1.3; color: var(--night); }
.lesson-meta { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.8rem; color: var(--ash); font-size: 0.82rem; }
.dot-sep { width: 4px; height: 4px; border-radius: 50%; background: var(--line); display: inline-block; }
.read-flag { color: var(--green); font-weight: 700; }
.lesson-body { font-size: 1.05rem; line-height: 2.05; color: var(--ink); }
.lesson-body p { margin-bottom: 1.1rem; }
.lesson-body h5 {
  font-size: 1.05rem; font-weight: 800; color: var(--night);
  margin: 1.6rem 0 0.6rem;
  padding-inline-start: 0.8rem;
  border-inline-start: 3px solid var(--teal);
}
.lesson-body ul { margin: 0.4rem 0 1.1rem; padding-inline-start: 1.3rem; }
.lesson-body li { margin-bottom: 0.45rem; }
.lesson-body li::marker { color: var(--teal-deep); }
.lesson-body strong { color: var(--night); }
.lesson-body code {
  font-family: 'JetBrains Mono', monospace; font-size: 0.85em;
  background: var(--cream-deep); border-radius: 6px; padding: 0.1em 0.45em;
}
.lesson-end { display: flex; justify-content: center; gap: 0.7rem; margin-top: 2rem; color: var(--teal-deep); }
.lesson-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.4rem; }

/* === شريط أدوات الكورسات === */
.course-toolbar { display: flex; flex-direction: column; gap: 0.8rem; margin-bottom: 1.2rem; }
.course-toolbar input {
  width: 100%; max-width: 420px;
  padding: 0.75rem 1.1rem; border-radius: 12px;
  border: 1px solid var(--line); background: white;
  font-family: inherit; font-size: 0.92rem;
}
.cat-chips { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.continue-strip {
  display: flex; align-items: center; gap: 0.9rem;
  background: var(--teal-mist); border: 1px solid var(--teal-soft);
  border-radius: 14px; padding: 0.9rem 1.2rem; margin-bottom: 1.4rem;
  color: var(--teal-deep);
}
.continue-strip strong { display: block; color: var(--night); font-size: 0.92rem; }
.continue-strip small { color: var(--ash); font-size: 0.8rem; }

/* === اختبارات الاستيعاب (بعد كل مرحلة) === */
.lesson-row.quiz .lesson-num { border-style: dashed; color: var(--teal-deep); font-weight: 800; }
.lesson-row.quiz.done .lesson-num { border-style: solid; }
.quiz-intro {
  display: flex; align-items: center; gap: 0.6rem;
  background: var(--teal-mist); color: var(--teal-deep);
  border: 1px solid var(--teal-soft); border-radius: 12px;
  padding: 0.8rem 1rem; font-size: 0.88rem; font-weight: 600;
  margin-bottom: 1.4rem;
}
.quiz-q { padding: 1.2rem 0; border-bottom: 1px dashed var(--line); }
.quiz-q:last-child { border-bottom: none; }
.quiz-q-text { font-weight: 800; color: var(--night); font-size: 1.02rem; margin-bottom: 0.9rem; display: flex; gap: 0.6rem; }
.quiz-q-num {
  width: 26px; height: 26px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--night); color: var(--teal-soft);
  border-radius: 8px; font-size: 0.8rem;
  font-family: 'JetBrains Mono', monospace;
}
.quiz-opts { display: grid; gap: 0.5rem; }
.quiz-opt {
  text-align: start; font-family: inherit; font-size: 0.92rem;
  background: var(--cream); border: 1.5px solid var(--line);
  border-radius: 12px; padding: 0.75rem 1rem; cursor: pointer;
  color: var(--ink); transition: border-color 0.15s ease, background 0.15s ease;
}
.quiz-opt:hover:not(:disabled) { border-color: var(--teal); }
.quiz-opt.picked { border-color: var(--night); background: white; font-weight: 700; }
.quiz-opt.correct { border-color: var(--green); background: #E7F7F0; font-weight: 700; }
.quiz-opt.wrong { border-color: var(--red); background: #FDECEC; }
.quiz-opt:disabled { cursor: default; }
.quiz-why {
  margin-top: 0.7rem; font-size: 0.86rem; color: var(--ink);
  background: var(--cream); border-inline-start: 3px solid var(--teal);
  border-radius: 8px; padding: 0.7rem 0.9rem; line-height: 1.8;
}
.quiz-why .ok { color: var(--green); }
.quiz-why .no { color: var(--red); }
.quiz-result {
  display: flex; align-items: center; gap: 1rem;
  background: var(--night); color: var(--cream);
  border-radius: 16px; padding: 1.1rem 1.4rem; margin-top: 1.4rem;
}
.quiz-result h6 { font-size: 1rem; font-weight: 800; }

/* === شهادة الإتمام === */
.cert-doc { background: white; }
.cert-frame {
  border: 2px solid var(--night);
  outline: 1px solid var(--line);
  outline-offset: 6px;
  border-radius: 6px;
  padding: 2.6rem 2rem;
  text-align: center;
  max-width: 560px; margin: 0 auto;
}
.cert-brand { display: flex; align-items: center; justify-content: center; gap: 0.5rem; color: var(--night); font-weight: 800; margin-bottom: 1.4rem; }
.cert-title { font-family: 'Cairo', serif; font-size: 1.7rem; font-weight: 900; color: var(--night); letter-spacing: -0.01em; }
.cert-sub { color: var(--ash); font-size: 0.88rem; margin-top: 0.9rem; }
.cert-name {
  font-size: 1.5rem; font-weight: 800; color: var(--teal-deep);
  border-bottom: 1px dashed var(--line);
  display: inline-block; min-width: 260px;
  padding: 0.35rem 1rem; margin-top: 0.5rem;
  outline: none;
}
.cert-course { font-size: 1.08rem; font-weight: 800; color: var(--night); margin-top: 0.5rem; }
.cert-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--line);
  color: var(--ash); font-size: 0.8rem;
}
.cert-foot svg { color: var(--teal-deep); }

/* طباعة الشهادة فقط */
@media print {
  body.print-cert * { visibility: hidden; }
  body.print-cert .cert-doc, body.print-cert .cert-doc * { visibility: visible; }
  body.print-cert .cert-doc { position: absolute; inset-inline-start: 0; top: 0; width: 100%; padding: 2rem; }
  body.print-cert .cv-doc { display: none; }
}

/* ============================================================
   WordPress theme glue · أنماط تكميلية للثيم
   ============================================================ */
.wt-notice { padding: 0.9rem 1.2rem; border-radius: 12px; margin-bottom: 1.2rem; font-size: 0.9rem; font-weight: 600; }
.wt-notice.error { background: #FDECEC; color: #B4302F; border: 1px solid #F3C6C6; }
.wt-notice.success { background: #E7F7F0; color: #1B7A55; border: 1px solid #BFE8D6; }

.wt-prose { line-height: 1.9; color: var(--ink); }
.wt-prose h2, .wt-prose h3 { color: var(--night); margin: 1.4rem 0 0.6rem; font-weight: 800; }
.wt-prose p { margin-bottom: 1rem; }
.wt-prose ul, .wt-prose ol { margin: 0 0 1rem; padding-inline-start: 1.4rem; }
.wt-prose a { color: var(--teal-deep); }
.wt-prose img { max-width: 100%; height: auto; border-radius: 12px; }

.footer-inner { max-width: 1200px; margin: 0 auto; padding: 3rem 2rem 1rem; display: grid; grid-template-columns: 1.4fr 2fr; gap: 2rem; }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1.5rem; }
.footer-col .widget-title { font-size: 0.9rem; font-weight: 800; color: var(--night); margin-bottom: 0.8rem; }
.footer-col a { color: var(--ash); text-decoration: none; display: block; padding: 0.25rem 0; font-size: 0.9rem; }
.footer-col a:hover { color: var(--teal-deep); }
.footer-menu { list-style: none; }
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr; } }

.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }

.pagination .nav-links { display: flex; gap: 0.4rem; justify-content: center; flex-wrap: wrap; }
.page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 0.6rem; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; font-weight: 700; }
.page-numbers.current { background: var(--night); color: var(--cream); border-color: var(--night); }
.page-numbers:hover { border-color: var(--teal-deep); color: var(--teal-deep); }

/* شعار مخصص من ووردبريس */
.custom-logo { max-height: 48px; width: auto; }

/* الاختبار الثابت في ووردبريس (كشف الإجابة عبر details) */
.quiz-static-opts { margin: 0.4rem 0 0.8rem; padding-inline-start: 1.5rem; }
.quiz-static-opts li { margin-bottom: 0.4rem; }
.quiz-reveal summary { cursor: pointer; color: var(--teal-deep); font-weight: 700; font-size: 0.86rem; }
.quiz-reveal[open] summary { margin-bottom: 0.5rem; }
/* ============ شعار Wuzzuf Top ============ */
.wt-logo-img { height: 46px; width: auto; display: block; }
.wt-logo-footer { height: 38px; }
@media (max-width: 640px) { .wt-logo-img { height: 36px; } }
/* علامة الشعار أسفل السيرة الذاتية (تظهر في الطباعة/PDF) */
.cv-brandmark { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); display: flex; justify-content: flex-start; }
.cv-brandmark img { height: 24px; width: auto; opacity: 0.9; }
.cert-brand img { height: 34px; width: auto; }
/* ============ v1.1: طباعة الشهادة بمقاسها الدقيق + ضبط الشعار ============ */
/* الهيدر: توازن احترافي مع ارتفاع الناف */
.wt-logo-img { height: 40px; }
.wt-logo-footer { height: 32px; }
@media (max-width: 640px) { .wt-logo-img { height: 30px; } }

/* طباعة/PDF الشهادة: صفحة A5 عرضية 210×148مم — الشهادة تملأها بالضبط */
@media print {
  body.print-cert .cert-doc {
    position: fixed; inset: 0;
    width: 210mm; height: 148mm;
    padding: 0; margin: 0;
    display: flex; align-items: center; justify-content: center;
    background: white;
  }
  body.print-cert .cert-frame {
    width: 186mm; max-width: none;
    margin: 0; padding: 10mm 12mm;
    box-sizing: border-box;
  }
  body.print-cert .cert-frame .cert-name { border-bottom-style: solid; }
}
/* ============ v1.2: طباعة معزولة (شهادة صفحة واحدة + CV نظيف) ============ */
@media print {
  body.print-cert > :not(.details-modal-backdrop) { display: none !important; }
  body.print-cert * { visibility: visible !important; }
  body.print-cert .details-modal-backdrop { position: static !important; display: block !important; background: none !important; padding: 0 !important; }
  body.print-cert .details-modal { position: static !important; margin: 0 !important; max-width: none !important; width: auto !important; box-shadow: none !important; border-radius: 0 !important; max-height: none !important; overflow: visible !important; }
  body.print-cert .details-body { padding: 0 !important; }
  body.print-cert .details-body > :not(.cert-doc) { display: none !important; }
  body.print-cert .details-close { display: none !important; }
  body.print-cert .cert-doc { position: static !important; width: 210mm; height: 148mm; display: flex !important; align-items: center; justify-content: center; margin: 0 !important; padding: 0 !important; overflow: hidden; }
  body.print-cert .cert-frame { width: 184mm; margin: 0; box-sizing: border-box; }

  body.print-cv > :not(#wtPrintRegion) { display: none !important; }
  body.print-cv * { visibility: visible !important; }
  body.print-cv #wtPrintRegion { display: block; }
  body.print-cv #wtPrintRegion .cv-doc { position: static !important; box-shadow: none !important; border: none !important; border-radius: 0 !important; width: 100% !important; max-width: 186mm; margin: 0 auto !important; padding: 0 !important; }
}

/* خانة التحقق من الشهادة */
.cert-verify { background: white; border: 1px solid var(--night); border-radius: 18px; padding: 1.2rem 1.4rem; margin-bottom: 1.6rem; box-shadow: 4px 4px 0 var(--teal-soft); }
.cert-verify-head { display: flex; align-items: center; gap: 0.7rem; color: var(--teal-deep); margin-bottom: 0.9rem; }
.cert-verify-head strong { display: block; color: var(--night); font-size: 1rem; }
.cert-verify-head small { color: var(--ash); font-size: 0.8rem; }
.cert-verify-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.cert-verify-row input { flex: 1; min-width: 200px; padding: 0.7rem 1rem; border: 1px solid var(--line); border-radius: 12px; font-family: 'JetBrains Mono', monospace; font-size: 0.9rem; letter-spacing: 0.05em; }
.cert-verify #wtVerifyResult { margin-top: 0.8rem; }
.cert-verify #wtVerifyResult .wt-notice { margin-bottom: 0; line-height: 1.9; }