/* Backup and Recovery UI Styles */

.backup-view, .recovery-view {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.backup-header, .recovery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.backup-header h3, .recovery-header h2 {
    margin: 0;
    color: #2c3e50;
    font-weight: 600;
}

.recovery-description {
    margin: 10px 0 0 0;
    color: #6c757d;
    font-size: 0.95em;
}

.backup-actions, .recovery-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Button Styles */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

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

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #1e7e34;
}

.btn-warning {
    background-color: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background-color: #e0a800;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-info {
    background-color: #17a2b8;
    color: white;
}

.btn-info:hover {
    background-color: #138496;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* Loading State */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px;
    color: #6c757d;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e9ecef;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Alert Styles */
.alert {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background-color: #007bff;
    color: white;
}

.badge-secondary {
    background-color: #6c757d;
    color: white;
}

.badge-success {
    background-color: #28a745;
    color: white;
}

.badge-danger {
    background-color: #dc3545;
    color: white;
}

.badge-warning {
    background-color: #ffc107;
    color: #212529;
}

.badge-info {
    background-color: #17a2b8;
    color: white;
}

/* Backup List Styles */
.backup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
}

.backup-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.backup-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.backup-item-recent {
    border-left: 4px solid #28a745;
}

.backup-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.backup-id {
    margin: 0;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #495057;
}

.backup-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.backup-detail {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.backup-detail .label {
    font-size: 11px;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.backup-detail .value {
    font-size: 13px;
    color: #495057;
    font-weight: 500;
}

.backup-item .backup-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Recovery Sessions Styles */
.sessions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
    gap: 25px;
}

.session-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.session-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.session-card-recent {
    border-left: 4px solid #17a2b8;
}

.session-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.session-id {
    margin: 0;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    color: #2c3e50;
    font-weight: 600;
}

.session-age {
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
}

.session-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.session-detail {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.session-detail .label {
    font-size: 11px;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.session-detail .value {
    font-size: 13px;
    color: #495057;
    font-weight: 500;
}

.session-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Empty State Styles */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    margin: 0 0 10px 0;
    color: #495057;
    font-weight: 500;
}

.empty-state p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .backup-view, .recovery-view {
        padding: 15px;
    }
    
    .backup-header, .recovery-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .backup-actions, .recovery-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .backup-grid {
        grid-template-columns: 1fr;
    }
    
    .sessions-grid {
        grid-template-columns: 1fr;
    }
    
    .backup-details, .session-info {
        grid-template-columns: 1fr;
    }
    
    .backup-item, .session-card {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .backup-header-row, .session-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .backup-item .backup-actions, .session-actions {
        justify-content: stretch;
    }
    
    .backup-item .backup-actions .btn, 
    .session-actions .btn {
        flex: 1;
        justify-content: center;
    }
}
