/* ═══════════════════════════════════════════════════════════════
   DARBAK PORTAL · Premium Design System
   Arabic-first Corporate UI · Gulf Luxury Aesthetic
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800;900&display=swap');

/* ── Design Tokens ──────────────────────────────────────────── */
:root {
  --navy:          #1B2B5E;
  --navy-dark:     #0F1935;
  --navy-mid:      #243570;
  --navy-light:    #EEF2FF;
  --navy-subtle:   #F7F9FF;

  --gold:          #C9A44C;
  --gold-dark:     #A8852D;
  --gold-light:    #D9B96A;
  --gold-pale:     #FBF5E6;
  --gold-ultra:    #FEFAF0;

  --white:         #FFFFFF;
  --bg:            #F4F6FC;
  --border:        #E2E8F0;
  --border-light:  #EEF0F6;
  --text:          #1A2B5E;
  --text-body:     #374151;
  --text-muted:    #6B7280;
  --text-subtle:   #9CA3AF;

  --success:       #059669;
  --success-bg:    #D1FAE5;
  --warning:       #D97706;
  --warning-bg:    #FEF3C7;
  --danger:        #DC2626;
  --danger-bg:     #FEE2E2;
  --info:          #2563EB;
  --info-bg:       #DBEAFE;

  --shadow-sm:     0 1px 3px rgba(27,43,94,.06), 0 1px 2px rgba(27,43,94,.04);
  --shadow:        0 4px 16px rgba(27,43,94,.08), 0 2px 6px rgba(27,43,94,.04);
  --shadow-md:     0 8px 28px rgba(27,43,94,.10), 0 3px 8px rgba(27,43,94,.05);
  --shadow-lg:     0 20px 60px rgba(27,43,94,.14), 0 6px 20px rgba(27,43,94,.07);
  --shadow-gold:   0 4px 20px rgba(201,164,76,.30);

  --radius-sm:     8px;
  --radius:        12px;
  --radius-lg:     16px;
  --radius-xl:     24px;

  --ease:          cubic-bezier(.4,0,.2,1);
  --ease-spring:   cubic-bezier(.34,1.56,.64,1);
  --dur:           200ms;
  --dur-lg:        350ms;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Tajawal', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; }
input, select, textarea, button { font-family: inherit; }

/* ── Typography ─────────────────────────────────────────────── */
h1 { font-size: 1.875rem; font-weight: 800; line-height: 1.2; }
h2 { font-size: 1.5rem;   font-weight: 700; line-height: 1.3; }
h3 { font-size: 1.25rem;  font-weight: 600; }
p  { color: var(--text-body); }

/* ── Layout ─────────────────────────────────────────────────── */
.container { max-width: 1240px; margin: 0 auto; padding: 0 1.75rem; }
.page      { padding: 2rem 0 5rem; }

/* ── Navbar ─────────────────────────────────────────────────── */
.navbar {
  background: var(--navy-dark);
  height: 64px;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 24px rgba(10,16,40,.5);
}
.navbar::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--gold-light), var(--gold), transparent);
}
.navbar-brand {
  font-size: 2rem;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: -0.02em;
  line-height: 1;
  text-shadow: 0 2px 16px rgba(201,164,76,.35);
}
.navbar-center {
  position: absolute;
  left: 50%; transform: translateX(-50%);
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(255,255,255,.3);
  letter-spacing: .12em;
  text-transform: uppercase;
  pointer-events: none;
}
.navbar-user { display: flex; align-items: center; gap: .75rem; }
.navbar-username { font-size: .875rem; font-weight: 600; color: rgba(255,255,255,.8); }
.btn-logout {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.65);
  padding: .38rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .8rem;
  font-weight: 600;
  transition: all var(--dur) var(--ease);
}
.btn-logout:hover { background: rgba(255,255,255,.15); color: white; border-color: rgba(255,255,255,.28); }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .625rem 1.375rem;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 700;
  border: none;
  transition: all var(--dur) var(--ease);
  white-space: nowrap;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
}
.btn:active { transform: scale(.97); }

.btn-primary { background: var(--navy); color: white; box-shadow: 0 2px 10px rgba(27,43,94,.28); }
.btn-primary:hover { background: var(--navy-mid); box-shadow: 0 4px 18px rgba(27,43,94,.38); transform: translateY(-1px); }

.btn-gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: white;
  box-shadow: var(--shadow-gold);
}
.btn-gold:hover {
  background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold) 100%);
  box-shadow: 0 6px 24px rgba(201,164,76,.42);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--navy); color: var(--navy); background: var(--navy-subtle); }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #b91c1c; transform: translateY(-1px); }

.btn-sm  { padding: .4rem .875rem; font-size: .78rem; }
.btn-lg  { padding: .8rem 2rem;    font-size: .975rem; }
.btn-xl  { padding: 1rem 2.5rem;   font-size: 1.05rem; }
.btn-full { width: 100%; }

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: .28rem .8rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .03em;
  white-space: nowrap;
}
.badge-gray  { background: #F3F4F6;          color: #4B5563; }
.badge-blue  { background: var(--info-bg);    color: #1D4ED8; }
.badge-green { background: var(--success-bg); color: #065F46; }
.badge-red   { background: var(--danger-bg);  color: #991B1B; }
.badge-gold  { background: var(--gold-pale);  color: var(--gold-dark); }
.badge-navy  { background: var(--navy-light); color: var(--navy); }

/* ── Track Selector ─────────────────────────────────────────── */
.track-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.track-option {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  cursor: pointer;
  text-align: center;
  transition: all var(--dur) var(--ease);
  background: var(--white);
  position: relative;
}
.track-option:hover {
  border-color: var(--gold);
  background: var(--gold-ultra);
}
.track-option.selected {
  border-color: var(--navy);
  background: var(--navy-light);
  box-shadow: 0 0 0 3px rgba(27,43,94,.08);
}
.track-option.selected .track-option-title { color: var(--navy); }
.track-option-icon { font-size: 1.75rem; margin-bottom: .5rem; line-height: 1; }
.track-option-title {
  font-weight: 800;
  color: var(--text-body);
  font-size: .95rem;
  margin-bottom: .3rem;
  transition: color var(--dur);
}
.track-option-sub {
  font-size: .75rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.track-option .track-check {
  position: absolute;
  top: .6rem;
  left: .6rem;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--navy);
  color: white;
  font-size: .62rem;
  display: none;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}
.track-option.selected .track-check { display: flex; }

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  border: 1px solid var(--border-light);
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1.5px solid var(--border);
}
.card-title { font-size: 1rem; font-weight: 700; color: var(--navy); }

/* ── Stat Cards ─────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.stat-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 4px; height: 100%;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}
.stat-card.c-navy::before  { background: var(--navy); }
.stat-card.c-gold::before  { background: var(--gold); }
.stat-card.c-green::before { background: var(--success); }
.stat-card.c-gray::before  { background: var(--text-muted); }

.stat-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 1rem;
}
.stat-card.c-navy  .stat-icon { background: var(--navy-light);  color: var(--navy); }
.stat-card.c-gold  .stat-icon { background: var(--gold-pale);   color: var(--gold-dark); }
.stat-card.c-green .stat-icon { background: var(--success-bg);  color: var(--success); }
.stat-card.c-gray  .stat-icon { background: #F3F4F6;            color: var(--text-muted); }

.stat-number { font-size: 2.375rem; font-weight: 900; color: var(--navy); line-height: 1; }
.stat-label  { font-size: .8rem; color: var(--text-muted); margin-top: .35rem; font-weight: 500; }

/* ── Table ──────────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
thead th {
  background: var(--navy-subtle);
  color: var(--navy);
  font-weight: 700;
  padding: .9rem 1rem;
  text-align: right;
  border-bottom: 2px solid var(--border);
  font-size: .78rem;
  letter-spacing: .04em;
  white-space: nowrap;
}
tbody td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
  color: var(--text-body);
}
tbody tr { transition: background var(--dur) var(--ease); }
tbody tr:hover td { background: var(--navy-subtle); }
tbody tr:last-child td { border-bottom: none; }

/* ── Progress ───────────────────────────────────────────────── */
.progress-wrap { display: flex; align-items: center; gap: .625rem; }
.progress-track {
  height: 6px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  min-width: 60px;
  flex: 1;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-light));
  border-radius: 999px;
  transition: width .5s var(--ease);
}
.progress-label { font-size: .72rem; color: var(--text-muted); font-weight: 700; white-space: nowrap; }

/* ── Forms ──────────────────────────────────────────────────── */
.section-label {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 1.25rem;
  padding-bottom: .625rem;
  border-bottom: 1.5px solid var(--gold-pale);
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.form-grid   { display: grid; grid-template-columns: 1fr 1fr;     gap: 1.25rem; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1.25rem; }
.form-full   { grid-column: 1 / -1; }

.form-group { display: flex; flex-direction: column; gap: .45rem; }
.form-group label { font-size: .82rem; font-weight: 700; color: var(--navy); }
.form-group label .req { color: var(--danger); margin-right: 2px; }

.form-control {
  padding: .7rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  color: var(--text);
  background: white;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  width: 100%;
}
.form-control:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(27,43,94,.1);
}
.form-control::placeholder { color: var(--text-subtle); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; line-height: 1.6; }

/* ── Steps Tracker ──────────────────────────────────────────── */
.steps-tracker { display: flex; flex-direction: column; gap: .625rem; }

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  background: white;
  transition: all var(--dur) var(--ease);
}
.step-item.done   { background: #F0FDF7; border-color: #A7F3D0; }
.step-item.active { background: var(--gold-ultra); border-color: var(--gold); box-shadow: 0 2px 14px rgba(201,164,76,.14); }

.step-num {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .82rem; font-weight: 800;
  flex-shrink: 0;
  transition: all var(--dur) var(--ease);
  background: var(--border);
  color: var(--text-muted);
}
.step-item.done   .step-num { background: var(--success); color: white; }
.step-item.active .step-num { background: var(--gold);    color: white; box-shadow: 0 2px 10px rgba(201,164,76,.4); }

.step-body { flex: 1; min-width: 0; }
.step-owner-tag {
  display: inline-flex;
  align-items: center;
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: .25rem;
  padding: .1rem .5rem;
  border-radius: 999px;
}
.step-owner-tag.candidate { background: var(--info-bg);    color: #1D4ED8; }
.step-owner-tag.darbak    { background: var(--gold-pale);  color: var(--gold-dark); }
.step-owner-tag.rental    { background: var(--success-bg); color: var(--success); }
.step-owner-tag.uber      { background: var(--navy-light); color: var(--navy); }

.step-label { font-size: .88rem; font-weight: 600; color: var(--text); }
.step-done-date { font-size: .72rem; color: var(--success); margin-top: .2rem; font-weight: 600; }
.step-note {
  margin-top: .5rem;
  padding: .42rem .8rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: .78rem;
  font-family: inherit;
  color: var(--text-body);
  width: 100%;
  background: white;
  transition: border-color var(--dur);
}
.step-note:focus { outline: none; border-color: var(--gold); }

.step-check-wrap { display: flex; align-items: center; padding-top: .25rem; }
.step-check { width: 18px; height: 18px; cursor: pointer; accent-color: var(--success); flex-shrink: 0; }

/* ── Action Bar ─────────────────────────────────────────────── */
.action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.75rem;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin-top: 1.5rem;
  border: 1px solid var(--border-light);
}
.action-bar-start, .action-bar-end { display: flex; align-items: center; gap: .75rem; }

/* ── Breadcrumb ─────────────────────────────────────────────── */
.breadcrumb { display: flex; align-items: center; gap: .5rem; font-size: .82rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.breadcrumb a { color: var(--navy); font-weight: 600; transition: color var(--dur); }
.breadcrumb a:hover { color: var(--gold-dark); }
.breadcrumb-sep { color: var(--border); }

/* ── Toolbar ────────────────────────────────────────────────── */
.toolbar { display: flex; align-items: center; gap: .875rem; margin-bottom: 1.25rem; }
.search-wrap { flex: 1; position: relative; }
.search-icon {
  position: absolute;
  right: .875rem; top: 50%;
  transform: translateY(-50%);
  color: var(--text-subtle);
  pointer-events: none;
  font-size: .9rem;
}
.search-input {
  width: 100%;
  padding: .7rem 2.5rem .7rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-family: inherit;
  color: var(--text);
  background: white;
  direction: rtl;
  transition: border-color var(--dur), box-shadow var(--dur);
}
.search-input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(27,43,94,.08); }
.filter-select {
  padding: .7rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-family: inherit;
  color: var(--text);
  background: white;
  cursor: pointer;
  min-width: 140px;
  transition: border-color var(--dur);
}
.filter-select:focus { outline: none; border-color: var(--navy); }

/* ── Page Header ────────────────────────────────────────────── */
.page-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 1.75rem; gap: 1rem; }
.page-title    { font-size: 1.625rem; font-weight: 900; color: var(--navy); line-height: 1; }
.page-subtitle { font-size: .875rem; color: var(--text-muted); margin-top: .35rem; }

/* ── Dividers ───────────────────────────────────────────────── */
.divider      { height: 1px; background: var(--border); margin: 1.5rem 0; }
.divider-gold { height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); margin: 1.5rem 0; }

/* ── Empty State ────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 4rem 2rem; }
.empty-icon  { font-size: 3.5rem; margin-bottom: 1rem; opacity: .3; display: block; }
.empty-state h3 { color: var(--navy); font-size: 1.1rem; margin-bottom: .5rem; }
.empty-state p  { font-size: .875rem; color: var(--text-muted); }

/* ── Misc ───────────────────────────────────────────────────── */
.hidden { display: none !important; }
.status-select-wrap { display: flex; align-items: center; gap: .5rem; }
.status-select-wrap label { font-size: .82rem; font-weight: 700; color: var(--navy); white-space: nowrap; }


/* ════════════════════════════════════════════════════════════
   LOGIN PAGE
   ════════════════════════════════════════════════════════════ */

.login-page {
  background: var(--navy-dark);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Subtle geometric diamond pattern */
.login-bg {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse 80% 60% at 20% 15%, rgba(201,164,76,.07) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 85% 85%, rgba(36,53,112,.8) 0%, transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56'%3E%3Cpath d='M28 2 L54 28 L28 54 L2 28 Z' fill='none' stroke='rgba(201,164,76,0.055)' stroke-width='1'/%3E%3C/svg%3E");
  background-size: cover, cover, 56px 56px;
}

.login-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  padding: 1.5rem;
  animation: fadeUp .6s var(--ease) both;
}

.login-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 2.75rem 2.25rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.login-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-light), var(--gold-dark));
}

.login-header { text-align: center; margin-bottom: 2.25rem; }
.login-logo {
  font-size: 3.75rem;
  font-weight: 900;
  color: var(--navy);
  line-height: 1;
  margin-bottom: .5rem;
  letter-spacing: -.03em;
}
.login-divider {
  height: 2px;
  width: 48px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-light));
  margin: .875rem auto 1rem;
  border-radius: 999px;
}
.login-subtitle { font-size: .875rem; color: var(--text-muted); font-weight: 500; }

.login-form { display: flex; flex-direction: column; gap: 1.125rem; }

.login-footer {
  text-align: center;
  font-size: .72rem;
  color: rgba(255,255,255,.28);
  margin-top: 1.75rem;
  letter-spacing: .06em;
}

.error-banner {
  background: var(--danger-bg);
  border: 1px solid #FECACA;
  border-right: 3px solid var(--danger);
  color: var(--danger);
  padding: .7rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 500;
}


/* ════════════════════════════════════════════════════════════
   CANDIDATE PROFILE CARD (Print View)
   ════════════════════════════════════════════════════════════ */

.print-wrapper { max-width: 980px; margin: 0 auto; padding: 2rem 1.75rem 5rem; }
.print-actions { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }

.candidate-profile-card {
  background: white;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
}

.profile-header {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 55%, var(--navy-mid) 100%);
  padding: 2rem 2.5rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.profile-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-light), var(--gold-dark));
}
.profile-header-pattern {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44'%3E%3Cpath d='M22 2 L42 22 L22 42 L2 22 Z' fill='none' stroke='rgba(255,255,255,0.04)' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 44px 44px;
  pointer-events: none;
}
.profile-header-logo { position: relative; z-index: 1; }
.profile-logo-text { font-size: 2.375rem; font-weight: 900; color: var(--gold); line-height: 1; letter-spacing: -.02em; }
.profile-logo-sub  { font-size: .68rem; color: rgba(255,255,255,.4); margin-top: .35rem; letter-spacing: .1em; text-transform: uppercase; }

.profile-header-meta { position: relative; z-index: 1; text-align: left; }
.profile-ref-label { font-size: .68rem; color: rgba(255,255,255,.45); letter-spacing: .1em; text-transform: uppercase; margin-bottom: .2rem; }
.profile-ref-value { font-size: 1.1rem; font-weight: 700; color: white; font-family: 'Courier New', monospace; letter-spacing: .04em; }
.profile-date      { font-size: .72rem; color: rgba(255,255,255,.38); margin-top: .35rem; }

.profile-body { padding: 2rem 2.5rem; }
.profile-name-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.75rem; }
.profile-name-label { font-size: .65rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--text-subtle); margin-bottom: .3rem; }
.profile-name       { font-size: 1.625rem; font-weight: 900; color: var(--navy); }

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .875rem; margin-bottom: 1.75rem; }
.info-cell {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: .875rem 1rem;
  border: 1px solid var(--border-light);
  transition: border-color var(--dur);
}
.info-cell:hover { border-color: rgba(27,43,94,.15); }
.info-cell-label { font-size: .64rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--text-subtle); margin-bottom: .3rem; }
.info-cell-value { font-size: .9rem; font-weight: 700; color: var(--text); }

.steps-mini-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: .625rem; margin-bottom: 1.25rem; }
.step-mini-item  { display: flex; flex-direction: column; align-items: center; gap: .4rem; }
.step-mini-dot {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 800;
  transition: all var(--dur) var(--ease);
  background: var(--border);
  color: var(--text-muted);
}
.step-mini-dot.done    { background: var(--success); color: white; }
.step-mini-dot.current { background: var(--gold);    color: white; box-shadow: 0 2px 10px rgba(201,164,76,.4); }
.step-mini-label { font-size: .56rem; color: var(--text-subtle); text-align: center; line-height: 1.35; max-width: 54px; }

.profile-progress-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .875rem 1.125rem;
  background: var(--navy-light);
  border-radius: var(--radius-sm);
  font-size: .875rem;
}

.profile-footer {
  background: var(--navy-subtle);
  border-top: 1px solid var(--border);
  padding: 1rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .75rem;
  color: var(--text-muted);
}

/* ── Email Draft ────────────────────────────────────────────── */
.email-draft-section { margin-top: 2rem; }
.email-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-right: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  font-size: .875rem;
  line-height: 1.9;
  white-space: pre-wrap;
  direction: rtl;
  text-align: right;
  color: var(--text-body);
  font-family: 'Tajawal', sans-serif;
}
.email-actions { display: flex; gap: .75rem; margin-top: 1rem; }


/* ════════════════════════════════════════════════════════════
   ANIMATIONS
   ════════════════════════════════════════════════════════════ */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }

.anim-up    { animation: fadeUp  .5s var(--ease) both; }
.anim-in    { animation: fadeIn  .4s var(--ease) both; }
.anim-scale { animation: scaleIn .4s var(--ease) both; }

.stagger > * { animation: fadeUp .45s var(--ease) both; }
.stagger > *:nth-child(1) { animation-delay: .05s; }
.stagger > *:nth-child(2) { animation-delay: .10s; }
.stagger > *:nth-child(3) { animation-delay: .15s; }
.stagger > *:nth-child(4) { animation-delay: .20s; }
.stagger > *:nth-child(5) { animation-delay: .25s; }

.delay-1 { animation-delay: .08s; }
.delay-2 { animation-delay: .16s; }
.delay-3 { animation-delay: .24s; }
.delay-4 { animation-delay: .32s; }


/* ════════════════════════════════════════════════════════════
   PRINT
   ════════════════════════════════════════════════════════════ */

@media print {
  .navbar, .print-actions, .email-draft-section { display: none !important; }
  body { background: white; }
  .candidate-profile-card { box-shadow: none; border: 1px solid #ddd; border-radius: 0; }
  .print-wrapper { margin: 0; padding: 0; max-width: 100%; }
  .profile-header-pattern { display: none; }
}


/* ════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
  .stats-grid      { grid-template-columns: 1fr 1fr; }
  .steps-mini-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 640px) {
  .stats-grid      { grid-template-columns: 1fr 1fr; }
  .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
  .info-grid       { grid-template-columns: 1fr; }
  .steps-mini-grid { grid-template-columns: repeat(3, 1fr); }
  .page-header     { flex-direction: column; align-items: flex-start; }
  .action-bar      { flex-direction: column; align-items: stretch; }
  .action-bar-start, .action-bar-end { flex-wrap: wrap; }
  .navbar-center   { display: none; }
  .print-actions   { flex-direction: column; gap: .75rem; align-items: flex-start; }
}
