:root {
    --blue-950: #08213f;
    --blue-900: #0b2f5b;
    --blue-800: #124b8c;
    --blue-700: #1769c2;
    --blue-600: #2288e8;
    --blue-100: #dcebff;
    --blue-050: #f3f8ff;
    --ink: #172033;
    --muted: #63738b;
    --line: #d7e3f2;
    --surface: #ffffff;
    --canvas: #edf5ff;
    --green: #138a58;
    --amber: #b96906;
    --danger: #b42318;
    font-family: Inter, Segoe UI, Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background:
        linear-gradient(135deg, rgba(34, 136, 232, 0.12), transparent 36%),
        linear-gradient(180deg, var(--blue-050), #ffffff 58%);
    min-height: 100vh;
}

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

button,
input,
select {
    font: inherit;
}

input,
select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.7rem 0.85rem;
    color: var(--blue-950);
    background: #fff;
}

input {
    text-transform: uppercase;
}

input:focus,
select:focus {
    border-color: var(--blue-600);
    box-shadow: 0 0 0 3px rgba(34, 136, 232, 0.14);
    outline: none;
}

label,
.compact-label {
    display: grid;
    gap: 0.35rem;
    color: var(--blue-950);
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    padding: 0.8rem clamp(1rem, 4vw, 3rem);
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
}

.brand strong,
.brand small {
    display: block;
}

.brand small {
    color: var(--muted);
    font-size: 0.78rem;
}

.topnav {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.topbar-tools {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.topbar-utilities {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.topnav + .topbar-utilities {
    margin-left: 0.15rem;
    border-left: 1px solid #d8e5f3;
    padding-left: 0.9rem;
}

.topnav a {
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    color: var(--blue-900);
    font-weight: 700;
}

.topnav a:hover {
    background: var(--blue-100);
}

.topbar-toggle,
.topbar-reveal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 34px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.35rem 0.55rem;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.58);
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
    opacity: 0.72;
    transition: background 0.16s ease, color 0.16s ease, opacity 0.16s ease, box-shadow 0.16s ease;
}

.topbar-toggle-icon {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.topbar-toggle:hover,
.topbar-toggle:focus-visible,
.topbar-reveal:hover,
.topbar-reveal:focus-visible {
    color: var(--blue-900);
    background: #fff;
    opacity: 1;
    box-shadow: 0 0 0 3px rgba(34, 136, 232, 0.12);
    outline: none;
}

.topbar-reveal {
    position: fixed;
    top: 0.45rem;
    right: 0.45rem;
    z-index: 80;
    display: none;
    border-color: rgba(215, 227, 242, 0.8);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 8px 22px rgba(8, 33, 63, 0.12);
    backdrop-filter: blur(10px);
}

body.topbar-hidden .topbar {
    display: none;
}

body.topbar-hidden .topbar-reveal {
    display: inline-flex;
}

body.topbar-hidden[data-page="monitor"] .topbar-reveal {
    top: 0;
    right: auto;
    left: 50%;
    width: 56px;
    min-height: 25px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-top: 0;
    border-radius: 0 0 999px 999px;
    padding: 0;
    color: #fff;
    background: rgba(8, 33, 63, 0.72);
    box-shadow: 0 8px 24px rgba(8, 33, 63, 0.2);
    opacity: 0.42;
    transform: translateX(-50%);
    backdrop-filter: blur(12px);
}

body.topbar-hidden[data-page="monitor"] .topbar-reveal:hover,
body.topbar-hidden[data-page="monitor"] .topbar-reveal:focus-visible {
    width: 64px;
    min-height: 30px;
    color: #fff;
    background: rgba(18, 75, 140, 0.94);
    opacity: 1;
    box-shadow: 0 9px 28px rgba(8, 33, 63, 0.28);
}

body.topbar-hidden[data-page="monitor"] .topbar-reveal .topbar-button-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

body.topbar-hidden[data-page="monitor"] .topbar-reveal .topbar-toggle-icon {
    width: 16px;
    height: 16px;
}

.page-shell {
    width: min(1180px, calc(100% - 2rem));
    margin: 2rem auto 4rem;
}

body[data-page="history"] .page-shell {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    width: min(1760px, calc(100% - 1.5rem));
    min-height: 0;
    margin: 0.75rem auto;
    border: 3px solid var(--blue-800);
    padding: clamp(1rem, 1.4vw, 1.5rem);
    background: rgba(255, 255, 255, 0.42);
    overflow: hidden;
}

body[data-page="history"] {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
}

body[data-page="history"] .topbar {
    position: relative;
    flex: 0 0 auto;
}

body[data-page="history"] .panel {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

body[data-page="history"] .metric-row article {
    border: 2px solid var(--blue-800);
    min-height: 82px;
    padding: 0.75rem 1rem;
}

body[data-page="history"] .metric-row span {
    font-size: clamp(1.15rem, 2vw, 1.65rem);
    line-height: 1.08;
    overflow-wrap: anywhere;
}

body[data-page="history"] .metric-row strong {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.68rem;
}

body[data-page="history"] .toolbar .eyebrow {
    justify-self: start;
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    color: #fff;
    background: var(--blue-800);
    font-weight: 900;
    line-height: 1;
}

body[data-page="history"] .secondary-action {
    color: #fff;
    background: var(--blue-800);
}

body[data-page="history"] .secondary-action:hover {
    background: var(--blue-700);
    filter: none;
    box-shadow: 0 10px 22px rgba(23, 105, 194, 0.24);
}

body[data-page="history"] .table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-x: auto;
    overflow-y: scroll;
}

body[data-page="history"] th {
    position: sticky;
    top: 0;
    z-index: 1;
    color: #fff;
    background: var(--blue-800);
}

body[data-page="history"] table {
    min-width: 1280px;
}

.kiosk-shell {
    display: grid;
    align-items: center;
    width: min(1440px, calc(100% - 1.5rem));
    min-height: calc(100vh - 72px);
    margin: 0 auto;
    padding: 2rem 0 3.5rem;
}

.kiosk-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.45rem;
    align-items: stretch;
}

.side-panel,
.work-surface,
.panel,
.metric-row article {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 18px 45px rgba(8, 33, 63, 0.08);
}

.side-panel {
    position: sticky;
    top: 94px;
    align-self: start;
    overflow: hidden;
    padding: 0;
    background: linear-gradient(180deg, var(--blue-950), var(--blue-800));
    color: #fff;
}

.side-panel .lede,
.side-panel .eyebrow,
.side-panel strong {
    color: rgba(255, 255, 255, 0.78);
}

.kiosk-media-strip {
    position: relative;
    height: clamp(165px, 14.5vw, 215px);
    overflow: hidden;
    background: #bde7f0;
}

.kiosk-media-strip > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.kiosk-info-panel {
    padding: clamp(1.6rem, 2.75vw, 2.2rem);
}

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

h1 {
    margin-bottom: 0.6rem;
    color: var(--blue-950);
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1;
}

.side-panel h1,
.monitor-head h1 {
    color: #fff;
}

.side-panel h1 {
    font-size: clamp(2.35rem, 4.25vw, 3.8rem);
}

.lede {
    color: var(--muted);
    line-height: 1.6;
}

.eyebrow {
    margin-bottom: 0.35rem;
    color: var(--blue-700);
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.status-stack {
    display: grid;
    gap: 0.75rem;
    margin-top: 1.7rem;
}

.status-stack div {
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    padding: 1rem;
}

.status-stack span,
.status-stack strong {
    display: block;
}

.status-stack span {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 900;
}

.work-surface {
    display: flex;
    align-items: center;
    align-self: stretch;
    padding: 1.8rem;
}

.panel {
    padding: 1.35rem;
}

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

.full-width {
    grid-column: 1 / -1;
}

body[data-page="kiosk"] #ticketForm {
    width: 100%;
    align-content: center;
    row-gap: 1rem;
}

body[data-page="kiosk"] #dynamicFields {
    display: contents;
}

body[data-page="kiosk"] .name-row {
    display: grid;
    grid-template-columns: minmax(110px, 0.55fr) repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

body[data-page="kiosk"] input,
body[data-page="kiosk"] select {
    min-height: 48px;
    padding: 0.75rem 1rem;
}

body[data-page="kiosk"] .primary-action {
    min-height: 52px;
}

body[data-page="kiosk"] #ticketForm > .primary-action {
    grid-column: auto;
    align-self: end;
    margin-top: 0;
}

.primary-action,
.secondary-action {
    min-height: 46px;
    border: 0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-weight: 900;
}

.primary-action {
    color: #fff;
    background: linear-gradient(135deg, var(--blue-800), var(--blue-600));
    box-shadow: 0 12px 26px rgba(23, 105, 194, 0.25);
}

.secondary-action {
    color: var(--blue-950);
    background: var(--blue-100);
}

.primary-action:hover,
.secondary-action:hover {
    filter: brightness(0.96);
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
    margin-bottom: 1rem;
}

.toolbar h1 {
    margin-bottom: 0;
}

body[data-page="history"] .toolbar h1 {
    font-size: clamp(1.35rem, 2.2vw, 2.1rem);
    line-height: 1.05;
}

.compact-label {
    min-width: min(360px, 100%);
}

.metric-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.metric-row article {
    padding: 1rem;
}

.metric-row span {
    display: block;
    color: var(--blue-800);
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 950;
}

.metric-row strong {
    color: var(--muted);
    text-transform: uppercase;
    font-size: 0.76rem;
}

.panel-heading,
.filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.panel-heading .primary-action {
    width: auto;
}

.ticket-spotlight {
    border-left: 6px solid var(--blue-700);
    border-radius: 8px;
    padding: 1.2rem;
    background: var(--blue-050);
}

.ticket-number {
    color: var(--blue-950);
    font-family: Consolas, monospace;
    font-size: clamp(2.4rem, 7vw, 5rem);
    line-height: 1;
    font-weight: 950;
}

.call-name {
    color: var(--blue-950);
    font-size: clamp(1.6rem, 3.2vw, 2.7rem);
    line-height: 1;
    font-weight: 950;
    overflow-wrap: anywhere;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
    margin-top: 1rem;
}

.detail-grid div,
.queue-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.8rem;
    background: #fff;
}

.detail-grid span,
.queue-card span {
    display: block;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.queue-list {
    display: grid;
    gap: 0.65rem;
}

.queue-card strong {
    display: block;
    margin: 0.2rem 0;
    color: var(--blue-950);
}

.chip {
    border-radius: 8px;
    padding: 0.35rem 0.6rem;
    color: var(--blue-800);
    background: var(--blue-100);
    font-size: 0.78rem;
    font-weight: 800;
}

.empty-state {
    color: var(--muted);
    border: 1px dashed var(--line);
    border-radius: 8px;
    padding: 1.2rem;
    background: #fff;
}

body[data-page="counter"] {
    height: 100dvh;
    overflow: hidden;
    background: #f9fbfd;
}

html:has(body[data-page="counter"]) {
    height: 100dvh;
    overflow: hidden;
}

body[data-page="counter"] * {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

body[data-page="counter"] *::-webkit-scrollbar {
    display: none;
}

body[data-page="counter"] .page-shell {
    display: grid;
    align-items: start;
    width: min(1680px, calc(100% - 1rem));
    height: calc(100dvh - 72px);
    min-height: 0;
    margin: 0 auto;
    padding-top: 0.25rem;
    overflow: hidden;
}

body.topbar-hidden[data-page="counter"] .page-shell {
    height: 100dvh;
    padding-top: 0;
}

body.locked-counter[data-page="counter"] .page-shell {
    height: calc(100dvh - 72px);
    padding-top: 0.25rem;
}

.counter-dashboard {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 1.25rem;
    height: 100%;
    min-height: 0;
    border: 2px solid var(--blue-800);
    padding: clamp(0.9rem, 1.6vw, 1.35rem);
    background: var(--blue-050);
    overflow: hidden;
}

.counter-main,
.counter-side {
    display: contents;
}

.counter-title {
    grid-column: 1 / 3;
    grid-row: 1;
}

.counter-scope {
    grid-column: 3;
    grid-row: 1;
    align-self: start;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    min-width: 0;
}


body[data-page="counter"] .metric-row {
    grid-column: 1 / 4;
    grid-row: 2;
}

.active-service-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    grid-column: 1 / 3;
    grid-row: 3;
    min-height: 0;
    max-height: none;
    overflow: hidden;
}

.upcoming-panel {
    grid-column: 3;
    grid-row: 3;
}

.counter-title .eyebrow,
body[data-page="counter"] .panel-heading .eyebrow,
body[data-page="counter"] .compact-label .eyebrow {
    justify-self: start;
    margin-bottom: 0.55rem;
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    color: #fff;
    background: var(--blue-800);
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 900;
    line-height: 1;
}

.counter-title h1 {
    display: inline-block;
    margin: 0;
    padding-right: 0.35rem;
    color: var(--blue-950);
    font-size: clamp(2rem, 3vw, 2.8rem);
    line-height: 1.05;
}

body[data-page="counter"] .metric-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
    margin-bottom: 0.1rem;
}

body[data-page="counter"] .metric-row article,
.station-card,
body[data-page="counter"] .panel {
    border: 2px solid var(--blue-800);
    border-radius: 0;
    box-shadow: none;
    background: #fff;
}

body[data-page="counter"] .metric-row article,
.station-card {
    min-height: 62px;
    padding: 0.45rem 0.65rem;
    background: #fff;
}

.notification-card {
    position: relative;
}

.notification-card span {
    padding-right: 4.2rem;
}

.notification-card .notification-enable {
    position: absolute;
    right: 0.55rem;
    top: 0.55rem;
    min-height: 30px;
    padding: 0.28rem 0.55rem;
    font-size: 0.68rem;
}

body[data-page="counter"] .metric-row span,
.station-card span {
    display: block;
    color: var(--blue-800);
    font-size: clamp(1.6rem, 2.35vw, 2.35rem);
    font-weight: 950;
    line-height: 1.05;
}

body[data-page="counter"] .metric-row strong,
.station-card strong {
    color: var(--muted);
    text-transform: uppercase;
    font-size: 0.66rem;
}

body[data-page="counter"] .compact-label {
    min-width: 0;
    gap: 0.35rem;
}

body[data-page="counter"] select {
    min-height: 46px;
    border: 2px solid var(--blue-800);
    border-radius: 0;
    padding: 0.65rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 900;
}

.counter-scope-value {
    display: flex;
    align-items: center;
    min-height: 46px;
    border: 2px solid var(--blue-800);
    padding: 0.65rem 0.75rem;
    color: var(--blue-950);
    background: #fff;
    font-size: 0.82rem;
    font-weight: 900;
    line-height: 1.1;
    overflow-wrap: anywhere;
    text-transform: uppercase;
}

body[data-page="counter"] .panel {
    padding: 1rem;
}

.upcoming-panel {
    min-height: 0;
    max-height: none;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
}

body[data-page="counter"] .panel-heading {
    align-items: start;
    margin-bottom: 0.55rem;
}

body[data-page="counter"] .primary-action,
body[data-page="counter"] .secondary-action {
    min-height: 46px;
    border-radius: 4px;
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
    font-weight: 900;
}

body[data-page="counter"] .primary-action {
    color: #fff;
    background: var(--blue-800);
    box-shadow: none;
}

body[data-page="counter"] .secondary-action {
    color: #fff;
    background: var(--blue-800);
}

body[data-page="counter"] .secondary-action:hover {
    background: var(--blue-700);
    filter: none;
    box-shadow: 0 10px 22px rgba(23, 105, 194, 0.24);
}

body[data-page="counter"] .chip {
    border-radius: 8px;
    padding: 0.3rem 0.5rem;
    color: #fff;
    background: var(--blue-800);
    font-size: 0.7rem;
}

body[data-page="counter"] .empty-state {
    border: 1px dashed var(--line);
    border-radius: 6px;
    padding: 1.2rem;
    font-size: 0.96rem;
}

body[data-page="counter"] .queue-list {
    gap: 0.65rem;
    min-height: 0;
    overflow-y: auto;
    padding-right: 0.25rem;
    scrollbar-gutter: stable;
}

body[data-page="counter"] .queue-card {
    border-radius: 4px;
    padding: 0.85rem;
}

body[data-page="counter"] .ticket-spotlight {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.9rem;
    align-items: start;
    border-left-width: 5px;
    border-radius: 0;
    padding: 0.8rem 0.95rem;
}

body[data-page="counter"] .ticket-spotlight .eyebrow {
    margin-bottom: 0.35rem;
    font-size: 0.72rem;
}

body[data-page="counter"] .ticket-spotlight .call-name {
    font-size: clamp(1.45rem, 2.6vw, 2.25rem);
}

body[data-page="counter"] .ticket-spotlight h2 {
    margin: 0.15rem 0 0.35rem;
    font-size: 1rem;
    line-height: 1.15;
}

body[data-page="counter"] .ticket-spotlight p {
    margin-bottom: 0.45rem;
    font-size: 0.86rem;
}

body[data-page="counter"] .ticket-spotlight .detail-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
    margin-top: 0.55rem;
}

body[data-page="counter"] .ticket-spotlight .detail-grid div {
    padding: 0.55rem 0.65rem;
}

body[data-page="counter"] .ticket-spotlight .detail-grid span {
    font-size: 0.64rem;
}

body[data-page="counter"] .ticket-spotlight .detail-grid strong {
    font-size: 0.82rem;
    line-height: 1.15;
}

body[data-page="counter"] .active-ticket-list {
    display: grid;
    gap: 0.75rem;
    min-height: 0;
    overflow-y: auto;
    padding-right: 0.25rem;
    scrollbar-gutter: stable;
}

body[data-page="counter"] .complete-ticket-btn {
    min-height: 38px;
    padding: 0.55rem 0.75rem;
    font-size: 0.8rem;
    white-space: nowrap;
}

dialog {
    width: min(520px, calc(100% - 2rem));
    border: 0;
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 28px 80px rgba(8, 33, 63, 0.32);
}

dialog::backdrop {
    background: rgba(8, 33, 63, 0.58);
    backdrop-filter: blur(5px);
}

dialog form {
    padding: 1.6rem;
    text-align: center;
}

.ticket-dialog h2 {
    margin: 0.4rem 0;
    color: var(--blue-900);
    font-family: Consolas, monospace;
    font-size: 4rem;
}

.ticket-meta {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.ticket-meta span {
    border-radius: 8px;
    padding: 0.45rem 0.65rem;
    background: var(--blue-100);
    color: var(--blue-900);
    font-weight: 800;
}

.toast {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1000;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    width: min(420px, calc(100vw - 2rem));
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 12px;
    padding: 0.85rem 0.85rem 0.85rem 1rem;
    color: #fff;
    background: var(--blue-950);
    box-shadow: 0 14px 40px rgba(8, 33, 63, 0.25);
    opacity: 0;
    pointer-events: none;
    transform: translateY(1.25rem);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.toast-success { background:#12694c; }.toast-warning { color:#442d00; background:#fff2c9; border-color:#efd287; }.toast-error { background:#9f1f33; }
.toast-message { flex:1; padding:.12rem 0; font-size:.9rem; font-weight:700; line-height:1.4; }
.toast-close { display:grid; place-items:center; flex:0 0 32px; width:32px; min-height:32px; margin:-.15rem -.2rem 0 0; border:0; border-radius:7px; color:currentColor; background:rgba(255,255,255,.13); cursor:pointer; }
.toast-close:hover,.toast-close:focus-visible { background:rgba(255,255,255,.25); }.toast-close svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; }

.monitor-shell {
    flex: 0 0 calc(100dvh - 64px);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) minmax(130px, 20vh);
    gap: 0.65rem;
    width: calc(100% - 0.75rem);
    max-width: 1920px;
    min-height: 0;
    height: calc(100dvh - 64px);
    margin: 0 auto;
    padding-bottom: clamp(0.3rem, 0.55vh, 0.5rem);
    overflow: hidden;
}

body[data-page="monitor"] {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    background:
        radial-gradient(circle at top left, rgba(34, 136, 232, 0.16), transparent 34rem),
        linear-gradient(180deg, #f7fbff 0%, #eaf3fc 100%);
}

html:has(body[data-page="monitor"]) {
    height: 100dvh;
    overflow: hidden;
}

body[data-page="monitor"] * {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

body[data-page="monitor"] *::-webkit-scrollbar {
    display: none;
}

body.topbar-hidden[data-page="monitor"] .monitor-shell {
    flex-basis: 100dvh;
    height: 100dvh;
    padding-top: clamp(0.45rem, 0.8vh, 0.75rem);
    padding-bottom: clamp(0.45rem, 0.8vh, 0.75rem);
}

body[data-page="monitor"] .topbar {
    position: relative;
    flex: 0 0 auto;
    min-height: 64px;
    background: rgba(255, 255, 255, 0.94);
}

.monitor-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0.4rem 0.85rem;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(8, 33, 63, 0.98), rgba(18, 75, 140, 0.96)),
        var(--blue-950);
    box-shadow: 0 18px 44px rgba(8, 33, 63, 0.16);
}

.monitor-head h1 {
    margin: 0;
    letter-spacing: 0;
    font-size: clamp(1.15rem, 1.7vw, 1.7rem);
    line-height: 1.05;
}

.monitor-audio-controls {
    position: relative;
    flex: 0 0 auto;
}

.monitor-audio-controls summary {
    min-height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.48);
    border-radius: 8px;
    padding: 0.5rem 0.7rem;
    color: #e9f5ff;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 900;
    list-style: none;
}

.monitor-audio-controls summary::-webkit-details-marker {
    display: none;
}

.monitor-audio-controls summary::after {
    content: "\2699";
    display: inline-block;
    margin-left: 0.45rem;
    transition: transform 0.16s ease;
}

.monitor-audio-controls[open] summary {
    border-color: rgba(255, 255, 255, 0.88);
    background: rgba(255, 255, 255, 0.12);
}

.monitor-audio-controls[open] summary::after {
    transform: rotate(45deg);
}

.monitor-audio-controls summary:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
}

.monitor-audio-control-panel {
    position: absolute;
    z-index: 20;
    top: calc(100% + 0.5rem);
    right: 0;
    display: grid;
    gap: 0.9rem;
    width: min(360px, 88vw);
    border: 1px solid rgba(184, 220, 255, 0.26);
    border-radius: 14px;
    padding: 1rem;
    background: linear-gradient(145deg, #0d315d, #08213f);
    box-shadow: 0 20px 50px rgba(8, 33, 63, 0.42);
    transform-origin: top right;
    animation: monitor-audio-popover-in 0.16s ease-out;
}

@keyframes monitor-audio-popover-in {
    from {
        opacity: 0;
        transform: translateY(-0.3rem) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .monitor-audio-controls summary::after,
    .monitor-audio-control-panel {
        animation: none;
        transition: none;
    }
}

.monitor-audio-panel-head,
.monitor-audio-status-row,
.monitor-audio-actions,
.monitor-volume-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
}

.monitor-audio-kicker {
    margin: 0 0 0.16rem;
    color: #9ed1ff;
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.monitor-audio-panel-head h2 {
    margin: 0;
    color: #fff;
    font-size: 1rem;
}

.monitor-audio-close {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 50%;
    color: #e9f5ff;
    background: rgba(255, 255, 255, 0.08);
    font: inherit;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.monitor-audio-status-row {
    justify-content: flex-start;
    border-radius: 9px;
    padding: 0.55rem 0.65rem;
    background: rgba(43, 140, 232, 0.14);
}

.monitor-audio-status-dot {
    width: 9px;
    height: 9px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.monitor-audio-status-dot.is-active {
    background: #34d399;
    box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.14);
}

.monitor-audio-volume-list {
    display: grid;
    gap: 0.75rem;
}

.monitor-volume-control {
    display: grid;
    gap: 0.35rem;
    color: #e9f5ff;
    font-size: 0.78rem;
    font-weight: 800;
}

.monitor-volume-label output {
    color: #9ed1ff;
    font-variant-numeric: tabular-nums;
}

.monitor-audio-control-panel input[type="range"] {
    width: 100%;
    min-height: 34px;
    accent-color: var(--blue-600);
}

.monitor-sound-enable {
    min-height: 40px;
    border: 1px solid transparent;
    border-radius: 9px;
    padding: 0.5rem 0.75rem;
    color: #fff;
    background: var(--blue-700);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 900;
    cursor: pointer;
}

.monitor-audio-test {
    min-height: 40px;
    border: 1px solid rgba(184, 220, 255, 0.45);
    border-radius: 9px;
    padding: 0.5rem 0.75rem;
    color: #e9f5ff;
    background: rgba(255, 255, 255, 0.08);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 850;
    cursor: pointer;
}

.monitor-sound-enable:focus-visible,
.monitor-audio-test:focus-visible,
.monitor-audio-close:focus-visible,
.monitor-audio-control-panel input:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
}

.monitor-sound-enable:disabled {
    cursor: default;
    background: var(--green);
}

.monitor-audio-test:disabled {
    cursor: not-allowed;
    opacity: 0.52;
}

.monitor-sound-status {
    margin: 0;
    color: #dcebff;
    font-size: 0.72rem;
    font-weight: 700;
}

.monitor-head .eyebrow {
    color: #b8dcff;
    font-size: 0.6rem;
    line-height: 1;
}

#clockText {
    flex: 0 0 auto;
    min-width: 9ch;
    border-radius: 8px;
    padding: 0.3rem 0.55rem;
    color: #e9f5ff;
    background: rgba(255, 255, 255, 0.1);
    font-family: Consolas, monospace;
    font-size: clamp(0.95rem, 1.65vw, 1.35rem);
    font-weight: 950;
    text-align: center;
}

.monitor-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 0;
}

.monitor-grid > *,
.monitor-separate,
.monitor-separate > *,
.monitor-serving-panel,
.monitor-standby-panel {
    min-width: 0;
    max-width: 100%;
}
.monitor-video-stack { display:grid; grid-template-rows:minmax(0,1fr) auto; gap:.65rem; min-height:0; }
.monitor-announcements { padding:.75rem 1rem; background:linear-gradient(135deg,#f7fbff,#e5f2ff) !important; transition:opacity .2s ease; }
.monitor-announcements .eyebrow { margin:0 0 .2rem; color:var(--blue-700); }
.monitor-announcements h2 { margin:0; color:var(--blue-950); font-size:clamp(1rem,1.4vw,1.35rem); }
.monitor-announcements p:last-child { margin:.25rem 0 0; color:#334155; font-size:clamp(.85rem,1vw,1rem); }
body.monitor-announcing .monitor-announcements { opacity:.28; }
.monitor-announcements { padding:.55rem 0; overflow:hidden; background:linear-gradient(135deg,#08213f,#164f8d) !important; color:#fff; }.monitor-announcements .eyebrow { margin:0 .9rem .3rem; color:#9ed1ff; }.announcement-ticker-viewport { overflow:hidden; white-space:nowrap; }.announcement-ticker-track { display:flex; width:max-content; color:#fff; font-size:clamp(.92rem,1.15vw,1.18rem); font-weight:800; letter-spacing:.02em; text-transform:uppercase; will-change:transform; animation:announcement-ticker var(--ticker-duration,35s) linear infinite; }.announcement-ticker-segment { flex:0 0 auto; padding-left:.9rem; padding-right:3.5rem; }@keyframes announcement-ticker { from { transform:translate3d(0,0,0); } to { transform:translate3d(-50%,0,0); } }.monitor-announcing .announcement-ticker-track { animation-play-state:paused; }@media (prefers-reduced-motion:reduce) { .announcement-ticker-track { display:block; width:auto; animation:none; }.announcement-ticker-segment { display:none; padding:.1rem .9rem; white-space:normal; }.announcement-ticker-segment:first-child { display:block; } }
.monitor-video-stack { display:block; height:100%; }.monitor-video-stack .monitor-video-panel { display:flex; height:100%; flex-direction:column; }.monitor-video-container { position:relative; display:flex; min-height:0; flex:1 1 auto; overflow:hidden; }.monitor-video-container .monitor-video { min-height:0; }.monitor-video-announcements { position:relative; z-index:1; flex:0 0 auto; overflow:hidden; border:0 !important; border-radius:0 !important; padding:.55rem 0; pointer-events:none; background:linear-gradient(90deg,#08213f,#164f8d) !important; box-shadow:none; }.monitor-video-announcements .eyebrow { margin:0 .9rem .3rem; color:#9ed1ff; font-size:.68rem; text-shadow:0 1px 2px rgba(0,0,0,.25); }.monitor-video-announcements .announcement-ticker-track { font-size:clamp(.9rem,1.15vw,1.15rem); text-shadow:0 1px 2px rgba(0,0,0,.35); }.monitor-video-announcements .announcement-ticker-segment { padding-left:.9rem; padding-right:3.5rem; }@media (max-width:1040px) { .monitor-video-stack,.monitor-video-stack .monitor-video-panel { height:auto; }.monitor-video-announcements { padding:.5rem 0; } }
.announcement-manager { display:grid; grid-template-columns:minmax(280px,.8fr) minmax(0,1.2fr); gap:1rem; align-items:start; }
.announcement-form,.announcement-edit { display:grid; gap:.75rem; }
.announcement-manager label { display:grid; gap:.35rem; font-weight:800; color:var(--blue-950); }
.announcement-manager input,.announcement-manager select,.announcement-manager textarea { width:100%; }
.announcement-edit { margin-top:1rem; padding-top:1rem; border-top:1px solid var(--line); }
.announcement-library-heading,.announcement-card,.announcement-card-actions { display:flex; align-items:center; justify-content:space-between; gap:1rem; }
.announcement-library-heading { border-bottom:1px solid var(--line); padding-bottom:.85rem; }.announcement-library-heading h2,.announcement-card h3 { margin:0; }.announcement-library-heading span { border-radius:999px; padding:.25rem .55rem; color:var(--blue-800); background:#e6f1ff; font-size:.78rem; font-weight:800; }.announcement-list { display:grid; gap:.75rem; margin-top:1rem; }.announcement-card { align-items:start; border:1px solid #d9e6f4; border-radius:12px; padding:.9rem 1rem; background:#fbfdff; }.announcement-card .eyebrow { margin:0 0 .3rem; }.announcement-card p:last-child { margin:.35rem 0 0; color:#425876; line-height:1.45; }.announcement-card-actions { flex:0 0 auto; }.monitor-announcements h2 { text-transform:uppercase; }
.announcement-error-dialog { display:grid; gap:1rem; padding:1.5rem; }
.announcement-error-dialog p { margin:0; color:#425876; line-height:1.55; }
.form-error { margin:0; border-left:4px solid #b63747; padding:.55rem .7rem; color:#8e2030; background:#fff0f1; font-weight:750; }
.announcement-permanent { grid-template-columns:auto 1fr; align-items:center; gap:.55rem; text-transform:none !important; }.announcement-permanent input { width:18px !important; min-height:18px; accent-color:var(--blue-700); }
.announcement-duration { display:grid; gap:.6rem; border:1px solid #d9e6f4; border-radius:10px; padding:.75rem; background:#f8fbff; }.announcement-duration h3 { margin:0; color:var(--blue-950); font-size:.82rem; text-transform:uppercase; }.announcement-permanent-status { margin:0; color:#42617f; font-size:.82rem; line-height:1.4; }
.account-reset-dialog form[data-announcement-form] { text-align:left; }.account-reset-dialog form[data-announcement-form] > label { align-items:start; text-align:left; }.account-reset-dialog form[data-announcement-form] .announcement-duration { text-align:left; }.account-reset-dialog form[data-announcement-form] .announcement-duration h3 { text-align:left; }.account-reset-dialog form[data-announcement-form] .announcement-permanent { display:grid; grid-template-columns:22px 1fr; width:100%; min-height:44px; padding:.6rem .7rem; border-radius:8px; background:#fff; text-align:left; }.account-reset-dialog form[data-announcement-form] .account-reset-footer { justify-content:space-between; }.account-reset-dialog form[data-announcement-form] .account-reset-footer .primary-action { margin-left:auto; }
.announcement-manager { gap:1.5rem; }.announcement-compose { position:sticky; top:1rem; padding:1.35rem; }.announcement-library { padding:1.35rem; }.announcement-card { border-color:#d7e5f5; box-shadow:0 8px 20px rgba(15,58,104,.05); }.announcement-card:hover { border-color:#9cc5ef; box-shadow:0 12px 28px rgba(15,58,104,.1); }.announcement-library-heading { align-items:center; }.announcement-library-heading h2 { font-size:1.45rem; }
@media (max-width:860px) { .announcement-manager { grid-template-columns:1fr; } }

.monitor-grid article,
.monitor-separate article {
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 45px rgba(8, 33, 63, 0.08);
}

.monitor-video-panel {
    min-height: 0;
    overflow: hidden;
    padding: 0;
    background: #000;
}

.monitor-video-container {
    height: 100%;
    min-height: inherit;
}

.monitor-video {
    display: block;
    width: 100%;
    height: 100%;
    min-height: inherit;
    object-fit: contain;
    background: #000;
}

.monitor-serving-panel,
.monitor-standby-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 1rem;
    overflow: hidden;
}

.monitor-panel-title {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.9rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--line);
}

.monitor-panel-title h2 {
    margin: 0;
    color: var(--blue-950);
    font-size: clamp(1.15rem, 1.6vw, 1.55rem);
    line-height: 1.15;
}

.monitor-panel-title .eyebrow {
    margin-bottom: 0.25rem;
}

.monitor-panel-title > .eyebrow {
    justify-self: start;
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    color: #fff;
    background: var(--blue-800);
    font-weight: 900;
    line-height: 1;
}

.monitor-serving-panel {
    padding: 0.65rem 0.75rem;
}

.monitor-serving-panel .monitor-panel-title {
    gap: 0.65rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.45rem;
}

.monitor-serving-panel .monitor-panel-title h2 {
    font-size: clamp(0.95rem, 1.2vw, 1.2rem);
}

.monitor-serving-panel .monitor-panel-title > .eyebrow {
    padding: 0.55rem 0.85rem;
    font-size: 0.82rem;
}

.monitor-separate {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
}

.monitor-standby-panel {
    height: 100%;
    min-height: 0;
    max-height: none;
    padding: 0.55rem 0.75rem;
    overflow: hidden;
}

.monitor-standby-panel .monitor-panel-title {
    margin-bottom: 0.45rem;
    padding-bottom: 0.4rem;
}

.monitor-standby-panel .monitor-panel-title h2 {
    font-size: clamp(1rem, 1.3vw, 1.3rem);
}

.monitor-standby-panel .monitor-panel-title > .eyebrow {
    padding: 0.48rem 0.75rem;
    font-size: 0.78rem;
}

.serving-grid {
    flex: 1 1 auto;
    display: block;
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
    padding-right: 0.25rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.serving-loop-set {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(0, 1fr);
    gap: 0.45rem;
    align-content: stretch;
    min-height: 100%;
}

.serving-loop-set + .serving-loop-set {
    margin-top: 0.45rem;
}

@media (max-width: 1040px) {
    .serving-loop-set {
        grid-template-columns: 1fr;
    }
}

.serving-grid::-webkit-scrollbar {
    display: none;
}

.serving-grid.is-dense .serving-loop-set {
    gap: 0.45rem;
}

.serving-grid.is-extra-dense .serving-loop-set {
    grid-auto-rows: minmax(120px, 1fr);
}

.standby-grid {
    flex: 1 1 auto;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc(14.2857% - 0.6429rem);
    grid-template-columns: none;
    gap: 0.75rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.standby-grid::-webkit-scrollbar {
    display: none;
}

.serving-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 0;
    max-width: 100%;
    overflow: hidden;
    border: 1px solid rgba(34, 136, 232, 0.32);
    border-left: 5px solid var(--green);
    border-radius: 8px;
    padding: 1.15rem 1.3rem;
    background: linear-gradient(180deg, #ffffff, #f7fbff);
    box-shadow: 0 12px 26px rgba(8, 33, 63, 0.08);
}

.serving-grid.is-dense .serving-card {
    border-left-width: 4px;
    padding: 1rem 1.15rem;
}

.serving-grid.is-extra-dense .serving-card {
    padding: 0.75rem 0.9rem;
}

.serving-card.is-called {
    border-color: rgba(18, 157, 94, 0.55);
    background: linear-gradient(180deg, #f3fff8, #ffffff);
}

.serving-card-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.48rem;
    color: var(--blue-950);
    text-align: center;
    text-transform: uppercase;
    font-size: 1.08rem;
    line-height: 1.05;
}

.serving-card-head strong,
.serving-card .call-name {
    max-width: 100%;
    overflow-wrap: anywhere;
}

.serving-grid.is-dense .serving-card-head {
    gap: 0.42rem;
    font-size: 0.98rem;
}

.serving-grid.is-extra-dense .serving-card-head {
    gap: 0.4rem;
    font-size: clamp(0.86rem, 1vw, 1rem);
}

.serving-status {
    flex: 0 0 auto;
    width: 0.92rem;
    height: 0.92rem;
    border-radius: 999px;
    background: var(--green);
    box-shadow: 0 0 0 3px rgba(18, 157, 94, 0.14);
}

.serving-grid.is-dense .serving-status {
    width: 0.82rem;
    height: 0.82rem;
    box-shadow: 0 0 0 3px rgba(18, 157, 94, 0.12);
}

.serving-card .ticket-number {
    display: inline-flex;
    justify-content: center;
    width: fit-content;
    max-width: 92%;
    margin-top: 0.5rem;
    border-radius: 4px;
    padding: 0.4rem 0.64rem;
    color: #fff;
    background: var(--blue-800);
    font-size: clamp(0.72rem, 0.9vw, 0.98rem);
    font-weight: 950;
    line-height: 1.12;
    overflow-wrap: anywhere;
    text-align: center;
}

.serving-grid.is-dense .serving-card .ticket-number {
    margin-top: 0.44rem;
    padding: 0.35rem 0.56rem;
    font-size: clamp(0.68rem, 0.8vw, 0.86rem);
}

.serving-grid.is-extra-dense .serving-card .ticket-number {
    margin-top: 0.35rem;
    padding: 0.32rem 0.55rem;
    font-size: clamp(0.62rem, 0.72vw, 0.78rem);
}

.serving-card .call-name {
    margin: 0.65rem 0 0;
    color: var(--blue-950);
    text-align: center;
    font-size: clamp(1.95rem, 3.1vw, 2.65rem);
    font-weight: 950;
    line-height: 1;
}

.serving-grid.is-dense .serving-card .call-name {
    margin-top: 0.55rem;
    font-size: clamp(1.72rem, 2.7vw, 2.25rem);
}

.serving-grid.is-extra-dense .serving-card .call-name {
    margin-top: 0.45rem;
    font-size: clamp(1.55rem, 2.1vw, 2rem);
}

.serving-card h3 {
    margin-bottom: 0;
    color: var(--ink);
    font-size: clamp(0.9rem, 1.35vw, 1.1rem);
    line-height: 1.15;
}

.serving-card p:last-child {
    margin-bottom: 0;
    color: var(--green);
    font-size: 0.9rem;
    font-weight: 900;
}

.standby-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 0;
    height: 100%;
    border: 1px solid #7db9e8;
    border-left: 4px solid #62aee8;
    border-radius: 8px;
    padding: 0.5rem;
    text-align: center;
    background: linear-gradient(180deg, #f2f9ff, #e1f1ff);
}

.standby-card .ticket-code {
    color: var(--blue-900);
    font-size: clamp(1.4rem, 2vw, 1.85rem);
    font-weight: 950;
    line-height: 1;
}

.standby-card .call-name-small {
    font-family: inherit;
    font-size: clamp(1.15rem, 1.55vw, 1.5rem);
    line-height: 1.05;
    overflow-wrap: anywhere;
}

.standby-card-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    color: var(--ink);
    font-size: clamp(0.7rem, 0.9vw, 0.84rem);
    line-height: 1.2;
}

.standby-status {
    flex: 0 0 auto;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 999px;
    background: #62aee8;
    box-shadow: 0 0 0 3px rgba(98, 174, 232, 0.18);
}

.standby-card .chip {
    align-self: center;
    max-width: 100%;
    overflow-wrap: anywhere;
    color: var(--blue-900);
    background: #cfe8fb;
    padding: 0.32rem 0.55rem;
    font-size: 0.68rem;
}

.monitor-overlay {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    place-items: center;
    padding: clamp(1rem, 4vw, 3rem);
    opacity: 1;
    visibility: visible;
    background:
        radial-gradient(circle at 50% 35%, rgba(33, 98, 168, 0.45), transparent 42%),
        rgba(4, 23, 44, 0.92);
    backdrop-filter: blur(10px);
    transition: opacity 180ms ease, visibility 180ms ease;
}

.monitor-overlay.hidden {
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
}

.monitor-call-card {
    width: min(860px, 100%);
    border: 2px solid rgba(255, 255, 255, 0.75);
    border-radius: 18px;
    padding: clamp(2rem, 5vw, 4.5rem);
    text-align: center;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(235, 245, 255, 0.98));
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
    transform: translateY(0) scale(1);
    transition: transform 220ms ease;
}

.monitor-overlay.hidden .monitor-call-card {
    transform: translateY(18px) scale(0.97);
}

.monitor-call-topline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: clamp(1.2rem, 3vw, 2rem);
}

.monitor-call-sequence,
.monitor-call-queue {
    border-radius: 999px;
    padding: 0.5rem 0.9rem;
    color: #fff;
    background: var(--blue-900);
    font-size: clamp(0.8rem, 1.5vw, 1rem);
    font-weight: 950;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.monitor-call-queue {
    color: var(--blue-950);
    background: #d9ebfa;
    letter-spacing: 0;
    text-transform: none;
}

.monitor-call-department {
    margin: 0;
    color: var(--blue-800);
    font-size: clamp(1rem, 2.2vw, 1.5rem);
    font-weight: 950;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.monitor-call-card h2 {
    margin: 0.55rem 0 clamp(1.5rem, 3vw, 2.3rem);
    color: var(--blue-950);
    font-size: clamp(3rem, 9vw, 6.5rem);
    line-height: 0.95;
    overflow-wrap: anywhere;
}

.monitor-call-instruction {
    margin: 0;
    color: #50677e;
    font-size: clamp(1rem, 2vw, 1.35rem);
    font-weight: 800;
    text-transform: uppercase;
}

.monitor-call-card h3 {
    margin: 0.35rem 0 0.9rem;
    color: var(--ink);
    font-size: clamp(1.7rem, 5vw, 3.6rem);
    line-height: 1;
    overflow-wrap: anywhere;
}

.monitor-call-ticket {
    display: inline-block;
    margin: 0;
    border-radius: 7px;
    padding: 0.55rem 0.85rem;
    color: #fff;
    background: var(--green);
    font-size: clamp(0.95rem, 2vw, 1.25rem);
    font-weight: 950;
}

@media (max-width: 1320px) {
    .monitor-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .standby-grid {
        grid-auto-columns: calc(25% - 0.5625rem);
        grid-template-columns: none;
    }
}

@media (max-width: 1040px) {
    .monitor-grid {
        grid-template-columns: 1fr;
    }

    .monitor-video-panel,
    .monitor-serving-panel {
        min-height: 0;
    }

    .monitor-video-container,
    .monitor-video {
        min-height: 220px;
    }

    .serving-grid {
        grid-template-columns: 1fr;
    }

    .standby-grid {
        grid-auto-columns: calc(33.3333% - 0.5rem);
        grid-template-columns: none;
    }
}

.filters {
    flex-wrap: wrap;
}

.filters input {
    flex: 1 1 280px;
}

.filters select {
    flex: 0 1 280px;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 980px;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 0.75rem;
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--blue-950);
    background: var(--blue-050);
    font-size: 0.76rem;
    text-transform: uppercase;
}

td {
    color: #334155;
}

@media (max-width: 860px) {
    body[data-page="history"] {
        display: block;
        height: auto;
        min-height: 100vh;
        overflow: auto;
    }

    body[data-page="history"] .page-shell {
        display: block;
        min-height: 0;
        overflow: visible;
    }

    body[data-page="history"] .table-wrap {
        max-height: 60vh;
    }

    .topbar,
    .toolbar,
    .monitor-head {
        align-items: stretch;
        flex-direction: column;
    }

    .topbar-tools {
        align-items: stretch;
        flex-direction: column;
    }

    .topbar-utilities {
        width: 100%;
        justify-content: flex-end;
    }

    .topnav + .topbar-utilities {
        margin-left: 0;
        border-left: 0;
        border-top: 1px solid #d8e5f3;
        padding: 0.75rem 0 0;
    }

    .monitor-audio-controls,
    .monitor-audio-control-panel {
        width: 100%;
    }

    .monitor-audio-control-panel {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-top: 0.5rem;
    }

    .monitor-sound-enable,
    .monitor-sound-status {
        grid-column: 1 / -1;
    }

    .topbar-toggle {
        width: 100%;
    }

    .kiosk-layout,
    .counter-dashboard,
    .monitor-grid,
    .metric-row,
    body[data-page="kiosk"] .name-row,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .side-panel {
        position: static;
    }

    .panel-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .monitor-shell {
        width: min(100% - 1rem, 1880px);
        height: auto;
        margin-top: 0.5rem;
        overflow: visible;
    }

    #clockText {
        width: 100%;
    }

    .monitor-video-container,
    .monitor-video {
        min-height: 280px;
    }

    .serving-grid {
        grid-template-columns: 1fr;
    }

    .standby-grid {
        grid-auto-columns: min(72vw, 240px);
        grid-template-columns: none;
    }

    body[data-page="counter"] .ticket-spotlight {
        grid-template-columns: 1fr;
    }

    body[data-page="counter"] .ticket-spotlight .detail-grid {
        grid-template-columns: 1fr;
    }

    body[data-page="counter"] .complete-ticket-btn {
        justify-self: stretch;
    }

    .standby-card {
        min-height: 0;
    }

    .counter-title,
    .counter-scope,
    body[data-page="counter"] .metric-row,
    .station-card,
    .active-service-panel,
    .upcoming-panel {
        grid-column: auto;
        grid-row: auto;
    }

    .counter-scope {
        grid-template-columns: 1fr;
    }
}

/* Security and administration refinement */
body[data-page="auth"], body[data-page="admin"] { background: linear-gradient(135deg,#f3f8fe 0%,#fff 52%,#e9f3ff 100%); }
.auth-layout { width:min(1040px,calc(100% - 2rem)); min-height:calc(100vh - 72px); margin:auto; display:grid; grid-template-columns:1.05fr .85fr; gap:clamp(2rem,7vw,6rem); align-items:center; padding:clamp(2rem,7vh,5rem) 0; }
.auth-layout-narrow { grid-template-columns:1fr 1fr; }
.auth-intro h1 { max-width:10ch; font-size:clamp(3rem,6vw,5.25rem); letter-spacing:-.055em; }
.auth-intro > p:not(.eyebrow) { max-width:34rem; color:#52637a; font-size:1.08rem; line-height:1.7; }
.auth-trust { display:flex; flex-wrap:wrap; gap:.55rem; margin-top:2rem; }
.auth-trust span,.role-badge,.status-badge { border-radius:999px; padding:.38rem .68rem; font-size:.72rem; font-weight:800; }
.auth-trust span { color:var(--blue-800); background:#dcecff; }
.auth-card { padding:clamp(1.5rem,4vw,2.6rem); border:1px solid #d8e4f4; border-radius:16px; background:rgba(255,255,255,.93); box-shadow:0 24px 58px rgba(21,62,111,.12); }
.auth-card h2 { margin:.25rem 0 .5rem; color:var(--blue-950); font-size:clamp(1.75rem,3vw,2.35rem); letter-spacing:-.035em; }
.auth-card > p:not(.eyebrow) { color:var(--muted); line-height:1.55; }
.auth-form { display:grid; gap:1rem; margin-top:1.6rem; }
.auth-form label > span { color:var(--muted); font-size:.7rem; font-weight:600; text-transform:none; }
.auth-form .primary-action { margin-top:.35rem; min-height:52px; }
.form-error { margin:0; border-radius:8px; padding:.75rem 1rem; color:#9b1c1c; background:#fff0f0; font-weight:700; }
.auth-steps { display:grid; gap:.8rem; max-width:28rem; margin:2rem 0 0; padding:0; list-style:none; counter-reset:steps; }
.auth-steps li { display:flex; gap:.75rem; align-items:center; color:#51647c; line-height:1.4; }
.auth-steps li::before { counter-increment:steps; content:counter(steps); display:grid; place-items:center; flex:0 0 1.65rem; height:1.65rem; border-radius:50%; color:white; background:var(--blue-800); font-size:.75rem; font-weight:900; }
.secret-box { display:grid; gap:.55rem; margin:1.4rem 0; border:1px solid #cbdcf0; border-radius:10px; padding:1rem; background:#f5f9ff; }
.secret-box span { color:var(--muted); font-size:.72rem; font-weight:800; text-transform:uppercase; }
.secret-box code { color:var(--blue-950); font-size:.94rem; font-weight:800; letter-spacing:.07em; overflow-wrap:anywhere; }
.recovery-code-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.6rem; margin:1.5rem 0; padding:0; list-style:none; }
.recovery-code-list li { border:1px solid #d9e5f3; border-radius:8px; padding:.65rem .8rem; background:#f8fbff; text-align:center; }
.recovery-code-list code { color:var(--blue-950); font-weight:900; letter-spacing:.08em; }

.admin-shell { width:min(1240px,calc(100% - 2rem)); margin:clamp(2rem,5vw,4rem) auto; }
.admin-header { display:flex; justify-content:space-between; align-items:end; gap:2rem; margin-bottom:2rem; }
.admin-header h1 { max-width:18ch; margin-bottom:.6rem; font-size:clamp(2.4rem,5vw,4.25rem); letter-spacing:-.055em; }
.admin-header p:not(.eyebrow) { max-width:40rem; color:var(--muted); line-height:1.6; }
.admin-summary { display:grid; gap:.15rem; flex:0 0 auto; min-width:148px; border-left:3px solid var(--blue-600); padding:.3rem 0 .3rem 1rem; }
.admin-summary strong { color:var(--blue-950); font-size:2.2rem; line-height:1; }.admin-summary span { color:var(--muted); font-size:.76rem; font-weight:800; text-transform:uppercase; }
.admin-workspace { display:grid; grid-template-columns:minmax(0,1fr) 280px; gap:1.25rem; align-items:start; }
.admin-create-panel { padding:1.5rem; }.admin-create-panel h2,.admin-table-panel h2 { margin:.15rem 0 0; color:var(--blue-950); font-size:1.4rem; }
.admin-hint { color:var(--muted); font-size:.78rem; }.admin-basic-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; }
.admin-create-form { display:grid; gap:1.25rem; margin-top:1.4rem; }.admin-create-form > .primary-action { justify-self:start; min-width:190px; }
.scope-picker { min-width:0; margin:0; border:1px solid var(--line); border-radius:10px; padding:1rem; }.scope-picker legend { padding:0 .4rem; color:var(--blue-950); font-weight:850; }.scope-picker legend span { color:var(--muted); font-size:.74rem; font-weight:600; }
.scope-search { margin:.15rem 0 .8rem; text-transform:none; }.scope-groups { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.75rem; max-height:300px; overflow:auto; padding-right:.25rem; }
.scope-group { border:1px solid #e0eaf5; border-radius:8px; padding:.65rem; background:#fbfdff; }.scope-group h3 { margin:0 0 .45rem; color:var(--blue-800); font-size:.73rem; text-transform:uppercase; }
.scope-option { grid-template-columns:auto 1fr; align-items:center; gap:.55rem; min-height:35px; padding:.35rem .2rem; color:#31445d; font-size:.75rem; font-weight:700; text-transform:none; }.scope-option input { width:18px; min-height:18px; accent-color:var(--blue-700); }
.admin-side-note { border-radius:14px; padding:1.45rem; color:#e8f3ff; background:linear-gradient(160deg,var(--blue-950),var(--blue-800)); box-shadow:0 18px 38px rgba(8,33,63,.17); }.admin-side-note h2 { color:white; font-size:1.6rem; line-height:1.1; }.admin-side-note dl { display:grid; gap:1rem; margin:1.6rem 0 0; }.admin-side-note dt { color:white; font-weight:850; }.admin-side-note dd { margin:.25rem 0 0; color:#c8ddf6; font-size:.85rem; line-height:1.45; }
.admin-table-panel { margin-top:1.25rem; padding:1.4rem; }.admin-table-panel table { min-width:780px; }.admin-table-panel td { vertical-align:middle; }.admin-table-panel small,.muted-text { color:var(--muted); }.role-badge { color:var(--blue-800); background:#e4f0ff; text-transform:capitalize; }.role-admin { color:#6639a6; background:#eee7ff; }.role-receptionist { color:#137052; background:#dcf8ec; }.status-badge { color:#7e3440; background:#fbe8eb; }.status-badge.is-active { color:#137052; background:#dcf8ec; }.account-actions { display:grid; gap:.45rem; }.account-actions form { display:flex; gap:.4rem; }.account-actions input { min-height:34px; padding:.35rem .5rem; text-transform:none; font-size:.75rem; }.text-action { min-height:34px; border:1px solid #cddcee; border-radius:7px; padding:.35rem .55rem; color:var(--blue-800); background:white; font-size:.75rem; font-weight:800; cursor:pointer; }
.admin-section-heading { display:flex; align-items:start; justify-content:space-between; gap:1rem; margin-bottom:1.1rem; }.admin-section-heading h2 { margin:.15rem 0 .3rem; }.admin-section-heading p:not(.eyebrow) { margin:0; color:var(--muted); font-size:.82rem; }.admin-section-count { flex:0 0 auto; border:1px solid #d5e4f4; border-radius:999px; padding:.4rem .65rem; color:var(--blue-800); background:#f7fbff; font-size:.75rem; font-weight:850; }.admin-pagination { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-top:1rem; border-top:1px solid #e1eaf5; padding-top:1rem; color:var(--muted); font-size:.8rem; }.pagination-controls { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:.35rem; }.pagination-button { display:inline-flex; min-width:34px; min-height:34px; align-items:center; justify-content:center; border:1px solid #cddcee; border-radius:7px; padding:.35rem .55rem; color:var(--blue-800); background:#fff; font-size:.75rem; font-weight:800; line-height:1; text-decoration:none; }.pagination-button:hover,.pagination-button:focus-visible { border-color:var(--blue-600); background:#edf6ff; }.pagination-button.is-current { border-color:var(--blue-700); color:#fff; background:var(--blue-700); }.pagination-button.is-disabled { color:#9aabbe; background:#f7f9fc; cursor:not-allowed; }.pagination-ellipsis { display:inline-grid; min-width:20px; place-items:center; color:var(--muted); font-weight:850; }.admin-empty-state { padding:1.25rem; color:var(--muted); text-align:center; }
.danger-action { border-color:#edc5ca; color:#a62f3c; background:#fff8f8; }.danger-action:hover,.danger-action:focus-visible { border-color:#c84e5c; color:#8e2030; background:#fff0f1; }.account-delete-dialog { width:min(100% - 2rem,480px); border:1px solid #d4e2f3; border-radius:16px; padding:0; color:var(--ink); box-shadow:0 28px 70px rgba(5,28,58,.28); }.account-delete-dialog::backdrop { background:rgba(4,25,51,.55); backdrop-filter:blur(2px); }.account-delete-dialog form { display:grid; gap:1rem; padding:1.4rem; }.account-delete-header { display:flex; align-items:start; justify-content:space-between; gap:1rem; }.account-delete-header h2 { margin:.15rem 0 0; color:var(--blue-950); }.account-delete-dialog p { margin:0; color:#425876; line-height:1.55; }.account-delete-dialog label { color:var(--blue-950); font-weight:800; text-transform:none; }.account-delete-dialog label strong { font-family:ui-monospace,SFMono-Regular,Menlo,monospace; }.account-delete-dialog input { margin-top:.45rem; text-transform:none; }.dialog-close { display:grid; width:34px; min-width:34px; min-height:34px; place-items:center; border:0; border-radius:8px; color:#5d718c; background:#eef4fb; font-size:1.4rem; line-height:1; cursor:pointer; }.dialog-close:hover,.dialog-close:focus-visible { color:var(--blue-950); background:#dfeafa; }.account-delete-footer { display:flex; justify-content:flex-end; gap:.6rem; border-top:1px solid #e1eaf5; padding-top:1rem; }.delete-confirm-action { min-height:38px; border:1px solid #b63747; border-radius:8px; padding:.45rem .8rem; color:#fff; background:#b63747; font-size:.78rem; font-weight:850; cursor:pointer; }.delete-confirm-action:hover,.delete-confirm-action:focus-visible { background:#942737; }.delete-confirm-action:disabled { border-color:#e6b9be; color:#b9878e; background:#f8e3e5; cursor:not-allowed; }
.account-menu { position:relative; width:max-content; }.manage-trigger { min-height:36px; border:1px solid #cddcee; border-radius:8px; padding:.45rem .75rem; color:var(--blue-800); background:#fff; font-size:.76rem; font-weight:850; cursor:pointer; list-style:none; }.manage-trigger::-webkit-details-marker { display:none; }.manage-trigger::after { content:"⌄"; margin-left:.45rem; }.account-menu[open] .manage-trigger { border-color:var(--blue-600); background:#edf6ff; }.account-menu-panel { position:absolute; z-index:4; top:calc(100% + .4rem); right:0; display:grid; min-width:180px; gap:.2rem; border:1px solid #cddcee; border-radius:10px; padding:.35rem; background:#fff; box-shadow:0 14px 30px rgba(15,48,86,.18); }.account-menu-panel form { display:contents; }.account-menu-panel button { min-height:36px; border:0; border-radius:7px; padding:.4rem .6rem; color:var(--blue-800); background:transparent; text-align:left; font-size:.75rem; font-weight:800; cursor:pointer; }.account-menu-panel button:hover,.account-menu-panel button:focus-visible { background:#edf6ff; }.account-menu-panel .menu-delete-action { color:#a62f3c; }.account-menu-panel .menu-delete-action:hover,.account-menu-panel .menu-delete-action:focus-visible { background:#fff0f1; }.account-reset-row td { padding:0; background:#f8fbff; }.account-reset-panel { display:flex; align-items:center; gap:.7rem; padding:1rem; }.account-reset-panel > div { min-width:190px; }.account-reset-panel .eyebrow { margin:0 0 .2rem; }.account-reset-panel strong { color:var(--blue-950); font-size:.82rem; }.account-reset-panel .compact-password { flex:1; max-width:270px; }.account-reset-panel .text-action { white-space:nowrap; }

.manage-trigger { display:inline-flex; align-items:center; justify-content:center; gap:.55rem; }.manage-trigger::after { content:""; display:block; width:7px; height:7px; margin:0 0 3px; border-right:1.75px solid currentColor; border-bottom:1.75px solid currentColor; transform:rotate(45deg); transform-origin:center; }.account-menu[open] .manage-trigger::after { margin:3px 0 0; transform:rotate(225deg); }
.account-delete-dialog,.account-reset-dialog { width:min(100% - 2rem,500px); border:1px solid #d4e2f3; border-radius:18px; padding:0; color:var(--ink); background:#fff; box-shadow:0 28px 70px rgba(5,28,58,.28); }.account-delete-dialog::backdrop,.account-reset-dialog::backdrop { background:rgba(4,25,51,.55); backdrop-filter:blur(3px); }.account-delete-dialog form,.account-reset-dialog form { display:grid; gap:1rem; padding:1.5rem; }.account-reset-header { display:flex; align-items:start; justify-content:space-between; gap:1rem; }.account-reset-header h2 { margin:.15rem 0 0; color:var(--blue-950); }.account-reset-dialog p { margin:0; color:#425876; line-height:1.55; }.account-reset-dialog label { display:grid; gap:.45rem; color:var(--blue-950); font-weight:800; text-transform:none; }.account-reset-dialog label strong { font-family:ui-monospace,SFMono-Regular,Menlo,monospace; }.account-reset-footer { display:flex; justify-content:flex-end; gap:.6rem; border-top:1px solid #e1eaf5; padding-top:1rem; }.account-reset-footer .primary-action { min-height:38px; }
.discard-changes-dialog { width:min(100% - 2rem,470px); overflow:hidden; border:1px solid #d6e2f0; border-radius:20px; box-shadow:0 32px 76px rgba(4,28,58,.34); }
.discard-changes-dialog form { gap:1.35rem; padding:1.65rem; }
.discard-changes-dialog .account-delete-header { align-items:center; }
.discard-changes-heading { display:flex; min-width:0; align-items:center; gap:.85rem; }
.discard-changes-icon { display:grid; width:42px; min-width:42px; height:42px; place-items:center; border:1px solid #f1d2d7; border-radius:13px; color:#a43d4b; background:linear-gradient(145deg,#fff6f7,#fde9ec); font-size:1.2rem; font-weight:900; box-shadow:inset 0 1px 0 rgba(255,255,255,.9); }
.discard-changes-dialog .eyebrow { margin:0 0 .2rem; color:#a43d4b; font-size:.68rem; letter-spacing:.08em; }
.discard-changes-dialog h2 { margin:0; font-size:1.38rem; letter-spacing:-.025em; }
.discard-changes-description { max-width:390px; margin:0; padding:.85rem 1rem; border-left:3px solid #9bc4ee; border-radius:0 10px 10px 0; color:#405a79; background:#f6faff; font-size:.9rem; line-height:1.55; text-align:left; }
.discard-changes-dialog .account-delete-footer { align-items:center; justify-content:space-between; gap:.75rem; margin:0 -1.65rem -1.65rem; padding:1.1rem 1.65rem; background:#fbfdff; }
.discard-changes-dialog .text-action,.discard-changes-dialog .delete-confirm-action { min-height:42px; padding:.55rem .9rem; font-size:.8rem; }
.discard-changes-dialog .text-action { background:#fff; }
.discard-changes-dialog .delete-confirm-action { background:#a94452; border-color:#a94452; box-shadow:0 8px 18px rgba(169,68,82,.18); }
.discard-changes-dialog .delete-confirm-action:hover,.discard-changes-dialog .delete-confirm-action:focus-visible { background:#84333e; box-shadow:0 10px 22px rgba(132,51,62,.24); }
@media (max-width:520px) { .discard-changes-dialog form { padding:1.25rem; }.discard-changes-dialog .account-delete-footer { align-items:stretch; flex-direction:column-reverse; margin:0 -1.25rem -1.25rem; padding:1rem 1.25rem; }.discard-changes-dialog .text-action,.discard-changes-dialog .delete-confirm-action { width:100%; } }
.announcement-delete-dialog { width:min(100% - 2rem,480px); overflow:hidden; border:1px solid #d6e2f0; border-radius:20px; box-shadow:0 32px 76px rgba(4,28,58,.34); }
.announcement-delete-dialog form { gap:1.35rem; padding:1.65rem; }
.announcement-delete-dialog .account-delete-header { align-items:center; }
.announcement-delete-heading { display:flex; min-width:0; align-items:center; gap:.85rem; }
.announcement-delete-icon { display:grid; width:42px; min-width:42px; height:42px; place-items:center; border:1px solid #f1d2d7; border-radius:13px; color:#a43d4b; background:linear-gradient(145deg,#fff6f7,#fde9ec); font-size:1.2rem; font-weight:900; box-shadow:inset 0 1px 0 rgba(255,255,255,.9); }
.announcement-delete-dialog .eyebrow { margin:0 0 .2rem; color:#a43d4b; font-size:.68rem; letter-spacing:.08em; }
.announcement-delete-dialog h2 { margin:0; font-size:1.38rem; letter-spacing:-.025em; }
.announcement-delete-description { display:grid; gap:.35rem; margin:0; padding:.9rem 1rem; border-left:3px solid #e5a4ad; border-radius:0 10px 10px 0; color:#405a79; background:#fff8f8; text-align:left; }
.announcement-delete-description strong { overflow-wrap:anywhere; color:#792c38; font-size:.91rem; }
.announcement-delete-description span { font-size:.88rem; line-height:1.5; }
.announcement-delete-dialog .account-delete-footer { align-items:center; justify-content:space-between; gap:.75rem; margin:0 -1.65rem -1.65rem; padding:1.1rem 1.65rem; background:#fbfdff; }
.announcement-delete-dialog .text-action,.announcement-delete-dialog .delete-confirm-action { min-height:42px; padding:.55rem .9rem; font-size:.8rem; }
.announcement-delete-dialog .delete-confirm-action { background:#a94452; border-color:#a94452; box-shadow:0 8px 18px rgba(169,68,82,.18); }
.announcement-delete-dialog .delete-confirm-action:hover,.announcement-delete-dialog .delete-confirm-action:focus-visible { background:#84333e; box-shadow:0 10px 22px rgba(132,51,62,.24); }
@media (max-width:520px) { .announcement-delete-dialog form { padding:1.25rem; }.announcement-delete-dialog .account-delete-footer { align-items:stretch; flex-direction:column-reverse; margin:0 -1.25rem -1.25rem; padding:1rem 1.25rem; }.announcement-delete-dialog .text-action,.announcement-delete-dialog .delete-confirm-action { width:100%; } }
.admin-console { padding-bottom:3rem; }.admin-console-header { display:flex; align-items:end; justify-content:space-between; gap:2rem; margin-bottom:1.5rem; }.admin-console-header h1 { max-width:none; margin:.15rem 0 .35rem; font-size:clamp(2.1rem,4vw,3.7rem); letter-spacing:-.055em; }.admin-console-header p:not(.eyebrow) { max-width:600px; margin:0; color:var(--muted); }.admin-section-nav { display:flex; align-items:center; gap:.35rem; margin-bottom:1.5rem; border-bottom:1px solid #dbe7f4; padding:0 .25rem .7rem; }.admin-section-nav a { display:inline-flex; align-items:center; gap:.45rem; min-height:40px; border-radius:8px; padding:.45rem .8rem; color:#4b6381; font-size:.82rem; font-weight:850; text-decoration:none; }.admin-section-nav a:hover,.admin-section-nav a:focus-visible { color:var(--blue-800); background:#edf6ff; }.admin-section-nav a.is-active { color:#fff; background:var(--blue-800); box-shadow:0 6px 16px rgba(11,77,143,.18); }.admin-section-nav span { display:inline-grid; min-width:1.4rem; height:1.4rem; place-items:center; border-radius:999px; color:inherit; background:rgba(255,255,255,.22); font-size:.68rem; }.admin-section-nav a:not(.is-active) span { color:var(--blue-800); background:#e6f1ff; }.admin-overview-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1.25rem; align-items:stretch; }.admin-overview-card { display:flex; min-height:250px; flex-direction:column; align-items:flex-start; padding:1.6rem; }.admin-overview-card > strong { margin:.55rem 0 .15rem; color:var(--blue-800); font-size:3.1rem; line-height:1; letter-spacing:-.06em; }.admin-overview-card h2 { margin:0 0 .7rem; color:var(--blue-950); font-size:1.2rem; }.admin-overview-card p:not(.eyebrow) { margin:0 0 1.35rem; color:#56708f; line-height:1.55; }.admin-overview-card .primary-action,.admin-overview-card .text-action { margin-top:auto; }.admin-overview-primary { color:#fff; border-color:transparent; background:linear-gradient(135deg,#0a3568,#1d7ed4); box-shadow:0 18px 38px rgba(15,76,139,.2); }.admin-overview-primary > strong,.admin-overview-primary h2 { color:#fff; }.admin-overview-primary p:not(.eyebrow) { color:#d9ebff; }.admin-overview-primary .eyebrow { color:#9fd1ff; }.admin-overview-primary .primary-action { color:var(--blue-800); background:#fff; box-shadow:none; }.admin-overview-grid .admin-side-note { grid-column:1 / -1; min-height:0; }.admin-overview-grid .admin-side-note dl { display:grid; grid-template-columns:repeat(3,1fr); gap:1.25rem; }.admin-overview-grid .admin-side-note dl div { margin:0; }
@media (max-width:860px){.auth-layout,.auth-layout-narrow,.admin-workspace{grid-template-columns:1fr}.auth-layout{min-height:auto;padding:2.5rem 0}.auth-intro h1{max-width:none}.admin-header,.admin-console-header{align-items:start;flex-direction:column}.admin-basic-fields,.scope-groups{grid-template-columns:1fr}.admin-side-note{order:-1}.scope-groups{max-height:260px}.admin-shell{width:min(100% - 1rem,1240px)}.recovery-code-list{grid-template-columns:1fr}.admin-table-panel{padding:1rem}.admin-overview-grid{grid-template-columns:1fr}.admin-overview-grid .admin-side-note{grid-column:auto}.admin-overview-grid .admin-side-note dl{grid-template-columns:1fr}}
@media (max-width:520px){.admin-section-heading,.admin-pagination{align-items:stretch;flex-direction:column}.admin-section-count{align-self:start}.pagination-controls{justify-content:flex-start}.pagination-button{min-height:40px;}}

.password-control { position:relative; display:block; width:100%; }
.password-control input { padding-right:4.4rem; text-transform:none; }
.password-control button[data-toggle-password] { position:absolute; top:50%; right:.4rem; min-height:30px; border:0; border-radius:6px; padding:.2rem .45rem; color:var(--blue-800); background:#eaf2fc; font-size:.7rem; font-weight:850; transform:translateY(-50%); cursor:pointer; }
.password-control button[data-toggle-password] { width:32px; padding:0; font-size:0; }.password-control button[data-toggle-password] svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; vertical-align:middle; }
.password-tools { display:flex; gap:.45rem; margin-top:.45rem; }
.compact-password { min-width:170px; }.compact-password input { min-height:34px; padding-right:3.75rem; font-size:.75rem; }.compact-password button[data-toggle-password] { font-size:.62rem; }
.admin-shell { padding-top:1rem; }.admin-create-form > .primary-action { position:sticky; bottom:1rem; z-index:2; box-shadow:0 12px 26px rgba(23,105,194,.28); }.scope-picker { max-height:360px; overflow:auto; }.scope-picker[hidden] { display:none; }
.assignment-toggle { justify-self:start; min-height:40px; border:1px solid #cbdcf0; border-radius:8px; padding:.5rem .8rem; color:var(--blue-800); background:#f7fbff; font-size:.78rem; font-weight:850; cursor:pointer; }

/* Streamlined account creation */
.admin-create-panel { padding:clamp(1.35rem,3vw,2rem); }
.admin-create-form { gap:1rem; }
.admin-create-form > .primary-action { position:static; box-shadow:none; }
.password-control-tools input { padding-right:7.35rem; }
.password-inline-actions { position:absolute; top:50%; right:2.75rem; display:flex; align-items:center; gap:.15rem; transform:translateY(-50%); }
.password-icon-action { display:grid; width:30px; min-width:30px; min-height:30px; place-items:center; border:0; border-radius:6px; padding:0; color:var(--blue-800); background:#eaf2fc; cursor:pointer; }
.password-icon-action:hover,.password-icon-action:focus-visible { color:var(--blue-950); background:#dcecff; }
.password-icon-action svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; }
.staff-counter-assignment { display:grid; grid-template-columns:minmax(0,1fr) minmax(260px,.8fr); align-items:end; gap:1rem; border:1px solid #d7e5f5; border-radius:12px; padding:1rem; background:linear-gradient(135deg,#f8fbff,#edf6ff); }
.staff-counter-assignment[hidden] { display:none; }.staff-counter-assignment h3 { margin:.15rem 0 .35rem; color:var(--blue-950); font-size:1rem; }.staff-counter-assignment p:not(.eyebrow) { margin:0; color:var(--muted); font-size:.8rem; line-height:1.45; }
.staff-counter-assignment label { text-transform:none; }.staff-counter-assignment select { min-height:46px; }
.admin-form-footer { display:flex; align-items:center; justify-content:space-between; gap:1rem; border-top:1px solid #e1eaf5; padding-top:1rem; }.admin-form-footer p { margin:0; color:var(--muted); font-size:.76rem; }.admin-form-footer .primary-action { min-width:180px; }
@media (max-width:860px) { .staff-counter-assignment { grid-template-columns:1fr; }.admin-form-footer { align-items:stretch; flex-direction:column; }.admin-form-footer .primary-action { width:100%; } }

/* Dedicated sign-in and administrator verification views */
.auth-login-layout { width:min(1120px,calc(100% - 2rem)); grid-template-columns:minmax(0,1.08fr) minmax(350px,.72fr); gap:clamp(1.5rem,5vw,4.5rem); }
.auth-login-layout .auth-intro { position:relative; min-height:430px; display:flex; flex-direction:column; justify-content:center; overflow:hidden; border:1px solid rgba(116,179,255,.35); border-radius:24px; padding:clamp(2rem,5vw,4rem); color:#fff; background:linear-gradient(145deg,#082d59,#12579b 58%,#2789de); box-shadow:0 25px 60px rgba(12,63,119,.2); }
.auth-login-layout .auth-intro::before,.auth-login-layout .auth-intro::after { position:absolute; border:1px solid rgba(255,255,255,.18); border-radius:50%; content:""; pointer-events:none; }
.auth-login-layout .auth-intro::before { width:380px; height:380px; right:-170px; bottom:-230px; }
.auth-login-layout .auth-intro::after { width:200px; height:200px; right:42px; top:-120px; }
.auth-login-layout .auth-intro > * { position:relative; z-index:1; }
.auth-login-layout .auth-intro .eyebrow { color:#91c8ff; }
.auth-login-layout .auth-intro h1 { max-width:9ch; margin:.35rem 0 .9rem; color:#fff; font-size:clamp(3.1rem,5vw,5rem); line-height:.98; }
.auth-login-layout .auth-intro > p:not(.eyebrow) { color:#d9eaff; font-size:1.05rem; }
.auth-login-layout .auth-trust span { color:#dceeff; background:rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.17); }
.auth-login-layout .auth-card { max-width:440px; width:100%; justify-self:end; border-radius:20px; padding:clamp(1.75rem,3.5vw,2.8rem); }
.auth-login-layout .auth-card h2 { font-size:clamp(2rem,3vw,2.55rem); }
.auth-support { margin:0; color:var(--muted); font-size:.78rem; line-height:1.5; text-align:center; }
.auth-verify-layout .auth-intro h1 { max-width:10ch; }
@media (max-width:860px) { .auth-login-layout { grid-template-columns:1fr; width:min(100% - 1rem,560px); gap:1rem; } .auth-login-layout .auth-intro { min-height:300px; border-radius:18px; padding:2rem; } .auth-login-layout .auth-intro h1 { font-size:clamp(2.7rem,12vw,4rem); } .auth-login-layout .auth-card { max-width:none; justify-self:stretch; } }

/* Application error pages */
body[data-page="error"] { min-height:100svh; background:radial-gradient(circle at 15% 15%,#e8f4ff 0,transparent 34%),linear-gradient(145deg,#f8fbff,#eef5fc); }
.error-page-shell { display:grid; width:min(100% - 2rem,760px); min-height:100svh; margin:0 auto; padding:max(1rem,env(safe-area-inset-top)) max(0rem,env(safe-area-inset-right)) max(1rem,env(safe-area-inset-bottom)) max(0rem,env(safe-area-inset-left)); place-items:center; }
.error-card { position:relative; width:100%; overflow:hidden; border:1px solid #d6e4f3; border-radius:24px; padding:clamp(1.5rem,6vw,4rem); background:rgba(255,255,255,.96); box-shadow:0 28px 70px rgba(13,55,102,.14); }
.error-card::after { position:absolute; width:210px; height:210px; right:-100px; top:-110px; border:1px solid #d3e8fb; border-radius:50%; content:""; pointer-events:none; }
.error-brand { position:relative; z-index:1; display:inline-flex; align-items:center; gap:.75rem; margin-bottom:clamp(2.5rem,7vw,4.5rem); color:var(--blue-950); text-decoration:none; }
.error-brand img { width:46px; height:46px; border-radius:10px; }
.error-brand span { display:grid; gap:.1rem; }
.error-brand strong { font-size:.92rem; }
.error-brand small { color:var(--muted); font-size:.72rem; }
.error-status { position:absolute; right:clamp(1.5rem,5vw,3.5rem); top:clamp(5.5rem,13vw,7.5rem); color:#e5f1fc; font-size:clamp(5rem,18vw,9rem); font-weight:950; line-height:1; letter-spacing:-.08em; user-select:none; }
.error-card .eyebrow,.error-card h1,.error-message,.error-reference,.error-actions { position:relative; z-index:1; }
.error-card h1 { max-width:12ch; margin:.35rem 0 .75rem; color:var(--blue-950); font-size:clamp(2.2rem,7vw,4.3rem); line-height:1; letter-spacing:-.055em; }
.error-message { max-width:520px; margin:0; color:#4a6380; font-size:clamp(1rem,2vw,1.15rem); line-height:1.6; }
.error-reference { display:inline-flex; gap:.45rem; margin:1.25rem 0 0; border-radius:8px; padding:.55rem .7rem; color:#506985; background:#f0f5fa; font-size:.78rem; }
.error-reference strong { color:var(--blue-950); letter-spacing:.08em; }
.error-actions { display:flex; flex-wrap:wrap; align-items:center; gap:.7rem; margin-top:2rem; }
.error-actions .primary-action,.error-actions .text-action { display:inline-flex; min-height:44px; align-items:center; justify-content:center; border-radius:9px; padding:.7rem 1rem; font:inherit; font-size:.82rem; font-weight:850; text-decoration:none; cursor:pointer; }
.error-actions .text-action { border:1px solid #cbdced; color:var(--blue-800); background:#fff; }
.error-actions .text-action:hover,.error-actions .text-action:focus-visible { border-color:#8db9e2; background:#edf6ff; }
@media (max-width:520px) { .error-page-shell { width:min(calc(100% - 1rem),760px); }.error-card { border-radius:18px; padding:1.35rem; }.error-brand { margin-bottom:3.5rem; }.error-status { top:5.8rem; right:1.2rem; }.error-actions { align-items:stretch; flex-direction:column; }.error-actions .primary-action,.error-actions .text-action { width:100%; } }
