/* Asset List Page Styles */

.asset-list-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Export Section */
.export-section {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.btn-export {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--background-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'Vazirmatn', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-export:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Filters Section */
.filters-section {
    background: var(--background-card);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-color);
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.filter-group input,
.filter-group select {
    padding: 10px 14px;
    background: var(--background-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.15);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-action {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--background-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.85rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-action:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-action:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-action.btn-danger:hover:not(:disabled) {
    background: var(--error-color);
    border-color: var(--error-color);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--error-color);
    color: var(--error-color);
}

/* Table Container */
.table-container {
    background: var(--background-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.assets-table {
    width: 100%;
    border-collapse: collapse;
}

.assets-table th,
.assets-table td {
    padding: 14px 16px;
    text-align: right;
    border-bottom: 1px solid var(--border-color);
}

.assets-table th {
    background: var(--background-hover);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.assets-table td {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.assets-table tbody tr {
    transition: background 0.2s ease;
}

.assets-table tbody tr:hover {
    background: var(--background-hover);
}

.assets-table tbody tr.selected {
    background: rgba(14, 165, 233, 0.1);
}

.checkbox-col {
    width: 50px;
    text-align: center !important;
}

.checkbox-col input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-active {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success-color);
}

.status-inactive {
    background: rgba(156, 163, 175, 0.15);
    color: var(--text-secondary);
}

.status-decommissioned {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error-color);
}

.status-under-repair {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning-color);
}

/* Risk Badges */
.risk-low {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success-color);
}

.risk-medium {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning-color);
}

.risk-high {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error-color);
}

/* No Data */
.no-data {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
}

.btn-page {
    padding: 8px 16px;
    background: var(--background-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-page:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
}

.btn-page:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-info {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--background-card);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlide 0.3s ease;
}

.modal-large {
    max-width: 800px;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
}

/* Asset Details Grid */
.asset-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

.detail-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.detail-value {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* Responsive */
@media (max-width: 1024px) {
    .filter-row {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .filter-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .export-section {
        justify-content: center;
    }

    .action-buttons {
        justify-content: center;
    }

    .assets-table {
        font-size: 0.8rem;
    }

    .assets-table th,
    .assets-table td {
        padding: 10px 8px;
    }
}

@media (max-width: 480px) {
    .filter-row {
        grid-template-columns: 1fr;
    }
}