@charset "UTF-8";

:root {
    --brand-primary: #075e63;
    --brand-primary-deep: #063f44;
    --brand-primary-bright: #12a89d;
    --brand-accent: #d2a85f;
    --brand-accent-soft: #f2e4ca;
    --app-bg: #f6f5ef;
    --surface: #ffffff;
    --surface-soft: #f0f5f2;
    --surface-dark: #082f33;
    --ink: #102b2e;
    --ink-soft: #53696c;
    --ink-faint: #5f7375;
    --line: #dce6e2;
    --line-strong: #c9d8d3;
    --success: #126f60;
    --success-soft: #ddf4ed;
    --warning: #8a5414;
    --warning-soft: #fbedd5;
    --danger: #aa3944;
    --danger-soft: #fde7e9;
    --info: #357a8a;
    --info-soft: #e0f1f4;
    --shadow-xs: 0 1px 2px rgba(5, 49, 52, 0.05);
    --shadow-sm: 0 8px 24px rgba(5, 49, 52, 0.07);
    --shadow-md: 0 18px 48px rgba(5, 49, 52, 0.11);
    --shadow-lg: 0 32px 80px rgba(5, 49, 52, 0.18);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --sidebar-width: 264px;
    --topbar-height: 80px;
    --bottom-nav-height: 76px;
    --content-max: 1500px;
    --ease: cubic-bezier(.2, .8, .2, 1);
    font-family: "Noto Sans", "Segoe UI", Arial, sans-serif;
    color: var(--ink);
    background: var(--app-bg);
    font-synthesis: none;
    text-rendering: optimizeLegibility;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    min-width: 320px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    min-height: 100dvh;
    color: var(--ink);
    background: var(--app-bg);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

body.is-locked {
    overflow: hidden;
}

button,
input,
select,
textarea {
    color: inherit;
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    border: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

img,
svg {
    display: block;
    max-width: 100%;
}

p,
h1,
h2,
h3,
h4 {
    margin-top: 0;
}

h1,
h2,
h3,
h4,
strong {
    text-wrap: balance;
}

::selection {
    color: #fff;
    background: var(--brand-primary);
}

:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--brand-accent) 82%, #fff);
    outline-offset: 3px;
}

.skip-link {
    position: fixed;
    z-index: 9999;
    top: 12px;
    left: 12px;
    padding: 10px 16px;
    border-radius: 10px;
    color: #fff;
    background: var(--brand-primary-deep);
    box-shadow: var(--shadow-md);
    transform: translateY(-180%);
    transition: transform .2s ease;
}

.skip-link:focus {
    transform: translateY(0);
}

.icon-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.icon {
    width: 1.25rem;
    height: 1.25rem;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.brand-mark {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
}

.brand-mark svg {
    width: 100%;
    height: 100%;
    overflow: visible;
    filter: drop-shadow(0 6px 8px rgba(5, 94, 99, .15));
}

.brand-copy {
    display: grid;
    min-width: 0;
    line-height: 1.15;
}

.brand-copy strong {
    font-size: .95rem;
    font-weight: 800;
    letter-spacing: -.025em;
    white-space: nowrap;
}

.brand-copy small {
    margin-top: 4px;
    color: var(--ink-faint);
    font-size: .65rem;
    white-space: nowrap;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 11px 18px;
    border: 1px solid transparent;
    border-radius: 13px;
    font-size: .9rem;
    font-weight: 750;
    line-height: 1.2;
    cursor: pointer;
    transition: transform .18s var(--ease), background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button:active {
    transform: translateY(0);
}

.button[disabled],
.button.is-disabled {
    opacity: .52;
    pointer-events: none;
}

.button-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--brand-primary-bright), var(--brand-primary));
    box-shadow: 0 10px 24px color-mix(in srgb, var(--brand-primary) 23%, transparent);
}

.button-primary:hover {
    box-shadow: 0 14px 30px color-mix(in srgb, var(--brand-primary) 31%, transparent);
}

.button-secondary {
    color: var(--brand-primary-deep);
    background: var(--brand-accent-soft);
    border-color: color-mix(in srgb, var(--brand-accent) 35%, transparent);
}

.button-ghost {
    color: var(--ink);
    background: color-mix(in srgb, var(--surface) 72%, transparent);
    border-color: var(--line);
}

.button-danger {
    color: #fff;
    background: var(--danger);
}

.button-small {
    min-height: 42px;
    padding: 9px 14px;
    border-radius: 11px;
    font-size: .82rem;
}

.button .icon {
    width: 18px;
    height: 18px;
}

.icon-button {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 13px;
    color: var(--ink-soft);
    background: var(--surface);
    cursor: pointer;
    transition: color .18s ease, background .18s ease, transform .18s var(--ease);
}

.icon-button:hover {
    color: var(--brand-primary);
    background: var(--surface-soft);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--brand-primary);
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.status-badge,
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--ink-soft);
    background: var(--surface-soft);
    font-size: .72rem;
    font-weight: 750;
    line-height: 1;
    white-space: nowrap;
}

.status-badge::before {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    content: "";
}

.status-normal,
.status-active,
.status-approved,
.status-ready,
.status-online {
    color: var(--success);
    background: var(--success-soft);
}

.status-high,
.status-warning,
.status-pending,
.status-more_info_required {
    color: var(--warning);
    background: var(--warning-soft);
}

.status-low,
.status-critical,
.status-blocked,
.status-rejected,
.status-error,
.status-disconnected {
    color: var(--danger);
    background: var(--danger-soft);
}

.status-no_data,
.status-deactivated,
.status-delayed {
    color: #58696e;
    background: #e9eeef;
}

.card {
    min-width: 0;
    border: 1px solid color-mix(in srgb, var(--line) 87%, transparent);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-xs);
}

.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 20px 0;
}

.card-header h2,
.card-header h3 {
    margin-bottom: 4px;
    font-size: 1rem;
    letter-spacing: -.025em;
}

.card-header p {
    margin: 0;
    color: var(--ink-faint);
    font-size: .78rem;
}

.card-body {
    padding: 20px;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.section-heading h1,
.section-heading h2 {
    margin-bottom: 4px;
    letter-spacing: -.04em;
}

.section-heading h1 {
    font-size: clamp(1.55rem, 4vw, 2.15rem);
}

.section-heading h2 {
    font-size: clamp(1.18rem, 3vw, 1.45rem);
}

.section-heading p {
    max-width: 720px;
    margin: 0;
    color: var(--ink-soft);
    font-size: .9rem;
}

.section-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.app-shell {
    min-height: 100vh;
    min-height: 100dvh;
}

.app-sidebar {
    position: fixed;
    z-index: 120;
    inset: 0 auto 0 0;
    display: flex;
    width: min(86vw, var(--sidebar-width));
    min-height: 100dvh;
    padding: 18px 14px;
    flex-direction: column;
    color: #eaf5f3;
    background:
        radial-gradient(circle at 20% -5%, rgba(45, 196, 182, .22), transparent 32%),
        linear-gradient(180deg, #073f44 0%, #062f34 100%);
    box-shadow: var(--shadow-lg);
    transform: translateX(-105%);
    transition: transform .28s var(--ease);
    overflow-y: auto;
    overscroll-behavior: contain;
}

body.sidebar-open .app-sidebar {
    transform: translateX(0);
}

.sidebar-backdrop {
    position: fixed;
    z-index: 110;
    inset: 0;
    background: rgba(5, 29, 31, .54);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
    backdrop-filter: blur(4px);
}

body.sidebar-open .sidebar-backdrop {
    opacity: 1;
    visibility: visible;
}

.sidebar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    padding: 0 4px;
}

.sidebar-brand .brand-copy strong {
    color: #fff;
}

.sidebar-brand .brand-copy small {
    color: rgba(231, 247, 245, .6);
}

.sidebar-close {
    color: rgba(255, 255, 255, .75);
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .1);
}

.demo-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 22px 4px 14px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 12px;
    color: #c7e9e5;
    background: rgba(255, 255, 255, .055);
    font-size: .71rem;
    font-weight: 750;
}

.demo-pill .icon {
    width: 16px;
}

.demo-pill i {
    width: 7px;
    height: 7px;
    margin-left: auto;
    border-radius: 50%;
    background: #43d2a8;
    box-shadow: 0 0 0 5px rgba(67, 210, 168, .12);
    animation: livePulse 2.4s infinite;
}

.sidebar-nav {
    display: grid;
    gap: 4px;
}

.sidebar-nav a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    padding: 10px 12px;
    border-radius: 12px;
    color: rgba(230, 245, 243, .7);
    font-size: .82rem;
    font-weight: 650;
    transition: color .18s ease, background .18s ease, transform .18s var(--ease);
}

.sidebar-nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, .075);
    transform: translateX(2px);
}

.sidebar-nav a.is-active {
    color: #fff;
    background: linear-gradient(90deg, rgba(40, 188, 175, .28), rgba(255, 255, 255, .07));
    box-shadow: inset 3px 0 #3cc8bb;
}

.sidebar-nav a.is-active .icon {
    color: #77e2d8;
}

.sidebar-nav a b {
    display: grid;
    min-width: 21px;
    height: 21px;
    margin-left: auto;
    padding: 0 5px;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: var(--danger);
    font-size: .65rem;
}

.sidebar-disclaimer {
    display: flex;
    gap: 9px;
    margin: auto 4px 14px;
    padding: 13px;
    border: 1px solid rgba(211, 169, 102, .2);
    border-radius: 13px;
    color: #e8d2ab;
    background: rgba(211, 169, 102, .08);
}

.sidebar-disclaimer .icon {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    margin-top: 2px;
}

.sidebar-disclaimer > div {
    display: grid;
    gap: 9px;
}

.sidebar-disclaimer p {
    margin: 0;
    font-size: .67rem;
    line-height: 1.45;
}

.sidebar-install-button {
    display: inline-flex;
    width: max-content;
    padding: 0;
    align-items: center;
    gap: 6px;
    border: 0;
    color: #fff;
    background: transparent;
    font-size: .67rem;
    font-weight: 800;
    cursor: pointer;
}

.sidebar-install-button .icon {
    width: 14px;
    height: 14px;
    margin: 0;
}

.sidebar-profile {
    display: grid;
    grid-template-columns: 38px 1fr 40px;
    align-items: center;
    gap: 10px;
    padding: 12px 5px 0;
    border-top: 1px solid rgba(255, 255, 255, .1);
}

.sidebar-profile > span:nth-child(2) {
    display: grid;
    min-width: 0;
}

.sidebar-profile strong {
    overflow: hidden;
    color: #fff;
    font-size: .76rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-profile small {
    color: rgba(230, 245, 243, .5);
    font-size: .65rem;
}

.sidebar-profile > form {
    margin: 0;
}

.sidebar-profile .icon-button {
    width: 38px;
    height: 38px;
    color: rgba(255, 255, 255, .65);
    background: rgba(255, 255, 255, .06);
    border-color: rgba(255, 255, 255, .08);
}

.avatar {
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 2px solid color-mix(in srgb, var(--avatar-color, var(--brand-primary)) 35%, #fff);
    border-radius: 50%;
    color: #fff;
    background: color-mix(in srgb, var(--avatar-color, var(--brand-primary)) 78%, #000);
    font-size: .7rem;
    font-weight: 850;
    letter-spacing: .04em;
}

.app-stage {
    min-width: 0;
    min-height: 100dvh;
}

.app-topbar {
    position: sticky;
    z-index: 90;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 66px;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(210, 223, 218, .75);
    background: color-mix(in srgb, var(--app-bg) 86%, transparent);
    backdrop-filter: blur(18px) saturate(1.25);
}

.topbar-left,
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.mobile-brand {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    font-size: .88rem;
    font-weight: 800;
}

.mobile-brand .brand-mark {
    width: 34px;
    height: 34px;
}

.topbar-title {
    display: none;
}

.topbar-title p {
    margin: 0 0 2px;
    color: var(--brand-primary);
    font-size: .61rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.topbar-title h1 {
    margin: 0;
    font-size: 1.08rem;
    letter-spacing: -.03em;
}

.notification-button {
    position: relative;
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, .7);
}

.notification-button i {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--danger);
}

.topbar-avatar .avatar {
    width: 40px;
    height: 40px;
}

.language-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 4px 9px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: rgba(255, 255, 255, .75);
    font-size: .68rem;
    font-weight: 800;
}

.language-switch span {
    width: 1px;
    height: 14px;
    background: var(--line-strong);
}

.language-switch a {
    color: var(--ink-faint);
}

.language-switch a.is-active {
    color: var(--brand-primary);
}

.language-switch-app {
    display: none;
}

.app-main {
    width: 100%;
    max-width: var(--content-max);
    min-height: calc(100dvh - 66px);
    margin: 0 auto;
    padding: 18px 14px calc(var(--bottom-nav-height) + env(safe-area-inset-bottom) + 24px);
    scroll-padding-block-end: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom) + 28px);
}

.bottom-nav {
    position: fixed;
    z-index: 100;
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    left: 8px;
    display: grid;
    min-height: var(--bottom-nav-height);
    padding: 7px 5px;
    grid-template-columns: repeat(5, 1fr);
    border: 1px solid rgba(255, 255, 255, .85);
    border-radius: 21px;
    background: rgba(255, 255, 255, .91);
    box-shadow: 0 16px 42px rgba(5, 49, 52, .2);
    backdrop-filter: blur(20px) saturate(1.35);
}

.bottom-nav a {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 58px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    border-radius: 15px;
    color: var(--ink-faint);
    font-size: clamp(.55rem, 2.4vw, .66rem);
    font-weight: 700;
    line-height: 1;
}

.bottom-nav a > span:last-child {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bottom-nav-icon {
    display: grid;
    width: 34px;
    height: 30px;
    place-items: center;
    border-radius: 11px;
    transition: color .2s ease, background .2s ease, transform .2s var(--ease);
}

.bottom-nav a.is-active {
    color: var(--brand-primary);
}

.bottom-nav a.is-active .bottom-nav-icon {
    color: #fff;
    background: var(--brand-primary);
    box-shadow: 0 7px 16px color-mix(in srgb, var(--brand-primary) 25%, transparent);
    transform: translateY(-1px);
}

.bottom-nav a.is-center .bottom-nav-icon {
    width: 42px;
    height: 36px;
}

.bottom-nav a.is-center.is-active .bottom-nav-icon {
    background: linear-gradient(135deg, var(--brand-primary-bright), var(--brand-primary-deep));
}

.toast-stack {
    position: fixed;
    z-index: 300;
    top: 76px;
    right: 12px;
    left: 12px;
    display: grid;
    gap: 8px;
    pointer-events: none;
}

.toast {
    display: grid;
    max-width: 420px;
    margin-left: auto;
    padding: 12px 12px;
    grid-template-columns: 34px 1fr 36px;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: rgba(255, 255, 255, .96);
    box-shadow: var(--shadow-md);
    font-size: .82rem;
    pointer-events: auto;
    animation: toastIn .35s var(--ease) both;
    backdrop-filter: blur(14px);
}

.toast.is-leaving {
    animation: toastOut .25s ease both;
}

.toast-icon {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 10px;
    color: var(--info);
    background: var(--info-soft);
}

.toast-success .toast-icon {
    color: var(--success);
    background: var(--success-soft);
}

.toast-error .toast-icon {
    color: var(--danger);
    background: var(--danger-soft);
}

.toast-warning .toast-icon {
    color: var(--warning);
    background: var(--warning-soft);
}

.toast-close {
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
}

.pwa-toast {
    grid-template-columns: 34px minmax(0, 1fr) auto;
}

.pwa-toast-content {
    min-width: 0;
    line-height: 1.45;
}

.pwa-toast-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pwa-toast-action {
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid color-mix(in srgb, var(--brand-primary) 24%, var(--line));
    border-radius: 9px;
    color: var(--brand-primary);
    background: var(--surface-soft);
    font-size: .72rem;
    font-weight: 800;
    cursor: pointer;
}

.pwa-toast-close {
    color: var(--ink-soft);
    font-size: 1.2rem;
    cursor: pointer;
}

[data-notification-enable][data-notification-enabled="true"] {
    color: var(--success);
    border-color: color-mix(in srgb, var(--success) 32%, var(--line));
    background: var(--success-soft);
}

.field {
    display: grid;
    gap: 7px;
}

.field label,
.field > span:first-child {
    color: var(--ink);
    font-size: .78rem;
    font-weight: 750;
}

.field label small {
    color: var(--danger);
}

.input,
.select,
.textarea {
    width: 100%;
    min-height: 48px;
    padding: 11px 13px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    outline: none;
    color: var(--ink);
    background: #fff;
    font-size: .88rem;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.textarea {
    min-height: 118px;
    resize: vertical;
}

.input:hover,
.select:hover,
.textarea:hover {
    border-color: color-mix(in srgb, var(--brand-primary) 45%, var(--line));
}

.input:focus,
.select:focus,
.textarea:focus {
    border-color: var(--brand-primary-bright);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-primary-bright) 14%, transparent);
}

.input.is-invalid,
.select.is-invalid,
.textarea.is-invalid {
    border-color: var(--danger);
    background: var(--danger-soft);
}

.field-error {
    color: var(--danger);
    font-size: .72rem;
    font-weight: 650;
}

.field-help {
    color: var(--ink-faint);
    font-size: .72rem;
}

.input-wrap {
    position: relative;
}

.input-wrap .input {
    padding-left: 44px;
}

.input-wrap > .icon {
    position: absolute;
    top: 50%;
    left: 14px;
    width: 18px;
    color: var(--ink-faint);
    transform: translateY(-50%);
}

.input-wrap .password-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    width: 38px;
    height: 38px;
    border: 0;
    transform: translateY(-50%);
}

.checkbox {
    display: grid;
    grid-template-columns: 22px 1fr;
    align-items: start;
    gap: 10px;
    color: var(--ink-soft);
    font-size: .78rem;
    cursor: pointer;
}

.checkbox input {
    width: 20px;
    height: 20px;
    margin: 1px 0 0;
    accent-color: var(--brand-primary);
}

.form-grid {
    display: grid;
    gap: 16px;
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.data-table-wrap {
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
}

.data-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

.data-table th {
    color: var(--ink-faint);
    background: #fafbf9;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.data-table td {
    color: var(--ink-soft);
    font-size: .8rem;
}

.data-table tbody tr {
    transition: background .15s ease;
}

.data-table tbody tr:hover {
    background: var(--surface-soft);
}

.table-primary {
    color: var(--ink);
    font-weight: 750;
}

.table-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.metric-card {
    position: relative;
    min-width: 0;
    padding: 16px;
    overflow: hidden;
}

.metric-card::after {
    position: absolute;
    right: -20px;
    bottom: -28px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--brand-primary) 7%, transparent);
    content: "";
}

.metric-card > span {
    color: var(--ink-faint);
    font-size: .7rem;
    font-weight: 700;
}

.metric-card strong {
    display: block;
    margin-top: 6px;
    font-size: 1.35rem;
    letter-spacing: -.045em;
}

.metric-card small {
    color: var(--ink-faint);
    font-size: .67rem;
}

.page-grid {
    display: grid;
    gap: 14px;
}

.glucose-hero {
    position: relative;
    padding: 20px;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 90% 5%, rgba(80, 218, 201, .33), transparent 34%),
        radial-gradient(circle at 5% 100%, rgba(211, 169, 102, .18), transparent 40%),
        linear-gradient(145deg, #075e63, #063a40);
    box-shadow: var(--shadow-md);
}

.glucose-hero::after {
    position: absolute;
    top: 26px;
    right: 22px;
    width: 98px;
    height: 98px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 50%;
    content: "";
    box-shadow: 0 0 0 22px rgba(255, 255, 255, .025), 0 0 0 44px rgba(255, 255, 255, .018);
}

.glucose-hero-head,
.glucose-hero-foot {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.glucose-hero-head > span:first-child {
    color: rgba(236, 251, 249, .7);
    font-size: .75rem;
    font-weight: 700;
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 999px;
    color: #c8f4e9;
    background: rgba(255, 255, 255, .08);
    font-size: .65rem;
    font-weight: 800;
}

.live-badge i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4adbb3;
    box-shadow: 0 0 0 4px rgba(74, 219, 179, .13);
}

.glucose-value-row {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin: 22px 0 20px;
}

.glucose-value {
    font-size: clamp(3.5rem, 17vw, 5.8rem);
    font-weight: 800;
    letter-spacing: -.085em;
    line-height: .83;
}

.glucose-unit-block {
    display: grid;
    gap: 7px;
    padding-bottom: 2px;
}

.glucose-unit-block > span:first-child {
    color: rgba(255, 255, 255, .68);
    font-size: .72rem;
    font-weight: 750;
}

.trend-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    width: max-content;
    padding: 5px 8px;
    border-radius: 999px;
    color: #073f44;
    background: #c8f4e9;
    font-size: .66rem;
    font-weight: 850;
}

.trend-chip b {
    font-size: .9rem;
}

.glucose-hero-foot {
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, .12);
    color: rgba(236, 251, 249, .67);
    font-size: .69rem;
}

.glucose-hero-foot strong {
    color: #fff;
    font-weight: 750;
}

.chart-card {
    min-height: 300px;
}

.chart-card .card-body {
    padding: 8px 10px 16px;
}

.glucose-chart {
    position: relative;
    width: 100%;
    min-height: 240px;
}

.glucose-chart svg {
    width: 100%;
    min-height: 240px;
    overflow: visible;
}

.chart-tooltip {
    position: absolute;
    z-index: 5;
    min-width: 126px;
    padding: 9px 11px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 11px;
    color: #fff;
    background: rgba(7, 54, 59, .94);
    box-shadow: var(--shadow-md);
    font-size: .7rem;
    pointer-events: none;
    transform: translate(-50%, calc(-100% - 10px));
    backdrop-filter: blur(10px);
}

.chart-tooltip strong {
    display: block;
    font-size: .92rem;
}

.range-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-soft);
    scrollbar-width: none;
}

.range-tabs::-webkit-scrollbar {
    display: none;
}

.range-tabs a,
.range-tabs button {
    min-width: 43px;
    min-height: 35px;
    padding: 7px 10px;
    border-radius: 9px;
    color: var(--ink-faint);
    background: transparent;
    font-size: .68rem;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
}

.range-tabs .is-active {
    color: var(--brand-primary);
    background: #fff;
    box-shadow: var(--shadow-xs);
}

.alert-list {
    display: grid;
    gap: 9px;
}

.alert-item {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    align-items: start;
    gap: 11px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--surface);
}

.alert-symbol {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 12px;
    color: var(--warning);
    background: var(--warning-soft);
}

.alert-item.is-critical .alert-symbol {
    color: var(--danger);
    background: var(--danger-soft);
}

.alert-content {
    min-width: 0;
}

.alert-content h3 {
    margin-bottom: 3px;
    font-size: .82rem;
}

.alert-content p {
    margin: 0;
    color: var(--ink-soft);
    font-size: .72rem;
}

.alert-content time {
    display: block;
    margin-top: 5px;
    color: var(--ink-faint);
    font-size: .65rem;
}

.empty-state {
    display: grid;
    min-height: 230px;
    padding: 26px;
    place-items: center;
    text-align: center;
}

.empty-state-icon {
    display: grid;
    width: 58px;
    height: 58px;
    margin: 0 auto 14px;
    place-items: center;
    border-radius: 20px;
    color: var(--brand-primary);
    background: var(--success-soft);
}

.empty-state h3 {
    margin-bottom: 5px;
    font-size: 1rem;
}

.empty-state p {
    max-width: 380px;
    margin: 0 auto;
    color: var(--ink-faint);
    font-size: .78rem;
}

.disclaimer-strip {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 14px;
    border: 1px solid color-mix(in srgb, var(--brand-accent) 36%, transparent);
    border-radius: 14px;
    color: #77572b;
    background: #fbf3e4;
    font-size: .71rem;
}

.disclaimer-strip .icon {
    width: 17px;
    margin-top: 1px;
    flex: 0 0 auto;
}

.public-page {
    background:
        radial-gradient(circle at 8% 16%, rgba(22, 168, 157, .11), transparent 25%),
        radial-gradient(circle at 92% 8%, rgba(210, 168, 95, .14), transparent 26%),
        #f8f7f2;
}

.public-header {
    position: relative;
    z-index: 50;
    padding: 14px 16px;
}

.public-header-inner {
    display: flex;
    width: min(1180px, 100%);
    margin: 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.public-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.public-actions .language-switch {
    background: rgba(255, 255, 255, .55);
}

.public-login {
    display: none;
}

.public-footer {
    padding: 32px 16px max(32px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, .5);
}

.public-footer-inner {
    display: grid;
    width: min(1180px, 100%);
    margin: 0 auto;
    gap: 14px;
    color: var(--ink-faint);
    font-size: .72rem;
}

.brand-footer {
    color: var(--ink);
    font-weight: 800;
}

.brand-footer .brand-mark {
    width: 34px;
    height: 34px;
}

.public-footer p {
    margin: 0;
}

.public-footer-links {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.footer-install-button {
    display: inline-flex;
    padding: 0;
    align-items: center;
    gap: 5px;
    border: 0;
    color: var(--brand-primary);
    background: transparent;
    font-size: inherit;
    font-weight: 800;
    cursor: pointer;
}

.footer-install-button .icon {
    width: 14px;
    height: 14px;
}

.landing-hero {
    position: relative;
    padding: 40px 16px 62px;
    overflow: hidden;
}

.landing-hero::before {
    position: absolute;
    top: -180px;
    left: 50%;
    width: 720px;
    height: 720px;
    border: 1px solid rgba(7, 94, 99, .06);
    border-radius: 50%;
    content: "";
    transform: translateX(-50%);
    box-shadow: 0 0 0 90px rgba(7, 94, 99, .025), 0 0 0 180px rgba(7, 94, 99, .016);
}

.landing-hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    width: min(1180px, 100%);
    margin: 0 auto;
    gap: 44px;
}

.landing-hero-copy {
    max-width: 670px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    padding: 6px 10px;
    border: 1px solid rgba(7, 94, 99, .12);
    border-radius: 999px;
    color: var(--brand-primary);
    background: rgba(255, 255, 255, .54);
    font-size: .68rem;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.hero-badge i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--brand-primary-bright);
    box-shadow: 0 0 0 5px rgba(18, 168, 157, .12);
}

.landing-hero-copy h1 {
    max-width: 740px;
    margin: 20px 0 16px;
    font-size: clamp(2.45rem, 11.5vw, 5.15rem);
    font-weight: 820;
    letter-spacing: -.072em;
    line-height: .98;
}

.landing-hero-copy > p {
    max-width: 610px;
    margin-bottom: 24px;
    color: var(--ink-soft);
    font-size: clamp(.96rem, 2.6vw, 1.12rem);
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 9px;
    flex-direction: column;
}

.hero-actions .button {
    min-height: 52px;
}

.hero-primary {
    box-shadow: 0 18px 36px rgba(7, 94, 99, .21);
}

.hero-trust {
    display: flex;
    gap: 14px 18px;
    margin-top: 24px;
    flex-wrap: wrap;
    color: var(--ink-faint);
}

.hero-trust span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .68rem;
}

.hero-trust .icon {
    width: 15px;
    color: var(--brand-primary);
}

.hero-trust b {
    font-weight: 700;
}

.hero-visual {
    position: relative;
    width: 100%;
    max-width: 580px;
    min-height: 500px;
    margin: 0 auto;
    padding: 24px 0 50px;
}

.hero-monitor-card {
    position: relative;
    z-index: 3;
    width: min(100%, 480px);
    margin: 0 auto;
    padding: 23px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 30px;
    color: #fff;
    background:
        radial-gradient(circle at 95% 0%, rgba(49, 207, 191, .25), transparent 37%),
        linear-gradient(155deg, #074f55, #062e33);
    box-shadow: 0 40px 90px rgba(6, 55, 59, .27);
    transform: perspective(900px) rotateY(-2deg) rotateX(1deg);
}

.hero-card-top,
.hero-range,
.hero-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.hero-card-top > span:first-child {
    display: grid;
}

.hero-card-top small {
    color: rgba(235, 250, 248, .56);
    font-size: .68rem;
}

.hero-card-top b {
    margin-top: 2px;
    font-size: .78rem;
}

.hero-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 999px;
    color: #c9f5ea;
    background: rgba(255, 255, 255, .06);
    font-size: .64rem;
    font-weight: 800;
}

.hero-live i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #55d9b5;
    animation: livePulse 2s infinite;
}

.hero-reading {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    margin: 28px 0 18px;
}

.hero-reading > strong {
    font-size: clamp(4.2rem, 19vw, 6.2rem);
    letter-spacing: -.095em;
    line-height: .8;
}

.hero-reading > span {
    display: grid;
    gap: 8px;
}

.hero-reading b {
    color: rgba(255, 255, 255, .63);
    font-size: .7rem;
}

.hero-reading small {
    width: max-content;
    padding: 5px 9px;
    border-radius: 999px;
    color: #084d51;
    background: #c9f5ea;
    font-size: .65rem;
    font-weight: 800;
}

.hero-range {
    justify-content: flex-start;
    padding: 11px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 14px;
    background: rgba(255, 255, 255, .06);
}

.hero-range > span {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 10px;
    color: #0b655f;
    background: #c9f5ea;
}

.hero-range > div {
    display: grid;
}

.hero-range b {
    font-size: .71rem;
}

.hero-range small {
    color: rgba(255, 255, 255, .53);
    font-size: .6rem;
}

.hero-chart {
    height: 126px;
    margin: 15px -6px 0;
}

.hero-chart svg {
    width: 100%;
    height: 100%;
}

.hero-card-meta {
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, .1);
}

.hero-card-meta span {
    display: grid;
    gap: 1px;
    text-align: center;
}

.hero-card-meta b {
    font-size: .85rem;
}

.hero-card-meta small {
    color: rgba(255, 255, 255, .48);
    font-size: .57rem;
}

.hero-orbit {
    position: absolute;
    border: 1px solid rgba(7, 94, 99, .1);
    border-radius: 50%;
}

.hero-orbit-one {
    top: -8px;
    right: 4%;
    width: 150px;
    height: 150px;
    box-shadow: 0 0 0 28px rgba(7, 94, 99, .025);
}

.hero-orbit-two {
    bottom: 16px;
    left: -5%;
    width: 110px;
    height: 110px;
    border-color: rgba(211, 169, 102, .18);
}

.floating-alert-card {
    position: absolute;
    z-index: 5;
    right: 0;
    bottom: 6px;
    display: grid;
    width: min(88%, 320px);
    padding: 12px;
    grid-template-columns: 38px 1fr 18px;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 16px;
    background: rgba(255, 255, 255, .92);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(18px);
}

.floating-alert-card > span {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 12px;
    color: var(--warning);
    background: var(--warning-soft);
}

.floating-alert-card > div {
    display: grid;
}

.floating-alert-card b {
    font-size: .72rem;
}

.floating-alert-card small {
    color: var(--ink-faint);
    font-size: .62rem;
}

.floating-alert-card > .icon {
    color: var(--success);
}

.landing-stats {
    padding: 0 16px;
}

.landing-stats-inner {
    display: grid;
    width: min(1180px, 100%);
    margin: 0 auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 255, 255, .66);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    backdrop-filter: blur(14px);
}

.landing-stats article {
    display: grid;
    min-height: 110px;
    padding: 18px;
    align-content: center;
    gap: 3px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.landing-stats article:nth-child(2n) {
    border-right: 0;
}

.landing-stats article:nth-last-child(-n+2) {
    border-bottom: 0;
}

.landing-stats strong {
    color: var(--brand-primary);
    font-size: 1.8rem;
    letter-spacing: -.06em;
}

.landing-stats span {
    color: var(--ink-faint);
    font-size: .68rem;
    line-height: 1.4;
}

.landing-section {
    padding: 82px 16px;
}

.landing-section-inner {
    width: min(1180px, 100%);
    margin: 0 auto;
}

.landing-section-heading {
    max-width: 690px;
    margin-bottom: 28px;
}

.landing-section-heading h2,
.demo-ready-copy h2 {
    margin: 9px 0 12px;
    font-size: clamp(2rem, 7vw, 3.3rem);
    letter-spacing: -.06em;
    line-height: 1.08;
}

.landing-section-heading p,
.demo-ready-copy > p {
    color: var(--ink-soft);
    font-size: .94rem;
}

.feature-grid {
    display: grid;
    gap: 13px;
}

.feature-card {
    position: relative;
    min-height: 300px;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 26px;
    overflow: hidden;
}

.feature-card-green {
    background: linear-gradient(145deg, #e3f5f0, #f5f8ef);
}

.feature-card-gold {
    background: linear-gradient(145deg, #f7ecd9, #faf7ef);
}

.feature-card-blue {
    background: linear-gradient(145deg, #e2f0f3, #f6f7f1);
}

.feature-icon {
    display: grid;
    width: 46px;
    height: 46px;
    margin-bottom: 40px;
    place-items: center;
    border-radius: 15px;
    color: #fff;
    background: var(--brand-primary);
    box-shadow: var(--shadow-sm);
}

.feature-card-gold .feature-icon {
    color: #183f42;
    background: var(--brand-accent);
}

.feature-card-blue .feature-icon {
    background: var(--info);
}

.feature-number {
    position: absolute;
    top: 20px;
    right: 22px;
    color: rgba(16, 43, 46, .18);
    font-size: 1.65rem;
    font-weight: 850;
}

.feature-card h3 {
    margin-bottom: 8px;
    font-size: 1.1rem;
    letter-spacing: -.035em;
}

.feature-card p {
    max-width: 320px;
    margin: 0;
    color: var(--ink-soft);
    font-size: .8rem;
}

.feature-wave {
    position: absolute;
    right: 22px;
    bottom: 22px;
    display: flex;
    height: 44px;
    align-items: flex-end;
    gap: 4px;
}

.feature-wave i {
    width: 5px;
    border-radius: 5px;
    background: var(--brand-primary-bright);
}

.feature-wave i:nth-child(1),
.feature-wave i:nth-child(7) { height: 12px; }
.feature-wave i:nth-child(2),
.feature-wave i:nth-child(6) { height: 23px; }
.feature-wave i:nth-child(3),
.feature-wave i:nth-child(5) { height: 34px; }
.feature-wave i:nth-child(4) { height: 44px; }

.feature-rings {
    position: absolute;
    right: 22px;
    bottom: 20px;
    display: grid;
    width: 72px;
    height: 72px;
    place-items: center;
    border: 8px solid rgba(211, 169, 102, .26);
    border-top-color: var(--brand-accent);
    border-radius: 50%;
    color: #8d682e;
    font-size: .78rem;
    font-weight: 850;
    transform: rotate(22deg);
}

.feature-rings span {
    transform: rotate(-22deg);
}

.feature-avatars {
    position: absolute;
    right: 22px;
    bottom: 25px;
    display: flex;
}

.feature-avatars i {
    display: grid;
    width: 38px;
    height: 38px;
    margin-left: -8px;
    place-items: center;
    border: 3px solid #eef5f3;
    border-radius: 50%;
    color: #fff;
    background: var(--info);
    font-size: .66rem;
    font-style: normal;
    font-weight: 850;
}

.feature-avatars i:nth-child(2) { background: var(--brand-primary); }
.feature-avatars i:nth-child(3) { background: #9a6d39; }

.demo-ready-section {
    background:
        radial-gradient(circle at 0% 50%, rgba(211, 169, 102, .13), transparent 32%),
        linear-gradient(180deg, rgba(255, 255, 255, .26), rgba(226, 242, 238, .42));
}

.demo-ready-grid {
    display: grid;
    gap: 52px;
    align-items: center;
}

.demo-ready-visual {
    position: relative;
    min-height: 390px;
}

.demo-ready-visual::before {
    position: absolute;
    inset: 5% 8%;
    border-radius: 42% 58% 57% 43% / 50% 42% 58% 50%;
    background: linear-gradient(135deg, #d9efea, #f1dfc1);
    content: "";
    filter: blur(.2px);
    animation: morph 12s ease-in-out infinite alternate;
}

.patient-stack {
    position: relative;
    z-index: 1;
    padding-top: 48px;
}

.patient-mini-card {
    position: relative;
    display: grid;
    width: min(92%, 410px);
    min-height: 86px;
    margin: -8px auto 0;
    padding: 14px;
    grid-template-columns: 42px 1fr auto 8px;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, .8);
    border-radius: 18px;
    background: rgba(255, 255, 255, .91);
    box-shadow: 0 15px 40px rgba(5, 49, 52, .1);
    transform: translateX(calc((var(--stack-index) - 1) * 4%)) rotate(calc((var(--stack-index) - 1) * 1.5deg));
    backdrop-filter: blur(16px);
}

.patient-mini-card > span:nth-child(2) {
    display: grid;
    min-width: 0;
}

.patient-mini-card b {
    overflow: hidden;
    font-size: .76rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.patient-mini-card small {
    color: var(--ink-faint);
    font-size: .63rem;
}

.patient-mini-card > strong {
    display: grid;
    text-align: right;
    font-size: 1.05rem;
    line-height: 1.1;
}

.patient-mini-card > strong small {
    font-size: .55rem;
    font-weight: 650;
}

.patient-status {
    width: 7px;
    height: 38px;
    border-radius: 999px;
    background: var(--success);
}

.patient-status.high { background: var(--warning); }
.patient-status.low { background: var(--danger); }

.experience-steps {
    display: grid;
    margin: 28px 0 0;
    padding: 0;
    gap: 18px;
    list-style: none;
}

.experience-steps li {
    display: grid;
    grid-template-columns: 42px 1fr;
    align-items: center;
    gap: 12px;
}

.experience-steps li > span {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid rgba(7, 94, 99, .15);
    border-radius: 14px;
    color: var(--brand-primary);
    background: #fff;
    box-shadow: var(--shadow-xs);
    font-size: .73rem;
    font-weight: 850;
}

.experience-steps li > div {
    display: grid;
}

.experience-steps b {
    font-size: .83rem;
}

.experience-steps small {
    color: var(--ink-faint);
    font-size: .7rem;
}

.public-disclaimer {
    display: grid;
    padding: 22px;
    grid-template-columns: 46px 1fr;
    align-items: start;
    gap: 14px;
    border: 1px solid rgba(211, 169, 102, .32);
    border-radius: 22px;
    color: #674c27;
    background: linear-gradient(135deg, #fcf4e6, #fffaf2);
}

.public-disclaimer > span {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 15px;
    color: #78561f;
    background: #f1dfbd;
}

.public-disclaimer b {
    display: block;
    margin-bottom: 5px;
    font-size: .86rem;
}

.public-disclaimer p {
    margin: 0;
    color: #826b47;
    font-size: .75rem;
}

.landing-cta {
    padding: 20px 16px 90px;
}

.landing-cta-card {
    position: relative;
    display: grid;
    width: min(1180px, 100%);
    min-height: 320px;
    margin: 0 auto;
    padding: 34px 24px;
    align-items: center;
    gap: 24px;
    border-radius: 30px;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 90% 20%, rgba(62, 211, 195, .26), transparent 32%),
        radial-gradient(circle at 5% 100%, rgba(211, 169, 102, .2), transparent 40%),
        linear-gradient(135deg, #073f44, #062d32);
    box-shadow: var(--shadow-lg);
}

.landing-cta-card .eyebrow {
    color: #8ee6db;
}

.landing-cta-card h2 {
    max-width: 700px;
    margin: 10px 0;
    font-size: clamp(2rem, 7vw, 3.6rem);
    letter-spacing: -.06em;
    line-height: 1.06;
}

.landing-cta-card p {
    margin: 0;
    color: rgba(235, 250, 248, .65);
}

.landing-cta-card .button {
    position: relative;
    z-index: 1;
    width: max-content;
}

.cta-glow {
    position: absolute;
    right: -100px;
    bottom: -170px;
    width: 390px;
    height: 390px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 50%;
    box-shadow: 0 0 0 60px rgba(255, 255, 255, .025), 0 0 0 120px rgba(255, 255, 255, .015);
}

.auth-layout {
    display: grid;
    min-height: 100dvh;
}

.auth-brand-panel {
    display: none;
}

.auth-form-panel {
    display: flex;
    min-width: 0;
    min-height: 100dvh;
    padding: 16px;
    flex-direction: column;
}

.auth-form-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.auth-mobile-brand .brand-copy small {
    display: none;
}

.auth-form-wrap {
    width: min(100%, 450px);
    margin: auto;
    padding: 38px 0 50px;
}

.auth-title {
    margin-bottom: 25px;
}

.auth-title h2 {
    margin: 8px 0 5px;
    font-size: clamp(2rem, 8vw, 2.8rem);
    letter-spacing: -.06em;
    line-height: 1.08;
}

.auth-title p {
    margin: 0;
    color: var(--ink-soft);
    font-size: .88rem;
}

.auth-form {
    display: grid;
    gap: 17px;
}

.field-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.field-label-row a {
    color: var(--brand-primary);
    font-size: .7rem;
    font-weight: 750;
}

.auth-submit {
    width: 100%;
    min-height: 52px;
    margin-top: 4px;
}

.form-alert {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-bottom: 17px;
    padding: 12px 13px;
    border: 1px solid var(--line);
    border-radius: 13px;
    font-size: .75rem;
}

.form-alert .icon {
    width: 17px;
    margin-top: 1px;
}

.form-alert-error {
    color: #8c3038;
    background: var(--danger-soft);
    border-color: rgba(193, 76, 85, .2);
}

.form-alert-success {
    color: #0f695a;
    background: var(--success-soft);
    border-color: rgba(22, 130, 111, .18);
}

.demo-access {
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.demo-access-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.demo-access-heading span {
    font-size: .74rem;
    font-weight: 800;
}

.demo-access-heading small {
    color: var(--ink-faint);
    font-size: .62rem;
}

.demo-account-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
}

.demo-account-grid form {
    margin: 0;
}

.demo-account-grid button {
    display: grid;
    width: 100%;
    min-height: 72px;
    padding: 8px;
    place-items: center;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 13px;
    color: var(--ink-soft);
    background: #fff;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, transform .18s var(--ease);
}

.demo-account-grid button:hover,
.demo-account-grid button.is-selected {
    border-color: var(--brand-primary-bright);
    background: var(--success-soft);
    transform: translateY(-1px);
}

.demo-account-grid button span {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 9px;
    color: #fff;
    background: var(--brand-primary);
    font-size: .62rem;
    font-weight: 850;
}

.demo-account-grid form:nth-child(2) button span { background: var(--info); }
.demo-account-grid form:nth-child(3) button span { background: #9c7040; }

.demo-account-grid b {
    font-size: .64rem;
}

.auth-switch {
    margin: 24px 0 0;
    color: var(--ink-faint);
    font-size: .75rem;
    text-align: center;
}

.auth-switch a {
    color: var(--brand-primary);
    font-weight: 800;
}

.registration-main {
    padding: 26px 16px 82px;
}

.registration-shell {
    display: grid;
    width: min(1120px, 100%);
    margin: 0 auto;
    gap: 24px;
}

.registration-intro {
    position: relative;
    padding: 26px;
    border-radius: 28px;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 90% 5%, rgba(48, 204, 189, .25), transparent 32%),
        linear-gradient(145deg, #074d53, #062f34);
    box-shadow: var(--shadow-md);
}

.registration-intro::after {
    position: absolute;
    right: -80px;
    bottom: -90px;
    width: 230px;
    height: 230px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 50%;
    content: "";
    box-shadow: 0 0 0 38px rgba(255, 255, 255, .025);
}

.registration-intro .eyebrow {
    color: #8be5da;
}

.registration-intro h1 {
    margin: 12px 0 11px;
    font-size: clamp(2rem, 8vw, 3rem);
    letter-spacing: -.06em;
    line-height: 1.08;
}

.registration-intro > p {
    color: rgba(235, 250, 248, .65);
    font-size: .85rem;
}

.registration-intro ul {
    position: relative;
    z-index: 1;
    display: grid;
    margin: 26px 0 0;
    padding: 0;
    gap: 15px;
    list-style: none;
}

.registration-intro li {
    display: grid;
    grid-template-columns: 38px 1fr;
    align-items: start;
    gap: 10px;
}

.registration-intro li > .icon {
    width: 38px;
    height: 38px;
    padding: 9px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 12px;
    color: #a1e9df;
    background: rgba(255, 255, 255, .06);
}

.registration-intro li > span {
    display: grid;
}

.registration-intro li b {
    font-size: .77rem;
}

.registration-intro li small {
    color: rgba(235, 250, 248, .55);
    font-size: .66rem;
}

.registration-card {
    padding: 22px;
    box-shadow: var(--shadow-sm);
}

.registration-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.registration-card-head > div {
    display: flex;
    align-items: center;
    gap: 10px;
}

.registration-card-head > div span {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 10px;
    color: var(--brand-primary);
    background: var(--success-soft);
    font-size: .66rem;
    font-weight: 850;
}

.registration-card-head h2 {
    margin: 0;
    font-size: 1.05rem;
}

.registration-card-head > p {
    display: none;
    max-width: 260px;
    margin: 0;
    color: var(--ink-faint);
    font-size: .68rem;
    text-align: right;
}

.consent-box {
    padding: 14px;
    border: 1px solid rgba(211, 169, 102, .26);
    border-radius: 14px;
    color: #735d3b;
    background: #fcf6eb;
    line-height: 1.55;
}

.registration-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 5px;
    flex-direction: column-reverse;
}

.registration-actions p {
    margin: 0;
    color: var(--ink-faint);
    font-size: .72rem;
}

.registration-actions p a {
    color: var(--brand-primary);
    font-weight: 800;
}

.registration-actions .button {
    width: 100%;
}

.approval-flow {
    position: relative;
    z-index: 1;
    display: grid;
    margin-top: 28px;
    gap: 14px;
}

.approval-flow > div {
    display: grid;
    grid-template-columns: 38px 1fr;
    align-items: center;
    gap: 10px;
    opacity: .55;
}

.approval-flow > div.is-current {
    opacity: 1;
}

.approval-flow > div > span {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 12px;
    background: rgba(255, 255, 255, .07);
    font-size: .68rem;
    font-weight: 850;
}

.approval-flow p {
    display: grid;
    margin: 0;
}

.approval-flow b {
    font-size: .76rem;
}

.approval-flow small {
    color: rgba(235, 250, 248, .55);
    font-size: .65rem;
}

.status-main,
.auth-simple-main {
    display: grid;
    min-height: 72dvh;
    padding: 40px 16px 78px;
    place-items: center;
}

.status-card,
.auth-simple-card {
    width: min(540px, 100%);
    padding: 34px 24px;
    box-shadow: var(--shadow-md);
    text-align: center;
}

.status-illustration {
    position: relative;
    display: grid;
    width: 100px;
    height: 100px;
    margin: 0 auto 25px;
    place-items: center;
    border-radius: 32px;
    color: #fff;
    background: linear-gradient(145deg, var(--brand-primary-bright), var(--brand-primary));
    box-shadow: 0 20px 40px rgba(7, 94, 99, .2);
}

.status-illustration > span .icon {
    width: 40px;
    height: 40px;
}

.status-illustration i {
    position: absolute;
    border: 1px solid rgba(7, 94, 99, .12);
    border-radius: 50%;
}

.status-illustration i:first-of-type {
    width: 130px;
    height: 130px;
}

.status-illustration i:last-of-type {
    width: 162px;
    height: 162px;
}

.status-card h1,
.auth-simple-card h1 {
    margin: 10px 0 9px;
    font-size: clamp(1.8rem, 7vw, 2.5rem);
    letter-spacing: -.055em;
}

.status-card > p,
.auth-simple-card > p {
    color: var(--ink-soft);
    font-size: .84rem;
}

.status-email {
    display: grid;
    margin: 22px 0;
    padding: 12px;
    grid-template-columns: 20px 1fr 20px;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 13px;
    color: var(--ink-soft);
    background: var(--surface-soft);
    font-size: .75rem;
    text-align: left;
}

.status-email .icon:last-child {
    color: var(--success);
}

.status-actions {
    display: grid;
    gap: 8px;
}

.auth-simple-icon {
    display: grid;
    width: 58px;
    height: 58px;
    margin: 0 auto 18px;
    place-items: center;
    border-radius: 19px;
    color: #fff;
    background: var(--brand-primary);
    box-shadow: var(--shadow-sm);
}

.auth-simple-card .form-grid {
    text-align: left;
}

.auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 22px;
    color: var(--brand-primary);
    font-size: .73rem;
    font-weight: 750;
}

.auth-back-link .icon {
    width: 15px;
    transform: rotate(180deg);
}

.local-demo-note {
    padding: 11px;
    border-radius: 12px;
    color: #71552d !important;
    background: var(--warning-soft);
    font-size: .72rem !important;
}

.legal-main {
    padding: 40px 16px 80px;
}

.legal-article {
    width: min(800px, 100%);
    margin: 0 auto;
    padding: clamp(24px, 6vw, 48px);
    box-shadow: var(--shadow-sm);
}

.legal-article > h1 {
    margin: 10px 0 18px;
    font-size: clamp(2rem, 7vw, 3.2rem);
    letter-spacing: -.06em;
}

.legal-article h2 {
    margin: 28px 0 7px;
    font-size: 1.1rem;
}

.legal-article p {
    color: var(--ink-soft);
    font-size: .9rem;
}

.legal-article .disclaimer-strip {
    margin-top: 30px;
}

.dashboard-welcome {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.dashboard-welcome h2 {
    margin: 5px 0 2px;
    font-size: clamp(1.55rem, 7vw, 2.3rem);
    letter-spacing: -.055em;
    line-height: 1.12;
}

.dashboard-welcome p {
    margin: 0;
    color: var(--ink-soft);
    font-size: .8rem;
}

.today-chip {
    display: none;
    align-items: center;
    gap: 7px;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--ink-faint);
    background: rgba(255, 255, 255, .65);
    font-size: .7rem;
    font-weight: 700;
}

.today-chip .icon {
    width: 16px;
    color: var(--brand-primary);
}

.dashboard-disclaimer {
    margin-bottom: 14px;
}

.patient-dashboard-grid {
    align-items: start;
}

.dashboard-side-column {
    align-content: start;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--brand-primary);
    font-size: .7rem;
    font-weight: 800;
    white-space: nowrap;
}

.text-link .icon {
    width: 14px;
}

.sensor-card .card-body {
    padding-top: 16px;
}

.sensor-visual {
    display: grid;
    grid-template-columns: 58px 1fr;
    align-items: center;
    gap: 13px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface-soft);
}

.sensor-disc {
    position: relative;
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border: 5px solid #dff2ed;
    border-radius: 50%;
    color: #fff;
    background: var(--brand-primary);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .12);
}

.sensor-disc .icon {
    width: 23px;
    height: 23px;
}

.sensor-disc i {
    position: absolute;
    right: -2px;
    bottom: 0;
    width: 12px;
    height: 12px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--success);
}

.sensor-visual > div {
    display: grid;
    min-width: 0;
}

.sensor-visual strong {
    overflow: hidden;
    font-size: .8rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sensor-visual small {
    color: var(--ink-faint);
    font-size: .65rem;
}

.compact-details {
    display: grid;
    margin: 15px 0 0;
    gap: 0;
}

.compact-details > div {
    display: flex;
    min-height: 38px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px dashed var(--line);
}

.compact-details > div:last-child {
    border-bottom: 0;
}

.compact-details dt {
    color: var(--ink-faint);
    font-size: .68rem;
}

.compact-details dd {
    margin: 0;
    color: var(--ink);
    font-size: .7rem;
    font-weight: 750;
    text-align: right;
}

.compact-empty {
    display: grid;
    grid-template-columns: 42px 1fr;
    align-items: center;
    gap: 11px;
    padding: 12px;
    border-radius: 15px;
    background: var(--success-soft);
}

.compact-empty > span {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 13px;
    color: #fff;
    background: var(--success);
}

.compact-empty strong {
    display: block;
    color: #0e6859;
    font-size: .76rem;
}

.compact-empty p {
    margin: 2px 0 0;
    color: #456e66;
    font-size: .65rem;
}

.history-metrics {
    margin-bottom: 14px;
}

.history-chart-card {
    margin-bottom: 14px;
}

.glucose-chart-large,
.glucose-chart-large svg {
    min-height: 330px;
}

.history-lower-grid {
    align-items: start;
}

.history-table {
    min-width: 620px;
}

.range-summary-card {
    align-self: start;
}

.progress-row {
    display: grid;
    gap: 7px;
    margin-bottom: 16px;
}

.progress-row > div {
    display: grid;
    grid-template-columns: 10px 1fr auto;
    align-items: center;
    gap: 7px;
}

.progress-row b,
.progress-row strong {
    font-size: .7rem;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
}

.legend-dot.low {
    background: var(--danger);
}

.legend-dot.high {
    background: var(--warning);
}

.progress-track {
    display: block;
    height: 8px;
    border-radius: 999px;
    background: #edf1ef;
    overflow: hidden;
}

.progress-track i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--success);
}

.progress-track i.low {
    background: var(--danger);
}

.progress-track i.high {
    background: var(--warning);
}

.range-details {
    padding-top: 6px;
    border-top: 1px solid var(--line);
}

.filter-pills {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    overflow-x: auto;
    scrollbar-width: none;
}

.filter-pills::-webkit-scrollbar {
    display: none;
}

.filter-pills a,
.filter-pills button {
    display: inline-flex;
    min-height: 40px;
    padding: 8px 12px;
    align-items: center;
    gap: 7px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--ink-faint);
    background: rgba(255, 255, 255, .65);
    font-size: .72rem;
    font-weight: 750;
    white-space: nowrap;
}

.filter-pills a.is-active,
.filter-pills button.is-active {
    color: #fff;
    background: var(--brand-primary);
    border-color: var(--brand-primary);
}

.filter-pills span {
    display: grid;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    place-items: center;
    border-radius: 999px;
    color: var(--ink-soft);
    background: #fff;
    font-size: .62rem;
}

.alerts-page-list {
    display: grid;
    gap: 10px;
}

.alert-page-card {
    position: relative;
    display: grid;
    padding: 14px;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    overflow: hidden;
}

.alert-page-card::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--warning);
    content: "";
}

.alert-page-card.severity-critical::before {
    background: var(--danger);
}

.alert-page-card > form {
    grid-column: 2;
}

.alert-page-icon {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 14px;
    color: var(--warning);
    background: var(--warning-soft);
}

.severity-critical .alert-page-icon {
    color: var(--danger);
    background: var(--danger-soft);
}

.alert-page-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.alert-page-title h2 {
    margin: 0;
    font-size: .88rem;
}

.alert-page-content > p {
    margin: 5px 0 8px;
    color: var(--ink-soft);
    font-size: .73rem;
}

.alert-meta {
    display: flex;
    gap: 8px 14px;
    flex-wrap: wrap;
    color: var(--ink-faint);
    font-size: .64rem;
}

.alert-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.alert-meta .icon {
    width: 13px;
}

.reports-layout {
    margin-bottom: 14px;
    align-items: start;
}

.report-format-art {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 13px;
    color: var(--brand-primary);
    background: var(--success-soft);
}

.format-selector {
    display: grid;
    margin: 0;
    padding: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    border: 0;
}

.format-selector legend {
    margin-bottom: 7px;
    color: var(--ink);
    font-size: .78rem;
    font-weight: 750;
}

.format-selector label {
    position: relative;
    cursor: pointer;
}

.format-selector input {
    position: absolute;
    opacity: 0;
}

.format-selector label > span {
    display: grid;
    min-height: 92px;
    padding: 13px;
    grid-template-columns: 32px 1fr;
    align-items: center;
    gap: 3px 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.format-selector label > span .icon {
    grid-row: 1 / 3;
    color: var(--brand-primary);
}

.format-selector label > span b {
    font-size: .8rem;
}

.format-selector label > span small {
    color: var(--ink-faint);
    font-size: .64rem;
}

.format-selector input:checked + span {
    border-color: var(--brand-primary-bright);
    background: var(--success-soft);
    box-shadow: 0 0 0 3px rgba(18, 168, 157, .1);
}

.format-selector input:focus-visible + span {
    outline: 3px solid var(--brand-accent);
    outline-offset: 2px;
}

.custom-period-fields[hidden] {
    display: none;
}

.report-includes {
    display: grid;
    gap: 8px;
}

.report-includes > span {
    display: flex;
    min-height: 46px;
    padding: 10px;
    align-items: center;
    gap: 9px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-soft);
}

.report-includes .icon {
    width: 18px;
    color: var(--brand-primary);
}

.report-includes b {
    font-size: .7rem;
}

.report-history-card {
    margin-top: 14px;
}

.care-layout {
    align-items: start;
}

.care-status-card,
.invitation-card {
    padding: 22px;
}

.invitation-card {
    padding: 0;
}

.care-status-card {
    text-align: center;
}

.care-art {
    display: flex;
    min-height: 128px;
    margin-bottom: 16px;
    align-items: center;
    justify-content: center;
}

.care-node {
    position: relative;
    z-index: 2;
    display: grid;
    width: 66px;
    height: 66px;
    place-items: center;
    border: 7px solid #fff;
    border-radius: 50%;
    color: #fff;
    background: var(--brand-primary);
    box-shadow: var(--shadow-sm);
}

.care-doctor {
    background: var(--info);
}

.care-art > i {
    position: relative;
    display: flex;
    width: 100px;
    height: 2px;
    align-items: center;
    justify-content: space-around;
    background: var(--line-strong);
}

.care-art > i b {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--brand-primary-bright);
    animation: livePulse 2s infinite;
}

.care-art > i b:nth-child(2) {
    animation-delay: .3s;
}

.care-art > i b:nth-child(3) {
    animation-delay: .6s;
}

.care-status-card h2 {
    margin: 12px 0 3px;
    font-size: 1.18rem;
}

.care-status-card > p {
    margin: 0;
    color: var(--ink-soft);
    font-size: .78rem;
}

.invitation-input {
    text-align: center;
    font-size: 1.15rem;
    font-weight: 850;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.profile-layout {
    align-items: start;
}

.profile-identity-card {
    position: relative;
    padding: 0 20px 22px;
    overflow: hidden;
    text-align: center;
}

.profile-cover {
    height: 110px;
    margin: 0 -20px 0;
    background:
        radial-gradient(circle at 80% 20%, rgba(77, 218, 202, .3), transparent 35%),
        linear-gradient(140deg, #075e63, #06363b);
}

.profile-avatar {
    width: 78px;
    height: 78px;
    margin: -39px auto 10px;
    border: 6px solid #fff;
    font-size: 1.15rem;
}

.profile-identity-card h2 {
    margin: 4px 0 2px;
    font-size: 1.12rem;
}

.profile-identity-card > p {
    margin: 0 0 10px;
    color: var(--ink-faint);
    font-size: .7rem;
}

.profile-identity-card .compact-details {
    margin-top: 18px;
    text-align: left;
}

.topbar-action-button span {
    display: none;
}

.glucose-hero.is-live-delayed .live-badge {
    color: #ffe4bd;
    background: rgba(174, 113, 36, .2);
}

.glucose-hero.is-live-delayed .live-badge i {
    background: var(--warning);
}

.doctor-overview-metrics,
.patient-detail-metrics {
    margin-bottom: 14px;
}

.doctor-dashboard-grid {
    align-items: start;
}

.priority-section .card-body {
    padding-top: 15px;
}

.priority-patient-grid {
    display: grid;
    gap: 9px;
}

.priority-patient-card {
    position: relative;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 17px;
    background: linear-gradient(145deg, #fff, #f8faf7);
    overflow: hidden;
    transition: transform .18s var(--ease), box-shadow .18s ease, border-color .18s ease;
}

.priority-patient-card::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--success);
    content: "";
}

.priority-patient-card.risk-high::before {
    background: var(--warning);
}

.priority-patient-card.risk-low::before {
    background: var(--danger);
}

.priority-patient-card.risk-no_data::before {
    background: #75878b;
}

.priority-patient-card:hover {
    border-color: color-mix(in srgb, var(--brand-primary) 30%, var(--line));
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.patient-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.priority-patient-card h3 {
    margin: 11px 0 8px;
    overflow: hidden;
    font-size: .82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.priority-reading {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.priority-reading > strong {
    font-size: 1.7rem;
    letter-spacing: -.06em;
    line-height: 1;
}

.priority-reading > span {
    display: grid;
    gap: 1px;
    color: var(--ink-faint);
    font-size: .57rem;
}

.priority-reading b {
    color: var(--ink-soft);
    font-size: .61rem;
}

.patient-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 13px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
    color: var(--ink-faint);
    font-size: .61rem;
}

.patient-card-foot span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.patient-card-foot .icon {
    width: 13px;
}

.table-person {
    display: flex;
    min-width: 180px;
    align-items: center;
    gap: 9px;
}

.table-person .avatar {
    width: 34px;
    height: 34px;
    font-size: .62rem;
}

.table-person > span:last-child {
    display: grid;
    min-width: 0;
}

.table-person b {
    color: var(--ink);
    font-size: .74rem;
}

.table-person small {
    max-width: 190px;
    overflow: hidden;
    color: var(--ink-faint);
    font-size: .6rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.new-invitation-card {
    display: grid;
    margin-bottom: 14px;
    padding: 16px;
    grid-template-columns: 46px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    border-color: rgba(22, 130, 111, .2);
    background: linear-gradient(135deg, #effaf6, #fff);
}

.new-invitation-icon {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: var(--success);
}

.new-invitation-card > div {
    display: grid;
    min-width: 0;
}

.new-invitation-card > div strong {
    margin: 3px 0;
    font-size: 1.3rem;
    letter-spacing: .1em;
}

.new-invitation-card > div small {
    color: var(--ink-faint);
    font-size: .65rem;
}

.new-invitation-card > .button {
    grid-column: 1 / -1;
}

.patient-filter-bar {
    display: grid;
    margin-bottom: 14px;
    padding: 10px;
    gap: 8px;
}

.filter-search {
    min-width: 0;
}

.patient-filter-bar .select,
.patient-filter-bar .input {
    min-height: 43px;
}

.invitations-list-card {
    margin-top: 14px;
}

.invitation-chip-list {
    display: grid;
    gap: 8px;
}

.invitation-code-chip {
    display: grid;
    padding: 10px 11px;
    grid-template-columns: 1fr auto 38px;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-soft);
}

.invitation-code-chip b {
    font-size: .78rem;
    letter-spacing: .1em;
}

.invitation-code-chip small {
    color: var(--ink-faint);
    font-size: .61rem;
}

.invitation-code-chip .icon-button {
    width: 36px;
    height: 36px;
}

.app-dialog {
    width: min(92vw, 500px);
    max-height: min(88dvh, 720px);
    padding: 0;
    border: 0;
    border-radius: 25px;
    background: transparent;
    box-shadow: var(--shadow-lg);
    overflow: visible;
}

.app-dialog::backdrop {
    background: rgba(5, 31, 33, .63);
    backdrop-filter: blur(5px);
}

.dialog-card {
    position: relative;
    max-height: min(88dvh, 720px);
    padding: 27px;
    border: 1px solid rgba(255, 255, 255, .8);
    border-radius: 25px;
    background: #fff;
    overflow-y: auto;
}

.dialog-close {
    position: absolute;
    top: 13px;
    right: 13px;
}

.dialog-icon {
    display: grid;
    width: 52px;
    height: 52px;
    margin-bottom: 17px;
    place-items: center;
    border-radius: 17px;
    color: #fff;
    background: var(--brand-primary);
}

.dialog-card h2 {
    margin: 0 50px 7px 0;
    font-size: 1.25rem;
    letter-spacing: -.04em;
}

.dialog-card > p {
    margin-bottom: 20px;
    color: var(--ink-soft);
    font-size: .78rem;
}

.dialog-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 12px;
    color: var(--brand-primary);
    font-size: .7rem;
    font-weight: 800;
}

.back-link .icon {
    width: 14px;
    transform: rotate(180deg);
}

.patient-detail-header {
    display: grid;
    margin-bottom: 14px;
    padding: 18px;
    gap: 18px;
}

.patient-detail-person {
    display: grid;
    grid-template-columns: 52px 1fr;
    align-items: center;
    gap: 12px;
}

.patient-detail-person .avatar {
    width: 52px;
    height: 52px;
    font-size: .82rem;
}

.patient-detail-person h1 {
    margin: 1px 0 0;
    font-size: 1.25rem;
    letter-spacing: -.04em;
}

.patient-detail-person p {
    margin: 2px 0 0;
    color: var(--ink-faint);
    font-size: .65rem;
}

.patient-current-compact {
    display: grid;
    justify-items: start;
}

.patient-current-compact > strong {
    margin: 5px 0 0;
    font-size: 2rem;
    letter-spacing: -.06em;
}

.patient-current-compact > small {
    color: var(--ink-faint);
    font-size: .65rem;
}

.patient-detail-grid {
    align-items: start;
}

.notes-list {
    display: grid;
    gap: 12px;
}

.notes-list article {
    display: grid;
    grid-template-columns: 36px 1fr;
    align-items: start;
    gap: 10px;
}

.notes-list .avatar {
    width: 36px;
    height: 36px;
    border-width: 0;
    background: var(--info);
    font-size: .58rem;
}

.notes-list article > div {
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 4px 14px 14px 14px;
    background: var(--surface-soft);
}

.notes-list article > div > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.notes-list b {
    font-size: .67rem;
}

.notes-list time {
    color: var(--ink-faint);
    font-size: .58rem;
}

.notes-list p {
    margin: 5px 0 0;
    color: var(--ink-soft);
    font-size: .71rem;
}

.alert-patient-link {
    display: block;
    margin-bottom: 2px;
    color: var(--brand-primary);
    font-size: .64rem;
    font-weight: 800;
}

.install-sheet[hidden] {
    display: none;
}

.install-sheet {
    position: fixed;
    z-index: 1000;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 12px 12px max(12px, env(safe-area-inset-bottom));
}

.install-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 31, 33, .6);
    backdrop-filter: blur(5px);
}

.install-sheet-card {
    position: relative;
    z-index: 1;
    width: min(520px, 100%);
    max-height: calc(100dvh - 24px - env(safe-area-inset-bottom));
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, .75);
    border-radius: 28px;
    background: #fff;
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
    animation: sheetIn .42s var(--ease) both;
}

.install-close {
    position: absolute;
    top: 13px;
    right: 13px;
    z-index: 2;
}

.install-art {
    position: relative;
    display: grid;
    width: 86px;
    height: 86px;
    margin-bottom: 20px;
    place-items: center;
    border-radius: 27px;
    background: linear-gradient(145deg, #dff5f1, #f7edda);
}

.install-logo .brand-mark {
    width: 52px;
    height: 52px;
}

.install-art > i {
    position: absolute;
    border: 1px solid rgba(7, 94, 99, .13);
    border-radius: 50%;
    animation: orbit 9s linear infinite;
}

.install-art > i:nth-of-type(1) {
    width: 108px;
    height: 108px;
}

.install-art > i:nth-of-type(2) {
    width: 132px;
    height: 132px;
    animation-direction: reverse;
}

.install-art > i:nth-of-type(3) {
    top: -5px;
    right: -7px;
    width: 11px;
    height: 11px;
    border: 0;
    background: var(--brand-accent);
    animation: none;
}

.install-sheet-card h2 {
    margin: 6px 0 6px;
    font-size: 1.35rem;
    letter-spacing: -.04em;
}

.install-sheet-card p {
    margin-bottom: 20px;
    color: var(--ink-soft);
    font-size: .85rem;
}

.install-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.error-page {
    display: grid;
    min-height: 80dvh;
    padding: 24px;
    place-items: center;
}

.error-card {
    width: min(540px, 100%);
    padding: 40px 24px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: #fff;
    box-shadow: var(--shadow-md);
    text-align: center;
}

.error-code {
    display: block;
    color: var(--brand-accent);
    font-size: clamp(4rem, 20vw, 8rem);
    font-weight: 900;
    letter-spacing: -.1em;
    line-height: .9;
}

.error-card h1 {
    margin: 22px 0 8px;
    font-size: 1.5rem;
}

.error-card p {
    margin-bottom: 24px;
    color: var(--ink-soft);
}

@keyframes livePulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(.78); opacity: .65; }
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(-12px) scale(.98); }
}

@keyframes toastOut {
    to { opacity: 0; transform: translateX(22px) scale(.98); }
}

@keyframes sheetIn {
    from { opacity: 0; transform: translateY(36px) scale(.98); }
}

@keyframes orbit {
    to { transform: rotate(360deg); }
}

@keyframes morph {
    0% { border-radius: 42% 58% 57% 43% / 50% 42% 58% 50%; transform: rotate(-2deg); }
    100% { border-radius: 56% 44% 42% 58% / 45% 57% 43% 55%; transform: rotate(2deg); }
}

@media (min-width: 480px) {
    .public-login {
        display: inline-flex;
    }

    .app-main {
        padding-right: 20px;
        padding-left: 20px;
    }

    .metric-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .install-actions {
        grid-template-columns: 1fr auto;
    }

    .hero-actions,
    .status-actions {
        flex-direction: row;
    }

    .hero-actions {
        display: flex;
    }

    .hero-actions .button {
        width: auto;
    }

    .registration-actions {
        flex-direction: row;
    }

    .registration-actions .button {
        width: auto;
    }

    .registration-card-head > p {
        display: block;
    }

    .status-actions {
        display: flex;
        justify-content: center;
    }

    .today-chip {
        display: inline-flex;
    }

    .alert-page-card {
        grid-template-columns: 48px minmax(0, 1fr) auto;
        padding: 16px;
    }

    .alert-page-card > form {
        grid-column: auto;
        align-self: center;
    }

    .topbar-action-button span {
        display: inline;
    }

    .priority-patient-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .new-invitation-card {
        grid-template-columns: 46px minmax(0, 1fr) auto;
    }

    .new-invitation-card > .button {
        grid-column: auto;
    }

    .patient-detail-header {
        grid-template-columns: 1fr auto;
        align-items: center;
    }

    .patient-current-compact {
        justify-items: end;
        text-align: right;
    }
}

@media (min-width: 600px) {
    .form-grid.two-columns {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .form-grid .span-2 {
        grid-column: 1 / -1;
    }

    .page-grid.two-columns {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .glucose-hero {
        padding: 26px;
    }

    .app-topbar {
        padding-right: 20px;
        padding-left: 20px;
    }

    .topbar-title {
        display: block;
        margin-left: 3px;
    }

    .mobile-brand {
        display: none;
    }

    .language-switch-app {
        display: inline-flex;
    }

    .landing-stats-inner {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .landing-stats article,
    .landing-stats article:nth-child(2n),
    .landing-stats article:nth-last-child(-n+2) {
        border-right: 1px solid var(--line);
        border-bottom: 0;
    }

    .landing-stats article:last-child {
        border-right: 0;
    }

    .landing-stats article {
        min-height: 126px;
        padding: 22px;
    }

    .landing-stats strong {
        font-size: 2.15rem;
    }

    .feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .feature-grid article:last-child {
        grid-column: 1 / -1;
    }

    .registration-card {
        padding: 30px;
    }

    .status-card,
    .auth-simple-card {
        padding: 44px;
    }

    .care-layout {
        grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr);
    }

    .care-status-card,
    .invitation-card {
        min-height: 430px;
    }

    .profile-layout {
        grid-template-columns: 260px minmax(0, 1fr);
    }

    .patient-filter-bar {
        grid-template-columns: minmax(220px, 1fr) 180px 180px auto;
        align-items: center;
    }
}

@media (min-width: 840px) {
    .app-shell {
        display: grid;
        grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    }

    .app-sidebar {
        position: sticky;
        top: 0;
        width: var(--sidebar-width);
        max-height: 100dvh;
        transform: none;
        box-shadow: none;
    }

    .sidebar-close,
    .sidebar-backdrop,
    .menu-button,
    .bottom-nav {
        display: none;
    }

    .app-stage {
        grid-column: 2;
    }

    .app-topbar {
        min-height: var(--topbar-height);
        padding: 12px 28px;
    }

    .app-main {
        min-height: calc(100dvh - var(--topbar-height));
        padding: 24px 28px 44px;
        scroll-padding-block-end: 24px;
    }

    .toast-stack {
        top: 92px;
        right: 28px;
        left: auto;
        width: 420px;
    }

    .public-footer-inner {
        grid-template-columns: auto 1fr auto;
        align-items: center;
    }

    .public-footer p {
        text-align: center;
    }

    .install-sheet {
        align-items: center;
    }

    .landing-hero {
        padding-top: 78px;
        padding-bottom: 90px;
    }

    .landing-hero-inner {
        grid-template-columns: minmax(0, 1.05fr) minmax(390px, .8fr);
        align-items: center;
        gap: 50px;
    }

    .landing-hero-copy h1 {
        font-size: clamp(3.7rem, 6.1vw, 5.2rem);
    }

    .hero-visual {
        min-height: 540px;
    }

    .feature-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .feature-grid article:last-child {
        grid-column: auto;
    }

    .demo-ready-grid {
        grid-template-columns: minmax(0, .95fr) minmax(0, 1fr);
        gap: 80px;
    }

    .landing-cta-card {
        grid-template-columns: 1fr auto;
        padding: 56px;
    }

    .registration-shell {
        grid-template-columns: 330px minmax(0, 1fr);
        align-items: stretch;
    }

    .registration-intro {
        position: sticky;
        top: 20px;
        min-height: 660px;
        align-self: start;
        padding: 34px;
    }

    .profile-layout {
        grid-template-columns: 300px minmax(0, 1fr);
    }
}

@media (min-width: 1120px) {
    .doctor-dashboard-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .priority-patient-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 599px) {
    .responsive-data-table {
        min-width: 0;
    }

    .responsive-data-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }

    .responsive-data-table,
    .responsive-data-table tbody,
    .responsive-data-table tr,
    .responsive-data-table td {
        display: block;
        width: 100%;
    }

    .responsive-data-table tbody {
        padding: 8px;
    }

    .responsive-data-table tr {
        margin-bottom: 8px;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 15px;
        background: #fff;
    }

    .responsive-data-table td {
        display: flex;
        min-height: 34px;
        padding: 7px 0;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        border-bottom: 1px dashed var(--line);
        text-align: right;
    }

    .responsive-data-table td:last-child {
        border-bottom: 0;
    }

    .responsive-data-table td[data-label]::before {
        color: var(--ink-faint);
        content: attr(data-label);
        font-size: .63rem;
        font-weight: 700;
        text-align: left;
    }

    .responsive-data-table .table-person {
        min-width: 0;
        margin-left: auto;
        text-align: left;
    }
}

@media (max-width: 359px) {
    .public-header {
        padding: 10px 12px;
    }

    .public-header-inner {
        gap: 6px;
    }

    .public-header .brand {
        gap: 6px;
    }

    .public-header .brand-mark {
        width: 36px;
        height: 36px;
    }

    .public-header .brand-copy strong {
        font-size: .76rem;
    }

    .public-header .brand-copy small {
        display: none;
    }

    .public-actions {
        gap: 4px;
    }

    .public-actions .language-switch {
        min-height: 36px;
        gap: 4px;
        padding: 3px 5px;
        font-size: .62rem;
    }

    .public-actions .button-small {
        min-height: 40px;
        padding: 7px 9px;
        font-size: .72rem;
    }
}

@media (min-width: 1120px) {
    .page-grid.dashboard-grid {
        grid-template-columns: minmax(0, 1.6fr) minmax(330px, .7fr);
        align-items: start;
    }

    .page-grid.main-sidebar-grid {
        grid-template-columns: minmax(0, 1fr) 360px;
        align-items: start;
    }

    .metric-card {
        padding: 19px;
    }

    .patient-metrics .metric-card {
        padding-right: 9px;
        padding-left: 9px;
    }

    .patient-metrics .metric-card > span {
        font-size: .64rem;
        letter-spacing: -.02em;
    }

    .auth-layout {
        grid-template-columns: minmax(480px, .93fr) minmax(500px, 1.07fr);
    }

    .auth-brand-panel {
        position: relative;
        display: flex;
        min-height: 100dvh;
        padding: 34px 48px;
        flex-direction: column;
        overflow: hidden;
        color: #fff;
        background:
            radial-gradient(circle at 90% 4%, rgba(47, 204, 190, .28), transparent 33%),
            radial-gradient(circle at 5% 100%, rgba(211, 169, 102, .18), transparent 38%),
            linear-gradient(145deg, #074c52, #062c31);
    }

    .auth-brand-panel::after {
        position: absolute;
        right: -200px;
        bottom: -210px;
        width: 560px;
        height: 560px;
        border: 1px solid rgba(255, 255, 255, .07);
        border-radius: 50%;
        content: "";
        box-shadow: 0 0 0 80px rgba(255, 255, 255, .018), 0 0 0 160px rgba(255, 255, 255, .012);
    }

    .auth-brand .brand-copy strong {
        color: #fff;
    }

    .auth-brand .brand-copy small {
        color: rgba(233, 249, 247, .54);
    }

    .auth-brand-content {
        position: relative;
        z-index: 1;
        max-width: 570px;
        margin: auto 0 25px;
    }

    .auth-brand-content .hero-badge {
        color: #a4eee4;
        background: rgba(255, 255, 255, .07);
        border-color: rgba(255, 255, 255, .1);
    }

    .auth-brand-content h1 {
        margin: 18px 0 14px;
        font-size: clamp(3rem, 4.3vw, 5rem);
        letter-spacing: -.07em;
        line-height: .99;
    }

    .auth-brand-content p {
        max-width: 530px;
        color: rgba(235, 250, 248, .62);
        font-size: 1rem;
    }

    .auth-visual-card {
        position: relative;
        z-index: 1;
        width: min(100%, 520px);
        min-height: 180px;
        margin: 0 0 auto;
        padding: 20px;
        border: 1px solid rgba(255, 255, 255, .11);
        border-radius: 24px;
        background: rgba(255, 255, 255, .07);
        backdrop-filter: blur(15px);
    }

    .auth-visual-reading {
        display: flex;
        align-items: center;
        gap: 11px;
    }

    .auth-visual-reading > span {
        display: grid;
        width: 40px;
        height: 40px;
        place-items: center;
        border-radius: 13px;
        color: #9be8df;
        background: rgba(255, 255, 255, .08);
    }

    .auth-visual-reading strong {
        font-size: 2rem;
        letter-spacing: -.06em;
    }

    .auth-visual-reading small {
        color: rgba(255, 255, 255, .55);
        font-size: .68rem;
    }

    .auth-visual-line {
        position: absolute;
        top: 45px;
        right: 24px;
        display: flex;
        height: 58px;
        align-items: center;
        gap: 5px;
    }

    .auth-visual-line i {
        width: 5px;
        border-radius: 5px;
        background: #52d5c7;
    }

    .auth-visual-line i:nth-child(1),
    .auth-visual-line i:nth-child(6) { height: 10px; }
    .auth-visual-line i:nth-child(2),
    .auth-visual-line i:nth-child(5) { height: 28px; }
    .auth-visual-line i:nth-child(3) { height: 52px; }
    .auth-visual-line i:nth-child(4) { height: 37px; }

    .auth-visual-status {
        position: absolute;
        right: 20px;
        bottom: 18px;
        left: 20px;
        display: flex;
        align-items: center;
        gap: 8px;
        padding-top: 12px;
        border-top: 1px solid rgba(255, 255, 255, .1);
        color: #a9ede4;
        font-size: .68rem;
        font-weight: 750;
    }

    .auth-visual-status .icon {
        width: 16px;
    }

    .auth-panel-note {
        position: relative;
        z-index: 1;
        display: flex;
        align-items: center;
        gap: 7px;
        margin: 24px 0 0;
        color: rgba(235, 250, 248, .45);
        font-size: .65rem;
    }

    .auth-panel-note .icon {
        width: 15px;
    }

    .auth-form-panel {
        padding: 28px 52px;
    }

    .auth-mobile-brand {
        visibility: hidden;
    }

    .auth-form-wrap {
        width: min(100%, 470px);
    }

    .registration-shell {
        grid-template-columns: 370px minmax(0, 1fr);
    }
}

@media (max-height: 600px) {
    .app-topbar {
        min-height: 56px;
        padding-top: 6px;
        padding-bottom: 6px;
    }

    .app-main {
        padding-top: 12px;
    }

    .bottom-nav {
        min-height: 66px;
        padding-top: 4px;
        padding-bottom: 4px;
    }

    .bottom-nav a {
        min-height: 52px;
        gap: 2px;
    }

    .glucose-hero {
        padding-top: 16px;
        padding-bottom: 16px;
    }

    .glucose-value-row {
        margin: 14px 0;
    }
}

@media (forced-colors: active) {
    .status-badge,
    .trend-chip,
    .bottom-nav a.is-active .bottom-nav-icon {
        border: 1px solid currentColor;
    }

    .status-badge::before {
        forced-color-adjust: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}

/* Administrator workspace ------------------------------------------------- */

.role-admin .status-running,
.role-admin .status-open,
.role-admin .status-invited,
.role-admin .status-created,
.role-admin .status-completed {
    color: var(--success);
    background: var(--success-soft);
}

.role-admin .status-paused,
.role-admin .status-acknowledged {
    color: var(--warning);
    background: var(--warning-soft);
}

.role-admin .status-stopped,
.role-admin .status-resolved,
.role-admin .status-expired {
    color: #58696e;
    background: #e9eeef;
}

.role-admin .status-badge .icon,
.role-admin .chip .icon {
    width: 14px;
    height: 14px;
}

.role-admin .status-badge:has(.icon)::before {
    display: none;
}

.role-admin .section-action {
    flex: 0 0 auto;
}

.role-admin .metric-text {
    overflow: hidden;
    font-size: .96rem;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-dashboard-grid,
.simulation-admin-layout,
.system-admin-layout {
    align-items: start;
}

.admin-metrics,
.admin-user-metrics,
.admin-simulation-metrics,
.content-metrics,
.audit-metrics,
.system-data-metrics,
.admin-alert-metrics {
    margin-bottom: 14px;
}

.admin-patient-strip,
.audit-mini-list,
.service-status-list,
.quick-action-list {
    display: grid;
    gap: 8px;
}

.admin-patient-strip > article {
    display: grid;
    padding: 10px 0;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    border-bottom: 1px solid var(--line);
}

.admin-patient-strip > article:last-child {
    border-bottom: 0;
}

.admin-patient-strip .avatar {
    width: 38px;
    height: 38px;
    font-size: .62rem;
}

.admin-patient-strip > article > div,
.admin-patient-strip > article > strong {
    display: grid;
}

.admin-patient-strip > article > div b,
.admin-patient-strip > article > strong {
    font-size: .72rem;
}

.admin-patient-strip > article small {
    color: var(--ink-faint);
    font-size: .59rem;
}

.admin-patient-strip .status-badge {
    grid-column: 2 / -1;
    justify-self: start;
}

.audit-mini-list article {
    display: flex;
    padding: 9px 0;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--line);
}

.audit-mini-list article:last-child {
    border-bottom: 0;
}

.audit-dot {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 12px;
    color: var(--brand-primary);
    background: var(--success-soft);
}

.audit-dot .icon {
    width: 16px;
}

.audit-mini-list article > div {
    display: grid;
}

.audit-mini-list b {
    font-size: .71rem;
    text-transform: capitalize;
}

.audit-mini-list small {
    color: var(--ink-faint);
    font-size: .6rem;
}

.service-status-list > div,
.quick-action-list a {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid var(--line);
}

.service-status-list > div:last-child,
.quick-action-list a:last-child {
    border-bottom: 0;
}

.service-status-list > div > span:first-child,
.quick-action-list a {
    color: var(--ink-soft);
}

.service-status-list > div > span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.service-status-list b,
.quick-action-list b {
    color: var(--ink);
    font-size: .72rem;
}

.service-status-list .icon,
.quick-action-list .icon {
    width: 17px;
    color: var(--brand-primary);
}

.quick-action-list a > span {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 10px;
    background: var(--surface-soft);
}

.quick-action-list a b {
    margin-right: auto;
}

.system-last-tick {
    display: flex;
    margin: 0 20px 20px;
    padding: 12px;
    align-items: center;
    gap: 10px;
    border-radius: 13px;
    color: var(--brand-primary);
    background: var(--success-soft);
}

.system-last-tick > span {
    display: grid;
    color: var(--ink-soft);
    font-size: .61rem;
}

.system-last-tick b {
    color: var(--ink);
    font-size: .69rem;
}

.approval-grid {
    display: grid;
    gap: 12px;
}

.approval-card {
    padding: 18px;
}

.approval-person {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

.approval-person .avatar {
    width: 42px;
    height: 42px;
}

.approval-person h2 {
    margin: 0;
    font-size: .88rem;
}

.approval-person p {
    margin: 2px 0 0;
    overflow: hidden;
    color: var(--ink-faint);
    font-size: .64rem;
    text-overflow: ellipsis;
}

.approval-person .status-badge {
    grid-column: 1 / -1;
    justify-self: start;
}

.approval-details {
    display: grid;
    margin: 16px 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.approval-details > div {
    display: grid;
    min-width: 0;
    padding: 10px;
    border-radius: 12px;
    background: var(--surface-soft);
}

.approval-details dt {
    color: var(--ink-faint);
    font-size: .58rem;
}

.approval-details dd {
    margin: 3px 0 0;
    overflow-wrap: anywhere;
    font-size: .68rem;
    font-weight: 750;
}

.approval-footer {
    display: flex;
    padding-top: 13px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-top: 1px solid var(--line);
}

.approval-footer > span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--ink-faint);
    font-size: .62rem;
}

.approval-footer .icon {
    width: 14px;
}

.approval-dialog-actions {
    display: grid;
    margin-top: 20px;
    gap: 8px;
}

/* Simulation studio */

.simulation-patient-picker {
    display: flex;
    margin: 0 -2px 14px;
    padding: 2px;
    gap: 9px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
}

.simulation-patient-picker > a {
    display: grid;
    min-width: 224px;
    padding: 12px;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.simulation-patient-picker > a:hover {
    transform: translateY(-1px);
}

.simulation-patient-picker > a.is-active {
    border-color: color-mix(in srgb, var(--brand-primary) 55%, var(--line));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-primary) 9%, transparent);
}

.simulation-patient-picker .avatar {
    width: 38px;
    height: 38px;
    font-size: .61rem;
}

.simulation-patient-picker > a > span:nth-child(2) {
    display: grid;
    min-width: 0;
}

.simulation-patient-picker b {
    overflow: hidden;
    font-size: .72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.simulation-patient-picker small {
    color: var(--ink-faint);
    font-size: .59rem;
}

.simulation-patient-picker i {
    grid-column: 2;
    justify-self: start;
    font-style: normal;
}

.simulation-control-bar {
    display: flex;
    padding-top: 4px;
    gap: 8px;
    flex-wrap: wrap;
}

.simulation-control-bar .button {
    flex: 1 1 125px;
}

.period-choice-grid {
    display: grid;
    margin: 0;
    padding: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    border: 0;
}

.period-choice-grid legend {
    margin-bottom: 8px;
    color: var(--ink);
    font-size: .77rem;
    font-weight: 750;
}

.period-choice-grid label {
    position: relative;
    cursor: pointer;
}

.period-choice-grid input {
    position: absolute;
    opacity: 0;
}

.period-choice-grid label > span {
    display: flex;
    min-height: 66px;
    padding: 11px;
    align-items: baseline;
    justify-content: center;
    gap: 5px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--surface-soft);
}

.period-choice-grid b {
    font-size: 1.15rem;
}

.period-choice-grid small {
    color: var(--ink-faint);
    font-size: .62rem;
}

.period-choice-grid input:checked + span {
    color: var(--brand-primary);
    border-color: var(--brand-primary);
    background: var(--success-soft);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-primary) 8%, transparent);
}

.period-choice-grid input:focus-visible + span {
    outline: 3px solid var(--brand-accent);
    outline-offset: 2px;
}

.input-suffix {
    position: relative;
}

.input-suffix .input {
    padding-right: 82px;
}

.input-suffix > span {
    position: absolute;
    top: 50%;
    right: 13px;
    color: var(--ink-faint);
    font-size: .68rem;
    font-weight: 750;
    transform: translateY(-50%);
    pointer-events: none;
}

.simulation-state-card .compact-details {
    margin: 0;
}

.danger-zone {
    display: flex;
    margin-top: 14px;
    padding: 18px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-color: color-mix(in srgb, var(--danger) 26%, var(--line));
    background: linear-gradient(135deg, #fff, color-mix(in srgb, var(--danger-soft) 55%, #fff));
}

.danger-zone-copy {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
}

.danger-zone-copy > span {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 13px;
    color: var(--danger);
    background: var(--danger-soft);
}

.danger-zone h2 {
    margin: 0 0 3px;
    font-size: .9rem;
}

.danger-zone p {
    margin: 0;
    color: var(--ink-soft);
    font-size: .68rem;
}

.dialog-icon.danger {
    background: var(--danger);
}

/* Settings */

.settings-save-hint {
    display: inline-flex;
    padding: 9px 12px;
    align-items: center;
    gap: 7px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--ink-soft);
    background: rgba(255, 255, 255, .68);
    font-size: .67rem;
    font-weight: 700;
}

.settings-save-hint .icon {
    width: 16px;
    color: var(--brand-primary);
}

.settings-group-nav {
    display: flex;
    margin: 0 -2px 14px;
    padding: 2px;
    gap: 7px;
    overflow-x: auto;
    scrollbar-width: none;
}

.settings-group-nav::-webkit-scrollbar {
    display: none;
}

.settings-group-nav a {
    display: inline-flex;
    min-height: 42px;
    padding: 8px 11px;
    align-items: center;
    gap: 7px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    font-size: .68rem;
    font-weight: 750;
    white-space: nowrap;
}

.settings-group-nav .icon {
    width: 15px;
    color: var(--brand-primary);
}

.settings-group-nav b {
    display: grid;
    min-width: 20px;
    height: 20px;
    place-items: center;
    border-radius: 999px;
    color: var(--ink-faint);
    background: var(--surface-soft);
    font-size: .58rem;
}

.settings-group-card {
    scroll-margin-top: calc(var(--topbar-height) + 16px);
}

.settings-group-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-group-title > span {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 12px;
    color: var(--brand-primary);
    background: var(--success-soft);
}

.settings-group-title .icon {
    width: 17px;
}

.settings-fields {
    display: grid;
    padding-top: 12px;
}

.setting-row {
    display: grid;
    padding: 15px 0;
    gap: 11px;
    border-bottom: 1px solid var(--line);
}

.setting-row:last-child {
    border-bottom: 0;
}

.setting-copy {
    display: grid;
    align-content: start;
    justify-items: start;
    gap: 4px;
}

.setting-copy > label {
    color: var(--ink);
    font-size: .76rem;
    font-weight: 750;
}

.setting-copy > code,
.entity-reference code,
.ip-address {
    color: var(--ink-faint);
    font-family: "Cascadia Code", Consolas, monospace;
    font-size: .59rem;
}

.setting-visibility {
    display: inline-flex;
    margin-top: 2px;
    align-items: center;
    gap: 4px;
    color: var(--ink-faint);
    font-size: .57rem;
    font-weight: 700;
}

.setting-visibility.is-public {
    color: var(--brand-primary);
}

.setting-visibility .icon {
    width: 12px;
}

.setting-control {
    display: grid;
    gap: 5px;
}

.setting-control > small {
    color: var(--ink-faint);
    font-size: .57rem;
}

.switch-control {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    gap: 9px;
    cursor: pointer;
}

.switch-control input {
    position: absolute;
    opacity: 0;
}

.switch-control > span {
    position: relative;
    width: 45px;
    height: 25px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: #cbd6d4;
    transition: background .18s ease;
}

.switch-control > span::after {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    background: #fff;
    box-shadow: var(--shadow-xs);
    content: "";
    transition: transform .18s ease;
}

.switch-control input:checked + span {
    background: var(--brand-primary);
}

.switch-control input:checked + span::after {
    transform: translateX(20px);
}

.switch-control input:focus-visible + span {
    outline: 3px solid var(--brand-accent);
    outline-offset: 2px;
}

.switch-control b {
    font-size: .7rem;
}

.color-setting {
    display: flex;
    min-height: 48px;
    padding: 6px 10px 6px 6px;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.color-setting input {
    width: 48px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
}

.color-setting code,
.code-input {
    font-family: "Cascadia Code", Consolas, monospace;
}

.sticky-save-bar {
    position: sticky;
    z-index: 20;
    bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px) + 8px);
    display: flex;
    width: min(100%, 760px);
    margin: 14px auto 0;
    padding: 10px;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
    border-radius: 16px;
    background: rgba(255, 255, 255, .92);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(14px);
}

.sticky-save-bar > span {
    display: none;
    margin-right: auto;
    align-items: center;
    gap: 7px;
    color: var(--ink-faint);
    font-size: .62rem;
}

.sticky-save-bar .icon {
    width: 15px;
}

/* Content editor */

.content-editor-grid {
    display: grid;
    gap: 12px;
}

.content-editor-card {
    padding: 17px;
}

.content-editor-head,
.content-editor-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.content-editor-head > div {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
}

.content-editor-head code {
    overflow: hidden;
    color: var(--ink-soft);
    font-family: "Cascadia Code", Consolas, monospace;
    font-size: .65rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.language-tag {
    display: grid;
    min-width: 30px;
    height: 26px;
    padding: 0 6px;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    background: var(--brand-primary);
    font-size: .59rem;
    font-weight: 850;
}

.content-editor-form {
    display: grid;
    margin-top: 15px;
    gap: 13px;
}

.content-meta-fields {
    grid-template-columns: minmax(0, 1fr) 90px;
}

.content-active-toggle {
    grid-template-columns: 22px 1fr;
}

.content-editor-foot {
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.content-editor-foot > small {
    color: var(--ink-faint);
    font-size: .57rem;
}

.content-create-dialog {
    width: 100%;
}

.content-create-dialog .checkbox {
    margin-top: 14px;
}

/* Audit log */

.audit-filter-form {
    margin-bottom: 14px;
    padding: 14px;
}

.audit-filter-grid {
    display: grid;
    gap: 10px;
}

.audit-filter-actions {
    display: flex;
    margin-top: 12px;
    justify-content: flex-end;
    gap: 8px;
}

.audit-data-table {
    min-width: 1080px;
}

.audit-data-table td {
    vertical-align: top;
}

.audit-data-table time {
    color: var(--ink);
    font-size: .66rem;
    font-weight: 700;
    white-space: nowrap;
}

.table-subtext {
    display: block;
    margin-top: 2px;
    color: var(--ink-faint);
    font-size: .56rem;
}

.table-person.compact {
    min-width: 145px;
}

.table-person.compact .avatar {
    width: 30px;
    height: 30px;
    font-size: .56rem;
}

.audit-event-tag,
.system-actor {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.audit-event-tag {
    padding: 6px 8px;
    border-radius: 9px;
    color: var(--brand-primary);
    background: var(--success-soft);
    font-family: "Cascadia Code", Consolas, monospace;
    font-size: .59rem;
    white-space: nowrap;
}

.audit-event-tag.category-auth,
.audit-event-tag.category-security {
    color: var(--info);
    background: var(--info-soft);
}

.audit-event-tag .icon,
.system-actor .icon {
    width: 13px;
}

.system-actor {
    color: var(--ink-faint);
    font-size: .65rem;
}

.entity-reference {
    display: grid;
    min-width: 95px;
}

.entity-reference b {
    font-size: .65rem;
}

.audit-details {
    position: relative;
}

.audit-details summary {
    display: inline-flex;
    min-width: 40px;
    min-height: 32px;
    padding: 5px 8px;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 9px;
    cursor: pointer;
    list-style: none;
}

.audit-details summary::-webkit-details-marker {
    display: none;
}

.audit-details summary .icon {
    width: 13px;
}

.audit-details pre {
    max-width: 360px;
    max-height: 220px;
    margin: 7px 0 0;
    padding: 10px;
    overflow: auto;
    border-radius: 10px;
    color: #d8efeb;
    background: var(--surface-dark);
    font: .58rem/1.55 "Cascadia Code", Consolas, monospace;
    white-space: pre-wrap;
    word-break: break-word;
}

.pagination-nav {
    display: flex;
    margin-top: 14px;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.pagination-nav > span {
    color: var(--ink-faint);
    font-size: .66rem;
    font-weight: 700;
}

/* System diagnostics */

.system-health-hero {
    display: grid;
    margin-bottom: 14px;
    padding: 20px;
    grid-template-columns: 82px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    overflow: hidden;
    background:
        radial-gradient(circle at 100% 0, color-mix(in srgb, var(--brand-primary) 12%, transparent), transparent 36%),
        #fff;
}

.system-health-hero > .button {
    grid-column: 1 / -1;
}

.health-score-ring {
    display: grid;
    width: 82px;
    height: 82px;
    padding: 7px;
    place-items: center;
    border-radius: 50%;
    background: conic-gradient(var(--success) var(--health-score), #e5edeb 0);
}

.health-score-ring > span {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    align-content: center;
    border-radius: 50%;
    background: #fff;
}

.health-score-ring strong {
    font-size: 1rem;
}

.health-score-ring small {
    color: var(--ink-faint);
    font-size: .5rem;
}

.system-health-copy h2 {
    margin: 3px 0 5px;
    font-size: 1rem;
}

.system-health-copy p {
    margin: 0;
    color: var(--ink-soft);
    font-size: .66rem;
}

.health-check-list {
    display: grid;
    padding-top: 10px;
}

.health-check-list article {
    display: grid;
    padding: 10px 0;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    border-bottom: 1px solid var(--line);
}

.health-check-list article:last-child {
    border-bottom: 0;
}

.health-check-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 11px;
}

.health-check-icon.is-healthy {
    color: var(--success);
    background: var(--success-soft);
}

.health-check-icon.is-failed {
    color: var(--danger);
    background: var(--danger-soft);
}

.health-check-icon .icon {
    width: 15px;
}

.health-check-list article > div {
    display: grid;
}

.health-check-list b {
    font-size: .7rem;
}

.health-check-list small {
    color: var(--ink-faint);
    font-size: .58rem;
}

.runtime-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.runtime-grid article {
    display: flex;
    min-width: 0;
    padding: 11px;
    align-items: center;
    gap: 9px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--surface-soft);
}

.runtime-grid article > span {
    display: grid;
    width: 31px;
    height: 31px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 10px;
    color: var(--brand-primary);
    background: #fff;
}

.runtime-grid .icon {
    width: 14px;
}

.runtime-grid article > div {
    display: grid;
    min-width: 0;
}

.runtime-grid small {
    color: var(--ink-faint);
    font-size: .54rem;
}

.runtime-grid b {
    overflow: hidden;
    font-size: .64rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.storage-meter {
    display: flex;
    margin-bottom: 8px;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
}

.storage-meter b {
    font-size: .92rem;
}

.storage-meter small {
    color: var(--ink-faint);
    font-size: .6rem;
}

.storage-meter strong {
    color: var(--brand-primary);
    font-size: .74rem;
}

.storage-summary .compact-details {
    margin: 16px 0 0;
}

.security-check-list {
    display: grid;
    gap: 9px;
}

.security-check-list > div {
    display: flex;
    align-items: center;
    gap: 9px;
}

.security-check-list > div > span {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 11px;
}

.security-check-list .is-secure {
    color: var(--success);
    background: var(--success-soft);
}

.security-check-list .needs-attention {
    color: var(--warning);
    background: var(--warning-soft);
}

.security-check-list .icon {
    width: 15px;
}

.security-check-list p {
    display: grid;
    margin: 0;
}

.security-check-list b {
    font-size: .68rem;
}

.security-check-list small {
    color: var(--ink-faint);
    font-size: .58rem;
}

.system-note {
    display: flex;
    margin: 14px 0 0;
    padding: 10px;
    align-items: flex-start;
    gap: 7px;
    border-radius: 11px;
    color: var(--ink-soft);
    background: var(--info-soft);
    font-size: .61rem;
}

.system-note .icon {
    width: 14px;
    color: var(--info);
}

/* Admin profile and alerts */

.admin-profile-card .status-badge {
    margin: 0 auto 12px;
}

.profile-last-action {
    display: flex;
    width: calc(100% - 36px);
    margin: 16px 18px 18px;
    padding: 11px;
    align-items: center;
    gap: 9px;
    border-radius: 12px;
    color: var(--brand-primary);
    background: var(--success-soft);
}

.profile-last-action > span {
    display: grid;
    min-width: 0;
}

.profile-last-action small,
.profile-last-action time {
    color: var(--ink-faint);
    font-size: .55rem;
}

.profile-last-action b {
    overflow: hidden;
    color: var(--ink);
    font-size: .63rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-safety-note {
    display: flex;
    padding: 17px;
    align-items: flex-start;
    gap: 11px;
    border-color: color-mix(in srgb, var(--info) 22%, var(--line));
    background: linear-gradient(135deg, #fff, var(--info-soft));
}

.account-safety-note > span {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 12px;
    color: var(--info);
    background: #fff;
}

.account-safety-note h2 {
    margin: 0 0 4px;
    font-size: .82rem;
}

.account-safety-note p {
    margin: 0;
    color: var(--ink-soft);
    font-size: .65rem;
}

.admin-alert-title {
    display: grid;
    gap: 8px;
}

.admin-alert-title h2 {
    margin: 0;
}

.admin-alert-actions {
    display: flex;
    grid-column: 2;
    gap: 7px;
    flex-wrap: wrap;
}

@media (max-width: 639px) {
    .role-admin .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .role-admin .section-heading .section-action,
    .role-admin .section-heading > .button {
        width: 100%;
    }

    .danger-zone {
        align-items: stretch;
        flex-direction: column;
    }

    .danger-zone > .button {
        width: 100%;
    }

    .setting-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .content-editor-foot {
        align-items: stretch;
        flex-direction: column;
    }

    .content-editor-foot .button {
        width: 100%;
    }

    .admin-alert-filter {
        grid-template-columns: 1fr;
    }

    .admin-alert-actions {
        grid-column: 1 / -1;
    }

    .system-health-hero {
        grid-template-columns: 70px minmax(0, 1fr);
    }

    .health-score-ring {
        width: 70px;
        height: 70px;
    }
}

@media (min-width: 640px) {
    .role-admin .metric-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .admin-patient-strip > article {
        grid-template-columns: 40px minmax(0, 1fr) auto auto;
    }

    .admin-patient-strip .status-badge {
        grid-column: auto;
    }

    .approval-grid,
    .content-editor-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .approval-person {
        grid-template-columns: 44px minmax(0, 1fr) auto;
    }

    .approval-person .status-badge {
        grid-column: auto;
    }

    .approval-dialog-actions {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .period-choice-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .setting-row {
        grid-template-columns: minmax(210px, .75fr) minmax(0, 1.25fr);
        gap: 24px;
    }

    .sticky-save-bar > span {
        display: inline-flex;
    }

    .audit-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .audit-search {
        grid-column: 1 / -1;
    }

    .system-health-hero {
        grid-template-columns: 96px minmax(0, 1fr) auto;
        padding: 25px;
    }

    .system-health-hero > .button {
        grid-column: auto;
    }

    .health-score-ring {
        width: 96px;
        height: 96px;
    }
}

@media (min-width: 900px) {
    .admin-dashboard-grid,
    .simulation-admin-layout,
    .system-admin-layout {
        grid-template-columns: minmax(0, 1.55fr) minmax(290px, .72fr);
    }

    .admin-user-filter {
        grid-template-columns: minmax(230px, 1fr) 160px 180px auto;
        align-items: center;
    }

    .content-filter-bar {
        grid-template-columns: minmax(250px, 1fr) 180px 150px auto;
        align-items: center;
    }

    .admin-alert-filter {
        grid-template-columns: repeat(3, minmax(170px, 1fr)) auto;
        align-items: center;
    }

    .audit-filter-grid {
        grid-template-columns: minmax(250px, 1.3fr) minmax(190px, 1fr) minmax(180px, .9fr) 150px 150px;
        align-items: end;
    }

    .audit-search {
        grid-column: auto;
    }
}

@media (min-width: 1180px) {
    .content-editor-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .content-create-dialog {
        min-width: 620px;
    }

    .app-dialog:has(.content-create-dialog) {
        width: min(92vw, 680px);
    }
}
