﻿/* Equip.css */
.equipment-page {
    background-color: #f8f9fa;
    min-height: 100vh;
    padding: 0.75rem 0;
}

/* Page Header Styles */
.page-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-title h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 300;
}

.header-title p {
    margin: 0.5rem 0 0 0;
    opacity: 0.9;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Compact View Styles - Single Line Bar */
.page-header.compact {
    padding: 0.75rem 1.5rem;
    margin-bottom: 1rem;
}

.compact-bar {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    align-items: center;
    gap: 1rem;
    height: 2.5rem;
}

.compact-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.compact-icon {
    font-size: 1.25rem;
}

.compact-title {
    font-size: 1.25rem;
    font-weight: 500;
    white-space: nowrap;
}

.compact-center {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.filter-indicator {
    color: #ffc107;
    font-size: 1.2rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.6;
    }
}

.stat-bubble {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    white-space: nowrap;
}

    .stat-bubble.primary {
        background: rgba(102, 126, 234, 0.3);
    }

    .stat-bubble.success {
        background: rgba(86, 171, 47, 0.3);
    }

    .stat-bubble.info {
        background: rgba(79, 172, 254, 0.3);
    }

    .stat-bubble.warning {
        background: rgba(242, 153, 74, 0.3);
    }

.bubble-value {
    font-weight: 600;
    font-size: 1.1rem;
}

.bubble-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

.compact-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
}

.compact-btn {
    padding: 0.25rem 0.75rem;
}

/* Stats Cards */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 1.25rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

    .stat-card .stat-icon {
        font-size: 1.75rem;
        margin-bottom: 0.5rem;
        opacity: 0.8;
    }

    .stat-card .stat-value {
        font-size: 1.75rem;
        font-weight: 600;
        margin: 0;
    }

    .stat-card .stat-label {
        color: white;
        font-size: 0.875rem;
        margin: 0;
    }

    .stat-card.primary {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
    }

    .stat-card.success {
        background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%);
        color: white;
    }

    .stat-card.info {
        background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
        color: white;
    }

    .stat-card.warning {
        background: linear-gradient(135deg, #f2994a 0%, #f2c94c 100%);
        color: white;
    }

/* Search and Filter Section */
.search-filter-section {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.search-wrapper .input-group {
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border-radius: 0.25rem;
}

.search-wrapper .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.filter-dropdown select,
.page-size-dropdown select {
    cursor: pointer;
}

.filter-info {
    padding: 0.5rem 0;
    border-top: 1px solid #e9ecef;
}

/* Grid Container */
.grid-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Table Styles */
.table-equipment {
    margin-bottom: 0;
}

    .table-equipment thead {
        background-color: #f8f9fa;
        border-bottom: 2px solid #dee2e6;
    }

    .table-equipment th {
        font-weight: 600;
        color: #495057;
        padding: 1rem;
        white-space: nowrap;
        border: none;
    }

    .table-equipment td {
        padding: 0.75rem 1rem;
        vertical-align: middle;
        border: none;
        border-bottom: 1px solid #eee;
    }

    .table-equipment tbody tr:last-child td {
        border-bottom: none;
    }

    .table-equipment tbody tr:hover {
        background-color: #f8f9fa;
    }

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

    .action-buttons .btn {
        padding: 0.25rem 0.5rem;
    }

/* Equipment Image */
.equipment-image {
    max-height: 60px;
    width: auto;
    cursor: pointer;
    transition: transform 0.2s;
}

    .equipment-image:hover {
        transform: scale(1.1);
    }

/* Empty State */
.empty-state {
    text-align: center;
    padding: 5rem 2rem;
    color: #6c757d;
}

.empty-state-icon {
    font-size: 4rem;
    opacity: 0.3;
    margin-bottom: 1rem;
    display: block;
}

.empty-state h4 {
    color: #495057;
    margin-bottom: 1rem;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Filter Badge (for active filters) */
.filter-badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    margin: 0.25rem;
    background-color: #e9ecef;
    border-radius: 20px;
    font-size: 0.875rem;
}

    .filter-badge button {
        background: none;
        border: none;
        color: #dc3545;
        margin-left: 0.5rem;
        cursor: pointer;
    }

/* Mobile responsive */
@media (max-width: 768px) {
    .equipment-page {
        padding: 1rem 0;
    }

    .page-header {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .header-actions {
        width: 100%;
        justify-content: center;
    }

        .header-actions .btn {
            flex: 1;
            max-width: 150px;
        }

    .header-title h1 {
        font-size: 1.5rem;
    }

    .stats-cards {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .stat-card {
        padding: 1rem;
    }

        .stat-card .stat-icon {
            font-size: 1.5rem;
        }

        .stat-card .stat-value {
            font-size: 1.5rem;
        }

    /* Compact view mobile adjustments */
    .page-header.compact {
        padding: 0.5rem 1rem;
    }

    .compact-bar {
        grid-template-columns: auto 1fr auto;
        gap: 0.75rem;
    }

    .compact-title {
        display: none;
    }

    .compact-center {
        gap: 0.5rem;
    }

    .stat-bubble {
        padding: 0.2rem 0.75rem;
    }

    .bubble-value {
        font-size: 1rem;
    }

    .bubble-label {
        display: none;
    }

    .compact-btn {
        padding: 0.25rem 0.5rem;
    }

    .search-filter-section {
        padding: 1rem;
    }

    .filter-info {
        font-size: 0.875rem;
    }

    .table-responsive {
        font-size: 0.875rem;
    }

    .table-equipment th,
    .table-equipment td {
        padding: 0.75rem 0.5rem;
    }

    .action-buttons {
        flex-direction: column;
    }

        .action-buttons .btn {
            width: 100%;
            font-size: 0.875rem;
        }
}

@media (max-width: 576px) {
    .stats-cards {
        grid-template-columns: 1fr;
    }

    .header-actions {
        flex-direction: column;
    }

        .header-actions .btn {
            width: 100%;
            max-width: none;
        }

    /* Force compact view on mobile */
    .page-header:not(.compact) {
        display: none;
    }

    /* Compact view responsive - keep single line */
    .compact-bar {
        grid-template-columns: auto 1fr auto;
    }

    .compact-icon {
        font-size: 1.1rem;
    }

    .stat-bubble {
        padding: 0.15rem 0.5rem;
        gap: 0.25rem;
    }

    .bubble-value {
        font-size: 0.9rem;
    }

    .compact-btn {
        padding: 0.2rem 0.4rem;
        font-size: 0.875rem;
    }

        .compact-btn .oi {
            font-size: 0.875rem;
        }
}
