/**
 * ═══════════════════════════════════════════════════════════════════════════
 * LAYER 74: BACKUP & RECOVERY - STYLING
 * ═══════════════════════════════════════════════════════════════════════════
 */

/* ========== BACKUP DASHBOARD ========== */
.backup-dashboard {
    padding: 2rem 0;
}

.backup-header {
    text-align: center;
    margin-bottom: 3rem;
}

.backup-title {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.backup-subtitle {
    color: var(--color-gray-600, #6b7280);
    font-size: 1.125rem;
}

/* ========== BACKUP STATS ========== */
.backup-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.backup-stat-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.backup-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.backup-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.backup-stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.backup-stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: #10b981;
    margin-bottom: 0.25rem;
}

.backup-stat-label {
    font-size: 0.875rem;
    color: var(--color-gray-600, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========== BACKUP CONTROL PANEL ========== */
.backup-control-panel {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.backup-control-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.backup-control-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.backup-control-actions {
    display: flex;
    gap: 0.5rem;
}

.backup-source-selector {
    margin-bottom: 1.5rem;
}

.backup-source-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.backup-source-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--color-light-secondary, #f9fafb);
    border: 2px solid var(--color-gray-200, #e5e7eb);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.backup-source-item:hover {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.05);
}

.backup-source-item.selected {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.backup-source-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #10b981;
}

.backup-source-label {
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
}

/* ========== BACKUP LIST ========== */
.backup-list {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.backup-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.backup-list-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.backup-list-filters {
    display: flex;
    gap: 0.5rem;
}

.backup-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.backup-item {
    background: var(--color-light-secondary, #f9fafb);
    border: 2px solid var(--color-gray-200, #e5e7eb);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.backup-item:hover {
    border-color: #10b981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1);
}

.backup-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.backup-item-info {
    flex: 1;
}

.backup-item-name {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: var(--color-gray-900, #111827);
}

.backup-item-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.backup-item-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--color-gray-600, #6b7280);
}

.backup-item-actions {
    display: flex;
    gap: 0.5rem;
}

.backup-item-sources {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.backup-source-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ========== BACKUP SCHEDULE ========== */
.backup-schedule {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.backup-schedule-header {
    margin-bottom: 1.5rem;
}

.backup-schedule-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.backup-schedule-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.backup-schedule-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--color-light-secondary, #f9fafb);
    border-radius: 12px;
    border: 2px solid var(--color-gray-200, #e5e7eb);
}

.backup-schedule-info {
    flex: 1;
}

.backup-schedule-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.backup-schedule-interval {
    font-size: 0.875rem;
    color: var(--color-gray-600, #6b7280);
}

.backup-schedule-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.backup-schedule-status.active {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.backup-schedule-status.inactive {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

.backup-schedule-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    animation: pulse 2s ease-in-out infinite;
}

/* ========== RESTORE MODAL ========== */
.backup-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.backup-modal-content {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.backup-modal-header {
    margin-bottom: 1.5rem;
}

.backup-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.backup-modal-body {
    margin-bottom: 1.5rem;
}

.backup-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* ========== PROGRESS BAR ========== */
.backup-progress {
    width: 100%;
    height: 8px;
    background: var(--color-gray-200, #e5e7eb);
    border-radius: 4px;
    overflow: hidden;
    margin: 1rem 0;
}

.backup-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    transition: width 0.3s ease;
    border-radius: 4px;
}

/* ========== ALERTS ========== */
.backup-alert {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.backup-alert.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.backup-alert.warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.backup-alert.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.backup-alert.info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.backup-alert-icon {
    font-size: 1.5rem;
}

/* ========== LOADING STATE ========== */
.backup-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.backup-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--color-gray-200, #e5e7eb);
    border-top-color: #10b981;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 1rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .backup-stats {
        grid-template-columns: 1fr;
    }

    .backup-source-grid {
        grid-template-columns: 1fr;
    }

    .backup-control-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .backup-list-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .backup-item-header {
        flex-direction: column;
        gap: 1rem;
    }

    .backup-item-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .backup-schedule-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* ========== ANIMATIONS ========== */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.backup-fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== BADGE ========== */
.backup-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.backup-badge.success {
    background: #d1fae5;
    color: #065f46;
}

.backup-badge.warning {
    background: #fef3c7;
    color: #92400e;
}

.backup-badge.error {
    background: #fee2e2;
    color: #991b1b;
}

.backup-badge.info {
    background: #dbeafe;
    color: #1e40af;
}