/* Custom CSS for the control-plane admin interface */

/* Custom utilities */
.has-background-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Dashboard cards */
.card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Status indicators */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-indicator.is-success {
    background-color: #d4edda;
    color: #155724;
}

.status-indicator.is-warning {
    background-color: #fff3cd;
    color: #856404;
}

.status-indicator.is-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.status-indicator.is-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* Progress bars */
.progress-container {
    position: relative;
    background-color: #f5f5f5;
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
}

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

/* Statistics tiles */
.stats-tile {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.stats-tile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.stats-tile:hover::before {
    transform: translateX(0);
}

.stats-number {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stats-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Activity feed */
.activity-item {
    border-left: 3px solid #dbdbdb;
    padding-left: 1rem;
    margin-bottom: 1rem;
    position: relative;
}

.activity-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 0.5rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #dbdbdb;
}

.activity-item.is-success::before {
    background-color: #48c774;
}

.activity-item.is-success {
    border-left-color: #48c774;
}

.activity-item.is-warning::before {
    background-color: #ffdd57;
}

.activity-item.is-warning {
    border-left-color: #ffdd57;
}

.activity-item.is-danger::before {
    background-color: #f14668;
}

.activity-item.is-danger {
    border-left-color: #f14668;
}

/* Table enhancements */
.table.is-hoverable tbody tr:hover {
    background-color: #f8f9fa;
}

.table td {
    vertical-align: middle;
}

/* Button groups */
.button-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Loading states */
.is-loading-overlay {
    position: relative;
}

.is-loading-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.is-loading-overlay.is-loading::after {
    content: 'Loading...';
}

/* Resource usage bars */
.resource-bar {
    background: #f5f5f5;
    border-radius: 4px;
    height: 20px;
    position: relative;
    overflow: hidden;
}

.resource-fill {
    height: 100%;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    transition: width 0.5s ease;
}

.resource-fill.is-low {
    background: linear-gradient(45deg, #48c774, #3ec46d);
}

.resource-fill.is-medium {
    background: linear-gradient(45deg, #ffdd57, #ffd83d);
}

.resource-fill.is-high {
    background: linear-gradient(45deg, #ff9f43, #ff8c1a);
}

.resource-fill.is-critical {
    background: linear-gradient(45deg, #f14668, #ee395b);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .stats-tile {
        padding: 1rem;
    }
    
    .stats-number {
        font-size: 1.5rem;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .button-group .button {
        width: 100%;
    }
}

/* Animation utilities */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Instance state indicators */
.instance-state {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.instance-state.pending {
    background: #fff3cd;
    color: #856404;
}

.instance-state.provisioning {
    background: #cce5ff;
    color: #004085;
}

.instance-state.ready {
    background: #d4edda;
    color: #155724;
}

.instance-state.failed {
    background: #f8d7da;
    color: #721c24;
}

.instance-state.terminated {
    background: #e2e3e5;
    color: #383d41;
}

/* Dashboard grid improvements */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

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