/* ===== عام ===== */
body {
    font-family: 'Tajawal', sans-serif !important;
    background-color: #f5f7fa;
    color: #333;
}

.btn {
    border-radius: 5px;
    font-weight: 500;
}

.main-content {
    padding: 20px;
    min-height: calc(100vh - 60px);
}

/* ===== القائمة العلوية ===== */
.navbar {
    height: 60px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.navbar-brand img {
    height: 40px;
}

/* ===== القائمة الجانبية ===== */
.sidebar {
    background-color: white;
    height: calc(100vh - 60px);
    position: fixed;
    width: inherit;
    max-width: inherit;
    overflow-y: auto;
    padding: 20px 0;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    border-left: 1px solid #eee;
    z-index: 100;
}

.sidebar .nav-item {
    margin-bottom: 5px;
}

.sidebar .nav-link {
    color: #495057;
    padding: 12px 20px;
    border-radius: 0;
    display: flex;
    align-items: center;
    transition: all 0.2s;
}

.sidebar .nav-link i {
    margin-left: 10px;
    width: 20px;
    text-align: center;
}

.sidebar .nav-link:hover {
    background-color: #f8f9fa;
    color: #007bff;
}

.sidebar .nav-link.active {
    background-color: #e7f1ff;
    color: #007bff;
    font-weight: 500;
}

/* ===== بطاقات الداشبورد ===== */
.stat-card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.stat-card .stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-card .stat-title {
    font-size: 16px;
    color: #6c757d;
}

/* ===== بطاقة الإعداد ===== */
.setup-card {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 25px;
    margin-bottom: 20px;
}

.setup-heading {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.setup-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* ===== خطوات التقدم ===== */
.setup-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.step {
    flex: 1;
    text-align: center;
    position: relative;
    padding: 0 10px;
}

.step:not(:last-child):after {
    content: "";
    position: absolute;
    top: 20px;
    left: calc(50% + 20px);
    width: calc(100% - 40px);
    height: 2px;
    background-color: #e9ecef;
    z-index: 1;
}

.step.completed:not(:last-child):after {
    background-color: #28a745;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    z-index: 2;
    position: relative;
    font-weight: 600;
}

.step.active .step-circle {
    background-color: #007bff;
    color: white;
}

.step.completed .step-circle {
    background-color: #28a745;
    color: white;
}

.step-title {
    font-size: 14px;
    color: #6c757d;
}

.step.active .step-title {
    color: #007bff;
    font-weight: 500;
}

.step.completed .step-title {
    color: #28a745;
}

/* ===== بطاقات نوع التأسيس ===== */
.establishment-card {
    position: relative;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
}

.establishment-card:hover {
    border-color: #b8daff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transform: translateY(-5px);
}

.establishment-radio {
    position: absolute;
    opacity: 0;
    top: 10px;
    right: 10px;
    z-index: -1;
}

.establishment-radio:checked + label {
    border-color: #007bff;
    background-color: #f0f8ff;
}

.establishment-radio:checked + label .establishment-icon {
    background-color: #007bff;
    color: white;
}

.establishment-radio:checked + label:before {
    content: "\f00c";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    top: 10px;
    right: 10px;
    color: #007bff;
    font-size: 18px;
}

.establishment-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #e9ecef;
    color: #495057;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: all 0.2s;
}

/* ===== جدول الملاك ===== */
.owners-table th, .owners-table td {
    vertical-align: middle;
}

.owner-actions .btn {
    margin-right: 3px;
}

/* ===== أزرار تحميل الملفات ===== */
.file-upload-wrapper {
    width: 100%;
}

.file-upload-button button {
    text-align: right;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    height: 38px;
    display: flex;
    align-items: center;
}

.file-upload-button span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    text-align: right;
}

.file-preview-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
    border: 1px solid #e9ecef;
}

.file-preview-item .file-name {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preview-image {
    max-width: 100px;
    max-height: 100px;
    border-radius: 4px;
    display: block;
    margin: 0 auto 5px;
}

/* ===== فواصل النماذج ===== */
.form-section-title {
    font-size: 18px;
    color: #495057;
    margin-top: 10px;
    margin-bottom: 15px;
    font-weight: 500;
}

.form-divider {
    width: 100%;
    height: 1px;
    background-color: #e9ecef;
    margin: 20px 0 15px;
    position: relative;
}

.form-divider-label {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    background-color: white;
    padding: 0 10px;
    font-size: 14px;
    color: #6c757d;
}

/* ===== التنسيقات المتنوعة ===== */
.text-bold {
    font-weight: 600;
}

.text-highlight {
    color: #007bff;
    font-weight: 500;
}

/* ===== تنسيقات المصادقة ===== */
.auth-form {
    max-width: 450px;
    margin: 50px auto;
}

.auth-form .card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.auth-form .card-header {
    background-color: white;
    border-bottom: 1px solid #eee;
    padding: 20px;
}

.auth-form .card-body {
    padding: 30px;
}

/* ===== تنسيقات للأجهزة المحمولة ===== */
@media (max-width: 992px) {
    .setup-steps {
        overflow-x: auto;
        padding-bottom: 15px;
        margin-right: -15px;
        margin-left: -15px;
        padding-right: 15px;
        padding-left: 15px;
    }
    
    .step {
        min-width: 100px;
    }
}