/**
 * PPG Refinish CRM v2.0 - Digital Tools Enhanced UI
 * Modern, colorful, and data-rich design
 */

/* ===================================================================
   EQUIPMENT STATISTICS CARDS - ENHANCED
   =================================================================== */

.equipment-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    padding: 24px;
    border: 2px solid #e9ecef;
    border-left-width: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(0, 102, 204, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-left-width: 8px;
}

.stat-card h3 {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-card h3 i {
    font-size: 16px;
}

.stat-card .stat-value {
    font-size: 42px;
    font-weight: 700;
    color: #212529;
    margin: 8px 0;
    line-height: 1;
    background: linear-gradient(135deg, #0066CC 0%, #004C99 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card .stat-label {
    font-size: 13px;
    color: #6c757d;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat-card .stat-label i {
    opacity: 0.6;
}

/* Color variants for stat cards */
.stat-card[data-variant="primary"] {
    border-left-color: #0066CC;
}

.stat-card[data-variant="primary"] .stat-value {
    background: linear-gradient(135deg, #0066CC 0%, #004C99 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-card[data-variant="success"] {
    border-left-color: #28A745;
}

.stat-card[data-variant="success"] .stat-value {
    background: linear-gradient(135deg, #28A745 0%, #1e7e34 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-card[data-variant="warning"] {
    border-left-color: #FFC107;
}

.stat-card[data-variant="warning"] .stat-value {
    background: linear-gradient(135deg, #FFC107 0%, #FF9800 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-card[data-variant="info"] {
    border-left-color: #17A2B8;
}

.stat-card[data-variant="info"] .stat-value {
    background: linear-gradient(135deg, #17A2B8 0%, #138496 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ===================================================================
   EQUIPMENT GRID - ENHANCED
   =================================================================== */

.equipment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

/* ===================================================================
   EQUIPMENT CARD - MODERN REDESIGN
   =================================================================== */

.equipment-card {
    background: #ffffff;
    border-radius: 16px;
    border: 2px solid #e9ecef;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
}

.equipment-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0066CC 0%, #00A8E8 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.equipment-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 102, 204, 0.15);
    border-color: #0066CC;
}

.equipment-card:hover::after {
    transform: scaleX(1);
}

.equipment-card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #dee2e6;
}

.equipment-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: linear-gradient(135deg, #0066CC 0%, #004C99 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.equipment-icon i {
    font-size: 28px;
    color: #ffffff;
}

.equipment-status-badge {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.equipment-card-body {
    padding: 24px;
}

.equipment-name {
    font-size: 18px;
    font-weight: 700;
    color: #212529;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.equipment-serial {
    font-size: 13px;
    color: #6c757d;
    font-family: 'Courier New', monospace;
    background: #f8f9fa;
    padding: 4px 12px;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 16px;
    border: 1px solid #e9ecef;
}

.equipment-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.equipment-info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #495057;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.equipment-info-item:hover {
    background: #e9ecef;
    transform: translateX(4px);
}

.equipment-info-item i {
    width: 20px;
    color: #0066CC;
    font-size: 16px;
}

.equipment-info-item span {
    font-weight: 500;
}

/* Usage bar - Enhanced */
.equipment-usage {
    margin-top: 20px;
    padding: 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    border: 1px solid #dee2e6;
}

.usage-bar {
    width: 100%;
    height: 10px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.usage-fill {
    height: 100%;
    background: linear-gradient(90deg, #28A745 0%, #20c997 100%);
    border-radius: 10px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 8px rgba(40, 167, 69, 0.4);
}

.usage-label {
    font-size: 13px;
    font-weight: 600;
    color: #28A745;
    display: flex;
    align-items: center;
    gap: 6px;
}

.usage-label::before {
    content: '⚡';
    font-size: 16px;
}

/* Usage Rate Badge - NEW! */
.usage-rate-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #0066CC 0%, #004C99 100%);
    color: #ffffff;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 12px;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.usage-rate-badge i {
    font-size: 14px;
}

.usage-rate-value {
    font-size: 18px;
    font-weight: 700;
}

.equipment-card-footer {
    padding: 16px 24px;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.equipment-warranty {
    font-size: 12px;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 6px;
}

.equipment-warranty i {
    color: #17A2B8;
}

/* ===================================================================
   EMPTY STATE - ENHANCED
   =================================================================== */

.empty-state {
    text-align: center;
    padding: 80px 40px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 16px;
    border: 2px dashed #dee2e6;
}

.empty-state i {
    font-size: 64px;
    color: #dee2e6;
    margin-bottom: 24px;
}

.empty-state h3 {
    font-size: 24px;
    font-weight: 700;
    color: #495057;
    margin: 0 0 12px 0;
}

.empty-state p {
    font-size: 16px;
    color: #6c757d;
    margin: 0 0 24px 0;
}

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

@media (max-width: 768px) {
    .equipment-stats {
        grid-template-columns: 1fr;
    }
    
    .equipment-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card .stat-value {
        font-size: 36px;
    }
}

/* ===================================================================
   EQUIPMENT CARD ACTION BUTTONS
   =================================================================== */

.btn-icon {
    background: none;
    border: none;
    padding: 6px 8px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 32px;
}

.btn-icon:hover {
    transform: scale(1.1);
}

.btn-icon-edit {
    color: #0066CC;
    background-color: rgba(0, 102, 204, 0.1);
}

.btn-icon-edit:hover {
    background-color: rgba(0, 102, 204, 0.2);
    color: #004999;
}

.btn-icon-delete {
    color: #DC3545;
    background-color: rgba(220, 53, 69, 0.1);
}

.btn-icon-delete:hover {
    background-color: rgba(220, 53, 69, 0.2);
    color: #A71D2A;
}

/* Equipment card header flex alignment */
.equipment-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.equipment-icon {
    cursor: pointer;
}
