/* ============ BACKUP MANAGER STYLES ============ */

.backup-panel-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 420px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10000;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.backup-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 420px;
    background: #1e293b;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.backup-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.backup-panel-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #f1f5f9;
}

.backup-package-name {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
    font-family: monospace;
}

.backup-close-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 24px;
    cursor: pointer;
    padding: 4px 8px;
    transition: all 0.2s;
    border-radius: 4px;
}

.backup-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
}

.backup-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.backup-create-form {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.backup-note-input {
    flex: 1;
    padding: 10px 14px;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #f1f5f9;
    font-size: 14px;
    transition: all 0.2s;
}

.backup-note-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: #1e293b;
}

.backup-note-input::placeholder {
    color: #64748b;
}

.backup-create-btn {
    padding: 10px 16px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.backup-create-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.backup-create-btn:active {
    transform: translateY(0);
}

.backup-loading {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
    font-size: 14px;
}

.backup-empty {
    text-align: center;
    padding: 60px 20px;
}

.backup-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.backup-group-header {
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 0 4px 0;
}

.backup-item {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 16px;
    transition: all 0.2s;
}

.backup-item:hover {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.backup-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.backup-item-title {
    font-size: 15px;
    font-weight: 500;
    color: #f1f5f9;
    flex: 1;
}

.backup-item-menu {
    margin-left: 8px;
}

.backup-menu-btn {
    background: none;
    border: none;
    color: #64748b;
    font-size: 20px;
    cursor: pointer;
    padding: 0 8px;
    border-radius: 4px;
    transition: all 0.2s;
    line-height: 1;
}

.backup-menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
}

.backup-item-meta {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 12px;
}

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

.backup-action-btn {
    padding: 8px 14px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    border-radius: 5px;
    color: white;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.backup-action-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

.backup-restore-btn {
    flex: 1;
}

.backup-context-menu {
    position: fixed;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    padding: 8px 0;
    min-width: 180px;
    z-index: 10001;
    animation: fadeIn 0.15s ease-out;
}

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

.backup-menu-item {
    padding: 10px 16px;
    color: #e2e8f0;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s;
}

.backup-menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
}

.backup-menu-item-danger {
    color: #f87171;
}

.backup-menu-item-danger:hover {
    background: rgba(248, 113, 113, 0.15);
    color: #fca5a5;
}

.backup-panel-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: #0f172a;
}

.backup-stats {
    font-size: 13px;
    color: #94a3b8;
    text-align: center;
}

/* Backup Creation Progress */
.backup-create-progress {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.backup-progress-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.backup-progress-icon {
    font-size: 18px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

.backup-progress-header span:last-child {
    font-size: 14px;
    font-weight: 500;
    color: #e2e8f0;
}

.backup-progress-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.backup-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 50%, #3b82f6 100%);
    background-size: 200% 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
    animation: shimmer 2s linear infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.backup-progress-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #94a3b8;
    gap: 8px;
}

.backup-progress-stats > span {
    flex: 0 0 auto;
}

#backup-progress-percent {
    font-weight: 600;
    color: #3b82f6;
    min-width: 40px;
}

/* Scrollbar styling */
.backup-panel-body::-webkit-scrollbar {
    width: 8px;
}

.backup-panel-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.backup-panel-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.backup-panel-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

