* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    background-color: #f4f6f9;
}

/* ===== Layout ===== */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ===== Sidebar ===== */
.sidebar {
    width: 260px;
    background: #111827;
    color: #fff;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    padding: 20px;
    transition: transform 0.3s ease;
    z-index: 1000;
}

.sidebar-header {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
}

.sidebar-menu li a {
    display: block;
    padding: 12px;
    color: #d1d5db;
    border-radius: 8px;
    margin-bottom: 6px;
}

.sidebar-menu li a:hover {
    background: #1f2937;
    color: #fff;
}

/* ===== Main ===== */
.main-content {
    margin-right: 260px;
    width: 100%;
}

/* ===== Topbar ===== */
.topbar {
    background: #fff;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 15px;
}

/* ===== Cards ===== */
.card {
    border-radius: 14px;
    border: none;
    box-shadow: 0 8px 20px rgba(0,0,0,.06);
}

.card-header {
    font-weight: bold;
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(100%);
    }
    .sidebar.active {
        transform: translateX(0);
    }
    .main-content {
        margin-right: 0;
    }
}
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    background-color: #f4f6f9;
}

/* ===== Layout ===== */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ===== Sidebar ===== */
.sidebar {
    width: 260px;
    background: #111827;
    color: #fff;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    padding: 20px;
    transition: transform 0.3s ease;
    z-index: 1000;
}

.sidebar-header {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
}

.sidebar-menu li a {
    display: block;
    padding: 12px;
    color: #d1d5db;
    border-radius: 8px;
    margin-bottom: 6px;
}

.sidebar-menu li a:hover {
    background: #1f2937;
    color: #fff;
}

/* ===== Main ===== */
.main-content {
    margin-right: 260px;
    width: 100%;
}

/* ===== Topbar ===== */
.topbar {
    background: #fff;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 15px;
}

/* ===== Cards ===== */
.card {
    border-radius: 14px;
    border: none;
    box-shadow: 0 8px 20px rgba(0,0,0,.06);
}

.card-header {
    font-weight: bold;
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(100%);
    }
    .sidebar.active {
        transform: translateX(0);
    }
    .main-content {
        margin-right: 0;
    }
}
.save-btn {
    width: 100%;              
    padding: 16px 0;           
    font-size: 20px;         
    font-weight: bold;
    border-radius: 12px;
}
.card-header {
    font-size: 16px;
    font-weight: 700;
    padding: 14px 18px;
    border-radius: 14px 14px 0 0;
}


/* =========================
   Login Page - Pro Design
========================= */

.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    display: flex;
    flex-direction: column;
}

/* Centering the form */
.login-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Login Card */
.login-card {
    background: #ffffff;
    width: 100%;
    max-width: 420px;
    padding: 45px 35px;
    border-radius: 18px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.35);
    animation: fadeUp 0.6s ease;
}

/* Title */
.login-title {
    text-align: center;
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #0f172a;
}

/* Inputs */
.login-card .form-control {
    padding: 14px 16px;
    font-size: 16px;
    border-radius: 12px;
}

.login-card .form-label {
    font-weight: 600;
    margin-bottom: 6px;
}

/* Login Button */
.btn-login {
    padding: 16px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 14px;
}

/* Footer */
.login-footer {
    text-align: center;
    padding: 15px;
    font-size: 16px;
    color: #2549c1;
    background: rgba(0,0,0,0.15);
}

/* Animation */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile */
@media (max-width: 576px) {
    .floating-box {
        width: 96%;
        max-height: 92vh;
        border-radius: 16px;
    }

    .floating-header h5 {
        font-size: 17px;
        text-align: center;
        width: 100%;
    }

    .save-btn {
        width: 100%;
        font-size: 16px;
    }
}


/* الخلفية الغامقة */
.form-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* الصندوق العائم */
.floating-box {
    background: #fff;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
    padding: 25px;
}

/* الهيدر */
.floating-header {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 20;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}


.floating-header h5 {
    margin: 0;
    font-weight: 700;
}

/* زرار الإغلاق */
.close-btn {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
}

/* تحسين الكروت */
.card {
    border-radius: 14px;
}

.save-btn {
    padding: 12px 45px;
    border-radius: 30px;
}


/* Mobile First */
.floating-box {
    padding: 20px;
}

.card {
    margin-bottom: 18px;
}

.card-body {
    padding: 20px;
}

.form-label {
    font-weight: 600;
    margin-bottom: 6px;
}

/* خلي كل الأعمدة تاخد عرض كامل على الموبايل */
@media (max-width: 768px) {
    .row > [class^="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

.sidebar-menu li:last-child a {
    color: #f87171;
}
.sidebar-menu li:last-child a:hover {
    background: #7f1d1d;
    color: #fff;
}

/* Sidebar Buttons */
.sidebar-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-btn {
    background: #1f2937;
    color: #e5e7eb;
    border: none;
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 600;
    text-align: right;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar-btn:hover {
    background: #374151;
    color: #fff;
}

/* Logout Button */
.logout-btn {
    background: #7f1d1d;
    color: #fecaca;
}

.logout-btn:hover {
    background: #991b1b;
    color: #fff;
}
