/* ============================================================
   WHM VPS Sentinel - Core & Standalone Stylesheet
   Self-contained styling ensuring 100% layout integrity
   even if external CDNs are blocked by browser extensions or CSP
============================================================ */

:root {
    --bg-primary: #0b0f19;
    --bg-secondary: #111827;
    --bg-card: rgba(17, 24, 39, 0.85);
    --border-card: rgba(255, 255, 255, 0.08);
    --accent-indigo: #6366f1;
    --accent-cyan: #06b6d4;
    --accent-emerald: #10b981;
    --accent-amber: #f59e0b;
    --accent-rose: #f43f5e;
}

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

body {
    background-color: var(--bg-primary);
    color: #f3f4f6;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    min-height: 100vh;
}

/* Base Layout */
.max-w-7xl { max-width: 80rem; margin-left: auto; margin-right: auto; }
.max-w-4xl { max-width: 56rem; margin-left: auto; margin-right: auto; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.h-16 { height: 4rem; }
.h-64 { height: 16rem; }
.min-h-screen { min-height: 100vh; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.z-50 { z-index: 50; }

/* Display & Flexbox */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-1 { flex: 1 1 0%; }
.flex-shrink-0 { flex-shrink: 0; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-baseline { align-items: baseline; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.hidden { display: none !important; }
.block { display: block; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

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

@media (min-width: 640px) {
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sm\:inline { display: inline !important; }
    .sm\:flex-row { flex-direction: row !important; }
    .sm\:items-center { align-items: center !important; }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .lg\:col-span-2 { grid-column: span 2 / span 2; }
}

/* Gaps */
.gap-1 { gap: 0.25rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-2\.5 { gap: 0.625rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

/* Padding & Margin */
.p-0\.5 { padding: 0.125rem; }
.p-2 { padding: 0.5rem; }
.p-2\.5 { padding: 0.625rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-2\.5 { padding-left: 0.625rem; padding-right: 0.625rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-3\.5 { padding-left: 0.875rem; padding-right: 0.875rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.pt-2 { padding-top: 0.5rem; }
.pt-3 { padding-top: 0.75rem; }
.pb-3 { padding-bottom: 0.75rem; }
.mt-0\.5 { margin-top: 0.125rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-1\.5 { margin-bottom: 0.375rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.my-1 { margin-top: 0.25rem; margin-bottom: 0.25rem; }
.my-2 { margin-top: 0.5rem; margin-bottom: 0.5rem; }

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

/* Borders & Radius */
.border { border: 1px solid rgba(255, 255, 255, 0.08); }
.border-t { border-top: 1px solid rgba(255, 255, 255, 0.08); }
.border-b { border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.border-gray-800 { border-color: #1f2937; }
.border-gray-700 { border-color: #374151; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-full { border-radius: 9999px; }
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }

/* Glassmorphism Panel */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-card);
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease-in-out;
}

.glass-panel:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

/* Typography */
.font-mono { font-family: 'JetBrains Mono', monospace, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-\[10px\] { font-size: 10px; }
.text-\[11px\] { font-size: 11px; }
.uppercase { text-transform: uppercase; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-wide { letter-spacing: 0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-widest { letter-spacing: 0.1em; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

/* Colors */
.text-white { color: #ffffff; }
.text-gray-100 { color: #f3f4f6; }
.text-gray-200 { color: #e5e7eb; }
.text-gray-300 { color: #d1d5db; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-indigo-400 { color: #818cf8; }
.text-indigo-300 { color: #a5b4fc; }
.text-cyan-400 { color: #22d3ee; }
.text-cyan-300 { color: #67e8f9; }
.text-emerald-400 { color: #34d399; }
.text-emerald-300 { color: #6ee7b7; }
.text-amber-400 { color: #fbbf24; }
.text-amber-300 { color: #fcd34d; }
.text-rose-400 { color: #f87171; }
.text-rose-300 { color: #fca5a5; }
.text-purple-400 { color: #c084fc; }
.text-blue-400 { color: #60a5fa; }
.text-blue-300 { color: #93c5fd; }

/* Backgrounds */
.bg-gray-900 { background-color: #111827; }
.bg-gray-900\/40 { background-color: rgba(17, 24, 39, 0.4); }
.bg-gray-900\/60 { background-color: rgba(17, 24, 39, 0.6); }
.bg-gray-900\/80 { background-color: rgba(17, 24, 39, 0.8); }
.bg-gray-900\/90 { background-color: rgba(17, 24, 39, 0.9); }
.bg-gray-800 { background-color: #1f2937; }
.bg-gray-800\/80 { background-color: rgba(31, 41, 55, 0.8); }
.bg-gray-800\/90 { background-color: rgba(31, 41, 55, 0.9); }
.bg-indigo-600 { background-color: #4f46e5; }
.bg-indigo-500 { background-color: #6366f1; }
.bg-indigo-500\/10 { background-color: rgba(99, 102, 241, 0.1); }
.bg-indigo-500\/15 { background-color: rgba(99, 102, 241, 0.15); }
.bg-indigo-500\/20 { background-color: rgba(99, 102, 241, 0.2); }
.border-indigo-500\/20 { border-color: rgba(99, 102, 241, 0.2); }
.border-indigo-500\/25 { border-color: rgba(99, 102, 241, 0.25); }
.border-indigo-500\/30 { border-color: rgba(99, 102, 241, 0.3); }
.max-w-\[130px\] { max-width: 130px; }
.text-\[10px\] { font-size: 10px; }
.bg-cyan-500 { background-color: #06b6d4; }
.bg-cyan-500\/10 { background-color: rgba(6, 182, 212, 0.1); }
.bg-emerald-500 { background-color: #10b981; }
.bg-emerald-500\/10 { background-color: rgba(16, 185, 129, 0.1); }
.bg-amber-600 { background-color: #d97706; }
.bg-amber-500\/10 { background-color: rgba(245, 158, 11, 0.1); }
.bg-amber-500\/20 { background-color: rgba(245, 158, 11, 0.2); }
.bg-amber-950\/20 { background-color: rgba(69, 26, 3, 0.2); }
.bg-rose-500 { background-color: #ef4444; }
.bg-rose-500\/10 { background-color: rgba(239, 68, 68, 0.1); }
.bg-rose-500\/20 { background-color: rgba(239, 68, 68, 0.2); }
.bg-rose-950\/20 { background-color: rgba(76, 5, 25, 0.2); }
.bg-purple-500 { background-color: #a855f7; }
.bg-purple-500\/10 { background-color: rgba(168, 85, 247, 0.1); }
.bg-blue-400 { background-color: #60a5fa; }
.bg-blue-500\/10 { background-color: rgba(59, 130, 246, 0.1); }

/* Progress Bars & Heights */
.h-1 { height: 0.25rem; }
.h-1\.5 { height: 0.375rem; }
.h-2 { height: 0.5rem; }
.w-8 { width: 2rem; }
.h-8 { height: 2rem; }
.w-10 { width: 2.5rem; }
.h-10 { height: 2.5rem; }
.w-32 { width: 8rem; }
.w-64 { width: 16rem; }

.progress-bar-fill {
    transition: width 0.5s ease-in-out;
    position: relative;
    overflow: hidden;
}

/* Pulse Dot */
.pulse-dot {
    position: relative;
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.pulse-dot::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    animation: pulse-ring 2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

.pulse-online { background-color: #10b981; }
.pulse-online::after { background-color: rgba(16, 185, 129, 0.4); }

.pulse-warning { background-color: #f59e0b; }
.pulse-warning::after { background-color: rgba(245, 158, 11, 0.4); }

.pulse-critical { background-color: #ef4444; }
.pulse-critical::after { background-color: rgba(239, 68, 68, 0.4); }

@keyframes pulse-ring {
    0% { transform: scale(0.8); opacity: 0.8; }
    50% { transform: scale(1.6); opacity: 0; }
    100% { transform: scale(0.8); opacity: 0; }
}

/* Badges */
.badge-healthy {
    background-color: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-warning {
    background-color: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-critical {
    background-color: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Interactive Elements & Buttons */
button, select, input {
    font-family: inherit;
    font-size: inherit;
}

button {
    cursor: pointer;
    background: none;
    border: none;
}

a {
    color: inherit;
    text-decoration: none;
}

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

/* Inputs on Dark Mode */
input[type="text"], input[type="password"], input[type="number"], input[type="url"], select {
    background-color: #111827;
    border: 1px solid #374151;
    color: #f3f4f6;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    outline: none;
}

input:focus, select:focus {
    border-color: #6366f1;
}

/* Animations */
.animate-spin {
    animation: spin 1s linear infinite;
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-ping {
    animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes ping {
    75%, 100% { transform: scale(2); opacity: 0; }
}

/* Custom Scrollbars */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #0f172a; }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #475569; }
