/* ── Medical portal shell — shared with index.html & reference ── */
*{box-sizing:border-box;margin:0;padding:0}
:root{
  --navy:#0e2133;--navy-mid:#1c3a55;--navy-light:#2a5278;
  --gold:#dba227;--gold-light:#e6b85c;--gold-pale:#fdf5e2;
  --text:#1a2e40;--text-mid:#4a6070;--text-soft:#7a8f9e;
  --bg:#f4f6f9;--card:#fff;--border:#d8e2ec;
  --danger:#b52626;--danger-bg:#fdeaea;--danger-border:#f09595;
  --success:#1a7a4a;--success-bg:#e8f7f0;--success-border:#7ecfaa;
  --warning:#8a5a00;--warning-bg:#fff8e8;--warning-border:#f0d080;
  --font:'Tajawal',Tahoma,sans-serif;
}
html{min-height:100%}
body{
  font-family:var(--font);
  color:var(--text);
  direction:rtl;
  overflow-x:hidden;
  min-height:100dvh;
  display:flex;
  flex-direction:column;
}
a{text-decoration:none;color:inherit}

/* Home / landing */
body.page-home{background:var(--bg)}

/* Auth + app pages — hero backdrop like reference */
body.page-auth,
body.page-app{
  min-height:100vh;
  background:#0a1b2b url('../img/hero.png') center/cover no-repeat fixed;
  position:relative;
}
body.page-auth::before,
body.page-app::before{
  content:'';position:fixed;inset:0;pointer-events:none;z-index:0;
  background:linear-gradient(105deg,rgba(8,20,32,.88) 0%,rgba(10,27,43,.78) 48%,rgba(14,33,51,.7) 100%);
}

/* ======= HEADER ======= */
.site-header{
  position:sticky;top:0;z-index:100;flex-shrink:0;
  background:linear-gradient(180deg,#081420 0%,#0a1b2b 55%,#0e2133 100%);
  backdrop-filter:blur(12px);
  border-bottom:3px solid var(--gold);
  box-shadow:0 6px 24px rgba(0,0,0,.4);
}
.header-inner{
  max-width:1100px;margin:0 auto;
  padding:0 2rem;
  display:flex;align-items:center;justify-content:center;
  height:112px;
  position:relative;
  gap:16px;
}
.header-inner.is-split{justify-content:space-between}
.header-inner::after{
  content:'';position:absolute;bottom:0;right:2rem;left:2rem;
  height:1px;background:linear-gradient(90deg,transparent,rgba(219,162,39,.35) 50%,transparent);
}
.header-brand{display:flex;align-items:center;gap:20px;min-width:0}
.header-logo-wrap{
  position:relative;flex-shrink:0;
  width:76px;height:76px;
  display:flex;align-items:center;justify-content:center;
}
.header-logo-wrap::before{
  content:'';position:absolute;inset:-6px;
  border-radius:50%;
  background:radial-gradient(circle,rgba(219,162,39,.22) 0%,transparent 72%);
}
.header-logo{
  position:relative;z-index:1;
  width:76px;height:76px;
  object-fit:contain;
  filter:drop-shadow(0 2px 6px rgba(0,0,0,.45));
}
.header-divider{
  width:2px;align-self:stretch;margin:14px 2px;
  background:linear-gradient(180deg,transparent,rgba(219,162,39,.55),transparent);
  flex-shrink:0;
}
.header-title-block{text-align:center}
.header-eyebrow{
  font-size:11.5px;font-weight:700;color:var(--gold-light);
  letter-spacing:1.2px;margin-bottom:6px;
}
.header-title{font-size:21px;font-weight:800;color:#fff;line-height:1.3;letter-spacing:.2px}
.header-sub,
.header-portal{
  display:inline-flex;align-items:center;gap:6px;
  font-size:12px;font-weight:700;color:#fff;
  background:rgba(219,162,39,.14);
  border:1px solid rgba(219,162,39,.4);
  padding:3px 12px;border-radius:99px;
  margin:9px auto 0;letter-spacing:.3px;
}
.header-sub.plain{
  display:block;background:none;border:none;padding:0;margin:4px 0 0;
  font-size:12.5px;font-weight:700;color:var(--gold-light);
}
.header-right{display:flex;align-items:center;gap:14px;flex-shrink:0}
.welcome-block{display:flex;flex-direction:column;align-items:flex-start;text-align:right}
.welcome-text{font-size:12px;color:rgba(255,255,255,.7)}
.welcome-name{font-size:14px;font-weight:800;color:var(--gold-light)}
.btn-logout,
.btn-header{
  font-family:var(--font);font-size:13px;font-weight:700;padding:7px 14px;border-radius:8px;
  border:1.5px solid rgba(219,162,39,.45);background:transparent;color:var(--gold-light);cursor:pointer;
  display:inline-flex;align-items:center;gap:6px;transition:background .15s,border-color .15s;
}
.btn-logout:hover,.btn-header:hover{background:rgba(219,162,39,.14);border-color:var(--gold)}
.btn-header.btn-open{border-color:rgba(255,255,255,.25);color:#fff}
.btn-logout svg,.btn-header svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* ======= FOOTER ======= */
.site-footer{
  flex-shrink:0;
  background:linear-gradient(180deg,#081420 0%,#0a1b2b 100%);
  border-top:3px solid var(--gold);
  position:relative;z-index:1;
}
.footer-inner{
  max-width:1100px;margin:0 auto;padding:40px 2rem 28px;
  display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:36px;align-items:start;
}
.footer-brand{display:flex;align-items:flex-start;gap:14px}
.footer-logo{
  width:52px;height:52px;object-fit:contain;flex-shrink:0;
  filter:drop-shadow(0 2px 6px rgba(0,0,0,.4));
}
.footer-eyebrow{font-size:11px;font-weight:700;color:var(--gold-light);margin-bottom:5px}
.footer-name{font-size:15px;color:#fff;font-weight:800;line-height:1.4;margin-bottom:6px}
.footer-note{font-size:12px;color:rgba(255,255,255,.5);line-height:1.7;max-width:280px}
.footer-col-title{
  font-size:12px;font-weight:800;color:var(--gold);
  margin-bottom:14px;padding-bottom:8px;
  border-bottom:1px solid rgba(219,162,39,.25);
}
.footer-links{display:flex;flex-direction:column;gap:10px}
.footer-link{font-size:13px;color:rgba(255,255,255,.65);transition:color .15s}
.footer-link:hover{color:var(--gold-light)}
.footer-meta{font-size:13px;color:rgba(255,255,255,.65);line-height:1.8}
.footer-bottom{border-top:1px solid rgba(255,255,255,.08);padding:16px 2rem}
.footer-bottom-inner{
  max-width:1100px;margin:0 auto;
  display:flex;align-items:center;justify-content:center;text-align:center;gap:12px;flex-wrap:wrap;
}
.footer-copy{font-size:11px;color:rgba(255,255,255,.35)}

/* ======= RESPONSIVE ======= */
/* ── صفحات تضمين الاستمارات الخارجية (service.html) ── */
body.page-embed{
  --embed-bar:56px;
  height:100dvh;
  max-height:100dvh;
  overflow:hidden;
  background:#eef1f5;
}
body.page-embed::before{display:none}
body.page-embed .embed-header{
  position:fixed;
  top:0;right:0;left:0;
  z-index:200;
  flex-shrink:0;
}
body.page-embed .embed-header-inner{
  height:var(--embed-bar);
  min-height:var(--embed-bar);
  max-height:var(--embed-bar);
  padding:0 1rem;
  justify-content:space-between;
}
body.page-embed .embed-header-inner::after{display:none}
body.page-embed .embed-header-brand{gap:10px}
body.page-embed .embed-header-logo-wrap,
body.page-embed .embed-header-logo{
  width:40px;
  height:40px;
}
body.page-embed .embed-header-logo-wrap::before{display:none}
body.page-embed .embed-header-text .header-title{
  font-size:15px;
  margin:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:min(52vw,420px);
}
body.page-embed .frame-wrap{
  position:fixed;
  top:var(--embed-bar);
  right:0;
  left:0;
  bottom:0;
  width:100%;
  z-index:1;
  background:#fff;
  display:block;
}
body.page-embed .service-frame{
  width:100%;
  height:100%;
  min-height:100%;
  border:0;
  display:block;
  background:#fff;
}

@media(max-width:768px){
  body.page-embed{--embed-bar:52px}
  body.page-embed .embed-header-text .header-title{font-size:13px;max-width:42vw}
  .header-inner{height:auto;min-height:96px;padding:14px 1.25rem}
  .header-inner.is-split{flex-wrap:wrap;justify-content:center;gap:10px}
  .header-brand{gap:12px}
  .header-logo-wrap,.header-logo{width:52px;height:52px}
  .header-divider{display:none}
  .header-eyebrow{font-size:10px}
  .header-title{font-size:16px}
  .header-sub,.header-portal{font-size:10.5px;padding:2px 10px;margin-top:6px}
  .footer-inner{grid-template-columns:1fr;text-align:center;gap:28px}
  .footer-brand{flex-direction:column;align-items:center}
  .footer-note{max-width:none}
  .footer-links{align-items:center}
  .welcome-block{display:none}
}
