/* Separate portals and workflow cards share the hospital typography and controls. */
.identity-entry { --portal:#185e80; --portal-deep:#103a60; --portal-pale:#eaf5fb; min-height:100vh; color:#17354b; background:#f4f8fb; }
.entry-patient { --portal:#007c71; --portal-deep:#075b55; --portal-pale:#e7f5f1; }
.entry-doctor { --portal:#17638d; --portal-deep:#183e60; --portal-pale:#eaf3fa; }
.entry-admin { --portal:#325799; --portal-deep:#22395f; --portal-pale:#edf2fb; }
.identity-header { min-height:72px; display:flex; align-items:center; justify-content:space-between; gap:20px; padding:0 clamp(20px,5vw,78px); border-bottom:1px solid #dce7ee; background:#fff; }
.identity-brand { display:inline-flex; align-items:center; gap:12px; color:#193650; text-decoration:none; font-size:18px; }
.identity-brand>span:first-child { display:grid; place-items:center; min-width:36px; height:36px; border-radius:11px; color:#fff; background:var(--portal,#17638d); }
.identity-header nav { display:flex; gap:clamp(10px,3vw,30px); flex-wrap:wrap; }
.identity-header nav a { color:#354d69; font-weight:650; text-decoration:none; font-size:14px; }
.identity-header nav a:hover,.identity-options a:hover { text-decoration:underline; }
.identity-layout { display:grid; grid-template-columns:minmax(0,1.13fr) minmax(370px,0.87fr); max-width:1240px; gap:30px; margin:clamp(26px,6vh,80px) auto; padding:0 clamp(18px,4vw,36px); align-items:start; }
.identity-intro { display:flex; align-items:end; border-radius:22px; color:#fff; min-height:610px; overflow:hidden; padding:42px;
  background:linear-gradient(180deg,rgba(8,46,63,.10) 15%,var(--portal-deep) 88%),url('campus.webp') center 35% / cover; }
.entry-doctor .identity-intro { background:linear-gradient(165deg,rgba(8,46,71,.24),var(--portal-deep) 85%),url('campus.webp') center 45% / cover; }
.entry-admin .identity-intro { background:linear-gradient(125deg,#1b304dc9,var(--portal-deep) 90%),url('campus.webp') center / cover; }
.identity-intro h2 { font-size:clamp(30px,4.3vw,49px); letter-spacing:-.025em; margin:6px 0 14px; }
.identity-intro p { max-width:33ch; line-height:1.7; margin:0; color:#f3f8fb; }
.identity-intro ul { display:flex; flex-wrap:wrap; list-style:none; gap:10px; padding:0; margin:25px 0 0; }
.identity-intro li { border:1px solid #ffffff64; background:#ffffff14; border-radius:100px; padding:5px 12px; font-size:13px; }
.identity-card { background:#fff; border:1px solid #dfe9ef; border-radius:22px; box-shadow:0 14px 44px #25456013; padding:clamp(20px,4vw,36px); }
.identity-copy h1 { margin:0 0 7px; font-size:30px; }
.identity-copy p,.identity-caption { color:#516a7f; line-height:1.65; }
.identity-card form,.identity-card form label { display:grid; gap:8px; }
.identity-card form { gap:14px; }
.identity-card form label { color:#28445b; font-size:14px; font-weight:650; }
.identity-card input { width:100%; min-width:0; min-height:44px; border:1px solid #cddde8; border-radius:9px; background:#fcfeff; padding:8px 12px; color:#193650; font:inherit; }
.identity-card .btn.primary { background:var(--portal); border-color:var(--portal); width:100%; min-height:44px; }
.identity-code { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end; gap:8px; }
.identity-options { display:flex; justify-content:space-between; gap:15px; margin-top:16px; }
.identity-options a { color:var(--portal); font-weight:680; font-size:14px; }
.identity-code-note,.identity-flash { color:var(--portal-deep); font-weight:600; }
.identity-code-note:empty,.identity-flash:empty,.identity-card .form-error:empty { display:none; }
.identity-card details:not([hidden]) { border-top:1px solid #e5edf3; margin-top:22px; padding-top:16px; }
.identity-card summary,.flow-card summary { cursor:pointer; color:#214d69; font-weight:700; }
.identity-accounts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-top:12px; }
.identity-account { display:grid; gap:4px; text-align:left; background:var(--portal-pale); color:var(--portal-deep); border:1px solid #dbe9ef; border-radius:9px; padding:9px 11px; cursor:pointer; min-height:58px; }
.identity-account:hover { border-color:var(--portal); }
.identity-account small { color:#365a73; overflow-wrap:anywhere; }
.identity-caption { margin:16px 0 0; font-size:12px; }
.entry-select { width:min(1060px,100%); margin:0 auto; padding:clamp(24px,6vw,76px) 22px; min-height:100vh; }
.entry-select h1 { margin:35px 0 22px; }
.entry-tiles { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,235px),1fr)); gap:14px; }
.entry-tile { text-decoration:none; color:#17354b; display:grid; justify-items:start; align-content:start; gap:10px; }
.entry-tile:hover { border-color:#4a8db2; box-shadow:0 7px 22px #23567715; }
.entry-tile h2,.entry-tile h3,.entry-tile p { margin:0; }
.entry-tile p { color:#516a7f; line-height:1.6; }
.flow-work { display:grid; gap:18px; }
.flow-hero { display:flex; color:#fff; align-items:center; justify-content:space-between; gap:20px; padding:clamp(20px,4vw,32px); border-radius:15px; background:linear-gradient(118deg,#174b70,#236f8e); }
.pp-shell .flow-hero { background:linear-gradient(115deg,#075a55,#167c72); }
.flow-hero p,.flow-hero h1 { margin:0 0 8px; }
.flow-hero p,.flow-hero span { color:#e6f3f9; line-height:1.5; }
.flow-hero svg { flex-shrink:0; }
.flow-section { display:grid; gap:12px; }
.flow-section>h2 { font-size:17px; margin:3px 0; }
.cd-note-form details.flow-section { border:1px solid #d6e3ea; border-radius:12px; padding:12px; }
.cd-note-form details.flow-section>summary { color:#174c61; font-weight:650; cursor:pointer; }
.cd-note-form details.flow-section[open]>summary { margin-bottom:12px; }
.cd-note-form details.flow-section:not([open])>.form-grid { display:none; }
.record-sheet fieldset.flow-section { min-width:0; border:1px solid #d6e3ea; border-radius:12px; padding:12px; margin:0; }
.record-sheet fieldset.flow-section legend { padding:0 6px; color:#174c61; font-weight:650; }
.record-sheet fieldset.flow-section p { margin:0; color:#526673; }
.flow-card { background:#fff; border:1px solid #dce7ef; border-radius:12px; padding:16px 19px; min-width:0; }
.flow-card-title { display:flex; justify-content:space-between; align-items:start; gap:12px; }
.flow-card-title small { color:#526d83; overflow-wrap:anywhere; font-weight:650; }
.flow-card-title h2 { font-size:19px; color:#193650; margin:3px 0 0; }
.flow-card .status { white-space:nowrap; }
.flow-fields { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,165px),1fr)); gap:14px 18px; margin:14px 0 0; }
.flow-fields div { min-width:0; }
.flow-fields dt { color:#546f83; font-size:12px; margin-bottom:3px; }
.flow-fields dd { margin:0; overflow-wrap:anywhere; color:#203f58; line-height:1.48; white-space:pre-line; }
.flow-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:15px; }
.flow-card details { margin-top:14px; border-top:1px solid #e6edf2; padding-top:12px; }
.flow-card details>.btn { margin:8px 0; }
.flow-history { padding-left:20px; color:#24465e; font-size:13px; }
.flow-history li { padding:5px 0; }
.flow-history span { display:block; color:#546f83; }
.flow-empty { padding:14px; margin:0; background:#fff; border:1px dashed #ccdee9; border-radius:10px; color:#546f83; }
.cd-nav nav { flex-wrap:wrap; }
@media (max-width:760px) {
  .identity-header { padding-block:12px; align-items:start; flex-direction:column; gap:9px; }
  .identity-layout { grid-template-columns:1fr; gap:14px; margin:14px auto; }
  .identity-intro { min-height:210px; padding:22px; }
  .identity-intro h2 { font-size:28px; }
  .identity-intro ul { margin-top:14px; }
  .flow-card { padding:13px; }
  .flow-card-title h2 { font-size:17px; }
}


.flow-grant-fields { border:1px solid #d7e6ee; border-radius:9px; padding:12px; display:grid; gap:10px; }
.flow-grant-fields label { display:flex; flex-direction:row; align-items:center; gap:8px; }
.flow-grant-fields input[type="checkbox"] { width:16px; min-height:auto; }

.care-scroll { overflow:auto; margin:12px 0; }
.care-table { width:100%; min-width:520px; border-collapse:collapse; font-size:13px; text-align:left; }
.care-table th,.care-table td { padding:9px 11px; border-bottom:1px solid #e2ecf2; vertical-align:top; }
.care-table th { color:#24465e; background:#edf5fa; font-weight:700; }
.care-table td { color:#29495f; }
.flow-fields + .care-scroll { margin-top:16px; }
