/* ========================================
   LITELLM SUPPORT DASHBOARD - DARK THEME STYLES
   WITH READABILITY IMPROVEMENTS (NO PURE WHITE)
   ======================================== */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #e2e8f0;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ========================================
   HEADER
   ======================================== */
.header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: #f1f5f9;
    padding: 1.5rem 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid #475569;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.logo-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo-container {
    background-color: #f8fafc;
    padding: 0.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    margin-bottom: 0.5rem;
}

.logo-image {
    height: 40px;
    display: block;
}

.logo-subtitle {
    font-size: 0.875rem;
    color: #94a3b8;
    font-weight: 500;
}

.title-section {
    flex: 1;
}

.title-section h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: #f1f5f9;
}

.subtitle {
    font-size: 0.875rem;
    opacity: 0.9;
    font-weight: 400;
    color: #94a3b8;
}

/* ========================================
   MAIN CONTAINER
   ======================================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
}

/* ========================================
   CARDS - IMPROVED READABILITY
   ======================================== */
.card {
    background: #1e293b;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    border: 1px solid #475569;
}

.card h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #f8fafc !important;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #475569;
}

.card h3 {
    color: #f8fafc !important;
}

/* ========================================
   SYSTEM HEALTH - IMPROVED READABILITY
   ======================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: #334155;
    border-radius: 8px;
    padding: 1.25rem;
    border: 1px solid #475569;
    transition: all 0.3s ease;
}

.stat-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
    border-color: #0ea5e9;
}

.stat-title {
    font-size: 0.875rem;
    color: #cbd5e1 !important;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #f1f5f9;
}

.stat-value.healthy {
    color: #10b981;
}

.stat-value.warning {
    color: #f59e0b;
}

.stat-value.error {
    color: #ef4444;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
}

.status-badge.healthy {
    background-color: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge.unhealthy {
    background-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ========================================
   MODEL SECTION - IMPROVED READABILITY
   ======================================== */
.model-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #475569;
}

.model-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #f8fafc !important;
    margin-bottom: 1rem;
}

.model-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
}

.model-card {
    background: #334155;
    border: 1px solid #475569;
    border-radius: 6px;
    padding: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #e2e8f0;
    transition: all 0.2s ease;
}

.model-card:hover {
    background: #475569;
    border-color: #0ea5e9;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.more-models {
    margin-top: 0.75rem;
    color: #94a3b8;
    font-size: 0.875rem;
    font-style: italic;
}

/* ========================================
   USER LIST - IMPROVED READABILITY
   ======================================== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #f8fafc !important;
}

.search-container {
    margin-bottom: 1.5rem;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    border: 1px solid #475569;
    background: #334155;
    color: #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.search-input::placeholder {
    color: #94a3b8;
}

.search-input:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
    background: #1e293b;
}

.user-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.user-card {
    border: 1px solid #475569;
    border-radius: 8px;
    padding: 1.25rem;
    background: #334155;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.user-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    border-color: #0ea5e9;
    transform: translateY(-1px);
}

.user-info {
    flex: 1;
}

.user-email {
    font-size: 1rem;
    font-weight: 600;
    color: #f8fafc !important;
    margin-bottom: 0.25rem;
}

.user-id {
    font-size: 0.875rem;
    color: #cbd5e1 !important;
    margin-bottom: 0.75rem;
}

.warning-badge {
    display: inline-block;
    background-color: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.quota-info {
    margin-top: 0.75rem;
}

.quota-text {
    font-size: 0.875rem;
    color: #cbd5e1;
    margin-bottom: 0.5rem;
}

.no-budget {
    font-size: 0.875rem;
    color: #64748b;
    font-style: italic;
    margin-top: 0.75rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #1e293b;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
    border: 1px solid #475569;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #0ea5e9 100%);
    transition: width 0.3s ease;
}

.progress-fill.warning {
    background: linear-gradient(90deg, #f59e0b 0%, #ef4444 100%);
}

.percent-text {
    font-size: 0.75rem;
    color: #94a3b8;
}

.user-actions {
    display: flex;
    gap: 0.5rem;
    flex-direction: column;
}

/* ========================================
   BUTTONS - IMPROVED (View Details = Gray)
   Note: Button text remains light for proper contrast
   ======================================== */
.btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #f8fafc;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #475569, #334155);
    color: #f1f5f9;
    border: 1px solid #64748b;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #64748b, #475569);
    border-color: #94a3b8;
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #f8fafc;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669, #047857);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #f8fafc;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

/* ========================================
   PAGINATION
   ======================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.25rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #475569;
}

.page-info {
    font-size: 0.875rem;
    color: #94a3b8;
    font-weight: 500;
}

/* ========================================
   MODAL - IMPROVED READABILITY
   ======================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    border: 1px solid #475569;
    z-index: 1001;
    width: 90%;
    max-width: 650px;
    max-height: 90vh;
    overflow: auto;
}

.modal-content {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    border: 1px solid #475569;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #475569;
    background: #1e293b;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #f8fafc !important;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #94a3b8;
    width: 30px;
    height: 30px;
    padding: 0;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: #f1f5f9;
}

.modal-body {
    padding: 1.5rem;
    background: #334155;
    color: #e2e8f0;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.5rem;
    border-top: 1px solid #475569;
    background: #1e293b;
}

/* ========================================
   FORM ELEMENTS - IMPROVED READABILITY
   ======================================== */
.form-section {
    margin-bottom: 1.5rem;
}

.form-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 0.75rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.625rem 0;
    border-bottom: 1px solid #475569;
}

.info-label {
    color: #cbd5e1 !important;
    font-size: 0.875rem;
}

.info-value {
    color: #f8fafc !important;
    font-size: 0.875rem;
    font-weight: 600;
}

.input-group {
    margin-bottom: 1rem;
}

.input-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #e2e8f0 !important;
    margin-bottom: 0.5rem;
}

.required {
    color: #ef4444;
    font-weight: 700;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid #475569;
    background: #1e293b;
    color: #e2e8f0;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #64748b;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
    background: #0f172a;
}

/* ========================================
   SELECT DROPDOWN OPTIONS
   ======================================== */
.form-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e2e8f0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

.form-select option {
    background-color: #1e293b;
    color: #e2e8f0;
    padding: 0.5rem;
}

.form-select option:checked {
    background: linear-gradient(135deg, #334155, #1e293b);
    color: #0ea5e9;
    font-weight: 600;
}

.form-select option:hover {
    background-color: #334155;
}

@-moz-document url-prefix() {
    .form-select option {
        background-color: #1e293b !important;
        color: #e2e8f0 !important;
    }
}

/* ========================================
   MESSAGES
   ======================================== */
.message {
    padding: 0.875rem;
    border-radius: 6px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.message-success {
    background-color: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.message-error {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.message-warning {
    background-color: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

/* ========================================
   LOADING & EMPTY STATES
   ======================================== */
.loading,
.no-users,
.error-message {
    padding: 2.5rem;
    text-align: center;
    color: #94a3b8;
    font-size: 1rem;
}

.error-message {
    color: #ef4444;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: #1f2937;
    color: #9ca3af;
    padding: 1.5rem 0;
    margin-top: auto;
    border-top: 1px solid #374151;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.footer-logo {
    margin-bottom: 1rem;
}

.footer-logo-image {
    height: 32px;
    display: inline-block;
}

.copyright {
    font-size: 0.875rem;
    margin: 0.5rem 0;
    color: #9ca3af;
}

.attribution {
    font-size: 0.75rem;
    color: #6b7280;
    margin: 0.5rem 0;
}

.attribution a {
    color: #3b82f6;
    text-decoration: none;
}

.attribution a:hover {
    text-decoration: underline;
    color: #0ea5e9;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .logo-section {
        align-items: center;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .user-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .user-info {
        width: 100%;
    }

    .user-actions {
        width: 100%;
        flex-direction: row;
    }

    .modal {
        width: 95%;
        max-height: 95vh;
    }
}

/* ========================================
   SCROLLBAR STYLING
   ======================================== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #1e293b;
}

::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* ========================================
   ACCESSIBILITY
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

button:focus,
input:focus,
select:focus,
textarea:focus,
a:focus {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
}

/* ========================================
   LOADING ANIMATIONS
   ======================================== */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading {
    opacity: 0.6;
    animation: pulse 2s ease-in-out infinite;
}

/* ========================================
   ADDITIONAL ENHANCEMENTS
   ======================================== */
.card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

.gradient-border {
    position: relative;
}

.gradient-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #0ea5e9, #10b981);
    border-radius: 12px 12px 0 0;
}

/* ========================================
   COSTING DASHBOARD STYLES
   ======================================== */

/* Costing Dashboard Container */
.dashboard-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 2rem;
}

/* Costing Dashboard Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    color: #f1f5f9;
}

.dashboard-header h2 {
    font-size: 2rem;
    margin: 0;
    color: #f1f5f9;
}

.header-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.date-range-selector {
    display: flex;
    gap: 0.5rem;
    background: #1e293b;
    padding: 0.25rem;
    border-radius: 8px;
    border: 1px solid #334155;
}

.date-range-selector button {
    padding: 0.5rem 1rem;
    background: transparent;
    color: #94a3b8;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.date-range-selector button:hover {
    background: #334155;
    color: #e2e8f0;
}

.date-range-selector button.active {
    background: #3b82f6;
    color: #f8fafc;
}

.header-controls>button {
    padding: 0.5rem 1.5rem;
    background: #3b82f6;
    color: #f8fafc;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.header-controls>button:hover:not(:disabled) {
    background: #2563eb;
}

.header-controls>button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Overview Cards for Costing */
.overview-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.overview-card {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border: 1px solid #475569;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.card-label {
    font-size: 0.875rem;
    color: #94a3b8;
    margin-bottom: 0.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card-value {
    font-size: 2rem;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 0.25rem;
}

/* Colored Overview Cards */
.overview-card-cyan .card-value {
    color: #06b6d4;
}

.overview-card-purple .card-value {
    color: #a78bfa;
}

.overview-card-green .card-value {
    color: #10b981;
}

.overview-card-orange .card-value {
    color: #f59e0b;
}

.card-subtitle {
    font-size: 0.75rem;
    color: #64748b;
}

.card-metadata {
    font-size: 0.7rem;
    color: #64748b;
    margin-top: 0.5rem;
    font-style: italic;
}

/* ========================================
   DAILY SPEND CHART - IMPROVED
   ======================================== */
.chart-container {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 300px;
    padding: 1rem 0;
    gap: 4px;
}

.chart-bar-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

/* Base chart bar styling */
.chart-bar {
    width: 100%;
    border-radius: 4px 4px 0 0;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

/* Daily spend chart - Blue gradient */
.chart-bar-daily {
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.chart-bar-daily:hover {
    background: linear-gradient(180deg, #60a5fa 0%, #3b82f6 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.5);
}

.chart-label {
    margin-top: 0.5rem;
    font-size: 0.7rem;
    color: #94a3b8;
    writing-mode: horizontal-tb;
    text-align: center;
    white-space: nowrap;
}

/* ========================================
   LINE GRAPH STYLES (NEW)
   ======================================== */
.line-graph-container {
    position: relative;
    padding: 1rem 0;
    padding-left: 60px;
}

.line-graph-point {
    transition: all 0.2s ease;
}

.line-graph-point:hover {
    r: 2;
    fill: #60a5fa;
    filter: drop-shadow(0 0 4px rgba(59, 130, 246, 0.8));
}

/* ========================================
   HORIZONTAL BAR CHARTS - COLORFUL
   ======================================== */
.horizontal-chart {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.horizontal-bar-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.horizontal-bar-label {
    font-size: 0.875rem;
    color: #e2e8f0;
    font-weight: 500;
}

.horizontal-bar-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    height: 32px;
    position: relative;
}

/* Base horizontal bar styling */
.horizontal-bar {
    height: 100%;
    border-radius: 4px;
    transition: all 0.3s ease;
    min-width: 2%;
}

/* User bars - Green gradient */
.horizontal-bar-user {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.horizontal-bar-item:hover .horizontal-bar-user {
    background: linear-gradient(90deg, #34d399 0%, #10b981 100%);
    transform: scaleY(1.1);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.5);
}

/* Team bars - Purple gradient */
.horizontal-bar-team {
    background: linear-gradient(90deg, #8b5cf6 0%, #7c3aed 100%);
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.3);
}

.horizontal-bar-item:hover .horizontal-bar-team {
    background: linear-gradient(90deg, #a78bfa 0%, #8b5cf6 100%);
    transform: scaleY(1.1);
    box-shadow: 0 4px 8px rgba(139, 92, 246, 0.5);
}

/* Model bars - Orange/Red gradient */
.horizontal-bar-model {
    background: linear-gradient(90deg, #f59e0b 0%, #ef4444 100%);
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

.horizontal-bar-item:hover .horizontal-bar-model {
    background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%);
    transform: scaleY(1.1);
    box-shadow: 0 4px 8px rgba(245, 158, 11, 0.5);
}

.horizontal-bar-value {
    font-size: 0.875rem;
    color: #94a3b8;
    font-weight: 600;
    white-space: nowrap;
    min-width: 80px;
    text-align: right;
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

/* Costing Dashboard Responsive */
@media (max-width: 1024px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }

    .overview-cards {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .dashboard-container {
        padding: 1rem;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .header-controls {
        flex-direction: column;
        width: 100%;
    }

    .date-range-selector {
        width: 100%;
    }

    .overview-cards {
        grid-template-columns: 1fr;
    }

    .chart-label {
        font-size: 0.6rem;
    }
}

/* Costing Loading and Error States */
.loading-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #f1f5f9;
}

.error-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 2rem;
}

.error-card {
    background: #1e293b;
    border: 1px solid #ef4444;
    border-radius: 12px;
    padding: 2rem;
    max-width: 600px;
}

.error-card strong {
    color: #ef4444;
}

.error-card button {
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: #3b82f6;
    color: #f8fafc;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
}

.error-card button:hover {
    background: #2563eb;
}

/* ========================================
   COSTING DASHBOARD - ADDITIONAL STYLES
   Add these to your existing styles.css
   ======================================== */

/* ========================================
   DAILY SPEND CHART - FIXED LEGEND
   ======================================== */

/* Override the line-graph-container to add proper padding */
.line-graph-container {
    position: relative;
    padding: 1rem 0;
    padding-left: 60px !important;
    /* FIX: Prevent legend cutoff */
    padding-right: 10px !important;
}

/* Ensure Y-axis labels are visible */
.line-graph-y-axis {
    position: absolute;
    left: 0;
    top: 0;
    width: 55px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #94a3b8;
    padding-top: 0;
    padding-bottom: 20px;
}

/* ========================================
   HYBRID FILTER STYLES
   ======================================== */

/* Filter icon button */
.chart-filter-icon {
    background: transparent;
    border: 1px solid #475569;
    border-radius: 6px;
    padding: 0.375rem 0.5rem;
    cursor: pointer;
    color: #94a3b8;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.chart-filter-icon:hover {
    background: #334155;
    border-color: #64748b;
    color: #e2e8f0;
}

.chart-filter-icon.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #f8fafc;
}

/* Filter indicator badge */
.filter-indicator {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    background-color: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Individual filter dropdown panel */
.individual-filter-panel {
    background: #1e293b;
    border: 1px solid #475569;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Filter checkbox list */
.filter-checkbox-list {
    max-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.375rem;
    border-radius: 4px;
    background: transparent;
    transition: background 0.2s ease;
}

.filter-checkbox-item:hover {
    background: #334155;
}

.filter-checkbox-item.selected {
    background: #334155;
}

.filter-checkbox-item input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.filter-checkbox-label {
    font-size: 0.875rem;
    color: #e2e8f0;
    flex: 1;
}

.filter-checkbox-value {
    margin-left: auto;
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 500;
}

/* ========================================
   CACHE STATUS BADGE
   ======================================== */

.cache-status-fresh {
    color: #10b981;
    font-weight: 600;
}

.cache-status-stale {
    color: #f59e0b;
    font-weight: 600;
}

.cache-status-missing {
    color: #64748b;
    font-weight: 600;
}

/* ========================================
   GLOBAL FILTER BAR
   ======================================== */

.global-filter-bar {
    padding: 0.75rem 1rem;
    background-color: #1e293b;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid #475569;
}

.global-filter-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #e2e8f0;
}

.global-filter-tip {
    font-size: 0.75rem;
    color: #64748b;
    font-style: italic;
    margin-left: auto;
}

/* ========================================
   RESPONSIVE UPDATES
   ======================================== */

@media (max-width: 768px) {
    .line-graph-container {
        padding-left: 50px !important;
    }

    .line-graph-y-axis {
        width: 45px;
        font-size: 0.7rem;
    }

    .global-filter-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .global-filter-tip {
        margin-left: 0;
        width: 100%;
    }

    .chart-filter-icon {
        padding: 0.25rem 0.4rem;
        font-size: 0.75rem;
    }
}

/* ========================================
   CHART HEADER IMPROVEMENTS
   ======================================== */

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.chart-title {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #f8fafc;
}

.chart-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* ========================================
   LOADING STATES FOR CHARTS
   ======================================== */

.chart-loading {
    text-align: center;
    color: #94a3b8;
    padding: 2rem;
    font-size: 0.875rem;
    font-style: italic;
}

.chart-no-data {
    text-align: center;
    color: #94a3b8;
    padding: 2rem;
    font-size: 0.875rem;
}

/* ========================================
   TOOLTIPS FOR FILTER ICONS
   ======================================== */

span[title],
div[title]:not(.btn),
p[title],
label[title] {
    position: relative;
    cursor: help;
}

/* Ensure buttons always have pointer cursor */
button,
.btn,
button[title],
.btn[title] {
    cursor: pointer;
}

/* ========================================
   SMOOTH TRANSITIONS
   ======================================== */

.form-select,
.btn,
.chart-filter-icon,
.filter-checkbox-item {
    transition: all 0.2s ease;
}

/* ========================================
   DATE FILTER IMPROVEMENTS
   ======================================== */

.date-range-selector button {
    position: relative;
    overflow: hidden;
}

.date-range-selector button::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #3b82f6;
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.date-range-selector button.active::after {
    transform: scaleX(1);
}

/* ========================================
   ACCESSIBILITY IMPROVEMENTS
   ======================================== */

/* Focus states for interactive elements */
.chart-filter-icon:focus,
.filter-checkbox-item:focus-within {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
}

/* Keyboard navigation support */
.filter-checkbox-item:focus {
    background: #334155;
}

/* Screen reader only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

@media print {

    .header-controls,
    .global-filter-bar,
    .chart-filter-icon,
    .individual-filter-panel {
        display: none !important;
    }

    .card {
        page-break-inside: avoid;
    }

    .dashboard-container {
        background: white !important;
    }

    .line-graph-container {
        padding-left: 40px !important;
    }
}