/* Asset Management Module Styles */

/* Global Asset Styles */
.asset-module {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Status Indicators */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.status-badge i {
    margin-right: 4px;
    font-size: 0.8rem;
}

/* Status Colors */
.status-good,
.bg-good {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.status-good:hover {
    background-color: #c3e6cb;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(21, 87, 36, 0.2);
}

.status-normal,
.bg-normal {
    background-color: #fff3cd;
    color: #856404;
    border-color: #ffeaa7;
}

.status-normal:hover {
    background-color: #ffeaa7;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(133, 100, 4, 0.2);
}

.status-not-usable,
.bg-not-usable {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.status-not-usable:hover {
    background-color: #f5c6cb;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(114, 28, 36, 0.2);
}

/* Asset Cards */
.asset-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    position: relative;
    overflow: hidden;
}

.asset-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.asset-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.asset-card:hover::before {
    width: 6px;
}

/* Asset Table Enhancements */
.asset-table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.asset-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

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

.asset-table tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid #f8f9fa;
}

.asset-table tbody tr:hover {
    background-color: #f8f9ff;
    transform: scale(1.01);
}

.asset-table tbody td {
    padding: 12px;
    vertical-align: middle;
    border: none;
}

/* Sortable Headers */
.sortable-header {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: all 0.2s ease;
}

.sortable-header:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.sortable-header i {
    margin-left: 8px;
    opacity: 0.7;
    transition: all 0.2s ease;
}

.sortable-header.active i {
    opacity: 1;
    color: #ffc107;
}

/* Search and Filter Section */
.search-filters {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.search-filters .form-control,
.search-filters .form-select {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    transition: all 0.2s ease;
}

.search-filters .form-control:focus,
.search-filters .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Action Buttons */
.btn-asset {
    border-radius: 8px;
    padding: 8px 16px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-asset::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-asset:hover::before {
    left: 100%;
}

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

/* Price Display */
.price-display {
    font-weight: 700;
    color: #28a745;
    font-family: 'Courier New', monospace;
}

.price-large {
    font-size: 1.5rem;
}

.price-medium {
    font-size: 1.2rem;
}

/* Reference Number */
.reference-number {
    font-family: 'Courier New', monospace;
    background-color: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    font-weight: 500;
    color: #495057;
}

/* Asset Age Indicator */
.asset-age {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.asset-age-new {
    background-color: #d1ecf1;
    color: #0c5460;
}

.asset-age-medium {
    background-color: #fff3cd;
    color: #856404;
}

.asset-age-old {
    background-color: #f8d7da;
    color: #721c24;
}

/* Form Enhancements */
.form-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.form-section h5 {
    color: #495057;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-weight: 600;
}

.required-field::after {
    content: ' *';
    color: #dc3545;
    font-weight: bold;
}

/* Currency Input */
.currency-input {
    position: relative;
}

.currency-symbol {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    z-index: 10;
    font-weight: 600;
}

.currency-input input {
    padding-left: 30px;
}

/* Status Selection - Redesigned */
.status-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin: 16px 0;
}

.status-option {
    position: relative;
}

.status-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.status-option label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 12px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    font-weight: 500;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
    min-height: 60px;
}

.status-option label::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.1) 100%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.status-option label:hover {
    border-color: #cbd5e0;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.status-option label:hover::before {
    opacity: 1;
}

.status-option input[type="radio"]:checked + label {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    font-weight: 600;
}

.status-option input[type="radio"]:checked + label::after {
    content: '✓';
    position: absolute;
    top: 6px;
    right: 8px;
    width: 18px;
    height: 18px;
    background: currentColor;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    animation: checkmark 0.3s ease-in-out;
}

@keyframes checkmark {
    0% {
        transform: scale(0) rotate(180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(180deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* Status-specific styles */
.status-good label {
    border-color: #d1fae5;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.status-good input[type="radio"]:checked + label {
    border-color: #10b981;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}

.status-good label:hover {
    border-color: #a7f3d0;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
}

.status-normal label {
    border-color: #fef3c7;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.status-normal input[type="radio"]:checked + label {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.status-normal label:hover {
    border-color: #fde68a;
    background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%);
}

.status-not-usable label {
    border-color: #fecaca;
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
}

.status-not-usable input[type="radio"]:checked + label {
    border-color: #ef4444;
    background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
    color: #991b1b;
}

.status-not-usable label:hover {
    border-color: #fca5a5;
    background: linear-gradient(135deg, #fef7f7 0%, #fecaca 100%);
}

/* Focus states for accessibility */
.status-option input[type="radio"]:focus + label {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .status-options {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .status-option label {
        padding: 14px 12px;
        min-height: 50px;
    }
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .asset-card {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .search-filters {
        padding: 15px;
    }
    
    .search-filters .row > div {
        margin-bottom: 15px;
    }
    
    .asset-table {
        font-size: 0.875rem;
    }
    
    .asset-table thead th,
    .asset-table tbody td {
        padding: 8px 6px;
    }
    
    /* Status options mobile styles handled in main section */
    
    .btn-asset {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .price-large {
        font-size: 1.2rem;
    }
    
    .form-section {
        padding: 15px;
    }
}

@media (max-width: 576px) {
    .asset-table-responsive {
        border: 0;
    }
    
    .asset-table-responsive thead {
        display: none;
    }
    
    .asset-table-responsive tbody,
    .asset-table-responsive tr,
    .asset-table-responsive td {
        display: block;
        width: 100%;
    }
    
    .asset-table-responsive tr {
        background: white;
        border-radius: 8px;
        margin-bottom: 15px;
        padding: 15px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    .asset-table-responsive td {
        border: none;
        padding: 8px 0;
        position: relative;
        padding-left: 50%;
    }
    
    .asset-table-responsive td::before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: 600;
        color: #6c757d;
    }
}

/* Print Styles */
@media print {
    .search-filters,
    .btn,
    .pagination,
    nav,
    .sidebar {
        display: none !important;
    }
    
    .asset-table {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .asset-table thead {
        background: #f8f9fa !important;
        color: #000 !important;
    }
    
    .status-badge {
        border: 1px solid #000 !important;
        background: white !important;
        color: #000 !important;
    }
    
    .price-display {
        color: #000 !important;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Utility Classes */
.text-asset-primary {
    color: #667eea !important;
}

.bg-asset-primary {
    background-color: #667eea !important;
}

.border-asset-primary {
    border-color: #667eea !important;
}

.shadow-asset {
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.2) !important;
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.2s ease;
}

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

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

.hover-shadow:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}