﻿:root {
    --bu-navy: #07346f;
    --bu-blue: #2468d8;
    --bu-bg: #f5f7fb;
    --bu-text: #17233d;
    --bu-muted: #6b778c;
    --bu-line: #dfe5ee;
    --bu-sidebar-width: 248px;
}

/* =========================================================
   General
   ========================================================= */
* {
    box-sizing: border-box;
}

body.payment-admin-body {
    margin: 0 !important;
    overflow-x: hidden;
    background: var(--bu-bg) !important;
    color: var(--bu-text);
    font-family: "Cairo", "Segoe UI", Tahoma, Arial, sans-serif;
    font-size: 14px;
}

.payment-admin-shell {
    min-height: 100vh;
}


/* =========================================================
   SIDEBAR - أخف وأرفع
   ========================================================= */
.payment-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1040;
    width: var(--bu-sidebar-width);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background: linear-gradient(180deg, #073a79 0%, #08498f 100%);
    color: #fff;
    box-shadow: -5px 0 18px rgba(15, 31, 68, .10);
    transition: transform .22s ease;
}

.payment-sidebar-brand {
    padding: 16px 16px 14px;
    border-bottom: 1px solid rgba(255,255,255,.10);
}

.payment-brand-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
}

    .payment-brand-link:hover {
        color: #fff;
    }

.payment-brand-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    padding: 6px;
    border-radius: 11px;
    background: #fff;
}

.payment-brand-copy {
    display: grid;
    gap: 1px;
    min-width: 0;
}

    .payment-brand-copy strong {
        color: #fff;
        font-size: 15px;
        font-weight: 700;
    }

    .payment-brand-copy small {
        color: #d1e1f6;
        font-size: 9.5px;
        font-weight: 500;
    }

.payment-sidebar-nav {
    flex: 1;
    padding: 15px 11px;
}

.payment-nav-section-title {
    padding: 3px 10px 8px;
    color: #b6d0ef;
    font-size: 9.5px;
    font-weight: 700;
}

.payment-nav-item {
    min-height: 43px;
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 4px;
    padding: 7px 9px;
    border-radius: 10px;
    color: #edf4ff;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: .15s ease;
}

    .payment-nav-item:hover {
        background: rgba(255,255,255,.08);
        color: #fff;
    }

    .payment-nav-item.is-active {
        background: #fff;
        color: var(--bu-navy);
        box-shadow: 0 5px 14px rgba(0,0,0,.10);
    }

.payment-nav-icon {
    width: 29px;
    height: 29px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 8px;
    background: rgba(255,255,255,.09);
    font-size: 12px;
}

.payment-nav-item.is-active .payment-nav-icon {
    background: #edf4ff;
    color: var(--bu-blue);
}


/* =========================================================
   Current center
   ========================================================= */
.payment-current-center {
    margin-top: 17px;
    padding: 10px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 12px;
    background: rgba(255,255,255,.055);
}

.payment-current-center-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,.09);
}

    .payment-current-center-head div {
        display: grid;
        min-width: 0;
    }

    .payment-current-center-head small {
        color: #bfd4ef;
        font-size: 8.5px;
    }

    .payment-current-center-head strong {
        color: #fff;
        font-size: 10.5px;
        font-weight: 600;
    }

.payment-current-center-icon {
    width: 29px;
    height: 29px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 8px;
    background: rgba(255,255,255,.09);
    font-size: 11px;
}

.payment-center-links {
    display: grid;
    gap: 3px;
}

.payment-center-link {
    min-height: 36px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 8px;
    color: #edf4ff;
    font-size: 10.5px;
    font-weight: 600;
    text-decoration: none;
}

    .payment-center-link:hover,
    .payment-center-link.is-active {
        background: rgba(255,255,255,.11);
        color: #fff;
    }


/* =========================================================
   Sidebar footer
   ========================================================= */
.payment-sidebar-footer {
    padding: 11px;
    border-top: 1px solid rgba(255,255,255,.10);
    background: rgba(0,0,0,.05);
}

.payment-sidebar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

    .payment-sidebar-user div {
        min-width: 0;
        display: grid;
    }

    .payment-sidebar-user small {
        color: #bed3ef;
        font-size: 8.5px;
    }

    .payment-sidebar-user strong {
        overflow: hidden;
        color: #fff;
        font-size: 10.5px;
        font-weight: 600;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.payment-user-avatar {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 9px;
    background: #fff;
    color: var(--bu-blue);
    font-size: 12px;
}

    .payment-user-avatar.small {
        width: 31px;
        height: 31px;
    }

.payment-logout-button {
    width: 100%;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 9px;
    background: rgba(255,255,255,.06);
    color: #fff;
    font-family: inherit;
    font-size: 10.5px;
    font-weight: 600;
}


/* =========================================================
   Main
   ========================================================= */
.payment-admin-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin-right: var(--bu-sidebar-width);
    transition: margin-right .22s ease;
}


/* =========================================================
   TOP MENU - أخف ومحدد
   ========================================================= */
.payment-topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    min-height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 8px 20px;
    background: #fff;
    border-bottom: 1px solid var(--bu-line);
    box-shadow: 0 3px 12px rgba(15,31,68,.045);
}

.payment-topbar-start,
.payment-topbar-end {
    display: flex;
    align-items: center;
    gap: 10px;
}

.payment-top-report-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.payment-top-report-label {
    margin-left: 6px;
    padding-left: 10px;
    border-left: 1px solid var(--bu-line);
    color: var(--bu-navy);
    font-size: 11px;
    font-weight: 700;
}

.payment-top-report-link {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border: 1px solid transparent;
    border-radius: 9px;
    color: #526079;
    font-size: 10.5px;
    font-weight: 600;
    text-decoration: none;
}

    .payment-top-report-link:hover {
        background: #f5f8fc;
        color: var(--bu-blue);
    }

    .payment-top-report-link.is-active {
        border-color: #d6e3f7;
        background: #eef5ff;
        color: var(--bu-blue);
    }

.payment-security-pill {
    min-height: 33px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border: 1px solid #ccebd5;
    border-radius: 999px;
    background: #f2fbf5;
    color: #25723d;
    font-size: 9.5px;
    font-weight: 600;
}

.payment-topbar-user {
    display: flex;
    align-items: center;
    gap: 7px;
}

    .payment-topbar-user div {
        display: grid;
    }

    .payment-topbar-user small {
        color: var(--bu-muted);
        font-size: 8.5px;
    }

    .payment-topbar-user strong {
        color: var(--bu-text);
        font-size: 10.5px;
        font-weight: 600;
    }

.payment-menu-button {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 1px solid var(--bu-line);
    border-radius: 9px;
    background: #fff;
    color: var(--bu-navy);
}

@media (min-width: 992px) {
    body.payment-sidebar-collapsed .payment-sidebar {
        transform: translateX(105%);
    }

    body.payment-sidebar-collapsed .payment-admin-page {
        margin-right: 0;
    }
}


/* =========================================================
   PAGE CONTENT - محدد وواضح
   ========================================================= */
.control-main.payment-admin-content {
    flex: 1;
    width: 100%;
    max-width: 1500px;
    margin: 0 auto !important;
    padding: 22px 26px 30px !important;
    font-size: 13.5px;
}

/* نخلي المحتوى الداخلي نفسه محدد بدل ما يبقى طاير في الخلفية */
.payment-admin-content > .container {
    max-width: 1180px !important;
    margin: 0 auto !important;
    padding: 22px !important;
    border: 1px solid var(--bu-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(15,31,68,.045);
}

.payment-admin-content > .container-fluid {
    max-width: 1320px !important;
    margin-right: auto !important;
    margin-left: auto !important;
}

/* عناوين الصفحات كانت بتختفي أبيض في بعض الشاشات */
.payment-admin-content h1,
.payment-admin-content h2,
.payment-admin-content h3,
.payment-admin-content h4,
.payment-admin-content h5,
.payment-admin-content h6 {
    color: var(--bu-text) !important;
    font-family: "Cairo", sans-serif !important;
    line-height: 1.45;
}

.payment-admin-content h2,
.payment-admin-content h3 {
    font-size: 20px !important;
    font-weight: 700 !important;
}

.payment-admin-content h4,
.payment-admin-content h5 {
    font-size: 15px !important;
    font-weight: 700 !important;
}

.payment-admin-content .fw-bold {
    font-weight: 700 !important;
}

.payment-admin-content strong {
    font-weight: 700;
}

.payment-admin-content .text-muted {
    color: var(--bu-muted) !important;
}


/* =========================================================
   Controls - أرفع
   ========================================================= */
.payment-admin-content .form-label {
    margin-bottom: 5px;
    font-size: 12px;
    font-weight: 600 !important;
}

.payment-admin-content .form-control,
.payment-admin-content .form-select {
    min-height: 41px !important;
    padding-top: 7px;
    padding-bottom: 7px;
    border: 1px solid #d9e1eb !important;
    border-radius: 9px !important;
    font-size: 12.5px;
    box-shadow: none !important;
}

.payment-admin-content textarea.form-control {
    min-height: 90px !important;
}

.payment-admin-content .form-control:focus,
.payment-admin-content .form-select:focus {
    border-color: #7aa8e8 !important;
    box-shadow: 0 0 0 3px rgba(36,104,216,.08) !important;
}

.payment-admin-content .btn {
    min-height: 36px !important;
    padding: 6px 12px;
    border-radius: 9px !important;
    font-size: 11.5px;
    font-family: "Cairo", sans-serif;
    font-weight: 600 !important;
}

.payment-admin-content .btn-lg {
    min-height: 40px !important;
    font-size: 12.5px !important;
}

.payment-admin-content .btn-sm {
    min-height: 31px !important;
    padding: 4px 9px;
    font-size: 10.5px !important;
}


/* =========================================================
   Cards / Tables - حدود أوضح لكن بدون غلاظة
   ========================================================= */
.payment-admin-content .card {
    border: 1px solid #e0e6ee !important;
    border-radius: 12px !important;
    box-shadow: 0 3px 12px rgba(15,31,68,.04) !important;
}

.payment-admin-content .card-header {
    padding: 13px 15px !important;
    border-bottom: 1px solid #e7ebf1 !important;
    background: #fbfcfe !important;
}

.payment-admin-content .card-body {
    padding: 15px !important;
}

.payment-admin-content .table-responsive {
    border: 1px solid #e1e7ef;
    border-radius: 11px;
    background: #fff;
}

.payment-admin-content .table {
    margin-bottom: 0;
    font-size: 12px;
}

    .payment-admin-content .table > :not(caption) > * > * {
        padding: 9px 10px !important;
        vertical-align: middle;
        border-bottom-color: #e9edf3;
    }

    .payment-admin-content .table thead th {
        background: #f7f9fc !important;
        color: #31415e !important;
        font-size: 11px !important;
        font-weight: 700 !important;
    }


/* =========================================================
   DashboardAdmins تحديد خاص
   ========================================================= */
body[data-controller="DashboardAdmins"] .payment-admin-content > .container,
body[data-controller="DashboardAdmins"] .payment-admin-content > .container-fluid {
    max-width: 1120px !important;
}

/* لو صفحة المستخدمين عندها cards موجودة نخليها واضحة */
body[data-controller="DashboardAdmins"] .card {
    background: #fff !important;
    border-color: #dfe5ee !important;
}

/* نفصل أجزاء الفورم بهدوء */
body[data-controller="DashboardAdmins"][data-action="Create"] .payment-admin-content form {
    line-height: 1.55;
}

body[data-controller="DashboardAdmins"] .form-check,
body[data-controller="DashboardAdmins"] .form-switch {
    font-size: 12px;
}


/* =========================================================
   Centers
   ========================================================= */
body[data-controller="DashboardCenters"] .payment-admin-content > .container {
    max-width: 1220px !important;
}


/* =========================================================
   Footer
   ========================================================= */
.payment-admin-footer {
    padding: 12px 20px 18px;
    color: var(--bu-muted);
    font-size: 9.5px;
    text-align: center;
}


/* =========================================================
   Responsive
   ========================================================= */
.payment-sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 1030;
    display: none;
    border: 0;
    background: rgba(2,12,32,.42);
}

@media (max-width: 1199.98px) {
    .payment-security-pill {
        display: none;
    }

    .payment-top-report-label {
        display: none;
    }
}

@media (max-width: 991.98px) {
    .payment-sidebar {
        transform: translateX(105%);
    }

    .payment-admin-page {
        margin-right: 0;
    }

    .payment-menu-button {
        display: grid;
    }

    body.payment-sidebar-open .payment-sidebar {
        transform: translateX(0);
    }

    body.payment-sidebar-open .payment-sidebar-overlay {
        display: block;
    }

    .payment-topbar {
        padding: 7px 10px;
    }

    .payment-top-report-nav {
        max-width: calc(100vw - 130px);
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
    }

        .payment-top-report-nav::-webkit-scrollbar {
            display: none;
        }

    .payment-top-report-link {
        white-space: nowrap;
    }

    .control-main.payment-admin-content {
        padding: 14px 10px 22px !important;
    }

    .payment-admin-content > .container {
        padding: 15px !important;
    }
}

@media (max-width: 575.98px) {
    .payment-topbar-user {
        display: none;
    }

    .payment-top-report-link span {
        display: none;
    }

    .payment-top-report-link {
        width: 34px;
        min-height: 34px;
        justify-content: center;
        padding: 0;
    }

    .payment-sidebar {
        width: min(84vw, 270px);
    }
}

@media print {
    .payment-sidebar,
    .payment-topbar,
    .payment-admin-footer,
    .payment-sidebar-overlay {
        display: none !important;
    }

    .payment-admin-page {
        margin: 0 !important;
    }

    .control-main.payment-admin-content {
        max-width: none;
        padding: 0 !important;
    }

    .payment-admin-content > .container {
        max-width: none !important;
        border: 0 !important;
        box-shadow: none !important;
        padding: 0 !important;
    }
}


/* =========================================================
   FIX - DashboardAdmins pages
   السبب:
   Views إدارة المستخدمين وإضافة المستخدم لم تكن داخل
   Container ثابت، لذلك المحتوى ظهر "سايح" ناحية اليمين.
   الـLayout الآن يلف الصفحة في .payment-admins-surface.
   ========================================================= */

.payment-route-surface.payment-admins-surface {
    width: min(100%, 1120px);
    margin: 0 auto;
    padding: 22px 24px;
    border: 1px solid #dfe5ee;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 5px 18px rgba(15, 31, 68, .045);
    overflow: hidden;
}

/* أي عنصر رئيسي داخل الصفحة ياخد عرض المساحة كاملة */
.payment-admins-surface > * {
    max-width: 100%;
}

.payment-admins-surface > form,
.payment-admins-surface form {
    width: 100%;
}

/* منع أي container داخلي من تقليص الصفحة أو إضافة padding ضخم */
.payment-admins-surface .container,
.payment-admins-surface .container-fluid {
    width: 100% !important;
    max-width: none !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
}

/* عناوين الصفحة */
.payment-admins-surface h1,
.payment-admins-surface h2,
.payment-admins-surface h3 {
    margin-top: 0;
    color: #17233d !important;
}

/* الـ rows لا تخرج خارج الكارت */
.payment-admins-surface .row {
    max-width: 100%;
    margin-right: calc(-.5 * var(--bs-gutter-x));
    margin-left: calc(-.5 * var(--bs-gutter-x));
}

/* أي كروت داخل إدارة المستخدمين */
.payment-admins-surface .card {
    width: 100%;
    background: #fff !important;
}

/* لو الـView فيها قائمة/جريد للمستخدمين بدون Card واضح */
.payment-admins-surface .list-group,
.payment-admins-surface .table-responsive {
    width: 100%;
}

/* تحسين المسافات بين سجلات المستخدمين */
body[data-controller="DashboardAdmins"][data-action="Index"]
.payment-admins-surface .card + .card {
    margin-top: 10px;
}

/* صفحة إضافة مستخدم */
body[data-controller="DashboardAdmins"][data-action="Create"]
.payment-admins-surface {
    max-width: 980px;
}

    body[data-controller="DashboardAdmins"][data-action="Create"]
    .payment-admins-surface form {
        display: block;
    }

/* Responsive */
@media (max-width: 991.98px) {
    .payment-route-surface.payment-admins-surface {
        width: 100%;
        padding: 16px;
        border-radius: 12px;
    }
}

@media (max-width: 575.98px) {
    .payment-route-surface.payment-admins-surface {
        padding: 12px;
    }
}

/* فلتر لوحة المدفوعات: صفان مختصران على الشاشات الواسعة. */
#dashboardPage .dashboard-filter-card .card-header {
    padding: .55rem 1rem !important;
}
#dashboardPage .dashboard-filter-card .card-header h5 {
    font-size: 1rem;
}
#dashboardPage .dashboard-filter-card .card-body {
    padding: .9rem 1rem !important;
}
#dashboardPage .dashboard-filter-card .form-label {
    display: block;
    margin-bottom: .25rem !important;
    font-size: .85rem !important;
    line-height: 1.3;
}
#dashboardPage .dashboard-filter-card .form-control,
#dashboardPage .dashboard-filter-card .form-select {
    min-height: 40px !important;
    height: 40px !important;
    padding-top: .35rem !important;
    padding-bottom: .35rem !important;
    font-size: .65rem !important;
}
#dashboardPage .dashboard-filter-card .dashboard-filter-button {
    min-height: 40px !important;
    height: 40px;
    padding: .35rem .75rem;
    font-size: .65rem;
}
@media (max-width: 575.98px) {
    #dashboardPage .dashboard-filter-card .card-body {
        padding: .75rem !important;
    }
}
