/* ===== FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Arabic:wght@400;500;600&display=swap');

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --purple-deep: #4F2DA6;
  --purple-mid: #4F2DA6;
  --purple-light: #7B3FE4;
  --purple-header: linear-gradient(135deg, #5B2ABF 0%, #7B3FE4 100%);
  --gold: #C5A340;
  --gold-hover: #D4B44F;
  --gold-btn: linear-gradient(135deg, #C5A340 0%, #D4B44F 100%);
  --magenta: #d4337a;
  --magenta-light: #f0559a;
  --bg-page: #F8F7FC;
  --bg-overlay: rgba(100, 60, 150, 0.12);
  --white: #ffffff;
  --text-dark: #374151;
  --text-mid: #6B7280;
  --text-light: #9CA3AF;
  --border: #E5E7EB;
  --border-light: #F3F4F6;
  --card-shadow: 0 8px 32px rgba(79, 45, 166, 0.10);
  --input-bg: #F7F4FF;
  --input-border: #E3DDF7;
  --input-focus: #6B2FB8;
  --success: #27ae60;
  --error: #e74c3c;
  --warning: #f39c12;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --font-en: 'Poppins', sans-serif;
  --font-ur: 'Noto Sans Arabic', sans-serif;
  --transition: all 0.3s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-en);
  background: var(--bg-page);
  color: var(--text-dark);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%236b2fb8' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(135deg, #ede6f5 0%, #f5f0fa 30%, #faf8fd 60%, #f0e8f8 100%);
  z-index: -1;
}

/* ===== HEADER / NAV ===== */
.top-header {
  background: var(--white);
  border-bottom: 3px solid var(--purple-deep);
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.top-header.hidden {
  display: none;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-brand-link {
  text-decoration: none;
  display: flex;
  gap: 10px;
  align-items: center;
}

.govt-logo {
  width: 44px;
  height: 44px;
  background: var(--purple-deep);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 11px;
  line-height: 1.1;
  text-align: center;
}

.header-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-user {
  color: var(--text-mid);
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
}

.header-logout-form {
  margin: 0;
}

.btn-track-header {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 18px;
  background: var(--white);
  border: 2px solid var(--purple-deep);
  border-radius: 24px;
  color: var(--purple-deep);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-en);
}

.btn-track-header .ur {
  font-family: var(--font-ur);
  font-size: 13px;
}

.btn-track-header:hover {
  background: var(--purple-deep);
  color: var(--white);
}

.btn-login-header, .btn-register-header {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid var(--purple-deep);
  font-family: var(--font-en);
}

.btn-login-header {
  background: var(--white);
  color: var(--purple-deep);
}
.btn-login-header:hover {
  background: var(--purple-deep);
  color: var(--white);
}

.btn-register-header {
  background: var(--magenta);
  color: var(--white);
  border-color: var(--magenta);
}
.btn-register-header:hover {
  background: var(--magenta-light);
  border-color: var(--magenta-light);
}

.btn-login-header .ur, .btn-register-header .ur {
  font-family: var(--font-ur);
  margin-left: 4px;
}

/* ===== SCREEN MANAGEMENT ===== */
.screen { display: none; }
.screen.active { display: block; }

/* ===== FOOTER ===== */
.main-footer {
  background: var(--white);
  border-top: 2px solid var(--border);
  padding: 16px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 48px;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-light);
}

.footer-logo {
  width: 36px;
  height: 36px;
  background: var(--purple-deep);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 8px;
  font-weight: 700;
}

.footer-right {
  font-size: 12px;
  color: var(--text-light);
}

/* ===== CARD CONTAINER ===== */
.card-container {
  max-width: 560px;
  margin: 40px auto;
  padding: 0 20px;
}

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

/* ===== CARD HEADER (PURPLE) ===== */
.card-header {
  background: var(--purple-header);
  padding: 24px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-header-text h2 {
  font-family: var(--font-ur);
  color: #FFFFFF;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.6;
}

.card-header-text p {
  color: #C5A340;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Poppins', sans-serif;
  letter-spacing: 0.2px;
}

.card-header-logos {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 9px;
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
  border: 2px solid rgba(255,255,255,0.3);
}

.logo-rehmat {
  font-family: var(--font-ur);
  font-size: 11px;
}

/* ===== CARD BODY ===== */
.card-body {
  padding: 28px;
}

/* ===== TABS ===== */
.tabs {
  display: flex;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--border-light);
  margin-bottom: 24px;
}

.tab {
  flex: 1;
  padding: 12px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  background: transparent;
  font-family: var(--font-en);
  color: var(--text-mid);
}

.tab .ur {
  font-family: var(--font-ur);
  display: block;
  font-size: 14px;
}

.tab.active {
  background: var(--white);
  color: var(--purple-deep);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border-radius: var(--radius);
}

/* ===== SECTION TITLE ===== */
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 20px;
}

.section-title h3 {
  font-size: 20px;
  font-weight: 600;
  color: #4F2DA6;
}

.section-title .ur-title {
  font-family: var(--font-ur);
  font-size: 22px;
  color: var(--text-dark);
  font-weight: 600;
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 28px;
  align-items: center;
}

.progress-segment {
  flex: 1;
  height: 5px;
  border-radius: 3px;
  background: #e0d8ea;
  transition: var(--transition);
}

.progress-segment.active {
  background: var(--magenta);
}

.progress-segment.completed {
  background: var(--magenta);
}

.progress-step-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-mid);
  margin-left: 8px;
  white-space: nowrap;
}

/* ===== FORM ELEMENTS ===== */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: flex;
  align-items: baseline;
  gap: 0;
  margin-bottom: 6px;
}

.form-label .en {
  font-size: 13px;
  font-weight: 500;
  color: #6B7280;
}

.form-label .ur {
  font-family: var(--font-ur);
  font-size: 14px;
  color: #6B7280;
  font-weight: 500;
}

.form-row {
  display: flex;
  gap: 14px;
}

.form-row .form-group {
  flex: 1;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-light);
  font-size: 16px;
  z-index: 1;
}

.input-icon-right {
  position: absolute;
  right: 14px;
  color: var(--text-light);
  font-size: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  min-height: 20px;
}

.input-icon-right i {
  pointer-events: none;
}

input[type="text"],
input[type="password"],
input[type="date"],
input[type="tel"],
select {
  width: 100%;
  padding: 14px 14px 14px 42px;
  border: 1.5px solid #E3DDF7;
  border-radius: var(--radius);
  font-size: 14px;
  font-family: var(--font-en);
  color: #374151;
  background: #F7F4FF;
  transition: var(--transition);
  outline: none;
}

input::placeholder {
  color: #9CA3AF;
  font-weight: 400;
}

input:focus, select:focus {
  border-color: #6B2FB8;
  box-shadow: 0 0 0 3px rgba(107, 47, 184, 0.1);
}

select {
  appearance: none;
  cursor: pointer;
  padding-right: 40px;
}

.select-wrapper {
  position: relative;
}

.select-wrapper::after {
  content: '▾';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  pointer-events: none;
  font-size: 14px;
}

.placeholder-text {
  color: var(--text-light);
}

/* ===== CHECKBOX ===== */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 16px 0;
  padding: 14px;
  background: var(--input-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--purple-mid);
  margin-top: 2px;
  flex-shrink: 0;
}

.checkbox-group label {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-mid);
}

.checkbox-group label .ur {
  font-family: var(--font-ur);
  display: block;
  direction: rtl;
  text-align: right;
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-dark);
}

/* ===== BUTTONS ===== */
.btn-primary {
  width: 100%;
  padding: 16px;
  background: var(--gold-btn);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-en);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary .ur {
  font-family: var(--font-ur);
  font-size: 14px;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #d4b44f 0%, #e0c65e 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(197, 163, 64, 0.35);
}

.btn-secondary {
  width: 100%;
  padding: 16px;
  background: #cfeecf;
  color: #1f5f2a;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-en);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-secondary .ur {
  font-family: var(--font-ur);
  font-size: 14px;
}

.btn-secondary:hover {
  background: #b7e6b7;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(88, 160, 88, 0.28);
}

.action-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.action-row .btn-primary,
.action-row .btn-secondary {
  width: 100%;
}

.btn-purple {
  background: var(--purple-header);
  color: var(--white);
}

.btn-purple:hover {
  box-shadow: 0 4px 16px rgba(58, 16, 120, 0.35);
}

/* ===== INFO BOX ===== */
.info-box {
  background: #fff8e6;
  border: 1px solid #f0d060;
  border-radius: var(--radius);
  padding: 14px;
  margin: 16px 0;
}

.info-box p {
  font-size: 12px;
  color: #b8860b;
  line-height: 1.5;
}

.info-box .ur {
  font-family: var(--font-ur);
  direction: rtl;
  text-align: right;
  display: block;
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.8;
}

.info-box.error {
  background: #ffeef0;
  border-color: #f0a0a0;
}

.info-box.error p {
  color: var(--error);
}

/* ===== HELP FOOTER ===== */
.help-footer {
  text-align: center;
  padding: 20px 0 8px;
}

.help-footer p {
  font-size: 12px;
  color: #9CA3AF;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.help-footer .phone {
  color: var(--purple-deep);
  font-weight: 700;
  font-size: 16px;
}

.help-footer .ur {
  font-family: var(--font-ur);
  font-size: 12px;
}

/* ===== COPYRIGHT ===== */
.copyright {
  text-align: center;
  padding: 16px 0 4px;
  font-size: 12px;
  color: var(--text-light);
}

.copyright .ur {
  font-family: var(--font-ur);
  direction: rtl;
  display: block;
  margin-top: 2px;
  font-size: 12px;
}

/* ===== FORGOT PASSWORD ===== */
.forgot-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 8px 0 20px;
}

.forgot-row label {
  font-size: 13px;
  color: var(--text-mid);
  display: flex;
  align-items: center;
  gap: 6px;
}

.forgot-row label .ur {
  font-family: var(--font-ur);
}

.forgot-row a {
  font-size: 13px;
  color: var(--purple-mid);
  text-decoration: none;
  font-weight: 500;
}

.forgot-row a:hover {
  text-decoration: underline;
}

.login-subtitle {
  text-align: center;
  font-family: var(--font-ur);
  font-size: 15px;
  color: var(--text-mid);
  margin-bottom: 24px;
  direction: rtl;
}

/* ===== ADD CHILD CARD ===== */
.add-child-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  background: var(--input-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 20px;
  cursor: pointer;
  transition: var(--transition);
}

.add-child-card:hover {
  border-color: var(--purple-light);
  background: #f5f0fc;
}

.add-child-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #e8e0f0 0%, #d8d0e8 100%);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--purple-mid);
}

.add-child-text h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
}

.add-child-text p {
  font-family: var(--font-ur);
  font-size: 13px;
  color: var(--text-light);
  direction: rtl;
}

.add-child-btn {
  margin-left: auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--magenta);
  color: white;
  border: none;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.add-child-btn:hover {
  background: var(--magenta-light);
  transform: scale(1.1);
}

/* ===== CHILD LIST ===== */
.child-list-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.child-list-label span {
  font-size: 14px;
  font-weight: 500;
  color: var(--purple-mid);
}

.child-list-label .ur {
  font-family: var(--font-ur);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
}

.child-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--input-bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  transition: var(--transition);
}

.child-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(212, 51, 122, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--magenta);
  font-size: 16px;
}

.child-name {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
}

.child-actions {
  display: flex;
  gap: 6px;
}

.child-action-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-light);
  transition: var(--transition);
}

.child-action-btn:hover {
  border-color: var(--magenta);
  color: var(--magenta);
}

.child-action-btn.delete:hover {
  border-color: var(--error);
  color: var(--error);
}

/* ===== SUMMARY SCREEN ===== */
.app-id-banner {
  background: var(--gold);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.app-id-banner .label {
  font-size: 13px;
  color: rgba(26,26,46,0.7);
}

.app-id-banner .label .ur {
  font-family: var(--font-ur);
  display: block;
  font-size: 13px;
}

.app-id-banner .value {
  font-size: 18px;
  font-weight: 700;
  color: var(--purple-deep);
}

.summary-section {
  background: #F3F6FB;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 24px;
}

.summary-section-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 8px;
  border-bottom: 2px solid #E5EAF2;
  margin-bottom: 0;
}

.summary-section-title h4 {
  font-size: 16px;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
}

.summary-section-title .ur {
  font-family: var(--font-ur);
  font-size: 18px;
  font-weight: 700;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 16px 0;
  border-bottom: 1px solid #E5EAF2;
}

.summary-row:last-child {
  border-bottom: none;
}

.summary-row .field-label {
  font-size: 13px;
  font-weight: 500;
  color: #6B7280;
  font-family: 'Poppins', sans-serif;
}

.summary-row .field-label .ur {
  font-family: var(--font-ur);
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #6B7280;
  direction: rtl;
  text-align: right;
}

.summary-row .field-value {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
  font-family: 'Poppins', sans-serif;
  text-align: left;
}

.orphan-summary-item {
  background: #FFFFFF;
  border: 1px solid #E5EAF2;
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
}

.orphan-summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.orphan-summary-header .name-label {
  font-size: 13px;
  font-weight: 500;
  color: #6B7280;
}

.orphan-summary-header .name-label .ur {
  font-family: var(--font-ur);
  font-weight: 500;
  color: #6B7280;
}

.orphan-summary-header .name-value {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
}

.orphan-summary-header .toggle {
  font-size: 16px;
  color: var(--text-light);
  cursor: pointer;
}

.orphan-detail-rows {
  margin-top: 12px;
  display: none;
}

.orphan-detail-rows.open {
  display: block;
}

/* ===== DECLARATION ===== */
.declaration-box {
  background: #F3F6FB;
  border: none;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.declaration-box .ur-text {
  font-family: var(--font-ur);
  direction: rtl;
  text-align: right;
  font-size: 14px;
  line-height: 1.8;
  color: #374151;
  padding-bottom: 16px;
}

.declaration-box .en-text {
  font-size: 14px;
  font-family: 'Poppins', sans-serif;
  line-height: 1.7;
  color: #374151;
  border-top: 1px solid #E5EAF2;
  padding-top: 16px;
}

.declaration-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 16px 0;
}

.declaration-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--purple-mid);
  margin-top: 2px;
  flex-shrink: 0;
}

.declaration-checkbox label {
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.5;
}

.declaration-checkbox .ur {
  font-family: var(--font-ur);
  direction: rtl;
  display: block;
  margin-top: 4px;
  font-size: 14px;
}

/* ===== TRACK STATUS ===== */
.track-input-group {
  margin-bottom: 16px;
}

.track-input-group label {
  font-size: 14px;
  font-weight: 500;
  display: block;
  margin-bottom: 6px;
}

.track-input-group input {
  padding-left: 14px;
}

.track-hint {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 4px;
}

.btn-track {
  width: 100%;
  padding: 14px;
  background: var(--purple-header);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-en);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}

.btn-track .ur {
  font-family: var(--font-ur);
}

.btn-track:hover {
  box-shadow: 0 4px 16px rgba(58, 16, 120, 0.3);
}

/* ===== TIMELINE ===== */
.timeline {
  position: relative;
  padding: 20px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.timeline-step {
  display: flex;
  gap: 16px;
  padding-bottom: 28px;
  position: relative;
}

.timeline-step:last-child {
  padding-bottom: 0;
}

.timeline-line {
  position: absolute;
  left: 17px;
  top: 36px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-step:last-child .timeline-line {
  display: none;
}

.timeline-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  z-index: 1;
}

.timeline-dot.completed {
  background: var(--success);
  color: white;
}

.timeline-dot.pending {
  background: var(--border);
  color: var(--text-light);
}

.timeline-content {
  flex: 1;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}

.timeline-header h5 {
  font-size: 14px;
  font-weight: 600;
}

.timeline-header .ur {
  font-family: var(--font-ur);
  font-size: 15px;
  font-weight: 700;
}

.timeline-date {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 8px;
}

.timeline-date .ur {
  font-family: var(--font-ur);
}

.timeline-date .value {
  font-weight: 600;
  color: var(--text-dark);
}

.timeline-message {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-top: 8px;
}

.timeline-message p {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-mid);
}

.timeline-message .ur {
  font-family: var(--font-ur);
  direction: rtl;
  text-align: right;
  display: block;
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.8;
}

.visit-office {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-mid);
}

.visit-office a {
  color: var(--purple-mid);
  text-decoration: none;
  font-weight: 600;
}

.visit-office .ur {
  font-family: var(--font-ur);
  display: block;
  text-align: center;
  font-size: 13px;
  margin-top: 2px;
  color: var(--text-light);
}

/* ===== LANDING PAGE ===== */
.landing-hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px;
}

.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
}

.hero-logos {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-logo-item {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--purple-deep);
  text-align: center;
  line-height: 1.2;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.hero-main-title {
  font-family: var(--font-ur);
  font-size: 36px;
  font-weight: 700;
  color: var(--purple-deep);
  direction: rtl;
  text-align: right;
  margin-bottom: 8px;
  line-height: 1.6;
}

.hero-section-divider {
  width: 6px;
  height: 36px;
  background: var(--gold);
  border-radius: 3px;
  display: inline-block;
  vertical-align: middle;
  margin-left: 10px;
}

/* ===== AMOUNT CARDS ===== */
.amount-cards {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
}

.amount-card {
  flex: 1;
  padding: 20px;
  border-radius: var(--radius);
  text-align: center;
  color: var(--white);
  cursor: default;
}

.amount-card:nth-child(1) {
  background: var(--purple-deep);
}
.amount-card:nth-child(2) {
  background: var(--purple-mid);
}
.amount-card:nth-child(3) {
  background: var(--purple-light);
}

.amount-card .card-label {
  font-family: var(--font-ur);
  font-size: 14px;
  margin-bottom: 6px;
  direction: rtl;
  opacity: 0.9;
}

.amount-card .card-amount {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 2px;
}

.amount-card .card-unit {
  font-family: var(--font-ur);
  font-size: 14px;
  opacity: 0.8;
}

.payment-bar {
  background: var(--purple-deep);
  color: var(--white);
  border-radius: var(--radius);
  padding: 14px 20px;
  text-align: center;
  margin-bottom: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.payment-bar .ur {
  font-family: var(--font-ur);
  font-size: 14px;
  direction: rtl;
}

/* ===== ELIGIBILITY ===== */
.section-heading {
  font-family: var(--font-ur);
  font-size: 26px;
  font-weight: 700;
  color: var(--purple-deep);
  direction: rtl;
  text-align: right;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.section-heading .bar {
  width: 5px;
  height: 28px;
  background: var(--gold);
  border-radius: 3px;
}

.criteria-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 36px;
}

.criteria-card {
  padding: 14px 18px;
  border-radius: var(--radius);
  font-family: var(--font-ur);
  font-size: 14px;
  direction: rtl;
  text-align: right;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

.criteria-card:nth-child(1) { background: #e8f5e9; color: #2e7d32; }
.criteria-card:nth-child(2) { background: #e3f2fd; color: #1565c0; }
.criteria-card:nth-child(3) { background: #fff3e0; color: #e65100; }
.criteria-card:nth-child(4) { background: #fce4ec; color: #c62828; }

.criteria-icon {
  font-size: 18px;
}

/* ===== DOCUMENTS ===== */
.docs-list {
  margin-bottom: 36px;
}

.doc-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
  direction: rtl;
}

.doc-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--text-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.doc-text {
  font-family: var(--font-ur);
  font-size: 14px;
  color: var(--text-dark);
}

/* ===== LANDING CTA BUTTONS ===== */
.landing-cta {
  display: flex;
  gap: 14px;
  margin: 32px 0;
  flex-wrap: wrap;
}

.landing-cta .btn-cta {
  flex: 1;
  min-width: 200px;
  padding: 16px 24px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-family: var(--font-en);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-cta .ur {
  font-family: var(--font-ur);
  font-size: 15px;
}

.btn-apply {
  background: var(--gold-btn);
  color: var(--text-dark);
}
.btn-apply:hover {
  background: linear-gradient(135deg, #d4b44f 0%, #e0c65e 100%);
  box-shadow: 0 4px 16px rgba(197, 163, 64, 0.35);
}

.btn-track-cta {
  background: var(--purple-header);
  color: var(--white);
}
.btn-track-cta:hover {
  box-shadow: 0 4px 16px rgba(58, 16, 120, 0.35);
}

/* ===== HELPLINE ===== */
.helpline-box {
  background: var(--white);
  border: 2px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.helpline-icon {
  font-size: 28px;
  color: var(--gold);
}

.helpline-text {
  text-align: center;
}

.helpline-label {
  font-family: var(--font-ur);
  font-size: 14px;
  color: var(--text-mid);
}

.helpline-number {
  font-size: 28px;
  font-weight: 800;
  color: var(--purple-deep);
}

/* ===== LANDING LAYOUT ===== */
.landing-content {
  display: flex;
  gap: 40px;
}

.landing-left {
  flex: 1;
}

.landing-right {
  width: 380px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.card-preview {
  width: 300px;
  height: 190px;
  background: linear-gradient(135deg, var(--magenta), var(--purple-deep));
  border-radius: 16px;
  padding: 20px;
  color: white;
  position: relative;
  box-shadow: 0 8px 32px rgba(212, 51, 122, 0.3);
  transform: rotate(-3deg);
}

.card-preview-title {
  font-family: var(--font-ur);
  font-size: 18px;
  font-weight: 700;
}

.card-preview-subtitle {
  font-size: 11px;
  opacity: 0.8;
  margin-top: 2px;
}

.card-preview-chip {
  width: 40px;
  height: 30px;
  background: var(--gold);
  border-radius: 6px;
  margin-top: 20px;
}

.card-preview-number {
  margin-top: 14px;
  font-size: 14px;
  letter-spacing: 3px;
  font-weight: 300;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .top-header {
    height: auto;
    min-height: 64px;
    padding: 10px 14px;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
  }
  .header-left,
  .header-right {
    width: 100%;
  }
  .header-brand-link {
    width: 100%;
    align-items: center !important;
  }
  .header-logo {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
  }
  .header-title {
    font-size: 13px;
    line-height: 1.35;
  }
  .header-right {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
  }
  .header-right .btn-track-header,
  .header-right .btn-login-header,
  .header-right .btn-register-header {
    flex: 0 1 auto;
    max-width: 100%;
  }
  .header-user {
    width: 100%;
    white-space: normal !important;
    font-size: 12px !important;
    line-height: 1.35;
  }
  .btn-track-header,
  .btn-login-header,
  .btn-register-header {
    min-height: 36px;
    padding: 7px 12px;
    font-size: 12px;
  }
  .landing-content {
    flex-direction: column;
  }
  .landing-right {
    width: 100%;
  }
  .amount-cards {
    flex-direction: column;
  }
  .criteria-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .top-header {
    padding: 10px 10px;
  }
  .header-title {
    font-size: 12px;
    line-height: 1.3;
  }
  .header-brand-link {
    gap: 8px !important;
  }
  .header-logo {
    width: 36px;
    height: 36px;
  }
  .header-right {
    gap: 6px;
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }
  .btn-track-header,
  .btn-login-header,
  .btn-register-header {
    width: 100%;
    justify-content: center;
    text-align: center;
    min-height: 40px;
    padding: 9px 12px;
  }
  .header-right form {
    width: 100%;
  }
  .header-right form .btn-login-header {
    width: 100%;
  }
  .card-container {
    padding: 0 10px;
    margin: 20px auto;
  }
  .card-body {
    padding: 20px;
  }
  .form-row {
    flex-direction: column;
    gap: 0;
  }
  .landing-cta {
    flex-direction: column;
  }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.screen.active {
  animation: fadeIn 0.3s ease;
}

/* ===== ORPHAN FORM MODAL ===== */
.orphan-form-overlay {
  display: none;
}

.orphan-form-overlay.active {
  display: block;
}

.login-wrapper {
  min-height: calc(100vh - 80px);
}

.login-wrapper {
  background-image: url("img/main_bg.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.auth-card {
  max-width: 512px;
  width: 100%;
  border-radius: 16px;
  background-color: #fff;
}

.auth-header {
  background-color: var(--dark-purple);
  border-radius: 16px 16px 0 0;
}

.auth-title {
  font-weight: 500;
  font-size: 20px;
  line-height: 140%;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1.5;
  font-family: 'Noto Nastaliq Urdu', serif;
}

.auth-subtitle {
  font-weight: 400;
  font-size: 14px;
  line-height: 143%;
  letter-spacing: -0.01em;
  color: rgba(212, 175, 55, 0.9) !important;
}

#authTabs button {
  font-size: 14px;
  transition: 0.2s;
  background: transparent;
  border: 0px solid rgba(255, 255, 255, 0.05);
}

.auth-tab-active {
  background-color: var(--yellow);
  font-size: 14px;
  cursor: pointer;
  transition: 0.2s;
}

.auth-tab-inactive {
  background-color: rgba(255, 255, 255, 0.1);
  font-size: 14px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: 0.2s;
}

.auth-body {
  border-radius: 0 0 16px 16px;
}

.auth-label-ur {
  color: #6b21a8;
  font-weight: 700;
  font-size: 11px;
}