:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: #292a30;
  background: #eef3f8;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --text-primary: #292a30;
  --text-secondary: #40424a;
  --text-muted: #666d76;
  --glass-line: #ffffffbb;
  --dock-bottom: 5px;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
}

button, a { font: inherit; }
button { color: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible {
  outline: 2px solid #23404a;
  outline-offset: 3px;
}

.desktop {
  position: relative;
  isolation: isolate;
  width: 100vw;
  height: 100vh;
  min-height: 360px;
  overflow: hidden;
  background: #dce9e9;
}

.wallpaper, .wallpaper-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.wallpaper {
  z-index: -2;
  object-fit: cover;
  object-position: center;
  user-select: none;
}

.wallpaper-shade {
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(16, 37, 47, .09), transparent 22%, transparent 72%, rgba(16, 37, 47, .08)),
    radial-gradient(ellipse at 50% 82%, transparent 12%, rgba(10, 35, 43, .08) 100%);
}

.desktop-statusbar {
  position: absolute;
  z-index: 80;
  inset: 0 0 auto;
  display: flex;
  min-height: 35px;
  align-items: center;
  gap: 14px;
  padding: 3px 15px;
  border-bottom: 1px solid var(--glass-line);
  background: linear-gradient(180deg, #f4faf9e8, #e2ededdd);
  box-shadow: 0 3px 18px #09142a20, inset 0 1px #ffffffdc;
  color: #202c31;
  font-size: 13px;
  user-select: none;
  backdrop-filter: blur(28px) saturate(170%);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
}

.statusbar-brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  white-space: nowrap;
  color: #202c31;
  font-size: 14px;
  letter-spacing: -.025em;
  line-height: 1;
  text-decoration: none;
}

.statusbar-brand img {
  display: block;
  width: 26px;
  height: 26px;
  margin-right: 7px;
}

.brand-sajilo { font-weight: 600; }
.brand-dental { margin-left: 4px; font-weight: 350; }

.workspace-role-picker { position: relative; flex: 0 0 auto; }
.statusbar-role-switch { padding: 5px 9px; border: 1px solid #55788a55; border-radius: 6px; background: #ffffff70; color: #202c31; font-size: 12px; font-weight: 650; white-space: nowrap; }
.statusbar-role-switch:hover:not(:disabled) { border-color: #55788a96; background: #ffffffc4; color: #17272c; }
.statusbar-role-switch:focus-visible { outline: 2px solid #c6d5ff70; outline-offset: 1px; }
.statusbar-role-switch:disabled { opacity: .55; cursor: wait; }
.statusbar-role-switch[hidden] { display: none; }

.workspace-role-menu {
  position: absolute;
  z-index: 100;
  top: calc(100% + 8px);
  left: 0;
  width: max-content;
  min-width: 210px;
  padding: 9px;
  border: 1px solid #cbd8da;
  border-radius: 10px;
  background: #f8fbfb;
  box-shadow: 0 12px 32px #102c3833;
  color: #24343a;
}
.workspace-role-menu[hidden] { display: none; }
.workspace-role-menu p { margin: 3px 7px 8px; color: #60727a; font-size: 11px; font-weight: 650; }
#workspace-role-options { display: grid; gap: 3px; }
#workspace-role-options button { width: 100%; padding: 8px 9px; border: 0; border-radius: 6px; background: transparent; color: #24343a; text-align: left; font-size: 12px; font-weight: 600; }
#workspace-role-options button:hover, #workspace-role-options button:focus-visible { outline: none; background: #e5eff0; }

.workspace-switch-dialog {
  width: min(420px, calc(100vw - 28px));
  padding: 0;
  border: 1px solid #d0dcde;
  border-radius: 14px;
  background: #f9fbfb;
  color: #29373c;
  box-shadow: 0 24px 70px #0c263655;
}
.workspace-switch-dialog::backdrop { background: #10212a80; backdrop-filter: blur(3px); }
.workspace-switch-form { display: grid; gap: 13px; padding: 23px; }
.workspace-switch-form h2 { margin: 0; color: #20343a; font-size: 19px; }
.workspace-switch-form > p { margin: 0; color: #5c6c71; font-size: 13px; line-height: 1.5; }
.workspace-pin-field { display: grid; gap: 6px; color: #3e5259; font-size: 12px; font-weight: 650; }
.workspace-pin-field[hidden] { display: none; }
.workspace-pin-control { position: relative; display: flex; align-items: center; }
.workspace-pin-field input { width: 100%; min-height: 40px; padding: 8px 42px 8px 10px; border: 1px solid #b9c9cc; border-radius: 7px; background: #fff; color: #25383e; font: inherit; font-variant-numeric: tabular-nums; letter-spacing: .18em; }
.workspace-pin-field input.is-obscured { -webkit-text-security: disc; }
.workspace-pin-reveal { position: absolute; top: 50%; right: 7px; margin: 0; transform: translateY(-50%); color: #536d75; }
.workspace-pin-reveal:hover { background: #eaf2f3; color: #285d6c; }
.workspace-switch-error { padding: 9px 10px; border-radius: 7px; background: #fae9e6; color: #913e35 !important; }
.workspace-switch-error[hidden] { display: none; }
.workspace-switch-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.workspace-switch-actions button { min-height: 36px; padding: 7px 12px; border: 1px solid #bdcdd0; border-radius: 7px; background: #fff; color: #2c444c; font-size: 12px; font-weight: 650; }
.workspace-switch-actions .workspace-switch-confirm { border-color: #286579; background: #286579; color: #fff; }
.workspace-switch-actions button:disabled { cursor: wait; opacity: .58; }
.signout-confirmation-form { gap: 0; padding: 25px 26px 22px; }
.signout-confirmation-mark { width: 40px; height: 40px; margin-bottom: 17px; }
.signout-confirmation-form h2 { color: #233342; font-size: 20px; line-height: 1.4; letter-spacing: -.015em; }
.signout-confirmation-form > p { margin: 10px 0 0; color: #526675; font-size: 14px; line-height: 1.5; }
.signout-confirmation-form .workspace-switch-error { color: #a33830 !important; }
.signout-confirmation-form .workspace-switch-actions { gap: 9px; margin-top: 24px; }
.signout-confirmation-form .workspace-switch-actions button { min-width: 82px; min-height: 38px; padding: 0 15px; font-size: 13px; }
.signout-confirmation-form .workspace-switch-actions .workspace-switch-cancel { border-color: #cbd7e0; background: #fff; color: #34495a; }
.signout-confirmation-form .workspace-switch-actions .workspace-switch-cancel:hover { background: #f2f6f8; }
.signout-confirmation-form .workspace-switch-actions .workspace-switch-confirm { border-color: #c95049; background: #d95e56; color: #fff; box-shadow: 0 2px 6px #a3413a30; }
.signout-confirmation-form .workspace-switch-actions .workspace-switch-confirm:hover:not(:disabled) { background: #c94c45; }
.workspace-switching-backdrop { position: fixed; z-index: 12010; inset: 0; display: grid; place-items: center; padding: 24px; background: #07182ca6; backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px); }
.workspace-switching-backdrop[hidden] { display: none; }
.workspace-switching-card { width: min(440px, 100%); display: flex; align-items: center; gap: 16px; padding: 24px; border: 1px solid #ffffffd9; border-radius: 18px; background: linear-gradient(150deg, #fff, #f2f7fa); box-shadow: 0 24px 72px #07182c66, inset 0 1px #fff; color: #233342; }
.workspace-switching-card > img { width: 42px; height: 42px; flex: 0 0 auto; }
.workspace-switching-spinner { width: 24px; height: 24px; flex: 0 0 24px; border: 3px solid #d3e8eb; border-top-color: #287f91; border-radius: 50%; animation: workspace-switch-spin 1s linear infinite; }
.workspace-switching-card h2 { margin: 0; font-size: 18px; font-weight: 650; line-height: 1.35; }
.workspace-switching-card p { margin: 4px 0 0; color: #34495a; font-size: 14px; }
.workspace-switching-card div > span { display: block; margin-top: 4px; color: #657782; font-size: 12px; }
@keyframes workspace-switch-spin { to { transform: rotate(360deg); } }
.workspace-switch-success { position: fixed; z-index: 12020; left: 50%; bottom: 96px; transform: translateX(-50%); max-width: calc(100vw - 32px); display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid #a8d8bf; border-radius: 12px; background: #f2fbf6f5; box-shadow: 0 12px 32px #102f4545; color: #254638; }
.workspace-switch-success[hidden] { display: none; }
.workspace-switch-success-icon { width: 22px; height: 22px; flex: 0 0 auto; fill: none; stroke: #26845c; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.workspace-switch-success > div { display: grid; gap: 3px; }
.workspace-switch-success strong { font-size: 13px; font-weight: 700; }
.workspace-switch-success span { color: #536f60; font-size: 12px; }
.workspace-switch-success button { display: grid; flex: 0 0 28px; width: 28px; height: 28px; place-items: center; margin-left: 4px; border: 1px solid #55788a26; border-radius: 7px; background: #ffffff9c; color: #476354; cursor: pointer; font-size: 20px; line-height: 1; }
.workspace-switch-success button:hover { background: #fff; }
.workspace-switch-success button:focus-visible { outline: 2px solid #317d9b; outline-offset: 2px; }

.statusbar-right {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
  margin-left: auto;
  color: #202c31;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.statusbar-network, .statusbar-battery { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 5px; color: #202c31; font-size: 12px; font-weight: 650; }
.statusbar-network svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.network-offline-icon { display: none; }
.statusbar-network.is-offline .network-online-icon { display: none; }
.statusbar-network.is-offline .network-offline-icon { display: block; }
.statusbar-network.is-online { color: #315e4b; }
.statusbar-network.is-offline { color: #9a4e44; }
.statusbar-network span { color: #202c31; }
.statusbar-battery { gap: 4px; color: #43565d; font-variant-numeric: tabular-nums; }
.statusbar-battery svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.statusbar-battery .battery-level { fill: currentColor; stroke: none; }
.statusbar-battery[hidden], .clinic-widget-signout[hidden] { display: none; }
.statusbar-battery.is-charging { color: #315e4b; }
.statusbar-battery.is-low { color: #91483c; }

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #57896b;
  box-shadow: 0 0 0 3px #57896b1a;
}

#status-time { font-weight: 700; }

.fullscreen-toggle {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 8px 15px;
  border: 1px solid #0d6e8d;
  border-radius: 10px;
  background: linear-gradient(135deg, #168db2, #0c6b8a);
  box-shadow: 0 5px 14px #0b4b6240, inset 0 1px #ffffff55;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  pointer-events: auto;
}

.fullscreen-toggle:hover:not(:disabled) { border-color: #075977; background: linear-gradient(135deg, #1b9ac1, #0d789a); box-shadow: 0 7px 18px #0b4b6255, inset 0 1px #ffffff66; }
.fullscreen-toggle:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.fullscreen-toggle:disabled { cursor: not-allowed; opacity: .55; }
.fullscreen-symbol { font-size: 23px; line-height: 1; }
.home-clinic-actions { position:absolute; z-index:6; top:140px; left:18px; display:flex; align-items:center; gap:10px; pointer-events:auto; }
.home-fullscreen-toggle { position:static; }
.home-workspace-role-picker .statusbar-role-switch { min-height:44px; padding:8px 14px; border-color:#55788a70; border-radius:10px; background:#f6fbfbd9; box-shadow:0 5px 14px #102f4526, inset 0 1px #ffffffd9; font-size:13px; cursor:pointer; }
.home-workspace-role-picker .statusbar-role-switch:hover:not(:disabled) { border-color:#55788aa6; background:#fff; }

.home-view {
  position: absolute;
  inset: 35px 0 88px;
  display: block;
  overflow: auto;
  padding: 24px 18px 18px;
  pointer-events: none;
}

.home-view[hidden] { display: none; }

.desktop-widget { position: absolute; z-index: 5; color: #202c31; border: 1px solid #ffffffb0; border-radius: 19px; background: linear-gradient(145deg, #f2f8f6de, #eaf1f2c9); box-shadow: 0 12px 32px #102f4530, inset 0 1px #ffffffc4; backdrop-filter: blur(28px) saturate(165%); -webkit-backdrop-filter: blur(28px) saturate(165%); pointer-events: none; }
.desktop-clinic-widget { top: 24px; left: 18px; width: min(390px, calc(50vw - 30px)); min-height: 104px; display: flex; align-items: center; gap: 16px; padding: 16px 18px; }
.desktop-clinic-widget[hidden] { display: none; }
.operating-role-widget { bottom:12px; left:18px; width:max-content; max-width:min(200px, calc(50vw - 30px)); min-height:44px; display:inline-flex; align-items:center; justify-content:flex-start; gap:9px; padding:7px 13px 7px 8px; border:1px solid #ffffff73; border-radius:999px; background:linear-gradient(135deg, #155f67f2, #123f59f2); box-shadow:0 6px 18px #0b313b4d, inset 0 1px #ffffff38; color:#f7fffc; backdrop-filter:blur(14px) saturate(145%); -webkit-backdrop-filter:blur(14px) saturate(145%); }
.operating-role-widget[hidden] { display:none; }
.operating-role-icon { width:27px; height:27px; flex:0 0 27px; padding:5px; border:1px solid #ffffff35; border-radius:50%; background:#ffffff19; fill:none; stroke:#d7f5eb; stroke-linecap:round; stroke-linejoin:round; stroke-width:1.8; }
.operating-role-copy { display:flex; min-width:0; flex-direction:column; gap:1px; }
.operating-role-label { color:#c6e6e1; font-size:9.5px; font-weight:650; letter-spacing:.035em; line-height:1.15; white-space:nowrap; }
.operating-role-value { min-width:0; margin:0; overflow:hidden; color:#fff; font-size:14px; font-weight:750; letter-spacing:0; line-height:1.1; text-overflow:ellipsis; white-space:nowrap; }
.clinic-widget-mark { width: 48px; height: 48px; flex: 0 0 48px; display: grid; place-items: center; border: 1px solid #ffffffc9; border-radius: 15px; background: linear-gradient(145deg, #c7e8e2, #8cc3bc); box-shadow: 0 5px 13px #1c58602b; color: #164d50; font-size: 15px; font-weight: 750; letter-spacing: .04em; }
.clinic-widget-mark.has-logo { width: 104px; height: 72px; flex-basis: 104px; overflow: hidden; padding: 2px; border-color: #ffffffd6; border-radius: 15px; background: #fff; }
.clinic-widget-mark img { display: block; width: auto; height: auto; min-width: 0; min-height: 0; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 11px; }
.clinic-widget-copy { display: flex; flex: 0 1 auto; flex-direction: column; gap: 3px; min-width: 0; }
.clinic-widget-copy strong, .clinic-widget-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clinic-widget-copy strong { color: #29383e; font-size: 14px; font-weight: 700; }
.clinic-widget-copy span { color: #29383e; font-size: 13px; font-weight: 600; }
.clinic-widget-copy small { color: #3d494e; font-size: 11px; font-weight: 600; }
.clinic-widget-signout { display: flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 5px; min-height: 32px; margin-left: 0; padding: 6px 8px; border: 1px solid #55788a36; border-radius: 8px; background: #ffffffa8; color: #29444b; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; pointer-events: auto; }
.clinic-widget-signout svg { width: 15px; height: 15px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.clinic-widget-signout:hover { border-color: #55788a70; background: #fff; color: #173e47; }
.clinic-widget-signout:focus-visible { outline: 2px solid #317d9b; outline-offset: 2px; }
.clinic-widget-signout:disabled { opacity: .55; cursor: wait; }

.app-explorer-dialog {
  width: min(700px, calc(100vw - 28px));
  max-width: 700px;
  max-height: min(82vh, 680px);
  padding: 0;
  overflow: hidden;
  border: 1px solid #ffffffd4;
  border-radius: 22px;
  background: linear-gradient(145deg, #f8fbf8fb, #e9f0f2fa);
  color: #26363d;
  box-shadow: 0 26px 80px #0c263655, inset 0 1px #ffffff;
  backdrop-filter: blur(7px) saturate(117%);
  -webkit-backdrop-filter: blur(7px) saturate(117%);
}
.app-explorer-dialog::backdrop { background: #10212a70; backdrop-filter: blur(3px); }
.app-explorer-panel { padding: 22px; }
.app-explorer-header { display:flex; align-items:center; justify-content:space-between; gap:16px; padding-bottom:16px; border-bottom:1px solid #738a942b; }
.app-explorer-heading { display:flex; min-width:0; align-items:center; gap:13px; }
.app-explorer-heading img { width:48px; height:48px; flex:0 0 auto; padding:5px; border:1px solid #ffffff; border-radius:14px; background:#fff; box-shadow:0 4px 12px #183c4b20; }
.app-explorer-heading p { margin:0 0 3px; color:#61727a; font-size:10px; font-weight:750; letter-spacing:.08em; }
.app-explorer-heading h2 { margin:0; color:#26363d; font-size:23px; line-height:1.2; }
.app-explorer-heading span { display:block; margin-top:4px; color:#61727a; font-size:12px; }
.app-explorer-close { display:grid; width:36px; height:36px; flex:0 0 auto; place-items:center; border:1px solid #81949a40; border-radius:50%; background:#ffffffa8; color:#3b5059; font-size:25px; line-height:1; }
.app-explorer-close:hover { background:#fff; }
.app-explorer-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(112px, 1fr)); gap:12px; max-height:min(55vh, 440px); overflow:auto; padding:18px 2px 2px; }
.app-explorer-card { display:flex; min-height:118px; flex-direction:column; align-items:center; justify-content:center; gap:9px; padding:12px 8px; border:1px solid #ffffffb8; border-radius:15px; background:#ffffff72; color:#35484f; box-shadow:0 2px 9px #23434c12; font-size:12px; font-weight:650; text-align:center; }
.app-explorer-card:hover,.app-explorer-card:focus-visible { border-color:#3b9bb9; background:#ffffffd8; color:#125d7a; outline:none; box-shadow:0 5px 16px #153e4d20; }
.app-explorer-card img { width:58px; height:58px; border-radius:15px; object-fit:cover; box-shadow:0 3px 10px #173c5033; }
.app-explorer-empty { margin:18px 0 2px; padding:20px; border:1px dashed #9bafb5; border-radius:12px; color:#61727a; font-size:13px; text-align:center; }
.desktop-widget-collection { position: absolute; top: 24px; right: 18px; width: min(520px, calc(58vw - 18px)); display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(180px, .95fr); grid-template-rows: minmax(88px, auto) auto; gap: 11px; font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif; line-height: 1.4; font-synthesis: none; pointer-events: none; }
.desktop-widget-collection .desktop-widget { position: relative; inset: auto; min-width: 0; }
.nepali-calendar-widget { grid-column: 1; grid-row: 1 / span 2; padding: 13px 14px 12px; }
.time-widget { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; justify-content: center; padding: 12px 14px; }
.gregorian-calendar-widget { grid-column: 2; grid-row: 2; padding: 10px 11px 11px; }
.widget-kicker { color: #344147; font-size: 11px; font-weight: 600; letter-spacing: .65px; line-height: 1.3; }
.calendar-widget-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; padding-top: 7px; border-top: 1px solid #55768a2e; }
.calendar-widget-heading > span { display: flex; min-width: 0; align-items: center; gap: 6px; overflow: hidden; color: #29383e; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.calendar-widget-heading > span > svg { width: 14px; height: 14px; flex: 0 0 14px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.calendar-widget-controls { display: flex; flex: 0 0 auto; gap: 3px; }
.calendar-widget-controls button { width: 25px; height: 25px; display: grid; place-items: center; padding: 0 0 2px; border: 1px solid #53778a24; border-radius: 8px; background: #ffffff67; color: #29383e; font: inherit; font-size: 23px; line-height: 1; cursor: pointer; pointer-events: auto; }
.calendar-widget-controls button:hover:not(:disabled) { background: #ffffffc7; }
.calendar-widget-controls button:disabled { opacity: .35; cursor: default; }
.calendar-widget-controls button:focus-visible { outline: 2px solid #317d9b; outline-offset: 1px; }
.calendar-widget-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; margin-top: 5px; text-align: center; font-size: 13px; font-variant-numeric: tabular-nums; }
.calendar-widget-grid > span { min-height: 24px; display: grid; place-items: center; border-radius: 7px; color: #303f45; }
.calendar-widget-grid > span[role="columnheader"] { min-height: 20px; color: #3b484d; font-size: 12px; font-weight: 600; }
.calendar-widget-grid > span.is-today { background: #397d91; color: #fff; font-weight: 750; box-shadow: 0 2px 6px #24596c3b; }
.gregorian-calendar-heading { margin: 0; padding: 0; border: 0; }
.gregorian-calendar-heading > span { font-size: 14px; }
.gregorian-calendar-grid { gap: 1px; margin-top: 5px; font-size: 13px; }
.gregorian-calendar-grid > span { min-height: 21px; border-radius: 6px; }
.clock-widget-time { color: #202c31; font-size: clamp(24px, 2vw, 31px); font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.04em; line-height: 1.05; white-space: nowrap; }
.time-widget-date { margin-top: 4px; color: #3b484d; font-size: 11px; font-weight: 550; }

.brand-splash, .identity-gate {
  position: fixed;
  z-index: 100000;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  color: #f0f7fa;
}

.brand-splash[hidden], .identity-gate[hidden], .identity-message[hidden] { display: none; }

.sajilo-startup-surface {
  background:
    radial-gradient(ellipse at 51% 39%, #477e8d38, transparent 43%),
    radial-gradient(ellipse at 100% 100%, #168d8361, transparent 60%),
    linear-gradient(133deg, #10162e 0%, #192b49 49%, #144b54 100%);
  background-color: #10162e;
}

.brand-splash__ambient {
  position: absolute;
  z-index: -1;
  width: min(68vw, 760px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(ellipse, #79e0cf19, transparent 66%);
  transform: translateY(-12%);
}

.brand-splash__flow {
  position: absolute;
  z-index: -1;
  width: 115vw;
  height: 62vh;
  border-radius: 35% 48% 0 0;
  border-top: 1px solid #b2f5e91a;
  background: linear-gradient(180deg, #72d6c70b, #0c233700 65%);
  box-shadow: 0 -12px 90px #71cfc008;
  pointer-events: none;
}

.brand-splash__flow--near { bottom: -38vh; left: -24vw; transform: rotate(22deg); }
.brand-splash__flow--far { top: -48vh; right: -35vw; transform: rotate(28deg); opacity: .65; }

.brand-splash__lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px;
  text-align: center;
  transform: translateY(-7px);
}

.brand-splash__mark {
  display: block;
  width: clamp(112px, 12vw, 152px);
  height: auto;
  margin-bottom: 27px;
  filter: drop-shadow(0 16px 24px #06111e55);
  animation: brand-splash-arrive 850ms cubic-bezier(.2, .78, .22, 1) both;
}

.brand-splash__name {
  margin: 0;
  color: #f3f8fb;
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 600;
  letter-spacing: -.045em;
  line-height: 1.15;
  animation: brand-splash-arrive 800ms 130ms both;
}

.brand-splash__name span { color: #d4e8ec; font-weight: 350; }
.brand-splash__tagline { margin: 14px 0 0; color: #a9c2cd; font-size: clamp(13px, 1.7vw, 15px); font-weight: 400; letter-spacing: .018em; line-height: 1.6; animation: brand-splash-arrive 800ms 240ms both; }
.brand-splash__tagline span { color: #c3dfdb; }
.brand-splash__startup { width: min(230px, 65vw); margin-top: 43px; }
.brand-splash__progress { height: 3px; overflow: hidden; border-radius: 5px; background: #d7eef21c; }
.brand-splash__progress-fill { width: 38%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #5faeb3, #a1e2ce); animation: brand-splash-check 1.8s ease-in-out infinite; }
.brand-splash__progress[data-complete="true"] .brand-splash__progress-fill { width: 100%; animation: none; }
.brand-splash__status { margin: 13px -30px 0; color: #9cb9c6; font-size: 11px; line-height: 1.6; letter-spacing: .025em; }
.brand-splash__sound { position: absolute; right: 28px; bottom: 24px; display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 8px 12px; border: 1px solid #d0e9e51c; border-radius: 20px; background: #0e263633; color: #b5cfd4; font: inherit; font-size: 11px; cursor: pointer; }
.brand-splash__sound:hover { background: #b3dace12; color: #f0f7fa; }
.brand-splash__sound:focus-visible { outline: 2px solid #a1e2ce; outline-offset: 4px; }
.brand-splash__sound svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.sound-off-icon { display: none; }
.brand-splash__sound[aria-pressed="false"] .sound-on-icon { display: none; }
.brand-splash__sound[aria-pressed="false"] .sound-off-icon { display: block; }

.identity-gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: auto;
  padding: 24px 24px 20px;
  color: #edf6f7;
  color-scheme: dark;
}

.identity-backdrop { position: absolute; z-index: -1; inset: 0; overflow: hidden; pointer-events: none; }
.identity-backdrop .brand-splash__ambient { top: 12%; }
.identity-brand { position: absolute; top: 24px; left: 30px; color: #e0eff3; font-size: 14px; font-weight: 650; letter-spacing: -.025em; }
.identity-brand span { color: #abc6d0; font-weight: 350; }
.identity-exit-fullscreen { position: absolute; top: 16px; right: 20px; min-height: 40px; padding: 6px 12px; }
.identity-exit-fullscreen[hidden] { display: none; }
.identity-clock { flex: 0 0 auto; text-align: center; text-shadow: 0 2px 22px #07172c33; }
.identity-clock p { margin: 0 0 1px; color: #cadfe4; font-size: 15px; font-weight: 500; }
.identity-clock time { display: block; color: #edf6f7; font-size: clamp(48px, 8vh, 76px); font-weight: 600; letter-spacing: -.055em; line-height: 1.12; font-variant-numeric: tabular-nums; }
.identity-center { display: grid; flex: 1 0 auto; place-items: center; width: 100%; padding: 16px 0; }
.identity-card { width: min(320px, 100%); text-align: center; }
.identity-mark { display: block; width: 76px; height: 76px; margin: 0 auto 15px; filter: drop-shadow(0 10px 18px #061b2b55); }
.identity-card h1 { margin: 0; color: #f2f8fa; font-size: 23px; font-weight: 600; letter-spacing: -.025em; line-height: 1.3; }
.identity-intro { margin: 8px 0 18px; color: #b0c9d3; font-size: 13px; line-height: 1.5; }
.identity-form { display: flex; flex-direction: column; text-align: left; }
.identity-field { display: flex; flex-direction: column; gap: 7px; color: #cfdee6; font-size: 12px; font-weight: 500; }
.identity-password-label { margin-top: 15px; margin-bottom: 7px; }
.identity-input { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 45px; padding: 0 13px; border: 1px solid #b3d3dc33; border-radius: 12px; background: #d9eef010; box-shadow: inset 0 1px 0 #e1f6f008, 0 2px 8px #07172b0a; color: #b5cdd7; backdrop-filter: blur(18px); transition: border-color .15s, background .15s; }
.identity-input:focus-within { border-color: #99d6ce; outline: 2px solid #8ee3d322; outline-offset: 2px; background: #d9eef01b; }
.identity-input > svg { flex: 0 0 16px; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.identity-gate input:not([type="checkbox"]) { flex: 1; min-width: 0; width: 100%; height: 43px; padding: 0; border: 0; border-radius: 0; outline: none; box-shadow: none; background: transparent; color: #f3f8fa; font: inherit; font-size: 13px; }
.identity-gate input::placeholder { color: #a1b9c7; font-weight: 400; }
/* Keep browser password-manager autofill inside the same dark field palette. */
.identity-input:has(input:autofill) { background: #254457; }
.identity-input:has(input:-webkit-autofill) { background: #254457; }
.identity-input:has(input:-moz-autofill) { background: #254457; }
.identity-gate input:autofill {
  color: #f3f8fa !important;
  caret-color: #f3f8fa !important;
  background-color: #254457 !important;
  box-shadow: 0 0 0 1000px #254457 inset !important;
  filter: none !important;
}
.identity-gate input:-webkit-autofill,
.identity-gate input:-webkit-autofill:hover,
.identity-gate input:-webkit-autofill:focus {
  -webkit-text-fill-color: #f3f8fa !important;
  caret-color: #f3f8fa !important;
  background-color: #254457 !important;
  box-shadow: 0 0 0 1000px #254457 inset !important;
  filter: none !important;
}
.identity-gate input:-moz-autofill {
  color: #f3f8fa !important;
  caret-color: #f3f8fa !important;
  background-color: #254457 !important;
  box-shadow: 0 0 0 1000px #254457 inset !important;
  filter: none !important;
}
.identity-gate input:disabled { opacity: .65; }
.identity-remember { display: flex; align-items: center; gap: 9px; margin-top: 13px; color: #c9dce3; font-size: 12px; line-height: 1.4; cursor: pointer; user-select: none; }
.identity-gate input[type="checkbox"] { flex: 0 0 16px; width: 16px; height: 16px; margin: 0; accent-color: #91d1c6; cursor: pointer; }
.identity-reveal { display: grid; flex: 0 0 28px; width: 28px; height: 28px; place-items: center; margin-right: -5px; padding: 6px; border: 0; border-radius: 6px; background: transparent; color: #bfd6dd; }
.identity-reveal:hover { background: #ffffff10; color: white; }
.identity-reveal svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.identity-reveal .eye-closed { display: none; }
.identity-reveal[aria-pressed="true"] .eye-open { display: none; }
.identity-reveal[aria-pressed="true"] .eye-closed { display: block; }
.identity-gate button:focus-visible { outline: 2px solid #b0ecdc; outline-offset: 4px; }
.identity-submit { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 44px; margin-top: 15px; padding: 10px 16px; border: 1px solid #b4ead74d; border-radius: 12px; background: linear-gradient(135deg, #afddd4, #88c9c5); box-shadow: 0 5px 18px #071c2f26, inset 0 1px #edfff154; color: #143d46; font-size: 13px; font-weight: 650; }
.identity-submit:hover:not(:disabled) { background: linear-gradient(135deg, #c0e9df, #9dd9d3); }
.identity-submit:disabled { opacity: .55; cursor: wait; }
.identity-submit .submit-arrow { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.identity-submit .identity-spinner { display: none; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 2; }
.identity-submit[aria-busy="true"] .submit-arrow { display: none; }
.identity-submit[aria-busy="true"] .identity-spinner { display: block; animation: identity-spin 1.2s linear infinite; }
.identity-message { margin: 0 0 16px; padding: 10px 12px; border: 1px solid #c3e7e12e; border-radius: 10px; background: #112e4580; color: #d1e7e6; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.identity-message[data-tone="error"] { border-color: #f7c7b94d; background: #6b303347; color: #ffe3d9; }
.identity-note { display: flex; justify-content: center; align-items: flex-start; gap: 7px; margin: 15px 0 0; color: #b0c7d1; font-size: 10px; line-height: 1.6; text-align: left; }
.identity-note svg { flex: 0 0 14px; width: 14px; height: 14px; margin-top: 1px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }

@keyframes brand-splash-arrive { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes brand-splash-check { from { transform: translateX(-110%); } to { transform: translateX(370%); } }
@keyframes identity-spin { to { transform: rotate(360deg); } }

@media (max-width: 600px) {
  .identity-gate { padding: 24px 24px 20px; }
  .identity-brand { position: static; margin-bottom: 20px; }
  .identity-exit-fullscreen { top: 10px; right: 10px; min-height: 36px; gap: 6px; padding: 5px 8px; font-size: 11px; }
  .identity-exit-fullscreen .fullscreen-symbol { font-size: 18px; }
  .identity-clock time { font-size: 52px; }
}

@media (max-height: 700px) {
  .identity-gate { padding-top: 20px; }
  .identity-clock time { font-size: 45px; }
  .identity-clock p { font-size: 12px; }
  .identity-center { padding-top: 18px; }
  .identity-mark { width: 64px; height: 64px; margin-bottom: 10px; }
  .identity-intro { margin-bottom: 16px; }
}

@media (max-height: 450px) {
  .brand-splash__mark { width: 84px; margin-bottom: 15px; }
  .brand-splash__startup { margin-top: 24px; }
  .brand-splash__sound { right: 16px; bottom: 12px; }
}

@media (prefers-reduced-transparency: reduce) {
  .identity-input { background: #254457; backdrop-filter: none; }
}

@media (prefers-reduced-motion: reduce) {
  .brand-splash__mark, .brand-splash__name, .brand-splash__tagline, .brand-splash__progress-fill { animation: none; }
  .identity-input { transition: none; }
  .identity-submit[aria-busy="true"] .identity-spinner { animation: none; }
}

.app-dock[hidden] { display: none; }

.desktop-hint {
  margin: 0;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-shadow: 0 2px 8px #102c3990;
}

.desktop-preview-note {
  margin: 6px 0 0;
  color: #ffffffeb;
  font-size: 11px;
  text-shadow: 0 1px 6px #102c3990;
}

.window-stage {
  position: absolute;
  z-index: 10;
  inset: 0;
  pointer-events: none;
}

.app-window {
  position: absolute;
  top: calc(50% - 24px + var(--window-shift, 0px));
  left: calc(clamp(16px, 2.42vw, 33px) + var(--window-shift, 0px));
  display: flex;
  width: min(1123px, 82.25%, calc(100% - 48px));
  height: min(633px, 82.4%, calc(100% - 122px));
  min-width: min(360px, calc(100% - 24px));
  min-height: 260px;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(-50%);
  border: 1px solid #d3d5d9;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 30px #17202c24, 0 2px 6px #17202c22;
  color: var(--text-primary);
  pointer-events: auto;
}

.app-window[hidden] { display: none; }

.app-window.is-maximized {
  top: 43px !important;
  left: 8px !important;
  width: calc(100% - 16px) !important;
  height: calc(100% - 136px) !important;
  transform: none !important;
}

.app-window:focus { outline: none; }
.app-window.is-dragging, .app-window.is-resizing { user-select: none; }

.window-titlebar {
  position: relative;
  display: block;
  height: 43px;
  min-height: 43px;
  flex: 0 0 auto;
  padding: 0;
  border-bottom: 1px solid #d7d8df;
  background: linear-gradient(180deg, #f5f5f5, #eceef2);
  touch-action: none;
  cursor: grab;
}

.is-dragging .window-titlebar { cursor: grabbing; }

.window-titlebar-leading {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 12px;
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 26px;
  transform: translateY(-50%);
}

.window-title {
  position: absolute;
  top: 50%;
  left: 50%;
  max-width: min(42vw, 600px);
  overflow: hidden;
  color: #292a30;
  font-size: 14px;
  font-weight: 650;
  text-align: center;
  text-overflow: ellipsis;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  pointer-events: none;
}

.window-controls { display: flex; flex: 0 0 auto; align-items: center; gap: 12px; }

.window-control {
  position: relative;
  display: grid;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  place-items: center;
  padding: 0;
  border: 1px solid #00000018;
  border-radius: 50%;
  background: #f4c451;
  box-shadow: 0 1px 3px #14202a32;
  color: #62480d;
  font-size: 13px;
  line-height: 1;
}

.window-control svg { display: block; width: 9px; height: 9px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.window-control.maximize-control { border-color: #00000012; background: #59c77c; color: #174b29; }
.window-control.minimize-control { border-color: #00000012; background: #f4c451; color: #62480d; }
.window-control:hover:not(:disabled) { filter: brightness(.94); }
.window-control:active:not(:disabled) { transform: scale(.94); }
.window-control:focus-visible { outline: 2px solid #23404a; outline-offset: 2px; }
.window-control:disabled { cursor: default; }
.window-control.close-control { border-color: #b64a40; background: #f17368; color: #6c201b; }

.window-history-controls {
  display: flex;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid #c9cfd6;
  border-radius: 8px;
  background: #ffffffb8;
}

.window-history-button {
  display: grid;
  width: 43px;
  height: 34px;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #586571;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.window-history-button svg { display: block; width: 19px; height: 19px; }
.window-history-button:disabled { color: #aab4bd; cursor: default; }
.window-history-button:focus-visible { outline: 2px solid #23404a; outline-offset: -3px; }

.window-resize-handle { position: absolute; z-index: 5; touch-action: none; user-select: none; background: transparent; transition: background-color .12s ease; }
.window-resize-handle:hover { background-color: #1687b326; }
.window-resize-n, .window-resize-s { right: 18px; left: 18px; height: 10px; }
.window-resize-n { top: 0; cursor: n-resize; }
.window-resize-s { bottom: 0; cursor: s-resize; }
.window-resize-e, .window-resize-w { top: 18px; bottom: 18px; width: 10px; }
.window-resize-e { right: 0; cursor: e-resize; }
.window-resize-w { left: 0; cursor: w-resize; }
.window-resize-nw, .window-resize-ne, .window-resize-sw, .window-resize-se { width: 18px; height: 18px; }
.window-resize-nw { top: 0; left: 0; cursor: nwse-resize; }
.window-resize-ne { top: 0; right: 0; cursor: nesw-resize; }
.window-resize-sw { bottom: 0; left: 0; cursor: nesw-resize; }
.window-resize-se { right: 0; bottom: 0; cursor: nwse-resize; }

.window-content {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: clamp(22px, 4vw, 42px);
  background: #fff;
}

.window-content.app-runtime-content { display: flex; overflow: hidden; padding: 0; }
.app-runtime-host { position: relative; flex: 1; min-width: 0; min-height: 0; overflow: hidden; background: #fff; }
.app-runtime-frame { position: absolute; inset: 0; z-index: 0; display: block; width: 100%; height: 100%; min-height: 100%; border: 0; background: #fff; opacity: 0; transition: opacity .26s ease; }
.app-runtime-frame.is-revealed { opacity: 1; }
.app-runtime-loading { position: absolute; z-index: 1; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 11px; padding: 24px; background: #fff; color: #202a38; text-align: center; opacity: 1; transition: opacity .26s ease; pointer-events: auto; }
.app-runtime-loading.is-exiting { opacity: 0; pointer-events: none; }
.app-runtime-loading-icon { width: 68px; height: 68px; object-fit: contain; border-radius: 16px; box-shadow: 0 4px 14px #17202c24; }
.app-runtime-loading > strong { max-width: 100%; overflow: hidden; color: #202a38; font-size: 23px; font-weight: 700; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.app-runtime-loading-progress { display: inline-flex; align-items: center; justify-content: center; gap: 9px; color: #46525f; font-size: 13px; line-height: 1.3; }
.app-runtime-spinner { width: 16px; height: 16px; flex: 0 0 16px; border: 2px solid #d2e7f1; border-top-color: #45a2c8; border-radius: 50%; animation: app-runtime-spin .8s linear infinite; }
@keyframes app-runtime-spin { to { transform: rotate(360deg); } }
.app-runtime-state { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 8px; padding: clamp(22px, 4vw, 42px); }
.app-runtime-state strong { color: #202a38; font-size: 17px; }
.app-runtime-state span { max-width: 460px; color: #626b78; font-size: 13px; }
.app-runtime-retry { margin-top: 8px; padding: 7px 12px; border: 1px solid #bdcdd0; border-radius: 7px; background: #f8fbfb; color: #2c444c; font-size: 12px; font-weight: 650; }
.app-runtime-retry:hover { background: #e7eff0; }

.window-eyebrow {
  margin: 0 0 12px;
  color: #666d76;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .12em;
}

.window-content h1 {
  margin: 0;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 650;
  letter-spacing: -.035em;
}

.window-description {
  max-width: 560px;
  margin: 10px 0 24px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
}

.window-preview-status {
  display: flex;
  max-width: 460px;
  align-items: flex-start;
  gap: 12px;
  padding: 15px 17px;
  border: 1px solid #d7d8df;
  border-radius: 9px;
  background: #fafafc;
}

.window-preview-status > span {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  margin-top: 4px;
  border-radius: 50%;
  background: #78899a;
}

.window-preview-status strong, .window-preview-status small { display: block; }
.window-preview-status strong { font-size: 13px; font-weight: 650; }
.window-preview-status small { margin-top: 4px; color: var(--text-muted); font-size: 12px; }

.app-dock {
  position: absolute;
  z-index: 50;
  right: 12px;
  bottom: var(--dock-bottom);
  left: 12px;
  display: flex;
  width: max-content;
  max-width: calc(100vw - 24px);
  align-items: end;
  gap: 9px;
  margin: 0 auto;
  padding: 12px 14px;
  overflow-x: auto;
  border: 1px solid #ffffffb8;
  border-radius: 20px;
  background: linear-gradient(145deg, #ffffffbd, #e7edf39c);
  box-shadow: 0 8px 28px #172a3a30, inset 0 1px #ffffffee;
  scrollbar-width: none;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
}

.app-dock::-webkit-scrollbar { display: none; }

.dock-icon {
  position: relative;
  display: flex;
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 23%;
  background: transparent;
  box-shadow: inset 0 1px 1px #ffffff70, inset 0 -2px 2px #0002, 0 3px 6px #0003;
  outline-offset: 4px;
}
.dock-explorer-icon { border-radius: 15px; background: linear-gradient(145deg, #1a9b9a, #14747f); box-shadow: inset 0 1px 2px #ffffff80, inset 0 -2px 3px #003f4555, 0 4px 8px #083e4b45; color:#fff; }
.dock-explorer-icon:hover { filter:brightness(1.08); }
.dock-explorer-icon svg { display:block; width:29px; height:29px; }

.dock-artwork { display: block; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.dock-tooltip {
  position:fixed;
  z-index:1000;
  max-width:calc(100vw - 24px);
  padding:7px 10px;
  border: 1px solid #6e81a526;
  border-radius: 7px;
  background: #fffffff2;
  box-shadow: 0 5px 16px #52658a26;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  pointer-events: none;
  white-space: nowrap;
}
.dock-tooltip[hidden] { display:none; }
.running-dot {
  position: absolute;
  right: 50%;
  top: -7px;
  width: 5px;
  height: 5px;
  transform: translateX(50%);
  border-radius: 50%;
  background: #078ac3;
  opacity: 0;
}

.dock-icon.is-running .running-dot { opacity: 1; }
.dock-icon.is-active .running-dot { width: 7px; height: 7px; background: #078ac3; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

@media (max-width: 760px) {
  .desktop-statusbar { min-height: 53px; flex-wrap: wrap; gap: 0 8px; padding: 4px 10px; }
  .statusbar-brand { height: 27px; }
  .statusbar-right { gap: 8px; font-size: 11px; }
  .statusbar-network, .statusbar-battery { gap: 3px; font-size: 10px; }
  .statusbar-network svg { width: 14px; height: 14px; }
  .statusbar-battery svg { width: 15px; height: 15px; }
  .home-view { inset-block-start: 53px; }
  .desktop-clinic-widget { top: 24px; left: 10px; width: calc(100vw - 20px); min-height: 96px; gap: 12px; padding: 12px 14px; }
  .operating-role-widget { left:10px; max-width:calc(100vw - 20px); }
  .home-clinic-actions { top:132px; left:10px; }
  .desktop-widget-collection { top: 190px; right: 10px; left: 10px; width: auto; grid-template-columns: minmax(0, 1.16fr) minmax(145px, .84fr); gap: 9px; }
  .nepali-calendar-widget { padding: 11px 12px; }
  .time-widget { padding: 10px 12px; }
  .gregorian-calendar-widget { padding: 9px 9px 10px; }
  .calendar-widget-grid > span { min-height: 20px; }
  .gregorian-calendar-grid > span { min-height: 18px; }
  .app-window { top: calc(50% - 20px + var(--window-shift, 0px)); left: 50%; width: calc(100% - 24px); height: max(240px, calc(100% - 164px)); min-width: 0; min-height: 240px; transform: translate(-50%, -50%); }
  .app-window.is-maximized { top: 60px !important; left: 6px !important; width: calc(100% - 12px) !important; height: calc(100% - 144px) !important; }
  .app-dock { gap: 7px; padding: 10px 12px; }
  .dock-icon { width: 46px; height: 46px; flex-basis: 46px; }
}

@media (max-width: 960px) and (min-width: 761px) {
  .desktop-clinic-widget { width: min(390px, calc(43vw - 16px)); gap: 12px; padding: 14px; }
  .clinic-widget-mark.has-logo { width: 88px; height: 64px; flex-basis: 88px; }
  .desktop-widget-collection { width: calc(54vw - 18px); grid-template-columns: minmax(0, 1.12fr) minmax(132px, .88fr); gap: 8px; }
  .nepali-calendar-widget { padding: 11px 10px; }
  .time-widget { padding: 10px; }
  .gregorian-calendar-widget { padding: 9px; }
  .calendar-widget-grid > span { min-height: 20px; }
  .gregorian-calendar-grid > span { min-height: 17px; }
}

@media (max-width: 430px) {
  .desktop-statusbar { min-height: 74px; }
  .statusbar-right { order: 3; width: 100%; justify-content: flex-end; }
  .home-view { inset-block-start: 74px; }
  .desktop-clinic-widget { min-height: 86px; gap: 10px; padding: 10px 11px; }
  .home-clinic-actions { top:122px; }
  .clinic-widget-mark.has-logo { width: 74px; height: 56px; flex-basis: 74px; }
  .clinic-widget-signout { padding-inline: 6px; }
  .desktop-widget-collection { top: 180px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto; gap: 7px; }
  .nepali-calendar-widget { grid-column: 1; grid-row: 1; padding: 9px 8px; }
  .time-widget { grid-column: 2; grid-row: 1; padding: 9px; }
  .gregorian-calendar-widget { grid-column: 1 / -1; grid-row: 2; padding: 8px 6px; }
  .calendar-widget-grid > span { min-height: 19px; }
  .gregorian-calendar-grid > span { min-height: 18px; }
}

@media (max-width: 390px) {
  .statusbar-right { gap: 6px; font-size: 10px; }
  #status-date { display: none; }
  .identity-gate { padding-right: 15px; padding-left: 15px; }
  .brand-dental { margin-left: 3px; }
  .clinic-widget-mark.has-logo { width: 62px; height: 52px; flex-basis: 62px; }
  .clinic-widget-copy strong { font-size: 12px; }
  .clinic-widget-copy span { font-size: 11px; }
  .clinic-widget-signout span { display: none; }
  .clinic-widget-signout { width: 32px; padding: 0; }
  .window-content { padding: 20px; }
}

/* Entering the browser's Full screen control should use the larger viewport
   for the open app window, then restore its normal size when Full screen exits. */
.desktop:fullscreen .app-window:not([hidden]):not(.is-fullscreen-resized) {
  top: 43px !important;
  left: 50% !important;
  width: 90% !important;
  height: calc(100% - 136px) !important;
  min-width: 0;
  min-height: 0;
  transform: translateX(-50%) !important;
}

@media (max-width: 760px) {
  .desktop:fullscreen .app-window:not([hidden]):not(.is-fullscreen-resized) {
    top: 60px !important;
    left: 50% !important;
    width: 90% !important;
    height: calc(100% - 144px) !important;
    transform: translateX(-50%) !important;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .desktop-statusbar { background: #e8f0f0f5; }
  .app-dock { background: #e6ebf2f2; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
  .app-runtime-spinner { animation: none; border-color: #73b4ce; }
  .workspace-switching-spinner { animation: none; border-color: #287f91; }
  .workspace-switching-backdrop { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .app-runtime-frame, .app-runtime-loading { transition: none; }
}
