:root{font-family:system-ui,-apple-system,"Segoe UI",sans-serif;color:#192b3b;background:#f5f7fa;line-height:1.65;color-scheme:light}*{box-sizing:border-box}body{margin:0;padding:24px 12px}main{max-width:620px;margin:auto;background:white;border:1px solid #dfe5eb;border-radius:16px;padding:28px}header{display:flex;align-items:center;justify-content:space-between;gap:20px}header strong{font-size:24px;color:#225caa}h1{font-size:26px;line-height:1.3}h2{font-size:20px}p{overflow-wrap:anywhere}label{display:block;margin-top:14px}input:not([type=checkbox]),textarea,select{font:inherit;border:1px solid #aebac7;border-radius:8px;padding:10px;max-width:100%;width:100%;background:white;color:inherit}header select{width:auto}button{display:block;width:100%;padding:12px 18px;margin-top:14px;border:1px solid #225caa;border-radius:8px;background:#225caa;color:white;font:inherit;cursor:pointer;min-height:48px}.secondary{background:white;color:#225caa}button:disabled{opacity:.55;cursor:wait}.check{display:flex;gap:12px;align-items:flex-start}.check input{margin-top:8px;min-width:20px;min-height:20px}a{color:#225caa;overflow-wrap:anywhere}section,footer{border-top:1px solid #e0e5eb;margin-top:28px;padding-top:20px}footer{font-size:13px;color:#556678}#status,#caseStatus{padding:10px;background:#edf3fa;border-radius:8px}#status:empty{display:none}[hidden]{display:none!important}.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}:focus-visible{outline:3px solid #d48b12;outline-offset:3px}@media(max-width:380px){main{padding:18px}header{gap:8px}h1{font-size:23px}}

#status[data-result="success"],#caseStatus[data-result="success"]{background:#ecfdf3;color:#14532d;border:1px solid #86d6a6;border-inline-start:5px solid #18864b}#status[data-result="error"],#caseStatus[data-result="error"]{background:#fff1f2;color:#881337;border:1px solid #f5a3af;border-inline-start:5px solid #c82e45}#caseDialog{width:calc(100% - 32px);max-width:440px;max-height:85vh;overflow:auto;padding:28px;border:2px solid #18864b;border-radius:18px;background:#f0fdf4;color:#14532d;box-shadow:0 18px 70px #102b3440}#caseDialog::backdrop{background:#142b3b70}#caseDialog h2{margin:12px 0 8px;font-size:24px}#caseDialogIcon{display:grid;place-items:center;width:48px;height:48px;border-radius:50%;background:#18864b;color:white;font-size:30px;font-weight:700}#caseDialog button{background:#18864b;border-color:#18864b}#caseDialog[data-result="error"]{background:#fff1f2;color:#881337;border-color:#c82e45}#caseDialog[data-result="error"] #caseDialogIcon,#caseDialog[data-result="error"] button{background:#c82e45;border-color:#c82e45}


.phone-row{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,3fr);gap:12px;direction:ltr;align-items:end}.phone-row>div{min-width:0}.phone-row label{font-size:14px;line-height:1.4;margin-bottom:6px}.region-control{position:relative}.region-control svg{position:absolute;left:10px;top:50%;transform:translateY(-50%);width:18px;height:18px;pointer-events:none;color:#556678}.region-control select{padding-left:32px;text-overflow:ellipsis}.phone-row input,.phone-row select{height:46px;min-width:0;font-size:15px}#loginSend{width:auto;max-width:100%;min-height:42px;padding:8px 16px;font-size:15px}#loginCode{width:160px;max-width:100%;height:46px;font-size:20px;letter-spacing:.22em}#loginChallenge{margin-top:16px}[dir=rtl] .phone-row label{direction:rtl;text-align:right}

.field-error{color:#b42318;font-size:14px;margin:8px 0}input[aria-invalid="true"]{border-color:#b42318;background:#fff8f7}

.otp-row{display:grid;grid-template-columns:minmax(90px,140px) minmax(0,1fr);align-items:stretch;gap:10px;max-width:390px}.otp-row #code{min-width:0;text-align:center;font-size:20px;letter-spacing:.15em}.otp-row #send{width:auto;max-width:100%;margin:0;padding:10px 12px;line-height:1.4;font-size:15px}#helpLink{display:block;margin-bottom:12px}
#verificationDialog{width:calc(100% - 24px);max-width:440px;max-height:85dvh;overflow:auto;padding:24px;border:1px solid #dfe5eb;border-radius:16px;background:#fff;color:#192b3b}#verificationDialog::backdrop{background:#142b3b70}#verificationTitle{margin-top:0}#verificationStatus{padding:10px;border-radius:8px;overflow-wrap:anywhere}#verificationStatus[data-result="success"]{background:#ecfdf3;color:#14532d}#verificationStatus[data-result="error"]{background:#fff1f2;color:#881337}@media(max-width:380px){#verificationDialog{padding:16px}}
#invitationPhone{display:flex;align-items:center;flex-wrap:wrap;gap:6px}#toggleInvitationPhone{display:inline-flex;align-items:center;justify-content:center;width:40px;min-height:40px;padding:8px;margin:0;background:transparent;color:#225caa;border:0;border-radius:50%}#toggleInvitationPhone svg{width:22px;height:22px}#toggleInvitationPhone:hover{background:#edf3fa}

.check.consent-invalid{padding:10px;border:1px solid #c82e45;border-radius:8px;background:#fff1f2;color:#881337}.check.consent-invalid input{outline:2px solid #c82e45;outline-offset:2px;accent-color:#c82e45}#consentError{color:#b42318;font-size:14px}

#relationshipsTitle{margin:24px 0 20px} .notification-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 0;border-bottom:1px solid #dfe5eb}.notification-row strong{min-width:0;overflow-wrap:anywhere}.notification-row .notification-cancel{width:auto;flex-shrink:0;margin:0;padding:9px 12px;min-height:40px;font-size:14px;font-weight:600;background:#225caa;color:#fff;border-color:#225caa}.notification-phone{margin-inline-start:auto;color:#556678;font-size:14px;white-space:nowrap}@media(max-width:380px){.notification-row{flex-wrap:wrap;gap:10px}}

#loginDialog{width:calc(100% - 24px);max-width:500px;max-height:85dvh;overflow:auto;padding:24px;border:1px solid #dfe5eb;border-radius:16px;background:white;color:#192b3b}#loginDialog::backdrop{background:#142b3b70}#loginDialog h2{margin-top:0}#loginStatus{padding:10px;border-radius:8px;background:#edf3fa;overflow-wrap:anywhere}#loginStatus[data-result=error]{background:#fff1f2;color:#881337}#guestManage{margin-top:24px}#guestManage button{width:100%}@media(max-width:380px){#loginDialog{padding:16px}}

#deleteConfirmDialog{width:calc(100% - 24px);max-width:440px;max-height:85dvh;overflow:auto;padding:24px;border:1px solid #dfe5eb;border-radius:16px;background:#fff;color:#192b3b}#deleteConfirmDialog::backdrop{background:#142b3b70}#confirmDelete{background:#b42318;border-color:#b42318}

.notification-phone{white-space:normal;overflow-wrap:anywhere;min-width:0;max-width:50%}@media(max-width:480px){.notification-row{flex-wrap:wrap}.notification-phone{max-width:100%}}

.relationships-pagination{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:12px;margin-top:20px}.relationships-pagination button{width:auto;margin:0;padding:8px 14px;min-height:44px;font-size:14px}.relationships-pagination button:disabled{cursor:default}.relationships-pagination span{color:#556678;font-size:14px}
.email-selected-relationship{border-inline-start:3px solid #225caa;padding-inline-start:10px}.email-selected-relationship:focus{outline:2px solid #c6d6ec;outline-offset:3px}.notification-row .notification-cancel{max-width:100%;white-space:normal}

/* Compact login dialog: visible channel choices and a shared OTP row. */
#loginDialog{width:min(460px,calc(100vw - 32px));max-height:calc(100dvh - 32px);box-sizing:border-box;overflow:auto;border:1px solid #e3e9f0;border-radius:22px;padding:30px;color:#192b3b;box-shadow:0 24px 80px #16345130}
#loginDialog::backdrop{background:#172b4059;backdrop-filter:blur(4px)}
#loginDialog h2{font-size:26px;letter-spacing:-.5px;margin:0 0 10px;font-weight:700}
#loginDialog>p[data-t=loginIntro]{font-size:14px;line-height:1.7;color:#637287;margin:0 0 24px}
#loginDialog label{font-size:13px;font-weight:600;color:#45566b;margin-top:18px;margin-bottom:7px}
#loginDialog input,#loginDialog select{height:48px;border-color:#d6dfe9;border-radius:10px;background:#fbfcfe}
#loginDialog input:focus{background:white;border-color:#225caa}
#loginDialog .login-methods{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:4px;background:#eef2f7;border-radius:12px}
#loginDialog .login-methods button{margin:0;min-height:42px;padding:9px 8px;border:0;border-radius:9px;background:transparent;color:#66768a;font-size:14px;font-weight:600;transition:background .16s,color .16s}
#loginDialog .login-methods button[aria-pressed=true]{color:#225caa;background:white;box-shadow:0 2px 5px #17395412}
#loginDialog .phone-row{grid-template-columns:minmax(0,2fr) minmax(0,3fr);gap:10px}
#loginDialog .login-code-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(110px,auto);gap:10px;align-items:stretch}
#loginDialog #loginCode{width:100%;min-width:0;height:48px;font-size:18px;letter-spacing:.18em;font-variant-numeric:tabular-nums}
#loginDialog #loginSend{margin:0;width:100%;min-height:48px;padding:8px 12px;border:1px solid #d8e4f3;border-radius:10px;background:#edf4fd;color:#225caa;font-size:13px;font-weight:600;font-variant-numeric:tabular-nums;max-width:175px}
#loginDialog #loginSend:disabled{opacity:1;color:#8494a9;background:#f3f6fa;border-color:#e5ebf2;cursor:default}
#loginDialog #loginVerify{margin-top:24px;border-radius:10px;min-height:48px;font-size:15px;font-weight:600}
#loginDialog #closeLogin{margin-top:10px;min-height:36px;padding:6px;border:0;background:transparent;color:#69798c;font-size:13px}
#loginDialog #loginChallenge{margin-top:20px;max-width:100%;overflow:hidden}
@media(max-width:400px){#loginDialog{padding:22px 18px;border-radius:18px}#loginDialog .login-code-row{grid-template-columns:minmax(0,1fr) minmax(105px,45%)}#loginDialog #loginSend{padding:8px;font-size:12px}}

#loginDialog #closeLogin{position:absolute;inset-inline-end:16px;top:16px;width:36px;height:36px;min-height:36px;margin:0;padding:0;display:grid;place-items:center;border-radius:8px;font-size:26px;line-height:1;color:#718095}#loginDialog #closeLogin:hover{background:#eef2f7;color:#192b3b}#loginDialog h2{padding-inline-end:38px}

#loginDialog #regionSearch{font-size:12px;height:38px;margin-bottom:6px;padding:6px 8px}#regionNoResults{font-size:12px;color:#637287;margin:4px 0}.region-control.searching svg{display:none}#loginDialog .region-control.searching select{height:auto;min-height:96px;padding:6px;font-size:13px}.region-control.searching option{padding:6px 2px}

#emergencyUsers{width:100%;border-collapse:collapse;table-layout:fixed;font-size:14px}#emergencyUsers th,#emergencyUsers td{text-align:start;padding:12px 8px;border-bottom:1px solid #dfe5eb;overflow-wrap:anywhere}#emergencyUsers th{background:#f0f4f9}#emergencyUsers th:first-child{width:52px}#emergencyUsers th:last-child{width:28%}#emergencyUsers input[type=radio]{width:20px;height:20px;accent-color:#225caa;cursor:pointer}#emergencyUsers tr:has(input:checked){background:#edf4fd}.emergency-account{color:#637287;font-size:12px}

#loginDialog input[type=radio],#emergencyUsers input[type=radio]{padding:0;border:initial;border-radius:50%;display:inline-block}

.history-row{padding:20px 0;border-bottom:1px solid #dce4ec}.history-row button{width:auto}#historyFields dd{margin:0 0 16px;overflow-wrap:anywhere}#historyFields dt{font-weight:600}#historyMessage{white-space:pre-wrap;overflow-wrap:anywhere}

/* Submission history follows the compact request table used by the admin portal. */
main.history-layout{max-width:1060px}
#historyContent>p:first-child{font-size:14px;color:#637287;margin:12px 0 24px}
.history-table-scroll{max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain}
.history-table{width:100%;border-collapse:collapse;text-align:start;font-size:14px}
.history-table th{font-weight:500;color:#708197;font-size:13px;white-space:nowrap}
.history-table th,.history-table td{padding:20px 12px;text-align:start;border-bottom:1px solid #e0e7ef}
.history-table th:first-child,.history-table td:first-child{padding-inline-start:0}
.history-table th:last-child,.history-table td:last-child{padding-inline-end:0}
.history-date{white-space:nowrap;font-variant-numeric:tabular-nums}
.history-kind{min-width:110px}
.history-id{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:12px;white-space:nowrap;color:#52657b}
.history-badge{display:inline-flex;align-items:center;gap:6px;padding:3px 9px;border:1px solid #dce4ec;border-radius:6px;background:#f4f6f9;color:#52657b;white-space:nowrap;font-size:13px;font-weight:600}
.history-badge[data-state=OPEN]{color:#896000;background:#fff5cc;border-color:#edce70}
.history-badge[data-state=COMPLETED]{color:#177745;background:#eaf8ef;border-color:#9bd7b2}
.history-badge[data-state=OPEN]::before,.history-badge[data-state=COMPLETED]::before{content:'';width:6px;height:6px;border-radius:50%;background:currentColor}
.history-table .history-view{width:auto;min-height:38px;margin:0;padding:6px 13px;background:white;color:#225caa;border-color:#c4d3e7;font-size:13px;white-space:nowrap}
.history-table .history-view:hover{background:#edf4fd;border-color:#225caa}
#submissionHistory .relationships-pagination button{background:white;color:#225caa;border-color:#c4d3e7}
#submissionHistory .relationships-pagination button:disabled{color:#9aaac0;opacity:1;border-color:#e2e8f0}
@media(max-width:600px){.history-table{min-width:780px}.history-table th,.history-table td{padding-block:16px}}

#historyReply{white-space:pre-wrap;overflow-wrap:anywhere}

#historyDetail{width:min(640px,calc(100vw - 32px));max-height:calc(100dvh - 40px);overflow:auto;padding:28px;border:1px solid #dfe7ef;border-radius:20px;color:#192b3b;background:#fff;box-shadow:0 24px 80px #17344c26}
#historyDetail::backdrop{background:#172b4059;backdrop-filter:blur(3px)}
.history-detail-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}
#historyDetail h2{font-size:24px;margin:0;letter-spacing:-.4px}
#historyDetail #closeHistory{display:grid;place-items:center;width:40px;height:40px;min-height:40px;margin:0;padding:0;flex-shrink:0;border:0;background:transparent;color:#6c7d90;font-size:28px;border-radius:8px}
#historyDetail #closeHistory:hover{background:#eef3f8;color:#192b3b}
#historyReference{font-size:12px;color:#738397;overflow-wrap:anywhere;margin:6px 0 24px;font-variant-numeric:tabular-nums}
#historyFields{display:grid;grid-template-columns:1fr 1fr;gap:18px 24px;margin:0;padding:20px 0;border-top:1px solid #e2e8ef;border-bottom:1px solid #e2e8ef}
#historyFields>div{min-width:0}#historyFields dt{font-size:12px;font-weight:500;color:#708197;margin-bottom:5px}#historyFields dd{font-size:14px;margin:0;overflow-wrap:anywhere}#historyFields dd.history-badge{font-size:12px}
#historyDetail section{border:0;margin:24px 0 0;padding:0}#historyDetail h3{font-size:14px;margin:0;font-weight:600}#historyMessage,#historyReply{font-size:14px;line-height:1.8;margin:12px 0 0;white-space:pre-wrap;overflow-wrap:anywhere}
#historyDetail #historyReplySection{background:#f0f5fc;border:1px solid #dce7f5;border-radius:12px;padding:18px 20px}#historyReplySection h3{color:#225caa}.history-reply-heading{display:flex;align-items:baseline;justify-content:space-between;gap:8px;flex-wrap:wrap}#historyReplyTime{font-size:12px;color:#708197}#historyReplySection[data-empty=true]{background:#f7f9fc;border-color:#e5ebf2}#historyReplySection[data-empty=true] #historyReply{color:#738397}
@media(max-width:480px){#historyDetail{padding:22px 18px;border-radius:16px}#historyFields{grid-template-columns:1fr;gap:14px}#historyDetail #historyReplySection{padding:16px}}

#expandHistoryReply{display:grid;place-items:center;flex-shrink:0;width:36px;min-height:36px;margin:0;padding:7px;background:transparent;border:1px solid #cadbef;color:#225caa;border-radius:8px}#expandHistoryReply:hover{background:#e1edfc}#historyReplyTime{margin-inline-start:auto}
#expandedReplyDialog{width:min(960px,calc(100vw - 32px));height:min(800px,calc(100dvh - 40px));max-height:calc(100dvh - 40px);padding:0;border:1px solid #dfe7ef;border-radius:18px;color:#192b3b;background:#fff;overflow:hidden;box-shadow:0 24px 80px #17344c26}#expandedReplyDialog[open]{display:flex;flex-direction:column}#expandedReplyDialog::backdrop{background:#172b4070;backdrop-filter:blur(3px)}.expanded-reply-header{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:20px 28px;border-bottom:1px solid #e2e8ef;flex-shrink:0}.expanded-reply-header h2{font-size:22px;margin:0}#closeExpandedReply{display:grid;place-items:center;width:40px;min-height:40px;margin:0;padding:0;border:0;background:transparent;color:#6c7d90;font-size:28px}.expanded-reply-body{padding:24px 32px;overflow-y:auto;min-height:0;overscroll-behavior:contain}#expandedReplyTime{margin:0 0 16px;color:#708197;font-size:13px}#expandedReplyTime:empty{display:none}#expandedReplyText{margin:0;font-size:16px;line-height:1.9;white-space:pre-wrap;overflow-wrap:anywhere}@media(max-width:480px){#expandedReplyDialog{width:calc(100vw - 16px);height:calc(100dvh - 16px);max-height:calc(100dvh - 16px);border-radius:12px}.expanded-reply-header{padding:14px 18px}.expanded-reply-body{padding:20px}}

/* Keep long replies compact while retaining the full expandable text. */
#historyReply{max-height:160px;overflow-y:auto;overscroll-behavior:contain;padding-inline-end:8px;scrollbar-gutter:stable}

.phone-national-input{display:flex;align-items:center;border:1px solid #aebac7;border-radius:8px;background:white;padding-left:10px;direction:ltr}.phone-national-input:focus-within{outline:3px solid #d48b12;outline-offset:3px}#phoneNationalPrefix:not(:empty){margin-right:6px}#ownPhone{border:0;background:transparent;padding-left:0;min-width:0;outline:none}#ownPhone::placeholder{color:#9299a3;opacity:1}

#regionTrigger{width:100%;height:46px;display:flex;align-items:center;gap:8px;text-align:start;padding:8px;font-size:14px;color:#243746;background:white;border:1px solid #aebac7;border-radius:8px;overflow:hidden}#regionTrigger::after{content:'▾';margin-inline-start:auto}#regionChoices{position:absolute;z-index:10;top:100%;left:0;width:max(100%,280px);max-width:80vw;max-height:240px;overflow:auto;background:white;border:1px solid #aebac7;border-radius:8px;box-shadow:0 4px 12px #0002}#regionChoices[hidden]{display:none}#regionChoices button{display:flex;align-items:center;gap:10px;width:100%;margin:0;border:0;border-radius:0;background:white;color:#243746;text-align:start;padding:10px;font-size:14px}#regionChoices button:hover,#regionChoices button:focus,#regionChoices button[aria-selected=true]{background:#eaf2fc}.country-flag{display:inline-flex;flex:0 0 24px;width:24px;height:18px}.region-control .country-flag svg,.region-control.searching .country-flag svg{position:static;display:block;transform:none;width:24px;height:18px}#phoneRegion[hidden]{display:none}

.country-caption{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#regionTrigger{white-space:nowrap}@media(max-width:480px){#loginDialog .phone-row{grid-template-columns:minmax(0,1fr)}#regionChoices{width:100%;max-width:100%}}
