/* CloudStack Dashboard - Custom Styles */

:root {
    --cs-primary: #0d6efd;
    --cs-success: #198754;
    --cs-warning: #ffc107;
    --cs-danger: #dc3545;
    --cs-info: #0dcaf0;
}

body {
    background-color: #f8f9fa;
    min-height: 100vh;
}

/* Stats Cards */
.stats-card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: transform 0.2s;
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.stats-card .card-body {
    padding: 1.5rem;
}

.stats-card .stats-icon {
    font-size: 2.5rem;
    opacity: 0.8;
}

.stats-card .stats-value {
    font-size: 1.75rem;
    font-weight: 600;
}

.stats-card .stats-label {
    color: #6c757d;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Chart containers */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

.chart-container-lg {
    height: 400px;
}

/* Tables */
.table-dashboard {
    font-size: 0.9rem;
}

.table-dashboard th {
    background-color: #f8f9fa;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    color: #6c757d;
    border-bottom: 2px solid #dee2e6;
}

.table-dashboard td {
    vertical-align: middle;
}

/* Cost breakdown colors */
.cost-compute { color: var(--cs-primary); }
.cost-storage { color: var(--cs-success); }
.cost-network { color: var(--cs-warning); }
.cost-total { color: var(--cs-danger); font-weight: 600; }

/* Period selector */
.period-selector .btn-check:checked + .btn {
    background-color: var(--cs-primary);
    color: white;
}

/* Login page */
.login-container {
    max-width: 400px;
    margin: 100px auto;
}

.login-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.login-card .card-header {
    background: linear-gradient(135deg, var(--cs-primary), #0056b3);
    color: white;
    border-radius: 15px 15px 0 0;
    padding: 1.5rem;
}

/* Debug page */
.debug-result {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

.debug-success {
    background-color: #d1e7dd;
    border-color: #badbcc;
}

.debug-error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

/* Account details */
.account-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

/* Cost bars */
.cost-bar {
    height: 8px;
    border-radius: 4px;
    background-color: #e9ecef;
    overflow: hidden;
}

.cost-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Navbar customization */
.navbar-brand {
    font-weight: 600;
}

/* Filter cards */
.filter-card {
    background-color: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .stats-card .stats-value {
        font-size: 1.25rem;
    }
    
    .chart-container {
        height: 250px;
    }
}

/* Loading spinner */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Badge colors for status */
.badge-running { background-color: var(--cs-success); }
.badge-stopped { background-color: var(--cs-danger); }
.badge-allocated { background-color: var(--cs-warning); color: #000; }
