﻿body {
    background-color: #f8f9fa;
    padding-top: 50px;
    max-width: 100vw;
    overflow-x: hidden;
}

.form-container {
    max-width: 1200px;
    width: 100%;
    margin: auto;
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.btn-primary {
    width: 100%;
}

    .btn-primary:disabled {
        background-color: #ccc;
        border-color: #ccc;
        cursor: not-allowed;
    }

.message {
    margin-top: 20px;
    font-size: 16px;
}

.success {
    color: #28a745;
}

.error {
    color: #dc3545;
}

/* استخدام Flexbox لتوزيع الأعمدة */
.row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.tree-view {
    flex: 1 1 300px;
    max-width: 350px;
    border-right: 1px solid #ddd;
    padding-right: 20px;
    max-height: 400px;
    overflow-y: auto;
    min-width: 200px;
}

.backup-list {
    flex: 2 1 600px;
    max-width: 900px;
    max-height: 400px;
    overflow-y: auto;
    min-width: 250px;
}

.backup-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

    .backup-item:last-child {
        border-bottom: none;
    }

.backup-info {
    font-size: 14px;
    color: #666;
}

/* دعم الجداول والمحتوى الطويل */
.table {
    max-width: 100%;
    table-layout: auto;
    overflow-x: auto;
}

td, th {
    word-break: break-all;
    max-width: 250px;
}

/* Spinner Overlay */
.spinner-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.spinner {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #3498db;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.position-relative .invalid-tooltip {
    top: 100%;
    right: 0;
    display: block;
}

/* تحسين مجموعة كلمة المرور */
.password-group {
    position: relative;
}

.password-eye-btn {
    border-left: none;
    border-right: none;
}

.password-generate-btn {
    border-left: none;
    min-width: 150px;
}

.password-group .form-control:focus {
    box-shadow: 0 0 0 0.15rem #0d6efd33;
    border-color: #0d6efd;
}

.password-group .fa-eye,
.password-group .fa-eye-slash,
.password-group .fa-random {
    font-size: 1.2rem;
    vertical-align: middle;
}
