:root {
    color-scheme: dark;
    --bg: #242642;
    --bg-deep: #181a31;
    --panel: #2d304f;
    --panel-soft: #33385c;
    --panel-strong: #20233c;
    --line: rgba(182, 190, 255, 0.16);
    --text: #f4f7ff;
    --muted: #aeb7d9;
    --faint: #7f89b3;
    --primary: #6a63ff;
    --primary-2: #44e0bd;
    --success: #67f35b;
    --warning: #ffbd4a;
    --danger: #ff5d73;
    --shadow: 0 24px 70px rgba(4, 6, 20, 0.35);
    --radius: 8px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    background:
        radial-gradient(circle at 18% 12%, rgba(68, 224, 189, 0.16), transparent 28%),
        radial-gradient(circle at 82% 0%, rgba(106, 99, 255, 0.28), transparent 32%),
        var(--bg);
    color: var(--text);
}

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

button,
input {
    font: inherit;
}

input {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: rgba(19, 22, 43, 0.72);
    color: var(--text);
    outline: none;
    padding: 0 12px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

input::placeholder {
    color: var(--faint);
}

input:focus {
    border-color: rgba(68, 224, 189, 0.75);
    box-shadow: 0 0 0 3px rgba(68, 224, 189, 0.12);
    background: rgba(19, 22, 43, 0.9);
}

button {
    border: 0;
}

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

.app-body {
    overflow: hidden;
}

.app-shell {
    display: grid;
    grid-template-columns: 236px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 18px 14px;
    background: rgba(26, 28, 51, 0.94);
    border-right: 1px solid var(--line);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 4px 8px;
    color: var(--text);
    font-weight: 800;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #101427;
    font-size: 11px;
    letter-spacing: 0;
}

.brand-name {
    letter-spacing: 0;
}

.nav-list {
    display: grid;
    gap: 6px;
    margin-top: 24px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    border-radius: 7px;
    padding: 8px 10px;
    color: var(--muted);
    transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(106, 99, 255, 0.2);
    color: var(--text);
}

.nav-item.active {
    box-shadow: inset 3px 0 0 var(--primary-2);
}

.nav-icon,
.quick-icon {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.07);
    color: var(--primary-2);
    font-size: 12px;
    font-weight: 800;
}

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

.token-card {
    display: grid;
    gap: 5px;
    border: 1px solid rgba(68, 224, 189, 0.35);
    border-radius: var(--radius);
    background: rgba(22, 25, 49, 0.58);
    padding: 12px;
}

.token-card span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.token-card strong {
    color: var(--primary-2);
    font-size: 22px;
    line-height: 1;
}

.logout {
    color: #ff98a7;
}

.app-main {
    min-width: 0;
    max-height: 100vh;
    overflow-y: auto;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 78px;
    padding: 18px 28px;
    background: rgba(36, 38, 66, 0.88);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(100%, 820px);
    justify-content: flex-end;
}

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 10px 0 7px;
    background: rgba(22, 25, 49, 0.62);
    color: var(--text);
}

.user-chip-initial {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: rgba(68, 224, 189, 0.18);
    color: var(--primary-2);
    font-size: 11px;
    font-weight: 900;
}

.user-chip-name {
    font-size: 12px;
    color: var(--muted);
    font-weight: 700;
}

.topbar h1 {
    margin: 2px 0 0;
    font-size: 24px;
    line-height: 1.1;
}

.eyebrow {
    margin-bottom: 7px;
    color: var(--primary-2);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.server-stats {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}

.server-stats > span {
    padding: 6px 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(22, 25, 49, 0.62);
    white-space: nowrap;
}

.stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-weight: 800;
}

.status-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: currentColor;
}

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

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

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

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

.content {
    width: min(1540px, 100%);
    margin: 0 auto;
    padding: 28px;
}

.hero-panel,
.data-panel,
.metric-card,
.quick-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(45, 48, 79, 0.86);
    box-shadow: var(--shadow);
}

.hero-panel {
    position: relative;
    overflow: hidden;
    padding: 32px;
}

.hero-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(135deg, rgba(68, 224, 189, 0.18), transparent 35%),
        linear-gradient(315deg, rgba(106, 99, 255, 0.28), transparent 42%);
    opacity: 0.9;
}

.hero-panel > * {
    position: relative;
    z-index: 1;
}

.dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 28px;
    align-items: center;
}

.hero-copy h2 {
    max-width: 680px;
    margin-bottom: 14px;
    font-size: clamp(28px, 4vw, 52px);
    line-height: 1.02;
}

.hero-copy p {
    max-width: 650px;
    color: var(--muted);
    line-height: 1.65;
}

.hero-actions,
.toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border-radius: 7px;
    padding: 0 14px;
    color: var(--text);
    cursor: pointer;
    transition: transform 0.16s ease, filter 0.16s ease, background 0.16s ease;
}

.btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

.btn.primary {
    background: linear-gradient(135deg, var(--primary-2), var(--primary));
    color: #101427;
    font-weight: 800;
}

.btn.secondary {
    background: rgba(106, 99, 255, 0.28);
}

.btn.ghost {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
}

.btn.warning {
    background: rgba(255, 189, 74, 0.17);
    color: #ffe2ad;
}

.btn.success-btn {
    background: rgba(103, 243, 91, 0.16);
    color: var(--success);
}

.btn.danger-btn {
    background: rgba(255, 93, 115, 0.16);
    color: var(--danger);
}

.btn.tiny {
    min-height: 30px;
    padding: 0 9px;
    font-size: 12px;
}

.btn.full {
    width: 100%;
}

.metric-display {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 24px;
    border: 1px solid rgba(68, 224, 189, 0.38);
    border-radius: var(--radius);
    background: rgba(25, 28, 52, 0.74);
}

.metric-display span {
    color: #69c9ff;
    font-size: clamp(38px, 7vw, 72px);
    font-weight: 900;
    line-height: 0.95;
    text-align: center;
}

.metric-display small {
    color: var(--muted);
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 800;
}

.metrics-grid,
.quick-grid,
.profile-grid,
.form-grid {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

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

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

.profile-grid {
    grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1.3fr);
}

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

.metric-card,
.quick-card,
.data-panel {
    padding: 20px;
}

.metric-label {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 800;
}

.metric-card strong {
    display: block;
    margin-top: 8px;
    color: var(--text);
    font-size: 28px;
}

.metric-card p,
.quick-card p,
.data-panel p,
.auth-copy {
    color: var(--muted);
    line-height: 1.55;
}

.quick-card {
    display: grid;
    gap: 10px;
}

.quick-card strong {
    font-size: 17px;
}

.search-hero {
    display: grid;
    justify-items: center;
    gap: 18px;
    text-align: center;
}

.search-hero .metric-display {
    width: min(760px, 100%);
    border-color: rgba(106, 99, 255, 0.52);
}

.search-form {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto;
    width: min(640px, 100%);
    gap: 10px;
}

.search-form input {
    min-height: 52px;
    background: #f7f8ff;
    color: #101427;
    border: 0;
}

.search-form input::placeholder {
    color: #707694;
}

.hero-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    color: var(--muted);
    font-size: 12px;
}

.result-tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin: 16px 0;
}

.tab {
    min-height: 42px;
    border-radius: 7px;
    border: 1px solid var(--line);
    background: rgba(45, 48, 79, 0.82);
    color: var(--muted);
    cursor: pointer;
}

.tab.active {
    background: linear-gradient(135deg, rgba(68, 224, 189, 0.95), rgba(106, 99, 255, 0.86));
    color: #101427;
    font-weight: 900;
}

.data-toolbar,
.section-heading {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 16px;
}

.data-toolbar h2,
.section-heading h2 {
    margin: 0;
}

.stats {
    color: var(--muted);
    font-size: 14px;
}

.export-query {
    margin-bottom: 0;
}

.export-query span {
    color: var(--text);
    font-family: "Cascadia Mono", Consolas, monospace;
}

.export-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.export-summary div {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(22, 25, 49, 0.5);
    padding: 12px;
}

.export-summary span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.export-summary strong {
    display: block;
    margin-top: 6px;
    font-size: 20px;
}

.export-progress {
    height: 12px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(14, 17, 36, 0.78);
}

.export-progress div {
    width: 0;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary-2), var(--primary));
    transition: width 0.25s ease;
}

.export-parts {
    display: grid;
    gap: 10px;
}

.export-part {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(22, 25, 49, 0.5);
    padding: 12px;
}

.export-part div {
    display: grid;
    gap: 4px;
}

.export-part span {
    color: var(--muted);
    font-size: 13px;
}

.hidden {
    display: none;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(20, 23, 45, 0.42);
}

.results-table {
    width: 100%;
    min-width: 0;
    border-collapse: collapse;
    table-layout: auto;
}

.search-results-table {
    table-layout: fixed;
}

.results-table th,
.results-table td {
    border-bottom: 1px solid var(--line);
    padding: 12px 14px;
    text-align: left;
    vertical-align: top;
}

.results-table th {
    color: var(--muted);
    background: rgba(106, 99, 255, 0.12);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.search-results-table th:nth-child(1),
.search-results-table td:nth-child(1) {
    width: 42%;
}

.search-results-table th:nth-child(2),
.search-results-table td:nth-child(2) {
    width: 16%;
}

.search-results-table th:nth-child(3),
.search-results-table td:nth-child(3) {
    width: 18%;
}

.search-results-table th:nth-child(4),
.search-results-table td:nth-child(4) {
    width: 12%;
}

.search-results-table th:nth-child(5),
.search-results-table td:nth-child(5) {
    width: 12%;
}

.results-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.035);
}

.results-table tr:last-child td {
    border-bottom: 0;
}

.mono {
    font-family: "Cascadia Mono", Consolas, monospace;
    font-size: 12px;
}

.url-cell {
    min-width: 0;
    max-width: none;
    overflow-wrap: anywhere;
    color: #bfc6ff;
}

.url-link {
    display: block;
    color: #bfc6ff;
    line-height: 1.45;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.url-link:hover {
    color: var(--primary-2);
}

.secret {
    color: #ffbdc7;
}

.row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.empty-state {
    color: var(--muted);
    text-align: center !important;
    padding: 28px !important;
}

.icon-btn {
    min-height: 30px;
    border-radius: 6px;
    background: rgba(68, 224, 189, 0.12);
    color: var(--primary-2);
    cursor: pointer;
    padding: 0 10px;
}

.unlock-btn {
    background: rgba(106, 99, 255, 0.2);
    color: #d8d5ff;
}

.inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.admin-create input {
    max-width: 220px;
}

.check-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
}

.check-row input {
    width: 16px;
    min-height: 16px;
}

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

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

.log-detail {
    max-width: 520px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.search-results-table .url-cell {
    min-width: 0;
}

.disclaimer-panel {
    max-width: 920px;
}

.disclaimer-copy {
    display: grid;
    gap: 14px;
    color: var(--text);
    line-height: 1.65;
}

.disclaimer-check {
    justify-content: flex-start;
}

.form-error {
    border: 1px solid rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.1);
    color: #fecaca;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
}

.action-cluster {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.action-cluster form {
    margin: 0;
}

.mini-form {
    display: inline-flex;
    gap: 4px;
}

.mini-form input {
    width: 82px;
    min-height: 30px;
    padding: 0 8px;
    font-size: 12px;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    border-radius: 999px;
    padding: 0 9px;
    border: 1px solid currentColor;
    font-size: 12px;
    font-weight: 800;
}

.badge.neutral {
    color: var(--muted);
}

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

.form-alert {
    border-radius: var(--radius);
    padding: 12px 14px;
    margin-bottom: 14px;
    border: 1px solid var(--line);
    background: rgba(22, 25, 49, 0.6);
}

.form-alert.success {
    border-color: rgba(103, 243, 91, 0.4);
    color: #c3fbc0;
    background: rgba(103, 243, 91, 0.08);
}

.form-alert.error {
    border-color: rgba(255, 93, 115, 0.4);
    color: #ffc6ce;
    background: rgba(255, 93, 115, 0.08);
}

.profile-summary {
    text-align: center;
}

.profile-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.avatar {
    display: grid;
    place-items: center;
    width: 96px;
    height: 96px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #101427;
    font-size: 36px;
    font-weight: 900;
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.profile-stats div {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px;
    background: rgba(22, 25, 49, 0.5);
}

.profile-stats span,
.detail-list dt {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 800;
}

.profile-stats strong {
    display: block;
    margin-top: 5px;
    font-size: 22px;
}

.small-stat {
    font-size: 14px !important;
    line-height: 1.3;
}

.detail-list {
    display: grid;
    gap: 10px;
    margin: 0;
}

.detail-list div {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.detail-list div:last-child {
    border-bottom: 0;
}

.detail-list dd {
    margin: 0;
    color: var(--text);
    overflow-wrap: anywhere;
}

.stack-form {
    display: grid;
    gap: 14px;
}

.stack-form label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.compact-form {
    margin-top: 12px;
}

.twofa-panel {
    margin-top: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(22, 25, 49, 0.45);
    padding: 12px;
    display: grid;
    gap: 10px;
}

.twofa-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.twofa-actions {
    display: grid;
    gap: 10px;
}

.help-actions {
    display: grid;
    gap: 8px;
}

.settings-layout {
    display: grid;
    gap: 18px;
}

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

.settings-grid label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.setting-toggle {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 64px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(22, 25, 49, 0.45);
    padding: 12px 14px;
}

.setting-toggle-wide {
    grid-column: 1 / -1;
}

.setting-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.setting-copy strong {
    color: var(--text);
    font-size: 13px;
    letter-spacing: 0;
}

.setting-copy small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
}

.switch-control {
    position: relative;
    flex: 0 0 auto;
    width: 48px;
    height: 28px;
}

.switch-control input {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    min-height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.switch-slider {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(182, 190, 255, 0.22);
    border-radius: 999px;
    background: rgba(19, 22, 43, 0.86);
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.switch-slider::after {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: var(--muted);
    transition: transform 0.18s ease, background 0.18s ease;
}

.switch-control input:checked + .switch-slider {
    border-color: rgba(68, 224, 189, 0.7);
    background: linear-gradient(135deg, rgba(68, 224, 189, 0.7), rgba(106, 99, 255, 0.74));
    box-shadow: 0 0 0 3px rgba(68, 224, 189, 0.1);
}

.switch-control input:checked + .switch-slider::after {
    transform: translateX(20px);
    background: #101427;
}

.switch-control input:focus-visible + .switch-slider {
    box-shadow: 0 0 0 3px rgba(68, 224, 189, 0.16);
}

.account-settings-grid {
    align-items: stretch;
}

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

.setup-2fa-form {
    margin-top: 14px;
}

.narrow-panel {
    width: min(480px, 100%);
    margin: 36px auto;
}

.auth-card {
    text-align: center;
}

.auth-card .stack-form {
    margin-top: 22px;
    text-align: left;
}

.qr-box {
    display: inline-grid;
    place-items: center;
    margin-top: 20px;
    padding: 14px;
    border-radius: var(--radius);
    background: #fff;
}

.qr-box img {
    display: block;
    width: 200px;
    height: 200px;
}

.auth-body {
    display: grid;
    place-items: center;
    min-height: 100vh;
    overflow: auto;
    padding: 28px;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(320px, 420px) minmax(320px, 560px);
    gap: 18px;
    width: min(1020px, 100%);
}

.auth-panel,
.auth-visual {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(45, 48, 79, 0.9);
    box-shadow: var(--shadow);
    padding: 30px;
}

.auth-brand {
    padding: 0;
    margin-bottom: 32px;
}

.auth-panel h1 {
    margin-bottom: 10px;
    font-size: 34px;
}

.muted-link {
    display: inline-block;
    margin-top: 18px;
    color: var(--muted);
    font-size: 14px;
}

.auth-visual {
    display: grid;
    align-content: center;
    gap: 20px;
    overflow: hidden;
}

.fake-table {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 0.8fr;
    gap: 8px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(20, 23, 45, 0.62);
}

.fake-table span {
    height: 14px;
    border-radius: 999px;
    background: rgba(174, 183, 217, 0.26);
}

.fake-table span:nth-child(3n + 1) {
    background: rgba(68, 224, 189, 0.25);
}

@media (max-width: 980px) {
    .app-shell {
        grid-template-columns: 74px minmax(0, 1fr);
    }

    .brand-name,
    .nav-item span:not(.nav-icon),
    .token-card span {
        display: none;
    }

    .token-card {
        width: 44px;
        padding: 8px 4px;
        text-align: center;
    }

    .token-card strong {
        font-size: 12px;
    }

    .sidebar {
        align-items: center;
    }

    .nav-item {
        justify-content: center;
        width: 44px;
        padding: 8px;
    }

    .dashboard-hero,
    .metrics-grid,
    .quick-grid,
    .profile-grid,
    .form-grid,
    .export-summary,
    .settings-grid,
    .auth-shell {
        grid-template-columns: 1fr;
    }

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

    .topbar-right {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

@media (max-width: 640px) {
    .app-body {
        overflow: auto;
    }

    .app-shell {
        display: flex;
        min-height: 100vh;
        flex-direction: column;
    }

    .sidebar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        z-index: 10;
        min-height: auto;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        border-top: 1px solid var(--line);
        border-right: 0;
        padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
        overflow-x: auto;
        backdrop-filter: blur(18px);
    }

    .sidebar::-webkit-scrollbar {
        display: none;
    }

    .brand {
        display: none;
    }

    .nav-list,
    .sidebar-footer {
        display: flex;
        align-items: center;
        gap: 6px;
        margin: 0;
    }

    .token-card {
        min-width: 58px;
        width: auto;
        min-height: 44px;
        padding: 7px 8px;
        place-items: center;
    }

    .token-card span {
        display: none;
    }

    .token-card strong {
        font-size: 12px;
    }

    .app-main {
        max-height: none;
        overflow: visible;
        padding-bottom: 78px;
    }

    .content,
    .topbar,
    .hero-panel,
    .data-panel,
    .metric-card,
    .quick-card,
    .auth-panel,
    .auth-visual {
        padding: 16px;
    }

    .content {
        padding: 14px;
        width: 100%;
    }

    .topbar {
        position: static;
        gap: 12px;
        min-height: auto;
    }

    .user-chip-name {
        display: none;
    }

    .topbar h1 {
        font-size: 22px;
    }

    .server-stats {
        justify-content: flex-start;
        gap: 6px;
        width: 100%;
    }

    .server-stats > span {
        padding: 5px 7px;
        font-size: 11px;
    }

    .hero-copy h2 {
        font-size: 30px;
        line-height: 1.08;
    }

    .metric-display {
        padding: 18px;
    }

    .metric-display span {
        font-size: 42px;
    }

    .hero-actions,
    .toolbar-actions,
    .inline-form,
    .admin-create,
    .action-cluster,
    .mini-form {
        width: 100%;
    }

    .btn,
    .icon-btn {
        min-height: 42px;
    }

    .hero-actions .btn,
    .toolbar-actions .btn,
    .inline-form .btn,
    .stack-form .btn,
    .export-part .btn {
        width: 100%;
    }

    .search-form {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .result-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .tab {
        min-height: 40px;
        padding: 0 8px;
        font-size: 13px;
    }

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

    .search-results-table {
        min-width: 0;
    }

    .search-results-table,
    .search-results-table thead,
    .search-results-table tbody,
    .search-results-table tr,
    .search-results-table th,
    .search-results-table td {
        display: block;
        width: 100% !important;
    }

    .search-results-table {
        border-collapse: separate;
        border-spacing: 0;
    }

    .search-results-table thead {
        display: none;
    }

    .search-results-table tbody {
        display: grid;
        gap: 12px;
    }

    .search-results-table tr {
        overflow: hidden;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: rgba(20, 23, 45, 0.5);
    }

    .search-results-table td {
        display: grid;
        grid-template-columns: 104px minmax(0, 1fr);
        gap: 10px;
        align-items: start;
        border-bottom: 1px solid var(--line);
        padding: 11px 12px;
        overflow-wrap: anywhere;
    }

    .search-results-table td:last-child {
        border-bottom: 0;
    }

    .search-results-table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 11px;
        font-weight: 900;
        text-transform: uppercase;
    }

    .search-results-table .empty-state {
        display: block;
        text-align: center !important;
    }

    .search-results-table .empty-state::before {
        content: "";
        display: none;
    }

    .row-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .search-table-wrap {
        overflow-x: visible;
        border: 0;
        background: transparent;
    }

    .admin-create input {
        width: 100%;
        max-width: none;
    }

    .data-toolbar,
    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .export-part {
        align-items: flex-start;
        flex-direction: column;
    }

    .detail-list div {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .profile-stats {
        grid-template-columns: 1fr;
    }

    .auth-shell {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .auth-visual {
        display: none;
    }

    .auth-panel h1 {
        font-size: 28px;
    }

    .auth-body {
        padding: 14px;
    }
}

@media (max-width: 420px) {
    .content {
        padding: 10px;
    }

    .topbar,
    .hero-panel,
    .data-panel,
    .metric-card,
    .quick-card,
    .auth-panel {
        padding: 14px;
    }

    .server-stats > span:nth-child(n + 4) {
        display: none;
    }

    .result-tabs {
        grid-template-columns: 1fr;
    }

    .results-table td {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .nav-item {
        width: 40px;
        min-height: 40px;
    }

    .nav-icon {
        width: 22px;
        height: 22px;
    }
}
