﻿/* General page styling */

body {
    font-family: 'Tajawal', 'Roboto', sans-serif;\
    background-color: #f4f7fa;
    color: #333;
    margin: 0;
    padding: 0px;
}

/* Headings */
h3, h4, h5, h6 {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Container for main content */
.row {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    margin: 0 -10px;
}

/* Form, tree view, and card sections */
.col, .col-md-6 {
    flex: 1 1 50%;
    max-width: 50%;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
    transition: transform 0.2s;
}

    .col:hover, .col-md-6:hover {
        transform: translateY(-5px);
    }

/* Form styling */
.form-group, .mb-3 {
    margin-bottom: 1rem;
}

.form-label {
    font-size: 0.9rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.form-control, .form-select {
    border: 1px solid #d1d9e6;
    border-radius: 8px;
    padding: 10px;
    font-size: 0.9rem;
    background-color: #f9fafc;
    transition: border-color 0.3s;
}

    .form-control:focus, .form-select:focus {
        border-color: #3498db;
        box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
        outline: none;
    }

.input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .input-group .btn {
        border-radius: 8px;
        padding: 10px 14px;
        font-size: 0.9rem;
    }

/* Button styling */
.btn {
    transition: background-color 0.3s, transform 0.2s;
    font-size: 0.9rem;
    padding: 10px 14px;
    border-radius: 8px;
}

.btn-primary {
    background-color: #3498db;
    border-color: #3498db;
}

    .btn-primary:hover {
        background-color: #2980b9;
        transform: scale(1.05);
    }

.btn-success {
    background-color: #2ecc71;
    border-color: #2ecc71;
}

    .btn-success:hover {
        background-color: #27ae60;
        transform: scale(1.05);
    }

.btn-warning {
    background-color: #f1c40f;
    border-color: #f1c40f;
}

    .btn-warning:hover {
        background-color: #e1b107;
        transform: scale(1.05);
    }

.btn-info {
    background-color: #1abc9c;
    border-color: #1abc9c;
}

    .btn-info:hover {
        background-color: #16a085;
        transform: scale(1.05);
    }

.btn-secondary, .btn-outline-secondary {
    background-color: #95a5a6;
    border-color: #95a5a6;
}

    .btn-secondary:hover, .btn-outline-secondary:hover {
        background-color: #7f8c8d;
        transform: scale(1.05);
    }

/* Card styling for dashboard */
.card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

    .card:hover {
        transform: translateY(-5px);
    }

.card-body {
    padding: 20px;
    text-align: center;
}

    .card-body h6 {
        font-size: 0.9rem;
        color: #7f8c8d;
        margin-bottom: 0.5rem;
    }

    .card-body h4 {
        font-size: 1.5rem;
        color: #2c3e50;
        font-weight: 600;
    }

/* Tree view styling for laundry-services */
.tree-view {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid #e0e4e8;
    border-radius: 8px;
    background-color: #f9fafc;
}

    .tree-view ul {
        padding-right: 20px;
    }

    .tree-view li {
        margin: 10px 0;
        font-size: 0.9rem;
        color: #2c3e50;
    }

    .tree-view .cursor-pointer {
        color: #3498db;
        font-weight: 500;
        transition: color 0.3s;
    }

        .tree-view .cursor-pointer:hover {
            color: #2980b9;
        }

/* Modal styling */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background-color: #3498db;
    color: #fff;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    padding: 12px 20px;
}

.modal-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.btn-close {
    filter: invert(1);
}

.modal-body {
    padding: 20px;
    background-color: #ffffff;
}

.modal-footer {
    border-top: none;
    padding: 12px 20px;
}

/* Alerts */
.alert {
    border-radius: 8px;
    padding: 12px;
    font-size: 0.9rem;
    margin-top: 15px;
}

.alert-success {
    background-color: #dff0d8;
    color: #3c763d;
    border-color: #d6e9c6;
}

.alert-danger {
    background-color: #f2dede;
    color: #a94442;
    border-color: #ebccd1;
}

/* Loading and empty states */
.text-center.small {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Navigation buttons */
nav.d-flex {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

nav .btn {
    padding: 10px 16px;
    font-size: 0.9rem;
}

/* Table styling for branches and branch-users */
.table-responsive {
    margin-bottom: 20px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

    .table thead {
        background-color: #f1f3f5;
    }

    .table th, .table td {
        padding: 12px;
        font-size: 0.9rem;
        color: #2c3e50;
        text-align: center;
        vertical-align: middle;
    }

    .table th {
        font-weight: 600;
    }

.table-striped tbody tr:nth-of-type(odd) {
    background-color: #f9fafc;
}

.table .btn {
    padding: 6px 10px;
    font-size: 0.85rem;
    line-height: 1.2;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .row {
        flex-wrap: wrap;
    }

    .col, .col-md-6 {
        flex: 1 1 100%;
        max-width: 100%;
        padding: 15px;
    }

    .btn {
        font-size: 0.85rem;
        padding: 8px 12px;
    }

    .form-control, .form-select {
        font-size: 0.85rem;
    }

    .modal-dialog {
        margin: 10px;
    }

    .modal-title {
        font-size: 1rem;
    }

    .modal-body {
        padding: 15px;
    }

    .modal-footer {
        padding: 10px 15px;
    }

    .card-body h4 {
        font-size: 1.2rem;
    }

    nav .btn {
        font-size: 0.85rem;
        padding: 8px 12px;
    }

    .table th, .table td {
        font-size: 0.85rem;
        padding: 8px;
    }

    .table .btn {
        font-size: 0.8rem;
        padding: 4px 8px;
    }
}

/* Custom scrollbar for tree view */
.tree-view::-webkit-scrollbar {
    width: 8px;
}

.tree-view::-webkit-scrollbar-track {
    background: #f1f3f5;
    border-radius: 4px;
}

.tree-view::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 4px;
}

    .tree-view::-webkit-scrollbar-thumb:hover {
        background: #2980b9;
    }
/* عندما يكون اتجاه الصفحة من اليمين لليسار */
html[dir="rtl"] select.form-select {
    direction: rtl;
    text-align: right;
    background-position: left 0.75rem center; /* يحرك السهم لليسار */
}

/* عندما يكون اتجاه الصفحة من اليسار لليمين */
html[dir="ltr"] select.form-select {
    direction: ltr;
    text-align: left;
    background-position: right 0.75rem center; /* يرجع السهم لليمين */
}
