/* The app shell: a big rounded panel with the menu on the left and the page on the right. */

.app-shell {
    display: flex; flex-wrap: wrap; min-height: 100vh; min-height: 100dvh;
    --glow: 1;
    background: var(--gradient-shell);
    /* The glows are drawn on their own layer behind everything. If they were the shell's own background, the browser painted them again on every scroll step, which made touchpad scrolling stall. */
    isolation: isolate; position: relative;
}
.app-shell::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    /* Soft colour glows behind the page, in the same colours as the tiles. The frosted cards pick them up. */
    background:
        radial-gradient(620px 440px at 80% 6%, rgba(196, 232, 150, calc(0.60 * var(--glow))), transparent 70%),
        radial-gradient(540px 480px at 98% 58%, rgba(120, 208, 176, calc(0.55 * var(--glow))), transparent 70%),
        radial-gradient(600px 480px at 34% 96%, rgba(190, 184, 244, calc(0.50 * var(--glow))), transparent 70%),
        radial-gradient(420px 360px at 8% 40%, rgba(150, 220, 190, calc(0.40 * var(--glow))), transparent 70%);
}

/* On a wide screen the panel floats on a soft green canvas, with rounded corners all around.
   The panel itself never moves: the menu stays put and only the page area scrolls inside it. */
@media (min-width: 1100px) {
    /* The whole app is drawn at 85% of its design size on a computer, so more fits on the screen.
       This multiplies with the browser's own zoom, it cannot replace it. */
    :root { --z: 0.85; }
    html:has(.app-shell) { overflow: hidden; }
    .app-shell::before { will-change: transform; }
    body:has(.app-shell) {
        background: var(--color-canvas); padding: 18px; overflow: hidden;
        zoom: var(--z); height: calc(100vh / var(--z)); height: calc(100dvh / var(--z));
    }
    .app-shell {
        flex-wrap: nowrap; overflow: hidden;
        height: calc(100vh / var(--z) - 36px); height: calc(100dvh / var(--z) - 36px); min-height: 0;
        border-radius: var(--radius-xl); box-shadow: 0 20px 60px rgba(16, 35, 27, 0.10);
    }
    .app-shell > .sidebar { position: relative; top: auto; height: 100%; }
    /* The page area has its own rounded corners, so Chrome clips its scrollbar to the curve too. */
    .app-shell > .app-main {
        flex: 1 1 0; height: 100%; overflow-y: auto; border-radius: 0 var(--radius-xl) var(--radius-xl) 0;
    }
    .app-main::-webkit-scrollbar { width: 12px; }
    .app-main::-webkit-scrollbar-track { background: transparent; margin: 22px 0; }
    .app-main::-webkit-scrollbar-thumb { background: #B7D2C6; border-radius: 999px; border: 3px solid transparent; background-clip: padding-box; }
    .app-main::-webkit-scrollbar-thumb:hover { background: #8FBCA8; background-clip: padding-box; border: 3px solid transparent; }
    @supports not selector(::-webkit-scrollbar) {
        .app-shell > .app-main { scrollbar-width: thin; scrollbar-color: #B7D2C6 transparent; }
    }
}

.sidebar {
    flex: 0 0 var(--sidebar-width); align-self: flex-start;
    position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto;
    display: flex; flex-direction: column; gap: 14px;
    padding: 26px 16px 22px;
    background: transparent;
    scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }

.sidebar-brand { padding: 0 10px 8px; }

/* Which pharmacy this is. Owners, managers and cashiers see it on every screen. */
.pharmacy-chip {
    display: flex; align-items: center; gap: 10px; margin: 0 2px; padding: 10px 14px 10px 10px;
    border-radius: 20px;
}
.pharmacy-chip-icon { width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; background: var(--tile-lime); color: var(--color-ink); }
.pharmacy-chip-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.pharmacy-chip-label { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text-muted); }
.pharmacy-chip-name { font-size: 14px; font-weight: 800; color: var(--color-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mobile-bar-pharmacy {
    margin-left: auto; max-width: 55%; padding: 6px 12px; border-radius: var(--radius-pill);
    background: var(--tile-lime); color: var(--color-ink); font-size: 13px; font-weight: 800;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.nav-list {
    display: flex; flex-direction: column; gap: 2px;
    /* Only the links scroll, never the logo or the plan card. There is no scrollbar, and the edges fade out so it still looks deliberate. */
    flex: 1 1 auto; min-height: 0; overflow-y: auto; margin-inline: -4px; padding: 6px 4px 18px;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 8px, #000 calc(100% - 22px), transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0, #000 8px, #000 calc(100% - 22px), transparent 100%);
}
.nav-list::-webkit-scrollbar { display: none; }
.nav-label {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 14px 5px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: #8AA396;
}
.nav-label::after { content: ""; flex: 1 1 auto; height: 1px; background: linear-gradient(90deg, rgba(16, 35, 27, 0.14), rgba(16, 35, 27, 0)); }
.nav-label:first-child { padding-top: 4px; }
.nav-item {
    display: flex; align-items: center; gap: 12px; width: 100%;
    padding: 5px 14px 5px 8px; border: 0; border-radius: var(--radius-pill); background: transparent;
    color: var(--color-text); font-size: 15px; font-weight: 650; text-decoration: none; cursor: pointer; text-align: left;
    transition: background 0.15s ease, color 0.15s ease;
}
.nav-icon {
    width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto;
    display: flex; align-items: center; justify-content: center;
    background: rgba(11, 127, 90, 0.11); color: var(--color-ink);
    transition: background 0.15s ease, color 0.15s ease;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.75); color: var(--color-text); }
.nav-item:hover .nav-icon { background: rgba(11, 127, 90, 0.2); }
.nav-item.active { background: var(--color-ink); color: #FFFFFF; font-weight: 700; box-shadow: 0 6px 16px rgba(12, 61, 48, 0.25); }
.nav-item.active .nav-icon { background: rgba(255, 255, 255, 0.16); color: #FFFFFF; }
/* A red circle with the number of requests waiting for the super admin. */
.nav-badge {
    margin-left: auto; flex: 0 0 auto; min-width: 22px; height: 22px; padding: 0 6px; box-sizing: border-box;
    display: inline-flex; align-items: center; justify-content: center; border-radius: 999px;
    background: #E5484D; color: #FFFFFF; font-size: 12px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums;
    box-shadow: 0 0 0 3px rgba(229, 72, 77, 0.18);
}

.sidebar-footer { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }

/* The small plan card at the bottom of the menu. */
.plan-mini {
    display: flex; align-items: center; gap: 14px; padding: 14px;
    border-radius: 22px; background: linear-gradient(160deg, #DDF4EA 0%, #C6EBDC 100%);
}
.plan-ring {
    --pct: 100; width: 52px; height: 52px; border-radius: 50%; flex: 0 0 auto; position: relative;
    display: flex; align-items: center; justify-content: center;
    background: conic-gradient(var(--color-ink) calc(var(--pct) * 1%), rgba(255, 255, 255, 0.7) 0);
}
.plan-ring::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: #E9F8F1; }
.plan-ring span { position: relative; font-size: 15px; font-weight: 800; color: var(--color-ink); }
.plan-mini-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.plan-mini-title { font-weight: 800; font-size: 14px; color: var(--color-ink); }
.plan-mini-detail { font-size: 13px; color: var(--color-text-nav); }

.user-card { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-pill); }

/* The two pills in the menu are glass: a bright sheen, a hairline edge and a soft shadow, so they stand out from the green behind them. */
.pharmacy-chip, .user-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.62) 55%, rgba(206, 238, 222, 0.62) 100%);
    border: 1px solid rgba(255, 255, 255, 0.95);
    box-shadow: inset 0 1px 0 #FFFFFF, inset 0 -1px 0 rgba(12, 61, 48, 0.06), 0 0 0 1px rgba(12, 61, 48, 0.08), 0 10px 26px rgba(16, 35, 27, 0.13);
    -webkit-backdrop-filter: blur(14px) saturate(1.5); backdrop-filter: blur(14px) saturate(1.5);
}
.avatar {
    width: 40px; height: 40px; border-radius: 50%; flex: 0 0 auto;
    display: flex; align-items: center; justify-content: center;
    background: var(--color-primary); color: #FFFFFF; font-weight: 700;
}
.user-meta { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.user-name { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-role { font-size: 13px; color: var(--color-text-muted); }

/* The account row at the top of the phone drawer: the person, then settings and sign out as round icons. */
.drawer-account { display: flex; align-items: center; gap: 8px; }
.drawer-account .user-card { flex: 1 1 auto; min-width: 0; gap: 7px; padding: 5px 8px 5px 5px; }
.drawer-account .avatar { width: 34px; height: 34px; font-size: 13px; }
.acct-actions { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.acct-actions form { display: flex; margin: 0; }
.acct-btn {
    width: 34px; height: 34px; border: 0; border-radius: 50%; flex: 0 0 auto; cursor: pointer; text-decoration: none;
    display: flex; align-items: center; justify-content: center;
    background: rgba(11, 127, 90, 0.11); color: var(--color-ink); transition: background 0.15s ease, color 0.15s ease;
}
.acct-btn:hover { background: rgba(11, 127, 90, 0.2); }
.acct-btn.active { background: var(--color-ink); color: #FFFFFF; }
.acct-btn.is-danger { background: var(--color-danger-bg); color: var(--color-danger-ink); }
.acct-btn.is-danger:hover { background: #FBD2CE; }
/* A long name wraps onto a second line instead of being cut off. */
.drawer-account .user-name {
    white-space: normal; overflow-wrap: anywhere; line-height: 1.25;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.app-main { flex: 999 1 600px; min-width: 0; }
.app-content { padding: 34px 40px 48px 16px; display: flex; flex-direction: column; gap: 22px; max-width: 1920px; }

/* On a computer the top bar carries the greeting and the account, so the page starts a little higher.
   The phone drawer keeps its own copy of the account links. */
@media (min-width: 901px) {
    .app-content { padding-top: 4px; }
    .home-greeting { display: none; }
    .drawer-only { display: none; }
}

/* On a short laptop screen I tighten the menu a little so Sign out stays visible. */
@media (min-width: 1100px) and (max-height: 900px) {
    .app-shell > .sidebar { gap: 8px; padding-top: 20px; padding-bottom: 16px; }
    .nav-item { padding-top: 3px; padding-bottom: 3px; }
    .nav-icon { width: 32px; height: 32px; }
    .nav-label { padding-top: 10px; }
    .plan-mini { padding: 10px 12px; }
}

/* The top bar and backdrop only exist for phones, so they are hidden on a wide screen. */
.mobile-bar, .drawer-backdrop { display: none; }
/* This needs the .sidebar in front, because .icon-btn below would otherwise win and show the button on a wide screen. */
.sidebar .drawer-close { display: none; }

.icon-btn {
    width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
    border: 0; border-radius: 50%; background: transparent; color: var(--color-text); cursor: pointer;
}
.icon-btn:hover { background: var(--color-bg); }

/* The bell in the phone bar. The count sits on its corner. */
.mobile-bell { position: relative; flex: 0 0 auto; color: var(--color-ink); text-decoration: none; }
.mobile-bell-badge {
    position: absolute; top: 3px; right: 1px; min-width: 18px; height: 18px; padding: 0 5px; display: flex; align-items: center; justify-content: center;
    border-radius: 999px; background: #D92D20; color: #FFFFFF; font-size: 11px; font-weight: 800; line-height: 1; border: 2px solid #FFFFFF;
}

/* Phones and small tablets: the sidebar becomes a drawer that slides in from the left. */
@media (max-width: 900px) {
    .app-shell { display: block; }
    .mobile-bar {
        display: flex; align-items: center; gap: 8px; height: 60px; padding: 0 12px;
        position: sticky; top: 0; z-index: 30;
        background: rgba(255, 255, 255, 0.92); border-bottom: 1px solid var(--color-border-soft);
        -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    }
    .sidebar {
        position: fixed; top: 0; left: 0; z-index: 50;
        /* An explicit height is needed here, otherwise the drawer only grows to fit its content. */
        width: min(320px, 88vw); height: 100vh; height: 100dvh; overflow-y: auto;
        padding: 20px 14px calc(20px + env(safe-area-inset-bottom, 0px)); gap: 12px;
        background: var(--color-surface); border-radius: 0 28px 28px 0;
        transform: translateX(-100%); transition: transform 0.22s ease;
        box-shadow: none;
    }
    .sidebar.is-open { transform: none; box-shadow: 0 0 40px rgba(16, 35, 27, 0.25); }
    .sidebar-brand { padding: 0 8px; margin-right: 44px; }
    .sidebar .drawer-close {
        display: flex; position: absolute; top: 18px; right: 12px;
        width: 40px; height: 40px; background: var(--color-bg);
    }
    /* The footer holds only the plan card now, so the pharmacy name and the plan are slimmer to give the links more room. */
    .sidebar-footer { padding-top: 6px; }
    .pharmacy-chip { margin: 0; padding: 0 6px; border: 0; border-radius: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
    .pharmacy-chip-icon { width: 28px; height: 28px; }
    .pharmacy-chip-label { display: none; }
    .plan-mini { padding: 10px 12px; gap: 12px; }
    .plan-ring { width: 44px; height: 44px; }
    .plan-ring::before { inset: 5px; }
    .drawer-backdrop {
        display: block; position: fixed; inset: 0; z-index: 40;
        background: rgba(16, 35, 27, 0.45); opacity: 0; pointer-events: none; transition: opacity 0.22s ease;
        -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
    }
    .drawer-backdrop.is-open { opacity: 1; pointer-events: auto; }
    .app-content { padding: 20px 16px 40px; }
}

/* Blazor shows this bar when something unexpected breaks. */
#blazor-error-ui {
    display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
    padding: 14px 20px; background: var(--color-danger-bg); color: var(--color-danger-ink); font-weight: 600;
}
#blazor-error-ui .dismiss { position: absolute; right: 16px; top: 10px; border: 0; background: transparent; color: inherit; font-weight: 700; cursor: pointer; min-height: 40px; }


/* Setup screen shell (shown right after sign up, before the pharmacy has a menu). */
.setup-shell { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--color-surface); }
.setup-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 32px; border-bottom: 1px solid var(--color-border-soft); background: #fff; }
.setup-bar form { margin: 0; }
.setup-main { flex: 1 1 auto; display: flex; justify-content: center; padding: 40px 20px 64px; }
.setup-main > * { width: 100%; max-width: 720px; }
.setup-card { padding: 28px; display: flex; flex-direction: column; gap: 24px; }
.setup-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.setup-head h1 { font-size: 30px; letter-spacing: -0.015em; }
.setup-trial { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius-md); background: #D6EEE2; border: 1.5px solid #7DBF9F; color: var(--color-primary-ink); font-size: 14px; font-weight: 700; }
.setup-actions { display: flex; justify-content: flex-end; }

/* Block page, shown instead of the app when access is not allowed. */
.blocked-card { max-width: 560px; margin: 40px auto; padding: 36px 28px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.blocked-card h1 { font-size: 26px; }
.blocked-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.blocked-actions form { margin: 0; }
/* The owner of an ended trial or plan asks for a plan right here, because the rest of the app is closed. */
.blocked-plans { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 6px; }
.blocked-plans-title { font-size: 13px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-text-muted); }
.blocked-plan-row { width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.blocked-plan {
    display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px 14px; cursor: pointer; font: inherit;
    border-radius: 20px; border: 1.5px solid rgba(12, 61, 48, 0.14); background: rgba(255, 255, 255, 0.7);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.blocked-plan:hover, .blocked-plan:focus-visible { border-color: #16574A; box-shadow: 0 10px 24px rgba(16, 35, 27, 0.12); transform: translateY(-2px); outline: none; }
.blocked-plan strong { font-size: 15px; color: var(--color-ink); }
.blocked-plan b { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; color: var(--color-ink); }
.blocked-plan span { font-size: 13px; color: var(--color-text-muted); }
.blocked-sent { width: 100%; display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: 20px; background: #E9F7DA; border: 1.5px solid rgba(61, 178, 107, 0.35); }
.blocked-sent strong { color: var(--color-ink); }
.blocked-sent span { font-size: 14px; color: var(--color-text-muted); }

@media (max-width: 700px) {
    .setup-bar { padding: 14px 16px; }
    .setup-main { padding: 24px 16px 48px; }
    .setup-card { padding: 20px; }
    .setup-actions .btn { width: 100%; }
}

/* The plan card on the owner dashboard. */
.plan-card { padding: 18px 22px; max-width: 720px; }
.plan-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.plan-text { display: flex; flex-direction: column; gap: 2px; flex: 1 1 200px; min-width: 0; }

/* Change password card. */
.pw-card { max-width: 520px; padding: 28px; display: flex; flex-direction: column; gap: 20px; }

/* A real field the password manager can read, but nobody sees. */
.vh-input { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }


/* Confirmation dialog used before risky actions. */
.modal-backdrop {
    position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 16px;
    background: rgba(16, 35, 27, 0.5);
}
.modal-card {
    width: 100%; max-width: 440px; padding: 26px; display: flex; flex-direction: column; gap: 12px;
    background: var(--color-surface); border-radius: var(--radius-lg, 16px); box-shadow: 0 20px 60px rgba(16, 35, 27, 0.3);
}
/* Once the page has scrolled, the top bar sits above the dialog's dim and the dim would stop short of it.
   So while a dialog is open on a scrolled page, the bar gets the same dim on top of itself. At the top of a page the dialog's own dim already covers it.
   The layer also takes the clicks, like the rest of the dim does. */
html[data-scrolled] body:has(.modal-backdrop) .topbar::after,
html[data-scrolled] body:has(.modal-backdrop) .mobile-bar::after {
    content: ""; position: absolute; inset: 0; z-index: 5;
    background: rgba(16, 35, 27, 0.5);
    -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
    animation: modal-fade 0.18s ease-out both;
}
.modal-card h2 { font-size: 20px; }
.modal-card p { color: var(--color-text-muted); line-height: 1.5; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 8px; }

/* Stacked badges in the pharmacies list. */
.status-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }


/* On a phone the page is narrow, so the glows would sit right behind the text. I turn them down and make the cards more solid. */
@media (max-width: 900px) {
    .app-shell { --glow: 0.45; }
}


/* The top bar is clear at the top of a page. site.js sets data-scrolled on the page once it has scrolled, and the strip fades in.
   It lives here, not in TopBar.razor.css, because scoped css cannot see the html element. */
html[data-scrolled] .topbar::before { opacity: 1; }
/* The Settings banner sticks under the bar and gets the same strip behind it. */
html[data-scrolled] .set-top::before { opacity: 1; }

/* Printing a receipt: only the page content is printed, without the menu, the buttons or the floating panel. */
@media print {
    html, body { height: auto !important; overflow: visible !important; zoom: 1 !important; padding: 0 !important; background: #FFFFFF !important; }
    .app-shell { display: block !important; height: auto !important; overflow: visible !important; border-radius: 0 !important; box-shadow: none !important; background: #FFFFFF !important; }
    .app-shell > .app-main { height: auto !important; overflow: visible !important; border-radius: 0 !important; }
    .app-shell::before { display: none !important; }
    .app-content { padding: 0 !important; }
    .sidebar, .mobile-bar, .drawer-backdrop, .toast-region, .no-print, #blazor-error-ui { display: none !important; }
    .card { background: #FFFFFF !important; box-shadow: none !important; border: 0 !important; }
}

/* The shell stays hidden until the first access check is done, so a waiting pharmacy never sees the menu for a moment. */
.app-shell.is-booting { visibility: hidden; }

/* The setup screen: two quiet sections, and one address bar that shows the pharmacy's own web address. */
.setup-card { gap: 28px; }
.setup-section { display: flex; flex-direction: column; gap: 18px; }
.setup-section + .setup-section { padding-top: 28px; border-top: 1px solid var(--color-border-soft); }
.setup-section-head { display: flex; align-items: center; gap: 14px; }
.setup-section-head h2 { font-size: 18px; letter-spacing: -0.01em; }
.setup-section-head p { margin: 2px 0 0; font-size: 14px; color: var(--color-text-muted); }
.setup-tile { flex: 0 0 auto; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 14px; background: var(--tile-mint); color: var(--tile-ink); }
.addr-bar {
    display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 8px 16px; border-radius: var(--radius-pill);
    background: var(--color-bg); border: 1.5px solid var(--color-border); color: var(--color-text-muted);
    font-size: 15px; transition: border-color 0.2s ease, background 0.2s ease;
}
.addr-lock { display: flex; flex: 0 0 auto; }
.addr-url { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.addr-url b { color: var(--color-ink); font-weight: 800; }
.addr-state { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; flex: 0 1 auto; font-size: 13px; font-weight: 700; text-align: right; }
.addr-bar.is-ok { background: var(--color-success-bg); border-color: #7DBF9F; color: var(--color-success-ink); }
.addr-bar.is-bad { background: var(--color-danger-bg); border-color: #F2BDB8; color: var(--color-danger-ink); }
.addr-bar.is-bad .addr-url b { color: var(--color-danger-ink); }
@media (max-width: 520px) {
    .addr-bar { flex-wrap: wrap; border-radius: var(--radius-md); }
    .addr-state { margin-left: 0; flex-basis: 100%; text-align: left; }
}
@media (prefers-reduced-motion: reduce) { .addr-bar { transition: none; } }
