/*
 * DevvUP — Design System
 * Matched to DevvMail's visual language.
 * No frameworks, no preprocessors — pure CSS.
 */

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CSS Custom Properties
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

:root {
    --bg-primary: #f0f4f8;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-hover: #eef2f7;
    --bg-input: #f7f9fc;
    --border-color: #e2e8f0;

    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;

    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --accent-light: rgba(99, 102, 241, 0.10);

    --success: #34d399;
    --success-bg: rgba(52, 211, 153, 0.12);
    --warning: #fbbf24;
    --warning-bg: rgba(251, 191, 36, 0.12);
    --error: #f87171;
    --error-bg: rgba(248, 113, 113, 0.12);
    --info: #60a5fa;
    --info-bg: rgba(96, 165, 250, 0.10);

    --sidebar-width: 250px;
    --sidebar-collapsed-width: 68px;
    --header-height: 60px;

    --radius: 14px;
    --radius-sm: 8px;

    --shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
    --shadow-glow: 0 0 20px rgba(99,102,241,0.10);

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

    --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);

    --gradient-accent: linear-gradient(135deg, #6366f1, #8b5cf6);
    --gradient-success: linear-gradient(135deg, #34d399, #6ee7b7);
    --gradient-warm: linear-gradient(135deg, #fbbf24, #f59e0b);
    --gradient-rose: linear-gradient(135deg, #fb7185, #f43f5e);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Reset & Base
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

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

html {
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    color: var(--text-primary);
    background: var(--bg-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover {
    color: var(--accent-hover);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
}

code, pre {
    font-family: var(--font-mono);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Layout
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.app-layout {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition);
}

.sidebar-collapsed .main-content {
    margin-left: var(--sidebar-collapsed-width);
}

.page-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}

.page-header h1 {
    font-size: 1.375rem;
    font-weight: 700;
}

.page-header .page-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.125rem;
}

.page-body {
    padding: 1.5rem 2rem;
    flex: 1;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Sidebar
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: width var(--transition);
}

.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed-width);
}

.sidebar-logo {
    padding: 1.375rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
    min-height: 78px;
}

.sidebar-logo img {
    width: 55px;
    height: 55px;
    border-radius: 14px;
    object-fit: contain;
}

.sidebar-logo .logo-text {
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: -0.3px;
    color: var(--text-primary);
    transition: opacity 0.2s ease, width 0.2s ease;
}

.sidebar-logo .logo-text .logo-accent {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-collapsed .sidebar-logo {
    justify-content: center;
    padding: 1.375rem 0.75rem;
}

.sidebar-collapsed .sidebar-logo .logo-icon img {
    width: 47px;
    height: 47px;
}

.sidebar-collapsed .sidebar-logo .logo-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
    position: absolute;
}

.sidebar-collapsed .sidebar-toggle {
    display: none;
}

.sidebar-nav {
    flex: 1;
    padding: 0.5rem 0;
    overflow-y: auto;
}

.nav-section-label {
    padding: 0.5rem 1.5rem 0.25rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
}

.nav-section-label:not(:first-child) {
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.sidebar-collapsed .nav-section-label {
    font-size: 0;
    padding: 0;
    margin: 0;
    border: none;
    height: 0;
    overflow: hidden;
}

.sidebar-collapsed .nav-section-label:not(:first-child) {
    margin-top: 0.25rem;
    padding-top: 0.25rem;
    border-top: 1px solid var(--border-color);
    height: auto;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.625rem 1.5rem;
    color: var(--text-secondary);
    border-left: 3px solid transparent;
    transition: all var(--transition);
    text-decoration: none;
    position: relative;
}

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

.nav-link.active {
    background: var(--accent-light);
    color: var(--accent);
    border-left-color: var(--accent);
    font-weight: 600;
}

.nav-link svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sidebar-collapsed .nav-link {
    justify-content: center;
    padding: 0.75rem 0;
    border-left: 3px solid transparent;
}
.sidebar-collapsed .nav-link span:not(.nav-badge) {
    opacity: 0;
    width: 0;
    overflow: hidden;
    position: absolute;
}

.nav-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.1rem 0.45rem;
    border-radius: 9999px;
    margin-left: auto;
    min-width: 1.2rem;
    text-align: center;
    line-height: 1.3;
}
.nav-badge.error-badge {
    background: var(--error-bg);
    color: #dc2626;
}
.nav-badge.alert-badge {
    background: var(--warning-bg);
    color: #d97706;
}

/* Impersonation */
.nav-section-label.impersonation-label {
    color: #3f6212;
    background: #f7fee7;
    border-top: 2px solid #bef264;
    margin: 0.5rem 0.75rem;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
}

.nav-link.impersonation-link {
    color: #4d7c0f;
    background: #f7fee7;
}
.nav-link.impersonation-link:hover {
    background: #ecfccb;
}

.stop-impersonation-btn {
    display: block;
    width: calc(100% - 1.5rem);
    margin: 0.5rem 0.75rem;
    padding: 0.5rem 1rem;
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fca5a5;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
}
.stop-impersonation-btn:hover {
    background: #fee2e2;
}

/* Sidebar footer */
.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-footer .user-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 0.825rem;
}

.sidebar-username {
    font-size: 0.825rem;
    font-weight: 500;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-collapsed .sidebar-username {
    display: none;
}

.sidebar-collapsed .sidebar-footer {
    padding: 1rem 0.5rem;
    text-align: center;
}

.sidebar-collapsed .sidebar-footer .user-info {
    justify-content: center;
}

.sidebar-collapsed .sidebar-logout {
    padding: 0.35rem;
}

.sidebar-logout {
    background: linear-gradient(135deg, #fb7185, #f43f5e);
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: var(--font-family);
    transition: all var(--transition);
    min-width: 20px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    box-shadow: 0 2px 6px rgba(244, 63, 94, 0.2);
}
.sidebar-logout:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 10px rgba(244, 63, 94, 0.3);
    transform: translateY(-1px);
}
.sidebar-logout svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sidebar-collapsed .sidebar-logout span {
    display: none;
}

.sidebar-toggle {
    margin-left: auto;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: var(--accent-light);
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-size: 0.75rem;
    transition: all var(--transition);
    border-radius: 6px;
}
.sidebar-toggle:hover {
    background: var(--accent);
    color: #fff;
}
.sidebar-toggle svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    transition: transform var(--transition);
}
.sidebar-collapsed .sidebar-toggle svg {
    transform: rotate(180deg);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Buttons
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: var(--font-family);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    border: none;
    line-height: 1.4;
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-accent);
    color: white;
    box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}
.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99,102,241,0.4);
}

.btn-success {
    background: var(--gradient-success);
    color: white;
    box-shadow: 0 2px 8px rgba(52,211,153,0.3);
}
.btn-success:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--gradient-rose);
    color: white;
    box-shadow: 0 2px 8px rgba(251,113,133,0.3);
}
.btn-danger:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn-warning {
    background: var(--gradient-warm);
    color: white;
    box-shadow: 0 2px 8px rgba(251,191,36,0.3);
}

.btn-secondary {
    background: var(--bg-hover);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover {
    background: var(--bg-primary);
}

.btn-ghost {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.btn-ghost:hover {
    border-color: var(--accent);
    box-shadow: 0 3px 10px rgba(99,102,241,0.15);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
}

.btn-icon {
    padding: 0.5rem;
    border-radius: var(--radius-sm);
}

.btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Forms
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 0.375rem;
}

.form-control {
    width: 100%;
    padding: 0.625rem 0.75rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: var(--font-family);
    color: var(--text-primary);
    transition: all var(--transition);
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
    outline: none;
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
}

.form-help {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.form-error {
    font-size: 0.8rem;
    color: #dc2626;
    margin-top: 0.25rem;
}

/* Inline form row */
.form-row {
    display: flex;
    gap: 1rem;
}
.form-row .form-group {
    flex: 1;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Cards
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

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

.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
}

.card-body {
    padding: 1.25rem;
}

/* Stat cards */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
    transition: all var(--transition);
}

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

.stat-card .stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.05em;
}

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

.stat-card .stat-change {
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.stat-card.success .stat-value { color: #10b981; }
.stat-card.warning .stat-value { color: #f59e0b; }
.stat-card.error   .stat-value { color: #f87171; }
.stat-card.info    .stat-value { color: var(--accent); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Tables
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

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

.data-table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--text-muted);
    padding: 0.75rem 1rem;
    background: var(--bg-input);
    letter-spacing: 0.05em;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    font-size: 0.85rem;
    padding: 0.625rem 1rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.data-table tr:hover td {
    background: var(--bg-hover);
}

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

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Badges
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    border-radius: 9999px;
    padding: 0.2rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-up, .badge-success {
    background: #d1fae5;
    color: #059669;
}
.badge-down, .badge-error {
    background: #fee2e2;
    color: #dc2626;
}
.badge-degraded, .badge-warning {
    background: #fef3c7;
    color: #d97706;
}
.badge-paused {
    background: #e0e7ff;
    color: #4f46e5;
}
.badge-pending {
    background: #f1f5f9;
    color: #64748b;
}
.badge-info {
    background: #dbeafe;
    color: #3b82f6;
}

/* Status dot (for health indicators) */
.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
.status-dot.up {
    background: #10b981;
    box-shadow: 0 0 6px rgba(16,185,129,0.4);
}
.status-dot.down {
    background: #ef4444;
    box-shadow: 0 0 6px rgba(239,68,68,0.4);
}
.status-dot.degraded {
    background: #f59e0b;
    box-shadow: 0 0 6px rgba(245,158,11,0.4);
}
.status-dot.unknown, .status-dot.pending {
    background: #94a3b8;
}
.status-dot.paused {
    background: #6366f1;
}

/* Pulsing dot for active UP status */
.status-dot.up.pulse {
    animation: pulse-green 2s infinite;
}
@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 6px rgba(16,185,129,0.4); }
    50% { box-shadow: 0 0 12px rgba(16,185,129,0.6); }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Alerts
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid;
    margin-bottom: 1rem;
}

.alert-error {
    background: var(--error-bg);
    border-color: var(--error);
    color: #b91c1c;
}
.alert-success {
    background: var(--success-bg);
    border-color: var(--success);
    color: #065f46;
}
.alert-warning {
    background: var(--warning-bg);
    border-color: var(--warning);
    color: #92400e;
}
.alert-info {
    background: var(--info-bg);
    border-color: var(--info);
    color: #1e40af;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Toasts
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    animation: slideIn 0.3s ease-out;
    padding: 0.75rem 1.25rem;
    max-width: 400px;
}

.toast-success { background: #d1fae5; color: #065f46; border: 1px solid #34d399; }
.toast-error   { background: #fde8e8; color: #991b1b; border: 1px solid #f87171; }
.toast-warning { background: #fef3c7; color: #92400e; border: 1px solid #fbbf24; }
.toast-info    { background: #dbeafe; color: #1e40af; border: 1px solid #60a5fa; }

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

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Modals
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}

.modal {
    width: 560px;
    max-width: 90vw;
    max-height: 85vh;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    animation: modalIn 0.25s ease-out;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3,
.modal-header h2 {
    font-size: 1.05rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    padding: 0.375rem;
    cursor: pointer;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}
.modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}
.modal-close svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(-10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Slide-out Panel (replaces modals for detail/edit)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.slide-panel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.3);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: none;
}

.slide-panel-overlay.open {
    display: block;
}

.slide-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 500px;
    max-width: 90vw;
    height: 100vh;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    z-index: 201;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 300ms ease;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.08);
}

.slide-panel.open {
    transform: translateX(0);
}

.slide-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.slide-panel-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

.slide-panel-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.slide-panel-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.slide-panel-body {
    padding: 1.25rem;
}

.slide-panel-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* ── Detail Panel Fields ── */
.detail-section {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1rem 1.15rem;
    margin-bottom: 1rem;
}

.detail-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    margin-bottom: 0.6rem;
}

.detail-field {
    margin-bottom: 0.65rem;
}

.detail-field:last-child {
    margin-bottom: 0;
}

.detail-field-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.2rem;
}

.detail-field-value {
    font-size: 0.9rem;
    color: var(--text-primary);
    word-break: break-all;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Inline Add Form (domain-card-static pattern from DevvMail)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.inline-form-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

.inline-form-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.inline-form-card form {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.inline-form-card .form-group {
    margin-bottom: 0;
}

.inline-form-card .form-hint {
    color: var(--text-muted);
    font-size: 0.75rem;
    width: 100%;
    margin-top: 0.25rem;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Monitor List
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.monitor-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow);
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    margin-bottom: 0.75rem;
}

.monitor-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    transform: translateY(-1px);
}

.monitor-card .monitor-status {
    flex-shrink: 0;
}

.monitor-card .monitor-info {
    flex: 1;
    min-width: 0;
}

.monitor-card .monitor-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.monitor-card .monitor-url {
    font-size: 0.8rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.monitor-card .monitor-meta {
    display: flex;
    gap: 1.5rem;
    flex-shrink: 0;
    align-items: center;
}

.monitor-card .monitor-meta-item {
    text-align: center;
}

.monitor-card .monitor-meta-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.05em;
}

.monitor-card .monitor-meta-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Uptime bar (mini sparkline) */
.uptime-bar {
    display: flex;
    gap: 1px;
    height: 24px;
    align-items: flex-end;
}

.uptime-bar .bar-segment {
    width: 3px;
    border-radius: 1px;
    min-height: 4px;
    transition: all var(--transition);
}

.uptime-bar .bar-segment.up { background: #10b981; height: 100%; }
.uptime-bar .bar-segment.down { background: #ef4444; height: 100%; }
.uptime-bar .bar-segment.degraded { background: #f59e0b; height: 70%; }
.uptime-bar .bar-segment.no-data { background: #e2e8f0; height: 30%; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Charts
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

.chart-card h3 {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Health Panel
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.health-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

.health-panel h3 {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.health-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
}
.health-item:last-child {
    border-bottom: none;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Activity Feed
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.activity-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}

.activity-feed {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

.activity-feed h3 {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
}
.activity-item:last-child {
    border-bottom: none;
}

.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}

.activity-item .activity-time {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 0.125rem;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Empty State
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
}

.empty-state svg {
    width: 48px;
    height: 48px;
    stroke: var(--text-muted);
    opacity: 0.5;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Staging Banner
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.staging-banner {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 25%;
    height: 32px;
    background: linear-gradient(135deg,
        rgba(186,148,255,0.75), rgba(130,200,255,0.70),
        rgba(255,160,210,0.70), rgba(148,220,255,0.75));
    background-size: 300% 300%;
    animation: stagingGradientShift 8s ease infinite, stagingGlow 4s ease-in-out infinite;
    backdrop-filter: blur(8px);
    color: rgba(255,255,255,0.95);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-shadow: 0 1px 6px rgba(100,60,180,0.4);
    user-select: none;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    border-radius: 0 0 8px 8px;
}

@keyframes stagingGradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes stagingGlow {
    0%, 100% { box-shadow: 0 2px 15px rgba(148,130,255,0.3); }
    50% { box-shadow: 0 2px 25px rgba(148,130,255,0.5); }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Uptime Percentage Display
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.uptime-percentage {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.9rem;
}
.uptime-percentage.excellent { color: #059669; }
.uptime-percentage.good { color: #65a30d; }
.uptime-percentage.fair { color: #d97706; }
.uptime-percentage.poor { color: #dc2626; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Plan Badges
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.badge-plan-free {
    background: #f1f5f9;
    color: #64748b;
}
.badge-plan-paid {
    background: var(--accent-light);
    color: var(--accent);
}
.badge-plan-enterprise {
    background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(139,92,246,0.15));
    color: #6d28d9;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Loading & Skeleton
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: inline-block;
}

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

.skeleton {
    background: linear-gradient(90deg, var(--bg-hover) 25%, var(--bg-input) 50%, var(--bg-hover) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Login Page
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    padding: 2rem;
}

.login-card {
    width: 420px;
    max-width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.login-header {
    padding: 2rem 2rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.login-header .logo-text {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    font-size: 1.75rem;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.375rem;
}

.login-body {
    padding: 2rem;
}

.login-footer {
    padding: 1.25rem 2rem;
    background: var(--bg-input);
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.login-footer a {
    font-weight: 600;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Responsive
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@media (max-width: 1024px) {
    .activity-section {
        grid-template-columns: 1fr;
    }
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform var(--transition);
    }
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .page-header {
        padding: 1rem;
    }
    .page-body {
        padding: 1rem;
    }
    .stat-cards {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    .slide-panel {
        width: 100%;
    }
    .monitor-card {
        flex-wrap: wrap;
    }
    .monitor-card .monitor-meta {
        width: 100%;
        justify-content: space-between;
        margin-top: 0.5rem;
        padding-top: 0.5rem;
        border-top: 1px solid var(--border-color);
    }
}

/* Mobile menu toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 200;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    cursor: pointer;
    box-shadow: var(--shadow);
}
.mobile-menu-toggle svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-primary);
    fill: none;
    stroke-width: 2;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
}

/* Mobile overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.3);
    z-index: 99;
}
.mobile-overlay.active {
    display: block;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Utility Classes
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-success { color: #059669; }
.text-error { color: #dc2626; }
.text-warning { color: #d97706; }

.font-mono { font-family: var(--font-mono); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.hidden { display: none !important; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Filter Bar
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    gap: 4px;
    background: var(--bg-primary);
    border-radius: var(--radius);
    padding: 4px;
}

.filter-btn {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: calc(var(--radius) - 4px);
    cursor: pointer;
    transition: all 0.15s ease;
}

.filter-btn:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.filter-btn.active {
    background: var(--bg-card);
    color: var(--accent);
    box-shadow: var(--shadow-sm);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 0 12px;
}

.search-box svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-primary);
    width: 200px;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Monitors Grid
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.monitors-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.monitor-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 16px 20px;
    transition: border-color 0.15s ease;
}

.monitor-card:hover {
    border-color: var(--accent);
}

.monitor-card[data-status="down"] {
    border-left: 3px solid var(--danger);
}

.monitor-card[data-status="degraded"] {
    border-left: 3px solid var(--warning);
}

.monitor-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.monitor-card-left {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
}

.monitor-name {
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 15px;
}

.monitor-name:hover {
    color: var(--accent);
}

.monitor-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    font-size: 13px;
}

.monitor-card-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.monitor-stats {
    display: flex;
    gap: 20px;
}

.monitor-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.monitor-stat-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.monitor-nodes {
    display: flex;
    gap: 4px;
}

.node-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.monitor-card-actions {
    display: flex;
    gap: 4px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Grid 2-col layout
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .grid-2 { grid-template-columns: 1fr; }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Node Health Panel (Admin)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.node-health-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    gap: 12px;
}

.node-health-row:last-child { border-bottom: none; }

.node-health-row.node-alive .node-info strong::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    margin-right: 8px;
}

.node-health-row.node-dead .node-info strong::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--danger);
    margin-right: 8px;
}

.node-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.node-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.node-actions {
    display: flex;
    gap: 4px;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Upgrade Request Row
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.upgrade-request-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    gap: 16px;
}

.upgrade-request-row:last-child { border-bottom: none; }

.upgrade-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SSL Details
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.ssl-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ssl-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

.ssl-row:last-child { border-bottom: none; }

.ssl-label {
    font-weight: 500;
    color: var(--text-secondary);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Chart Period Selector
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.chart-period-selector {
    display: flex;
    gap: 4px;
}

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

.card-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.card-body {
    padding: 16px 20px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 20px;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Pagination
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.pagination {
    display: flex;
    gap: 4px;
    justify-content: center;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Form Row (2-col inline)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

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

@media (max-width: 480px) {
    .form-row { grid-template-columns: 1fr; }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Text colors
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }

.btn-danger-text:hover {
    color: var(--danger) !important;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Badge variants for monitor types
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.badge-http { background: var(--accent-light); color: var(--accent); }
.badge-keyword { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }
.badge-ssl { background: rgba(6, 182, 212, 0.12); color: #06b6d4; }
.badge-tcp { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Skeleton list
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.skeleton-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Responsive: Monitor card
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@media (max-width: 768px) {
    .monitor-card-header { flex-direction: column; }
    .monitor-card-right { flex-wrap: wrap; }
    .monitor-stats { flex-wrap: wrap; gap: 12px; }
    .filter-bar { flex-direction: column; align-items: stretch; }
    .search-box input { width: 100%; }
}
