/* Dashboard Styles - Updated with fuel gauge */

.sidebar {
    min-height: auto;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
}

.main-content {
    background-color: #e9ecef;
    min-height: auto;
}

/* Prevent body from forcing scrollbar */
body {
    overflow-y: auto;
    height: 100vh;
}

/* Make the row contain its content without overflow */
.container-fluid > .row {
    min-height: calc(100vh - 56px); /* Subtract navbar height */
    max-height: calc(100vh - 56px);
    overflow: hidden;
}

/* Allow main content to scroll if needed */
.main-content {
    height: calc(100vh - 56px);
    overflow-y: auto;
}

/* Keep sidebar at full height but not forcing overflow */
.sidebar {
    height: calc(100vh - 56px);
    overflow-y: auto;
}


.stat-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: transform 0.2s;
    cursor: pointer;
    height: 155px;
    display: flex;
    flex-direction: column;
    padding: 1.5rem !important;
}

.stat-card h6 {
    margin: 0 0 1rem 0 !important;
    flex-shrink: 0;
}

.stat-card .d-flex {
    flex-grow: 1;
    align-items: center;
}

.stat-card:hover {
    transform: translateY(-2px);
}

/* Fuel Gauge Styles */
.fuel-gauge-container {
    margin: 0;
    padding: 0;
}

.fuel-gauge {
    height: 12px !important;
    background-color: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

.fuel-gauge .progress-bar {
    transition: width 0.6s ease;
    border-radius: 6px;
}

/* Fuel gauge colors */
.progress-bar.bg-danger {
    background: linear-gradient(90deg, #dc3545 0%, #c82333 100%) !important;
}

.progress-bar.bg-warning {
    background: linear-gradient(90deg, #ffc107 0%, #e0a800 100%) !important;
}

.progress-bar.bg-success {
    background: linear-gradient(90deg, #28a745 0%, #1e7e34 100%) !important;
}


.stat-card.fuel-card .flex-grow-1 {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.key-card {
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.2s;
}

.key-card:hover {
    border-color: #4f46e5;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
}

.key-display {
    font-family: 'Monaco', 'Menlo', monospace;
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
    border: 1px solid #e9ecef;
    word-break: break-all;
}

.corner-loading {
    position: fixed;
    top: 70px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50px;
    padding: 8px 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
    z-index: 1050;
    display: none;
    align-items: center;
    gap: 8px;
}

.corner-loading.show {
    display: flex;
}

.corner-loading .spinner-border {
    width: 1rem;
    height: 1rem;
}

/* Overlay Alert Styles */
.overlay-alert {
    position: fixed;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1060;
    min-width: 280px;
    max-width: 400px;
    margin: 0;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.progress {
    height: 8px;
}

.api-docs-card {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 1px solid #cbd5e1;
}

.scope-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
}

.country-indicator {
    display: inline-block;
    background-color: #28a745;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: bold;
    margin-left: 2px;
}

.error-alert {
    display: none;
}

/* Credit level text colors */
.text-fuel-danger {
    color: #dc3545 !important;
}

.text-fuel-warning {
    color: #ffc107 !important;
}

.text-fuel-success {
    color: #28a745 !important;
}

/* Botz count badge - subtle styling */
.botz-count-badge {
    background-color: #e9ecef;
    color: #6c757d;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
}

/* Bot card clickable styling */
.bot-card-clickable {
    transition: all 0.2s;
}

.bot-card-clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
}

.bot-card-clickable .d-flex.gap-1 {
    gap: 0.25rem !important;
}

.bot-card-clickable .btn-sm {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
}

/* Bot action buttons - equal width */
.bot-action-btn {
    min-width: 110px;
}

/* Green-500 hover state */
.bot-action-btn[style*="background-color: #22c55e"]:hover {
    background-color: #16a34a !important;
    border-color: #16a34a !important;
}

/* Expired key card styling */
.key-card-expired {
    background-color: #ffc0cb !important;
    border-color: #ffb3c1 !important;
}

/* Make key display blend with expired card background */
.key-card-expired .key-display {
    background-color: #ffb3c1 !important;
    border-color: #ff9eb3 !important;
}
