:root {
    --brand-primary: #0f766e;
    --brand-primary-hover: #14b8a6;
    --brand-primary-soft: #ccfbf1;
    --page-bg-start: #e5edf3;
    --page-bg-mid: #f7fafc;
    --page-bg-end: #dce9ee;
    --sidebar-bg: #020617;
    --sidebar-panel-bg: #0f172a;
    --sidebar-text: #d7e6eb;
    --sidebar-brand-text: #5eead4;
}

body {
    background: linear-gradient(135deg, var(--page-bg-start) 0%, var(--page-bg-mid) 60%, var(--page-bg-end) 100%);
    overflow-x: hidden;
}

body[data-theme='dark'] {
    background: linear-gradient(135deg, #020617 0%, #0f172a 55%, #111827 100%);
    color: #dbe7f0;
}

.card {
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

body[data-theme='dark'] .card {
    background: rgba(15, 23, 42, 0.9);
    box-shadow: 0 18px 50px rgba(2, 6, 23, 0.45);
}

.portal-topbar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    border-radius: 1.5rem;
    padding: 1rem 1.15rem;
    background: linear-gradient(135deg, var(--brand-primary), var(--sidebar-bg));
    color: #f8fafc;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.14);
}

.portal-topbar__stats,
.portal-topbar__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    align-items: center;
}

.portal-pill {
    min-width: 120px;
    border-radius: 999px;
    padding: 0.7rem 1rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.portal-pill span {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: rgba(226, 232, 240, 0.92);
}

.portal-pill strong {
    display: block;
    margin-top: 0.3rem;
    font-size: 1.35rem;
    line-height: 1;
    color: #fff;
}

.portal-refresh-label {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: rgba(226, 232, 240, 0.86);
}

.portal-refresh-select {
    min-width: 135px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    padding: 0.7rem 1rem;
}

.portal-refresh-select option {
    color: #0f172a;
}

.portal-refresh-button {
    border: 0;
    border-radius: 999px;
    padding: 0.7rem 1rem;
    background: #fff;
    color: var(--brand-primary);
    font-weight: 700;
}

.portal-refresh-status {
    border-radius: 999px;
    padding: 0.55rem 0.9rem;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(226, 232, 240, 0.92);
    font-size: 0.92rem;
}

.portal-refresh-status.is-active {
    background: rgba(16, 185, 129, 0.2);
    color: #d1fae5;
}

.nav-link,
.nav-group-toggle {
    display: flex;
    width: 100%;
    min-height: 3rem;
    align-items: center;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--sidebar-text);
    box-sizing: border-box;
    line-height: 1.5;
}

.nav-link.active,
.nav-link:hover {
    background: var(--brand-primary);
    color: #fff;
}

.nav-group {
    margin-top: 0.5rem;
}

.nav-group-toggle {
    justify-content: space-between;
    cursor: pointer;
    list-style: none;
    appearance: none;
}

.nav-group-toggle::-webkit-details-marker {
    display: none;
}

.nav-group-toggle::marker {
    content: '';
}

.nav-group-toggle:hover,
.nav-group-toggle.active,
.nav-group[open] > .nav-group-toggle {
    background: var(--brand-primary);
    color: #fff;
}

.nav-group-icon {
    transition: transform 0.18s ease;
}

.nav-group[open] .nav-group-icon {
    transform: rotate(180deg);
}

.nav-group-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.35rem;
    padding-left: 0;
}

.nav-sublink {
    display: block;
    width: 100%;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--sidebar-text);
    box-sizing: border-box;
}

.nav-sublink.active,
.nav-sublink:hover {
    background: var(--brand-primary);
    color: #fff;
}

.app-mobile-sidebar,
.app-sidebar {
    background-color: var(--sidebar-bg) !important;
    background-image: none !important;
}

.app-sidebar-panel {
    background-color: var(--sidebar-panel-bg) !important;
    background-image: none !important;
}

.app-sidebar-brand {
    color: var(--sidebar-brand-text);
}

.bg-teal-600,
.bg-teal-500 {
    background-color: var(--brand-primary) !important;
}

.text-teal-700,
.text-teal-600 {
    color: var(--brand-primary) !important;
}

.bg-teal-100 {
    background-color: var(--brand-primary-soft) !important;
}

.text-teal-300 {
    color: var(--sidebar-brand-text) !important;
}

.focus\:border-teal-400:focus,
.hover\:border-teal-400:hover,
.hover\:border-teal-300:hover {
    border-color: var(--brand-primary-hover) !important;
}

.hover\:bg-teal-400:hover,
.hover\:bg-teal-500:hover {
    background-color: var(--brand-primary-hover) !important;
}

.hover\:bg-teal-50\/40:hover {
    background-color: var(--brand-primary-soft) !important;
}

body[data-theme='dark'] .text-slate-900 {
    color: #f8fafc !important;
}

body[data-theme='dark'] .text-slate-800,
body[data-theme='dark'] .text-slate-700 {
    color: #dbe7f0 !important;
}

body[data-theme='dark'] .text-slate-600,
body[data-theme='dark'] .text-slate-500,
body[data-theme='dark'] .text-slate-400 {
    color: #94a3b8 !important;
}

body[data-theme='dark'] .bg-white,
body[data-theme='dark'] .bg-slate-50,
body[data-theme='dark'] .bg-slate-100 {
    background-color: rgba(15, 23, 42, 0.82) !important;
}

body[data-theme='dark'] .bg-emerald-50,
body[data-theme='dark'] .bg-rose-50 {
    background-color: rgba(15, 23, 42, 0.82) !important;
}

body[data-theme='dark'] .border-slate-300,
body[data-theme='dark'] .border-slate-200,
body[data-theme='dark'] .border-slate-100 {
    border-color: rgba(148, 163, 184, 0.2) !important;
}

body[data-theme='dark'] .text-teal-700,
body[data-theme='dark'] .text-sky-700,
body[data-theme='dark'] .text-rose-700,
body[data-theme='dark'] .text-emerald-700,
body[data-theme='dark'] .text-amber-700 {
    color: #cbd5e1 !important;
}

body[data-theme='dark'] .bg-sky-100,
body[data-theme='dark'] .bg-rose-100,
body[data-theme='dark'] .bg-amber-100,
body[data-theme='dark'] .bg-emerald-100 {
    background-color: rgba(30, 41, 59, 0.9) !important;
}

body[data-theme='dark'] input,
body[data-theme='dark'] textarea,
body[data-theme='dark'] select {
    color: #e2e8f0;
}

body[data-theme='dark'] input:not([type='checkbox']):not([type='radio']),
body[data-theme='dark'] textarea,
body[data-theme='dark'] select {
    background: rgba(15, 23, 42, 0.92) !important;
    border-color: rgba(148, 163, 184, 0.24) !important;
}

body[data-theme='dark'] table tbody tr:hover {
    background: rgba(30, 41, 59, 0.35);
}

body[data-theme='dark'] table thead tr,
body[data-theme='dark'] table tbody tr {
    border-color: rgba(148, 163, 184, 0.16) !important;
}

body[data-theme='dark'] table th {
    color: #94a3b8;
}

body[data-theme='dark'] table td {
    color: #dbe7f0;
}

.overflow-x-auto {
    -webkit-overflow-scrolling: touch;
}

.stat-card {
    display: block;
    border-radius: 1.5rem;
    padding: 1.5rem;
    color: #0f172a;
}

.stat-card-link {
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.stat-card-link:hover,
.stat-card-link:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

[data-dashboard-widget][draggable='true'] {
    cursor: move;
}

.stat-card h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #64748b;
}

.stat-card .value {
    margin-top: 1rem;
    font-size: 3rem;
    font-weight: 700;
}

#worldMap {
    height: 420px;
    border-radius: 1rem;
}

.server-empty-state {
    display: grid;
    place-items: center;
    min-height: 72vh;
    padding: 2rem 0;
}

.server-empty-card {
    width: min(820px, 100%);
    border-radius: 2rem;
    padding: 2rem;
    background:
        radial-gradient(circle at top right, var(--brand-primary-soft), transparent 32%),
        linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 255, 0.94));
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.16);
}

body[data-theme='dark'] .server-empty-card {
    background:
        radial-gradient(circle at top right, rgba(45, 212, 191, 0.12), transparent 30%),
        linear-gradient(160deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.94));
    box-shadow: 0 28px 80px rgba(2, 6, 23, 0.4);
}

.server-empty-eyebrow {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: #0f766e;
}

.server-empty-title {
    margin-top: 1rem;
    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 1;
    font-weight: 700;
    color: #0f172a;
}

.server-empty-copy {
    margin-top: 1rem;
    max-width: 42rem;
    font-size: 1rem;
    color: #475569;
}

body[data-theme='dark'] .server-empty-title {
    color: #f8fafc;
}

body[data-theme='dark'] .server-empty-copy {
    color: #94a3b8;
}

.server-empty-command {
    margin-top: 1.75rem;
    border-radius: 1.5rem;
    background: #020617;
    padding: 1.25rem;
}

.server-empty-label {
    margin-bottom: 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #5eead4;
}

.server-empty-command pre {
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.95rem;
    color: #ccfbf1;
}

.server-empty-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
}

.server-empty-pill {
    min-width: 180px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    padding: 0.85rem 1.1rem;
}

body[data-theme='dark'] .server-empty-pill {
    background: rgba(15, 23, 42, 0.88);
}

.server-empty-pill span {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #64748b;
}

.server-empty-pill strong {
    display: block;
    margin-top: 0.25rem;
    color: #0f172a;
}

body[data-theme='dark'] .server-empty-pill span {
    color: #94a3b8;
}

body[data-theme='dark'] .server-empty-pill strong {
    color: #f8fafc;
}

.server-list-name {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    min-width: 180px;
}

.server-os-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.server-os-logo {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: transparent;
}

.server-os-tooltip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 0.5rem);
    transform: translateX(-50%) translateY(0.2rem);
    border-radius: 0.7rem;
    background: rgba(15, 23, 42, 0.96);
    color: #f8fafc;
    padding: 0.45rem 0.65rem;
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.24);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease;
    z-index: 20;
}

.server-os-tooltip::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    border-width: 0.35rem 0.35rem 0;
    border-style: solid;
    border-color: rgba(15, 23, 42, 0.96) transparent transparent;
}

.server-os-logo:hover .server-os-tooltip,
.server-os-logo:focus-visible .server-os-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.server-os-logo-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.server-os-logo-fallback {
    display: none;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #fff;
}

.server-os-logo.is-fallback .server-os-logo-fallback {
    display: inline;
}

.server-os-logo.is-fallback {
    background: linear-gradient(135deg, #64748b, #475569);
}

.server-os-logo.is-fallback.is-ubuntu { background: linear-gradient(135deg, #f97316, #ea580c); }
.server-os-logo.is-fallback.is-debian { background: linear-gradient(135deg, #e11d48, #9f1239); }
.server-os-logo.is-fallback.is-alma { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.server-os-logo.is-fallback.is-rocky { background: linear-gradient(135deg, #16a34a, #166534); }
.server-os-logo.is-fallback.is-centos { background: linear-gradient(135deg, #7c3aed, #5b21b6); }
.server-os-logo.is-fallback.is-redhat { background: linear-gradient(135deg, #dc2626, #991b1b); }
.server-os-logo.is-fallback.is-windows { background: linear-gradient(135deg, #0ea5e9, #2563eb); }
.server-os-logo.is-fallback.is-macos { background: linear-gradient(135deg, #111827, #4b5563); }
.server-os-logo.is-fallback.is-generic { background: linear-gradient(135deg, var(--brand-primary), var(--sidebar-bg)); }
.server-os-logo.is-fallback.is-unknown { background: linear-gradient(135deg, #94a3b8, #64748b); }

.server-os-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
}

.server-list-hostname {
    font-weight: 600;
    color: #0f172a;
}

.server-list-no-metrics {
    margin-top: 0.6rem;
    font-size: 0.82rem;
    color: #64748b;
}

body[data-theme='dark'] .server-os-label,
body[data-theme='dark'] .server-list-no-metrics,
body[data-theme='dark'] .api-doc-copy {
    color: #94a3b8;
}

body[data-theme='dark'] .server-list-hostname,
body[data-theme='dark'] .api-doc-title {
    color: #f8fafc;
}

.server-metric-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 0.85rem;
}

.server-metric-chip {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.12), rgba(14, 165, 233, 0.1));
    border: 1px solid rgba(148, 163, 184, 0.28);
    text-align: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

body[data-theme='dark'] .server-metric-chip {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.92));
    border-color: rgba(148, 163, 184, 0.2);
    box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.08);
}

.server-metric-chip span {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #64748b;
}

.server-metric-chip strong,
.server-metric-chip-value {
    margin-top: 0.25rem;
    max-width: 3.7rem;
    font-size: 0.82rem;
    line-height: 1.05;
    color: #0f172a;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.server-metric-chip-value.is-compact {
    font-size: 0.72rem;
    line-height: 1;
}

.server-metric-chip-value.is-tight {
    font-size: 0.64rem;
    line-height: 0.98;
}

body[data-theme='dark'] .server-metric-chip span {
    color: #94a3b8;
}

body[data-theme='dark'] .server-metric-chip strong {
    color: #f8fafc;
}

body[data-theme='dark'] .server-os-tooltip {
    background: rgba(248, 250, 252, 0.96);
    color: #0f172a;
    box-shadow: 0 12px 28px rgba(2, 6, 23, 0.38);
}

body[data-theme='dark'] .server-os-tooltip::after {
    border-color: rgba(248, 250, 252, 0.96) transparent transparent;
}

.api-doc-section + .api-doc-section {
    border-top: 1px solid #e2e8f0;
    padding-top: 2rem;
}

.api-doc-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}

.api-doc-copy {
    margin-top: 0.65rem;
    max-width: 56rem;
    font-size: 0.95rem;
    color: #475569;
}

.api-doc-code {
    margin-top: 1rem;
    overflow-x: auto;
    border-radius: 1.25rem;
    background: #020617;
    padding: 1rem 1.1rem;
    box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.14);
}

.api-doc-code pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #cbd5e1;
}

.api-doc-code code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.server-tab-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.server-primary-tab-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0;
    overflow-x: auto;
    padding: 0.5rem 0;
}

.server-subnav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: -1.5rem -1.5rem 1.5rem;
    padding: 0.5rem 1.5rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    background:
        linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.92));
}

.server-primary-tab-button {
    border: 1px solid transparent;
    border-radius: 0.95rem;
    padding: 0.85rem 1.05rem;
    background: rgba(255, 255, 255, 0.72);
    color: #334155;
    font-size: 0.96rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
    transition: all 0.2s ease, transform 0.2s ease;
}

.server-primary-tab-button:hover,
.server-primary-tab-button.is-active {
    color: var(--brand-primary);
    border-color: var(--brand-primary);
    background: linear-gradient(180deg, rgba(240, 253, 250, 0.96), var(--brand-primary-soft));
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.1);
    transform: translateY(-1px);
}

.server-primary-tab-button.is-active {
    position: relative;
}

.server-primary-tab-button.is-active::after {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 8px;
    height: 3px;
    border-radius: 999px;
    background: var(--brand-primary);
}

.daterange-form {
    flex: 0 0 auto;
    min-width: 0;
    width: auto;
    max-width: 100%;
}

.daterange-input {
    width: auto;
    min-width: min(320px, 100%);
    max-width: 100%;
    border: 1px solid #dbe4ee;
    border-radius: 0.9rem;
    padding: 0.48rem 0.72rem;
    background: #fff;
    color: #334155;
    font-size: 0.76rem;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
    line-height: 1.25;
}

.server-tab-button {
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 999px;
    padding: 0.7rem 1rem;
    background: #fff;
    color: #475569;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.settings-tab-list .server-tab-button {
    padding: 0.58rem 0.82rem;
    font-size: 0.84rem;
    white-space: nowrap;
}

.ai-insight-card {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 1.6rem;
    padding: 1.25rem;
    background:
        radial-gradient(circle at top left, rgba(251, 191, 36, 0.18), transparent 38%),
        linear-gradient(145deg, rgba(255, 251, 235, 0.98), rgba(240, 249, 255, 0.98));
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.ai-insight-eyebrow {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #92400e;
}

.ai-insight-title {
    margin-top: 0.45rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
}

.ai-insight-copy {
    margin-top: 0.55rem;
    font-size: 0.94rem;
    line-height: 1.6;
    color: #475569;
}

.ai-confidence-pill,
.ai-severity-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
    background: rgba(15, 23, 42, 0.9);
    color: #f8fafc;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ai-highlight-box {
    margin-top: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 1.15rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.66);
}

.ai-suggestion-item,
.ai-anomaly-item {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 1rem;
    padding: 0.9rem 1rem;
    background: rgba(255, 255, 255, 0.7);
    color: #334155;
}

.ai-suggestion-item::before {
    content: 'Check';
    display: inline-block;
    margin-right: 0.55rem;
    border-radius: 999px;
    padding: 0.18rem 0.45rem;
    background: rgba(14, 165, 233, 0.12);
    color: #075985;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

body[data-theme='dark'] .ai-insight-card {
    border-color: rgba(148, 163, 184, 0.18);
    background:
        radial-gradient(circle at top left, rgba(251, 191, 36, 0.12), transparent 34%),
        linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96));
    box-shadow: 0 20px 44px rgba(2, 6, 23, 0.34);
}

body[data-theme='dark'] .ai-insight-eyebrow {
    color: #fbbf24;
}

body[data-theme='dark'] .ai-insight-title {
    color: #f8fafc;
}

body[data-theme='dark'] .ai-insight-copy,
body[data-theme='dark'] .ai-highlight-box .text-sm,
body[data-theme='dark'] .ai-anomaly-item,
body[data-theme='dark'] .ai-suggestion-item {
    color: #cbd5e1;
}

body[data-theme='dark'] .ai-highlight-box,
body[data-theme='dark'] .ai-anomaly-item,
body[data-theme='dark'] .ai-suggestion-item {
    border-color: rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.58);
}

.server-tab-button:hover,
.server-tab-button.is-active {
    border-color: var(--brand-primary);
    background: var(--brand-primary);
    color: #fff;
}

.server-tab-panel {
    display: none;
}

.server-tab-panel.is-active {
    display: block;
}

.server-dashboard-grid {
    display: grid;
    gap: 1.5rem;
    align-items: start;
}

.server-overview-cards,
.server-summary-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.server-overview-card,
.server-summary-card {
    border-radius: 1.25rem;
    padding: 1rem 1.1rem;
    background: linear-gradient(160deg, rgba(248, 250, 252, 0.98), rgba(226, 232, 240, 0.75));
    border: 1px solid rgba(226, 232, 240, 0.95);
}

body[data-theme='dark'] .server-overview-card,
body[data-theme='dark'] .server-summary-card,
body[data-theme='dark'] .server-info-row {
    background: linear-gradient(160deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.86));
    border-color: rgba(148, 163, 184, 0.16);
}

.server-overview-card span,
.server-summary-card span,
.server-info-row span {
    display: block;
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #64748b;
}

.server-overview-card strong,
.server-summary-card strong,
.server-info-row strong {
    display: block;
    margin-top: 0.45rem;
    color: #0f172a;
    line-height: 1.25;
}

.server-overview-card strong {
    font-size: 1.05rem;
}

.server-summary-card strong,
.server-info-row strong {
    font-size: 0.92rem;
}

.server-info-row {
    padding: 0.9rem 1rem;
    border-radius: 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

body[data-theme='dark'] .server-overview-card span,
body[data-theme='dark'] .server-summary-card span,
body[data-theme='dark'] .server-info-row span {
    color: #94a3b8;
}

body[data-theme='dark'] .server-overview-card strong,
body[data-theme='dark'] .server-summary-card strong,
body[data-theme='dark'] .server-info-row strong {
    color: #f8fafc;
}

.app-datetime {
    display: inline-block;
    font-size: 0.82rem;
    line-height: 1.3;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.app-datetime.is-block {
    display: block;
}

@media (min-width: 1280px) {
    .server-dashboard-grid {
        grid-template-columns: minmax(0, 2fr) minmax(320px, 0.95fr);
    }
}

.daterangepicker {
    border: 1px solid #dbe4ee;
    border-radius: 1rem;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
}

.daterangepicker .ranges li.active {
    background-color: var(--brand-primary);
}

@media (max-width: 768px) {
    .card {
        border-radius: 1.1rem;
    }

    #worldMap {
        height: 320px;
    }

    .server-empty-state {
        min-height: auto;
        padding: 1rem 0 0;
    }

    .server-empty-card {
        border-radius: 1.5rem;
        padding: 1.5rem;
    }

    .server-empty-meta,
    .server-empty-pill {
        width: 100%;
    }

    .server-list-name {
        min-width: 0;
    }

    .server-subnav {
        margin: -1.5rem -1.5rem 1.5rem;
        padding: 0 1rem 1rem;
    }

    .server-primary-tab-list {
        width: 100%;
    }

    .daterange-form {
        min-width: 100%;
        width: 100%;
        flex-basis: 100%;
    }

    .daterange-input {
        width: 100%;
        min-width: 0;
        font-size: 0.78rem;
    }

    .server-primary-tab-button,
    .server-tab-button {
        flex: 0 0 auto;
    }
}

@media (max-width: 640px) {
    .portal-pill {
        min-width: calc(50% - 0.5rem);
    }

    .stat-card {
        padding: 1.2rem;
    }

    .stat-card .value {
        font-size: 2.35rem;
    }

    .server-overview-cards,
    .server-summary-grid {
        grid-template-columns: 1fr;
    }
}
