/**
 * PuntoStat Dashboard Custom Styles
 */

/* General Styles */
body {
    background-color: #f5f5f5;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Stat Cards */
.stat-card {
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Printer Detail Cards */
.printer-detail-card {
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s;
}

.printer-detail-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.printer-detail-card.border-warning {
    border-left: 4px solid #ffc107 !important;
}

.printer-detail-card .card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

/* Status Indicators */
.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}

.status-online {
    background-color: #28a745;
    box-shadow: 0 0 8px rgba(40, 167, 69, 0.5);
}

.status-offline {
    background-color: #dc3545;
}

/* Gauge Chart Container */
.gauge-container {
    text-align: center;
    padding: 5px;
}

.gauge-chart {
    display: block;
    margin: 0 auto;
}

.gauge-label {
    font-size: 0.7rem;
    color: #6c757d;
    margin-top: 4px;
}

.gauge-value {
    font-size: 0.85rem;
    font-weight: 600;
}

/* Progress Container */
.progress-container {
    text-align: center;
}

.progress-container small {
    display: block;
    font-size: 0.7rem;
}

.progress-container .progress {
    margin: 4px 0;
}

/* Paper Tray Indicators */
.tray-indicator {
    position: relative;
    width: 40px;
    height: 50px;
    background-color: #e9ecef;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    margin: 0 auto;
    overflow: hidden;
}

.tray-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    transition: height 0.3s ease;
}

.tray-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.65rem;
    font-weight: 600;
    color: #495057;
    z-index: 1;
}

/* Mini Stats */
.stat-mini {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background-color: #f8f9fa;
    border-radius: 6px;
}

.stat-mini i {
    font-size: 1.2rem;
}

.stat-mini .stat-value {
    font-size: 1.1rem;
    font-weight: 600;
    margin-right: auto;
}

.stat-mini .stat-label {
    font-size: 0.7rem;
    color: #6c757d;
}

/* Alert List */
.alert-list {
    max-height: 120px;
    overflow-y: auto;
}

.alert-list .alert {
    font-size: 0.8rem;
}

/* Chart Container */
.chart-container {
    position: relative;
    min-height: 300px;
}

/* Table Improvements */
.table th {
    font-weight: 600;
    white-space: nowrap;
}

.table td code {
    background-color: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* Progress bars in tables */
.table .progress {
    min-width: 60px;
}

/* Card Improvements */
.card {
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.card-header {
    background-color: white;
    border-bottom: 1px solid #e9ecef;
}

.card-header h5 {
    font-size: 1rem;
    font-weight: 600;
}

/* Badge Improvements */
.badge {
    font-weight: 500;
    padding: 0.4em 0.65em;
}

/* Button Group */
.btn-group .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Form Controls */
.form-control, .form-select {
    border-radius: 6px;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .stat-card .card-body {
        padding: 1rem;
    }

    .stat-card h3 {
        font-size: 1.5rem;
    }

    .gauge-container {
        padding: 2px;
    }

    .gauge-chart {
        width: 60px !important;
        height: 60px !important;
    }

    .tray-indicator {
        width: 30px;
        height: 40px;
    }

    .printer-detail-card .card-body {
        padding: 0.75rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    .form-control,
    .form-select {
        display: none !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
    }

    body {
        background-color: white !important;
    }
}

/* Animation for loading states */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Tooltip improvements */
.tooltip {
    font-size: 0.8rem;
}

/* Toast container positioning */
.toast-container {
    z-index: 1100;
}

/* Supply level colors */
.supply-critical {
    color: #dc3545;
}

.supply-warning {
    color: #ffc107;
}

.supply-good {
    color: #28a745;
}

/* Date range presets */
.date-presets {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.date-presets .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Export button */
.btn-export {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* Navbar improvements */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-size: 1.1rem;
}

/* Table hover effects */
.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Card border colors for alerts */
.card.border-danger {
    border-left: 4px solid #dc3545 !important;
}

.card.border-success {
    border-left: 4px solid #28a745 !important;
}

.card.border-info {
    border-left: 4px solid #0dcaf0 !important;
}

/* Footer spacing */
.container-fluid {
    padding-bottom: 2rem;
}
