/* Vultr Panel — Custom Styles */

/* Sidebar active state */
.sidebar-nav-link.active {
    background-color: rgba(255, 255, 255, 0.08);
    color: #fff;
}
.sidebar-nav-link.active .ki-filled,
.sidebar-nav-link.active .ki-outline {
    color: #3b82f6;
}

/* Status badges */
.badge-active {
    background-color: #10b981;
    color: #fff;
}
.badge-stopped {
    background-color: #ef4444;
    color: #fff;
}
.badge-warning {
    background-color: #f59e0b;
    color: #fff;
}

/* Log viewer */
.log-viewer {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.8125rem;
    line-height: 1.5;
    background-color: #1e1e2e;
    color: #cdd6f4;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    max-height: 600px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Config editor textarea */
.config-editor {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.8125rem;
    line-height: 1.6;
    tab-size: 4;
    resize: vertical;
    min-height: 400px;
}

/* Card hover effect */
.card-hover {
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card-hover:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

/* Stat card value */
.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
}
.stat-label {
    font-size: 0.8125rem;
    color: #6b7280;
}

/* Progress bar for disk/memory usage */
.usage-bar {
    height: 6px;
    border-radius: 3px;
    background-color: #e5e7eb;
    overflow: hidden;
}
.usage-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}
.usage-bar-fill.green { background-color: #10b981; }
.usage-bar-fill.yellow { background-color: #f59e0b; }
.usage-bar-fill.red { background-color: #ef4444; }

/* Table improvements */
.table-panel th {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.toast {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    color: #fff;
    font-size: 0.875rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: toast-in 0.3s ease;
    max-width: 400px;
}
.toast-success { background-color: #10b981; }
.toast-error { background-color: #ef4444; }
.toast-warning { background-color: #f59e0b; }
.toast-info { background-color: #3b82f6; }

@keyframes toast-in {
    from { opacity: 0; transform: translateX(1rem); }
    to { opacity: 1; transform: translateX(0); }
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Confirm dialog overlay */
.dialog-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dialog-box {
    background: #fff;
    border-radius: 0.75rem;
    padding: 1.5rem;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

/* Panel modal (full-screen overlay for data browser, variables, status) */
.panel-modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 9990;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modal-fade-in 0.2s ease;
}
.panel-modal {
    background: #fff;
    border-radius: 0.75rem;
    max-width: 95vw;
    max-height: 90vh;
    width: 1200px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    animation: modal-slide-in 0.2s ease;
}
.panel-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}
.panel-modal-body {
    overflow: auto;
    flex-grow: 1;
    max-height: calc(90vh - 60px);
}
.panel-modal-sm {
    width: 700px;
}
@keyframes modal-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes modal-slide-in {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #9ca3af;
}
.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}
