:root {
    --admin-bg: #eef2f7;
    --admin-bg-overlay: linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(238, 243, 249, 0.92) 100%);
    --admin-surface: rgba(255, 255, 255, 0.92);
    --admin-surface-strong: rgba(255, 255, 255, 0.98);
    --admin-sidebar: #ffffff;
    --admin-border: rgba(30, 41, 59, 0.08);
    --admin-border-strong: rgba(30, 41, 59, 0.14);
    --admin-text: #162033;
    --admin-muted: #6e7c93;
    --admin-accent: #2a67e8;
    --admin-accent-soft: rgba(42, 103, 232, 0.1);
    --admin-accent-strong: #184fbe;
    --admin-danger: #c44a4a;
    --admin-success: #239f6b;
    --admin-warning: #c59d31;
    --admin-shadow: 0 26px 70px rgba(24, 36, 64, 0.08);
    --admin-radius-lg: 30px;
    --admin-radius: 22px;
    --admin-radius-sm: 16px;
    --admin-font-display: "Manrope", "Segoe UI", sans-serif;
    --admin-font-body: "Manrope", "Segoe UI", sans-serif;
    --admin-sidebar-width: 292px;
    --admin-sidebar-collapsed: 102px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(42, 103, 232, 0.1), transparent 28%),
        radial-gradient(circle at bottom right, rgba(51, 160, 127, 0.08), transparent 24%),
        var(--admin-bg);
    color: var(--admin-text);
    font-family: var(--admin-font-body);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.14) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: radial-gradient(circle at center, black 38%, transparent 82%);
    pointer-events: none;
}

a {
    color: inherit;
}

.admin-auth-body,
.admin-app-body {
    color: var(--admin-text);
}

.admin-auth-shell,
.admin-app-shell {
    min-height: 100vh;
    padding: 24px;
}

.admin-auth-shell {
    display: grid;
    place-items: center;
}

.admin-auth-card {
    width: min(100%, 540px);
    padding: 36px;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-lg);
    background: var(--admin-surface);
    box-shadow: var(--admin-shadow);
    backdrop-filter: blur(14px);
}

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

.auth-brand-mark {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3a76f8 0%, #1a53c7 100%);
    color: #fff;
    font-size: 1.15rem;
    font-weight: 800;
    text-transform: lowercase;
}

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

.auth-brand span,
.admin-auth-link-row a {
    color: var(--admin-muted);
}

.auth-copy {
    margin-top: 28px;
}

.admin-kicker {
    margin: 0 0 10px;
    color: var(--admin-accent);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

h1,
h2 {
    margin: 0;
    font-family: var(--admin-font-display);
    font-weight: 400;
}

h1 {
    font-size: clamp(1.2rem, 2.8vw, 1.65rem);
    line-height: 1.05;
}

h2 {
    font-size: clamp(0.98rem, 1.45vw, 1.28rem);
    line-height: 1.15;
}

.auth-copy h1 {
    font-size: clamp(1.55rem, 2.3vw, 2rem);
}

.admin-page-head h1 {
    font-size: clamp(1.05rem, 1.35vw, 1.3rem);
    line-height: 1.18;
}

.auth-copy p:last-child,
.admin-page-head p:last-child,
.admin-panel-copy,
.admin-footer-note p {
    margin: 16px 0 0;
    color: var(--admin-muted);
    font-size: 1rem;
    line-height: 1.7;
}

.admin-form,
.admin-settings-form,
.admin-search-form {
    display: grid;
    gap: 14px;
}

.admin-check-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-sm);
    padding: 14px 16px;
    background: rgba(22, 32, 51, 0.03);
}

.admin-check-row input[type="checkbox"] {
    width: 18px;
    min-width: 18px;
    height: 18px;
    margin: 2px 0 0;
    padding: 0;
}

.admin-check-row span {
    line-height: 1.5;
}

.admin-form {
    margin-top: 28px;
}

.installer-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 18px;
}

.installer-form button {
    grid-column: 1 / -1;
}

label {
    font-size: 0.94rem;
    font-weight: 700;
}

.admin-fieldset {
    margin: 0;
    padding: 18px;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-sm);
    background: rgba(22, 32, 51, 0.02);
}

.admin-fieldset legend {
    padding: 0 8px;
    color: var(--admin-muted);
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.admin-field-note {
    margin: -2px 0 4px;
    color: var(--admin-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.admin-select-wrap {
    position: relative;
}

.admin-select-wrap select {
    appearance: none;
    padding-right: 54px;
    border-radius: 999px;
    background: linear-gradient(180deg, #ffffff 0%, #f7f9fd 100%);
}

.admin-select-wrap select:hover {
    border-color: rgba(42, 103, 232, 0.3);
}

.admin-select-chevron {
    position: absolute;
    top: 50%;
    right: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    color: var(--admin-accent);
    pointer-events: none;
}

.admin-select-chevron svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

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

input,
select,
textarea {
    width: 100%;
    padding: 15px 18px;
    border: 1px solid var(--admin-border-strong);
    border-radius: var(--admin-radius-sm);
    background: #fff;
    color: var(--admin-text);
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid rgba(42, 103, 232, 0.18);
    border-color: rgba(42, 103, 232, 0.26);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

button,
.admin-inline-link,
.admin-logout-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
    border: 0;
    border-radius: 999px;
    background: var(--admin-accent);
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

button:hover,
.admin-inline-link:hover,
.admin-logout-link:hover {
    transform: translateY(-1px);
    background: var(--admin-accent-strong);
    box-shadow: 0 10px 22px rgba(42, 103, 232, 0.2);
}

.admin-secondary-button,
.admin-danger-button {
    min-height: 38px;
    padding: 0 14px;
    border-radius: 12px;
    box-shadow: none;
}

.admin-secondary-button {
    background: rgba(42, 103, 232, 0.1);
    color: var(--admin-accent);
}

.admin-secondary-button:hover {
    background: var(--admin-accent);
    color: #fff;
}

.admin-danger-button {
    background: rgba(196, 74, 74, 0.1);
    color: var(--admin-danger);
}

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

.admin-auth-link-row {
    margin: 16px 0 0;
}

.admin-alert-form {
    margin-top: 16px;
    gap: 10px;
}

.admin-alert-form button {
    width: 100%;
    justify-self: stretch;
}

.admin-auth-link-row a {
    text-decoration: none;
    font-weight: 700;
}

.admin-alert {
    margin-top: 22px;
    padding: 16px 18px;
    border: 1px solid var(--admin-border);
    border-radius: 18px;
    background: var(--admin-surface-strong);
}

.admin-alert p {
    margin: 0;
}

.admin-alert-success {
    color: #1f6d52;
    background: rgba(35, 159, 107, 0.08);
}

.admin-alert-error {
    color: #8a3d3d;
    background: rgba(196, 74, 74, 0.08);
}

.admin-app-shell {
    display: grid;
    grid-template-columns: var(--admin-sidebar-width) minmax(0, 1fr);
    gap: 0;
    transition: grid-template-columns 180ms ease;
}

.admin-shell-collapsed {
    grid-template-columns: var(--admin-sidebar-collapsed) minmax(0, 1fr);
}

.admin-sidebar,
.admin-main-shell {
    min-height: calc(100vh - 48px);
    border: 1px solid var(--admin-border);
    background: var(--admin-surface);
    box-shadow: var(--admin-shadow);
}

.admin-sidebar {
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 24px 18px;
    border-radius: var(--admin-radius-lg) 0 0 var(--admin-radius-lg);
    background: var(--admin-sidebar);
}

.admin-main-shell {
    padding: 28px;
    border-left: 0;
    border-radius: 0 var(--admin-radius-lg) var(--admin-radius-lg) 0;
    background: var(--admin-bg-overlay);
}

.admin-sidebar-top {
    display: grid;
    gap: 16px;
}

.admin-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.admin-sidebar-logo {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3a76f8 0%, #1a53c7 100%);
    color: #fff;
    font-size: 1.35rem;
    font-weight: 800;
    text-transform: lowercase;
}

.admin-sidebar-brand-copy {
    min-width: 0;
}

.admin-sidebar-brand-copy strong,
.admin-sidebar-brand-copy span {
    display: block;
}

.admin-sidebar-brand-copy strong {
    font-size: 1.22rem;
    line-height: 1.15;
    white-space: nowrap;
}

.admin-sidebar-brand-copy span,
.admin-sidebar-footer p,
.admin-profile-chip span {
    color: var(--admin-muted);
}

.admin-sidebar-brand-copy span {
    margin-top: 4px;
    font-size: 0.92rem;
    line-height: 1.3;
}

.admin-sidebar-toggle {
    width: 52px;
    height: 52px;
    min-height: 52px;
    padding: 0;
    border-radius: 16px;
    background: rgba(22, 32, 51, 0.05);
    color: var(--admin-muted);
    box-shadow: none;
}

.admin-sidebar-toggle:hover {
    background: var(--admin-accent-soft);
    color: var(--admin-accent);
}

.admin-sidebar-toggle svg,
.admin-nav-icon svg,
.admin-search-field svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.admin-nav {
    display: grid;
    gap: 8px;
}

.admin-nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 50px;
    padding: 0 14px;
    border-radius: 16px;
    color: var(--admin-muted);
    text-decoration: none;
    transition: background 160ms ease, color 160ms ease;
}

.admin-nav-item:hover,
.admin-nav-item.is-active {
    background: var(--admin-accent-soft);
    color: var(--admin-accent);
}

.admin-nav-item::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%) translateX(-6px);
    padding: 8px 10px;
    border-radius: 10px;
    background: #172033;
    color: #fff;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 140ms ease, transform 140ms ease;
}

.admin-nav-icon {
    display: grid;
    place-items: center;
    width: 22px;
    min-width: 22px;
}

.admin-nav-label {
    white-space: nowrap;
}

.admin-nav-badge {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    min-height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(196, 74, 74, 0.14);
    color: var(--admin-danger);
    font-size: 0.78rem;
    font-weight: 800;
}

.admin-sidebar-footer {
    margin-top: auto;
    display: grid;
    gap: 12px;
}

.admin-sidebar-footer form {
    margin: 0;
}

.admin-sidebar-footer p {
    margin: 0;
    font-size: 0.84rem;
}

.admin-logout-link {
    min-height: 42px;
    background: rgba(22, 32, 51, 0.06);
    color: var(--admin-text);
}

.admin-topbar {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
}

.admin-page-head {
    max-width: 720px;
    min-width: 0;
}

.admin-profile-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--admin-border);
    border-radius: 18px;
    background: var(--admin-surface-strong);
    min-width: 0;
}

.admin-profile-chip div,
.admin-panel-head > div,
.admin-panel-toolbar > div {
    min-width: 0;
}

.admin-profile-avatar {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(42, 103, 232, 0.18), rgba(42, 103, 232, 0.06));
    color: var(--admin-accent);
    font-weight: 800;
}

.admin-main-content {
    margin-top: 24px;
    display: grid;
    gap: 24px;
}

.admin-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
}

.admin-metric-card,
.admin-panel {
    border: 1px solid var(--admin-border);
    border-radius: 24px;
    background: var(--admin-surface-strong);
}

.admin-metric-card {
    display: grid;
    gap: 10px;
    padding: 22px;
}

.admin-metric-label,
.admin-metric-note,
.admin-empty-state,
.admin-table th,
.admin-sort-link span {
    color: var(--admin-muted);
}

.admin-metric-label {
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.admin-metric-card strong {
    font-size: 2.1rem;
    line-height: 1;
}

.admin-panel {
    padding: 24px;
    min-width: 0;
}

.admin-grid {
    display: grid;
    gap: 24px;
    min-width: 0;
}

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

.admin-rule-form {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

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

.admin-panel-head,
.admin-panel-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    min-width: 0;
}

.admin-inline-link {
    min-height: 40px;
    padding-inline: 16px;
    background: rgba(42, 103, 232, 0.1);
    color: var(--admin-accent);
    box-shadow: none;
}

.admin-inline-link:hover {
    color: #fff;
}

.admin-key-list {
    display: grid;
    gap: 16px;
    margin: 18px 0 0;
}

.admin-key-list div {
    padding-top: 16px;
    border-top: 1px solid rgba(22, 32, 51, 0.06);
}

.admin-key-list dt {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--admin-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.admin-key-list dd {
    margin: 8px 0 0;
}

.admin-settings-form {
    margin-top: 18px;
    max-width: 480px;
}

.user-app-shell .admin-sidebar {
    align-self: start;
}

.user-account-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
}

.user-account-grid > * {
    min-width: 0;
}

.user-account-card {
    display: grid;
    align-content: start;
    gap: 0;
}

.user-account-card-wide {
    grid-column: 1 / -1;
}

.user-account-form {
    width: 100%;
    max-width: 540px;
}

.two-factor-widget {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-top: 18px;
}

.two-factor-form {
    max-width: none;
}

.two-factor-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
}

.two-factor-field-grid > div {
    min-width: 0;
}

.two-factor-field-full {
    grid-column: 1 / -1;
}

.two-factor-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(22, 32, 51, 0.08);
}

.admin-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(12, 18, 31, 0.44);
    backdrop-filter: blur(8px);
}

.admin-modal-backdrop[hidden] {
    display: none !important;
}

.admin-modal {
    width: min(100%, 540px);
    padding: 28px;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    background: var(--admin-surface-strong);
    box-shadow: 0 28px 60px rgba(12, 18, 31, 0.22);
}

.admin-modal-copy {
    margin-top: 14px;
}

.admin-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.user-account-card .admin-panel-copy,
.user-account-card .admin-key-list dd,
.user-account-card label,
.admin-page-head p,
.admin-profile-chip strong,
.admin-profile-chip span {
    overflow-wrap: anywhere;
}

.admin-main-content,
.admin-grid > *,
.admin-grid-2 > *,
.admin-form,
.admin-settings-form,
.admin-key-list,
.admin-key-list div {
    min-width: 0;
}

.admin-table-wrap {
    margin-top: 18px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 880px;
}

.admin-table th,
.admin-table td {
    padding: 16px 14px;
    border-bottom: 1px solid rgba(22, 32, 51, 0.06);
    text-align: left;
    vertical-align: top;
}

.admin-table th {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.admin-sort-link,
.admin-code-link,
.admin-url-cell a {
    text-decoration: none;
}

.admin-sort-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: inherit;
}

.admin-sort-link.is-active {
    color: var(--admin-text);
}

.admin-code-link {
    color: var(--admin-text);
    font-weight: 800;
}

.admin-url-cell {
    max-width: 520px;
    word-break: break-word;
}

.admin-note-cell {
    max-width: 320px;
    word-break: break-word;
}

.admin-subtle-note {
    margin-top: 8px;
    color: var(--admin-muted);
    font-size: 0.84rem;
    line-height: 1.45;
}

.admin-country-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    color: var(--admin-muted);
    font-size: 0.84rem;
    line-height: 1;
}

.admin-country-flag {
    font-size: 1rem;
}

.admin-actions-cell {
    width: 1%;
    white-space: nowrap;
}

.admin-action-group {
    display: grid;
    gap: 8px;
    justify-items: stretch;
}

.admin-status-chip {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 700;
}

.admin-status-active {
    background: rgba(35, 159, 107, 0.1);
    color: var(--admin-success);
}

.admin-status-blocked {
    background: rgba(196, 74, 74, 0.1);
    color: var(--admin-danger);
}

.admin-status-expired {
    background: rgba(110, 124, 147, 0.12);
    color: var(--admin-muted);
}

.admin-status-timed {
    background: rgba(197, 157, 49, 0.12);
    color: var(--admin-warning);
}

.admin-status-archived {
    background: rgba(170, 132, 37, 0.14);
    color: #7a5910;
}

.admin-search-form {
    width: min(100%, 360px);
    min-width: 0;
}

.admin-search-field {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    border: 1px solid var(--admin-border);
    border-radius: 16px;
    background: #fff;
    color: var(--admin-muted);
    min-width: 0;
}

.admin-search-field input {
    padding: 14px 0;
    border: 0;
    background: transparent;
    outline: 0;
    min-width: 0;
}

.admin-footer-note {
    margin-top: 18px;
}

.admin-source-chip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(110, 124, 147, 0.12);
    color: var(--admin-muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.admin-source-chip.is-manual {
    background: rgba(42, 103, 232, 0.1);
    color: var(--admin-accent);
}

.admin-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-filter-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid var(--admin-border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--admin-muted);
    text-decoration: none;
    font-weight: 700;
}

.admin-filter-chip.is-active,
.admin-filter-chip:hover {
    background: var(--admin-accent-soft);
    color: var(--admin-accent);
}

.admin-status-open {
    background: rgba(42, 103, 232, 0.12);
    color: var(--admin-accent);
}

.admin-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0;
}

.admin-meta-card {
    margin: 0;
    padding: 14px 16px;
    border: 1px solid rgba(22, 32, 51, 0.06);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.78);
}

.admin-meta-card dt {
    margin: 0 0 8px;
    color: var(--admin-muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.admin-meta-card dd {
    margin: 0;
    color: var(--admin-text);
    line-height: 1.5;
}

.admin-abuse-inline-alert {
    margin: 18px 0 0;
}

.admin-abuse-inbox {
    padding: 14px;
    border-radius: 18px;
    background: #f6f8fc;
}

.admin-abuse-workspace {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 14px;
    margin-top: 14px;
    min-height: 720px;
}

.admin-abuse-sidebar,
.admin-abuse-detail-panel {
    min-width: 0;
}

.admin-abuse-sidebar {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 8px;
}

.admin-abuse-sidebar-head {
    display: grid;
    gap: 6px;
}

.admin-abuse-mailboxes {
    display: grid;
    gap: 6px;
}

.admin-abuse-mailbox-chip {
    width: 100%;
    justify-content: space-between;
    min-height: 38px;
    padding: 0 12px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #3c4043;
    box-shadow: none;
    gap: 10px;
    font-weight: 600;
    font-size: 0.9rem;
}

.admin-abuse-mailbox-chip strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: transparent;
    color: #5f6368;
    font-size: 0.8rem;
}

.admin-abuse-mailbox-chip:hover,
.admin-abuse-mailbox-chip.is-active {
    background: #d3e3fd;
    color: #174ea6;
    transform: none;
    box-shadow: none;
}

.admin-abuse-mailbox-chip:hover strong,
.admin-abuse-mailbox-chip.is-active strong {
    background: rgba(23, 78, 166, 0.1);
    color: #174ea6;
}

.admin-abuse-sidebar-actions {
    display: grid;
    gap: 6px;
}

.admin-abuse-trash-button {
    width: 100%;
    min-height: 34px;
    border-radius: 10px;
    font-size: 0.82rem;
}

.admin-abuse-thread-shell,
.admin-abuse-detail-panel {
    border: 1px solid rgba(95, 99, 104, 0.12);
    border-radius: 14px;
    background: #fff;
    box-shadow: none;
}

.admin-abuse-thread-shell {
    min-height: 0;
    overflow: hidden;
}

.admin-abuse-thread-list {
    display: grid;
    gap: 0;
    max-height: 100%;
    padding: 0;
    overflow-y: auto;
}

.admin-abuse-thread {
    width: 100%;
    min-height: 0;
    display: grid;
    gap: 3px;
    padding: 9px 12px;
    border: 0;
    border-bottom: 1px solid rgba(95, 99, 104, 0.12);
    border-radius: 0;
    background: #fff;
    color: #202124;
    box-shadow: none;
    text-align: left;
}

.admin-abuse-thread:hover,
.admin-abuse-thread.is-active {
    transform: none;
    background: #f2f6fc;
    border-color: rgba(95, 99, 104, 0.12);
    box-shadow: none;
}

.admin-abuse-thread-line {
    display: block;
    min-width: 0;
}

.admin-abuse-thread-sender {
    font-size: 0.83rem;
    font-weight: 700;
    line-height: 1.35;
    color: #202124;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-abuse-thread-subject {
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.35;
    color: #3c4043;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-abuse-thread-meta {
    display: flex;
    align-items: baseline;
    gap: 6px;
    min-width: 0;
    font-size: 0.74rem;
    line-height: 1.35;
    color: #5f6368;
}

.admin-abuse-thread-state {
    flex: 0 0 auto;
    white-space: nowrap;
}

.admin-abuse-thread-snippet {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #5f6368;
}

.admin-abuse-thread-meta time {
    flex: 0 0 auto;
    white-space: nowrap;
}

.admin-abuse-detail-card {
    display: grid;
    gap: 18px;
    padding: 20px;
    min-height: 100%;
    color: #202124;
}

.admin-abuse-detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.admin-abuse-meta-grid {
    margin: 0;
}

.admin-abuse-detail-panel .admin-kicker,
.admin-abuse-detail-panel .admin-subtle-note,
.admin-abuse-detail-panel .admin-muted-inline {
    color: #5f6368;
}

.admin-abuse-detail-panel .admin-meta-card {
    border-color: rgba(95, 99, 104, 0.12);
    background: #f8f9fa;
    padding: 10px 12px;
    border-radius: 10px;
}

.admin-abuse-detail-panel .admin-meta-card dt {
    color: #5f6368;
    margin-bottom: 5px;
    font-size: 0.7rem;
}

.admin-abuse-detail-panel .admin-meta-card dd {
    color: #202124;
    font-size: 0.84rem;
    line-height: 1.4;
}

.admin-abuse-detail-body {
    display: grid;
    gap: 18px;
}

.admin-abuse-content-block {
    padding: 16px 18px;
    border: 1px solid rgba(95, 99, 104, 0.12);
    border-radius: 12px;
    background: #fff;
}

.admin-abuse-url,
.admin-abuse-message {
    margin: 8px 0 0;
    color: #202124;
    line-height: 1.75;
    word-break: break-word;
}

.admin-abuse-detail-panel .admin-text-link {
    color: #174ea6;
}

.admin-abuse-detail-form {
    display: grid;
    gap: 12px;
}

.admin-abuse-detail-panel label {
    color: #202124;
}

.admin-abuse-detail-form textarea {
    min-height: 160px;
    border-color: rgba(95, 99, 104, 0.16);
    background: #fff;
    color: #202124;
}

.admin-abuse-detail-form textarea:focus {
    outline-color: rgba(66, 133, 244, 0.18);
    border-color: rgba(66, 133, 244, 0.3);
}

.admin-abuse-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 14px;
    border-top: 1px solid rgba(95, 99, 104, 0.12);
}

.admin-abuse-action-button {
    min-height: 36px;
    padding: 0 13px;
    border-radius: 10px;
    box-shadow: none;
    font-size: 0.86rem;
}

.admin-abuse-empty-list,
.admin-abuse-empty-detail {
    margin: 0;
    min-height: 280px;
    display: grid;
    place-items: center;
    padding: 24px;
    text-align: center;
}

.admin-code-block {
    margin-top: 18px;
    padding: 16px 18px;
    border: 1px solid rgba(22, 32, 51, 0.08);
    border-radius: 18px;
    background: rgba(22, 32, 51, 0.04);
    overflow-x: auto;
}

.admin-code-block code {
    font-family: "SFMono-Regular", "Menlo", "Consolas", monospace;
    font-size: 0.88rem;
    color: var(--admin-text);
    white-space: nowrap;
}

.admin-inline-form {
    margin-top: 14px;
}

.admin-muted-inline {
    color: var(--admin-muted);
    font-size: 0.9rem;
}

.admin-text-link {
    color: var(--admin-accent);
    text-decoration: none;
    font-weight: 700;
}

.admin-shell-collapsed .admin-sidebar {
    align-items: center;
}

.admin-shell-collapsed .admin-sidebar-brand {
    justify-content: center;
}

.admin-shell-collapsed .admin-sidebar-brand-copy,
.admin-shell-collapsed .admin-sidebar-footer p,
.admin-shell-collapsed .admin-logout-link,
.admin-shell-collapsed .admin-nav-label {
    display: none;
}

.admin-shell-collapsed .admin-sidebar-toggle {
    margin-inline: auto;
}

.admin-shell-collapsed .admin-nav-item {
    width: 60px;
    justify-content: center;
    padding-inline: 0;
}

.admin-shell-collapsed .admin-nav-badge {
    display: none;
}

.admin-shell-collapsed .admin-nav-item:hover::after,
.admin-shell-collapsed .admin-nav-item:focus-visible::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.admin-shell-expanded .admin-nav-item::after {
    display: none;
}

@media (max-width: 1180px) {
    .admin-topbar,
    .admin-panel-head,
    .admin-panel-toolbar {
        display: grid;
    }

    .admin-grid-2,
    .admin-meta-grid {
        grid-template-columns: 1fr;
    }

    .admin-search-form,
    .admin-search-field,
    .admin-profile-chip {
        width: 100%;
    }

    .admin-main-shell {
        padding: 24px;
    }

    .user-account-grid {
        grid-template-columns: 1fr;
    }

    .user-account-card-wide {
        grid-column: auto;
    }

    .admin-abuse-workspace {
        grid-template-columns: 250px minmax(0, 1fr);
    }

    .two-factor-widget,
    .two-factor-field-grid {
        grid-template-columns: 1fr;
    }

    .two-factor-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-modal-actions {
        flex-direction: column-reverse;
    }
}

@media (max-width: 920px) {
    .admin-app-shell,
    .admin-shell-collapsed {
        grid-template-columns: 1fr;
    }

    .admin-sidebar,
    .admin-main-shell {
        border-radius: var(--admin-radius-lg);
    }

    .admin-abuse-workspace {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .admin-main-shell {
        border-left: 1px solid var(--admin-border);
        margin-top: 16px;
        padding: 22px;
    }

    .admin-sidebar-footer {
        display: none;
    }

    .admin-nav {
        grid-template-columns: 1fr;
    }

    .admin-nav-item {
        min-width: 0;
    }

    .admin-abuse-thread-list {
        max-height: 360px;
    }
}

@media (max-width: 760px) {
    .admin-auth-shell,
    .admin-app-shell {
        padding: 14px;
    }

    .admin-auth-card,
    .admin-main-shell,
    .admin-sidebar,
    .admin-panel {
        padding: 20px;
    }

    .admin-topbar {
        gap: 18px;
    }

    .admin-profile-chip {
        width: 100%;
        justify-content: flex-start;
        padding: 12px;
    }

    .admin-search-form,
    .admin-search-field {
        width: 100%;
    }

    .admin-metrics,
    .admin-grid-2,
    .user-account-grid {
        grid-template-columns: 1fr;
    }

    .admin-rule-grid {
        grid-template-columns: 1fr;
    }

    .admin-meta-grid {
        grid-template-columns: 1fr;
    }

    .admin-abuse-inbox,
    .admin-abuse-detail-card {
        padding: 16px;
    }

    .admin-abuse-thread-snippet {
        white-space: normal;
    }

    .admin-abuse-actions,
    .admin-abuse-mailboxes {
        display: grid;
    }

    .admin-abuse-action-button,
    .admin-abuse-mailbox-chip {
        width: 100%;
    }

    .installer-form {
        grid-template-columns: 1fr;
    }

    .admin-settings-form {
        max-width: none;
    }

    .user-account-form {
        max-width: none;
    }

    .admin-inline-form {
        width: 100%;
    }

    .admin-actions-cell {
        white-space: normal;
    }

    .admin-action-group {
        min-width: 160px;
    }

    .admin-table th,
    .admin-table td {
        padding: 12px 10px;
    }

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

    .admin-sidebar-brand-copy strong {
        white-space: normal;
    }

    .admin-auth-link-row {
        display: grid;
        gap: 10px;
    }

    .admin-form button,
    .admin-settings-form button,
    .admin-auth-card button,
    .admin-logout-link {
        width: 100%;
    }

    .admin-check-row {
        align-items: flex-start;
    }

    .admin-code-block code {
        white-space: pre-wrap;
        word-break: break-word;
    }
}
