/*
Dispensight Portal - Main Styles
Additional styling for components and layouts
*/

/* ============================================================================
   GENERAL LAYOUT
   ============================================================================ */

main {
    min-height: calc(100vh - 200px);
}

.container-fluid {
    max-width: 1400px;
}

/* ============================================================================
   NAVIGATION
   ============================================================================ */

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-link:hover {
    transform: translateY(-2px);
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
}

/* ============================================================================
   BADGES & PILLS
   ============================================================================ */

.badge {
    padding: 0.5em 0.85em;
    font-weight: 600;
    font-size: 0.85rem;
}

.badge i {
    font-size: 0.9em;
}

/* ============================================================================
   BUTTONS
   ============================================================================ */

.btn {
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    border: none;
}

.btn-success {
    background: linear-gradient(135deg, #50c878 0%, #3da35d 100%);
    border: none;
}

.btn-warning {
    background: linear-gradient(135deg, #ff8c42 0%, #ff6b35 100%);
    border: none;
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    border: none;
}

/* ============================================================================
   CARDS
   ============================================================================ */

.card {
    border-radius: 12px;
    overflow: hidden;
}

.card-header {
    font-weight: bold;
    padding: 1rem 1.25rem;
}

.card-body {
    padding: 1.5rem;
}

/* ============================================================================
   TABLES
   ============================================================================ */

.table {
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    border: none;
    padding: 1rem;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.table-success {
    background-color: rgba(80, 200, 120, 0.1) !important;
}

.table tbody tr {
    transition: all 0.2s ease;
}

/* ============================================================================
   PROGRESS BARS
   ============================================================================ */

.progress {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    transition: width 0.6s ease;
    font-weight: bold;
}

/* ============================================================================
   ALERTS
   ============================================================================ */

.alert {
    border-radius: 8px;
    border: none;
    font-weight: 500;
}

.alert-success {
    background: linear-gradient(135deg, #50c878 0%, #3da35d 100%);
    color: white;
}

.alert-info {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
}

.alert-warning {
    background: linear-gradient(135deg, #ff8c42 0%, #ff6b35 100%);
    color: white;
}

.alert-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
}

/* ============================================================================
   FORMS
   ============================================================================ */

.form-control,
.form-select {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 0.75rem;
}

.form-control:focus,
.form-select:focus {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-blue);
    color: var(--text-primary);
    box-shadow: 0 0 0 0.2rem rgba(74, 144, 226, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* ============================================================================
   CHARTS
   ============================================================================ */

canvas {
    max-height: 400px;
}

/* ============================================================================
   FOOTER
   ============================================================================ */

footer {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.text-white-50 {
    color: rgba(255, 255, 255, 0.5) !important;
}

.text-muted {
    color: var(--text-secondary) !important;
}

.shadow-sm {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

.shadow {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3) !important;
}

.shadow-lg {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4) !important;
}

/* ============================================================================
   LOADING STATES
   ============================================================================ */

.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--accent-blue);
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================================================
   HOVER EFFECTS
   ============================================================================ */

.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

/* ============================================================================
   RESPONSIVE UTILITIES
   ============================================================================ */

@media (max-width: 992px) {
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    h1.display-4 {
        font-size: 2rem;
    }
    
    .card-body {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .metric-card h2 {
        font-size: 1.5rem;
    }
    
    .metric-icon i {
        font-size: 2rem !important;
    }
    
    .table {
        font-size: 0.8rem;
    }
    
    .table thead th,
    .table tbody td {
        padding: 0.5rem;
    }
}

/* ============================================================================
   PRINT STYLES
   ============================================================================ */

@media print {
    .navbar,
    .btn,
    footer {
        display: none !important;
    }
    
    .card {
        break-inside: avoid;
    }
    
    body {
        background-color: white !important;
        color: black !important;
    }
}
