/* CORE VARIABLES */
:root {
    --brand: #3ECF8E;
    --brand-rgb: 62, 207, 142;
}

body {
    background-color: #111111;
    color: #e0e0e0;
    font-family: 'ui-monospace', 'SFMono-Regular', 'Menlo', 'Monaco', 'Consolas', "Liberation Mono", "Courier New", 'monospace';
    overflow-x: hidden;
}

/* SCROLLBAR - GLOBAL */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { background: var(--brand); }

/* UTILITIES */
.text-brand { color: var(--brand) !important; }
.bg-brand { background-color: var(--brand) !important; }
.border-brand { border-color: var(--brand) !important; }

/* ANIMATIONS */
.status-pulse { animation: pulse-glow 2s infinite; }
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(var(--brand-rgb), 0.7); }
    50% { box-shadow: 0 0 0 6px rgba(var(--brand-rgb), 0); }
}

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

/* COMPONENTS */
.glass-card {
    background: #1C1C1C;
    border: 1px solid #313131;
    transition: all 0.3s ease;
}
.glass-card:hover { border-color: var(--brand); }

.infra-card {
    border-left: 2px solid rgba(var(--brand-rgb), 0.3);
    transition: all 0.3s;
}
.infra-card:hover { border-left-color: var(--brand); }

.gradient-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--brand-rgb), 0.3) 50%, transparent);
}

/* SIDEBAR */
#sidebar {
    scrollbar-width: thin;
}

/* REVEAL LOGIC */
.cred-reveal { display: none; }
.service-card.has-reveal:hover .service-desc-text { display: none; }
.service-card.has-reveal:hover .cred-reveal {
    display: block;
    animation: slideIn 0.2s ease-out;
}

/* ACCORDION */
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details[open] summary ~ * { animation: slideIn 0.3s ease-in-out; }
details > summary .chevron { transition: transform 0.2s; }
details[open] > summary .chevron { transform: rotate(180deg); }

/* CONTENT CARDS SCROLL */
.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

.content-card {
    min-width: 280px;
    max-width: 280px;
}

/* CONTENT CARDS CONTAINER */
#content-cards {
    -webkit-overflow-scrolling: touch;
}

/* STATUS DOTS */
.status-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.status-online { background-color: #3ECF8E; box-shadow: 0 0 5px #3ECF8E; }
.status-offline { background-color: #EF4444; opacity: 0.5; }
.status-checking { background-color: #F59E0B; animation: pulse 1s infinite; }
.status-internal { background-color: #666; opacity: 0.5; } /* Grey for internal/unreachable */

/* REFRESH ANIMATION FIX */
.is-loading svg, .is-loading i {
    display: inline-block !important;
    animation: spin 1s linear infinite !important;
    transform-origin: center !important;
}

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

/* TOAST NOTIFICATIONS */
#toast-container {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 12px 16px;
    padding-right: 40px; /* Space for close button */
    background: #1C1C1C;
    border: 1px solid #313131;
    color: white;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastIn 0.3s cubic-bezier(0.19, 1, 0.22, 1) forwards;
    min-width: 240px;
    position: relative;
}

.toast-close {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.3;
    cursor: pointer;
    transition: all 0.2s;
}

.toast-close:hover { opacity: 1; color: var(--brand); }

.toast-success { border-left: 3px solid var(--brand); }
.toast-error { border-left: 3px solid #EF4444; }
.toast-info { border-left: 3px solid #3B82F6; }

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

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