:root,
[data-theme="dark-premium"] {
    --page-bg: #071c2b;
    --surface: #061722;
    --surface-strong: #082233;
    --border: rgba(16, 243, 239, .35);
    --border-soft: rgba(197, 216, 223, .14);
    --text: #eefcff;
    --text-muted: #c5d8df;
    --text-soft: #8fa8b1;
    --accent: #10f3ef;
    --accent-strong: #0b6670;
    --success: #80f5cc;
    --warning: #ffd166;
    --danger: #ff9b9b;
}

[data-theme="light-executive"] {
    --page-bg: #f4f7fb;
    --surface: #ffffff;
    --surface-strong: #edf3f8;
    --border: rgba(32, 107, 137, .25);
    --border-soft: rgba(35, 65, 83, .12);
    --text: #172b3a;
    --text-muted: #516779;
    --text-soft: #748596;
    --accent: #166985;
    --accent-strong: #145b72;
    --success: #157a52;
    --warning: #9c6a00;
    --danger: #b94141;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--page-bg);
    color: var(--text);
    font-family: Arial, sans-serif;
    scrollbar-color: var(--accent-strong) var(--surface);
    scrollbar-width: thin;
}

* {
    scrollbar-color: var(--accent-strong) var(--surface);
    scrollbar-width: thin;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--surface);
}

::-webkit-scrollbar-thumb {
    border: 2px solid var(--surface);
    border-radius: 999px;
    background: var(--accent-strong);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

::-webkit-scrollbar-corner {
    background: var(--surface);
}

main {
    width: min(1120px, calc(100% - 48px));
    margin: 48px auto;
}

.main-form {
    width: min(560px, calc(100% - 48px));
}

.main-form-wide {
    width: min(860px, calc(100% - 48px));
}

a {
    color: var(--accent);
}

h1 {
    margin-bottom: 6px;
    color: var(--accent);
}

h2 {
    margin-top: 30px;
    color: var(--text);
}

p {
    color: var(--text-muted);
    line-height: 1.5;
}

.app-shell {
    width: min(1120px, calc(100% - 48px));
    margin: 48px auto;
}

.app-shell-narrow {
    width: min(680px, calc(100% - 48px));
}

.page-header {
    display: grid;
    gap: 12px;
    margin-bottom: 22px;
}

.back-link {
    width: fit-content;
    color: var(--text-muted);
    text-decoration: none;
}

.back-link:hover {
    color: var(--accent);
}

.page-title {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px 20px;
}

.page-title h1 {
    margin: 0;
}

.page-subtitle {
    margin: 0;
    color: var(--text-muted);
}

.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 22px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-soft);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--accent);
    font-size: .86rem;
    text-transform: uppercase;
}

td {
    color: var(--text);
}

tbody tr:last-child td {
    border-bottom: 0;
}

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

.table-wrap tbody tr:hover {
    background: rgba(16, 243, 239, .035);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--accent-strong);
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    line-height: 1.15;
}

.button:hover,
.button:focus {
    border-color: var(--accent);
}

.button-primary {
    background: var(--accent-strong);
    color: #fff;
}

.button-secondary {
    background: var(--surface);
    color: var(--accent);
}

.button-success {
    border-color: rgba(128, 245, 204, .55);
    background: #116c58;
    color: #fff;
}

.button-warning {
    border-color: rgba(255, 209, 102, .65);
    background: #5f4a16;
    color: var(--warning);
}

.button-danger {
    border-color: rgba(255, 155, 155, .65);
    background: #5a1f2a;
    color: var(--danger);
}

.button-small {
    min-height: 36px;
    padding: 8px 12px;
    font-size: .9rem;
}

.button:disabled,
.button[aria-disabled="true"] {
    border-color: var(--border-soft);
    background: var(--surface);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: .82;
}

.form-card {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
}

.form-card label {
    display: grid;
    gap: 7px;
    margin-top: 16px;
    color: var(--text-muted);
}

.form-card label:first-child {
    margin-top: 0;
}

.form-card input,
.form-card select,
.form-card textarea {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    background: var(--page-bg);
    color: var(--text);
}

.form-card textarea {
    min-height: 96px;
    resize: vertical;
    line-height: 1.45;
    caret-color: var(--accent);
}

.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus {
    border-color: var(--accent);
    outline: 2px solid rgba(16, 243, 239, .18);
    outline-offset: 1px;
}

.form-card input[readonly] {
    color: var(--text-soft);
    cursor: not-allowed;
}

.password-field {
    position: relative;
    display: block;
}

.password-field input {
    width: 100%;
    padding-right: 92px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    width: auto;
    min-width: 70px;
    margin: 0;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    padding: 7px 9px;
    background: var(--surface-strong);
    color: var(--accent);
    font-size: .78rem;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
}

.password-toggle:hover,
.password-toggle:focus {
    border-color: var(--border);
}

.form-card button {
    margin-top: 22px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
    background: var(--accent-strong);
    color: #fff;
    cursor: pointer;
}

.form-card .form-actions button,
.form-card .form-actions .button {
    margin-top: 0;
}

.form-card .button-secondary {
    background: var(--surface);
    color: var(--accent);
}

.form-card .button-success {
    border-color: rgba(128, 245, 204, .55);
    background: #116c58;
    color: #fff;
}

.form-card .button-warning {
    border-color: rgba(255, 209, 102, .65);
    background: #5f4a16;
    color: var(--warning);
}

.form-card .button-danger {
    border-color: rgba(255, 155, 155, .65);
    background: #5a1f2a;
    color: var(--danger);
}

.form-card .password-toggle {
    width: auto;
    min-width: 70px;
    margin: 0;
    border-color: var(--border-soft);
    padding: 7px 9px;
    background: var(--surface-strong);
    color: var(--accent);
    font-size: .78rem;
    line-height: 1;
}

.choice-list label {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 12px;
    padding: 13px 0;
    border-bottom: 1px solid var(--border-soft);
    color: var(--text);
}

.choice-list label:last-of-type {
    border-bottom: 0;
}

.choice-list input {
    margin-top: 3px;
}

.choice-list small {
    color: var(--text-soft);
}

.checkbox-grid {
    display: grid;
    gap: 10px;
    margin: 18px 0 0;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    padding: 14px;
}

.checkbox-grid legend {
    padding: 0 6px;
    color: var(--text-muted);
}

.checkbox-grid label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    color: var(--text);
}

.checkbox-grid input {
    width: auto;
    margin-top: 3px;
}

.table-wrap {
    overflow-x: auto;
    margin-top: 24px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    scrollbar-color: var(--accent) var(--surface-strong);
}

.table-wrap th,
.table-wrap td {
    white-space: nowrap;
}

.table-wrap::-webkit-scrollbar-track {
    border-radius: 0 0 8px 8px;
    background: var(--surface-strong);
}

.table-wrap::-webkit-scrollbar-thumb {
    border-color: var(--surface-strong);
    background: var(--accent);
}

.table-wide {
    min-width: 980px;
}

.table-medium {
    min-width: 760px;
}

.table-compact {
    min-width: 600px;
}

.list-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding: 14px 16px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-muted);
}

.filter-toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 1.35fr) repeat(auto-fit, minmax(150px, 1fr));
    align-items: end;
    gap: 14px 12px;
    margin-top: 20px;
    padding: 14px 16px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-muted);
}

.filter-toolbar label {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.filter-toolbar input,
.filter-toolbar select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 11px 12px;
    background: var(--page-bg);
    color: var(--text);
}

.filter-toolbar .button {
    min-width: 112px;
    padding-right: 14px;
    padding-left: 14px;
    text-align: center;
}

.list-toolbar form,
.pagination form {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.list-toolbar select {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px;
    background: var(--page-bg);
    color: var(--text);
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 18px;
    color: var(--text-muted);
}

.pagination .summary {
    margin-right: auto;
    color: var(--text-soft);
}

.pagination a,
.pagination button {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 13px;
    background: var(--surface);
    color: var(--accent);
    text-decoration: none;
}

.pagination .disabled {
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    padding: 10px 13px;
    color: var(--text-soft);
}

.pagination input {
    width: 72px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px;
    background: var(--page-bg);
    color: var(--text);
    text-align: center;
    appearance: textfield;
}

.pagination input::-webkit-outer-spin-button,
.pagination input::-webkit-inner-spin-button {
    margin: 0;
    appearance: none;
}

.inline-form {
    display: inline;
}

.inline-form button {
    margin-left: 8px;
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--accent);
    text-decoration: underline;
    cursor: pointer;
}

.table-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    margin: 2px 4px 2px 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 7px 10px;
    background: var(--surface-strong);
    color: var(--accent);
    font-size: .9rem;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

.table-action:hover,
.table-action:focus {
    border-color: var(--accent);
    color: var(--text);
}

.table-action-warning {
    border-color: rgba(255, 209, 102, .55);
    color: var(--warning);
}

.table-action-danger {
    border-color: rgba(255, 155, 155, .55);
    color: var(--danger);
}

.inline-form .table-action {
    margin-left: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 7px 10px;
    background: var(--surface-strong);
    text-decoration: none;
}

.inline-form .table-action-warning {
    border-color: rgba(255, 209, 102, .55);
    color: var(--warning);
}

.table-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    align-items: center;
}

.table-actions .table-action {
    min-width: 86px;
}

.muted {
    color: var(--text-soft);
}

.empty {
    padding: 28px 16px;
    border: 1px dashed var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-muted);
}

.notice {
    color: var(--success);
}

.error {
    color: var(--danger);
}

.alert {
    margin: 14px 0;
    padding: 12px 14px;
    border: 1px solid currentColor;
    border-radius: 8px;
    background: var(--surface);
}

.toast-stack {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 30;
    display: grid;
    gap: 10px;
    width: min(420px, calc(100% - 36px));
}

.toast-message {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: 12px;
    padding: 14px 14px 14px 16px;
    border: 1px solid currentColor;
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 16px 44px rgba(0, 0, 0, .28);
}

.toast-message p {
    margin: 0;
    color: currentColor;
}

.toast-message button {
    width: 28px;
    height: 28px;
    border: 1px solid currentColor;
    border-radius: 999px;
    background: transparent;
    color: currentColor;
    cursor: pointer;
    line-height: 1;
}

.toast-message--leaving {
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity .2s ease, transform .2s ease;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: .86rem;
    line-height: 1;
    white-space: nowrap;
}

.status-success {
    color: var(--success);
}

.status-warning {
    color: var(--warning);
}

.status-danger,
.status-muted {
    color: var(--text-soft);
}

.summary {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 28px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-muted);
}

.summary strong {
    color: var(--accent);
}

.print-ready-callout {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(16, 243, 239, .07);
    color: var(--text-muted);
}

.print-ready-callout strong {
    color: var(--accent);
}

.summary + .operational-grid,
.summary + .attendant-layout {
    margin-top: 12px;
}

.operational-grid {
    display: grid;
    grid-template-columns: minmax(320px, 520px) 1fr;
    gap: 18px;
    align-items: start;
}

.ticket-issue-card h2,
.ticket-latest-card h2 {
    margin: 0;
    color: var(--accent);
}

.ticket-issue-card p {
    margin: 8px 0 0;
    color: var(--text-muted);
}

.segmented-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0 0;
    border: 0;
    padding: 0;
}

.segmented-options legend {
    grid-column: 1 / -1;
    margin-bottom: 2px;
    color: var(--text-muted);
}

.segmented-options label {
    position: relative;
    display: block;
    margin: 0;
}

.segmented-options input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.segmented-options span {
    display: grid;
    min-height: 48px;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--page-bg);
    color: var(--text);
    cursor: pointer;
}

.segmented-options input:checked + span {
    border-color: var(--success);
    background: rgba(23, 173, 166, .24);
    color: var(--text);
}

.service-type-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0 0;
    border: 0;
    padding: 0;
}

.service-type-options legend {
    grid-column: 1 / -1;
    margin-bottom: 2px;
    color: var(--text-muted);
}

.service-type-options label {
    position: relative;
    display: block;
    margin: 0;
}

.service-type-options input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.service-type-options span {
    position: relative;
    display: grid;
    gap: 8px;
    min-height: 88px;
    align-content: center;
    padding: 18px 48px 18px 18px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--page-bg);
    color: var(--text);
    cursor: pointer;
}

.service-type-options span::after {
    content: "";
    position: absolute;
    top: 12px;
    right: 12px;
    display: grid;
    width: 26px;
    height: 26px;
    place-items: center;
    border: 1px solid var(--border-soft);
    border-radius: 50%;
    color: var(--text);
    font-size: .9rem;
    font-weight: 700;
}

.service-type-options strong,
.service-type-options small {
    display: block;
}

.service-type-options strong {
    line-height: 1.2;
}

.service-type-options small {
    color: var(--accent);
    font-size: .9rem;
    font-weight: 700;
}

.service-type-options input:checked + span {
    border-color: var(--success);
    background: rgba(23, 173, 166, .18);
}

.service-type-options input:checked + span::after {
    content: "✓";
    border-color: rgba(128, 245, 204, .55);
    background: rgba(128, 245, 204, .18);
}

.optional-location-field {
    margin-top: 14px;
    padding: 14px;
    border: 1px dashed var(--border-soft);
    border-radius: 8px;
    background: rgba(6, 29, 39, .38);
}

.optional-location-field summary {
    color: var(--text-muted);
    cursor: pointer;
}

.optional-location-field label {
    margin-top: 12px;
}

.ticket-latest-card {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
}

.ticket-latest-card .empty {
    margin-top: 16px;
}

.ticket-latest-card table {
    table-layout: fixed;
}

.ticket-latest-card th,
.ticket-latest-card td {
    overflow-wrap: anywhere;
}

.table-responsive {
    margin-top: 16px;
    overflow-x: auto;
}

.attendant-layout {
    display: grid;
    grid-template-columns: minmax(520px, 1fr) minmax(340px, 520px);
    gap: 18px;
    align-items: start;
}

.attendant-main-column,
.attendant-side-column {
    display: grid;
    gap: 16px;
}

.attendant-current-card {
    display: grid;
    place-items: center;
    min-height: 360px;
    padding: 32px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    text-align: center;
}

.attendant-current-card span,
.attendant-current-card small {
    color: var(--accent);
    font-size: 1.4rem;
}

.attendant-current-card strong {
    display: block;
    margin: 18px 0;
    color: var(--text);
    font-size: clamp(4rem, 10vw, 8.4rem);
    line-height: .9;
    text-shadow: 0 0 28px rgba(16, 243, 239, .22);
}

.attendant-current-card p {
    margin: 0;
    color: var(--text);
    font-size: 1.35rem;
}

.attendant-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(130px, 1fr));
    gap: 12px;
}

.attendant-actions form {
    display: block;
    min-width: 0;
}

.attendant-actions .button,
.attendant-actions button {
    justify-content: center;
    min-height: 64px;
    width: 100%;
}

.attendant-actions-help {
    margin: 12px 0 0;
    color: var(--text-soft);
    font-size: .95rem;
}

.attendant-actions form:first-child .button,
.attendant-actions form:first-child button {
    background: #15aeb8;
}

.attendant-actions form:first-child .button:disabled,
.attendant-actions form:first-child button:disabled {
    border-color: var(--border-soft);
    background: var(--surface-strong);
    color: var(--text-muted);
}

.attendant-actions form:last-child {
    grid-column: 2 / span 2;
}

.called-ticket-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 10px;
    padding: 14px 16px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--surface-strong);
}

.called-ticket-row strong {
    color: var(--accent);
    font-size: 1.4rem;
}

.called-ticket-row span {
    color: var(--text);
}

.attendant-footer-strip {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-muted);
}

.attendant-location-strip {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: minmax(280px, 1fr);
    gap: 12px;
    align-items: end;
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
}

.attendant-location-strip label {
    display: grid;
    gap: 7px;
    margin: 0;
    color: var(--text-muted);
}

.attendant-location-strip select {
    margin-top: 8px;
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    background: var(--page-bg);
    color: var(--text);
}

.attendant-location-strip select:focus {
    border-color: var(--accent);
    outline: 2px solid rgba(16, 243, 239, .18);
    outline-offset: 1px;
}

.attendant-location-help {
    margin: 8px 0 0;
    color: var(--text-soft);
    font-size: .9rem;
}

.attendant-footer-strip strong {
    color: var(--text);
}

.attendant-panel-card {
    min-height: 0;
}

.attendant-location-summary-card {
    display: grid;
    gap: 12px;
    padding: 0;
    overflow: hidden;
}

.attendant-location-summary-card summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 16px 18px;
    cursor: pointer;
    list-style: none;
}

.attendant-location-summary-card summary::-webkit-details-marker {
    display: none;
}

.attendant-location-summary-card summary::after {
    color: var(--accent);
    content: "+";
    font-size: 1.15rem;
    font-weight: 800;
}

.attendant-location-summary-card[open] summary::after {
    content: "-";
}

.attendant-location-summary-card summary span {
    color: var(--accent);
    font-size: 1.05rem;
    font-weight: 800;
}

.attendant-location-summary-card summary small {
    color: var(--text-soft);
    font-size: .86rem;
    white-space: nowrap;
}

.attendant-location-summary-card[open] summary {
    border-bottom: 1px solid var(--border-soft);
}

.attendant-location-summary {
    display: grid;
    gap: 8px;
    padding: 14px 18px 0;
}

.location-summary-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: rgba(8, 34, 51, .56);
}

.location-summary-row.is-active {
    border-color: var(--accent);
    background: rgba(16, 243, 239, .08);
}

.location-summary-row span,
.location-summary-row strong,
.location-summary-row small {
    min-width: 0;
}

.location-summary-row strong,
.location-summary-row small {
    display: block;
    overflow-wrap: anywhere;
}

.location-summary-row small {
    margin-top: 3px;
    color: var(--accent);
    font-size: .76rem;
    font-weight: 700;
    text-transform: uppercase;
}

.location-summary-row em {
    color: var(--text);
    font-style: normal;
    font-weight: 700;
    white-space: nowrap;
}

.attendant-summary-note {
    margin: 0;
    padding: 0 18px 16px;
    color: var(--text-soft);
    font-size: .9rem;
    line-height: 1.35;
}

.tv-panel-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 28% 30%, rgba(16, 243, 239, .08), transparent 38%),
        var(--page-bg);
    color: var(--text);
}

.tv-panel-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 18px;
    width: min(100% - 36px, 1600px);
    min-height: 100vh;
    margin: 0 auto;
    padding: 18px 0;
}

.tv-panel-header,
.tv-panel-grid {
    grid-column: 1 / -1;
}

.tv-panel-header,
.tv-current-call,
.tv-recent-calls,
.tv-panel-message {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(6, 29, 39, .86);
    box-shadow: 0 18px 48px rgba(0, 0, 0, .24);
}

.tv-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 28px;
}

.tv-panel-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.tv-panel-brand .brand-mark {
    width: 42px;
    height: 42px;
}

.tv-panel-brand strong {
    display: block;
    font-size: 2rem;
    line-height: 1;
}

.tv-panel-brand span {
    color: var(--text-muted);
}

.tv-panel-header time {
    color: var(--text-muted);
    font-size: 1rem;
}

.tv-panel-grid {
    display: grid;
    grid-template-columns: minmax(560px, 1.45fr) minmax(360px, .95fr);
    gap: 18px;
    min-height: 0;
}

.tv-current-call {
    display: grid;
    align-content: center;
    justify-items: center;
    min-width: 0;
    min-height: 520px;
    overflow: hidden;
    padding: 36px;
    text-align: center;
}

.tv-current-call span,
.tv-current-call small {
    color: var(--accent);
    font-size: clamp(1.35rem, 2vw, 2.1rem);
}

.tv-current-call strong {
    display: block;
    margin: 26px 0 18px;
    max-width: 100%;
    color: var(--text);
    font-size: clamp(5.4rem, 11vw, 12rem);
    line-height: .88;
    overflow-wrap: anywhere;
    text-shadow: 0 0 38px rgba(16, 243, 239, .24);
}

.tv-current-call p {
    margin: 0 0 26px;
    max-width: 100%;
    color: var(--text);
    font-size: clamp(1.8rem, 3vw, 3.5rem);
    font-weight: 700;
    line-height: 1.08;
    overflow-wrap: anywhere;
}

.tv-current-call small {
    display: block;
}

.tv-current-call.is-updated {
    animation: tv-call-pulse 900ms ease-out;
}

.tv-recent-calls {
    min-width: 0;
    min-height: 0;
    padding: 28px;
}

.tv-recent-calls h1 {
    margin: 0 0 20px;
    color: var(--accent);
    font-size: clamp(1.7rem, 2.3vw, 2.8rem);
}

.tv-recent-call {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 12px;
    padding: 18px 20px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--surface-strong);
}

.tv-recent-call strong {
    color: var(--accent);
    font-size: clamp(1.6rem, 2vw, 2.5rem);
    line-height: 1;
}

.tv-recent-call span {
    color: var(--text);
    font-size: clamp(.98rem, 1.2vw, 1.25rem);
    text-align: right;
}

.tv-panel-message {
    display: flex;
    grid-column: 1;
    align-items: center;
    gap: 14px;
    padding: 22px 28px;
}

.tv-panel-message span {
    width: 10px;
    height: 34px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--accent);
    flex: 0 0 auto;
}

.tv-panel-message p {
    margin: 0;
    color: var(--text);
    font-size: clamp(1.35rem, 2vw, 2.3rem);
    font-weight: 600;
}

.tv-sound-toggle {
    position: static;
    grid-column: 2;
    align-self: stretch;
    justify-self: end;
    min-width: 160px;
    min-height: 56px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(6, 29, 39, .96);
    color: var(--accent);
    font-weight: 700;
    cursor: pointer;
}

.tv-prefix-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border-soft);
}

.tv-prefix-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: .95rem;
}

.tv-prefix-legend strong {
    color: var(--text);
}

.tv-sound-toggle[aria-pressed="true"] {
    border-color: var(--success);
    color: var(--success);
}

.tv-panel-toast {
    position: fixed;
    right: 22px;
    bottom: 92px;
    max-width: 420px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(6, 29, 39, .96);
    color: var(--text);
    box-shadow: 0 18px 48px rgba(0, 0, 0, .3);
}

.totem-page {
    min-height: 100vh;
    background: var(--page-bg);
    color: var(--text);
}

.totem-shell {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 16px;
    width: min(100% - 28px, 1640px);
    min-height: 100vh;
    margin: 0 auto;
    padding: 14px 0 22px;
}

.totem-header,
.totem-card,
.totem-help-card,
.totem-message {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: linear-gradient(145deg, rgba(8, 34, 51, .94), rgba(6, 23, 34, .98));
}

.totem-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 68px;
    padding: 14px 24px;
}

.totem-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.totem-brand .brand-mark {
    width: 28px;
    height: 28px;
    border-radius: 8px 2px 8px 2px;
    background: linear-gradient(135deg, #4ba3ff, var(--accent));
}

.totem-brand strong {
    display: block;
    font-size: 1.55rem;
}

.totem-brand span,
.totem-header time {
    color: var(--text-muted);
    font-size: .9rem;
}

.totem-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 38%);
    gap: 16px;
    min-height: 0;
}

.totem-card,
.totem-help-card {
    min-height: 540px;
    padding: 28px 34px;
}

.totem-step {
    display: grid;
    align-content: center;
    justify-items: center;
    min-height: 480px;
    text-align: center;
}

.totem-step[hidden] {
    display: none;
}

.totem-step h1 {
    margin: 0;
    font-size: clamp(2.8rem, 6vw, 5rem);
    line-height: 1.05;
}

.totem-step-confirmation {
    align-content: start;
    justify-items: start;
    padding-top: 24px;
    text-align: left;
}

.totem-step-confirmation h1 {
    max-width: 820px;
    color: var(--accent);
    font-size: clamp(2.9rem, 4.8vw, 4.6rem);
}

.totem-step > p {
    margin: 24px 0 28px;
    color: var(--text-muted);
    font-size: 1.32rem;
}

.totem-step > p strong {
    color: var(--accent);
}

.totem-service-options,
.totem-priority-options {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 16px;
    width: 100%;
}

.totem-priority-options {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    max-width: 820px;
}

.totem-option {
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 18px;
    min-height: 235px;
    padding: 24px 18px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(8, 49, 58, .56);
    color: var(--text);
    cursor: pointer;
    font: inherit;
    text-align: center;
    transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.totem-option:hover,
.totem-option:focus-visible {
    border-color: var(--accent);
    background: rgba(10, 92, 98, .55);
    outline: none;
    transform: translateY(-2px);
}

.totem-option strong {
    max-width: 100%;
    overflow-wrap: anywhere;
    font-size: clamp(1.35rem, 2.2vw, 2rem);
    line-height: 1.18;
}

.totem-option-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border: 1px solid var(--border-soft);
    border-radius: 50%;
    color: var(--accent);
    font-size: 1.5rem;
    font-weight: 800;
}

.totem-option-preferential {
    border-color: rgba(180, 103, 255, .72);
    background: rgba(75, 45, 116, .66);
}

.totem-option.is-disabled {
    cursor: not-allowed;
    opacity: .42;
}

.totem-back-button {
    margin-top: 20px;
    padding: 14px 30px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font: inherit;
}

.totem-success-mark {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    margin-bottom: 24px;
    border: 2px solid var(--success);
    border-radius: 50%;
    color: var(--success);
    font-weight: 800;
}

.totem-ticket-result {
    display: grid;
    grid-template-columns: minmax(360px, 1.2fr) minmax(220px, .8fr);
    gap: 24px;
    align-items: center;
    justify-self: start;
    width: min(900px, 100%);
    margin: 4px 0 28px;
    text-align: left;
}

.totem-step-confirmation > p,
.totem-step-confirmation > .button,
.totem-step-confirmation > .totem-repeat-audio,
.totem-step-confirmation > small {
    margin-left: min(4vw, 42px);
}

.totem-ticket-result > strong {
    padding: 30px 34px;
    border: 1px solid var(--accent);
    border-radius: 8px;
    background: rgba(16, 243, 239, .08);
    color: var(--text);
    font-size: clamp(5rem, 9vw, 7.4rem);
    letter-spacing: 0;
    line-height: 1;
    text-align: center;
    text-shadow: 0 0 22px rgba(16, 243, 239, .32);
}

.totem-ticket-result dl {
    display: grid;
    gap: 18px;
    margin: 0;
    text-align: left;
}

.totem-ticket-result div {
    display: grid;
    gap: 4px;
}

.totem-ticket-result dt {
    color: var(--text-muted);
    font-weight: 700;
}

.totem-ticket-result dd {
    margin: 0;
    color: var(--text);
    font-size: 1.2rem;
}

.totem-step small {
    margin-top: 18px;
    color: var(--text-muted);
}

.totem-repeat-audio {
    margin-top: 12px;
    padding: 10px 18px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font: inherit;
}

.totem-repeat-audio:hover,
.totem-repeat-audio:focus-visible {
    border-color: var(--accent);
    color: var(--accent);
    outline: none;
}

.totem-help-card h2 {
    margin: 0 0 24px;
    color: var(--accent);
    font-size: 1.65rem;
}

.totem-help-card ol {
    display: grid;
    gap: 22px;
    margin: 0;
    padding: 0;
    counter-reset: totem-steps;
    list-style: none;
}

.totem-help-card li {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 10px;
    align-items: start;
    color: var(--text);
    font-size: 1.22rem;
    line-height: 1.35;
}

.totem-help-card li::before {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--accent);
    border-radius: 50%;
    color: var(--accent);
    counter-increment: totem-steps;
    content: counter(totem-steps);
    font-weight: 800;
}

.totem-help-card small {
    display: block;
    margin-top: 30px;
    color: var(--text-muted);
}

.totem-print-preview {
    display: grid;
    place-items: center;
    width: 150px;
    height: 136px;
    margin: 46px auto 0;
    border-radius: 8px;
    background: linear-gradient(#f8fbff, #dfeaf2);
    color: #082233;
    box-shadow: 0 16px 35px rgba(0, 0, 0, .24);
}

.totem-print-preview span {
    font-size: 2.5rem;
    font-weight: 800;
}

.totem-message {
    min-height: 72px;
    padding: 20px 26px;
    color: var(--text);
    font-size: 1.35rem;
}

.totem-error {
    width: 100%;
    margin: 0 0 12px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 155, 155, .52);
    border-radius: 8px;
    background: rgba(255, 155, 155, .08);
    color: var(--danger);
    font-weight: 700;
}

@keyframes tv-call-pulse {
    0% {
        box-shadow: 0 0 0 rgba(16, 243, 239, 0);
        transform: scale(1);
    }

    35% {
        box-shadow: 0 0 48px rgba(16, 243, 239, .28);
        transform: scale(1.01);
    }

    100% {
        box-shadow: 0 18px 48px rgba(0, 0, 0, .24);
        transform: scale(1);
    }
}

.confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: grid;
    place-items: center;
    padding: 24px;
}

.confirm-modal[hidden] {
    display: none;
}

.confirm-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .58);
}

.confirm-modal__panel {
    position: relative;
    z-index: 1;
    width: min(440px, 100%);
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 20px 70px rgba(0, 0, 0, .35);
}

.confirm-modal__panel h2 {
    margin: 0 0 10px;
}

.confirm-modal__panel p {
    margin: 0;
}

.confirm-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
}

.home-panel {
    padding: 32px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
}

.authenticated-layout {
    display: grid;
    grid-template-columns: 244px 1fr;
    min-height: 100vh;
}

.authenticated-sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    min-height: 0;
    overflow: hidden;
    padding: 18px;
    border-right: 1px solid var(--border-soft);
    background: var(--surface);
}

.authenticated-sidebar__header,
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.brand-link,
.topbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
}

.brand-link strong,
.topbar-brand span:last-child {
    display: block;
    color: var(--text);
    font-weight: 700;
}

.brand-link small {
    display: block;
    margin-top: 2px;
    color: var(--text-soft);
}

.brand-mark {
    width: 30px;
    height: 30px;
    border: 3px solid var(--accent);
    border-radius: 8px;
    transform: rotate(32deg);
}

.sidebar-close {
    display: none;
}

.sidebar-nav {
    display: grid;
    flex: 1 1 auto;
    gap: 8px;
    align-content: start;
    min-height: 0;
    margin-top: 42px;
    margin-bottom: 18px;
    overflow-y: auto;
    padding-right: 4px;
}

.sidebar-nav a,
.shortcut-link {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 44px;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text-muted);
    text-decoration: none;
}

.sidebar-nav a span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-nav a:hover,
.sidebar-nav a:focus,
.sidebar-nav a.is-active,
.shortcut-link:hover,
.shortcut-link:focus {
    border-color: var(--border);
    background: var(--surface-strong);
    color: var(--text);
}

.nav-icon {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    color: var(--accent);
    font-size: .78rem;
    font-weight: 700;
}

.sidebar-user {
    display: grid;
    flex: 0 0 auto;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: center;
    padding-top: 18px;
    border-top: 1px solid var(--border-soft);
}

.sidebar-user > div:last-child {
    min-width: 0;
}

.sidebar-user strong,
.sidebar-user small {
    display: block;
}

.sidebar-user small {
    margin-top: 3px;
    color: var(--text-soft);
}

.user-avatar {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: var(--accent-strong);
    color: #fff;
    font-weight: 700;
}

.sidebar-logout {
    flex: 0 0 auto;
    margin-top: 14px;
}

.sidebar-logout .button {
    width: 100%;
    text-align: center;
}

.authenticated-main {
    min-width: 0;
}

.topbar {
    min-height: 72px;
    padding: 16px 28px;
    border-bottom: 1px solid var(--border-soft);
    background: var(--surface);
}

.topbar-brand {
    display: none;
}

.topbar-user {
    margin-left: auto;
    color: var(--text-muted);
}

.menu-toggle,
.sidebar-close {
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-strong);
    color: var(--accent);
    cursor: pointer;
}

.menu-toggle {
    display: none;
    gap: 5px;
    place-items: center;
    padding: 10px;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: currentColor;
}

.dashboard-shell {
    width: min(1180px, calc(100% - 56px));
    margin: 36px auto 48px;
}

.app-content {
    width: min(1440px, calc(100% - 56px));
    margin: 36px auto 48px;
}

.app-content.main-form {
    width: min(560px, calc(100% - 56px));
}

.app-content.main-form-wide {
    width: min(860px, calc(100% - 56px));
}

.dashboard-hero,
.dashboard-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(460px, 1fr);
    gap: 24px;
    align-items: start;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
}

.dashboard-hero h1,
.dashboard-actions h2 {
    margin: 0;
    color: var(--accent);
}

.mobile-title {
    display: none;
}

.dashboard-context-panels {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.dashboard-context {
    display: grid;
    align-content: start;
    margin: 0;
    padding: 0;
}

.dashboard-context div {
    min-width: 0;
    padding: 11px 0;
    border-bottom: 1px solid var(--border-soft);
}

.dashboard-context div:last-child {
    border-bottom: 0;
}

.dashboard-context dt {
    color: var(--accent);
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.dashboard-context dd {
    margin: 5px 0 0;
    color: var(--text);
    overflow-wrap: anywhere;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.metric-card {
    min-height: 170px;
    padding: 20px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--surface);
}

.metric-card h2 {
    margin: 18px 0 8px;
    color: var(--text);
}

.metric-card p {
    margin: 0;
}

.metric-card small {
    display: block;
    margin-top: 12px;
    color: var(--text-soft);
    line-height: 1.4;
}

.dashboard-actions {
    margin-top: 18px;
}

.shortcut-grid {
    display: grid;
    gap: 10px;
}

.sidebar-backdrop {
    display: none;
}

.auth-page {
    display: grid;
    place-items: center;
    padding: 28px 0;
}

.auth-page-split {
    padding: 48px 0;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(360px, 520px) minmax(320px, 1fr);
    align-items: center;
    gap: 24px;
    width: min(1060px, calc(100% - 48px));
    margin: 0 auto;
}

.auth-panel {
    width: min(460px, calc(100% - 48px));
    margin: 0 auto;
    padding: 32px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
}

.auth-panel-wide {
    width: min(560px, calc(100% - 48px));
}

.auth-panel-login {
    width: 100%;
}

.auth-panel h1 {
    margin-top: 0;
}

.auth-panel form {
    margin-top: 24px;
}

.auth-logout-form {
    margin-top: 14px;
}

.auth-panel .button,
.auth-panel button {
    width: 100%;
}

.auth-panel .password-toggle {
    width: auto;
}

.auth-info-panel {
    padding: 40px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
}

.auth-info-panel h2 {
    max-width: 420px;
    margin: 0;
    color: var(--text);
    font-size: 2.3rem;
    line-height: 1.08;
}

.auth-info-panel p {
    max-width: 460px;
}

.auth-kicker {
    margin: 0 0 18px;
    color: var(--accent);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.auth-feature-list {
    display: grid;
    gap: 14px;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
}

.auth-feature-list li {
    padding-top: 14px;
    border-top: 1px solid var(--border-soft);
}

.auth-feature-list strong,
.auth-feature-list span {
    display: block;
}

.auth-feature-list strong {
    color: var(--accent);
}

.auth-feature-list span {
    margin-top: 5px;
    color: var(--text-muted);
    line-height: 1.45;
}

.definition-grid {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 10px;
    color: var(--text-muted);
}

.definition-grid dt {
    color: var(--accent);
}

code {
    color: var(--accent);
}

@media (max-width: 760px) {
    main,
    .app-shell,
    .main-form,
    .main-form-wide,
    .app-shell-narrow {
        width: min(100% - 28px, 1120px);
        margin: 28px auto;
    }

    .home-panel {
        padding: 22px;
    }

    .authenticated-layout {
        display: block;
    }

    .authenticated-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 25;
        width: min(284px, calc(100% - 52px));
        min-height: 100vh;
        transform: translateX(-100%);
        transition: transform .18s ease;
    }

    .authenticated-layout.sidebar-open .authenticated-sidebar {
        transform: translateX(0);
    }

    .authenticated-layout.sidebar-open .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 24;
        display: block;
        background: rgba(0, 0, 0, .55);
    }

    .sidebar-close {
        display: block;
    }

    .menu-toggle {
        display: grid;
        order: 2;
    }

    .topbar {
        min-height: 66px;
        padding: 10px 14px;
    }

    .topbar-brand {
        display: inline-flex;
        order: 1;
    }

    .topbar-user {
        display: none;
    }

    .dashboard-shell {
        width: min(100% - 28px, 1120px);
        margin: 24px auto 36px;
    }

    .app-content,
    .app-content.main-form,
    .app-content.main-form-wide {
        width: min(100% - 28px, 1120px);
        margin: 24px auto 36px;
    }

    .dashboard-hero,
    .dashboard-actions,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .operational-grid,
    .service-type-options,
    .segmented-options,
    .attendant-layout,
    .attendant-actions,
    .attendant-location-strip,
    .attendant-footer-strip {
        grid-template-columns: 1fr;
    }

    .page-actions {
        width: 100%;
    }

    .page-actions .button {
        width: 100%;
        justify-content: center;
    }

    .attendant-current-card {
        min-height: 240px;
        padding: 24px;
    }

    .attendant-current-card strong {
        font-size: clamp(3.6rem, 18vw, 5.5rem);
    }

    .attendant-current-card p,
    .attendant-current-card span,
    .attendant-current-card small {
        font-size: 1.05rem;
    }

    .attendant-actions form:last-child {
        grid-column: auto;
    }

    .tv-panel-shell {
        grid-template-columns: 1fr;
        width: min(100% - 24px, 1600px);
        min-height: 100vh;
        padding: 12px 0 24px;
    }

    .tv-panel-header,
    .tv-panel-message {
        padding: 18px;
    }

    .tv-panel-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .tv-panel-message {
        align-items: center;
        flex-direction: row;
    }

    .tv-panel-grid {
        grid-template-columns: 1fr;
    }

    .tv-current-call {
        min-height: 0;
        padding: 28px 18px;
    }

    .tv-current-call strong {
        margin: 20px 0 16px;
        font-size: clamp(4.6rem, 28vw, 6.2rem);
    }

    .tv-current-call p {
        margin-bottom: 22px;
        font-size: clamp(1.7rem, 9vw, 2.2rem);
    }

    .tv-current-call span,
    .tv-current-call small {
        font-size: clamp(1.2rem, 7vw, 1.5rem);
    }

    .tv-recent-calls {
        padding: 20px;
    }

    .tv-recent-call {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .tv-recent-call span {
        text-align: left;
    }

    .tv-sound-toggle {
        grid-column: 1;
        justify-self: stretch;
        width: 100%;
        min-height: 54px;
    }

    .tv-panel-toast {
        right: 18px;
        bottom: 18px;
        left: 18px;
    }

    .totem-shell {
        width: min(100% - 24px, 1640px);
        min-height: 100vh;
        padding: 12px 0 24px;
    }

    .totem-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 18px;
    }

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

    .totem-card,
    .totem-help-card {
        min-height: 0;
        padding: 22px;
    }

    .totem-step {
        min-height: 0;
        align-content: start;
    }

    .totem-step h1 {
        font-size: clamp(2.4rem, 12vw, 4.2rem);
    }

    .totem-service-options,
    .totem-priority-options,
    .totem-ticket-result {
        grid-template-columns: 1fr;
    }

    .totem-option {
        min-height: 150px;
    }

    .totem-ticket-result {
        width: 100%;
        max-width: 520px;
    }

    .totem-ticket-result dl {
        text-align: center;
    }

    .totem-message {
        padding: 18px;
        font-size: 1.12rem;
    }

    .ticket-issue-card,
    .ticket-latest-card {
        padding: 22px;
        min-width: 0;
    }

    .ticket-issue-card select,
    .ticket-issue-card button,
    .ticket-issue-card .button,
    .segmented-options span {
        width: 100%;
    }

    .ticket-issue-card .form-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .ticket-latest-card {
        overflow: hidden;
    }

    .ticket-latest-card h2 {
        overflow-wrap: anywhere;
    }

    .ticket-latest-card .table-responsive {
        overflow-x: auto;
        padding-bottom: 8px;
        scrollbar-color: var(--accent-strong) var(--surface);
        scrollbar-width: thin;
    }

    .ticket-latest-card .table-responsive::-webkit-scrollbar {
        height: 8px;
    }

    .ticket-latest-card .table-responsive::-webkit-scrollbar-track {
        background: var(--surface);
    }

    .ticket-latest-card .table-responsive::-webkit-scrollbar-thumb {
        border: 2px solid var(--surface);
        border-radius: 999px;
        background: var(--accent-strong);
    }

    .ticket-latest-card table,
    .ticket-latest-card thead,
    .ticket-latest-card tbody,
    .ticket-latest-card tr,
    .ticket-latest-card th,
    .ticket-latest-card td {
        display: block;
        width: 100%;
    }

    .ticket-latest-card table {
        min-width: 330px;
    }

    .ticket-latest-card thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .ticket-latest-card tr {
        display: grid;
        grid-template-columns: 72px 1fr;
        gap: 8px 14px;
        padding: 14px 0;
        border-bottom: 1px solid var(--border-soft);
    }

    .ticket-latest-card tr:last-child {
        border-bottom: 0;
    }

    .ticket-latest-card td {
        border-bottom: 0;
        padding: 0;
    }

    .ticket-latest-card td:nth-child(1) {
        grid-row: span 3;
    }

    .ticket-latest-card td:nth-child(2),
    .ticket-latest-card td:nth-child(3),
    .ticket-latest-card td:nth-child(4) {
        display: grid;
        grid-template-columns: 82px 1fr;
        gap: 8px;
        align-items: center;
    }

    .ticket-latest-card td:nth-child(2)::before {
        content: "Tipo";
    }

    .ticket-latest-card td:nth-child(3)::before {
        content: "Prioridade";
    }

    .ticket-latest-card td:nth-child(4)::before {
        content: "Status";
    }

    .ticket-latest-card td::before {
        color: var(--accent);
        font-size: .75rem;
        font-weight: 700;
        text-transform: uppercase;
    }

    .dashboard-hero,
    .dashboard-actions {
        padding: 22px;
    }

    .dashboard-context-panels {
        grid-template-columns: 1fr;
    }

    .desktop-title {
        display: none;
    }

    .mobile-title {
        display: inline;
    }

    .auth-page-split {
        padding: 28px 0;
    }

    .auth-shell {
        grid-template-columns: 1fr;
        width: min(100% - 28px, 560px);
        margin: 0 auto;
    }

    .auth-panel,
    .auth-panel-wide {
        width: min(100% - 28px, 560px);
        padding: 22px;
    }

    .auth-panel-login {
        width: 100%;
    }

    .auth-info-panel {
        padding: 22px;
    }

    .auth-info-panel h2 {
        font-size: 1.7rem;
    }

    .confirm-modal__actions {
        display: grid;
    }

    .toast-stack {
        top: 14px;
        right: 14px;
        width: calc(100% - 28px);
    }

    .list-toolbar {
        justify-content: flex-start;
    }

    .filter-toolbar {
        grid-template-columns: 1fr;
    }

    .pagination {
        justify-content: flex-start;
    }

    .pagination .summary {
        width: 100%;
        margin-right: 0;
    }

    .definition-grid {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}
