/* Adapter for real Firebase controls. The original web design is loaded first. */
.profile-small{width:30px;height:24px;object-fit:contain}.profile-portrait{width:88px;height:auto;object-fit:contain;margin-bottom:20px}.account-product{width:min(360px,100%);margin:24px auto 0}.account-dispenser{display:block;width:100%;height:auto}.account-section:has(.account-product) .account-card{align-self:center}.role-choices{border:0;padding:0;margin:22px 0}.role-choices legend{font-size:.88rem;font-weight:600}.role-choices .role-cards{margin:12px 0 0}.role-choices .role-card{cursor:pointer;position:relative;text-align:left}.role-choices input{position:absolute;right:12px;top:12px;width:17px;min-height:17px;accent-color:#079fe8}.role-choices .role-card:has(input:checked){border-color:#35b9ff;background:#123853}.role-choices small{font-weight:400}.account-field input,.account-field select,.account-field textarea{font:inherit}.check{display:flex;align-items:flex-start;gap:12px;font-size:.8rem;color:#b7c9d9;line-height:1.6;margin:22px 0}.check input{width:20px;height:20px;flex-shrink:0;margin-top:3px;accent-color:#079fe8}.account-section .btn{margin-top:22px}.account-card .auth-links .account-link{font-size:.84rem;margin-top:26px;margin-bottom:0}.account-card .back-home{margin-top:25px}.stack{display:grid;gap:12px}.stack .btn{margin-top:0}.form-message{font-size:.85rem;color:#ffbdc5;line-height:1.7;margin-top:14px}.form-message:empty{display:none}.message{background:#12344e;color:#d9f2ff;border:1px solid #376786;border-radius:10px;padding:16px 20px;margin:20px 0;line-height:1.7;font-size:.85rem;overflow-wrap:anywhere}.message.error{border-color:#925463;background:#352535;color:#ffd1d8}.message.success{background:#143e39;border-color:#347468;color:#bcead6}.message button{margin:8px 0 0 10px;padding:6px 12px;min-height:36px;font-size:.78rem}.emulator{font-size:.78rem;color:#ffd18a;border:1px solid #b48a3c;border-radius:8px;padding:12px 16px;margin:15px 0}.loading{display:grid;justify-items:center;align-content:center;gap:18px;min-height:60vh;padding:50px 22px;text-align:center}.loading h1{font-size:2rem}.loading .message{max-width:650px}.spinner{display:block;width:27px;height:27px;border:2px solid #28445c;border-top-color:#35b9ff;border-radius:50%;animation:firebase-spin .8s linear infinite}@keyframes firebase-spin{to{transform:rotate(360deg)}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
/* Additional controls use the original web palette, cards, spacing and breakpoints. */
.web-workspace{padding-top:86px}.web-workspace .workspace-menu{display:none}.web-workspace .web-account-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.web-workspace button{font:inherit;cursor:pointer}.web-workspace button:disabled{opacity:.55;cursor:wait}.web-workspace .panel-refresh{border:0;background:transparent}.web-workspace .account-role{display:flex;align-items:center;gap:9px}.web-workspace .sync-line{display:flex;align-items:center;gap:8px;color:#9fc4e0;font-size:.72rem;line-height:1.6;margin-bottom:22px;flex-wrap:wrap}.small-dot{width:7px;height:7px;border-radius:50%;background:#3ddc97;flex-shrink:0;display:inline-block}.small-dot.warning{background:#ffb547}.web-workspace .zone{margin-left:auto}.web-workspace .person-picker{margin-bottom:26px}.web-workspace .page-heading{margin-top:26px}.web-workspace .surface{margin-bottom:22px}.web-workspace .overview-grid>.surface{margin-bottom:0}.web-workspace .metric{display:block}.web-workspace .metric>span,.web-workspace .metric>small{display:block;color:#a9c4da;font-size:.76rem}.web-workspace .metric strong{display:block;font-size:1.8rem;margin:12px 0}.web-workspace .grow{flex:1;min-width:0}.web-workspace .dose-clock{min-width:68px;color:#e4f5ff}.web-workspace .dose-row>.dose-clock{flex:0 0 72px}.web-workspace .dose-clock small{display:block;font-size:.62rem;color:#a6bbcf}.web-workspace .dose-row{align-items:center;flex-wrap:wrap}.web-workspace .dose-row>button{margin-left:auto}.web-workspace .dose-row .grow{min-width:120px}.web-workspace .dose-row h3{font-size:1rem}.web-workspace .dose-row p{font-size:.8rem;margin:4px 0}.tag{display:inline-block;border:1px solid #246783;background:#0b3d51;color:#a0e6ff;padding:3px 9px;border-radius:6px;font-size:.7rem;line-height:1.6}.tag.taken,.tag.late{background:#153d36;border-color:#376d5a;color:#bce9d5}.tag.pending{background:#3d3228;border-color:#6b5540;color:#f5d8a6}.tag.missed{background:#432835;border-color:#875364;color:#ffc1ce}.source{display:block;font-size:.67rem;color:#a6bbcf;margin-top:7px}.web-workspace .fine,.web-workspace .fine-print{font-size:.75rem;line-height:1.7;margin-top:18px;color:#9ab8ce}.web-workspace .next-bottom a{color:#d1edff}.web-workspace .stat-card small{font-size:.65rem;line-height:1.5;color:#a9c4da;display:block}.web-workspace .empty{padding:30px 12px;text-align:center;grid-column:1/-1}.web-workspace .empty>span{font-size:1.8rem;color:#57caff}.web-workspace .empty h3{margin:12px 0}.web-workspace .empty p{max-width:500px;margin:0 auto 18px;line-height:1.7}.web-workspace .patient-grid{margin:24px 0}.web-workspace .avatar{display:grid;place-items:center;width:46px;height:46px;margin-bottom:20px;border-radius:14px;background:#0b3c55;color:#62d3ff;font-size:1.3rem}.web-workspace .card-actions{display:flex;gap:15px;align-items:center;flex-wrap:wrap}.web-workspace .search{display:block;max-width:450px;font-size:.85rem;color:#acc4d9}.web-workspace .search input,.web-workspace .filter-label select,.web-workspace .filters input,.web-workspace .filters select{display:block;background:#071b2d;color:#f2f8ff;border:1px solid #365d78;border-radius:8px;min-height:48px;padding:10px 14px;width:100%;margin-top:8px}.web-workspace .filter-label{display:block;max-width:260px;margin:20px 0;color:#acc4d9;font-size:.85rem}.web-workspace .treatment-facts{display:grid;grid-template-columns:1fr 1fr;gap:24px;margin:20px 0;border-top:1px solid #28475f;padding-top:20px}.web-workspace .treatment-facts span{font-size:.75rem;color:#a6bbcf;display:block}.web-workspace .treatment-facts strong{font-size:.95rem;font-weight:600;overflow-wrap:anywhere}.web-workspace .section-heading{align-items:center}.web-workspace .section-heading p{margin-bottom:0;font-size:.85rem}.web-workspace .filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin:24px 0}.web-workspace .account-field{margin:0}.web-workspace .field{display:grid;gap:10px;color:#acc4d9;font-size:.85rem}.web-workspace .device-card{display:grid;grid-template-columns:1fr 360px;gap:35px;align-items:center}.web-workspace .device-card img{width:100%;height:260px;object-fit:contain}.web-workspace .device-card h2{font-size:1.7rem}.web-workspace .profile-card{max-width:620px}.web-workspace .profile-card form{border-block:1px solid #28475f;padding:22px 0;margin:24px 0}.web-workspace .profile-card .role-card{background:#0d243b;border:1px solid #2a4b67;border-radius:12px;padding:20px;display:grid;gap:10px}.web-workspace .profile-card .role-cards{display:grid;grid-template-columns:1fr 1fr;gap:15px}.web-workspace .workspace-note{margin-top:35px;border-top:1px solid #254159;padding-top:22px;display:flex;justify-content:space-between;gap:18px}.text-button{border:0;background:transparent;color:#65ceff;padding:8px 0;cursor:pointer;min-height:40px}.danger{color:#ffbdc5}.notes{white-space:pre-wrap}.web-workspace .stack{display:grid;gap:20px}.web-workspace .stack>.surface{margin:0}.web-workspace .muted{color:#a6bbcf}.web-workspace .small{font-size:.76rem;padding:8px 12px}.web-workspace .app-content>h1{margin-top:26px}.large-type .web-workspace{font-size:19px}
#editor{color:#e9f6ff;background:linear-gradient(140deg,#10263d,#0b2035);border:1px solid #3c7193;border-radius:22px;padding:30px;width:calc(100% - 32px);max-width:640px;max-height:90dvh;margin:auto;box-shadow:0 30px 100px #0009}#editor::backdrop{background:#020b17bc;backdrop-filter:blur(6px)}#editor .section-heading{display:flex;justify-content:space-between;gap:20px;align-items:center;margin-bottom:22px}#editor h2{font-size:1.4rem;line-height:1.3;margin:0}#editor p{color:#acc7dc;line-height:1.7;font-size:.85rem}#editor .field{display:grid;gap:10px;font-size:.88rem;font-weight:600;margin:22px 0}#editor textarea,#editor select{width:100%;min-height:50px;background:#071b2d;color:#f2f8ff;border:1px solid #365d78;border-radius:8px;padding:12px 14px;font:inherit}#editor textarea{resize:vertical}#editor .form-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 18px}#editor .dialog-actions{display:flex;justify-content:flex-end;gap:14px;margin-top:24px}#editor button{border:1px solid #119dd4;background:linear-gradient(110deg,#058bcb,#08a8e5);color:#fff;border-radius:10px;padding:11px 18px;font:inherit;cursor:pointer;min-height:46px}#editor button.secondary{background:#0a2439;border-color:#3288b8;color:#84dbff}#editor button.text-button{background:#193b54;border-color:#396784;padding:8px 12px}#editor button:disabled{opacity:.55;cursor:wait}.conflict{border:1px solid #ffb547;border-radius:12px;padding:18px;margin-top:18px}.conflict h3{color:#ffd18a;font-size:1rem}.conflict dl{display:grid;grid-template-columns:1fr 1fr;gap:8px;font-size:.8rem;line-height:1.7;margin:14px 0;overflow-wrap:anywhere}.conflict dt{color:#a6bbcf}.conflict dd{margin:0}.conflict .message{margin-bottom:0}a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid #6ed8ff;outline-offset:4px}
@media(max-width:1100px){.web-workspace .device-card{grid-template-columns:1fr 260px}.web-workspace .web-account-actions{gap:8px}.web-workspace .panel-context{flex-wrap:wrap}.web-workspace .person-picker{flex-wrap:wrap}.web-workspace .person-picker .btn{margin-left:0}}
@media(max-width:760px){.web-workspace{padding-top:72px}.account-section{padding-top:100px}.account-product{width:min(220px,85%);margin-top:16px}.web-workspace .workspace-menu{display:block;margin:0 0 24px;border:1px solid #2a4b67;background:#0d243b;border-radius:12px;padding:14px 18px}.web-workspace .workspace-menu summary{cursor:pointer;color:#b4dff5;font-size:.9rem;min-height:30px}.web-workspace .workspace-menu .desktop-nav{margin-top:12px;grid-template-columns:1fr 1fr}.web-workspace .workspace-menu a{font-size:.8rem;padding:12px 8px}.web-workspace .app-frame{display:block;width:90%}.web-workspace .sidebar{display:none}.web-workspace .person-picker select{max-width:100%;width:100%}.web-workspace .person-picker .btn{width:100%;margin:5px 0 0}.web-workspace .web-account-actions .btn{padding:9px 12px;font-size:.8rem}.web-workspace .web-account-actions .panel-refresh{font-size:.75rem}.web-workspace .stats-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.web-workspace .stat-card small{font-size:.59rem}.web-workspace .stat-card strong{font-size:1.6rem}.web-workspace .stats-grid .metric:last-child{grid-column:auto}.web-workspace .dose-row>button{margin-left:0}.web-workspace .filters{grid-template-columns:1fr 1fr}.web-workspace .filters>.field:last-child{grid-column:1/-1}.web-workspace .section-heading{flex-wrap:wrap;gap:14px}.web-workspace .treatment-facts{grid-template-columns:1fr;gap:18px}.web-workspace .device-card{grid-template-columns:1fr;gap:15px}.web-workspace .device-card img{height:230px}.web-workspace .workspace-note{flex-direction:column;gap:5px}.web-workspace .stat-card.metric{padding:15px 10px}.web-workspace .metric strong{font-size:1.5rem}.web-workspace .metric>span{font-size:.64rem}.zone{display:none}#editor{padding:25px 22px}#editor .form-grid{grid-template-columns:1fr}#editor .dialog-actions{flex-wrap:wrap}.role-choices .role-card{padding:16px}.role-choices .role-card small{font-size:.75rem}}
@media(prefers-reduced-motion:reduce){.spinner{animation:none}}

body[data-workspace="true"]>.integration-footer{display:none}
/* Scale rem-based headings and controls along with the inherited workspace text. */
html.large-type{font-size:19px}
@media(max-width:760px){.large-type .web-workspace .filters{grid-template-columns:minmax(0,1fr)}}

/* Contextual action icons retain their text labels. */
.web-workspace .desktop-nav .icon,.web-workspace .panel-refresh .icon{color:#5acaff}.web-workspace .text-button{display:inline-flex;align-items:center;gap:8px}.web-workspace .btn>.icon,.web-workspace .text-button>.icon{width:18px;height:18px}
