:root {
    --hx-bg: #edf1f7;
    --hx-surface: #ffffff;
    --hx-muted: #64748b;
    --hx-ink: #0f1c2e;
    --hx-line: #e1e8f0;
    --hx-primary: #0c7269;
    --hx-primary-hover: #0a5e57;
    --hx-primary-soft: #e4f4f1;
    --hx-success: #16a34a;
    --hx-warning: #c87d0a;
    --hx-danger: #dc2626;
    --hx-info: #2563eb;
    --hx-shadow:
        0 1px 3px rgba(15, 28, 46, 0.06),
        0 6px 20px -8px rgba(15, 28, 46, 0.14);
    --hx-shadow-lg:
        0 0 0 1px rgba(15, 28, 46, 0.05),
        0 8px 20px -6px rgba(15, 28, 46, 0.10),
        0 32px 80px -24px rgba(15, 28, 46, 0.26);
    --hx-radius: 0.625rem;
    --hx-radius-lg: 0.875rem;
    --hx-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    min-height: 100%;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    min-width: 320px;
    min-height: 100%;
    margin: 0;
    color: var(--hx-ink);
    background-color: var(--hx-bg);
    background-image:
        radial-gradient(ellipse 80% 45% at 2% -5%, rgba(12, 114, 105, 0.13) 0%, transparent 55%),
        radial-gradient(ellipse 60% 40% at 98% 105%, rgba(37, 99, 235, 0.07) 0%, transparent 55%);
    font-family: "HarmonyOS Sans SC", "MiSans", "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
    letter-spacing: 0;
    overflow-x: hidden;
    font-variant-numeric: tabular-nums;
}

body.dialog-open {
    overflow: hidden;
}

[x-cloak] {
    display: none !important;
}

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

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

a {
    text-decoration: none;
}

textarea {
    resize: vertical;
}

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

.skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 100;
    padding: 0.625rem 0.875rem;
    border-radius: var(--hx-radius);
    color: #ffffff;
    background: var(--hx-ink);
    transform: translateY(-160%);
    transition-property: transform;
    transition-duration: 160ms;
    transition-timing-function: var(--hx-ease);
}

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

/* 顶栏顶部彩色进度线 */
.admin-topbar::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2.5px;
    background: linear-gradient(90deg, var(--hx-primary) 0%, #1d8fb8 55%, #2563eb 100%);
    opacity: 0.85;
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    min-height: 4.5rem;
    background: rgba(255, 255, 255, 0.80);
    backdrop-filter: blur(24px) saturate(160%);
    border-bottom: 1px solid rgba(225, 232, 240, 0.70);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 2px 12px -6px rgba(15, 28, 46, 0.08);
}

.topbar-inner {
    display: flex;
    min-height: 4.5rem;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand-lockup {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 0.75rem;
}

.brand-lockup.large {
    align-items: flex-start;
}

.brand-lockup.navbar-brand {
    margin: 0;
    padding: 0;
    color: inherit;
}

.brand-mark {
    display: flex;
    flex: 0 0 auto;
    width: 2.9rem;
    height: 2.9rem;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.brand-lockup.large .brand-mark {
    width: 3.7rem;
    height: 3.7rem;
}

.brand-logo-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter:
        drop-shadow(0 0.2rem 0.45rem rgba(22, 36, 64, 0.16))
        drop-shadow(0 0.7rem 1.5rem rgba(70, 126, 223, 0.16));
}

.brand-lockup h1,
.brand-lockup p {
    margin: 0;
}

.brand-lockup h1 {
    color: var(--hx-ink);
    font-size: 1rem;
    font-weight: 760;
    line-height: 1.25rem;
    text-wrap: balance;
}

.brand-lockup p {
    color: var(--hx-muted);
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.05rem;
}

.logout-form {
    margin: 0;
}

.admin-shell {
    display: grid;
    width: min(90rem, calc(100vw - 1.5rem));
    gap: 1rem;
    margin: 0 auto;
    padding: 1.25rem 0 7rem;
    transition: opacity 180ms var(--hx-ease), filter 180ms var(--hx-ease);
}

.admin-shell.is-loading {
    opacity: 0.68;
    filter: saturate(0.92);
    pointer-events: none;
}

.hero-panel,
.summary-strip,
.flash-stack,
.data-panel {
    animation-name: surface-in;
    animation-duration: 320ms;
    animation-fill-mode: both;
    animation-timing-function: var(--hx-ease);
}

.summary-strip {
    animation-delay: 45ms;
}

.flash-stack {
    animation-delay: 70ms;
}

.data-panel {
    animation-delay: 95ms;
}

.hero-panel {
    display: grid;
    gap: 1rem;
    align-items: end;
    margin: 0;
    padding: 0.25rem 0 0;
}

.page-title-stack {
    display: grid;
    gap: 0.2rem;
}

.page-title-stack p {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--hx-primary);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.page-title-stack h2 {
    margin: 0;
    color: var(--hx-ink);
    font-size: 1.875rem;
    font-weight: 800;
    line-height: 2.2rem;
    letter-spacing: -0.025em;
    text-wrap: balance;
}

.hero-actions {
    display: grid;
    gap: 0.75rem;
}

.search-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.625rem;
}

.search-control {
    position: relative;
    min-width: 0;
}

.search-control::before,
.search-control::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.search-control::before {
    top: 50%;
    left: 0.95rem;
    width: 0.72rem;
    height: 0.72rem;
    border: 2px solid #9aa8b7;
    border-radius: 999px;
    transform: translateY(-58%);
}

.search-control::after {
    top: 50%;
    left: 1.55rem;
    width: 0.46rem;
    height: 2px;
    border-radius: 999px;
    background: #9aa8b7;
    transform: translateY(0.36rem) rotate(45deg);
}

.search-control .form-control {
    height: 2.75rem;
    padding-left: 2.75rem;
    box-shadow: var(--hx-shadow);
}

/* ── 表单控件全局覆盖 Tabler 默认 ── */
.form-control,
.form-select {
    border-color: rgba(205, 216, 228, 0.9);
    transition-property: border-color, box-shadow;
    transition-duration: 160ms;
    transition-timing-function: var(--hx-ease);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--hx-primary);
    box-shadow: 0 0 0 3px rgba(12, 114, 105, 0.13);
    outline: none;
}

.button.btn {
    display: inline-flex;
    min-height: 2.5rem;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border-radius: var(--hx-radius);
    font-weight: 700;
    white-space: nowrap;
    transition-property: background-color, border-color, box-shadow, color, transform, opacity;
    transition-duration: 150ms;
    transition-timing-function: var(--hx-ease);
}

.button.compact {
    min-height: 2.35rem;
}

.button.btn:active,
.action-button:active,
.icon-button:active,
.summary-card:active {
    transform: scale(0.96);
}

.button.primary.btn-primary {
    --tblr-btn-bg: var(--hx-primary);
    --tblr-btn-border-color: rgba(12, 114, 105, 0.85);
    --tblr-btn-hover-bg: var(--hx-primary-hover);
    --tblr-btn-hover-border-color: var(--hx-primary-hover);
    background-image: linear-gradient(160deg, rgba(255,255,255,0.12) 0%, transparent 60%);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.16) inset,
        0 6px 20px -6px rgba(12, 114, 105, 0.65);
}

.button.secondary.btn {
    color: var(--hx-ink);
    background: #ffffff;
    border-color: var(--hx-line);
    box-shadow: 0 1px 3px rgba(15, 28, 46, 0.06), 0 1px 0 rgba(255,255,255,0.8) inset;
}

.button.ghost.btn {
    color: var(--hx-muted);
}

.button.danger.btn-danger {
    box-shadow: 0 0.75rem 1.4rem -1rem rgba(214, 57, 57, 0.7);
}

.button-mark {
    display: inline-grid;
    width: 1.15rem;
    height: 1.15rem;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 0.95rem;
    font-weight: 760;
    line-height: 1;
}

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

.summary-card {
    display: grid;
    min-width: 0;
    min-height: 4.35rem;
    align-content: center;
    gap: 0.15rem;
    padding: 0.9rem 1rem;
    color: var(--hx-muted);
    border-color: rgba(220, 227, 236, 0.86);
    box-shadow: var(--hx-shadow);
    transition-property: border-color, box-shadow, transform, background-color;
    transition-duration: 150ms;
    transition-timing-function: var(--hx-ease);
}

.summary-card:hover {
    color: var(--hx-ink);
    border-color: rgba(11, 117, 108, 0.22);
    box-shadow: 0 0 0 1px rgba(11, 117, 108, 0.08), var(--hx-shadow);
}

.summary-card.is-active {
    border-color: rgba(12, 114, 105, 0.30);
    background: linear-gradient(160deg, #ffffff 0%, #edf8f5 100%);
    box-shadow:
        inset 0 0.2rem 0 var(--hx-primary),
        0 0 0 1px rgba(12, 114, 105, 0.08),
        0 4px 16px -6px rgba(12, 114, 105, 0.18);
}

.summary-card strong {
    color: var(--hx-ink);
    font-size: 1.875rem;
    font-weight: 820;
    line-height: 1;
    letter-spacing: -0.03em;
}

.summary-card span {
    font-size: 0.8125rem;
    font-weight: 650;
}

.flash-stack {
    display: grid;
    gap: 0.625rem;
}

.message.alert {
    margin: 0;
    border-radius: var(--hx-radius);
    box-shadow: var(--hx-shadow);
    text-wrap: pretty;
}

.data-panel.card,
.login-card.card {
    border-color: rgba(220, 227, 236, 0.70);
    box-shadow:
        0 1px 3px rgba(15, 28, 46, 0.05),
        0 8px 32px -12px rgba(15, 28, 46, 0.12);
}

.login-card.card {
    background: rgba(255, 255, 255, 0.97);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 32px 80px -16px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.data-panel {
    min-width: 0;
    overflow: hidden;
}

.panel-head.card-header {
    display: grid;
    gap: 1rem;
    align-items: end;
    padding: 1rem;
    background: linear-gradient(160deg, #fefeff 0%, #f8fafd 100%);
    border-bottom: 1px solid rgba(220, 230, 240, 0.70);
}

.card-title-group {
    min-width: 0;
}

.card-title-group p {
    margin: 0.25rem 0 0;
    color: var(--hx-muted);
    font-size: 0.875rem;
}

.filter-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.625rem;
}

.filter-field {
    display: grid;
    min-width: 0;
    gap: 0.35rem;
}

.filter-field .form-label,
.bulk-field span {
    margin: 0;
    color: var(--hx-muted);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1rem;
}

.filter-field .form-select,
.bulk-field .form-select,
.bulk-field .form-control {
    height: 2.45rem;
    font-size: 0.875rem;
}

.bulk-form {
    margin: 0;
}

.license-table-shell {
    display: none;
    width: 100%;
    overflow-x: auto;
}

.license-table {
    min-width: 68rem;
    margin: 0;
    table-layout: fixed;
}

.license-table th,
.license-table td {
    min-width: 0;
    vertical-align: middle;
}

.license-table th {
    color: #8896a5;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.license-table td {
    font-size: 0.875rem;
}

.license-table tbody tr {
    transition-property: background-color, box-shadow;
    transition-duration: 150ms;
    transition-timing-function: var(--hx-ease);
}

.license-table tbody tr:hover {
    background-color: #f8fafc;
}

.license-table tbody tr.is-selected {
    background: #f1fbf8;
    box-shadow: inset 0.2rem 0 0 var(--hx-primary);
}

.license-table .select-col {
    width: 3.75rem;
    text-align: center;
}

.license-table .number-col,
.license-table .number-cell {
    width: 4.5rem;
    text-align: center;
}

.number-cell {
    color: #4c5d70;
    font-variant-numeric: tabular-nums;
    font-weight: 750;
}

.license-table th:nth-child(3),
.license-table td:nth-child(3) {
    width: 13rem;
}

.license-table th:nth-child(4),
.license-table td:nth-child(4) {
    width: 15rem;
}

.license-table th:nth-child(5),
.license-table td:nth-child(5) {
    width: 6.75rem;
}

.license-table th:nth-child(6),
.license-table td:nth-child(6) {
    width: 11.5rem;
}

.license-table th:nth-child(7),
.license-table td:nth-child(7) {
    width: 7rem;
}

.license-table th:nth-child(8),
.license-table td:nth-child(8) {
    width: 9rem;
}

.license-table th:nth-child(9),
.license-table td:nth-child(9) {
    width: 6.5rem;
    text-align: right;
}

.entity-cell {
    display: flex;
    min-width: 0;
    align-items: center;
}

.entity-copy {
    display: grid;
    min-width: 0;
    gap: 0.12rem;
}

.entity-copy strong,
.table-strong {
    overflow: hidden;
    color: var(--hx-ink);
    font-weight: 760;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-strong {
    display: block;
    font-size: 1rem;
    line-height: 1.4rem;
    font-variant-numeric: tabular-nums;
}

.entity-copy small,
.cell-stack small {
    overflow: hidden;
    color: var(--hx-muted);
    font-size: 0.75rem;
    line-height: 1rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cell-stack {
    display: grid;
    min-width: 0;
    gap: 0.18rem;
}

.status-token.badge {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    min-height: 1.5rem;
    align-items: center;
    justify-content: center;
    gap: 0.32rem;
    padding-inline: 0.6rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 750;
    letter-spacing: 0.01em;
    text-transform: none;
}

.token-dot {
    width: 0.42rem;
    height: 0.42rem;
    border-radius: 999px;
    background: currentColor;
    box-shadow: 0 0 0 0.18rem rgba(95, 111, 130, 0.10);
}

.status-token.active,
.status-token.bound {
    color: #15803d;
    background: rgba(22, 163, 74, 0.11);
    box-shadow: inset 0 0 0 1px rgba(22, 163, 74, 0.18);
}

.status-token.expired,
.status-token.pending {
    color: #92560a;
    background: rgba(200, 125, 10, 0.11);
    box-shadow: inset 0 0 0 1px rgba(200, 125, 10, 0.18);
}

.status-token.banned {
    color: #b91c1c;
    background: rgba(220, 38, 38, 0.10);
    box-shadow: inset 0 0 0 1px rgba(220, 38, 38, 0.18);
}

.truncate,
.note-text {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.room-cell {
    overflow: hidden;
}

.room-text {
    color: #4f5d70;
    font-variant-numeric: tabular-nums;
}

.check-control {
    position: relative;
    display: inline-grid;
    width: 2.5rem;
    height: 2.5rem;
    place-items: center;
    cursor: pointer;
}

.check-control input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.check-control span {
    position: relative;
    width: 1.05rem;
    height: 1.05rem;
    border-radius: 0.28rem;
    background: linear-gradient(160deg, #ffffff 0%, #f5f8fb 100%);
    box-shadow:
        0 0 0 1px rgba(15, 28, 46, 0.16),
        0 1px 3px rgba(15, 28, 46, 0.10);
    transition-property: background-color, box-shadow, transform;
    transition-duration: 150ms;
    transition-timing-function: var(--hx-ease);
}

.check-control:hover span {
    box-shadow:
        0 0 0 1px rgba(11, 117, 108, 0.42),
        0 0.5rem 1rem -0.9rem rgba(11, 117, 108, 0.85);
}

.check-control input:checked + span,
.check-control input:indeterminate + span {
    background: var(--hx-primary);
    box-shadow:
        0 0 0 1px rgba(11, 117, 108, 0.18),
        0 0.5rem 1rem -0.85rem rgba(11, 117, 108, 0.9);
}

.check-control input:checked + span::after {
    content: "";
    position: absolute;
    top: 0.22rem;
    left: 0.35rem;
    width: 0.32rem;
    height: 0.55rem;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    transform: rotate(45deg);
}

.check-control input:indeterminate + span::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0.56rem;
    height: 2px;
    border-radius: 999px;
    background: #ffffff;
    transform: translate(-50%, -50%);
}

.license-card-list {
    display: grid;
    gap: 0.75rem;
    padding: 0.75rem;
}

.license-card {
    display: grid;
    gap: 0.875rem;
    padding: 1rem 1.05rem;
    border-color: rgba(215, 224, 234, 0.80);
    border-radius: var(--hx-radius-lg);
    background: linear-gradient(160deg, #ffffff 0%, #f9fbfd 100%);
    box-shadow: 0 1px 4px rgba(15, 28, 46, 0.06);
    transition-property: border-color, box-shadow;
    transition-duration: 160ms;
    transition-timing-function: var(--hx-ease);
}

.license-card.is-selected {
    border-color: rgba(11, 117, 108, 0.24);
    background: #f1fbf8;
    box-shadow: inset 0.2rem 0 0 var(--hx-primary), var(--hx-shadow);
}

.license-card-kicker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    color: var(--hx-muted);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1rem;
}

.license-card-kicker strong {
    color: var(--hx-ink);
    font-variant-numeric: tabular-nums;
}

.license-card-head {
    display: flex;
    min-width: 0;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.65rem;
}

.license-card-head .entity-cell {
    flex: 1 1 auto;
}

.license-card-head .status-token {
    flex: 0 0 auto;
}

.card-check {
    flex: 0 0 auto;
    margin: -0.45rem 0 -0.45rem -0.55rem;
}

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

.card-meta dt,
.card-meta dd {
    margin: 0;
}

.card-meta dt {
    color: var(--hx-muted);
    font-size: 0.75rem;
    font-weight: 650;
}

.card-meta dd {
    overflow: hidden;
    margin-top: 0.2rem;
    color: var(--hx-ink);
    font-size: 0.875rem;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-action {
    width: fit-content;
}

.pagination-bar {
    display: grid;
    gap: 0.75rem;
    align-items: center;
    padding: 0.85rem 1rem 1rem;
    border-top: 1px solid rgba(220, 230, 240, 0.72);
}

.pagination-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.8rem;
    color: var(--hx-muted);
    font-size: 0.875rem;
}

.pagination-summary strong,
.page-range span {
    color: var(--hx-ink);
    font-variant-numeric: tabular-nums;
}

.pagination-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.page-link-btn {
    display: inline-flex;
    min-width: 2.4rem;
    min-height: 2.4rem;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.75rem;
    border: 1px solid rgba(203, 216, 228, 0.92);
    border-radius: 0.55rem;
    color: #40536b;
    background: #ffffff;
    font-size: 0.875rem;
    font-weight: 750;
    text-decoration: none;
    transition-property: border-color, background-color, color, box-shadow;
    transition-duration: 150ms;
    transition-timing-function: var(--hx-ease);
}

.page-link-btn:hover {
    border-color: rgba(11, 117, 108, 0.35);
    color: var(--hx-primary);
    box-shadow: 0 0.65rem 1.4rem -1.1rem rgba(11, 117, 108, 0.62);
}

.page-link-btn.is-active {
    border-color: var(--hx-primary);
    color: #ffffff;
    background: var(--hx-primary);
}

.page-link-btn.is-disabled {
    color: #a8b3c1;
    background: #f5f7fa;
    box-shadow: none;
    pointer-events: none;
}

.bulk-action-bar {
    position: sticky;
    bottom: 0.75rem;
    z-index: 25;
    display: grid;
    gap: 0.75rem;
    margin: 0.75rem;
    padding: 0.9rem 1rem;
    border-color: rgba(12, 114, 105, 0.22);
    border-radius: var(--hx-radius-lg);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(24px) saturate(150%);
    box-shadow:
        0 0 0 1px rgba(12, 114, 105, 0.08),
        0 -2px 12px -4px rgba(15, 28, 46, 0.06),
        0 8px 32px -8px rgba(15, 28, 46, 0.18);
}

.bulk-summary {
    display: inline-flex;
    min-height: 2.25rem;
    align-items: center;
    gap: 0.4rem;
    color: var(--hx-muted);
    font-size: 0.875rem;
    font-weight: 650;
    white-space: nowrap;
}

.bulk-summary strong {
    color: var(--hx-primary);
    font-size: 1.25rem;
    font-weight: 800;
}

.bulk-controls {
    display: grid;
    grid-template-columns: 1fr;
    align-items: end;
    gap: 0.625rem;
}

.bulk-field {
    display: grid;
    min-width: 0;
    gap: 0.35rem;
}

.bulk-field.is-disabled {
    opacity: 0.48;
}

.bulk-preview,
.plan-preview {
    margin: 0;
    color: #164c88;
    background: rgba(32, 107, 196, 0.10);
    border-radius: var(--hx-radius);
    padding: 0.65rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 650;
    line-height: 1.45;
    text-wrap: pretty;
}

.empty-state {
    display: grid;
    min-height: 13rem;
    place-items: center;
    gap: 0.35rem;
    padding: 2rem;
    text-align: center;
}

.empty-state strong {
    color: var(--hx-ink);
    font-size: 1rem;
}

.empty-state span {
    color: var(--hx-muted);
    font-size: 0.875rem;
}

.side-dialog {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(32rem, 100vw);
    height: 100dvh;
    max-width: 100vw;
    max-height: 100dvh;
    margin: 0;
    padding: 0;
    border: 0;
    color: inherit;
    background: transparent;
}

.side-dialog::backdrop {
    background: rgba(24, 36, 51, 0.48);
    opacity: 0;
    backdrop-filter: blur(0);
    transition-property: opacity, backdrop-filter;
    transition-duration: 180ms;
    transition-timing-function: var(--hx-ease);
}

.side-dialog.is-open::backdrop {
    opacity: 1;
    backdrop-filter: blur(2px);
}

.side-dialog.is-closing::backdrop {
    opacity: 0;
    backdrop-filter: blur(0);
    transition-duration: 140ms;
}

.side-dialog:not([open]) {
    display: none;
}

.dialog-panel {
    display: flex;
    min-height: 100%;
    flex-direction: column;
    border-radius: 0;
    opacity: 0;
    box-shadow: var(--hx-shadow-lg);
    transform: translateX(1rem);
    transition-property: opacity, transform;
    transition-duration: 220ms;
    transition-timing-function: var(--hx-ease);
    will-change: transform, opacity;
}

.side-dialog.is-open .dialog-panel {
    opacity: 1;
    transform: translateX(0);
}

.side-dialog.is-closing .dialog-panel {
    opacity: 0;
    transform: translateX(0.75rem);
    transition-duration: 140ms;
}

.dialog-head.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
}

.dialog-head p,
.dialog-head h3 {
    margin: 0;
}

.dialog-head p {
    color: var(--hx-muted);
    font-size: 0.8125rem;
    font-weight: 650;
}

.dialog-head h3 {
    margin-top: 0.1rem;
    color: var(--hx-ink);
    font-size: 1.15rem;
    font-weight: 780;
    letter-spacing: -0.015em;
    line-height: 1.5rem;
    text-wrap: balance;
}

.icon-button.btn-icon {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: var(--hx-radius);
    font-size: 1.25rem;
    line-height: 1;
}

.drawer-form {
    display: grid;
    gap: 0.9rem;
    align-content: start;
    padding: 1rem;
    overflow-y: auto;
}

.form-section {
    display: grid;
    gap: 0.85rem;
    min-width: 0;
    padding: 1rem 1.05rem;
    border: 1px solid rgba(225, 232, 240, 0.88);
    border-radius: var(--hx-radius-lg);
    background: linear-gradient(160deg, #fdfeff 0%, #f9fbfd 100%);
}

.field {
    display: grid;
    min-width: 0;
    gap: 0.45rem;
}

.field > label,
.field > span {
    margin: 0;
    color: var(--hx-muted);
    font-size: 0.8125rem;
    font-weight: 650;
    line-height: 1.1rem;
}

.field.required > label::after {
    content: " *";
    color: var(--hx-danger);
}

.field-hint {
    color: var(--hx-muted);
    font-size: 0.75rem;
    line-height: 1.25;
}

.segmented-control {
    display: grid;
    gap: 0.3rem;
    padding: 0.28rem;
    border: 1px solid rgba(210, 220, 232, 0.85);
    border-radius: var(--hx-radius);
    background: linear-gradient(160deg, #e5ecf4 0%, #dae3ee 100%);
    box-shadow: inset 0 1px 3px rgba(15, 28, 46, 0.09);
}

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

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

.segment-option {
    min-width: 0;
}

.segment-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.segment-option span {
    display: inline-flex;
    width: 100%;
    min-height: 2.25rem;
    align-items: center;
    justify-content: center;
    padding: 0 0.55rem;
    border-radius: calc(var(--hx-radius) - 0.125rem);
    color: #5f6b7a;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 700;
    text-align: center;
    transition-property: background-color, box-shadow, color, transform;
    transition-duration: 150ms;
    transition-timing-function: var(--hx-ease);
}

.segment-option:hover span {
    color: var(--hx-ink);
    background: rgba(255, 255, 255, 0.68);
}

.segment-option input:checked + span {
    color: var(--hx-ink);
    background: #ffffff;
    box-shadow:
        0 0 0 1px rgba(15, 28, 46, 0.07),
        0 2px 8px -3px rgba(15, 28, 46, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.advanced-fields {
    overflow: hidden;
    border: 1px solid rgba(218, 228, 238, 0.88);
    border-radius: var(--hx-radius-lg);
    background: linear-gradient(160deg, #fdfeff 0%, #f7fafd 100%);
}

.advanced-fields summary {
    display: flex;
    min-height: 2.75rem;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0.9rem;
    cursor: pointer;
    color: var(--hx-ink);
    font-size: 0.875rem;
    font-weight: 700;
    list-style: none;
}

.advanced-fields summary::-webkit-details-marker {
    display: none;
}

.summary-caret {
    width: 0.52rem;
    height: 0.52rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    color: var(--hx-muted);
    transform: rotate(45deg) translateY(-0.12rem);
    transition-property: color, transform;
    transition-duration: 180ms;
    transition-timing-function: var(--hx-ease);
}

.advanced-fields[open] .summary-caret {
    color: var(--hx-primary);
    transform: rotate(225deg) translate(0.1rem, -0.1rem);
}

.advanced-body {
    padding: 0 0.9rem 0.9rem;
}

.meta-grid {
    display: grid;
    gap: 0.75rem;
}

.meta-box {
    display: grid;
    gap: 0.3rem;
    min-width: 0;
    padding: 0.75rem 0.9rem;
    border: 1px solid rgba(218, 228, 238, 0.85);
    border-radius: var(--hx-radius);
    background: linear-gradient(160deg, #fdfeff 0%, #f7fafd 100%);
    box-shadow: 0 1px 3px rgba(15, 28, 46, 0.04);
}

.meta-box span {
    color: var(--hx-muted);
    font-size: 0.75rem;
    font-weight: 650;
}

.meta-box strong,
.meta-box code {
    overflow: hidden;
    color: var(--hx-ink);
    font-size: 0.875rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.meta-box code {
    font-family: Consolas, "SFMono-Regular", monospace;
}

.danger-zone {
    display: flex;
    padding-top: 0.15rem;
}

.dialog-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.625rem;
    padding-top: 0.1rem;
}

.dialog-actions .button,
.danger-zone .button {
    width: 100%;
}

.confirm-layer {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.confirm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 16, 28, 0.60);
    backdrop-filter: blur(4px);
}

.confirm-dialog {
    position: relative;
    z-index: 1;
    display: grid;
    width: min(100%, 26rem);
    gap: 0.65rem;
    padding: 1.35rem 1.25rem;
    border-radius: var(--hx-radius-lg);
    background: #ffffff;
    box-shadow:
        0 0 0 1px rgba(15, 28, 46, 0.06),
        0 12px 40px -8px rgba(15, 28, 46, 0.18),
        0 40px 100px -24px rgba(15, 28, 46, 0.30);
    transform-origin: center;
}

.confirm-dialog p,
.confirm-dialog h3 {
    margin: 0;
}

.confirm-kicker {
    color: var(--hx-muted);
    font-size: 0.75rem;
    font-weight: 700;
}

.confirm-dialog h3 {
    color: var(--hx-ink);
    font-size: 1.2rem;
    font-weight: 760;
    line-height: 1.45rem;
}

.confirm-dialog p {
    color: var(--hx-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    text-wrap: pretty;
}

.confirm-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.625rem;
    padding-top: 0.25rem;
}

.login-page {
    position: relative;
    display: grid;
    min-height: 100dvh;
    place-items: center;
    padding: 1rem;
    background-color: #0a1628;
    background-image:
        radial-gradient(ellipse 110% 65% at 15% -10%, rgba(12, 114, 105, 0.40) 0%, transparent 55%),
        radial-gradient(ellipse 70% 55% at 88% 110%, rgba(37, 99, 235, 0.22) 0%, transparent 55%),
        radial-gradient(ellipse 50% 40% at 50% 50%, rgba(255, 255, 255, 0.025) 0%, transparent 100%);
}

.login-page::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px);
    background-size: 26px 26px;
    pointer-events: none;
}

.login-shell {
    position: relative;
    z-index: 1;
    display: grid;
    width: min(100%, 56rem);
    gap: 1rem;
}

.login-identity {
    display: flex;
    align-items: end;
    min-height: 8rem;
}

.login-identity .brand-lockup {
    align-items: center;
    gap: 1rem;
}

.login-identity .brand-mark {
    width: 3.45rem;
    height: 3.45rem;
}

.login-identity .brand-lockup h1 {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1.9rem;
    letter-spacing: -0.03em;
}

.login-identity .brand-lockup p {
    margin-top: 0.18rem;
    color: rgba(255, 255, 255, 0.68);
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.2rem;
}

.login-card {
    display: grid;
    gap: 1.125rem;
    width: 100%;
    padding: 1.25rem;
}

.login-head {
    display: grid;
    gap: 0.25rem;
}

.login-head h2,
.login-head p {
    margin: 0;
}

.login-head h2 {
    color: var(--hx-ink);
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.9rem;
    letter-spacing: -0.025em;
    text-wrap: balance;
}

.login-head p {
    color: var(--hx-muted);
    font-size: 0.875rem;
    line-height: 1.45;
    text-wrap: pretty;
}

.login-form {
    display: grid;
    gap: 1rem;
}

.login-form .button {
    width: 100%;
}

@keyframes surface-in {
    from {
        opacity: 0;
        filter: blur(4px);
        transform: translateY(0.65rem);
    }

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

@media (min-width: 40rem) {
    .admin-shell {
        width: min(90rem, calc(100vw - 2.5rem));
    }

    .search-form {
        grid-template-columns: minmax(16rem, 1fr) auto auto;
    }

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

    .dialog-actions {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .dialog-actions .button,
    .danger-zone .button {
        width: auto;
    }

    .login-shell {
        grid-template-columns: minmax(0, 1fr) minmax(22rem, 25rem);
        align-items: center;
    }
}

@media (min-width: 48rem) {
    .admin-shell {
        width: min(90rem, calc(100vw - 3rem));
    }

    .hero-panel {
        grid-template-columns: minmax(0, 1fr) minmax(32rem, 48rem);
    }

    .hero-actions {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
    }

    .summary-strip {
        grid-template-columns: repeat(7, minmax(0, 1fr));
    }

    .summary-card {
        min-height: 4.75rem;
    }

    .panel-head.card-header {
        grid-template-columns: minmax(12rem, 1fr) minmax(34rem, 54rem);
    }

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

    .license-table-shell {
        display: block;
    }

    .license-card-list {
        display: none;
    }

    .pagination-bar {
        grid-template-columns: minmax(12rem, 1fr) auto;
        padding-inline: 1rem;
    }

    .pagination-controls {
        justify-content: flex-end;
    }

    .bulk-action-bar {
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        margin: 0.9rem 1rem 1rem;
        padding: 0.8rem 0.9rem;
    }

    .bulk-controls {
        grid-template-columns: minmax(9.5rem, 12rem) minmax(9rem, 11rem) minmax(9rem, 11rem) auto;
    }

    .bulk-preview {
        grid-column: 2 / -1;
    }
}

@media (min-width: 64rem) {
    .admin-shell {
        gap: 1.1rem;
        padding-top: 1.35rem;
    }

    .page-title-stack h2 {
        font-size: 2.25rem;
        line-height: 2.6rem;
        letter-spacing: -0.03em;
    }
}

@media (max-width: 39.9375rem) {
    .topbar-inner {
        min-height: 4.25rem;
    }

    .brand-lockup {
        gap: 0.6rem;
    }

    .brand-mark {
        width: 2.6rem;
        height: 2.6rem;
    }

    .logout-form .button {
        width: auto;
        padding-inline: 0.8rem;
    }

    .page-title-stack h2 {
        font-size: 1.55rem;
        line-height: 1.85rem;
    }

    .hero-actions > .button,
    .search-form .button,
    .search-form .button.ghost {
        width: 100%;
    }

    .panel-head.card-header {
        padding: 0.9rem;
    }

    .side-dialog {
        width: 100vw;
    }

    .dialog-head.card-header,
    .drawer-form {
        padding: 1rem;
    }

    .confirm-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

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

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

    .dialog-panel {
        will-change: auto;
    }
}
