/* المرحلة 13: صفحات التمريض - كحلي وذهبي، موبايل/تابلت أولًا */
:root{ --navy:#0b1a2b; --navy2:#16304a; --gold:#d6ad55; --gold2:#b98d31; --cream:#f6f1e6; --ink:#1d2b3a; --muted:#6b7686; --line:#ebe2cf; }
*{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; }
body{ margin:0; font-family:"Cairo","Segoe UI",Tahoma,Arial,sans-serif; background:var(--cream); color:var(--ink); min-height:100vh; display:flex; flex-direction:column; }
a{ color:var(--navy2); }
.nx-top{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:12px 18px; background:linear-gradient(135deg,var(--navy),var(--navy2)); color:#fff; border-bottom:3px solid var(--gold); position:sticky; top:0; z-index:20; }
.nx-brand{ display:flex; align-items:center; gap:10px; }
.nx-brand img{ width:42px; height:42px; object-fit:contain; background:#fff; border-radius:50%; padding:2px; }
.nx-brand b{ display:block; color:var(--gold); font-size:14px; letter-spacing:.5px; }
.nx-brand span{ color:#e9dcb8; font-size:12px; }
.nx-user{ display:flex; align-items:center; gap:10px; font-weight:700; font-size:14px; }
.nx-user form{ margin:0; }
.nx-out{ background:rgba(255,255,255,.1); color:#fff; border:1px solid rgba(255,255,255,.2); border-radius:999px; padding:7px 14px; font:inherit; font-weight:700; cursor:pointer; }
.nx-out:hover{ background:var(--gold); color:var(--navy); }
.nx-wrap{ width:100%; max-width:1180px; margin:0 auto; padding:18px 14px 30px; flex:1; }
.nx-foot{ text-align:center; color:var(--muted); font-size:12px; padding:14px; }
.nx-muted{ color:var(--muted); font-size:14px; margin:4px 0; }
.nx-pad{ padding:0 16px 14px; }
.nx-flash{ border-radius:14px; padding:12px 14px; margin:0 0 14px; font-weight:700; line-height:1.7; }
.nx-flash.success{ background:#e7f5ec; color:#1b6b39; border:1px solid #bfe3cb; }
.nx-flash.error{ background:#fdecec; color:#9d2323; border:1px solid #f3c4c4; }
.nx-flash.info{ background:#fbf5e6; color:#7a5a14; border:1px solid #ecd9a8; }
.nx-btn{ display:inline-flex; align-items:center; justify-content:center; gap:6px; border:0; border-radius:12px; padding:10px 16px; font:inherit; font-weight:800; font-size:14px; cursor:pointer; text-decoration:none; white-space:nowrap; min-height:42px; }
.nx-btn.gold{ background:linear-gradient(135deg,var(--gold),var(--gold2)); color:var(--navy); box-shadow:0 6px 16px rgba(185,141,49,.3); }
.nx-btn.ghost{ background:#fff; color:var(--navy); border:1px solid var(--line); }
.nx-btn.wide{ width:100%; margin-top:16px; min-height:48px; font-size:16px; }
.nx-btn[disabled]{ opacity:.45; cursor:not-allowed; }
.nx-auth{ max-width:430px; margin:30px auto 0; background:#fff; border-radius:24px; padding:26px 22px; box-shadow:0 20px 50px rgba(11,26,43,.15); border-top:5px solid var(--gold); }
.nx-auth h1{ margin:6px 0 2px; text-align:center; color:var(--navy); }
.nx-auth > .nx-muted{ text-align:center; }
.nx-auth-ic{ width:70px; height:70px; margin:0 auto; border-radius:50%; background:var(--navy); display:grid; place-items:center; font-size:34px; border:3px solid var(--gold); }
.nx-auth label, .nx-field label{ display:block; font-weight:800; font-size:14px; margin:14px 0 6px; color:var(--navy); }
.nx-field label small{ color:var(--muted); font-weight:600; }
input, textarea, select{ width:100%; border:1.5px solid var(--line); border-radius:12px; padding:11px 12px; font:inherit; font-size:16px; background:#fffdf8; color:var(--ink); }
input:focus, textarea:focus{ outline:none; border-color:var(--gold); box-shadow:0 0 0 3px rgba(214,173,85,.2); }
.nx-hero{ display:flex; flex-wrap:wrap; justify-content:space-between; align-items:flex-end; gap:12px; margin-bottom:14px; }
.nx-hero h1{ margin:0; color:var(--navy); font-size:24px; }
.nx-hero h1 small{ font-size:15px; color:var(--gold2); margin-inline-start:6px; }
.nx-datebar{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.nx-datebar input[type=date]{ width:auto; min-height:42px; padding:8px 10px; }
.nx-check{ display:inline-flex; gap:6px; align-items:center; font-weight:700; font-size:14px; }
.nx-check input{ width:18px; height:18px; }
.nx-stats{ display:grid; grid-template-columns:repeat(5,1fr); gap:10px; margin-bottom:16px; }
.nx-stat{ background:#fff; border-radius:16px; padding:14px 10px; text-align:center; box-shadow:0 6px 18px rgba(11,26,43,.06); border-bottom:4px solid var(--line); }
.nx-stat b{ display:block; font-size:28px; color:var(--navy); line-height:1.2; }
.nx-stat span{ font-size:13px; font-weight:700; color:var(--muted); }
.s-booked{ border-color:#c9d3df !important; } .s-waiting{ border-color:#e7b94b !important; } .s-arrived{ border-color:#3f8fd8 !important; } .s-doctor{ border-color:#8a5cd6 !important; } .s-done{ border-color:#3aa76d !important; }
.nx-dep{ background:#fff; border-radius:20px; box-shadow:0 10px 26px rgba(11,26,43,.07); margin-bottom:16px; overflow:hidden; }
.nx-dep-h{ display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:8px; padding:14px 16px; background:linear-gradient(90deg,#fbf6ea,#fff); border-bottom:1px solid var(--line); }
.nx-dep-h h2{ margin:0; font-size:18px; color:var(--navy); }
.nx-chips{ display:flex; flex-wrap:wrap; gap:6px; }
.nx-chip{ border:1.5px solid; border-radius:999px; padding:3px 10px; font-size:12px; font-weight:700; background:#fff; }
.nx-list{ display:grid; gap:0; }
.nx-pt{ display:grid; grid-template-columns:64px 1fr auto auto auto; align-items:center; gap:12px; padding:12px 16px; border-bottom:1px solid #f1ebdd; }
.nx-pt:last-child{ border-bottom:0; }
.nx-time{ background:var(--navy); color:var(--gold); font-weight:800; border-radius:12px; text-align:center; padding:8px 4px; font-size:15px; direction:ltr; }
.nx-info b{ display:block; font-size:16px; color:var(--navy); }
.nx-info span{ font-size:13px; color:var(--muted); }
.nx-st{ border-inline-start:4px solid; background:#f7f4ec; border-radius:8px; padding:4px 10px; font-size:13px; font-weight:800; white-space:nowrap; }
.nx-vt{ font-size:12px; font-weight:800; border-radius:999px; padding:4px 10px; white-space:nowrap; }
.nx-vt.ok{ background:#e7f5ec; color:#1b6b39; } .nx-vt.no{ background:#fdf0e6; color:#a5561b; }
.nx-empty{ background:#fff; border-radius:18px; padding:30px; text-align:center; color:var(--muted); font-weight:700; }
.nx-back{ display:inline-block; margin-bottom:10px; font-weight:800; text-decoration:none; }
.nx-card{ background:#fff; border-radius:20px; padding:18px; box-shadow:0 10px 26px rgba(11,26,43,.07); margin-bottom:14px; }
.nx-card h2{ margin:0 0 4px; color:var(--navy); font-size:18px; }
.nx-ptcard{ display:flex; gap:14px; align-items:center; border-top:4px solid var(--gold); }
.nx-ptcard h1{ margin:0; font-size:20px; color:var(--navy); }
.nx-ptcard p{ margin:3px 0; }
.nx-avatar{ width:58px; height:58px; flex:0 0 58px; border-radius:50%; background:var(--navy); display:grid; place-items:center; font-size:28px; border:3px solid var(--gold); }
.nx-vgrid{ display:grid; grid-template-columns:repeat(4,1fr); gap:4px 12px; }
.nx-bp{ grid-column:span 2; }
.nx-bpin{ display:flex; align-items:center; gap:8px; }
.nx-bpin span{ font-size:22px; color:var(--muted); }
.nx-bmi output{ display:flex; align-items:center; min-height:47px; padding:0 12px; border-radius:12px; background:#f6f1e6; font-weight:800; color:var(--navy); }
.nx-actions{ display:flex; gap:10px; margin-top:16px; flex-wrap:wrap; }
.nx-actions .nx-btn{ min-width:150px; min-height:48px; font-size:16px; }
@media (max-width:820px){
  .nx-stats{ grid-template-columns:repeat(3,1fr); }
  .nx-pt{ grid-template-columns:58px 1fr auto; }
  .nx-pt .nx-vt{ grid-column:2 / 3; justify-self:start; }
  .nx-pt .nx-btn{ grid-column:3 / 4; }
  .nx-vgrid{ grid-template-columns:repeat(2,1fr); }
}
@media (max-width:480px){
  .nx-stats{ grid-template-columns:repeat(2,1fr); }
  .nx-stat:first-child{ grid-column:span 2; }
  .nx-pt{ grid-template-columns:54px 1fr; }
  .nx-pt .nx-st{ grid-column:2; justify-self:start; }
  .nx-pt .nx-vt{ grid-column:2; }
  .nx-pt .nx-btn{ grid-column:1 / -1; }
  .nx-brand b{ font-size:12px; }
  .nx-user span{ display:none; }
}

/* المرحلة 15: التحديث التلقائي */
.live-dot{ position:fixed; bottom:12px; left:12px; z-index:50; background:rgba(11,26,43,.85); color:#9fe0b4; font-size:12px; font-weight:700; padding:5px 11px; border-radius:999px; pointer-events:none; transition:background .3s; }
.live-dot.flash{ background:#d6ad55; color:#0b1a2b; }
.live-dot.off{ color:#f3c4c4; }
.live-new{ position:relative; box-shadow:0 0 0 2px #d6ad55 inset, 0 0 18px rgba(214,173,85,.45) !important; animation:liveIn .8s ease; }
.live-new::after{ content:"جديد"; position:absolute; top:6px; left:8px; background:#d6ad55; color:#0b1a2b; font-size:11px; font-weight:800; padding:1px 8px; border-radius:999px; }
@keyframes liveIn{ from{ background:#fff6dc; } }
@media(prefers-reduced-motion:reduce){ .live-new{ animation:none; } }
