/* ==========================================================
   Qaddemly Official Stylesheet - PHP Production
   Arabic RTL First, Brand Palette, Clean Modern UI
   ========================================================== */

@font-face {
  font-family: 'TheYearofHandicrafts';
  src: url('/assets/fonts/TheYearofHandicrafts-Regular.otf?v=20260922-ux3') format('opentype');
  font-style: normal;
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: 'TheYearofHandicrafts';
  src: url('/assets/fonts/TheYearofHandicrafts-Medium.otf?v=20260922-ux3') format('opentype');
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: 'TheYearofHandicrafts';
  src: url('/assets/fonts/TheYearofHandicrafts-Bold.otf?v=20260922-ux3') format('opentype');
  font-style: normal;
  font-weight: 900;
  font-display: swap;
}

:root {
  --font-arabic: 'TheYearofHandicrafts', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --bg-main: #F6F9F8;
  --bg-card: #FFFFFF;
  --text-primary: #12211E;
  --text-secondary: #4F615D;
  --text-muted: #667874;
  --border-color: #DDE6E3;
  --border-subtle: #EEF3F1;
  
  --brand-50: #EDF5F3;
  --brand-100: #D3E6E1;
  --brand-500: #0A7366;
  --brand-600: #04574F;
  --brand-700: #023632;
  --brand-gradient: linear-gradient(135deg, #023632 0%, #04574F 55%, #0A7366 100%);
  --gold-500: #AC8B57;
  --gold-600: #86693A;
  --gold-100: #F4ECDD;
  
  --emerald-50: #ECFDF5;
  --emerald-100: #D1FAE5;
  --emerald-500: #10B981;
  --emerald-600: #059669;
  --emerald-700: #047857;

  --red-50: #FEF2F2;
  --red-100: #FEE2E2;
  --red-500: #EF4444;
  --red-600: #DC2626;
  --red-700: #B91C1C;

  --amber-50: #FFFBEB;
  --amber-500: #F59E0B;
}

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

html {
  font-size: 16px;
  direction: rtl;
  text-align: right;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-arabic);
  font-weight: 300;
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* Authentication and pre-login resume intake */
.auth-page {
  background:
    radial-gradient(circle at 15% 10%, rgba(172, 139, 87, 0.12), transparent 28rem),
    radial-gradient(circle at 85% 88%, rgba(4, 87, 79, 0.10), transparent 30rem),
    var(--bg-main);
}

.auth-site-header {
  padding-block: .75rem;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(16px);
}

.auth-shell {
  min-height: calc(100vh - 74px);
  display: grid;
  place-items: center;
  padding: clamp(1.25rem, 4vw, 3.5rem) 1rem;
}

.auth-experience {
  width: min(100%, 980px);
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  grid-template-areas: 'aside form';
  direction: ltr;
  border: 1px solid rgba(203, 213, 225, .9);
  border-radius: 1.75rem;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 32px 90px rgba(18, 33, 30, .14);
}

.auth-card {
  width: min(100%, 470px);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1.5rem;
  padding: clamp(1.35rem, 4vw, 2.25rem);
  box-shadow: 0 24px 70px rgba(18, 33, 30, 0.10);
}

.auth-login-card {
  grid-area: form;
  direction: rtl;
  width: 100%;
  max-width: none;
  border: 0;
  border-radius: 0;
  padding: clamp(1.6rem, 4vw, 3rem);
  box-shadow: none;
}

.auth-side-panel {
  grid-area: aside;
  direction: rtl;
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 560px;
  padding: clamp(2rem, 4vw, 3.25rem);
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 15% 15%, rgba(172, 139, 87, .36), transparent 17rem),
    linear-gradient(145deg, #01211E 0%, #023632 46%, #0A7366 100%);
}

.auth-side-panel::before,
.auth-side-panel::after {
  content: '';
  position: absolute;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 50%;
}

.auth-side-panel::before { width: 22rem; height: 22rem; inset: auto -10rem -8rem auto; }
.auth-side-panel::after { width: 14rem; height: 14rem; inset: 2rem auto auto -8rem; }

.auth-side-content { align-self: center; position: relative; z-index: 1; }
.auth-side-kicker { display: block; color: #E6D3AE; font-size: .85rem; font-weight: 600; margin-bottom: 1rem; }
.auth-side-panel h2 { font-size: clamp(2rem, 4vw, 3.25rem); font-weight: 900; line-height: 1.22; letter-spacing: -.03em; }
.auth-side-panel h2 span { color: #D9BE8C; }
.auth-side-panel p { color: rgba(255,255,255,.78); font-size: 1rem; line-height: 1.85; margin-top: 1.25rem; }
.auth-benefits { list-style: none; display: grid; gap: .85rem; margin-top: 2rem; padding: 0; }
.auth-benefits li { display: flex; align-items: center; gap: .7rem; color: rgba(255,255,255,.92); font-size: .92rem; }
.auth-benefits li span { width: 1.55rem; height: 1.55rem; border-radius: 50%; display: grid; place-items: center; flex: none; background: rgba(255,255,255,.14); color: #E8D7B0; font-weight: 900; }
.auth-side-mark { position: absolute; inset: auto auto 1.5rem 1.8rem; font-size: 6rem; font-weight: 900; line-height: 1; color: rgba(255,255,255,.08); }

.auth-card-modern { position: relative; overflow: hidden; }
.auth-card-modern::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--brand-gradient);
}
.auth-brand { width: fit-content; margin: 0 auto 1.75rem; }
.auth-action-card { text-align: center; }
.auth-action-card [hidden] { display: none; }
.auth-action-mark { width: 4rem; height: 4rem; margin: 0 auto 1.35rem; border-radius: 50%; display: grid; place-items: center; background: #e7f8ef; color: #087647; font-size: 2rem; font-weight: 900; }
.auth-action-mark-error { background: #fff0ef; color: #bb2929; }
.auth-header { text-align: center; margin-bottom: 1.6rem; }
.auth-header h1 { font-size: clamp(1.75rem, 5vw, 2.35rem); font-weight: 900; margin: .25rem 0 .45rem; }
.auth-header p { color: var(--text-secondary); font-size: 1rem; line-height: 1.75; }
.auth-kicker { color: var(--brand-600); font-size: .82rem; font-weight: 600; }
.auth-alert, .auth-static-alert { margin-bottom: 1rem; }

.google-button {
  width: 100%; min-height: 3.5rem; border: 1px solid #C6D3CF; border-radius: .9rem;
  background: #fff; color: var(--text-primary); display: flex; align-items: center;
  justify-content: center; gap: .75rem; padding: .75rem 1rem; font: inherit;
  font-weight: 600; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s;
}
.google-button:hover:not(:disabled) { border-color: var(--brand-500); box-shadow: 0 8px 24px rgba(4, 87, 79,.12); transform: translateY(-1px); }
.google-button svg { width: 1.35rem; height: 1.35rem; flex: none; }
.google-button:disabled, .btn:disabled { opacity: .55; cursor: not-allowed; }
.auth-progress { color: var(--brand-700); text-align: center; font-size: .82rem; margin-top: .6rem; }
.auth-divider { display: flex; align-items: center; gap: .85rem; color: var(--text-muted); font-size: .8rem; margin: 1.25rem 0; }
.auth-divider::before, .auth-divider::after { content: ''; height: 1px; background: var(--border-color); flex: 1; }
.forgot-link { display: inline-block; margin: -.25rem 0 1rem; color: var(--brand-600); font-size: .82rem; font-weight: 700; text-decoration: none; }
.auth-footer-copy { margin-top: 1.35rem; text-align: center; color: var(--text-secondary); font-size: .85rem; }
.text-button { border: 0; background: transparent; color: var(--brand-600); font: inherit; font-weight: 800; cursor: pointer; text-decoration: none; }
.text-button:hover { text-decoration: underline; }
.registration-done { text-align: center; padding: 1rem .5rem .25rem; }
.registration-done h2 { font-size: 1.45rem; margin-bottom: .5rem; }
.registration-done p { color: var(--text-secondary); margin-bottom: 1.4rem; }
.skip-link { display: block; text-align: center; color: var(--text-secondary); text-decoration: none; font-size: .82rem; margin-top: 1rem; }
.password-hint { font-size: .75rem; color: var(--text-muted); margin: -.35rem 0 1rem; }

.hero-upload-card {
  width: min(100%, 720px);
  margin: 2rem auto 0;
  text-align: center;
}

.hero-upload-card input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-dropzone {
  position: relative;
  min-height: 205px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  padding: 1.5rem;
  overflow: hidden;
  cursor: pointer;
  border: 2px dashed #B7D3CC;
  border-radius: 1.5rem;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(237, 245, 243,.72));
  box-shadow: 0 20px 55px rgba(18, 33, 30,.09);
  outline: none;
  transition: border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.hero-dropzone:hover,
.hero-dropzone:focus-visible,
.hero-dropzone.is-dragover {
  border-color: var(--brand-500);
  background: linear-gradient(180deg, #fff, #E6F1EE);
  box-shadow: 0 24px 65px rgba(4, 87, 79,.16);
  transform: translateY(-2px);
}

.hero-dropzone.is-dragover { transform: scale(1.012); }
.hero-dropzone.is-uploading { pointer-events: none; border-style: solid; border-color: var(--brand-500); }
.hero-dropzone.is-success { border-style: solid; border-color: var(--emerald-500); background: var(--emerald-50); }

.hero-upload-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 1.2rem;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--brand-gradient);
  box-shadow: 0 12px 28px rgba(4, 87, 79,.24);
}

.hero-upload-icon svg { width: 2rem; height: 2rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hero-upload-copy { display: grid; justify-items: center; gap: .15rem; }
.hero-upload-copy strong { font-size: 1.18rem; font-weight: 900; color: var(--text-primary); }
.hero-upload-copy > span { color: var(--brand-600); font-size: .95rem; font-weight: 600; }
.hero-upload-copy small { color: var(--text-secondary); font-size: .82rem; margin-top: .2rem; }
.hero-file-name { max-width: 90%; padding: .45rem .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: 999px; background: #fff; color: var(--brand-700); font-size: .82rem; font-weight: 600; box-shadow: 0 6px 20px rgba(18, 33, 30,.08); }
.hero-upload-progress { position: absolute; inset: auto 0 0; height: 4px; overflow: hidden; background: rgba(4, 87, 79,.12); opacity: 0; }
.hero-upload-progress span { display: block; width: 42%; height: 100%; background: var(--brand-gradient); transform: translateX(240%); }
.hero-dropzone.is-uploading .hero-upload-progress { opacity: 1; }
.hero-dropzone.is-uploading .hero-upload-progress span { animation: upload-sweep 1.05s ease-in-out infinite; }
.hero-dropzone.is-uploading .hero-upload-copy { opacity: .5; }
.hero-upload-card .alert { margin: .85rem 0 0; text-align: center; }

@keyframes upload-sweep { from { transform: translateX(240%); } to { transform: translateX(-340%); } }

@media (max-width: 640px) {
  .auth-shell { padding: 1.25rem .75rem; align-items: start; }
  .hero-dropzone { min-height: 190px; padding: 1.25rem 1rem; }
  .hero-upload-copy strong { font-size: 1.05rem; }
}

@media (max-width: 820px) {
  .auth-experience { display: block; width: min(100%, 520px); border-radius: 1.5rem; }
  .auth-side-panel { display: none; }
  .auth-login-card { border-radius: 1.5rem; }
}

/* Bidirectional Isolation */
[dir="ltr"] {
  direction: ltr !important;
  text-align: left !important;
  unicode-bidi: isolate;
}

.bidi-isolate {
  unicode-bidi: isolate;
  display: inline-block;
}

/* Layout Containers */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* Header & Navigation */
.site-header {
  background: #FFFFFF;
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-logo-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.logo-badge {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background: var(--brand-gradient);
  color: #FFFFFF;
  font-weight: 800;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(4, 87, 79, 0.25);
}

.brand-text-name {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  display: block;
  line-height: 1.2;
}

.brand-text-sub {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  display: block;
}

.nav-links {
  display: none;
  gap: 2rem;
  list-style: none;
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  transition: color 0.15s ease;
}

.nav-link:hover {
  color: var(--brand-500);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Notification Ribbon */
.notification-ribbon {
  background: var(--brand-50);
  color: var(--brand-700);
  border-bottom: 1px solid var(--brand-100);
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.pulse-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--emerald-500);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-weight: 700;
  border-radius: 0.75rem;
  padding: 0.65rem 1.25rem;
  font-size: 0.875rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--brand-600);
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(4, 87, 79, 0.25);
}

.btn-primary:hover {
  background-color: var(--brand-700);
  box-shadow: 0 4px 12px rgba(4, 87, 79, 0.35);
}

.btn-secondary {
  background-color: #FFFFFF;
  border-color: var(--border-color);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background-color: #F7FAF9;
  border-color: #C6D3CF;
}

.btn-danger {
  background-color: var(--red-50);
  color: var(--red-700);
  border-color: var(--red-200);
}

.btn-danger:hover {
  background-color: var(--red-100);
}

.btn-danger-active {
  background-color: var(--red-600);
  color: #FFFFFF;
  border-color: var(--red-700);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.btn-danger-active:hover {
  background-color: var(--red-700);
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  border-radius: 0.5rem;
}

.btn-lg {
  padding: 0.85rem 1.75rem;
  font-size: 1rem;
  border-radius: 0.875rem;
}

.btn-block {
  width: 100%;
}

/* Cards & Grid */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 1.25rem;
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
}

/* Badges & Tags */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.badge-blue {
  background: var(--brand-50);
  color: var(--brand-700);
  border: 1px solid var(--brand-100);
}

.badge-green {
  background: var(--emerald-50);
  color: var(--emerald-700);
  border: 1px solid var(--emerald-100);
}

.badge-red {
  background: var(--red-50);
  color: var(--red-700);
  border: 1px solid var(--red-100);
}

.badge-amber {
  background: var(--amber-50);
  color: #92400E;
  border: 1px solid #FDE68A;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.tag {
  background: #EEF3F1;
  color: #475569;
  padding: 0.25rem 0.65rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Form Controls */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 0.9rem;
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  background: #FFFFFF;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(4, 87, 79, 0.15);
}

.form-textarea {
  min-height: 8rem;
  resize: vertical;
  line-height: 1.75;
}

.form-textarea.compact {
  min-height: 6rem;
}

.form-help {
  display: block;
  color: var(--text-secondary);
  font-size: 0.75rem;
  margin-top: 0.4rem;
}

/* Authenticated workspace */
.sticky-header {
  position: sticky;
  top: 0;
  z-index: 40;
}

.workspace-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-inline: auto;
}

.workspace-nav a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  padding: 0.55rem 0.8rem;
  border-radius: 0.65rem;
}

.workspace-nav a:hover,
.workspace-nav a.active {
  color: var(--brand-700);
  background: var(--brand-50);
}

.workspace-main {
  padding-top: 2rem;
  padding-bottom: 4rem;
}

.workspace-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20rem;
  gap: 2rem;
  align-items: end;
  margin-bottom: 2rem;
}

.workspace-intro h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.3;
  margin: 0.4rem 0 0.65rem;
}

.workspace-intro p {
  max-width: 42rem;
  color: var(--text-secondary);
}

.eyebrow,
.step-kicker {
  display: block;
  color: var(--brand-600);
  font-size: 0.78rem;
  font-weight: 800;
}

.completion-card {
  background: linear-gradient(145deg, #023632, #04574F);
  border-radius: 1.1rem;
  padding: 1.25rem;
  color: #fff;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 0.9rem;
  align-items: center;
  box-shadow: 0 12px 30px rgba(4, 87, 79, 0.2);
}

.completion-number {
  font-size: 2rem;
  font-weight: 800;
  grid-row: span 2;
}

.completion-card strong,
.completion-card span {
  display: block;
}

.completion-card span {
  font-size: 0.78rem;
  opacity: 0.8;
}

.progress-track {
  height: 0.35rem;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  grid-column: 1 / -1;
  overflow: hidden;
  margin-top: 0.7rem;
}

.progress-track span {
  height: 100%;
  background: #fff;
  border-radius: inherit;
}

.workspace-layout {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.section-nav {
  position: sticky;
  top: 6.5rem;
  display: grid;
  gap: 0.45rem;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 0.65rem;
}

.section-nav-item {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: right;
  color: var(--text-secondary);
  background: transparent;
  border: 0;
  border-radius: 0.7rem;
  padding: 0.75rem;
  cursor: pointer;
}

.section-nav-item:hover,
.section-nav-item.active {
  background: var(--brand-50);
  color: var(--brand-700);
}

.account-section {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 1.1rem;
  padding: clamp(1.25rem, 3vw, 2rem);
}

.account-section[hidden] {
  display: none;
}

.section-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.section-heading-row h2 {
  font-size: 1.4rem;
  margin: 0.15rem 0;
}

.section-heading-row p {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

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

.form-span-2 {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding-top: 0.5rem;
}

.choice-fieldset {
  border: 0;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 0.65rem;
}

.choice-grid.three {
  grid-template-columns: repeat(3, 1fr);
}

.choice-card {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 0.75rem;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 650;
  cursor: pointer;
}

.choice-card:has(input:checked) {
  border-color: var(--brand-500);
  background: var(--brand-50);
  color: var(--brand-700);
}

.choice-card input {
  accent-color: var(--brand-500);
}

.upload-zone {
  border: 1.5px dashed #C3D8D2;
  background: #F6FAF8;
  border-radius: 1rem;
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.25rem;
}

.upload-zone input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.upload-zone label {
  cursor: pointer;
}

.upload-zone label strong,
.upload-zone label span {
  display: block;
}

.upload-zone label span {
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin-top: 0.2rem;
}

.document-list {
  display: grid;
  gap: 0.75rem;
}

.document-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 1rem;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: 0.85rem;
  padding: 1rem;
}

.document-row strong,
.document-row span {
  display: block;
}

.document-row > div > span {
  color: var(--text-secondary);
  font-size: 0.75rem;
  margin-top: 0.2rem;
}

.row-actions {
  display: flex;
  gap: 0.45rem;
}

.empty-state {
  text-align: center;
  padding: 2rem;
  border: 1px solid var(--border-color);
  border-radius: 0.85rem;
  color: var(--text-secondary);
}

.empty-state strong,
.empty-state span {
  display: block;
}

.empty-state strong {
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.consent-card {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  border: 1px solid var(--border-color);
  border-radius: 0.9rem;
  padding: 1.1rem;
  cursor: pointer;
  margin-bottom: 1.25rem;
}

.consent-card:has(input:checked) {
  border-color: var(--brand-500);
  background: var(--brand-50);
}

.consent-card input {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.2rem;
  accent-color: var(--brand-500);
}

.consent-card strong,
.consent-card small {
  display: block;
}

.consent-card small {
  color: var(--text-secondary);
  margin-top: 0.25rem;
  line-height: 1.6;
}

.limit-field {
  max-width: 20rem;
}

.safety-note {
  background: var(--amber-50);
  border: 1px solid #FDE68A;
  color: #78350F;
  border-radius: 0.8rem;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
}

.safety-note strong,
.safety-note span {
  display: block;
}

.review-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.review-heading h1 {
  font-size: clamp(1.65rem, 4vw, 2.35rem);
  margin: 0.25rem 0;
}

.review-heading p {
  color: var(--text-secondary);
}

.review-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 21rem;
  gap: 1.25rem;
  align-items: start;
}

.review-sidebar {
  display: grid;
  gap: 1rem;
}

.review-message {
  min-height: 22rem;
}

.detail-list {
  display: grid;
  gap: 0.8rem;
  margin: 1rem 0;
}

.detail-list > div {
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--border-subtle);
}

.detail-list dt {
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.detail-list dd {
  font-weight: 700;
  font-size: 0.85rem;
  margin-top: 0.15rem;
}

.fact-list {
  list-style: none;
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}

.fact-list li {
  background: var(--bg-main);
  border-radius: 0.7rem;
  padding: 0.75rem;
}

.fact-list strong,
.fact-list span {
  display: block;
}

.narrow-workspace {
  max-width: 920px;
}

.activity-list {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  overflow: hidden;
}

.activity-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: center;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border-subtle);
}

.activity-row:last-child {
  border-bottom: 0;
}

.activity-row strong,
.activity-row span {
  display: block;
}

.activity-row span {
  color: var(--text-secondary);
  font-size: 0.75rem;
  margin-top: 0.15rem;
}

.activity-row code {
  direction: ltr;
  color: var(--text-muted);
  font-size: 0.7rem;
}

.activity-dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--brand-500);
  box-shadow: 0 0 0 4px var(--brand-50);
}

.dashboard-quick-actions,
.jobs-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 0.9rem;
  padding: 1rem 1.15rem;
  margin-bottom: 1.5rem;
}

.dashboard-quick-actions strong,
.dashboard-quick-actions span,
.jobs-toolbar strong,
.jobs-toolbar span {
  display: block;
}

.dashboard-quick-actions span,
.jobs-toolbar span {
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin-top: 0.15rem;
}

.manual-job-panel {
  margin-bottom: 1.5rem;
}

.manual-job-panel[hidden] {
  display: none;
}

.jobs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 27rem), 1fr));
  gap: 1rem;
}

.jobs-grid .job-card {
  margin: 0;
  display: flex;
  flex-direction: column;
}

.jobs-grid .job-card h2 {
  font-size: 1.05rem;
  margin-bottom: 0.3rem;
}

.job-meta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.score-badge {
  white-space: nowrap;
  color: var(--brand-700);
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-radius: 999px;
  padding: 0.3rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 800;
}

.match-reason {
  color: var(--brand-700);
  background: var(--brand-50);
  border-radius: 0.7rem;
  padding: 0.7rem;
  font-size: 0.78rem;
  margin: 0.5rem 0 0.75rem;
}

.job-description {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.7;
  flex: 1;
}

.job-evidence {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.9rem;
  padding: 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: 0.7rem;
  background: var(--bg-main);
}

.job-evidence div {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 0.65rem;
}

.job-evidence dt {
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
}

.job-evidence dd {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.78rem;
}

.job-card-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 1rem;
}

.pdf-review-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid var(--brand-100);
  border-radius: 0.8rem;
  background: var(--brand-50);
}

.pdf-review-box strong,
.pdf-review-box span {
  display: block;
}

.pdf-review-box span {
  margin-top: 0.2rem;
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.fact-list strong {
  color: var(--brand-700);
  font-size: 0.72rem;
}

.fact-list span {
  font-size: 0.82rem;
  margin-top: 0.15rem;
}

.onboarding-banner,
.ready-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  background: #fff;
  border: 1px solid var(--brand-100);
  border-radius: 1rem;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.onboarding-banner {
  background: linear-gradient(135deg, #FFFFFF 0%, #F3F8F6 100%);
}

.onboarding-copy h2 {
  font-size: 1.2rem;
  margin: 0.25rem 0;
}

.onboarding-copy p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  max-width: 40rem;
}

.onboarding-progress {
  min-width: 13rem;
  display: grid;
  gap: 0.6rem;
}

.onboarding-progress > strong {
  color: var(--brand-700);
  font-size: 1.35rem;
}

.onboarding-progress .progress-track {
  background: var(--brand-100);
  margin: 0;
}

.onboarding-progress .progress-track span {
  background: var(--brand-500);
}

.ready-banner {
  border-color: var(--emerald-100);
  background: var(--emerald-50);
}

.ready-banner strong {
  display: block;
  margin-top: 0.2rem;
}

.safety-note span {
  font-size: 0.8rem;
  margin-top: 0.2rem;
}

@media (max-width: 850px) {
  .workspace-intro,
  .workspace-layout,
  .review-layout {
    grid-template-columns: 1fr;
  }

  .section-nav {
    position: static;
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .workspace-nav {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .header-inner {
    flex-wrap: wrap;
  }

  .form-grid,
  .choice-grid.three,
  .document-row,
  .upload-zone {
    grid-template-columns: 1fr;
  }

  .form-span-2 {
    grid-column: auto;
  }

  .section-nav {
    grid-template-columns: 1fr;
  }

  .form-actions,
  .row-actions {
    flex-direction: column;
  }

  .form-actions .btn,
  .row-actions .btn {
    width: 100%;
  }

  .onboarding-banner,
  .ready-banner {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-quick-actions,
  .jobs-toolbar,
  .pdf-review-box {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Alerts */
.alert {
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.825rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.alert-success {
  background: var(--emerald-50);
  border: 1px solid var(--emerald-100);
  color: var(--emerald-700);
}

.alert-error {
  background: var(--red-50);
  border: 1px solid var(--red-100);
  color: var(--red-700);
}

.alert-info {
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  color: var(--brand-700);
}

/* Tabs */
.tabs-header {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}

.tab-btn {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-secondary);
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  color: var(--brand-500);
  border-bottom-color: var(--brand-500);
}

/* Hero Section */
.hero-section {
  text-align: center;
  padding: 4.5rem 1rem 3rem;
  max-width: 860px;
  margin-inline: auto;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  color: var(--brand-700);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.4rem 0.9rem;
  border-radius: 9999px;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 3.5rem;
  }
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 680px;
  margin-inline: auto;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

@media (min-width: 640px) {
  .hero-actions {
    flex-direction: row;
  }
}

/* Trust Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 3.5rem;
  text-align: right;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-color);
  background: #FFFFFF;
  padding: 2rem 0;
  margin-top: 4rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Simple public landing */
.landing-page { display: flex; flex-direction: column; }
.landing-page > main { flex: 1; width: 100%; display: grid; place-items: center; }
.landing-page .hero-section { width: 100%; padding: clamp(3rem, 8vh, 5.5rem) 1rem 3rem; }
.landing-page .hero-title { margin-bottom: .85rem; }
.landing-page .hero-title span { color: var(--brand-500); }
.landing-page .hero-subtitle { margin-bottom: 0; }
.landing-page .hero-upload-card { margin-top: 2.25rem; }
.hero-encouragement { margin-top: 2.1rem; color: var(--text-secondary); font-size: 1.05rem; }
.landing-page .site-footer { margin-top: 0; padding: 1.1rem 0; }
.footer-social { display: flex; align-items: center; gap: .65rem; }
.footer-social > span:first-child { margin-inline-end: .25rem; }
.social-icon { width: 2.15rem; height: 2.15rem; border-radius: .65rem; display: grid; place-items: center; background: #EEF3F1; color: #33423F; }
.social-icon img { width: 1.15rem; height: 1.15rem; object-fit: contain; }
.social-x { font-family: Arial, sans-serif; font-size: 1.2rem; font-weight: 700; }

@media (max-width: 640px) {
  .landing-page .site-header { padding: .75rem 0; }
  .landing-page .hero-section { padding-block: 3.5rem 2.5rem; }
  .landing-page .hero-title { font-size: clamp(2.2rem, 9vw, 2.75rem); }
  .hero-encouragement { font-size: .95rem; }
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
  }
}

/* Second entry path on the landing page: sign up without a resume */
.hero-alt-path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
  color: var(--text-secondary);
}
@media (max-width: 480px) {
  .landing-page .header-actions { gap: 0.5rem; }
  .landing-page .header-actions .btn { padding: 0.5rem 0.8rem; font-size: 0.85rem; }
  .hero-alt-path .btn { width: 100%; }
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.onboarding-steps { list-style: none; margin: 0.75rem 0 0; padding: 0; display: grid; gap: 0.4rem; }
.onboarding-steps li { display: flex; align-items: baseline; gap: 0.5rem; color: var(--text-secondary); }
.onboarding-steps li.is-done { color: var(--emerald-600); text-decoration: line-through; text-decoration-color: rgba(5, 150, 105, 0.35); }
.onboarding-steps li.is-next { color: var(--text-primary); font-weight: 700; }

/* Structured profile editors */
.repeatable { display: grid; gap: 0.6rem; margin-top: 0.5rem; }
.repeatable-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; }
.repeatable-list { display: grid; gap: 0.75rem; }
.repeatable-list:empty::before { content: "ما فيه عناصر للحين."; color: var(--text-secondary); font-size: 0.9rem; }
.item-card { border: 1px solid var(--border-subtle, #E1EAE7); border-radius: 12px; padding: 0.9rem; background: #FFFFFF; display: grid; gap: 0.6rem; }
.item-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem 0.8rem; }
.item-fields .item-wide { grid-column: 1 / -1; }
.item-actions { display: flex; gap: 0.4rem; justify-content: flex-end; }
.review-note { display: grid; gap: 0.2rem; font-size: 0.85rem; padding: 0.55rem 0.7rem; border-radius: 8px; background: #F6F9F8; color: var(--text-secondary); }
.review-note.needs-review { background: #FFF7E6; border: 1px solid #F5C66B; color: #7A4B00; }
.review-note span { word-break: break-word; }
.extras-editor { border: 1px dashed var(--border-subtle, #E1EAE7); border-radius: 12px; padding: 0.75rem 0.9rem; }
.extras-editor summary { cursor: pointer; font-weight: 700; }
.ai-panel { display: grid; gap: 0.5rem; margin-top: 0.75rem; padding: 0.85rem; border-radius: 12px; background: #EBF4F1; border: 1px solid #CBE0DA; }
.ai-panel p { margin: 0; }
.consent-check { display: flex; gap: 0.5rem; align-items: flex-start; font-weight: 600; }
.ai-warnings { margin: 0; padding-inline-start: 1.1rem; color: #7A4B00; font-size: 0.9rem; }
@media (max-width: 640px) {
  .item-fields { grid-template-columns: 1fr; }
}

/* Resume status panel (upload -> reading -> ready) */
.resume-panel { display: grid; gap: 0.6rem; margin-bottom: 1.25rem; padding: 1rem; border-radius: 14px; background: var(--bg-card); border: 1px solid var(--border-color); box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04); }
.resume-panel-empty { background: #F6FAF8; }
.resume-panel-empty span { color: var(--text-secondary); font-size: 0.92rem; }
.resume-panel-head { display: flex; gap: 0.75rem; align-items: flex-start; }
.resume-panel-head strong, .resume-panel-head span { display: block; }
.resume-panel-head span { color: var(--text-secondary); font-size: 0.92rem; margin-top: 0.15rem; }
.resume-spinner { flex: 0 0 auto; width: 1.25rem; height: 1.25rem; margin-top: 0.15rem; border-radius: 50%; border: 3px solid var(--brand-100); border-top-color: var(--brand-500); animation: qd-spin 0.9s linear infinite; }
@keyframes qd-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .resume-spinner { animation-duration: 3s; } }
.resume-changes { padding: 0.75rem 0.9rem; border-radius: 10px; background: #EFF6F4; border: 1px solid #D3E6E1; font-size: 0.92rem; }
.resume-changes ul { margin: 0.35rem 0 0; padding-inline-start: 1.1rem; }
.resume-source { white-space: pre-wrap; word-break: break-word; max-height: 320px; overflow: auto; font-size: 0.85rem; background: var(--bg-main); padding: 0.75rem; border-radius: 8px; }
.hero-ai-consent { margin-top: 0.75rem; font-weight: 500; font-size: 0.92rem; text-align: start; }
.hero-ai-consent details { font-weight: 400; color: var(--text-secondary); font-size: 0.85rem; margin-top: 0.25rem; }
.hero-ai-consent summary { cursor: pointer; color: var(--brand-500); }

/* Search goals: chip fields, suggestions, optional filters */
.goals-form { display: grid; gap: 1.25rem; }
.goal-block { display: grid; gap: 0.5rem; }
.goal-block .form-label small, .optional-prefs summary small { color: var(--text-secondary); font-weight: 400; }
.chip-field { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; min-height: 3rem; padding: 0.4rem 0.5rem; border: 1px solid var(--border-color); border-radius: 12px; background: var(--bg-card); cursor: text; }
.chip-field:focus-within { border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-100); }
.chip-list { display: contents; }
.chip { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.3rem 0.65rem; border-radius: 999px; background: var(--brand-50); color: var(--brand-700); font-size: 0.9rem; font-weight: 600; }
.chip-remove { border: 0; background: transparent; color: inherit; font-size: 1.1rem; line-height: 1; padding: 0 0.15rem; cursor: pointer; border-radius: 50%; }
.chip-remove:hover, .chip-remove:focus-visible { background: var(--brand-100); }
.chip-input { flex: 1 1 10rem; min-width: 8rem; border: 0; outline: 0; background: transparent; font: inherit; padding: 0.35rem 0.25rem; color: var(--text-primary); }
.quick-picks { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip-suggest { border: 1px dashed var(--border-color); background: var(--bg-card); color: var(--text-secondary); border-radius: 999px; padding: 0.3rem 0.7rem; font: inherit; font-size: 0.85rem; cursor: pointer; }
.chip-suggest:hover, .chip-suggest:focus-visible { border-color: var(--brand-500); color: var(--brand-600); }
.title-suggestions { padding: 0.85rem; border-radius: 12px; background: #F6FAF8; border: 1px solid var(--border-subtle); display: grid; gap: 0.5rem; }
.title-suggestions-head { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.title-suggestions .form-help { margin: 0; }
.suggestion-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0.5rem; }
.suggestion-card { display: grid; gap: 0.2rem; text-align: start; padding: 0.65rem 0.75rem; border-radius: 10px; border: 1px solid var(--border-color); background: var(--bg-card); font: inherit; color: var(--text-primary); cursor: pointer; }
.suggestion-card:hover, .suggestion-card:focus-visible { border-color: var(--brand-500); }
.suggestion-card.selected { border-color: var(--brand-500); background: var(--brand-50); box-shadow: inset 0 0 0 1px var(--brand-500); }
.suggestion-card.selected .suggestion-title::before { content: "✓ "; color: var(--brand-600); }
.suggestion-title { font-weight: 700; display: grid; }
.suggestion-title small { font-weight: 400; color: var(--text-secondary); font-size: 0.8rem; }
.suggestion-reason { font-size: 0.85rem; color: var(--text-secondary); }
.titles-hint { color: #D92D20; font-weight: 600; margin: 0.4rem 0 0; }
.suggestion-tag { justify-self: start; font-size: 0.75rem; padding: 0.1rem 0.45rem; border-radius: 6px; background: #FFF7E6; color: #8A5300; }
.optional-prefs { border: 1px solid var(--border-color); border-radius: 12px; padding: 0.75rem 1rem; background: var(--bg-card); display: grid; gap: 1rem; }
.optional-prefs[open] { padding-bottom: 1rem; }
.optional-prefs summary { cursor: pointer; font-weight: 700; }
.salary-strict { align-self: end; font-weight: 500; font-size: 0.9rem; }

/* Job ad intake and job cards */
.intake-panel { display: grid; gap: 1rem; }
.intake-tabs { display: flex; gap: 0.4rem; flex-wrap: wrap; border-bottom: 1px solid var(--border-color); }
.intake-tab { border: 0; background: transparent; font: inherit; padding: 0.6rem 0.9rem; border-bottom: 3px solid transparent; color: var(--text-secondary); cursor: pointer; font-weight: 600; }
.intake-tab.active { color: var(--brand-600); border-bottom-color: var(--brand-500); }
.intake-form { display: grid; gap: 0.75rem; }
.intake-review { display: grid; gap: 0.85rem; padding: 1rem; border: 1px solid var(--border-color); border-radius: 14px; background: #FAFCFB; }
.intake-review h3 { margin: 0; }
.match-reasons { margin: 0.25rem 0; padding-inline-start: 1.1rem; color: var(--text-secondary); font-size: 0.9rem; }
.job-check { margin: 0.25rem 0; padding: 0.45rem 0.65rem; border-radius: 8px; background: var(--amber-50); color: #78350F; font-size: 0.88rem; }
.job-requirements summary { cursor: pointer; font-weight: 600; font-size: 0.92rem; }
.job-requirements ul { margin: 0.4rem 0 0; padding-inline-start: 1.1rem; font-size: 0.9rem; }
.job-card-excluded { opacity: 0.75; }
.score-badge-muted { background: var(--border-subtle); color: var(--text-secondary); }
.jobs-subheading { grid-column: 1 / -1; font-size: 1.05rem; margin: 1rem 0 0; color: var(--text-secondary); }

.fit-heading { display: block; margin-top: 0.6rem; font-size: 0.9rem; }
.fit-gaps li span { color: #8A5300; }
.cv-downloads { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }

/* The hidden attribute must win over component display rules (.btn, .alert, ...). */
[hidden] { display: none !important; }

/* Admin area */
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin: 1rem 0; }
.table-scroll { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; background: var(--bg-card); }
.admin-table th, .admin-table td { padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--border-subtle); text-align: start; vertical-align: top; }
.admin-table th { color: var(--text-secondary); font-weight: 700; white-space: nowrap; }
.inline-form { display: inline; }
.admin-search { display: flex; gap: 0.5rem; margin: 0.75rem 0; max-width: 520px; }
.totp-secret { font-family: ui-monospace, monospace; font-size: 1.3rem; letter-spacing: 0.08em; padding: 0.75rem 1rem; background: var(--bg-main); border-radius: 10px; }
.activity-link { font-size: 0.85rem; margin-inline-start: 0.5rem; }

/* Legal pages, footer links, danger zone */
.legal-page h1 { margin-bottom: 0.25rem; }
.legal-page h2 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; }
.legal-page ul { padding-inline-start: 1.2rem; line-height: 1.9; }
.footer-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.footer-links a { color: var(--text-secondary); text-decoration: none; }
.footer-links a:hover, .footer-links a:focus-visible { color: var(--brand-600); text-decoration: underline; }
.danger-zone { margin-top: 1.5rem; border-color: #FECACA; }
.danger-zone summary { color: #B91C1C; }

a.stat-link { text-decoration: none; color: inherit; display: block; transition: border-color .15s ease, box-shadow .15s ease; }
a.stat-link:hover, a.stat-link:focus-visible { border-color: var(--brand-500); box-shadow: 0 4px 14px rgba(4, 87, 79, .08); }

/* Compact job cards: essentials visible, details on demand */
.job-email-line { margin: 0.35rem 0; font-size: 0.92rem; }
.job-email-line > span:first-child { color: var(--text-secondary); }
.job-more { margin: 0.35rem 0 0.6rem; border-top: 1px solid var(--border-subtle); padding-top: 0.4rem; }
.job-more > summary { cursor: pointer; font-weight: 700; color: var(--brand-600); list-style: none; display: inline-flex; align-items: center; gap: 0.35rem; }
.job-more > summary::-webkit-details-marker { display: none; }
.job-more > summary::after { content: "▾"; transition: transform .15s ease; }
.job-more[open] > summary::after { transform: rotate(180deg); }
.job-more .job-description { white-space: normal; font-size: 0.88rem; color: var(--text-secondary); max-height: 240px; overflow: auto; }
.job-req-list { margin: 0.25rem 0 0.5rem; padding-inline-start: 1.1rem; font-size: 0.9rem; }
.image-drop { display: grid; place-items: center; gap: 0.5rem; min-height: 180px; padding: 1.25rem; text-align: center; border: 2px dashed var(--border-color); border-radius: 14px; background: #FAFCFB; cursor: pointer; color: var(--text-secondary); }
.image-drop:hover, .image-drop:focus-visible, .image-drop.dragging { border-color: var(--brand-500); background: var(--brand-50); }
.image-drop img { max-width: 100%; max-height: 360px; border-radius: 10px; }

.hero-terms, .auth-terms { font-size: 0.82rem; color: var(--text-secondary); margin: 0.6rem 0 0; text-align: center; }
.hero-terms a, .auth-terms a { color: var(--brand-600); }

/* CV panel: template picker and downloads */
.cv-panel { display: grid; gap: 0.75rem; margin-bottom: 1.25rem; padding: 1rem; border-radius: 14px; background: var(--bg-card); border: 1px solid var(--border-color); }
.cv-panel-head strong, .cv-panel-head span { display: block; }
.cv-panel-head span { color: var(--text-secondary); font-size: 0.92rem; }
.cv-templates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.cv-template { display: grid; gap: 0.35rem; justify-items: center; padding: 0.5rem; border: 2px solid var(--border-color); border-radius: 12px; cursor: pointer; background: #fff; }
.cv-template input { position: absolute; opacity: 0; pointer-events: none; }
.cv-template img { width: 100%; max-width: 170px; border: 1px solid var(--border-subtle); border-radius: 4px; box-shadow: 0 2px 8px rgba(15, 23, 42, .06); }
.cv-template span { font-weight: 700; font-size: 0.9rem; }
.cv-template.selected, .cv-template:focus-within { border-color: var(--brand-500); background: var(--brand-50); }
@media (max-width: 520px) { .cv-templates { gap: 0.4rem; } .cv-template { padding: 0.3rem; } }

/* ---- Simple layout (2026-09-26): home steps, "my jobs", apply modes ---- */
.page-title { font-size: 1.5rem; font-weight: 800; color: var(--text-primary); margin: 0.5rem 0 1.25rem; }
.stop-banner { background: #DC2626; color: #fff; padding: 0.6rem 1rem; text-align: center; font-weight: 700; font-size: 0.9rem; }
.simple-home { max-width: 760px; }
.home-greeting { font-size: 1.6rem; font-weight: 800; color: var(--text-primary); margin: 1rem 0 0.35rem; }
.home-lead { color: var(--text-secondary); font-size: 1rem; margin-bottom: 1.5rem; line-height: 1.7; }
.setup-steps { list-style: none; padding: 0; margin: 0 0 1.75rem; display: grid; gap: 0.75rem; }
.setup-step { display: flex; align-items: center; gap: 1rem; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 1rem; padding: 1rem 1.1rem; }
.setup-step > div { flex: 1; display: flex; flex-direction: column; gap: 0.15rem; }
.setup-step strong { font-size: 1.05rem; color: var(--text-primary); }
.setup-step span { font-size: 0.88rem; color: var(--text-secondary); }
.setup-num { width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--brand-50); color: var(--brand-700); display: flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0; }
.setup-step.is-done .setup-num { background: var(--emerald-100); color: var(--emerald-700); }
.setup-step.is-done { opacity: 0.8; }
.home-numbers { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.75rem; margin-bottom: 1.5rem; }
.service-dot { display: inline-block; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: #16a34a; margin-inline-end: 0.45rem; vertical-align: middle; box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18); }
.service-dot.is-off { background: #d97706; box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.18); }
.home-number { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 1rem; padding: 1.1rem 0.75rem; text-align: center; text-decoration: none; display: flex; flex-direction: column; gap: 0.3rem; transition: border-color 0.15s ease; }
.home-number:hover { border-color: var(--brand-500); }
.home-number strong { font-size: 2rem; font-weight: 800; color: var(--text-primary); line-height: 1; }
.home-number span { font-size: 0.85rem; color: var(--text-secondary); font-weight: 600; }
.home-number.is-attention { border-color: var(--brand-500); background: var(--brand-50); }
.home-number.is-attention strong { color: var(--brand-700); }
.home-stop { text-align: center; }
.filter-chips { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.filter-chip { border: 1px solid var(--border-color); background: var(--bg-card); border-radius: 999px; padding: 0.4rem 0.9rem; font-size: 0.88rem; font-weight: 700; color: var(--text-secondary); text-decoration: none; }
.filter-chip.active { background: var(--brand-500); border-color: var(--brand-500); color: #fff; }
.my-jobs { display: grid; gap: 0.75rem; }
.my-job { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 1rem; padding: 1rem 1.1rem; }
.my-job-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem; }
.my-job-head h2 { font-size: 1.05rem; font-weight: 800; color: var(--text-primary); margin-bottom: 0.25rem; }
.my-job-head .badge { flex-shrink: 0; }
.my-job-note { font-size: 0.85rem; color: var(--text-secondary); margin: 0.5rem 0 0; }
.my-job-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-top: 0.75rem; }
.my-job-actions details { flex-basis: 100%; }
.page-footnote { text-align: center; color: var(--text-secondary); font-size: 0.9rem; margin: 1.5rem 0; }
.apply-modes { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-bottom: 1rem; }
.big-choice { align-items: flex-start; padding: 1rem; }
.big-choice span { display: flex; flex-direction: column; gap: 0.25rem; }
.big-choice strong { font-size: 1rem; }
.big-choice small { font-weight: 500; color: var(--text-secondary); font-size: 0.85rem; }
.my-files { margin-top: 0.75rem; }
@media (max-width: 640px) {
  .home-numbers { grid-template-columns: 1fr; }
  .home-number { flex-direction: row; justify-content: space-between; align-items: center; padding: 0.9rem 1rem; text-align: start; }
  .home-number strong { font-size: 1.5rem; order: 2; }
  .setup-step { flex-wrap: wrap; }
}
.bilingual-letter { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.letter-col { display: flex; flex-direction: column; }
.letter-col[dir="ltr"] .form-label, .letter-col[dir="ltr"] .letter-lang { text-align: left; }
.letter-lang { font-size: 0.9rem; color: var(--brand-700); margin-bottom: 0.5rem; }
@media (max-width: 820px) { .bilingual-letter { grid-template-columns: 1fr; } }
.jobs-toolbar-simple { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.jobs-toolbar-simple .filter-chips { margin-bottom: 0; }
.hidden-toggle { font-size: 0.88rem; font-weight: 700; color: var(--text-secondary); }
.my-job-actions .hide-job-button { color: var(--text-secondary); }

/* Site-styled confirmation dialog (public/assets/js/dialog.js) */
.qd-dialog-open { overflow: hidden; }
.qd-dialog-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(15, 23, 42, 0.45); display: flex; align-items: center; justify-content: center; padding: 16px; animation: qd-fade 0.12s ease-out; }
.qd-dialog { background: var(--bg-card); border-radius: 1rem; box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25); width: 100%; max-width: 420px; padding: 1.5rem; text-align: right; font-family: var(--font-arabic); }
.qd-dialog h2 { font-size: 1.15rem; font-weight: 800; color: var(--text-primary); margin: 0 0 0.5rem; }
.qd-dialog p { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.8; margin: 0 0 1.25rem; white-space: pre-line; }
.qd-dialog-actions { display: flex; gap: 0.6rem; justify-content: flex-start; flex-wrap: wrap; }
.qd-dialog-actions .btn { min-width: 6.5rem; }
@keyframes qd-fade { from { opacity: 0; } to { opacity: 1; } }

/* ---- "My CV" as cards with a pencil per section (profile-cards.js) ---- */
.workspace-layout { grid-template-columns: minmax(0, 1fr); }
.section-nav { position: static; display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0.4rem; }
.section-nav-item { flex: 1 1 auto; text-align: center; }
.account-section.cv-section { background: transparent; border: 0; padding: 0; }
.cv-section > .section-heading-row { background: #fff; border: 1px solid var(--border-color); border-radius: 1.1rem; padding: 1.1rem 1.25rem; margin-bottom: 1rem; }
.cv-layout { display: grid; grid-template-columns: 19rem minmax(0, 1fr); gap: 1rem; align-items: start; }
.cv-side { display: grid; gap: 1rem; position: sticky; top: 5.5rem; }
.cv-side > .resume-panel, .cv-side > .cv-panel, .cv-side > .upload-zone, .cv-side > details { margin: 0; }
.side-card, .cv-card { background: #fff; border: 1px solid var(--border-color); border-radius: 1rem; padding: 1.1rem 1.2rem; }
.identity-top { display: flex; gap: 0.8rem; align-items: center; margin-bottom: 0.9rem; }
.identity-top > div:last-child { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.identity-top strong { font-size: 1.05rem; color: var(--text-primary); }
.identity-top span { font-size: 0.85rem; color: var(--text-secondary); overflow-wrap: anywhere; }
.identity-card .avatar-circle { width: 3.2rem; height: 3.2rem; border-radius: 50%; background: var(--brand-50); border: 2px solid var(--brand-100); color: var(--brand-700); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.3rem; flex-shrink: 0; }
.identity-contact { border-top: 1px solid var(--border-subtle); padding-top: 0.75rem; }
.identity-contact p { font-size: 0.88rem; margin: 0.2rem 0; overflow-wrap: anywhere; }
.status-card { display: grid; gap: 0.5rem; border-color: #FCD34D; background: #FFFBEB; }
.status-card.is-approved { border-color: var(--emerald-100); background: var(--emerald-50); }
.status-card strong { font-size: 1rem; color: var(--text-primary); }
.btn-block { width: 100%; }
.cv-main { display: grid; gap: 1rem; min-width: 0; }
.cv-card-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.75rem; }
.cv-card-head h3 { font-size: 1.05rem; font-weight: 800; color: var(--text-primary); margin: 0; }
.cv-card-actions { display: flex; align-items: center; gap: 0.4rem; }
.cv-card-note { margin: -0.25rem 0 0.75rem; }
.icon-btn { border: 1px solid var(--border-color); background: #fff; color: var(--brand-700); border-radius: 0.6rem; min-width: 2.25rem; height: 2.25rem; padding: 0 0.5rem; font: inherit; font-size: 0.95rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: var(--brand-50); border-color: var(--brand-100); }
.icon-btn:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; }
.icon-btn.danger { color: #DC2626; }
.icon-btn.danger:hover { background: #FEF2F2; border-color: #FECACA; }
.cv-items { display: grid; gap: 0.6rem; }
.cv-item { display: flex; gap: 0.75rem; justify-content: space-between; align-items: flex-start; border: 1px solid var(--border-subtle); background: #FAFCFB; border-radius: 0.8rem; padding: 0.8rem 0.9rem; }
.cv-item-body { min-width: 0; flex: 1; }
.cv-item-body h4, .cv-item-body strong { font-size: 0.98rem; font-weight: 800; color: var(--text-primary); margin: 0 0 0.15rem; }
.cv-item-actions { display: flex; gap: 0.3rem; flex-shrink: 0; }
.cv-meta { font-size: 0.85rem; color: var(--text-secondary); margin: 0.1rem 0; overflow-wrap: anywhere; }
.cv-meta:empty { display: none; }
.cv-text { font-size: 0.92rem; line-height: 1.8; color: var(--text-primary); white-space: pre-line; margin: 0.25rem 0; }
.cv-bullets { margin: 0.4rem 0 0.2rem; padding-inline-start: 1.1rem; font-size: 0.9rem; line-height: 1.75; color: var(--text-primary); }
.cv-empty { color: var(--text-muted); font-size: 0.9rem; margin: 0; }
.cv-subhead { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin: 0.75rem 0 0.5rem; }
.cv-subhead h4 { font-size: 0.95rem; font-weight: 800; margin: 0; color: var(--text-secondary); }
.cv-dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0.6rem 1.25rem; margin: 0; }
.cv-dl dt { font-size: 0.78rem; color: var(--text-muted); font-weight: 700; }
.cv-dl dd { margin: 0.1rem 0 0; font-size: 0.93rem; color: var(--text-primary); overflow-wrap: anywhere; }
.completion-row { display: flex; align-items: center; gap: 1rem; }
.completion-big { font-size: 1.6rem; font-weight: 800; color: var(--brand-700); }
.completion-row .progress-track { flex: 1; }
.completion-todo { list-style: none; padding: 0; margin: 0.75rem 0 0; display: grid; gap: 0.3rem; }
/* The edit sheet */
.qd-sheet-overlay { position: fixed; inset: 0; z-index: 900; background: rgba(15, 23, 42, 0.45); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.qd-sheet { background: #fff; width: 100%; max-width: 760px; max-height: calc(100vh - 2rem); border-radius: 1rem; box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28); display: flex; flex-direction: column; overflow: hidden; }
.qd-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border-subtle); }
.qd-sheet-head h2 { font-size: 1.1rem; font-weight: 800; margin: 0; color: var(--text-primary); }
.qd-sheet-body { padding: 1.1rem 1.25rem; overflow-y: auto; overscroll-behavior: contain; }
.qd-sheet-foot { display: flex; gap: 0.6rem; padding: 0.85rem 1.25rem; border-top: 1px solid var(--border-subtle); background: #fff; }
.qd-sheet-error { background: #FEF2F2; color: #B91C1C; border: 1px solid #FECACA; border-radius: 0.6rem; padding: 0.6rem 0.8rem; font-size: 0.88rem; margin-bottom: 0.9rem; }
.qd-sheet .item-card.in-sheet { border: 0; padding: 0; background: transparent; box-shadow: none; }
.qd-sheet .item-card.in-sheet .item-actions button:not(.suggest-tasks) { display: none; }
.sheet-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 0.25rem 1rem; }
.item-fields .item-wide, .sheet-fields .item-wide { grid-column: 1 / -1; }
.item-check { align-self: center; }
.char-counter { text-align: left; display: block; }
.input-with-select { display: flex; gap: 0.5rem; }
.input-with-select select { max-width: 9rem; }
@media (max-width: 900px) {
  .cv-layout { grid-template-columns: minmax(0, 1fr); }
  .cv-side { position: static; }
}
@media (max-width: 640px) {
  .qd-sheet-overlay { padding: 0; }
  .qd-sheet { max-width: none; max-height: none; height: 100%; border-radius: 0; }
  .cv-item { flex-direction: column; }
  .cv-item-actions { align-self: flex-end; }
  .cv-card-head { flex-wrap: wrap; }
}
.cv-bullets[dir="ltr"] { text-align: right; list-style-position: inside; padding-inline-start: 0; }
.cv-item-body [dir="auto"], .cv-card [dir="auto"] { text-align: right; }
.home-search-note { text-align: center; color: var(--text-secondary); font-size: 0.85rem; margin: -0.5rem 0 1.25rem; }

/* ---- Icons (app/icons.php) ---- */
.icon { width: 1.15em; height: 1.15em; vertical-align: -0.22em; flex-shrink: 0; }
.workspace-nav a { display: inline-flex; align-items: center; gap: 0.4rem; }
.header-inner .btn { display: inline-flex; align-items: center; gap: 0.35rem; }
.btn .icon, .text-button .icon { margin-inline-end: 0.35rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; }
.page-title .icon { color: var(--brand-500); margin-inline-end: 0.45rem; width: 1em; height: 1em; }
.job-meta span { display: inline-flex; align-items: center; gap: 0.3rem; }
.job-meta .icon { color: var(--text-muted); width: 1em; height: 1em; }
.setup-num .icon { width: 1.25rem; height: 1.25rem; }
.home-number-icon { color: var(--brand-500); width: 1.4rem; height: 1.4rem; margin: 0 auto 0.2rem; }
.home-search-note .icon { color: var(--text-muted); }
.hidden-toggle { display: inline-flex; align-items: center; gap: 0.35rem; }
@media (max-width: 640px) {
  .home-number-icon { margin: 0; order: -1; }
  .workspace-nav a span { font-size: 0.85rem; }
}

/* ---- "My CV": top upload, status line, template strip ---- */
.cv-top { background: #fff; border: 1px solid var(--border-color); border-radius: 1.1rem; padding: 1.1rem 1.25rem; margin-bottom: 1rem; display: grid; gap: 0.9rem; }
.cv-top-head h2 { font-size: 1.25rem; font-weight: 800; color: var(--text-primary); margin: 0 0 0.2rem; display: flex; align-items: center; gap: 0.5rem; }
.cv-top-head h2 .icon, .account-section h2 .icon { color: var(--brand-500); }
.cv-top-head p { color: var(--text-secondary); font-size: 0.9rem; margin: 0; }
.upload-inline { padding: 1rem; }
.upload-inline label { display: flex; align-items: center; justify-content: center; gap: 0.6rem; flex-wrap: wrap; cursor: pointer; }
.upload-inline label .icon { width: 1.6rem; height: 1.6rem; color: var(--brand-500); }
.upload-inline label strong { font-size: 1rem; }
.resume-status { margin: 0; }
.resume-status .form-actions:empty, .resume-status .form-actions:has(> [hidden]:only-child) { display: none; }
.cv-main-wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; min-width: 0; }
.cv-main { grid-template-columns: minmax(0, 1fr); }
.cv-card-head h3 { display: flex; align-items: center; gap: 0.5rem; }
.cv-card-icon { display: inline-flex; width: 2rem; height: 2rem; border-radius: 0.6rem; background: var(--brand-50); color: var(--brand-600); align-items: center; justify-content: center; }
.cv-card-icon .icon { width: 1.1rem; height: 1.1rem; }
.cv-card-actions .btn .icon { width: 1em; height: 1em; }
.identity-contact p { display: flex; align-items: center; gap: 0.4rem; }
.identity-contact .icon, .identity-top .icon { color: var(--text-muted); width: 1em; height: 1em; }
.section-nav-item { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; }
.template-strip { display: flex; align-items: center; gap: 0.5rem; margin: 0.75rem 0; }
.template-track { overflow-x: auto; scroll-behavior: auto; scrollbar-width: thin; flex: 1; min-width: 0; -webkit-overflow-scrolling: touch; }
.template-row { display: flex !important; flex-wrap: nowrap; gap: 0.75rem; padding: 0.25rem 0.1rem 0.6rem; grid-template-columns: none !important; }
.template-row .cv-template { flex: 0 0 9.5rem; }
.template-row .cv-template img { width: 100%; height: auto; }
.strip-nav { flex-shrink: 0; }
.my-files summary { display: inline-flex; align-items: center; gap: 0.4rem; }
.ai-revoke-line { margin-top: 1rem; }
@media (max-width: 640px) {
  .strip-nav { display: none; }
  .template-row .cv-template { flex-basis: 8rem; }
}
.cv-main-wrap .cv-panel, #profileSection > .cv-panel { display: block; min-width: 0; max-width: 100%; }
.cv-template { position: relative; }

/* Platform consent: one short checkbox under the upload area, with a tooltip for mouse, keyboard and touch */
.consent-box { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 10px 0 0; text-align: right; position: relative; }
.consent-check { display: flex; gap: 8px; align-items: flex-start; font-size: .95rem; line-height: 1.6; margin: 4px 0; }
.consent-check input { margin-top: 5px; }
.consent-links { font-size: .88rem; opacity: .85; }
.consent-tip { position: relative; display: inline-block; }
.consent-tip-btn { width: 22px; height: 22px; border-radius: 50%; border: 1px solid currentColor; background: transparent; color: inherit; font-size: .8rem; line-height: 1; cursor: help; padding: 0; }
.consent-tip-text { position: absolute; inset-inline-start: 50%; bottom: calc(100% + 8px); transform: translateX(50%); width: max-content; max-width: min(260px, 80vw); background: #1f2937; color: #fff; font-size: .82rem; line-height: 1.5; padding: 8px 10px; border-radius: 8px; visibility: hidden; opacity: 0; transition: opacity .12s; z-index: 20; pointer-events: none; }
.consent-tip:hover .consent-tip-text, .consent-tip-btn:focus + .consent-tip-text, .consent-box.tip-open .consent-tip-text { visibility: visible; opacity: 1; }
.consent-status { flex-basis: 100%; min-height: 1.1em; font-size: .85rem; margin: 0; }
.delegation-box { display: block; border: 1px solid var(--border, #D6E0DD); border-radius: 12px; padding: 14px 16px; margin: 0 0 14px; background: rgba(255,255,255,.65); }
.delegation-box legend { font-weight: 700; padding: 0 6px; }
.consent-list { margin: 6px 0 10px; padding-inline-start: 20px; font-size: .92rem; line-height: 1.7; }
.hero-dropzone.is-disabled { opacity: .5; cursor: not-allowed; }


/* Brand identity: logo image, and gold only as a small supporting detail */
.brand-logo-img { display: block; height: 2.6rem; width: auto; max-width: 100%; }
.auth-brand .brand-logo-img, .auth-site-header .brand-logo-img { height: 2.4rem; }
.brand-logo-group .brand-text-sub { color: var(--gold-600); font-weight: 700; }
.site-header { box-shadow: inset 0 -2px 0 rgba(172, 139, 87, .45); }
.intake-tab.active { border-bottom-color: var(--gold-500); }
.completion-card { border-top: 3px solid var(--gold-500); }
.consent-links a { text-decoration-color: var(--gold-500); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 2px; }
@media (max-width: 640px) { .brand-logo-img { height: 2.1rem; } }

/* Links inside the consent boxes use the brand green, never the browser default */
.consent-box a, .delegation-box a { color: var(--brand-600); font-weight: 600; text-decoration: underline; }
.consent-box a:hover, .delegation-box a:hover { color: var(--brand-700); }

/* Admin dashboard additions */
.metric-na { color: var(--text-secondary); font-size: 0.95rem; font-weight: 600; }
.metric-def { margin-top: 0.4rem; font-size: 0.8rem; }
.metric-def summary { cursor: pointer; color: var(--text-secondary); }
.admin-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-bottom: 1rem; }
.admin-filters .form-input { width: auto; min-width: 8rem; }
.pager { display: flex; gap: 0.75rem; align-items: center; justify-content: center; margin: 1rem 0; }
.plain-list { list-style: none; padding: 0; margin: 0.5rem 0; font-size: 0.85rem; }
.workspace-main h1, .workspace-main .detail-list dd, .workspace-main .detail-list dt, .workspace-main .card { overflow-wrap: anywhere; min-width: 0; }
.workspace-main .detail-list > div { flex-wrap: wrap; }
.workspace-main .row-actions, .workspace-main .inline-form { flex-wrap: wrap; }
.workspace-main .detail-list { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 760px) { .workspace-main .admin-table { display: block; max-width: 100%; overflow-x: auto; } }
@media (max-width: 900px) {
  .admin-header { flex-wrap: wrap; row-gap: 0.4rem; }
  .admin-header .admin-nav { order: 3; flex: 1 1 100%; max-width: 100%; overflow-x: auto; white-space: nowrap; }
}
.admin-header { flex-wrap: wrap; row-gap: 0.4rem; }
.admin-header .admin-nav { order: 3; flex: 1 1 100%; max-width: 100%; overflow-x: auto; white-space: nowrap; }
