/* المرحلة 12: بوابة المرضى - كحلي وذهبي، موبايل أولًا */
: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.pt{ 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; }
body.pt.out{ background:radial-gradient(circle at 100% 0%,rgba(214,173,85,.25),transparent 40%),linear-gradient(160deg,#0b1a2b 0%,#16304a 55%,#f6f1e6 55.2%); }
a{ color:var(--navy2); }
.pt-top{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:12px 16px; background:var(--navy); color:#fff; border-bottom:3px solid var(--gold); position:sticky; top:0; z-index:20; }
body.out .pt-top{ background:transparent; border-bottom:0; position:static; }
.pt-brand{ display:flex; align-items:center; gap:10px; text-decoration:none; color:#fff; }
.pt-brand img{ width:42px; height:42px; object-fit:contain; background:#fff; border-radius:50%; padding:2px; }
.pt-brand b{ display:block; font-size:14px; letter-spacing:.5px; color:var(--gold); }
.pt-brand small{ color:#e9dcb8; font-size:12px; }
.pt-home{ color:#f3dfa2; text-decoration:none; font-weight:700; font-size:14px; }
.pt-nav{ display:flex; gap:6px; align-items:center; }
.pt-nav a, .pt-nav button{ color:#fff; text-decoration:none; background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.14); border-radius:999px; padding:8px 14px; font:inherit; font-size:14px; font-weight:700; cursor:pointer; display:inline-flex; gap:6px; align-items:center; }
.pt-nav a.on, .pt-nav a:hover, .pt-nav button:hover{ background:var(--gold); color:var(--navy); border-color:var(--gold); }
.pt-nav form{ margin:0; }
.pt-main{ width:100%; max-width:980px; margin:0 auto; padding:18px 14px 30px; flex:1; }
.pt-foot{ text-align:center; color:var(--muted); font-size:12px; padding:16px; }
.pt-flash{ border-radius:14px; padding:12px 14px; margin:0 0 14px; font-weight:700; line-height:1.7; }
.pt-flash.success{ background:#e7f5ec; color:#1b6b39; border:1px solid #bfe3cb; }
.pt-flash.error{ background:#fdecec; color:#9d2323; border:1px solid #f3c4c4; }
.pt-flash.info{ background:#fbf5e6; color:#7a5a14; border:1px solid #ecd9a8; }
.auth-card{ max-width:460px; margin:6px auto 0; background:#fff; border-radius:24px; padding:24px 20px; box-shadow:0 20px 50px rgba(11,26,43,.18); border-top:5px solid var(--gold); }
.auth-head{ text-align:center; margin-bottom:16px; }
.auth-head .ic{ width:58px; height:58px; border-radius:18px; display:inline-flex; align-items:center; justify-content:center; font-size:28px; background:linear-gradient(135deg,var(--navy),var(--navy2)); box-shadow:0 8px 18px rgba(11,26,43,.25); }
.auth-head h1{ margin:12px 0 4px; font-size:23px; color:var(--navy); }
.auth-head p{ margin:0; color:var(--muted); font-size:14px; line-height:1.8; }
.fld{ display:block; margin-bottom:12px; }
.fld > span{ display:block; font-weight:700; font-size:14px; margin-bottom:6px; color:#26384a; }
.fld input, .fld select, .fld textarea{ width:100%; padding:13px 14px; border:1.5px solid #e1d9c6; border-radius:14px; font:inherit; font-size:16px; background:#fdfcf9; color:var(--ink); transition:.15s; }
.fld input:focus, .fld select:focus, .fld textarea:focus{ outline:none; border-color:var(--gold); background:#fff; box-shadow:0 0 0 4px rgba(214,173,85,.18); }
.fld input:disabled{ background:#f1efea; color:#777; }
.fld .otp{ text-align:center; font-size:28px; letter-spacing:12px; font-weight:800; }
.row2{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.btn{ display:inline-flex; justify-content:center; align-items:center; gap:6px; border:0; border-radius:999px; padding:13px 22px; font:inherit; font-weight:800; font-size:16px; cursor:pointer; text-decoration:none; transition:filter .15s,transform .15s; }
.btn:hover{ filter:brightness(1.06); transform:translateY(-1px); }
.btn.gold{ background:linear-gradient(135deg,#e2bd68,var(--gold2)); color:var(--navy); box-shadow:0 6px 16px rgba(185,141,49,.35); }
.btn.navy{ background:var(--navy); color:#fff; }
.btn.ghost{ background:#fff; color:#9d2323; border:1.5px solid #f0c9c9; }
.btn.sm{ padding:8px 16px; font-size:14px; }
.btn.block{ width:100%; }
.btn:disabled{ opacity:.5; cursor:not-allowed; transform:none; }
.link{ background:none; border:0; color:var(--navy2); font:inherit; font-weight:700; text-decoration:underline; cursor:pointer; padding:0; }
.resend{ text-align:center; margin-top:12px; font-size:14px; }
.alt{ text-align:center; margin:14px 0 0; font-size:14px; }
.hint{ color:var(--muted); font-size:13px; line-height:1.7; }
.divider{ display:flex; align-items:center; gap:10px; color:var(--muted); font-size:13px; margin:18px 0 12px; }
.divider::before, .divider::after{ content:""; flex:1; height:1px; background:var(--line); }
.welcome{ display:flex; justify-content:space-between; align-items:center; gap:14px; flex-wrap:wrap; background:radial-gradient(circle at 0% 0%,rgba(214,173,85,.28),transparent 45%),linear-gradient(135deg,var(--navy),var(--navy2)); color:#fff; border-radius:24px; padding:22px 20px; box-shadow:0 16px 36px rgba(11,26,43,.22); margin-bottom:18px; }
.welcome small{ color:#e9dcb8; }
.welcome h1{ margin:2px 0 6px; font-size:26px; color:var(--gold); }
.welcome p{ margin:0; color:#dfe6ee; font-size:14px; }
.sec-title{ display:flex; align-items:center; gap:10px; font-size:18px; color:var(--navy); margin:22px 0 12px; }
.sec-title span{ width:34px; height:34px; border-radius:11px; display:inline-flex; align-items:center; justify-content:center; background:var(--navy); font-size:17px; }
.cards{ display:grid; gap:10px; }
.appt{ display:flex; align-items:center; gap:14px; background:#fff; border:1px solid var(--line); border-radius:18px; padding:12px 14px; box-shadow:0 4px 14px rgba(11,26,43,.05); }
.appt .date{ min-width:62px; text-align:center; background:linear-gradient(160deg,var(--navy),var(--navy2)); color:#fff; border-radius:14px; padding:8px 6px; }
.appt .date b{ display:block; font-size:24px; color:var(--gold); line-height:1.1; }
.appt .date span{ font-size:12px; color:#dfe6ee; }
.appt .info{ flex:1; min-width:0; }
.appt h3{ margin:0 0 2px; font-size:16px; }
.appt p{ margin:0 0 6px; color:var(--muted); font-size:13px; }
.appt form{ margin:0; }
.badge{ display:inline-block; border-radius:999px; padding:3px 11px; font-size:12px; font-weight:800; background:#eef2f7; color:#2e4a66; }
.badge.ok{ background:#e7f5ec; color:#1b6b39; } .badge.wait{ background:#fff3d6; color:#8a6418; } .badge.in{ background:#efe7ff; color:#5b2d91; } .badge.done{ background:#eceff3; color:#56606c; }
.empty-card{ background:#fff; border:1.5px dashed #e1d6bd; border-radius:18px; padding:20px; text-align:center; color:var(--muted); }
.visit{ background:#fff; border:1px solid var(--line); border-radius:18px; margin-bottom:10px; overflow:hidden; box-shadow:0 4px 14px rgba(11,26,43,.05); }
.visit summary{ list-style:none; display:flex; justify-content:space-between; align-items:center; gap:10px; padding:14px 16px; cursor:pointer; border-inline-start:5px solid var(--gold); }
.visit summary::-webkit-details-marker{ display:none; }
.visit summary small{ display:block; color:var(--muted); font-size:12px; margin-top:2px; }
.visit[open] summary{ background:#fcf9f1; border-bottom:1px solid var(--line); }
.visit-body{ padding:14px 16px 16px; }
.dx{ background:#fffaf0; border:2px solid var(--gold); border-radius:14px; padding:10px 12px; margin-bottom:12px; }
.dx small{ display:block; color:var(--gold2); font-weight:800; font-size:12px; }
.dx b{ font-size:17px; color:var(--navy); }
.kv{ margin-bottom:10px; font-size:14px; line-height:1.8; }
.kv > span{ display:block; font-weight:800; color:var(--navy2); font-size:13px; }
table.meds{ width:100%; border-collapse:collapse; font-size:13px; margin-top:4px; }
table.meds th{ background:var(--navy); color:#f3dfa2; padding:7px; text-align:right; font-size:12px; }
table.meds td{ padding:7px; border-bottom:1px solid #f0e9d8; vertical-align:top; }
table.meds td small{ display:block; color:var(--muted); }
.chips{ display:flex; flex-wrap:wrap; gap:6px; }
.chips i{ font-style:normal; background:#f3eee2; border-radius:999px; padding:3px 11px; font-size:13px; }
.panel{ background:#fff; border:1px solid var(--line); border-radius:22px; padding:18px; box-shadow:0 8px 24px rgba(11,26,43,.06); }
.panel .sec-title{ margin-top:0; }
.grid2{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.book .who{ background:#fbf5e6; border-radius:12px; padding:10px 12px; margin-bottom:14px; font-size:14px; }
.book .steps{ display:grid; grid-template-columns:1fr 1fr; gap:0 12px; }
.price{ background:var(--navy); color:#f3dfa2; border-radius:12px; padding:9px 12px; font-weight:800; margin-bottom:12px; text-align:center; }
@media(max-width:700px){
    .pt-top{ flex-wrap:wrap; }
    body.in .pt-nav{ position:fixed; bottom:0; left:0; right:0; justify-content:space-around; background:var(--navy); border-top:2px solid var(--gold); padding:6px 4px calc(6px + env(safe-area-inset-bottom)); z-index:30; gap:2px; }
    body.in .pt-nav a, body.in .pt-nav button{ flex-direction:column; gap:1px; font-size:11px; padding:6px 8px; border:0; background:none; border-radius:12px; }
    body.in .pt-nav a span, body.in .pt-nav button span{ font-size:19px; }
    body.in .pt-main{ padding-bottom:90px; }
    .grid2, .book .steps{ grid-template-columns:1fr; }
    .row2{ grid-template-columns:1fr; gap:0; }
    .welcome h1{ font-size:22px; }
    .welcome .btn{ width:100%; }
    table.meds th:nth-child(4), table.meds td:nth-child(4){ display:none; }
}
