/* ============================================================
   IGEC — International Group for Educational Consultancy
   التنسيق العام للموقع (RTL)
   ============================================================ */
:root {
  --orange: #f7941d;
  --orange-dark: #e07f0a;
  --orange-soft: #fff4e5;
  --ink: #1d1f24;
  --text: #2b2d33;
  --muted: #797e8a;
  --line: #e6e7ee;
  --bg: #f6f7fb;
  --card: #ffffff;
  --green: #1e8e5a;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(20, 22, 40, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: "Cairo", "Segoe UI", Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
}

img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 1.2rem; }
.muted { color: var(--muted); }

/* ---------- الترويسة ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
}
.brand { display: flex; align-items: center; gap: 0.6rem; }
.brand .cap { width: 36px; height: 36px; fill: var(--ink); flex-shrink: 0; }
.brand-text .igec {
  font-weight: 900;
  color: var(--orange);
  font-size: 1.45rem;
  letter-spacing: 0.5px;
  line-height: 1.1;
  display: block;
}
.brand-text small {
  display: block;
  color: #555a66;
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1.3;
}
.header-actions { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }

.admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #555a66;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  transition: 0.15s;
  background: #fff;
  cursor: pointer;
}
.admin-btn svg { width: 14px; height: 14px; fill: currentColor; }
.admin-btn:hover { border-color: var(--orange); color: var(--orange-dark); }

.back-link {
  font-size: 0.85rem;
  font-weight: 700;
  color: #555a66;
  transition: 0.15s;
}
.back-link:hover { color: var(--orange-dark); }

/* ---------- الأزرار ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font: inherit;
  font-weight: 800;
  border: none;
  border-radius: 12px;
  padding: 0.75rem 1.6rem;
  cursor: pointer;
  transition: 0.16s;
}
.btn svg { width: 17px; height: 17px; fill: currentColor; }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-dark); transform: translateY(-1px); }
.btn-ghost { background: #fff; color: var(--text); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--orange); color: var(--orange-dark); }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn.loading { position: relative; color: transparent; }
.btn.loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn-ghost.loading::after { border-color: rgba(0, 0, 0, 0.15); border-top-color: #666; }
@keyframes spin { to { transform: rotate(360deg); } }

.btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--orange);
  color: #fff;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  transition: 0.15s;
}
.btn-sm:hover { background: var(--orange-dark); }
.btn-sm.ghost { background: #fff; color: var(--text); border: 1.5px solid #d8dae2; }
.btn-sm.ghost:hover { border-color: var(--orange); color: var(--orange-dark); }
.btn-sm svg { width: 14px; height: 14px; fill: currentColor; }

/* ---------- الصفحة الرئيسية ---------- */
.hero {
  background:
    radial-gradient(900px 380px at 85% -60px, rgba(247, 148, 29, 0.16), transparent 60%),
    linear-gradient(165deg, #fff8ee, #ffffff 60%);
  padding: 3.6rem 1.2rem 3rem;
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.hero h1 {
  font-size: clamp(1.55rem, 4.2vw, 2.6rem);
  font-weight: 900;
  color: var(--ink);
  line-height: 1.4;
}
.hero h1 em { color: var(--orange); font-style: normal; }
.hero .en-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.3px;
  margin-top: 0.3rem;
}
.hero .sub { color: #5a5e6a; max-width: 660px; margin: 1rem auto 0; font-size: 1.02rem; }

.apply-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(265px, 1fr));
  gap: 1.2rem;
  max-width: 780px;
  margin: 2.4rem auto 0;
}
.apply-card {
  display: block;
  border-radius: 20px;
  padding: 2rem 1.5rem 1.8rem;
  text-align: center;
  transition: 0.18s;
  box-shadow: var(--shadow);
}
.apply-card.masters { background: linear-gradient(160deg, #ffa63a, var(--orange)); color: #fff; }
.apply-card.phd { background: linear-gradient(160deg, #2a2d35, var(--ink)); color: #fff; }
.apply-card:hover { transform: translateY(-5px); box-shadow: 0 18px 40px rgba(20, 22, 40, 0.2); }
.apply-card .icon {
  width: 74px;
  height: 74px;
  margin: 0 auto;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.16);
  display: grid;
  place-items: center;
}
.apply-card .icon svg { width: 40px; height: 40px; fill: #fff; }
.apply-card h2 { font-size: 1.5rem; font-weight: 900; margin: 0.9rem 0 0.2rem; }
.apply-card p { opacity: 0.88; font-size: 0.92rem; }
.apply-card .go {
  margin-top: 1.1rem;
  display: inline-block;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 0.45rem 1.4rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.9rem;
}

.sec-title { text-align: center; font-size: 1.45rem; font-weight: 900; color: var(--ink); }
.sec-title::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  border-radius: 4px;
  background: var(--orange);
  margin: 0.5rem auto 0;
}

.steps { padding: 3.2rem 1.2rem 0.5rem; }
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.1rem;
  margin-top: 1.8rem;
}
.step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.2rem;
  text-align: center;
}
.step .num {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--orange-soft);
  color: var(--orange-dark);
  font-weight: 900;
  font-size: 1.15rem;
}
.step h3 { margin: 0.7rem 0 0.25rem; font-size: 1.05rem; font-weight: 800; }
.step p { color: var(--muted); font-size: 0.9rem; }

.notes { padding: 2.2rem 1.2rem; }
.notes-card {
  background: #fffaf1;
  border: 1px solid #f3e2c5;
  border-radius: var(--radius);
  padding: 1.5rem 1.7rem;
}
.notes-card h2 { font-size: 1.1rem; font-weight: 900; color: #9a5b00; margin-bottom: 0.7rem; }
.notes-card ul { padding-inline-start: 1.2rem; }
.notes-card li { margin-bottom: 0.45rem; font-size: 0.94rem; color: #5d4a2a; }

.contact { background: var(--ink); color: #fff; padding: 2.8rem 0 2.4rem; margin-top: 2rem; }
.contact-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.contact h2 { font-size: 1.3rem; font-weight: 900; margin-bottom: 0.8rem; }
.contact h2 span { color: var(--orange); }
.contact .addr {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  max-width: 480px;
  color: #d5d7de;
  font-size: 0.95rem;
}
.contact svg { width: 18px; height: 18px; fill: var(--orange); flex-shrink: 0; margin-top: 0.3rem; }
.phones { display: flex; flex-direction: column; gap: 0.35rem; margin-top: 0.9rem; }
.phones a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
  font-weight: 700;
  direction: ltr;
  justify-content: flex-end;
  transition: 0.15s;
}
.phones a:hover { color: var(--orange); }
.phones svg { margin-top: 0; }
.contact .brand-big { text-align: center; }
.contact .brand-big svg { width: 64px; height: 64px; fill: #fff; }
.contact .brand-big .igec { font-size: 2.6rem; font-weight: 900; color: var(--orange); line-height: 1; display: block; }
.contact .brand-big small { color: #b9bcc7; font-size: 0.72rem; font-weight: 700; }

.site-footer { background: #15171b; color: #9a9ea9; padding: 1rem 0; font-size: 0.82rem; }
.foot-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.foot-admin { display: inline-flex; align-items: center; gap: 0.35rem; color: #c6c9d2; font-weight: 700; }
.foot-admin svg { width: 13px; height: 13px; fill: currentColor; }
.foot-admin:hover { color: var(--orange); }

/* ---------- صفحات الاستمارات ---------- */
.page-head { text-align: center; padding: 2.4rem 1.2rem 0.4rem; }
.page-head .tag {
  display: inline-block;
  background: var(--orange-soft);
  color: var(--orange-dark);
  font-weight: 800;
  font-size: 0.8rem;
  border-radius: 999px;
  padding: 0.25rem 1rem;
}
.page-head h1 { font-size: clamp(1.4rem, 3.5vw, 2rem); font-weight: 900; color: var(--ink); margin-top: 0.6rem; }
.page-head p { color: var(--muted); font-size: 0.95rem; max-width: 620px; margin: 0.4rem auto 0; }

.form-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  max-width: 860px;
  margin: 1.8rem auto 3rem;
  padding: 1.8rem clamp(1.1rem, 4vw, 2.4rem) 2.2rem;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.08rem;
  font-weight: 900;
  color: var(--ink);
  margin: 1.7rem 0 1rem;
}
.section-title:first-child { margin-top: 0.3rem; }
.section-title .num {
  background: var(--orange);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.section-note { color: var(--muted); font-size: 0.85rem; margin: -0.6rem 0 1rem; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 0.9rem 1.1rem; }

.field { display: block; margin-bottom: 0.9rem; }
.grid-2 .field { margin-bottom: 0; }
.field > span { display: block; font-weight: 700; font-size: 0.92rem; margin-bottom: 0.35rem; }
.req { color: var(--orange-dark); font-weight: 900; }
.opt { color: #9ba0ac; font-weight: 600; font-size: 0.78rem; }

input[type="text"], input[type="email"], input[type="tel"],
input[type="date"], input[type="password"], input[type="number"],
textarea, select {
  width: 100%;
  padding: 0.68rem 0.95rem;
  border: 1.5px solid #dfe1e9;
  border-radius: 11px;
  font: inherit;
  color: var(--text);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { resize: vertical; min-height: 110px; line-height: 1.8; }
input:focus, textarea:focus, select:focus {
  border-color: var(--orange);
  outline: none;
  box-shadow: 0 0 0 3px rgba(247, 148, 29, 0.16);
}

/* حقول رفع الملفات */
.file-field { margin-bottom: 1rem; }
.file-label { display: block; font-weight: 700; font-size: 0.92rem; margin-bottom: 0.4rem; }
.file-label small { display: block; color: #949aa7; font-weight: 600; font-size: 0.77rem; }
.file-box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  border: 1.6px dashed #ccd0db;
  border-radius: 12px;
  padding: 0.65rem 0.95rem;
  background: #fafbfd;
  min-height: 58px;
  transition: 0.15s;
}
.file-box:hover { border-color: var(--orange); background: #fffaf2; }
.file-box input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}
.file-box .clip { width: 20px; height: 20px; fill: #a8adba; flex-shrink: 0; }
.file-texts { flex: 1; min-width: 0; }
.file-cta { display: block; color: #868c99; font-size: 0.86rem; font-weight: 600; }
.file-name {
  display: block;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 9px;
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.file-clear {
  position: relative;
  z-index: 3;
  border: none;
  background: #feecec;
  color: #c0392b;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 900;
  cursor: pointer;
  flex-shrink: 0;
  line-height: 1;
}
.file-clear:hover { background: #fbd9d9; }
.file-field.has-file .file-box { border-style: solid; border-color: #79c9a4; background: #f4fbf8; }
.file-field.has-file .file-cta { display: none; }
.file-field.has-file .clip { fill: var(--green); }

.radio-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.radio-pill {
  position: relative;
  border: 1.6px solid #dfe1e9;
  border-radius: 999px;
  padding: 0.5rem 1.25rem;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
  color: #565b67;
  background: #fff;
  transition: 0.15s;
}
.radio-pill input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.radio-pill:has(input:checked) {
  border-color: var(--orange);
  background: var(--orange-soft);
  color: var(--orange-dark);
}

.submit-row { margin-top: 1.6rem; text-align: center; }
.submit-row .btn { font-size: 1.05rem; padding: 0.85rem 2rem; min-width: 260px; }
#statusLine { margin-top: 0.7rem; color: var(--orange-dark); font-weight: 700; font-size: 0.88rem; min-height: 1.4em; }

.form-hint {
  background: var(--orange-soft);
  border: 1px solid #f6dcb4;
  color: #8a5200;
  border-radius: 11px;
  padding: 0.65rem 1rem;
  font-size: 0.85rem;
  margin-bottom: 1.3rem;
}

/* شاشة النجاح */
.success-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  max-width: 560px;
  margin: 3rem auto;
  padding: 2.6rem 1.8rem;
  text-align: center;
}
.success-icon {
  width: 78px;
  height: 78px;
  margin: 0 auto 1.1rem;
  border-radius: 50%;
  background: #e9f9f1;
  display: grid;
  place-items: center;
}
.success-icon svg { width: 40px; height: 40px; fill: var(--green); }
.success-card h2 { font-size: 1.5rem; font-weight: 900; color: var(--ink); }
.success-card .ref {
  display: inline-block;
  background: var(--orange-soft);
  color: var(--orange-dark);
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: 1px;
  border-radius: 10px;
  padding: 0.35rem 1.2rem;
  margin: 0.7rem 0;
  direction: ltr;
}
.success-actions { display: flex; gap: 0.7rem; justify-content: center; margin-top: 1.5rem; flex-wrap: wrap; }

/* ---------- لوحة التحكم ---------- */
.login-wrap { min-height: calc(100vh - 140px); display: grid; place-items: center; padding: 2.5rem 1.2rem; }
.login-card {
  background: var(--card);
  width: 100%;
  max-width: 430px;
  border-radius: 20px;
  padding: 2.3rem 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  text-align: center;
}
.login-card .cap { width: 46px; height: 46px; fill: var(--ink); }
.login-card .igec { font-size: 1.9rem; font-weight: 900; color: var(--orange); line-height: 1.2; }
.login-card h1 { font-size: 1.25rem; font-weight: 900; color: var(--ink); margin-top: 0.4rem; }
.login-card .muted { font-size: 0.84rem; margin: 0.4rem 0 1.4rem; }
.login-card form { text-align: right; }
.login-card .btn { margin-top: 0.5rem; }

.dash-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1.8rem 0 0.4rem;
}
.dash-toolbar h1 { font-size: 1.45rem; font-weight: 900; color: var(--ink); }
.user-box { display: inline-flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.user-email {
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #555a66;
  direction: ltr;
}

.retention-note {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  background: #fff8e6;
  border: 1px solid #f3dfae;
  color: #8a5b00;
  border-radius: 12px;
  padding: 0.7rem 1rem;
  margin: 0.5rem 0 0.2rem;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.7;
}
.retention-note svg { width: 18px; height: 18px; fill: #d99a00; flex-shrink: 0; margin-top: 0.25rem; }

.tabs { display: flex; gap: 0.7rem; margin: 1.2rem 0 1.4rem; flex-wrap: wrap; }
.tab {
  flex: 1;
  min-width: 200px;
  max-width: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1rem;
  border-radius: 13px;
  border: 1.6px solid var(--line);
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  color: #565b67;
  transition: 0.15s;
}
.tab svg { width: 18px; height: 18px; fill: currentColor; }
.tab .count { background: #f0f1f6; border-radius: 999px; padding: 0.02rem 0.6rem; font-size: 0.8rem; }
.tab:hover { border-color: #f2c184; }
.tab.active { border-color: var(--orange); background: var(--orange-soft); color: var(--orange-dark); }
.tab.active .count { background: var(--orange); color: #fff; }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
  gap: 1rem;
  padding-bottom: 3rem;
}
.app-card {
  background: var(--card);
  border: 1px solid #ececf2;
  border-radius: 15px;
  padding: 1.05rem 1.15rem;
  cursor: pointer;
  transition: 0.16s;
}
.app-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(20, 22, 40, 0.1);
  border-color: var(--orange);
}
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; }
.app-card h3 { font-size: 1.02rem; font-weight: 800; color: var(--ink); line-height: 1.4; }
.app-card .ref {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--orange-dark);
  background: var(--orange-soft);
  border-radius: 7px;
  padding: 0.12rem 0.5rem;
  direction: ltr;
  white-space: nowrap;
}
.app-card .meta {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.8rem;
  padding-top: 0.7rem;
  border-top: 1px dashed var(--line);
}
.card-foot .badge {
  background: #eef7f2;
  color: var(--green);
  border-radius: 999px;
  padding: 0.1rem 0.65rem;
  font-size: 0.74rem;
  font-weight: 800;
}
.card-foot time { color: #a2a6b1; font-size: 0.72rem; }

.empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  background: #fff;
  border: 1.6px dashed #d5d8e2;
  border-radius: 15px;
  padding: 3rem 1rem;
  font-weight: 700;
}

/* ---------- النافذة المنبثقة ---------- */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 16, 22, 0.58);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 4vh 1rem;
  z-index: 50;
  overflow-y: auto;
}
.modal.open { display: flex; }
.modal-box {
  background: #fff;
  border-radius: 18px;
  max-width: 880px;
  width: 100%;
  padding: 1.5rem clamp(1rem, 3vw, 1.9rem) 1.9rem;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.9rem;
  margin-bottom: 1.1rem;
}
.modal-head h2 { font-size: 1.3rem; font-weight: 900; color: var(--ink); line-height: 1.4; }
.modal-sub { color: var(--muted); font-size: 0.83rem; margin-top: 0.15rem; }
.modal-actions { display: flex; gap: 0.45rem; flex-shrink: 0; }
.icon-btn {
  border: 1.5px solid var(--line);
  background: #fff;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: 0.15s;
}
.icon-btn svg { width: 17px; height: 17px; fill: #565b67; }
.icon-btn:hover { border-color: var(--orange); }
.icon-btn:hover svg { fill: var(--orange-dark); }

.modal-sec-title {
  font-size: 0.98rem;
  font-weight: 900;
  color: var(--orange-dark);
  margin: 1.3rem 0 0.7rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.modal-sec-title::before { content: ""; width: 9px; height: 9px; border-radius: 3px; background: var(--orange); }

.kv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 0.6rem; }
.kv-item { background: #f7f8fb; border-radius: 11px; padding: 0.55rem 0.85rem; }
.kv-item span { display: block; font-size: 0.73rem; color: #8a8f9c; font-weight: 700; }
.kv-item strong { font-size: 0.95rem; color: var(--ink); word-break: break-word; }

.textdoc {
  background: #fffaf3;
  border: 1px solid #f3e3c9;
  border-inline-start: 4px solid var(--orange);
  border-radius: 11px;
  padding: 0.8rem 1rem;
  margin-bottom: 0.7rem;
}
.textdoc h4 { margin: 0 0 0.3rem; font-size: 0.88rem; color: #9a5b00; }
.textdoc p { white-space: pre-wrap; margin: 0; font-size: 0.94rem; line-height: 1.9; word-break: break-word; }

.doc-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.15rem;
  border-bottom: 1px dashed #ececf2;
  flex-wrap: wrap;
}
.doc-row:last-child { border-bottom: none; }
.doc-row.missing { opacity: 0.55; }
.doc-check {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: #e9f9f1;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.doc-check svg { width: 14px; height: 14px; fill: var(--green); }
.doc-row.missing .doc-check { background: #f1f2f6; }
.doc-label { font-weight: 700; font-size: 0.9rem; flex: 1; min-width: 150px; }
.doc-actions { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; }
.doc-actions .muted { font-size: 0.8rem; }
.doc-thumb {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 9px;
  border: 1px solid var(--line);
  display: block;
  transition: 0.15s;
}
.doc-thumb:hover { transform: scale(1.08); border-color: var(--orange); }

/* ---------- تنبيهات ---------- */
.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: #23252b;
  color: #fff;
  padding: 0.72rem 1.3rem;
  border-radius: 11px;
  z-index: 99;
  opacity: 0;
  transition: 0.25s;
  pointer-events: none;
  font-size: 0.92rem;
  font-weight: 700;
  max-width: min(560px, 92vw);
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: #c0392b; }
.toast.success { background: var(--green); }

/* ---------- الطباعة (حفظ بيانات المتقدم) ---------- */
@media print {
  body.modal-open > *:not(.modal) { display: none !important; }
  .modal { position: static; background: none; padding: 0; display: block; overflow: visible; }
  .modal-box { box-shadow: none; max-width: 100%; border-radius: 0; padding: 0; }
  .no-print { display: none !important; }
  .doc-thumb { display: none; }
  body { background: #fff; }
}

@media (max-width: 560px) {
  .contact-grid { justify-content: center; text-align: center; }
  .contact .addr { text-align: right; }
  .modal { padding: 2vh 0.5rem; }
}
