/* Maintenance Page Styles */

.export-summary {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    border: 1px solid #dee2e6;
}

.stat-box {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: #6b7280;
    margin-top: 0.5rem;
    font-weight: 500;
}

.export-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    height: 100%;
}

.export-section h3 {
    color: var(--dark-color);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.export-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.export-buttons .btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
    text-align: left;
    border-width: 2px;
}

.export-buttons .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.export-buttons .btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.export-buttons .btn-outline-success:hover {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.export-buttons .btn-outline-info:hover {
    background-color: #0dcaf0;
    border-color: #0dcaf0;
}

.export-buttons .btn-outline-danger:hover {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
}

.export-history {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

.export-history h3 {
    color: var(--dark-color);
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.history-list {
    max-height: 400px;
    overflow-y: auto;
}

.history-item {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border-left: 4px solid var(--primary-color);
    transition: background-color 0.2s ease;
}

.history-item:hover {
    background: #f1f5f9;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.history-date {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.history-type {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.history-details {
    font-size: 0.875rem;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.history-count {
    font-weight: 600;
    color: var(--success-color);
}

.history-period {
    color: #6b7280;
    font-style: italic;
}

.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #6b7280;
}

.empty-state i {
    font-size: 3rem;
    color: #d1d5db;
    margin-bottom: 1rem;
}

.empty-state h4 {
    color: #6b7280;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #9ca3af;
    margin: 0;
}

/* Progress indicator for exports */
.export-progress {
    background: #e9ecef;
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.export-progress-bar {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s ease;
    width: 0%;
}

/* Loading states */
.btn.loading {
    position: relative;
    color: transparent !important;
}

.btn.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    .export-summary {
        padding: 1.5rem;
    }
    
    .stat-box {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .export-section {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .export-section h3 {
        font-size: 1.1rem;
    }
    
    .export-buttons .btn {
        padding: 0.625rem 0.875rem;
        font-size: 0.875rem;
    }
    
    .export-history {
        padding: 1.5rem;
    }
    
    .history-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .history-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .stat-number {
        font-size: 1.75rem;
    }
    
    .export-buttons .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .export-section {
        padding: 1rem;
    }
    
    .export-history {
        padding: 1rem;
    }
}

/* Color themes for different data types */
.history-item.phones {
    border-left-color: #0d6efd;
}

.history-item.emails {
    border-left-color: #198754;
}

.history-item.telegram {
    border-left-color: #0dcaf0;
}

.history-item.instagram {
    border-left-color: #dc3545;
}

.history-type.phones {
    background: #0d6efd;
}

.history-type.emails {
    background: #198754;
}

.history-type.telegram {
    background: #0dcaf0;
}

.history-type.instagram {
    background: #dc3545;
}

/* Support Button Styles */
.support-button-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1050;
}

.support-button {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #ff6b6b, #ffa500);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    transition: all 0.3s ease;
    border: none;
    animation: pulse 2s infinite;
}

.support-button:hover {
    background: linear-gradient(135deg, #ff5252, #ff9800);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.support-button i {
    font-size: 1.1rem;
    animation: heartbeat 3s ease-in-out infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes heartbeat {
    0% {
        transform: scale(1);
    }
    14% {
        transform: scale(1.2);
    }
    28% {
        transform: scale(1);
    }
    42% {
        transform: scale(1.2);
    }
    70% {
        transform: scale(1);
    }
}

/* Mobile styles for support button */
@media (max-width: 768px) {
    .support-button-container {
        bottom: 15px;
        right: 15px;
    }
    
    .support-button {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
    
    .support-button span {
        display: none;
    }
    
    .support-button {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        justify-content: center;
        padding: 0;
    }
    
    .support-button i {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .support-button-container {
        bottom: 10px;
        right: 10px;
    }
}

/* Database Backup/Restore Styles */
.database-section {
    background: white;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

.database-section h2 {
    color: var(--dark-color);
}

.backup-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.backup-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.export-card {
    border-left: 4px solid #0d6efd;
}

.import-card {
    border-left: 4px solid #dc3545;
}

.backup-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.backup-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.export-card .backup-icon {
    color: #0d6efd;
}

.import-card .backup-icon {
    color: #dc3545;
}

.backup-header h4 {
    color: var(--dark-color);
    font-weight: 600;
    margin: 0;
    font-size: 1.3rem;
}

.backup-description {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.backup-stats {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    margin-bottom: 1.5rem;
}

.stat-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--dark-color);
}

.stat-item:last-child {
    margin-bottom: 0;
}

.warning-box {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 0.75rem;
    color: #856404;
    margin-bottom: 1rem;
}

/* Import confirmation modal styles */
.modal-body .alert {
    border-radius: 8px;
}

.confirmation-list {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.confirmation-list li {
    color: #374151;
    margin-bottom: 0.5rem;
}

.confirmation-list li:last-child {
    margin-bottom: 0;
}

.file-info {
    background: #e5f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.file-info strong {
    color: #1e40af;
}

/* Loading states for backup operations */
.btn.backup-loading {
    position: relative;
    color: transparent !important;
}

.btn.backup-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid currentColor;
    border-radius: 50%;
    border-top-color: transparent;
    animation: backup-spin 0.8s linear infinite;
}

@keyframes backup-spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Mobile responsive styles for backup section */
@media (max-width: 768px) {
    .database-section {
        padding: 1.5rem 1rem;
        margin-bottom: 2rem;
    }
    
    .database-section h2 {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .backup-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .backup-header {
        margin-bottom: 1rem;
    }
    
    .backup-icon {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .backup-header h4 {
        font-size: 1.1rem;
    }
    
    .backup-description {
        font-size: 0.85rem;
        margin-bottom: 1rem;
        line-height: 1.4;
    }
    
    .backup-stats {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .stat-item {
        font-size: 0.8rem;
        margin-bottom: 0.3rem;
    }
    
    .warning-box {
        padding: 0.5rem;
        margin-bottom: 0.75rem;
        font-size: 0.8rem;
    }
    
    .backup-card .btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .database-section {
        padding: 1rem 0.75rem;
        margin-bottom: 1.5rem;
    }
    
    .database-section h2 {
        font-size: 1.3rem;
        margin-bottom: 1.5rem;
    }
    
    .backup-card {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .backup-header {
        margin-bottom: 0.75rem;
    }
    
    .backup-icon {
        font-size: 1.75rem;
        margin-bottom: 0.25rem;
    }
    
    .backup-header h4 {
        font-size: 1rem;
    }
    
    .backup-description {
        font-size: 0.8rem;
        margin-bottom: 0.75rem;
        line-height: 1.3;
    }
    
    .backup-stats {
        padding: 0.5rem;
        margin-bottom: 0.75rem;
    }
    
    .stat-item {
        font-size: 0.75rem;
        margin-bottom: 0.25rem;
    }
    
    .warning-box {
        padding: 0.4rem;
        margin-bottom: 0.5rem;
        font-size: 0.75rem;
    }
    
    .backup-card .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
}
