/* 
 * ==============================================================================
 * Cloud Monitor Console — Enterprise UI Design System
 * Inspired by Refero Styles (Linear, Apple, Neon, Mercury, Vercel)
 * Built with Precision Hairline Surfaces, High-End Typography & Glassmorphism
 * ==============================================================================
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&family=Outfit:wght@400;500;600;700&display=swap');

:root {
    /* --- Light Mode (Titanium Studio) --- */
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-header: rgba(255, 255, 255, 0.85);
    --bg-sidebar: #ffffff;
    --bg-surface-elevated: #ffffff;
    --bg-surface-nested: #f1f5f9;
    --bg-input: #ffffff;
    --bg-skeleton: #e2e8f0;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-input: #0f172a;

    --border-color: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 0, 0, 0.16);
    --border-subtle: rgba(0, 0, 0, 0.05);

    /* Brand & Accents */
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --primary-glow: rgba(37, 99, 235, 0.18);

    --secondary-color: #0284c7;
    --secondary-hover: #0369a1;
    --secondary-light: #f0f9ff;

    /* Cloud Signatures */
    --cloud-aliyun: #ff6a00;
    --cloud-cloudflare: #f48120;
    --cloud-azure: #0078d4;

    /* Status Tokens */
    --status-success-bg: rgba(16, 185, 129, 0.1);
    --status-success-border: rgba(16, 185, 129, 0.25);
    --status-success-text: #059669;

    --status-info-bg: rgba(59, 130, 246, 0.1);
    --status-info-border: rgba(59, 130, 246, 0.25);
    --status-info-text: #0284c7;

    --status-warning-bg: rgba(245, 158, 11, 0.1);
    --status-warning-border: rgba(245, 158, 11, 0.25);
    --status-warning-text: #d97706;

    --status-danger-bg: rgba(239, 68, 68, 0.1);
    --status-danger-border: rgba(239, 68, 68, 0.25);
    --status-danger-text: #dc2626;

    --status-gray-bg: #f1f5f9;
    --status-gray-border: rgba(0, 0, 0, 0.06);
    --status-gray-text: #64748b;

    /* Shadows & Radii */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px -2px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 32px -8px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.06);

    --header-height: 54px;
    --sidebar-width: 240px;
    --border-radius: 8px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-pill: 9999px;
}

/* --- Dark Mode Theme (Midnight Precision) --- */
body.theme-dark {
    --bg-canvas: #08090b;
    --bg-main: #08090b;
    --bg-card: #0e1117;
    --bg-header: rgba(14, 17, 23, 0.72);
    --bg-sidebar: #0e1117;
    --bg-surface-elevated: #151921;
    --bg-surface-nested: #1d2330;
    --bg-input: #0e1117;
    --bg-skeleton: #1d2330;

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-input: #f8fafc;

    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.18);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);

    --accent-primary: #3b82f6;
    --primary-color: #3b82f6;
    --primary-hover: #60a5fa;
    --primary-light: rgba(59, 130, 246, 0.15);
    --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    --primary-glow: rgba(59, 130, 246, 0.35);

    --secondary-color: #38bdf8;
    --secondary-hover: #7dd3fc;
    --secondary-light: rgba(56, 189, 248, 0.12);

    --status-gray-bg: rgba(255, 255, 255, 0.05);
    --status-gray-border: rgba(255, 255, 255, 0.08);
    --status-gray-text: #94a3b8;

    --status-success-bg: rgba(16, 185, 129, 0.12);
    --status-success-border: rgba(16, 185, 129, 0.28);
    --status-success-text: #34d399;

    --status-danger-bg: rgba(239, 68, 68, 0.12);
    --status-danger-border: rgba(239, 68, 68, 0.28);
    --status-danger-text: #f87171;

    --status-warning-bg: rgba(245, 158, 11, 0.12);
    --status-warning-border: rgba(245, 158, 11, 0.28);
    --status-warning-text: #fbbf24;

    --status-info-bg: rgba(59, 130, 246, 0.12);
    --status-info-border: rgba(59, 130, 246, 0.28);
    --status-info-text: #60a5fa;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06);
    --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08);
    --shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.12);
}

/* ==============================================================================
 * Reset & Base Typography
 * ============================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-size: 13px;
    line-height: 1.5;
    overflow: hidden;
    height: 100vh;
    letter-spacing: -0.012em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: all 0.15s ease;
}

a:hover {
    color: var(--secondary-hover);
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

/* Utility Flex */
.flex-center {
    display: flex;
    align-items: center;
}

.flex-center-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flex-row-gap {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.5);
}

/* Shimmer Skeleton Screen */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.shimmer {
    background: linear-gradient(90deg, var(--bg-skeleton) 25%, var(--border-color) 50%, var(--bg-skeleton) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.6s infinite ease-in-out;
}

.skeleton-loader {
    padding: 24px 8px;
}
.skeleton-header {
    margin-bottom: 24px;
}
.skeleton-title {
    width: 180px;
    height: 24px;
    border-radius: 6px;
    margin-bottom: 8px;
}
.skeleton-subtitle {
    width: 320px;
    height: 14px;
    border-radius: 4px;
}
.skeleton-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.skeleton-card {
    height: 140px;
    border-radius: var(--radius-md);
}

/* ==============================================================================
 * Top Navigation Header
 * ============================================================================== */
.console-header {
    height: var(--header-height);
    background-color: var(--bg-header);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    box-shadow: 0 1px 0 0 var(--border-subtle);
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: transform 0.15s ease;
}
.logo-area:hover {
    transform: scale(1.02);
}

.logo-icon {
    color: var(--primary-color);
    filter: drop-shadow(0 0 8px var(--primary-glow));
}

.logo-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    font-family: 'Outfit', sans-serif;
}

.header-tag {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    background-color: var(--status-gray-bg);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.workdesk-btn {
    display: flex;
    align-items: center;
    background-color: var(--status-gray-bg);
    border: 1px solid var(--border-color);
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.workdesk-btn:hover {
    background-color: var(--bg-surface-elevated);
    border-color: var(--border-hover);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.workdesk-btn.active {
    background: var(--primary-light);
    color: var(--primary-color);
    border-color: rgba(59, 130, 246, 0.3);
    font-weight: 600;
}

.header-center {
    flex: 1;
    max-width: 420px;
    margin: 0 32px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background-color: var(--status-gray-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    padding: 5px 14px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-box:focus-within {
    background-color: var(--bg-input);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-icon {
    color: var(--text-muted);
    margin-right: 8px;
    flex-shrink: 0;
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    color: var(--text-primary);
    font-size: 12.5px;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-kbd {
    flex-shrink: 0;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 10px;
    font-weight: 500;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    background: var(--bg-surface-nested);
    border-radius: 6px;
    padding: 1px 6px;
    margin-left: 8px;
    letter-spacing: 0.02em;
    line-height: 1.4;
}

.search-box:focus-within .search-kbd {
    opacity: 0.35;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
}

.nav-link:hover {
    color: var(--text-primary);
    background-color: var(--status-gray-bg);
}

.header-icons {
    display: flex;
    align-items: center;
    gap: 8px;
    border-right: 1px solid var(--border-color);
    padding-right: 14px;
}

.header-icon-btn {
    position: relative;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    transition: all 0.15s ease;
}

.header-icon-btn:hover {
    background-color: var(--status-gray-bg);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--status-danger-text);
    color: #ffffff;
    font-size: 9px;
    min-width: 15px;
    height: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    border-radius: var(--radius-pill);
    line-height: 1;
    font-weight: 600;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.4);
    animation: pulseBadge 2.5s infinite;
}

@keyframes pulseBadge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 3px 8px;
    border-radius: var(--radius-pill);
    border: 1px solid transparent;
    transition: all 0.15s ease;
}

.user-profile:hover {
    background-color: var(--status-gray-bg);
    border-color: var(--border-color);
}

.avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    background-color: var(--bg-surface-nested);
    border: 1.5px solid var(--border-color);
    box-shadow: 0 0 0 1px var(--border-subtle);
}

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

.user-profile-text {
    line-height: 1.25;
}

.username {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 12px;
    letter-spacing: -0.01em;
}

.user-role {
    font-size: 10.5px;
    color: var(--text-muted);
}

/* ==============================================================================
 * Layout & Sidebars
 * ============================================================================== */
.app-layout {
    display: flex;
    height: calc(100vh - var(--header-height));
    margin-top: var(--header-height);
}

.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow-y: auto;
    padding: 12px 8px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.menu-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 38px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 12.5px;
    position: relative;
    transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.menu-item:hover {
    background-color: var(--status-gray-bg);
    color: var(--text-primary);
}

.menu-item-main {
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-item .menu-icon {
    color: var(--text-muted);
    transition: color 0.15s ease, transform 0.15s ease;
}

.menu-item:hover .menu-icon {
    color: var(--text-primary);
    transform: scale(1.05);
}

.menu-item.active {
    background: var(--primary-light);
    color: var(--primary-color);
    font-weight: 600;
}

.menu-item.active .menu-icon {
    color: var(--primary-color);
}

.menu-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 3px;
    background-color: var(--primary-color);
    border-radius: var(--radius-pill);
    box-shadow: 0 0 8px var(--primary-glow);
}

/* Scoped platform sidebar */
.platform-sidebar {
    border-right: 1px solid var(--border-color);
}

.sidebar-platform-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px 14px 12px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 8px;
}

.platform-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 8px currentColor;
}
.platform-indicator.orange { background-color: var(--cloud-aliyun); color: var(--cloud-aliyun); }
.platform-indicator.blue { background-color: var(--cloud-azure); color: var(--cloud-azure); }

.platform-header-text {
    overflow: hidden;
}

.p-title {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.2;
    font-family: 'Outfit', sans-serif;
}

.p-sub {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.back-item {
    color: var(--secondary-color);
}
.back-item .menu-icon {
    color: var(--secondary-color) !important;
}
.back-item:hover {
    background-color: var(--secondary-light);
    color: var(--secondary-hover);
}

.divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 8px 8px;
}

.arrow-icon {
    color: var(--text-muted);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.menu-item.expanded .arrow-icon {
    transform: rotate(180deg);
}

.submenu-list {
    list-style: none;
    background-color: var(--status-gray-bg);
    border-radius: var(--radius-sm);
    padding: 4px;
    margin: 2px 0 4px 8px;
}

.submenu-item {
    height: 30px;
    display: flex;
    align-items: center;
    padding: 0 12px 0 28px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 12px;
    transition: all 0.15s ease;
}

.submenu-item:hover {
    background-color: var(--border-color);
    color: var(--text-primary);
}

.submenu-item.active {
    color: var(--primary-color);
    font-weight: 600;
    background-color: var(--primary-light);
}

/* ==============================================================================
 * Main Body & Views
 * ============================================================================== */
.console-body {
    flex: 1;
    overflow-y: auto;
    padding: 28px 36px;
    position: relative;
    background-color: var(--bg-main);
    transition: background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.console-body::before {
    content: '';
    position: absolute;
    top: -40px;
    left: 12%;
    width: 70%;
    height: 380px;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(59, 130, 246, 0.14) 0%, rgba(99, 102, 241, 0.05) 38%, transparent 70%);
}
body.theme-light .console-body::before {
    background: radial-gradient(ellipse at 50% 0%, rgba(59, 130, 246, 0.08) 0%, transparent 65%);
}
.console-body > * {
    position: relative;
    z-index: 1;
}

.view-content, .scoped-sub-view {
    animation: smoothFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes smoothFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.hidden {
    display: none !important;
}

.view-header {
    margin-bottom: 24px;
}

.view-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    letter-spacing: -0.025em;
}

.view-subtitle {
    font-size: 13px;
    color: var(--text-muted);
}

/* ==============================================================================
 * Buttons
 * ============================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 0 14px;
    font-size: 12px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid transparent;
    outline: none;
    white-space: nowrap;
    gap: 6px;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--primary-gradient);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 8px var(--primary-glow);
}

.btn-primary:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-secondary {
    background-color: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background-color: var(--status-gray-bg);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--border-color);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--border-hover);
    background-color: var(--status-gray-bg);
    color: var(--text-primary);
}

.btn-outline.active {
    border-color: var(--secondary-color);
    background-color: var(--secondary-light);
    color: var(--secondary-color);
    font-weight: 600;
}

/* ==============================================================================
 * Platform Cards (Console Dashboard)
 * ============================================================================== */
.platform-group {
    margin-bottom: 28px;
}

.group-title {
    font-size: 13.5px;
    color: var(--text-secondary);
    margin-bottom: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.platform-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 16px;
}

.platform-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 156px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.platform-card.interactive {
    cursor: pointer;
}

.platform-card.interactive:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.35), 0 0 0 1px var(--border-subtle);
}

.platform-card.interactive#card-alibabacloud::before,
.platform-card.interactive#card-cloudflare::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff6a00, #ff9500);
}

.platform-card.interactive#card-azure::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0078d4, #38bdf8);
}

.platform-card.planned {
    opacity: 0.65;
    background-color: var(--status-gray-bg);
}

.platform-card.planned::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--text-muted);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.platform-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    box-shadow: 0 0 6px currentColor;
}
.platform-dot.orange { background-color: var(--cloud-aliyun); color: var(--cloud-aliyun); }
.platform-dot.blue { background-color: var(--cloud-azure); color: var(--cloud-azure); }

.platform-card .card-title {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text-primary);
}

.card-desc {
    font-size: 12.5px;
    color: var(--text-muted);
    flex-grow: 1;
    margin-bottom: 14px;
    line-height: 1.45;
}

.card-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.action-link {
    font-size: 12px;
    font-weight: 600;
    color: var(--secondary-color);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: transform 0.2s ease, color 0.2s ease;
}

.platform-card:hover .action-link {
    color: var(--secondary-hover);
    transform: translateX(3px);
}

/* ==============================================================================
 * Status Indicators & Badges
 * ============================================================================== */
.status-badge {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 8px;
    font-size: 10.5px;
    font-weight: 600;
    border-radius: var(--radius-pill);
    border: 1px solid transparent;
    letter-spacing: 0.01em;
}

.status-badge.green {
    background-color: var(--status-success-bg);
    border-color: var(--status-success-border);
    color: var(--status-success-text);
}

.status-badge.gray {
    background-color: var(--status-gray-bg);
    border-color: var(--status-gray-border);
    color: var(--status-gray-text);
}

.status-badge.red {
    background-color: var(--status-danger-bg);
    border-color: var(--status-danger-border);
    color: var(--status-danger-text);
}

.status-badge.orange {
    background-color: var(--status-warning-bg);
    border-color: var(--status-warning-border);
    color: var(--status-warning-text);
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    position: relative;
}
.dot.green { background-color: var(--status-success-text); box-shadow: 0 0 6px var(--status-success-text); }
.dot.red { background-color: var(--status-danger-text); box-shadow: 0 0 6px var(--status-danger-text); }
.dot.orange { background-color: var(--status-warning-text); box-shadow: 0 0 6px var(--status-warning-text); }
.dot.gray { background-color: var(--text-muted); }

/* ==============================================================================
 * Data Tables
 * ============================================================================== */
.table-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 16px;
}

.table-search {
    width: 300px;
}

.table-container {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table th {
    background-color: var(--status-gray-bg);
    font-weight: 600;
    color: var(--text-muted);
    padding: 10px 16px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    vertical-align: middle;
    font-size: 12.5px;
    font-feature-settings: "tnum" 1;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr {
    transition: background-color 0.15s ease;
}

.data-table tr:hover td {
    background-color: var(--status-gray-bg);
    color: var(--text-primary);
}

.data-table th.num-col,
.data-table td.num-col {
    text-align: right;
    font-family: 'JetBrains Mono', monospace;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-width: 250px;
}

.tag-badge {
    background-color: var(--status-gray-bg);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 10px;
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    font-family: 'JetBrains Mono', monospace;
}

/* ==============================================================================
 * Stats Overview Widgets
 * ============================================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.stat-card.clickable-tab-trigger {
    cursor: pointer;
}
.stat-card.clickable-tab-trigger:hover {
    border-color: var(--primary-color);
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.stat-value-container {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.stat-value {
    font-size: 26px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    line-height: 1.1;
    font-feature-settings: "tnum" 1;
}

.stat-value-sub {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 400;
    font-family: 'Inter', sans-serif;
}

.stat-icon {
    color: var(--text-muted);
    opacity: 0.6;
}

/* ==============================================================================
 * Settings & Panels
 * ============================================================================== */
.settings-cards-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.settings-card-item {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s ease;
}

.settings-card-item:hover {
    border-color: var(--border-hover);
}

.settings-card-header {
    margin-bottom: 12px;
}

.settings-card-title-container {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.settings-icon {
    color: var(--primary-color);
}

.s-title {
    font-size: 15px;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
}

.settings-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
    max-width: 700px;
    line-height: 1.55;
}

.btn-group {
    display: flex;
    gap: 8px;
}

/* ==============================================================================
 * Forms & Inputs
 * ============================================================================== */
.form-group {
    margin-bottom: 16px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    height: 36px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    background-color: var(--bg-input);
    color: var(--text-input);
    outline: none;
    font-size: 12.5px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

textarea.form-control {
    height: auto;
    min-height: 80px;
}

.form-row-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Toggle Switch */
.switch-container {
    display: inline-flex;
    align-items: center;
    position: relative;
    cursor: pointer;
    user-select: none;
}

.switch-container input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-container .slider {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    background-color: var(--status-gray-bg);
    border: 1px solid var(--border-color);
    transition: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: var(--radius-pill);
}

.switch-container .slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: #ffffff;
    transition: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.switch-container input:checked + .slider {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.switch-container input:checked + .slider:before {
    transform: translateX(16px);
}

/* Tabs */
.tab-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
    padding-bottom: 1px;
}

.tab-triggers {
    display: flex;
    gap: 24px;
}

.tab-trigger {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 10px 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    margin-bottom: -1px;
}

.tab-trigger:hover {
    color: var(--text-primary);
}

.tab-trigger.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: 600;
}

.tab-content-panel {
    animation: smoothFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Split layout */
.split-layout-grid {
    display: flex;
    gap: 20px;
}

.regions-list-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Dashboard Controls */
.dashboard-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--bg-card);
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

.toggle-group {
    display: flex;
    background-color: var(--status-gray-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 2px;
}

.btn-toggle {
    height: 24px;
    padding: 0 10px;
    border: none;
    background: transparent;
    font-size: 11px;
    font-weight: 500;
    border-radius: 4px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-toggle.active {
    background-color: var(--bg-card);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    font-weight: 600;
}

.control-select {
    height: 28px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0 8px;
    font-size: 11.5px;
    color: var(--text-secondary);
    background-color: var(--bg-card);
    outline: none;
    cursor: pointer;
}

.dashboard-custom-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 18px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.tip-msg {
    font-size: 11.5px;
    color: var(--text-secondary);
    border-left: 3px solid var(--secondary-color);
    padding-left: 12px;
    line-height: 1.4;
}

/* Metrics Widgets */
.metrics-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.metric-widget-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    animation: cardEntrance 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.metric-widget-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

@keyframes cardEntrance {
    from { opacity: 0; transform: scale(0.98) translateY(6px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.metric-widget-card .widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.widget-title-area {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: grab;
}

.drag-handle {
    color: var(--text-muted);
}

.widget-title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
}

.widget-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-icon {
    border: 1px solid var(--border-color);
    background-color: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    width: 44px;
    height: 24px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.btn-icon:hover {
    background-color: var(--status-gray-bg);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.btn-icon.delete-btn {
    color: var(--status-danger-text);
    width: 24px;
}

.btn-icon.delete-btn:hover {
    background-color: var(--status-danger-bg);
    border-color: var(--status-danger-border);
}

.widget-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.text-status-value {
    font-size: 26px;
    font-weight: 600;
    color: var(--status-success-text);
    margin-bottom: 4px;
    font-family: 'Outfit', sans-serif;
    font-feature-settings: "tnum" 1;
}

.text-subinfo {
    font-size: 11.5px;
    color: var(--text-muted);
}

.metric-widget-card.w-wide { grid-column: span 2; }
.metric-widget-card.w-half { grid-column: span 1; }

/* Charts */
.chart-container {
    height: 120px;
    position: relative;
    width: 100%;
}
.chart-svg {
    width: 100%;
    height: 100%;
}
.chart-line {
    fill: none;
    stroke: var(--secondary-color);
    stroke-width: 2;
    stroke-linecap: round;
}
.chart-area {
    fill: url(#chart-gradient);
    opacity: 0.2;
}
.chart-grid-line {
    stroke: var(--border-color);
    stroke-width: 1;
}

.radial-progress-container {
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: 100%;
}
.radial-svg {
    width: 110px;
    height: 110px;
    transform: rotate(-90deg);
}
.radial-bg {
    fill: none;
    stroke: var(--status-gray-bg);
    stroke-width: 8;
}
.radial-fill {
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 8;
    stroke-dasharray: 251.2;
    stroke-dashoffset: 80;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.radial-center-text {
    position: absolute;
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-feature-settings: "tnum" 1;
}

/* Minimal Layout mode */
.view-minimal .metric-widget-card {
    min-height: 110px;
    padding: 12px 16px;
}
.view-minimal .chart-container,
.view-minimal .radial-progress-container {
    display: none;
}
.view-minimal .text-status-value {
    font-size: 20px;
    margin-bottom: 0;
}

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.spinning {
    animation: spin 0.8s linear infinite;
}

/* ==============================================================================
 * Drawers & Modals (Glassmorphism & Spring Easing)
 * ============================================================================== */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    justify-content: flex-end;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.drawer-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.drawer-card {
    width: 500px;
    background-color: var(--bg-card);
    border-left: 1px solid var(--border-color);
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer-overlay.active .drawer-card {
    transform: translateX(0);
}

.drawer-header {
    height: 60px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
}

.drawer-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
}

.drawer-close-btn {
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}
.drawer-close-btn:hover {
    background-color: var(--status-gray-bg);
    color: var(--text-primary);
}

.drawer-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 24px;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 620px;
    max-width: 92%;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.modal-overlay.active .modal-card {
    transform: scale(1) translateY(0);
}

.modal-header {
    height: 54px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
}

.modal-close-btn {
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}
.modal-close-btn:hover {
    background-color: var(--status-gray-bg);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(85vh - 54px);
}

/* Wizard Steps */
.wizard-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 14px;
}

.wizard-step-node {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: var(--text-muted);
    font-size: 11.5px;
}

.wizard-step-node.active {
    color: var(--primary-color);
    font-weight: 600;
}

.wizard-step-node.completed {
    color: var(--status-success-text);
}

.step-num {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10.5px;
    font-weight: 600;
}

.wizard-step-node.active .step-num {
    border-color: var(--primary-color);
    background-color: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 0 8px var(--primary-glow);
}

.wizard-step-node.completed .step-num {
    border-color: var(--status-success-text);
    background-color: var(--status-success-text);
    color: #ffffff;
}

.wizard-step-panel {
    display: none;
}
.wizard-step-panel.active {
    display: block;
    animation: smoothFadeIn 0.2s ease;
}

.wizard-footer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 24px;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}

/* Range Sliders */
.range-specs-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 6px;
}

.range-input {
    flex-grow: 1;
    height: 6px;
    border-radius: 3px;
    background-color: var(--status-gray-bg);
    outline: none;
    -webkit-appearance: none;
}

.range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.range-val-badge {
    width: 64px;
    height: 28px;
    border: 1px solid var(--border-color);
    background-color: var(--status-gray-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border-radius: var(--radius-sm);
    font-size: 11.5px;
    font-family: 'JetBrains Mono', monospace;
}

.wizard-price-card {
    background-color: var(--primary-light);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
}

.price-title {
    font-weight: 600;
    color: var(--text-primary);
}

.price-val {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
    font-family: 'Outfit', sans-serif;
}

/* Connection Test */
.connection-test-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 36px 16px;
}

.scanning-ring {
    width: 64px;
    height: 64px;
    border: 3px dashed var(--secondary-color);
    border-radius: 50%;
    animation: spin 2.5s linear infinite;
    margin-bottom: 16px;
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.2);
}

/* ==============================================================================
 * Toasts & Notifications
 * ============================================================================== */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast-item {
    width: 340px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    pointer-events: auto;
    animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transition: all 0.2s ease;
}

@keyframes toastSlideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast-item.toast-success { border-left-color: var(--status-success-text); }
.toast-item.toast-danger { border-left-color: var(--status-danger-text); }
.toast-item.toast-warning { border-left-color: var(--status-warning-text); }
.toast-item.toast-info { border-left-color: var(--status-info-text); }

.toast-icon {
    flex-shrink: 0;
    margin-top: 2px;
}
.toast-success .toast-icon { color: var(--status-success-text); }
.toast-danger .toast-icon { color: var(--status-danger-text); }
.toast-warning .toast-icon { color: var(--status-warning-text); }
.toast-info .toast-icon { color: var(--status-info-text); }

.toast-content {
    flex-grow: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 12.5px;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.toast-desc {
    font-size: 11.5px;
    color: var(--text-muted);
    line-height: 1.45;
}

.toast-close {
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.15s ease;
}
.toast-close:hover {
    background-color: var(--status-gray-bg);
    color: var(--text-primary);
}

/* ==============================================================================
 * Telemetry & Scoped Layouts
 * ============================================================================== */
.dashboard-row-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
    margin-top: 16px;
}

.telemetry-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.card-title-bordered {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.legend-row {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    justify-content: flex-end;
}

.legend-item {
    font-size: 11.5px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}
.legend-dot.orange { background-color: var(--cloud-aliyun); }
.legend-dot.blue { background-color: var(--secondary-color); }

.telemetry-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.telemetry-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 10px;
    color: var(--text-secondary);
    font-size: 12.5px;
}
.telemetry-list-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}


/* --- Interaction polish (precision console) --- */
.search-miss { display: none !important; }
.search-hit-row { outline: 1px solid rgba(59, 130, 246, 0.45); outline-offset: -1px; }

.stat-card.clickable-tab-trigger,
.platform-card.interactive,
.tab-trigger,
.btn-icon,
.nav-link,
.header-icon-btn,
.menu-item,
.submenu-item,
.user-profile,
.workdesk-btn {
    cursor: pointer;
}

.stat-card.clickable-tab-trigger {
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.stat-card.clickable-tab-trigger:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
}

.btn-icon {
    cursor: pointer;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    padding: 2px 6px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-icon:hover {
    color: var(--text-primary);
    border-color: var(--border-color);
    background: var(--bg-surface-nested);
}

@keyframes livePulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 currentColor; }
    50% { opacity: 0.55; box-shadow: 0 0 0 5px transparent; }
}
.dot.green,
.dot.orange,
.dot.red,
.platform-dot,
.platform-indicator {
    animation: livePulse 2.2s ease-in-out infinite;
}

@keyframes sparkDraw {
    from { stroke-dashoffset: 1000; }
    to { stroke-dashoffset: 0; }
}
@keyframes sparkPulse {
    0%, 100% { opacity: 0.75; }
    50% { opacity: 1; }
}
.spark-line {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 240;
    animation: sparkDraw 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards, sparkPulse 2.8s ease-in-out 0.9s infinite;
}
.chart-line {
    stroke-dasharray: 900;
    animation: sparkDraw 1.15s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.radial-fill {
    animation: sparkPulse 3s ease-in-out infinite;
}

.placeholder-panel {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
}
.placeholder-panel h4 {
    font-size: 15px;
    margin-bottom: 8px;
    color: var(--text-primary);
}
.placeholder-kicker {
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.placeholder-panel .mock-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    font-feature-settings: "tnum" 1;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
}

.lang-toggle-btn { min-width: 52px; width: auto; padding: 0 8px; }

.nav-link:focus-visible,
.btn:focus-visible,
.search-box:focus-within {
    outline: none;
}

body.theme-dark .bg-card,
body.theme-dark .platform-card,
body.theme-dark .table-container,
body.theme-dark .metric-widget-card,
body.theme-dark .telemetry-card,
body.theme-dark .modal-card,
body.theme-dark .drawer-card {
    background-color: var(--bg-card);
}

.menu-item.active {
    background: var(--bg-surface-nested);
}

.tab-trigger {
    cursor: pointer;
}

.data-table td, .data-table th, .stat-value {
    font-feature-settings: "tnum" 1;
}
