/* =========================================
   Server Manager Dashboard - Corporate Theme
   ========================================= */

:root {
    --primary: #1a1a2e;
    --primary-light: #16213e;
    --primary-dark: #0f0f1a;
    --accent: #0f3460;
    --accent-light: #1a508b;
    --blue: #3b82f6;
    --blue-light: #60a5fa;
    --green: #10b981;
    --green-light: #34d399;
    --red: #ef4444;
    --red-light: #f87171;
    --yellow: #f59e0b;
    --yellow-light: #fbbf24;
    --orange: #f97316;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --sidebar-width: 250px;
    --topbar-height: 60px;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
    --transition: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.5;
    overflow-x: hidden;
}

.hidden { display: none !important; }

/* =========================================
   LOGIN SCREEN
   ========================================= */

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, var(--accent) 100%);
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.logo-icon {
    color: var(--accent);
    margin-bottom: 12px;
}

.login-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.login-header .subtitle {
    font-size: 14px;
    color: var(--gray-500);
    margin-top: 4px;
}

.login-step {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.input-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 15px;
    color: var(--gray-800);
    background: var(--gray-50);
    transition: var(--transition);
    outline: none;
}

.input-group input:focus {
    border-color: var(--blue);
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.code-input {
    text-align: center;
    font-size: 28px !important;
    font-weight: 700;
    letter-spacing: 8px;
    padding: 16px !important;
}

.code-info {
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 20px;
    text-align: center;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    gap: 8px;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-light);
    box-shadow: var(--shadow-md);
}

.btn-primary:disabled {
    background: var(--gray-400);
    cursor: not-allowed;
}

.btn-danger {
    background: var(--red);
    color: white;
}

.btn-danger:hover {
    background: var(--red-light);
}

.btn-full {
    width: 100%;
    padding: 14px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-link {
    background: none;
    color: var(--blue);
    border: none;
    font-size: 13px;
    cursor: pointer;
    width: 100%;
    text-align: center;
    margin-top: 10px;
    padding: 8px;
}

.btn-link:hover {
    text-decoration: underline;
}

.btn-logout {
    background: transparent;
    color: rgba(255,255,255,0.6);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 13px;
    cursor: pointer;
    width: 100%;
    transition: var(--transition);
}

.btn-logout:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.error-msg {
    background: #fef2f2;
    color: var(--red);
    border: 1px solid #fecaca;
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: 13px;
    margin-top: 12px;
    text-align: center;
}

.success-msg {
    background: #f0fdf4;
    color: var(--green);
    border: 1px solid #bbf7d0;
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: 13px;
    margin-top: 12px;
    text-align: center;
}

/* =========================================
   DASHBOARD LAYOUT
   ========================================= */

.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--primary);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: width 0.3s ease, transform 0.3s ease;
    overflow: hidden;
}

.sidebar.collapsed {
    width: 60px;
}

.sidebar.collapsed .sidebar-logo span,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .sidebar-footer .user-info,
.sidebar.collapsed .btn-logout {
    display: none;
}

.sidebar.collapsed .sidebar-header {
    padding: 20px 16px;
    display: flex;
    justify-content: center;
}

.sidebar.collapsed .nav-item {
    padding: 14px 0;
    justify-content: center;
    border-left: 3px solid transparent;
}

.sidebar.collapsed .nav-item svg {
    margin: 0;
}

.sidebar.collapsed .sidebar-footer {
    padding: 12px 8px;
    display: flex;
    justify-content: center;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.nav-item:hover {
    color: white;
    background: rgba(255,255,255,0.05);
}

.nav-item.active {
    color: white;
    background: rgba(255,255,255,0.08);
    border-left-color: var(--blue);
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.user-info {
    margin-bottom: 12px;
}

.user-email {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    word-break: break-all;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.sidebar.collapsed ~ .main-content {
    margin-left: 60px;
}

/* Topbar */
.topbar {
    height: var(--topbar-height);
    background: white;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-left h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-800);
}

.btn-menu {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-600);
    padding: 4px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.last-update {
    font-size: 12px;
    color: var(--gray-500);
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-online { background: #ecfdf5; color: var(--green); }
.status-online::before { background: var(--green); }
.status-unreachable { background: #fef2f2; color: var(--red); }
.status-unreachable::before { background: var(--red); }
.status-connecting { background: #fffbeb; color: var(--yellow); }
.status-connecting::before { background: var(--yellow); animation: pulse 1.5s infinite; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Page Content */
.page-content {
    padding: 24px;
}

.page { display: none; }
.page.active { display: block; }

/* Loading State */
.loading-state {
    text-align: center;
    padding: 40px;
    color: var(--gray-500);
    font-size: 14px;
}

/* =========================================
   SERVER CARDS
   ========================================= */

.servers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 20px;
}

.server-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--green);
    transition: var(--transition);
}

.server-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.server-card.unreachable {
    border-left-color: var(--red);
}

.server-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.server-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-800);
}

.server-ip {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 2px;
}

.server-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.metric-item {
    text-align: center;
    padding: 12px 8px;
    background: var(--gray-50);
    border-radius: var(--radius);
}

.metric-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--gray-800);
}

.metric-label {
    font-size: 11px;
    color: var(--gray-500);
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 2px;
}

.metric-bar {
    width: 100%;
    height: 4px;
    background: var(--gray-200);
    border-radius: 2px;
    margin-top: 6px;
    overflow: hidden;
}

.metric-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.5s ease;
}

.bar-green { background: var(--green); }
.bar-yellow { background: var(--yellow); }
.bar-red { background: var(--red); }

.server-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-100);
    font-size: 12px;
    color: var(--gray-500);
}

/* =========================================
   DATA TABLES
   ========================================= */

.table-container {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: var(--gray-50);
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--gray-200);
}

.data-table td {
    padding: 12px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--gray-100);
}

.data-table tbody tr:hover {
    background: var(--gray-50);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.ssl-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.ssl-ok { background: #ecfdf5; color: var(--green); }
.ssl-warn { background: #fffbeb; color: var(--orange); }
.ssl-danger { background: #fef2f2; color: var(--red); }

/* =========================================
   REPORTS
   ========================================= */

.reports-list {
    display: grid;
    gap: 10px;
}

.report-item {
    background: white;
    border-radius: var(--radius);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: var(--transition);
}

.report-item:hover {
    background: var(--gray-50);
    box-shadow: var(--shadow-md);
}

.report-item-date {
    font-weight: 600;
    color: var(--gray-800);
}

.report-item-info {
    font-size: 13px;
    color: var(--gray-500);
}

.report-detail {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-top: 20px;
}

.report-detail h3 {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--gray-800);
}

.report-overview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.report-stat {
    background: var(--gray-50);
    padding: 16px;
    border-radius: var(--radius);
    text-align: center;
}

.report-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
}

.report-stat-label {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 4px;
}

/* =========================================
   ADMIN
   ========================================= */

.admin-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 16px;
}

.admin-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: white;
    padding: 16px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.admin-form input {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 14px;
    outline: none;
}

.admin-form input:focus {
    border-color: var(--blue);
}

/* =========================================
   RESPONSIVE
   ========================================= */

@media (max-width: 768px) {
    .sidebar {
        width: var(--sidebar-width) !important;
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar.collapsed {
        transform: translateX(-100%);
    }

    .sidebar.collapsed.open {
        transform: translateX(0);
        width: var(--sidebar-width) !important;
    }

    .sidebar.collapsed.open .sidebar-logo span,
    .sidebar.collapsed.open .nav-item span,
    .sidebar.collapsed.open .sidebar-footer .user-info,
    .sidebar.collapsed.open .btn-logout {
        display: unset;
    }

    .sidebar.collapsed.open .nav-item {
        padding: 12px 20px;
        justify-content: flex-start;
    }

    .sidebar.collapsed.open .sidebar-header {
        padding: 20px;
        justify-content: flex-start;
    }

    .main-content,
    .sidebar.collapsed ~ .main-content {
        margin-left: 0 !important;
    }

    .servers-grid {
        grid-template-columns: 1fr;
    }

    .admin-form {
        flex-direction: column;
    }

    .server-metrics {
        grid-template-columns: repeat(3, 1fr);
    }

    .topbar {
        padding: 0 16px;
    }

    .page-content {
        padding: 16px;
    }
}

/* Overlay for mobile sidebar */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
}

.sidebar-overlay.active {
    display: block;
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-400);
}

.empty-state svg {
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 14px;
}

/* =========================================
   VIEW TOGGLE
   ========================================= */

.topbar-center {
    display: flex;
    align-items: center;
}

.view-toggle {
    display: flex;
    background: var(--gray-100);
    border-radius: var(--radius);
    padding: 3px;
    gap: 2px;
}

.view-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    background: transparent;
    color: var(--gray-500);
    transition: var(--transition);
}

.view-toggle-btn:hover {
    color: var(--gray-700);
}

.view-toggle-btn.active {
    background: white;
    color: var(--accent);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* =========================================
   TECHNICAL VIEW (Grafana-style dark)
   ========================================= */

.tech-view-wrapper {
    display: block !important;
}

/* Dark mode for entire page when technical view is active */
.page-content.tech-dark-mode,
.page-content:has(.tech-view-wrapper) {
    background: #1a1a2e;
    padding: 0;
    min-height: calc(100vh - var(--topbar-height));
}

/* Dark topbar when tech view is active */
.main-content.tech-topbar-dark .topbar {
    background: #12122a;
    border-bottom: 1px solid #2a2a4a;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.main-content.tech-topbar-dark .topbar-left h2 {
    color: #e0e0f0;
}

.main-content.tech-topbar-dark .btn-menu {
    color: #8888aa;
}

.main-content.tech-topbar-dark .btn-menu:hover {
    color: #c0c0d8;
}

.main-content.tech-topbar-dark .last-update {
    color: #6b7294;
}

.main-content.tech-topbar-dark .view-toggle {
    background: #1e1e3a;
}

.main-content.tech-topbar-dark .view-toggle-btn {
    color: #6b7294;
}

.main-content.tech-topbar-dark .view-toggle-btn:hover {
    color: #c0c0d8;
}

.main-content.tech-topbar-dark .view-toggle-btn.active {
    background: #2a2a4a;
    color: #60a5fa;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.main-content.tech-topbar-dark .status-online {
    background: rgba(16, 185, 129, 0.15);
    color: var(--green-light);
}

.main-content.tech-topbar-dark .status-unreachable {
    background: rgba(239, 68, 68, 0.15);
    color: var(--red-light);
}

.main-content.tech-topbar-dark .status-connecting {
    background: rgba(245, 158, 11, 0.15);
    color: var(--yellow-light);
}

.tech-view {
    background: #1a1a2e;
    border-radius: 0;
    padding: 24px;
    min-height: calc(100vh - var(--topbar-height));
}

.tech-gauges-row {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 16px 0 24px;
    flex-wrap: wrap;
}

.tech-gauge {
    text-align: center;
}

/* Line Charts */
.tech-charts-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.tech-chart-panel {
    background: #16213e;
    border-radius: var(--radius);
    padding: 14px 16px;
}

.tech-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.tech-chart-title {
    font-size: 13px;
    font-weight: 600;
    color: #8888aa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tech-chart-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.tech-chart-canvas {
    width: 100%;
    height: 180px;
    display: block;
    cursor: crosshair;
}

/* Chart Legend */
.tech-chart-legend-container {
    margin-bottom: 16px;
}

.tech-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
    padding: 8px 0;
}

.tech-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #c0c0d8;
}

.tech-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

/* Chart Tooltip */
.chart-tooltip {
    display: none;
    position: fixed;
    z-index: 9999;
    background: #16213e;
    border: 1px solid #2a2a4a;
    border-radius: 8px;
    padding: 10px 14px;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    min-width: 160px;
}

.chart-tooltip-time {
    font-size: 11px;
    color: #6b7294;
    margin-bottom: 6px;
    font-weight: 600;
}

.chart-tooltip-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 0;
    font-size: 12px;
}

.chart-tooltip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.chart-tooltip-name {
    color: #c0c0d8;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chart-tooltip-val {
    color: #e0e0f0;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.tech-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.tech-dot-sm {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

.tech-dot-online {
    background: var(--green);
    box-shadow: 0 0 6px var(--green);
}

.tech-dot-offline {
    background: var(--red);
    box-shadow: 0 0 6px var(--red);
}

/* Tech Data Table */
.tech-data-table-container {
    margin-top: 8px;
}

.tech-table-title {
    font-size: 14px;
    font-weight: 600;
    color: #8888aa;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tech-data-table {
    width: 100%;
    border-collapse: collapse;
}

.tech-data-table th {
    padding: 10px 14px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: #6b7294;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #2a2a4a;
    background: #12122a;
}

.tech-data-table td {
    padding: 10px 14px;
    font-size: 13px;
    color: #c0c0d8;
    border-bottom: 1px solid #1e1e3a;
}

.tech-data-table tbody tr:hover {
    background: #1e2844;
}

/* Disconnected server row in tech table */
.tech-row-disconnected {
    opacity: 0.6;
}

.tech-row-disconnected td {
    color: #8888aa;
}

/* Downtime text (red) */
.downtime-text {
    color: var(--red);
    font-weight: 600;
    font-size: 12px;
}

/* Disconnected server card opacity */
.server-card.unreachable .metric-value {
    color: var(--gray-400);
}

/* =========================================
   OUTAGE SUMMARY CARDS
   ========================================= */

.outage-summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.outage-summary-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
}

.outage-summary-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.outage-summary-label {
    font-size: 12px;
    color: var(--gray-500);
    font-weight: 500;
}

/* Outage Filter */
.outage-filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--gray-600);
}

.outage-filter-bar select {
    padding: 8px 14px;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 14px;
    background: white;
    color: var(--gray-700);
    outline: none;
    cursor: pointer;
    min-width: 180px;
}

.outage-filter-bar select:focus {
    border-color: var(--blue);
}

/* Outage Status Badges */
.outage-status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.outage-resolved {
    background: #ecfdf5;
    color: var(--green);
}

.outage-ongoing {
    background: #fef2f2;
    color: var(--red);
}

/* Ongoing outage row highlight */
.outage-row-ongoing {
    background: #fef2f2 !important;
}

.outage-row-ongoing:hover {
    background: #fee2e2 !important;
}

/* Domains toolbar */
.domains-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.domains-toolbar .btn {
    gap: 6px;
}

.domains-toolbar .btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

/* Server label in domains table */
.server-label {
    display: inline-block;
    padding: 2px 8px;
    background: var(--gray-100);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-600);
}

/* =========================================
   RESPONSIVE - TECHNICAL VIEW
   ========================================= */

@media (max-width: 992px) {
    .tech-charts-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .tech-charts-row {
        grid-template-columns: 1fr;
    }

    .tech-gauges-row {
        gap: 16px;
    }

    .view-toggle-btn span {
        display: none;
    }

    .view-toggle-btn {
        padding: 6px 10px;
    }

    .outage-summary-cards {
        grid-template-columns: 1fr;
    }

    .outage-filter-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .outage-filter-bar select {
        width: 100%;
    }
}
