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

:root {
    --color-space-950: #0a0a0f;
    --color-space-900: #0f0f1a;
    --color-space-850: #151522;
    --color-space-800: #1a1a28;
    --color-space-700: #252538;
    --color-space-border: #2a2a3e;
    --color-neon-purple: #a855f7;
    --color-neon-cyan: #22d3ee;
    --color-neon-green: #22c55e;
    --color-neon-yellow: #eab308;
    --color-text-dim: #9ca3af;
    --color-surface-glow: rgba(34, 211, 238, 0.06);
    --app-header-height: 48px;
    --surface-nav: rgba(15, 15, 26, 0.88);
    --surface-nav-border: rgba(255, 255, 255, 0.12);
    --surface-nav-active: rgba(255, 255, 255, 0.1);
    --surface-nav-glow: 0 18px 38px rgba(0, 0, 0, 0.32);
    --surface-nav-accent: var(--color-neon-cyan);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

button {
    font: inherit;
    color: inherit;
    background: transparent;
    border: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--color-space-950);
    color: #e5e7eb;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: none;
}

.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; }

.bg-space-950 { background-color: var(--color-space-950); }
.bg-space-900 { background-color: var(--color-space-900); }
.bg-space-850 { background-color: var(--color-space-850); }
.bg-space-800 { background-color: var(--color-space-800); }
.bg-space-700 { background-color: var(--color-space-700); }
.bg-space-border { background-color: var(--color-space-border); }

.border-space-border { border-color: var(--color-space-border); }

.text-neon-purple { color: var(--color-neon-purple); }
.text-neon-cyan { color: var(--color-neon-cyan); }
.text-neon-green { color: var(--color-neon-green); }
.text-neon-yellow { color: var(--color-neon-yellow); }

.bg-neon-purple { background-color: var(--color-neon-purple); }
.bg-neon-cyan { background-color: var(--color-neon-cyan); }
.bg-neon-green { background-color: var(--color-neon-green); }

.border-neon-purple { border-color: var(--color-neon-purple); }
.border-neon-cyan { border-color: var(--color-neon-cyan); }
.border-neon-green { border-color: var(--color-neon-green); }

.shadow-neon-purple { box-shadow: none; }

.nav-item {
    background: transparent;
    color: #9ca3af;
    border-right: 2px solid transparent;
}

.nav-item.active {
    background: rgba(168, 85, 247, 0.1);
    color: white;
    border-right: 2px solid var(--color-neon-purple);
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.app-header {
    height: var(--app-header-height);
    min-height: var(--app-header-height);
}

.app-brand {
    min-width: 0;
}

.app-brand-mark {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 8px;
    font-size: 0.72rem;
    letter-spacing: 0;
}

.app-brand-title {
    white-space: nowrap;
    font-size: 0.75rem;
    letter-spacing: 0;
}

.app-brand-meta {
    height: 1.15rem;
    padding: 0 0.38rem;
    font-size: 0.62rem;
}

.app-toolbar {
    gap: 0.5rem;
}

.app-connection-status {
    min-height: 1.55rem;
    padding: 0.18rem 0.55rem;
    font-size: 0.68rem;
}

.app-header-action {
    width: 1.8rem;
    min-height: 1.8rem;
    padding: 0;
}

.app-toolbar-divider {
    height: 1rem;
}

.section-header,
.section-heading,
.section-actions {
    min-width: 0;
}

.section-heading {
    flex: 1 1 auto;
}

.section-actions {
    flex: 0 1 auto;
    max-width: 100%;
}

.account-actions,
.logs-count-strip,
.metrics-range-controls {
    flex-wrap: nowrap;
}

.quota-reset-summary {
    display: inline-flex;
    white-space: nowrap;
    line-height: 1.2;
}

.action-label {
    white-space: nowrap;
}

.app-shell {
    height: calc(100vh - var(--app-header-height));
    position: relative;
}

.app-main {
    height: 100%;
    padding-bottom: 5.8rem;
}

.bottom-nav {
    position: fixed;
    left: 50%;
    bottom: max(0.85rem, env(safe-area-inset-bottom));
    z-index: 45;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.18rem;
    width: min(700px, calc(100vw - 1.5rem));
    min-height: 52px;
    padding: 0.28rem;
    border: 1px solid var(--surface-nav-border);
    border-radius: 16px;
    background: var(--surface-nav);
    box-shadow: var(--surface-nav-glow);
    backdrop-filter: blur(22px) saturate(150%);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
    transform: translateX(-50%);
}

.bottom-nav::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: rgba(255, 255, 255, 0.035);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.bottom-nav-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.38rem;
    min-width: 44px;
    min-height: 42px;
    padding: 0 0.68rem;
    border: 1px solid transparent;
    border-radius: 12px;
    color: #9ca3af;
    font-size: 0.78rem;
    font-weight: 650;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.bottom-nav-item::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0.32rem;
    width: 1.15rem;
    height: 2px;
    border-radius: 999px;
    background: var(--surface-nav-accent);
    opacity: 0;
    transform: translateX(-50%) scaleX(0.65);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.bottom-nav-item:hover {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.07);
}

.bottom-nav-item.active {
    color: white;
    background: var(--surface-nav-active);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.13), 0 8px 20px rgba(0, 0, 0, 0.14);
}

.bottom-nav-item.active::after {
    opacity: 1;
    transform: translateX(-50%) scaleX(1);
}

.bottom-nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.bottom-nav-label {
    display: none;
    white-space: nowrap;
}

.bottom-nav-badge {
    min-width: 1.4rem;
    max-width: 3.4rem;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0.1rem 0.35rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.08);
    color: currentColor;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.65rem;
    line-height: 1.1;
    text-align: center;
}

.quick-test-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    min-height: 1.65rem;
    margin-top: 0.75rem;
    color: #9ca3af;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.72rem;
}

.quick-test-meta span:not(.quick-test-dot) {
    display: inline-flex;
    align-items: center;
    min-height: 1.25rem;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.quick-test-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 999px;
    background: #71717a;
}

.quick-test-dot.is-running {
    background: var(--color-neon-cyan);
    animation: pulse 1.15s ease-in-out infinite;
}

.quick-test-dot.is-success { background: var(--color-neon-green); }
.quick-test-dot.is-error { background: #ef4444; }

.logs-view {
    height: 100%;
}

.logs-count-strip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #9ca3af;
    font-size: 0.72rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.logs-count-strip span,
.log-stream-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 1.55rem;
    padding: 0.15rem 0.55rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
}

.log-stream-status {
    color: var(--color-neon-cyan);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.72rem;
    font-weight: 650;
}

.log-stream-dot {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 999px;
    background: currentColor;
}

.log-stream-status.is-connected .log-stream-dot {
    animation: pulse 1.4s ease-in-out infinite;
}

.log-stream-status.is-disconnected {
    color: #eab308;
}

.logs-shell {
    flex: 1 1 auto;
    overflow: hidden;
}

.logs-toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem;
    border-bottom: 1px solid rgba(42, 42, 62, 0.55);
    background: rgba(15, 15, 26, 0.72);
}

.logs-search {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
    height: 34px;
    padding: 0 0.65rem;
    border: 1px solid var(--color-space-border);
    border-radius: 8px;
    color: #9ca3af;
    background: rgba(10, 10, 15, 0.58);
}

.logs-search-input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #e5e7eb;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.76rem;
}

.logs-filter-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
    overflow-x: auto;
}

.logs-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    height: 30px;
    padding: 0 0.55rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    color: #9ca3af;
    cursor: pointer;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.68rem;
    font-weight: 700;
    opacity: 0.72;
    user-select: none;
    white-space: nowrap;
}

.logs-filter-chip input {
    width: 0;
    height: 0;
    opacity: 0;
    position: absolute;
}

.logs-filter-chip.active {
    opacity: 1;
    background: rgba(255, 255, 255, 0.07);
}

.logs-filter-chip.is-info.active { color: #60a5fa; border-color: rgba(96, 165, 250, 0.35); }
.logs-filter-chip.is-success.active { color: #34d399; border-color: rgba(52, 211, 153, 0.35); }
.logs-filter-chip.is-warn.active { color: #f59e0b; border-color: rgba(245, 158, 11, 0.35); }
.logs-filter-chip.is-error.active { color: #f87171; border-color: rgba(248, 113, 113, 0.35); }
.logs-filter-chip.is-debug.active { color: #c084fc; border-color: rgba(192, 132, 252, 0.35); }

.logs-filter-count {
    min-width: 1.05rem;
    text-align: center;
    color: currentColor;
    opacity: 0.72;
}

.logs-clear-button {
    white-space: nowrap;
}

.logs-grid {
    flex: 1 1 auto;
    overflow: auto;
    background: rgba(10, 10, 15, 0.9);
    color: #d4d4d8;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.72rem;
}

.logs-grid-head,
.logs-row {
    display: grid;
    grid-template-columns: 6.5rem 5.6rem minmax(14rem, 1fr) minmax(13rem, 0.7fr);
    gap: 0.75rem;
    align-items: start;
}

.logs-grid-head {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 0.6rem 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 15, 26, 0.96);
    color: #71717a;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
}

.logs-row {
    min-height: 34px;
    padding: 0.48rem 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.logs-row:hover {
    background: rgba(255, 255, 255, 0.04);
}

.logs-time {
    color: #71717a;
    white-space: nowrap;
}

.logs-level {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: max-content;
    min-width: 4.6rem;
    height: 1.35rem;
    padding: 0 0.4rem;
    border-radius: 5px;
    border: 1px solid currentColor;
    font-size: 0.64rem;
    font-weight: 800;
    line-height: 1;
}

.logs-row.is-info .logs-level { color: #60a5fa; background: rgba(96, 165, 250, 0.1); }
.logs-row.is-success .logs-level { color: #34d399; background: rgba(52, 211, 153, 0.1); }
.logs-row.is-warn .logs-level { color: #f59e0b; background: rgba(245, 158, 11, 0.1); }
.logs-row.is-error .logs-level { color: #f87171; background: rgba(248, 113, 113, 0.1); }
.logs-row.is-debug .logs-level { color: #c084fc; background: rgba(192, 132, 252, 0.1); }

.logs-message {
    min-width: 0;
    overflow-wrap: anywhere;
    color: #e5e7eb;
}

.logs-details {
    min-width: 0;
}

.logs-detail-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.logs-detail-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0.1rem 0.38rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 5px;
    color: #a1a1aa;
    background: rgba(255, 255, 255, 0.045);
    white-space: nowrap;
}

.logs-detail-pill strong {
    color: #d4d4d8;
    font-weight: 700;
}

.logs-empty {
    padding: 2rem;
    color: #71717a;
    text-align: center;
}

.view-container {
    padding: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

@media (min-width: 1024px) {
    .view-container { padding: 2rem; }
}

.view-card {
    background: var(--color-space-900);
    border: 1px solid rgba(42, 42, 62, 0.5);
    border-radius: 0.75rem;
    padding: 1.5rem;
    backdrop-filter: blur(12px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 14px 36px rgba(0, 0, 0, 0.36);
}

.stat {
    position: relative;
}

.stat-value {
    line-height: 1.2;
}

.stat-title {
    letter-spacing: 0.05em;
}

.stat-desc {
    letter-spacing: 0.02em;
}

.alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 0.5rem;
}

.alert-info { background: rgba(34, 211, 238, 0.1); border: 1px solid rgba(34, 211, 238, 0.2); }
.alert-success { background: rgba(34, 197, 94, 0.1); border: 1px solid rgba(34, 197, 94, 0.2); }
.alert-error { background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.2); }
.alert-warning { background: rgba(234, 179, 8, 0.1); border: 1px solid rgba(234, 179, 8, 0.2); }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
    border-radius: 0.375rem;
    transition: all 0.15s ease;
    cursor: pointer;
    border: 1px solid transparent;
    background-color: transparent;
    color: #9ca3af;
}

.btn-xs { padding: 0.375rem 0.75rem; font-size: 0.75rem; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; }
.btn-md { padding: 0.625rem 1.25rem; font-size: 0.875rem; }

.btn-ghost {
    background: transparent;
    color: #9ca3af;
    border-color: transparent;
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.05); color: white; }

.btn-outline {
    background: transparent;
    color: #9ca3af;
    border-color: rgba(42, 42, 62, 0.8);
}
.btn-outline:hover { background: rgba(255, 255, 255, 0.05); color: white; border-color: rgba(42, 42, 62, 1); }

.btn-primary {
    background: var(--color-neon-purple);
    color: white;
    border-color: var(--color-neon-purple);
}
.btn-primary:hover { background: #9333ea; border-color: #9333ea; }

.btn-success {
    background: var(--color-neon-green);
    color: white;
    border-color: var(--color-neon-green);
}
.btn-success:hover { background: #16a34a; border-color: #16a34a; }

.btn-warning {
    background: var(--color-neon-yellow);
    color: black;
    border-color: var(--color-neon-yellow);
}
.btn-warning:hover { background: #ca8a04; border-color: #ca8a04; }

.btn-danger {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}
.btn-danger:hover { background: #dc2626; border-color: #dc2626; }

.btn-square { padding: 0.5rem; }

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: var(--color-space-800);
    border: 1px solid var(--color-space-border);
    border-radius: 0.375rem;
    color: white;
    font-size: 0.875rem;
    transition: border-color 0.15s ease;
}

.input:focus {
    outline: none;
    border-color: var(--color-neon-purple);
}

.input-search-sm {
    padding: 0.375rem 0.75rem 0.375rem 2.25rem;
    background: var(--color-space-800);
    border: 1px solid var(--color-space-border);
    border-radius: 0.375rem;
    color: white;
    font-size: 0.75rem;
}

.input-search-sm:focus {
    outline: none;
    border-color: var(--color-neon-purple);
}

.input-search-sm::placeholder {
    color: #6b7280;
}

select {
    background: var(--color-space-800);
    border: 1px solid var(--color-space-border);
    border-radius: 0.375rem;
    color: white;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

select:focus {
    outline: none;
    border-color: var(--color-neon-purple);
}

.model-mapping-list {
    display: grid;
    gap: 0.75rem;
}

.model-mapping-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(22rem, 32rem);
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid rgba(36, 41, 47, 0.16);
    border-radius: 0.625rem;
    background: rgba(255, 255, 255, 0.42);
}

.model-mapping-copy {
    min-width: 0;
}

.model-mapping-controls {
    display: grid;
    grid-template-columns: minmax(13rem, 1fr) minmax(9rem, 0.72fr);
    gap: 0.75rem;
}

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

.model-mapping-field > span {
    color: var(--text-faint);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.68rem;
}

.model-mapping-select {
    width: 100%;
    min-height: 2.25rem;
    background-color: rgba(255, 255, 255, 0.82);
    color: var(--text-strong);
    color-scheme: light;
}

@media (max-width: 700px) {
    .model-mapping-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .model-mapping-controls {
        grid-template-columns: 1fr;
    }
}

dialog {
    background: transparent;
    color: #e5e7eb;
}

dialog::backdrop {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal-box {
    background: var(--color-space-900);
    border: 1px solid var(--color-space-border);
    border-radius: 0.75rem;
    color: #e5e7eb;
}

.modal-backdrop {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(42, 42, 62, 0.6);
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(42, 42, 62, 0.9);
}

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

th { text-align: left; }

table tr {
    background: transparent;
}

table tr:hover {
    background: rgba(34, 211, 238, 0.04);
}

table td {
    background: transparent;
}

table button {
    background: transparent;
}

table .btn-outline {
    background: transparent;
    border-color: rgba(42, 42, 62, 0.8);
    color: #9ca3af;
}

table .btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.transition-all { transition: all 0.15s ease; }
.transition-colors { transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease; }
.transition-transform { transition: transform 0.15s ease; }

.duration-300 { transition-duration: 300ms; }
.duration-200 { transition-duration: 200ms; }

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.flex { display: flex; }
.inline-flex { display: inline-flex; }
.inline-block { display: inline-block; }
.block { display: block; }
.hidden { display: none; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
.flex-shrink-0 { flex-shrink: 0; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: 0.25rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }

.top-3 { top: 0.75rem; }
.top-2 { top: 0.5rem; }
.top-4 { top: 1rem; }
.top-14 { top: 3.5rem; }
.right-3 { right: 0.75rem; }
.right-4 { right: 1rem; }
.right-0 { right: 0; }
.left-0 { left: 0; }
.left-3 { left: 0.75rem; }
.bottom-0 { bottom: 0; }

.z-40 { z-index: 40; }
.z-50 { z-index: 50; }
.z-\[100\] { z-index: 100; }

.w-1 { width: 0.25rem; }
.w-1\.5 { width: 0.375rem; }
.w-2 { width: 0.5rem; }
.w-3 { width: 0.75rem; }
.w-3\.5 { width: 0.875rem; }
.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-6 { width: 1.5rem; }
.w-8 { width: 2rem; }
.w-12 { width: 3rem; }
.w-14 { width: 3.5rem; }
.w-16 { width: 4rem; }
.w-20 { width: 5rem; }
.w-24 { width: 6rem; }
.w-32 { width: 8rem; }
.w-40 { width: 10rem; }
.w-48 { width: 12rem; }
.w-64 { width: 16rem; }
.w-full { width: 100%; }
.w-px { width: 1px; }

.h-1 { height: 0.25rem; }
.h-1\.5 { height: 0.375rem; }
.h-2 { height: 0.5rem; }
.h-2\.5 { height: 0.625rem; }
.h-3 { height: 0.75rem; }
.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-6 { height: 1.5rem; }
.h-8 { height: 2rem; }
.h-12 { height: 3rem; }
.h-11 { height: 2.75rem; }
.h-14 { height: 3.5rem; }
.h-full { height: 100%; }
.h-auto { height: auto; }
.h-\[calc\(100vh-56px\)\] { height: calc(100vh - 56px); }

.min-w-0 { min-width: 0; }
.min-w-\[860px\] { min-width: 860px; }
.min-w-\[200px\] { min-width: 200px; }
.min-h-screen { min-height: 100vh; }

.max-w-lg { max-width: 32rem; }
.max-w-md { max-width: 28rem; }
.max-w-sm { max-width: 24rem; }
.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-\[320px\] { max-width: 320px; }
.max-w-\[60vh\] { max-height: 60vh; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.pt-3 { padding-top: 0.75rem; }
.pt-6 { padding-top: 1.5rem; }
.pb-4 { padding-bottom: 1rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-1\.5 { padding-left: 0.375rem; padding-right: 0.375rem; }
.px-2\.5 { padding-left: 0.625rem; padding-right: 0.625rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.pl-6 { padding-left: 1.5rem; }
.pl-9 { padding-left: 2.25rem; }
.pr-6 { padding-right: 1.5rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-auto { margin-top: auto; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.ml-1 { margin-left: 0.25rem; }
.ml-auto { margin-left: auto; }
.mr-2 { margin-right: 0.5rem; }

.text-\[10px\] { font-size: 0.625rem; }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.uppercase { text-transform: uppercase; }
.capitalize { text-transform: capitalize; }

.tracking-tight { letter-spacing: -0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-widest { letter-spacing: 0.1em; }
.leading-relaxed { line-height: 1.625; }
.leading-tight { line-height: 1.25; }
.whitespace-nowrap { white-space: nowrap; }
.whitespace-pre-wrap { white-space: pre-wrap; }

.text-white { color: white; }
.text-gray-200 { color: #e5e7eb; }
.text-gray-300 { color: #d1d5db; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-gray-700\/40 { color: rgba(55, 65, 81, 0.4); }

.text-red-400 { color: #f87171; }
.text-red-300 { color: #fca5a5; }
.text-red-500 { color: #ef4444; }
.text-yellow-400 { color: #facc15; }
.text-yellow-500 { color: #eab308; }
.text-blue-400 { color: #60a5fa; }
.text-blue-500 { color: #3b82f6; }

.bg-white\/5 { background-color: rgba(255, 255, 255, 0.05); }
.bg-white\/10 { background-color: rgba(255, 255, 255, 0.1); }
.bg-black\/50 { background-color: rgba(0, 0, 0, 0.5); }
.bg-black\/70 { background-color: rgba(0, 0, 0, 0.7); }
.bg-space-900\/90 { background-color: rgba(15, 15, 26, 0.9); }
.bg-gray-500 { background-color: #6b7280; }
.bg-neon-green\/10 { background-color: rgba(34, 197, 94, 0.1); }
.bg-red-600 { background-color: #dc2626; }

.bg-gradient-to-br { background-image: none; }
.from-neon-purple { --tw-gradient-from: var(--color-neon-purple); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, transparent); }
.to-blue-600 { --tw-gradient-to: #2563eb; }

.border { border-width: 1px; }
.border-t { border-top-width: 1px; }
.border-b { border-bottom-width: 1px; }
.border-r { border-right-width: 1px; }
.border-2 { border-width: 2px; }
.border-0 { border-width: 0; }
.border-none { border: none; }
.border-space-border\/20 { border-color: rgba(42, 42, 62, 0.2); }
.border-space-border\/30 { border-color: rgba(42, 42, 62, 0.3); }
.border-space-border\/40 { border-color: rgba(42, 42, 62, 0.4); }
.border-space-border\/50 { border-color: rgba(42, 42, 62, 0.5); }
.border-space-border\/60 { border-color: rgba(42, 42, 62, 0.6); }
.border-space-border\/80 { border-color: rgba(42, 42, 62, 0.8); }
.border-red-500\/20 { border-color: rgba(239, 68, 68, 0.2); }
.border-red-500\/30 { border-color: rgba(239, 68, 68, 0.3); }
.border-red-500\/50 { border-color: rgba(239, 68, 68, 0.5); }
.border-yellow-500\/20 { border-color: rgba(234, 179, 8, 0.2); }
.border-yellow-500\/30 { border-color: rgba(234, 179, 8, 0.3); }
.border-yellow-500\/50 { border-color: rgba(234, 179, 8, 0.5); }
.border-blue-500\/30 { border-color: rgba(59, 130, 246, 0.3); }
.border-neon-purple\/20 { border-color: rgba(168, 85, 247, 0.2); }
.border-neon-purple\/30 { border-color: rgba(168, 85, 247, 0.3); }
.border-neon-purple\/50 { border-color: rgba(168, 85, 247, 0.5); }
.border-neon-cyan\/20 { border-color: rgba(34, 211, 238, 0.2); }
.border-neon-green\/20 { border-color: rgba(34, 197, 94, 0.2); }

.rounded { border-radius: 0.25rem; }
.rounded-full { border-radius: 9999px; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }

.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }
.shadow-sm { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }
.shadow-none { box-shadow: none; }

.backdrop-blur-sm { backdrop-filter: blur(4px); }
.backdrop-blur-md { backdrop-filter: blur(12px); }

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }

.transform {
    transform:
        translateX(var(--tw-translate-x, 0))
        translateY(var(--tw-translate-y, 0))
        rotate(var(--tw-rotate, 0))
        skewX(var(--tw-skew-x, 0))
        skewY(var(--tw-skew-y, 0))
        scaleX(var(--tw-scale-x, 1))
        scaleY(var(--tw-scale-y, 1));
}
.-translate-x-full { --tw-translate-x: -100%; }
.translate-x-0 { --tw-translate-x: 0; }
.translate-x-4 { --tw-translate-x: 1rem; }
.translate-x-8 { --tw-translate-x: 2rem; }
.scale-95 { --tw-scale-x: 0.95; --tw-scale-y: 0.95; }
.scale-100 { --tw-scale-x: 1; --tw-scale-y: 1; }
.rotate-180 { --tw-rotate: 180deg; }

.cursor-pointer { cursor: pointer; }
.cursor-help { cursor: help; }
.pointer-events-none { pointer-events: none; }
.pointer-events-auto { pointer-events: auto; }

.opacity-0 { opacity: 0; }
.opacity-50 { opacity: 0.5; }
.opacity-60 { opacity: 0.6; }
.opacity-75 { opacity: 0.75; }
.opacity-100 { opacity: 1; }

.group:hover .group-hover\:text-white { color: white; }
.group:hover .group-hover\:text-cyan-400 { color: #22d3ee; }
.group:hover .group-hover\:text-cyan-400\/70 { color: rgba(34, 211, 238, 0.7); }
.group:hover .group-hover\:text-green-400 { color: #4ade80; }
.group:hover .group-hover\:text-green-400\/70 { color: rgba(74, 222, 128, 0.7); }
.group:hover .group-hover\:text-red-400 { color: #f87171; }
.group:hover .group-hover\:text-yellow-400 { color: #facc15; }
.group:hover .group-hover\:text-yellow-400\/70 { color: rgba(250, 204, 21, 0.7); }
.group:hover .group-hover\:text-purple-400 { color: #c084fc; }
.group:hover .group-hover\:text-purple-400\/70 { color: rgba(192, 132, 252, 0.7); }
.group:hover .group-hover\:opacity-100 { opacity: 1; }

.hover\:bg-white\/5:hover { background-color: rgba(255, 255, 255, 0.05); }
.hover\:bg-white\/10:hover { background-color: rgba(255, 255, 255, 0.1); }
.hover\:bg-red-500\/10:hover { background-color: rgba(239, 68, 68, 0.1); }
.hover\:bg-red-500\/20:hover { background-color: rgba(239, 68, 68, 0.2); }
.hover\:bg-purple-600:hover { background-color: #9333ea; }
.hover\:text-white:hover { color: white; }
.hover\:text-red-400:hover { color: #f87171; }
.hover\:border-cyan-500\/30:hover { border-color: rgba(34, 211, 238, 0.3); }
.hover\:border-green-500\/30:hover { border-color: rgba(34, 197, 94, 0.3); }
.hover\:border-yellow-500\/30:hover { border-color: rgba(234, 179, 8, 0.3); }
.hover\:border-red-500\/30:hover { border-color: rgba(239, 68, 68, 0.3); }
.hover\:border-purple-500\/30:hover { border-color: rgba(168, 85, 247, 0.3); }
.hover\:bg-cyan-500\/5:hover { background-color: rgba(34, 211, 238, 0.05); }
.hover\:bg-green-500\/5:hover { background-color: rgba(34, 197, 94, 0.05); }
.hover\:bg-yellow-500\/5:hover { background-color: rgba(234, 179, 8, 0.05); }
.hover\:bg-red-500\/5:hover { background-color: rgba(239, 68, 68, 0.05); }
.hover\:bg-purple-500\/5:hover { background-color: rgba(168, 85, 247, 0.05); }

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

.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

@media (min-width: 640px) {
    .sm\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .sm\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .sm\:col-span-1 { grid-column: span 1 / span 1; }
    .sm\:w-auto { width: auto; }
    .sm\:text-center { text-align: center; }
    .sm\:justify-center { justify-content: center; }
    .sm\:gap-2 { gap: 0.5rem; }
    .sm\:gap-3 { gap: 0.75rem; }
    .sm\:flex-none { flex: none; }
    .sm\:flex-nowrap { flex-wrap: nowrap; }
    .sm\:ml-1 { margin-left: 0.25rem; }
}

@media (min-width: 1024px) {
    .lg\:static { position: static; }
    .lg\:flex-shrink-0 { flex-shrink: 0; }
    .lg\:h-auto { height: auto; }
    .lg\:shadow-none { box-shadow: none; }
    .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lg\:col-span-1 { grid-column: span 1 / span 1; }
    .lg\:gap-3 { gap: 0.75rem; }
    .lg\:gap-4 { gap: 1rem; }
    .lg\:p-4 { padding: 1rem; }
    .lg\:px-4 { padding-left: 1rem; padding-right: 1rem; }
    .lg\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
    .lg\:py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
    .lg\:text-3xl { font-size: 1.875rem; }
    .lg\:text-xs { font-size: 0.75rem; }
    .lg\:block { display: block; }
    .lg\:hidden { display: none; }
    .lg\:flex-nowrap { flex-wrap: nowrap; }
    .lg\:border { border-width: 1px; }
    .lg\:rounded-md { border-radius: 0.375rem; }
    .lg\:bg-transparent { background-color: transparent; }
    .lg\:border-transparent { border-color: transparent; }
    .lg\:w-64 { width: 16rem; }
    .lg\:w-auto { width: auto; }
    .lg\:justify-end { justify-content: flex-end; }
    .lg\:bg-space-800 { background-color: var(--color-space-800); }
    .lg\:border-neon-purple\/30 { border-color: rgba(168, 85, 247, 0.3); }
    .lg\:border-space-border\/60 { border-color: rgba(42, 42, 62, 0.6); }
    .lg\:border-space-border\/30 { border-color: rgba(42, 42, 62, 0.3); }
    .lg\:whitespace-nowrap { white-space: nowrap; }
    .lg\:flex-shrink-0 { flex-shrink: 0; }
    .lg\:hover\:bg-space-800:hover { background-color: var(--color-space-800); }
    .lg\:hover\:border-neon-purple\/30:hover { border-color: rgba(168, 85, 247, 0.3); }
    .lg\:hover\:shadow-lg:hover { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }
    .lg\:hover\:shadow-neon-purple\/10:hover { box-shadow: 0 0 15px rgba(168, 85, 247, 0.1); }
}

@media (min-width: 1280px) {
    .xl\:p-4 { padding: 1rem; }
    .xl\:h-16 { height: 4rem; }
    .xl\:w-16 { width: 4rem; }
}

[x-transition] { transition: opacity 0.2s ease, transform 0.2s ease; }

.fade-enter-active { transition: opacity 0.3s ease; }
.fade-enter-from { opacity: 0; }

.bg-space-800\/50 { background-color: rgba(26, 26, 40, 0.5); }
.bg-space-800\/80 { background-color: rgba(26, 26, 40, 0.8); }
.bg-space-900\/40 { background-color: rgba(15, 15, 26, 0.4); }
.bg-space-900\/50 { background-color: rgba(15, 15, 26, 0.5); }
.bg-space-900\/60 { background-color: rgba(15, 15, 26, 0.6); }

.bg-space-900\/20 { background-color: rgba(15, 15, 26, 0.2); }
.bg-neon-purple\/10 { background-color: rgba(168, 85, 247, 0.1); }
.bg-neon-purple\/20 { background-color: rgba(168, 85, 247, 0.2); }

.bg-yellow-500\/10 { background-color: rgba(234, 179, 8, 0.1); }
.bg-blue-500\/10 { background-color: rgba(59, 130, 246, 0.1); }
.bg-gray-500\/10 { background-color: rgba(107, 114, 128, 0.1); }
.bg-red-500\/10 { background-color: rgba(239, 68, 68, 0.1); }

.border-gray-500\/30 { border-color: rgba(107, 114, 128, 0.3); }

.text-cyan-400 { color: #22d3ee; }
.text-green-400 { color: #4ade80; }
.text-purple-400 { color: #c084fc; }
.text-cyan-400\/60 { color: rgba(34, 211, 238, 0.6); }
.text-green-400\/60 { color: rgba(74, 222, 128, 0.6); }
.text-yellow-400\/60 { color: rgba(250, 204, 21, 0.6); }
.text-purple-400\/60 { color: rgba(192, 132, 252, 0.6); }

.hover\:text-cyan-400:hover { color: #22d3ee; }
.hover\:text-green-400:hover { color: #4ade80; }
.hover\:text-purple-400:hover { color: #c084fc; }

.hover\:underline:hover { text-decoration: underline; }

.\!p-0 { padding: 0 !important; }

.shadow-neon-purple\/20 {
    box-shadow: none;
}

.shadow-\[0_0_15px_rgba\(168\,85\,247\,0\.4\)\] {
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.4);
}

.shadow-\[0_0_8px_rgba\(34\,197\,94\,0\.6\)\] {
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}

.bg-gray-700 {
    background-color: rgba(55, 65, 81, 0.9);
}

.h-0 {
    height: 0;
}

.w-0 {
    width: 0;
}

.animate-ping {
    animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Native macOS glass treatment */
:root {
    --color-space-950: #eceef1;
    --color-space-900: rgba(248, 249, 251, 0.72);
    --color-space-850: rgba(244, 246, 248, 0.68);
    --color-space-800: rgba(255, 255, 255, 0.72);
    --color-space-700: rgba(232, 236, 240, 0.72);
    --color-space-border: rgba(36, 41, 47, 0.12);
    --color-neon-purple: #0a84ff;
    --color-neon-cyan: #007aff;
    --color-neon-green: #1f8f4d;
    --color-neon-yellow: #a56800;
    --color-text-dim: #6a717c;
    --glass-surface: rgba(255, 255, 255, 0.72);
    --glass-sidebar: rgba(246, 247, 249, 0.68);
    --glass-toolbar: rgba(249, 250, 252, 0.82);
    --glass-line: rgba(36, 41, 47, 0.12);
    --glass-line-strong: rgba(36, 41, 47, 0.18);
    --glass-shadow: 0 18px 42px rgba(31, 35, 40, 0.1);
    --glass-radius: 14px;
    --text-strong: #171a20;
    --text-body: #303641;
    --text-muted: #68707d;
    --text-faint: #8b929c;
    --accent: #0a84ff;
    --accent-pressed: #006fd6;
    --success: #1f8f4d;
    --warning: #a56800;
    --danger: #d70015;
    --app-header-height: 48px;
    --surface-nav: rgba(248, 249, 251, 0.86);
    --surface-nav-border: rgba(36, 41, 47, 0.12);
    --surface-nav-active: rgba(255, 255, 255, 0.9);
    --surface-nav-glow: 0 14px 32px rgba(31, 35, 40, 0.12);
    --surface-nav-accent: var(--accent);
}

body {
    background-color: #eceef1;
    background-image: none;
    color: var(--text-body);
}

body::before,
body::after {
    content: none;
}

.tracking-tight,
.tracking-wider,
.tracking-widest {
    letter-spacing: 0;
}

.bg-gradient-to-br {
    background-image: none;
}

.bg-space-950 { background-color: #eceef1; }
.bg-space-900 { background-color: var(--glass-sidebar); }
.bg-space-850 { background-color: rgba(244, 246, 248, 0.72); }
.bg-space-800 { background-color: rgba(255, 255, 255, 0.78); }
.bg-space-700 { background-color: rgba(232, 236, 240, 0.78); }
.bg-space-900\/20,
.bg-space-900\/40,
.bg-space-900\/50,
.bg-space-900\/60,
.bg-space-900\/90,
.bg-space-800\/50,
.bg-space-800\/80 {
    background-color: rgba(255, 255, 255, 0.58);
}

.border-space-border,
.border-space-border\/20,
.border-space-border\/30,
.border-space-border\/40,
.border-space-border\/50,
.border-space-border\/60,
.border-space-border\/80 {
    border-color: var(--glass-line);
}

.text-white,
.text-gray-200 {
    color: var(--text-strong);
}

.text-gray-300 { color: var(--text-body); }
.text-gray-400 { color: var(--text-muted); }
.text-gray-500 { color: var(--text-faint); }
.text-gray-600 { color: #a4aab3; }
.text-gray-700,
.text-gray-700\/40 { color: #b5bbc3; }

.text-neon-purple,
.text-neon-cyan,
.text-blue-400,
.text-blue-500,
.text-cyan-400,
.text-cyan-400\/60,
.text-purple-400,
.text-purple-400\/60 {
    color: var(--accent);
}

.text-neon-green,
.text-green-400,
.text-green-400\/60 {
    color: var(--success);
}

.text-neon-yellow,
.text-yellow-400,
.text-yellow-400\/60,
.text-yellow-500 {
    color: var(--warning);
}

.text-red-300,
.text-red-400,
.text-red-500 {
    color: var(--danger);
}

.h-14.border-b {
    height: var(--app-header-height);
    min-height: var(--app-header-height);
    margin: 0;
    border: 0;
    border-bottom: 1px solid var(--glass-line);
    border-radius: 0;
    background-color: rgba(249, 250, 252, 0.9);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7), 0 8px 24px rgba(31, 35, 40, 0.035);
    backdrop-filter: blur(20px) saturate(155%);
    -webkit-backdrop-filter: blur(20px) saturate(155%);
}

.h-14.border-b .app-brand-mark {
    width: 1.65rem;
    height: 1.65rem;
    background-color: #1f2328;
    background-image: none;
    border-radius: 7px;
    box-shadow: none;
    color: white;
}

.app-brand {
    min-width: 0;
}

.app-brand-copy {
    min-width: 0;
    line-height: 1;
}

.app-brand-title {
    white-space: nowrap;
    font-size: 0.72rem;
    font-weight: 750;
}

.app-brand-meta {
    display: inline-flex;
    align-items: center;
    height: 18px;
    padding: 0 0.42rem;
    border: 1px solid var(--glass-line);
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.58);
    color: var(--text-muted);
    font-size: 0.62rem;
}

.app-toolbar {
    gap: 0.5rem;
}

.app-toolbar .btn-square {
    width: 28px;
    min-height: 28px;
    padding: 0;
}

.app-connection-status {
    min-height: 26px;
    padding: 0.18rem 0.55rem;
    border-radius: 7px;
    font-size: 0.68rem;
}

.app-toolbar-divider {
    height: 14px;
    opacity: 0.72;
}

.h-14.border-b a {
    color: var(--text-muted);
}

.h-14.border-b a:hover {
    color: var(--accent);
}

.h-\[calc\(100vh-56px\)\] {
    height: calc(100vh - var(--app-header-height));
}

.app-shell {
    height: calc(100vh - var(--app-header-height));
}

.bottom-nav {
    color: var(--text-body);
    box-shadow: var(--surface-nav-glow), inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.bottom-nav::before {
    background: rgba(255, 255, 255, 0.36);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.62);
}

.bottom-nav-item {
    color: var(--text-muted);
}

.bottom-nav-item:hover {
    color: var(--text-strong);
    background: rgba(36, 41, 47, 0.045);
}

.bottom-nav-item.active {
    color: var(--text-strong);
    border-color: rgba(36, 41, 47, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96), 0 3px 10px rgba(31, 35, 40, 0.08);
}

.bottom-nav-item.active svg {
    color: var(--accent);
}

.bottom-nav-badge,
.quick-test-meta span:not(.quick-test-dot),
.logs-count-strip span,
.log-stream-status {
    border-color: var(--glass-line);
    background: rgba(255, 255, 255, 0.66);
}

.bottom-nav-badge {
    color: var(--text-muted);
}

.bottom-nav-item.active .bottom-nav-badge {
    color: var(--accent);
    border-color: rgba(10, 132, 255, 0.14);
    background: rgba(10, 132, 255, 0.06);
}

.quick-test-meta {
    color: var(--text-muted);
}

.fixed.top-14.bottom-0.left-0 {
    top: 60px;
    bottom: 0;
    left: 0;
    width: 268px;
    border: 0;
    border-right: 1px solid var(--glass-line);
    border-radius: 0;
    background-color: var(--glass-sidebar);
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.58);
    backdrop-filter: blur(28px) saturate(150%);
    -webkit-backdrop-filter: blur(28px) saturate(150%);
}

.fixed.top-14.bottom-0.left-0 .w-64 {
    width: 100%;
}

.fixed.top-14.bottom-0.left-0 .pt-6 {
    padding-top: 1.15rem;
}

.flex-1.overflow-auto {
    margin: 0;
    border: 0;
    border-radius: 0;
    background-color: transparent;
    box-shadow: none;
}

.view-container {
    max-width: 1240px;
    padding: 1.75rem 2.25rem 2.75rem;
}

.view-container > .flex.items-center.justify-between.gap-4.mb-6 {
    align-items: flex-start;
    margin-bottom: 1.4rem;
}

.view-container h1 {
    font-size: 1.65rem;
    line-height: 1.15;
    font-weight: 650;
}

.view-container > .flex .rounded-full,
.view-container > .flex .rounded.bg-space-800\/80 {
    background-color: rgba(255, 255, 255, 0.68);
    border: 1px solid var(--glass-line);
    box-shadow: none;
}

.nav-item {
    margin: 0 0.7rem;
    border: 1px solid transparent;
    border-radius: 9px;
    color: var(--text-muted);
    min-height: 40px;
}

.nav-item svg {
    color: #69707a;
}

.nav-item.active {
    background-color: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(255, 255, 255, 0.86);
    color: var(--text-strong);
    box-shadow: 0 1px 2px rgba(31, 35, 40, 0.06);
}

.nav-item.active svg {
    color: var(--accent);
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.5);
    color: var(--text-strong);
}

.nav-item:focus,
.btn:focus {
    outline: none;
}

.nav-item:focus-visible,
.btn:focus-visible,
.input:focus,
.input-search-sm:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.2);
}

.grid.grid-cols-2.sm\:grid-cols-4 {
    gap: 1.2rem;
    margin-bottom: 1.35rem;
}

.dashboard-test-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.3rem;
    margin-bottom: 1.3rem;
}

.dashboard-test-grid + .view-card {
    margin-top: 0;
}

.view-card,
.stat,
.modal-box,
.relative.bg-space-900 {
    background-color: var(--glass-surface);
    background-image: none;
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: var(--glass-radius);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(24px) saturate(145%);
    -webkit-backdrop-filter: blur(24px) saturate(145%);
}

.view-card {
    position: relative;
    overflow: hidden;
    padding: 1.4rem;
}

.stat {
    min-height: 118px;
    overflow: hidden;
    padding: 1.25rem;
}

.stat::before,
.view-card::before {
    content: none;
}

.stat:hover,
.view-card:hover {
    border-color: rgba(255, 255, 255, 0.92);
    box-shadow: 0 20px 46px rgba(31, 35, 40, 0.13);
}

.stat .absolute {
    color: #9ca3ad;
}

.stat-value {
    color: var(--text-strong);
    font-size: 1.85rem;
    line-height: 1.05;
}

.stat-title {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 650;
}

.stat-desc {
    color: var(--text-faint);
    font-size: 0.72rem;
}

.input,
.input-search-sm,
select {
    background-color: rgba(255, 255, 255, 0.78);
    border: 1px solid var(--glass-line);
    border-radius: 8px;
    color: var(--text-strong);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.view-card .flex.gap-3 {
    gap: 0.95rem;
}

.input::placeholder,
.input-search-sm::placeholder {
    color: #9299a3;
}

.input:focus,
.input-search-sm:focus,
select:focus {
    border-color: rgba(10, 132, 255, 0.48);
}

.btn {
    min-height: 32px;
    border-radius: 8px;
    border-color: var(--glass-line);
    background-color: rgba(255, 255, 255, 0.7);
    background-image: none;
    color: var(--text-body);
    box-shadow: 0 1px 1px rgba(31, 35, 40, 0.05);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
}

.btn:hover {
    color: var(--text-strong);
    border-color: var(--glass-line-strong);
    background-color: rgba(255, 255, 255, 0.9);
    transform: none;
}

.hover\:text-white:hover,
.group:hover .group-hover\:text-white {
    color: var(--text-strong);
}

.btn-outline,
table .btn-outline {
    background-color: rgba(255, 255, 255, 0.58);
    border-color: var(--glass-line);
    color: var(--text-body);
}

.btn-ghost,
table .btn-ghost {
    background-color: transparent;
    border-color: transparent;
    color: var(--text-muted);
    box-shadow: none;
}

.btn-ghost:hover,
table .btn-ghost:hover {
    background-color: rgba(36, 41, 47, 0.06);
    color: var(--text-strong);
}

.btn-primary,
.bg-neon-purple,
.bg-neon-cyan,
.hover\:bg-purple-600:hover,
.hover\:bg-cyan-600:hover {
    background-color: var(--accent);
    background-image: none;
    color: white;
    border-color: rgba(0, 0, 0, 0.04);
    box-shadow: 0 1px 1px rgba(31, 35, 40, 0.08);
}

.bg-neon-purple:hover,
.bg-neon-cyan:hover,
.btn-primary:hover {
    background-color: var(--accent-pressed);
    color: white;
}

.btn-success,
.bg-neon-green {
    background-color: var(--success);
    color: white;
    border-color: rgba(0, 0, 0, 0.04);
}

.btn-warning {
    background-color: #f4c469;
    color: #372500;
    border-color: rgba(0, 0, 0, 0.05);
}

.btn-danger,
.bg-red-500,
.bg-red-600 {
    background-color: var(--danger);
    color: white;
    border-color: rgba(0, 0, 0, 0.04);
}

.bg-neon-green\/10 {
    background-color: rgba(31, 143, 77, 0.1);
}

.bg-neon-purple\/10,
.bg-neon-purple\/20 {
    background-color: rgba(10, 132, 255, 0.1);
}

.bg-yellow-500\/10 {
    background-color: rgba(165, 104, 0, 0.12);
}

.bg-blue-500\/10 {
    background-color: rgba(10, 132, 255, 0.1);
}

.bg-red-500\/10 {
    background-color: rgba(215, 0, 21, 0.1);
}

.border-neon-purple\/20,
.border-neon-purple\/30,
.border-neon-purple\/50,
.border-neon-cyan\/20,
.border-blue-500\/30 {
    border-color: rgba(10, 132, 255, 0.24);
}

.border-neon-green\/20 {
    border-color: rgba(31, 143, 77, 0.24);
}

.border-yellow-500\/20,
.border-yellow-500\/30,
.border-yellow-500\/50 {
    border-color: rgba(165, 104, 0, 0.22);
}

.border-red-500\/20,
.border-red-500\/30,
.border-red-500\/50 {
    border-color: rgba(215, 0, 21, 0.24);
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

.view-card.\!p-0 {
    padding: 0.85rem !important;
}

thead tr,
table tr {
    background-color: transparent;
}

table tr:hover {
    background-color: rgba(36, 41, 47, 0.04);
}

table th {
    color: var(--text-faint);
    font-weight: 650;
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
}

table td,
table th {
    border-color: var(--glass-line);
    padding-left: 1.05rem;
    padding-right: 1.05rem;
}

table th:first-child,
table td:first-child {
    width: 124px;
    min-width: 124px;
}

table .bg-gray-700,
.bg-gray-700 {
    background-color: rgba(36, 41, 47, 0.16);
}

#logs-container {
    background-color: rgba(255, 255, 255, 0.58);
    color: var(--text-body);
    border-radius: 10px;
    border: 1px solid var(--glass-line);
}

.logs-toolbar {
    background-color: rgba(255, 255, 255, 0.58);
    border-color: var(--glass-line);
}

.logs-search {
    background-color: rgba(255, 255, 255, 0.78);
    border-color: var(--glass-line);
    color: var(--text-muted);
}

.logs-search-input {
    color: var(--text-strong);
}

.logs-filter-chip {
    border-color: var(--glass-line);
    color: var(--text-muted);
    background-color: rgba(255, 255, 255, 0.38);
}

.logs-filter-chip.active {
    background-color: rgba(255, 255, 255, 0.72);
}

.logs-grid {
    background-color: rgba(255, 255, 255, 0.5);
    color: var(--text-body);
}

.logs-grid-head {
    background-color: rgba(248, 249, 251, 0.94);
    border-color: var(--glass-line);
    color: var(--text-faint);
}

.logs-row {
    border-color: var(--glass-line);
}

.logs-row:hover {
    background-color: rgba(36, 41, 47, 0.04);
}

.logs-time {
    color: var(--text-faint);
}

.logs-message {
    color: var(--text-body);
}

.logs-detail-pill {
    background-color: rgba(255, 255, 255, 0.7);
    border-color: var(--glass-line);
    color: var(--text-muted);
}

.logs-detail-pill strong {
    color: var(--text-strong);
}

.logs-empty {
    color: var(--text-faint);
}

.view-card .bg-space-800\/50.border {
    background-color: rgba(248, 249, 251, 0.78);
}

.view-card .font-mono.text-sm.text-gray-300.bg-space-800\/50 {
    background-color: rgba(255, 255, 255, 0.64);
    color: var(--text-body);
    border-color: var(--glass-line);
}

.view-card .font-mono.text-sm.text-gray-300.bg-space-800\/50 .text-gray-500 {
    color: var(--text-faint);
}

.view-card .font-mono.text-sm.text-gray-300.bg-space-800\/50 .text-neon-cyan {
    color: var(--accent);
}

.view-card .font-mono.text-sm.text-gray-300.bg-space-800\/50 .text-neon-green {
    color: var(--success);
}

.nav-count {
    min-width: 2rem;
    padding: 0.12rem 0.4rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--glass-line);
    color: var(--text-muted);
    font-size: 0.68rem;
    line-height: 1.1;
    text-align: center;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.metrics-range-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem;
    border: 1px solid var(--glass-line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.56);
}

.metrics-range-button {
    min-width: 2.6rem;
    padding: 0.38rem 0.65rem;
    border-radius: 7px;
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 600;
}

.metrics-range-button.active {
    color: var(--text-strong);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 1px 2px rgba(31, 35, 40, 0.08);
}

.metrics-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
}

@media (min-width: 980px) {
    .metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.metrics-panel {
    min-width: 0;
}

.metrics-panel-header,
.metrics-table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.metrics-table-toolbar {
    margin: 0;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--glass-line);
}

.metrics-panel-header h3,
.metrics-table-toolbar h3 {
    color: var(--text-strong);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.metrics-muted {
    color: var(--text-faint);
    font-size: 0.72rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.metrics-timeline,
.metrics-list {
    display: grid;
    gap: 0.65rem;
}

.metrics-timeline-row,
.metrics-breakdown-row {
    display: grid;
    grid-template-columns: minmax(8rem, 0.65fr) minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
}

.metrics-breakdown-row {
    grid-template-columns: minmax(8rem, 0.9fr) minmax(12rem, 1fr);
}

.metrics-breakdown-meter {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
}

.metrics-timeline-label,
.metrics-breakdown-title,
.metrics-value {
    min-width: 0;
    color: var(--text-body);
    font-size: 0.75rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.metrics-value {
    color: var(--text-muted);
    text-align: right;
}

.metrics-bar-track {
    height: 0.48rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(36, 41, 47, 0.12);
    border: 1px solid var(--glass-line);
}

.metrics-bar-fill {
    height: 100%;
    min-width: 0.25rem;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), #22c55e);
}

.metrics-storage-warning {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid rgba(239, 68, 68, 0.25);
    background: rgba(239, 68, 68, 0.1);
}

.metrics-empty {
    padding: 1.25rem;
    border: 1px dashed var(--glass-line);
    border-radius: 10px;
    color: var(--text-faint);
    text-align: center;
    font-size: 0.82rem;
}

.metrics-status {
    display: inline-flex;
    min-width: 3rem;
    justify-content: center;
    padding: 0.22rem 0.45rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.metrics-status-success {
    color: #047857;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.metrics-status-error {
    color: #b91c1c;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.22);
}

.metrics-status-muted {
    color: var(--text-muted);
    background: rgba(36, 41, 47, 0.08);
    border: 1px solid var(--glass-line);
}

.alert {
    background-color: rgba(255, 255, 255, 0.86);
    border-color: var(--glass-line);
    color: var(--text-body);
    box-shadow: var(--glass-shadow);
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: rgba(104, 112, 125, 0.36);
    border-radius: 999px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background-color: rgba(104, 112, 125, 0.52);
}

dialog::backdrop,
.absolute.inset-0.bg-black\/70,
.bg-black\/50,
.bg-black\/70 {
    background-color: rgba(31, 35, 40, 0.26);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

@media (min-width: 768px) {
    .bottom-nav-label {
        display: inline;
    }

    .bottom-nav-item {
        flex: 1 1 0;
    }
}

@media (min-width: 1024px) {
    .fixed.top-14.bottom-0.left-0 {
        position: static;
        flex-shrink: 0;
        height: auto;
    }

    .view-container {
        padding: 2rem 2.5rem 3rem;
    }
}

@media (max-width: 1023px) {
    .fixed.top-14.bottom-0.left-0 {
        top: 60px;
        width: min(18rem, 86vw);
        box-shadow: 18px 0 36px rgba(31, 35, 40, 0.14);
    }

    .fixed.top-14.bottom-0.left-0.-translate-x-full {
        --tw-translate-x: calc(-100% - 18px);
    }

    .view-container {
        padding: 1.25rem;
    }

    .section-header {
        gap: 0.75rem;
    }

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

    .logs-filter-row {
        width: 100%;
    }

    .logs-clear-button {
        width: max-content;
    }

    .logs-grid-head,
    .logs-row {
        grid-template-columns: 5.5rem 5.2rem minmax(13rem, 1fr);
    }

    .logs-grid-head span:nth-child(4),
    .logs-details {
        grid-column: 3;
    }

    .logs-grid-head span:nth-child(4) {
        display: none;
    }
}

@media (max-width: 900px) {
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }

    .section-heading {
        gap: 0.65rem;
    }

    .section-actions {
        width: 100%;
    }

    .account-actions {
        display: flex;
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 0.45rem;
        overflow: hidden;
    }

    .account-actions .btn {
        flex: 0 0 32px;
        width: 32px;
        min-width: 32px;
        height: 32px;
        min-height: 32px;
        padding: 0;
        gap: 0;
    }

    .account-actions .action-label {
        display: none;
    }

    .metrics-range-controls {
        justify-content: flex-start;
        overflow-x: auto;
    }

    .logs-count-strip {
        flex-wrap: nowrap;
        overflow-x: auto;
    }

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

@media (max-width: 640px) {
    .h-14.border-b {
        height: var(--app-header-height);
        min-height: var(--app-header-height);
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .h-14.border-b > .flex:first-child {
        min-width: 0;
        gap: 0.55rem;
    }

    .h-14.border-b .app-brand-mark {
        width: 1.55rem;
        height: 1.55rem;
        flex-shrink: 0;
    }

    .h-14.border-b .flex-col > .flex.flex-col {
        display: none;
    }

    .app-brand-meta,
    .app-toolbar-github {
        display: none;
    }

    .h-14.border-b .text-sm {
        font-size: 0.8rem;
        white-space: nowrap;
    }

    .h-14.border-b > .flex:last-child {
        gap: 0.45rem;
        flex-shrink: 0;
    }

    .h-14.border-b .h-4.w-px,
    .h-14.border-b button[title="Refresh data"] {
        display: none;
    }

    .h-14.border-b .app-connection-status {
        min-height: 24px;
        padding: 0.14rem 0.48rem;
        font-size: 0.66rem;
    }

    .view-container {
        padding: 1rem;
    }

    .section-heading > .rounded-full {
        display: none;
    }

    .app-main {
        padding-bottom: 5.25rem;
    }

    .bottom-nav {
        width: min(27rem, calc(100vw - 1rem));
        min-height: 52px;
        padding: 0.3rem;
        border-radius: 15px;
    }

    .bottom-nav::before {
        border-radius: 16px;
    }

    .bottom-nav-item {
        min-width: 0;
        flex: 1 1 0;
        padding: 0;
        border-radius: 10px;
    }

    .bottom-nav-badge {
        position: absolute;
        top: 0.22rem;
        right: 0.18rem;
        min-width: 1rem;
        max-width: 1.55rem;
        padding: 0.05rem 0.18rem;
        font-size: 0.56rem;
    }

    .view-container > .flex.items-center.justify-between.gap-4.mb-6 {
        flex-direction: column;
    }

    .dashboard-test-grid .flex.gap-3,
    .view-card > .flex.gap-3 {
        flex-direction: column;
    }

    .dashboard-test-grid .btn,
    .view-card > .flex.gap-3 .btn {
        width: 100%;
    }

    .logs-grid {
        font-size: 0.68rem;
    }

    .logs-grid-head {
        display: none;
    }

    .logs-row {
        grid-template-columns: 4.8rem 4.8rem minmax(0, 1fr);
        gap: 0.5rem;
        padding: 0.55rem 0.65rem;
    }

    .logs-details {
        grid-column: 1 / -1;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }
}
