/**
 * LOYER Shell — واجهة مكتب محاماة هادئة
 * تُحمَّل آخراً وتلغي التدرجات والذهبي والقوالب الثقيلة.
 */

body.loyer-app {
    background: var(--lx-bg) !important;
    font-family: var(--loyer-font);
    font-size: 0.9rem;
    color: var(--lx-text);
    letter-spacing: 0;
}

/* ——— الشريط العلوي ——— */
body.loyer-app .loyer-topbar {
    padding: 0;
    background: #fff;
    border-bottom: 1px solid var(--lx-border);
}

body.loyer-app .loyer-navbar,
body.loyer-app .navbar.loyer-navbar,
body.loyer-app .navbar.navbar-dark.loyer-navbar {
    background: #fff !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    min-height: var(--lx-header-h);
    padding: 0 1.25rem;
}

body.loyer-app .loyer-brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--lx-navy);
    border: none;
    color: #fff;
    font-size: 0.9rem;
}

body.loyer-app .loyer-brand-name {
    color: var(--lx-text) !important;
    font-size: 0.95rem;
    font-weight: 600;
}

body.loyer-app .loyer-brand-sub {
    color: var(--lx-muted) !important;
    font-size: 0.7rem;
    font-weight: 500;
}

@media (min-width: 768px) {
    body.loyer-app .loyer-brand,
    body.loyer-app .loyer-sidebar-toggle {
        display: none !important;
    }
}

body.loyer-app .loyer-topbar-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid transparent;
    color: #4b5565;
}

body.loyer-app .loyer-topbar-btn:hover {
    background: #f3f4f6;
    border-color: transparent;
    color: var(--lx-text);
}

body.loyer-app .loyer-user-chip {
    background: #f7f8fa;
    border: 1px solid var(--lx-border);
    color: var(--lx-text);
    border-radius: 8px;
    padding: 0.25rem 0.55rem 0.25rem 0.3rem;
}

body.loyer-app .loyer-user-chip:hover {
    background: #f3f4f6;
    border-color: #d5d9e0;
    color: var(--lx-text);
}

body.loyer-app .loyer-user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    background: var(--lx-navy);
    color: #fff;
    font-weight: 600;
    font-size: 0.75rem;
}

body.loyer-app .loyer-topbar .loyer-user-name {
    color: var(--lx-text);
    font-weight: 600;
    font-size: 0.8rem;
}

body.loyer-app .loyer-topbar .loyer-user-role {
    color: var(--lx-muted);
    font-size: 0.68rem;
}

/* ——— القائمة الجانبية ——— */
body.loyer-app .loyer-sidebar-col {
    background: var(--lx-navy, #231f1c) !important;
    box-shadow: none !important;
    border-inline-end: none;
    flex: 0 0 var(--lx-sidebar-w) !important;
    width: var(--lx-sidebar-w) !important;
    max-width: var(--lx-sidebar-w) !important;
    height: calc(100vh - var(--lx-header-h));
    min-height: 0 !important;
}

body.loyer-app .loyer-sidebar-col .loyer-sidebar {
    background: transparent;
    padding: 0;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

body.loyer-app .loyer-sidebar-col .sidebar-scroll {
    flex: 1 1 auto;
    max-height: none;
    overflow-y: auto;
    padding: 0.9rem 0.75rem 1rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

body.loyer-app .loyer-sidebar-col .sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.35rem 0.45rem 1rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-decoration: none;
}

body.loyer-app .loyer-sidebar-col .sidebar-brand-icon {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: none !important;
    color: #fff !important;
}

body.loyer-app .sidebar-brand i,
body.loyer-app .loyer-sidebar-col .sidebar-brand-icon i {
    width: auto;
    height: auto;
    border-radius: 0;
    background: transparent !important;
    color: #fff !important;
    font-size: 1rem;
    box-shadow: none !important;
}

body.loyer-app .loyer-sidebar-col .sidebar-brand-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.35;
}

body.loyer-app .loyer-sidebar-col .sidebar-brand-title {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.loyer-app .loyer-sidebar-col .sidebar-brand-tag,
body.loyer-app .loyer-sidebar-col .sidebar-brand-tagline {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.72rem;
    font-weight: 400;
}

body.loyer-app .loyer-sidebar-col .sidebar-section-label {
    display: block;
    color: rgba(255, 255, 255, 0.38);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    margin: 1.1rem 0.6rem 0.35rem;
    padding: 0;
}

body.loyer-app .loyer-sidebar-col .sidebar-section-label::after {
    display: none;
}

body.loyer-app .loyer-sidebar-col .sidebar-nav-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

body.loyer-app .loyer-sidebar-col a.sidebar-link,
body.loyer-app a.sidebar-link {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 40px;
    padding: 0.4rem 0.6rem;
    border-radius: 9px;
    border: none;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.86rem;
    font-weight: 500;
    gap: 0.7rem;
    box-shadow: none;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

body.loyer-app .loyer-sidebar-col .sidebar-link-icon,
body.loyer-app .sidebar-link-icon {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    background: transparent !important;
    border: none !important;
    box-shadow: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.88rem;
    transition: background-color 0.15s ease, color 0.15s ease;
}

body.loyer-app .loyer-sidebar-col .sidebar-link-text {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.loyer-app .loyer-sidebar-col a.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-color: transparent;
}

body.loyer-app .loyer-sidebar-col a.sidebar-link:hover .sidebar-link-icon {
    background: transparent !important;
    color: rgba(255, 255, 255, 0.85);
}

body.loyer-app .loyer-sidebar-col a.sidebar-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: none;
    box-shadow: none !important;
    font-weight: 600;
}

body.loyer-app .loyer-sidebar-col a.sidebar-link.active::before {
    content: "";
    position: absolute;
    inset-inline-start: -0.75rem;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--lx-accent, #6b5344);
    filter: brightness(1.6);
}

body.loyer-app .loyer-sidebar-col a.sidebar-link.active .sidebar-link-icon {
    background: rgba(255, 255, 255, 0.1) !important;
    border: none !important;
    color: #fff !important;
}

body.loyer-app .loyer-sidebar-col .sidebar-badge {
    margin-inline-start: auto;
    background: rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 0.68rem;
    font-weight: 600;
    min-width: 1.4rem;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    text-align: center;
}

body.loyer-app .loyer-sidebar-col a.sidebar-link.active .sidebar-badge {
    background: rgba(255, 255, 255, 0.18) !important;
    color: #fff !important;
}

body.loyer-app .loyer-sidebar-col .sidebar-footer {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.7rem 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.12);
}

body.loyer-app .loyer-sidebar-col .sidebar-user {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0;
    padding: 0.3rem 0.35rem;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: #fff;
    text-decoration: none;
}

body.loyer-app .loyer-sidebar-col .sidebar-user-avatar::after {
    display: none;
}

body.loyer-app .loyer-sidebar-col .sidebar-user:hover {
    background: rgba(255, 255, 255, 0.06);
}

body.loyer-app .loyer-sidebar-col .sidebar-user-avatar {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-weight: 700;
    font-size: 0.82rem;
}

body.loyer-app .loyer-sidebar-col .sidebar-user-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.3;
}

body.loyer-app .loyer-sidebar-col .sidebar-user-name {
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.loyer-app .loyer-sidebar-col .sidebar-user-role {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.5);
}

body.loyer-app .loyer-sidebar-col .sidebar-logout {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
}

body.loyer-app .loyer-sidebar-col .sidebar-logout:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

/* ——— زر المظهر في الشريط العلوي ——— */
.loyer-topbar-actions .loyer-appearance-wrap {
    order: 4;
}

body.loyer-app .loyer-appearance-wrap .dropdown-toggle::after {
    display: none;
}

body.loyer-app .loyer-appearance-menu {
    width: 300px;
    padding: 0.4rem;
    border: 1px solid var(--lx-border);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
}

body.loyer-app .loyer-appearance-menu .lap-section {
    padding: 0.5rem 0.45rem 0.6rem;
}

body.loyer-app .loyer-appearance-menu .lap-section + .lap-section {
    border-top: 1px solid var(--lx-border);
}

body.loyer-app .loyer-appearance-menu .lap-label {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--lx-muted);
    font-size: 0.72rem;
    font-weight: 600;
}

body.loyer-app .loyer-appearance-menu .lap-themes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
}

body.loyer-app .loyer-appearance-menu button {
    font-family: inherit;
    cursor: pointer;
}

body.loyer-app .loyer-appearance-menu .lap-theme {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    padding: 0.45rem;
    background: #fff;
    border: 1px solid var(--lx-border);
    border-radius: 9px;
    text-align: start;
}

body.loyer-app .loyer-appearance-menu .lap-theme:hover {
    border-color: var(--lx-muted);
}

body.loyer-app .loyer-appearance-menu .lap-theme.is-on {
    border-color: var(--lx-navy);
    box-shadow: 0 0 0 1px var(--lx-navy);
}

body.loyer-app .loyer-appearance-menu .lap-swatch {
    display: flex;
    gap: 3px;
}

body.loyer-app .loyer-appearance-menu .lap-swatch i {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

body.loyer-app .loyer-appearance-menu .lap-theme-name {
    color: var(--lx-text);
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.3;
}

body.loyer-app .loyer-appearance-menu .lap-font {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.45rem 0.55rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--lx-text);
    font-size: 0.88rem;
    text-align: start;
}

body.loyer-app .loyer-appearance-menu .lap-font:hover {
    background: var(--t-soft2, #f6f3ee);
}

body.loyer-app .loyer-appearance-menu .lap-font.is-on {
    background: var(--t-soft2, #f6f3ee);
    font-weight: 600;
}

body.loyer-app .loyer-appearance-menu .lap-font i {
    color: var(--lx-navy);
    font-size: 0.75rem;
}

body.loyer-app .loyer-appearance-menu .lap-sizes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.35rem;
}

body.loyer-app .loyer-appearance-menu .lap-size {
    padding: 0.4rem 0;
    background: #fff;
    border: 1px solid var(--lx-border);
    border-radius: 8px;
    color: var(--lx-text);
}

body.loyer-app .loyer-appearance-menu .lap-size--sm { font-size: 0.75rem; }
body.loyer-app .loyer-appearance-menu .lap-size--md { font-size: 0.85rem; }
body.loyer-app .loyer-appearance-menu .lap-size--lg { font-size: 0.98rem; }

body.loyer-app .loyer-appearance-menu .lap-size.is-on {
    background: var(--lx-navy);
    border-color: var(--lx-navy);
    color: #fff;
}

/* ——— منطقة المحتوى ——— */
body.loyer-app .loyer-main-col {
    background: var(--lx-bg) !important;
    padding: 1.5rem 1.75rem 2.5rem !important;
}

body.loyer-app .loyer-content-wrap {
    max-width: none;
}

/* ——— عنوان الصفحة (بدون لافتة داكنة) ——— */
body.loyer-app .welcome-banner,
body.loyer-app .loyer-page-header {
    background: transparent !important;
    color: var(--lx-text);
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0.15rem 0 1.15rem;
    margin-bottom: 0.25rem;
    overflow: visible;
    align-items: flex-end;
}

body.loyer-app .welcome-banner > p,
body.loyer-app .loyer-page-header > p {
    flex: 1 1 100%;
    margin-top: 0.2rem !important;
}

body.loyer-app .welcome-banner::before,
body.loyer-app .loyer-page-header::before,
body.loyer-app .welcome-banner::after {
    display: none !important;
}

body.loyer-app .welcome-banner h1,
body.loyer-app .loyer-page-header h1 {
    color: var(--lx-text) !important;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0;
    margin: 0 0 0.2rem;
}

body.loyer-app .welcome-banner h1 i,
body.loyer-app .loyer-page-header h1 i {
    color: var(--lx-accent);
    font-size: 0.95rem;
}

body.loyer-app .welcome-banner p,
body.loyer-app .loyer-page-header p {
    color: var(--lx-muted) !important;
    font-size: 0.84rem;
    font-weight: 400;
}

body.loyer-app .welcome-banner .btn-light,
body.loyer-app .loyer-page-header .btn-light {
    background: var(--lx-navy);
    border: 1px solid var(--lx-navy);
    color: #fff;
    box-shadow: none;
}

body.loyer-app .welcome-banner .btn-light:hover,
body.loyer-app .loyer-page-header .btn-light:hover {
    background: #111827;
    border-color: #111827;
    color: #fff;
}

body.loyer-app .welcome-banner .btn-outline-light,
body.loyer-app .loyer-page-header .btn-outline-light,
body.loyer-app .welcome-banner .btn-info,
body.loyer-app .welcome-banner .btn-outline-info,
body.loyer-app .loyer-page-header .btn-info,
body.loyer-app .loyer-page-header .btn-outline-info {
    background: #fff;
    border: 1px solid #d0d5dd;
    color: var(--lx-text);
    box-shadow: none;
}

body.loyer-app .welcome-banner .btn-outline-light:hover,
body.loyer-app .loyer-page-header .btn-outline-light:hover,
body.loyer-app .welcome-banner .btn-info:hover,
body.loyer-app .welcome-banner .btn-outline-info:hover {
    background: #f7f8fa;
    border-color: #b8c0cc;
    color: var(--lx-text);
}

/* ——— إحصائيات ——— */
body.loyer-app .stats-grid,
body.loyer-app .loyer-stats-grid {
    gap: 0.85rem;
    margin-bottom: 1.15rem;
}

body.loyer-app .stat-card {
    background: #fff;
    border: 1px solid var(--t-line, #ddd6cc);
    border-radius: 10px;
    padding: 1rem 1.05rem;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
    gap: 0.85rem;
}

body.loyer-app .stat-card:hover {
    transform: none;
    box-shadow: none;
    border-color: #d0d5dd;
}

body.loyer-app .stat-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: var(--t-soft, #f3efe8) !important;
    color: var(--t-ink2, #3d342c) !important;
    font-size: 0.95rem;
}

body.loyer-app .stat-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0;
}

body.loyer-app .stat-content p {
    font-size: 0.78rem;
    font-weight: 500;
}

/* ——— بطاقات وجداول ——— */
body.loyer-app .content-card,
body.loyer-app .loyer-card {
    background: #fff;
    border: 1px solid var(--t-line, #ddd6cc);
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 22px rgba(16, 24, 40, 0.04);
    padding: 1.1rem 1.15rem;
}

body.loyer-app .content-card h3,
body.loyer-app .content-card h4,
body.loyer-app .content-card h5,
body.loyer-app .loyer-card-title {
    display: block;
    width: 100%;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--lx-text);
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0.85rem;
}

body.loyer-app .content-card h5 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--lx-navy, #231f1c);
    margin-bottom: 0.85rem;
}

body.loyer-app .alert-info {
    background: var(--t-soft2, #f6f3ee);
    border-color: #e4ddd2;
    color: var(--t-ink2, #3d342c);
}

body.loyer-app .main-content .badge.bg-success {
    background: var(--t-soft, #f3efe8) !important;
    color: var(--t-ink2, #3d342c) !important;
}

body.loyer-app .main-content .badge.bg-primary,
body.loyer-app .main-content .badge.bg-info {
    background: var(--lx-navy, #231f1c) !important;
    color: #fff !important;
}

body.loyer-app .content-card h3 i,
body.loyer-app .loyer-card-title i {
    color: var(--lx-accent);
}

body.loyer-app .loyer-card-head {
    border-bottom: 1px solid var(--lx-border);
    padding-bottom: 0.7rem;
    margin-bottom: 0.85rem;
}

body.loyer-app .table-responsive {
    border: none;
    border-radius: 0;
}

body.loyer-app .table thead th,
body.loyer-app .loyer-data-table thead th {
    background: transparent !important;
    color: #98a2b3 !important;
    font-weight: 600;
    font-size: 0.72rem;
    letter-spacing: 0;
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid var(--lx-border) !important;
}

body.loyer-app .table tbody td,
body.loyer-app .loyer-data-table tbody td {
    padding: 0.75rem;
    border-bottom: 1px solid #f0f2f5;
    font-size: 0.86rem;
}

body.loyer-app .table tbody tr:hover,
body.loyer-app .loyer-data-table tbody tr:hover {
    background: #fafbfc !important;
}

body.loyer-app .table-striped > tbody > tr:nth-of-type(odd) > * {
    --bs-table-accent-bg: transparent;
    --bs-table-bg-type: transparent;
    background: transparent !important;
    box-shadow: none;
}

body.loyer-app .list-group-item {
    background: transparent;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
    border-color: #f0f2f5 !important;
}

/* ——— أزرار ونماذج ——— */
body.loyer-app .btn {
    font-weight: 600;
    border-radius: 8px;
    box-shadow: none !important;
}

body.loyer-app .btn-primary {
    background: var(--lx-navy);
    border-color: var(--lx-navy);
}

body.loyer-app .btn-primary:hover,
body.loyer-app .btn-primary:focus,
body.loyer-app .btn-success:hover,
body.loyer-app .btn-success:focus {
    background: #111827;
    border-color: #111827;
    color: #fff;
    transform: none;
}

body.loyer-app .btn-success {
    background: var(--lx-navy);
    border-color: var(--lx-navy);
    color: #fff;
}

body.loyer-app .btn-outline-primary,
body.loyer-app .btn-warning,
body.loyer-app .btn-info {
    color: var(--lx-navy, #231f1c);
    border: 1px solid var(--t-line, #ddd6cc);
    background: #fff;
}

body.loyer-app .btn-outline-primary:hover,
body.loyer-app .btn-warning:hover,
body.loyer-app .btn-info:hover {
    background: var(--t-soft, #f3efe8);
    border-color: var(--t-line2, #cfc6ba);
    color: var(--lx-navy, #231f1c);
}

body.loyer-app .form-control,
body.loyer-app .form-select {
    border-radius: 8px;
    border-color: #d0d5dd;
    background: #fff;
}

body.loyer-app .form-control:focus,
body.loyer-app .form-select:focus {
    border-color: #7eacb2;
    box-shadow: 0 0 0 3px rgba(31, 111, 120, 0.12);
}

body.loyer-app .nav-tabs .nav-link.active {
    border-bottom: 2px solid var(--lx-accent);
    color: var(--lx-text);
}

body.loyer-app .pagination .page-item.active .page-link {
    background: var(--lx-navy);
    border-color: var(--lx-navy);
}

body.loyer-app .loyer-toolbar {
    border-color: var(--lx-border);
    border-radius: 10px;
    box-shadow: none;
}

body.loyer-app .alert-light {
    background: #fff;
    border-color: var(--lx-border) !important;
    border-radius: 10px;
}

body.loyer-app code {
    color: #344054;
    background: #f2f4f7;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-size: 0.78em;
    white-space: nowrap;
}

body.loyer-app .loyer-card-head .btn-link,
body.loyer-app .alert .btn-link {
    color: var(--lx-gold, #6b5344);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0;
}

body.loyer-app .loyer-card-head .btn-link:hover,
body.loyer-app .alert .btn-link:hover {
    color: #145e66;
}

/* القائمة تبقى ظاهرة على الشاشات المتوسطة */
@media (min-width: 768px) and (max-width: 991.98px) {
    body.loyer-app .loyer-sidebar-col {
        position: sticky !important;
        top: var(--lx-header-h);
        inset-inline-end: auto;
        bottom: auto;
        transform: none !important;
        width: var(--lx-sidebar-w) !important;
        max-width: var(--lx-sidebar-w) !important;
        flex: 0 0 var(--lx-sidebar-w) !important;
        z-index: 100;
        box-shadow: none !important;
    }

    body.loyer-app .loyer-main-col,
    body.loyer-app > .container-fluid:not(.loyer-app-shell) .col-md-9,
    body.loyer-app > .container-fluid:not(.loyer-app-shell) .col-lg-10 {
        flex: 1 1 0% !important;
        max-width: none !important;
        width: auto !important;
        padding: 1.15rem 1.25rem 2rem !important;
    }
}

/* جرس الإشعارات — أقصى اليسار في الشريط العلوي */
.loyer-topbar-actions .loyer-bell-wrap {
    order: 5;
}

.loyer-bell.dropdown-toggle::after {
    display: none;
}

.loyer-bell {
    position: relative;
    overflow: visible;
}

.loyer-bell__badge {
    position: absolute;
    top: -5px;
    inset-inline-end: -6px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 99px;
    background: #b42318;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    pointer-events: none;
}

.loyer-bell-menu {
    width: 320px;
    max-width: min(320px, 86vw);
    padding: 0;
    border: 1px solid var(--t-line, #ddd6cc);
    border-radius: 10px;
    overflow: hidden;
}

.loyer-bell-menu__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid #e8eef3;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--t-heading, #1a2332);
}

.loyer-bell-menu__head span:last-child {
    color: #b42318;
    font-size: 0.75rem;
}

.loyer-bell-menu__empty {
    margin: 0;
    padding: 0.9rem 0.85rem;
    color: #6b7785;
    font-size: 0.82rem;
}

.loyer-bell-item {
    display: block;
    padding: 0.6rem 0.85rem;
    text-decoration: none;
    color: var(--t-heading, #1a2332);
    border-bottom: 1px solid #f2f4f7;
}

.loyer-bell-item:hover {
    background: #f6f8fb;
    color: var(--t-heading, #1a2332);
}

.loyer-bell-item strong {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
}

.loyer-bell-item small {
    display: block;
    margin-top: 0.1rem;
    color: #6b7785;
    font-size: 0.74rem;
    line-height: 1.4;
}

.loyer-bell-menu__all {
    display: block;
    text-align: center;
    padding: 0.65rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--lx-gold, #6b5344);
    text-decoration: none;
    background: #f8fafb;
}

.loyer-bell-menu__all:hover {
    background: var(--t-soft, #f3efe8);
    color: #145e66;
}

/* ——— لوحة التحكم ——— */
.dash-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.dash-head h1 {
    margin: 0 0 0.2rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--t-heading, #1a2332);
}

.dash-head p {
    margin: 0;
    color: #5c6b7a;
    font-size: 0.84rem;
}

.dash-head__actions {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.dash-kpis {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.dash-kpi {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: #fff;
    border: 1px solid var(--t-line, #ddd6cc);
    border-top: 3px solid #1c2736;
    border-radius: 10px;
    padding: 0.9rem 0.95rem;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.dash-kpi:hover {
    border-color: #b7c5d3;
    color: inherit;
}

.dash-kpi__icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.dash-kpi__value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--t-heading, #1a2332);
}

.dash-kpi__label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: #3d4a57;
    margin-top: 0.1rem;
}

.dash-kpi__hint {
    display: block;
    font-size: 0.72rem;
    color: #7b8794;
    margin-top: 0.15rem;
}

.dash-kpi--teal,
.dash-kpi--blue,
.dash-kpi--amber,
.dash-kpi--green,
.dash-kpi--ink { border-top-color: var(--lx-navy, #231f1c); }
.dash-kpi--teal .dash-kpi__icon,
.dash-kpi--blue .dash-kpi__icon,
.dash-kpi--amber .dash-kpi__icon,
.dash-kpi--green .dash-kpi__icon,
.dash-kpi--ink .dash-kpi__icon { background: var(--t-soft, #f3efe8); color: var(--t-ink2, #3d342c); }
.dash-kpi--red { border-top-color: #9b2c2c; }
.dash-kpi--red .dash-kpi__icon { background: #f8ecec; color: #9b2c2c; }

.dash-section {
    background: #fff;
    border: 1px solid var(--t-line, #ddd6cc);
    border-radius: 10px;
    padding: 1rem 1.05rem;
    margin-bottom: 0.85rem;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.dash-section__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.dash-section__head h2 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--t-heading, #1a2332);
}

.dash-section__head span,
.dash-section__head a {
    font-size: 0.78rem;
    color: #5c6b7a;
    text-decoration: none;
    font-weight: 600;
}

.dash-alerts {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dash-alert {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.7rem 0.8rem;
    border-radius: 8px;
    border: 1px solid var(--t-line, #ddd6cc);
    background: #f8fafc;
}

.dash-alert--danger { background: #fff6f6; border-color: #f3c7c4; }
.dash-alert--warn { background: #fffaf3; border-color: #f3e0b8; }
.dash-alert--info { background: #f4f8fd; border-color: #d3e2f5; }

.dash-alert__icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #1c2736;
}

.dash-alert--danger .dash-alert__icon { color: #b42318; }
.dash-alert--warn .dash-alert__icon { color: #b54708; }
.dash-alert--info .dash-alert__icon { color: #1d4e89; }

.dash-alert strong {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--t-heading, #1a2332);
}

.dash-alert p {
    margin: 0.1rem 0 0;
    font-size: 0.78rem;
    color: #4b5966;
    line-height: 1.45;
}

.dash-alert a {
    font-size: 0.78rem;
    font-weight: 700;
    color: #1c2736;
    text-decoration: none;
    white-space: nowrap;
    padding: 0.3rem 0.55rem;
    border-radius: 6px;
    background: #fff;
    border: 1px solid #d0d7e2;
}

.dash-empty {
    margin: 0;
    color: #5c6b7a;
    font-size: 0.86rem;
}

.dash-money {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.dash-money__item {
    background: var(--t-soft2, #f6f3ee);
    border: 1px solid #e1e8ef;
    border-radius: 8px;
    padding: 0.7rem 0.8rem;
}

.dash-money__item span {
    display: block;
    font-size: 0.72rem;
    color: #6b7785;
    font-weight: 600;
}

.dash-money__item strong {
    display: block;
    margin-top: 0.15rem;
    font-size: 1.05rem;
    color: var(--t-heading, #1a2332);
}

.dash-bar {
    height: 8px;
    border-radius: 99px;
    background: var(--t-soft, #efeae3);
    overflow: hidden;
    margin-top: 0.75rem;
}

.dash-bar > span {
    display: block;
    height: 100%;
    background: var(--lx-navy, #231f1c);
    border-radius: 99px;
}

.dash-bar__note {
    margin: 0.4rem 0 0;
    font-size: 0.75rem;
    color: #6b7785;
}

.dash-split {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 0.85rem;
    margin-bottom: 0.85rem;
}

.dash-pipe {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.dash-pipe__row {
    display: grid;
    grid-template-columns: 9.5rem 1fr 2rem;
    gap: 0.55rem;
    align-items: center;
    font-size: 0.8rem;
    color: #3d4a57;
}

.dash-pipe__track {
    height: 8px;
    background: var(--t-soft, #efeae3);
    border-radius: 99px;
    overflow: hidden;
}

.dash-pipe__track span {
    display: block;
    height: 100%;
    background: var(--lx-navy, #231f1c);
    border-radius: 99px;
}

.dash-pipe__row strong {
    text-align: end;
    color: var(--t-heading, #1a2332);
}

.dash-agenda {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dash-agenda li {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
    padding: 0.6rem 0;
    border-bottom: 1px solid #eef2f6;
}

.dash-agenda li:last-child { border-bottom: none; padding-bottom: 0; }

.dash-agenda__when {
    flex-shrink: 0;
    width: 72px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--t-ink2, #3d342c);
    background: var(--t-soft, #f3efe8);
    border-radius: 6px;
    padding: 0.35rem 0.3rem;
    text-align: center;
    line-height: 1.3;
}

.dash-agenda__when.is-late {
    color: #b42318;
    background: #fdecec;
}

.dash-agenda strong {
    display: block;
    font-size: 0.84rem;
    color: var(--t-heading, #1a2332);
}

.dash-agenda small {
    color: #6b7785;
    font-size: 0.74rem;
}

.dash-fees {
    width: 100%;
    font-size: 0.82rem;
}

.dash-fees td {
    padding: 0.45rem 0;
    border-bottom: 1px solid #eef2f6;
    color: #3d4a57;
}

.dash-fees tr:last-child td { border-bottom: none; }

.dash-fees td:last-child {
    text-align: end;
    font-weight: 700;
    color: #b42318;
    white-space: nowrap;
}

@media (max-width: 1199px) {
    .dash-kpis { grid-template-columns: repeat(2, 1fr); }
    .dash-split { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .dash-kpis,
    .dash-money { grid-template-columns: 1fr; }
    .dash-alert { grid-template-columns: 36px 1fr; }
    .dash-alert a { grid-column: 2; justify-self: start; }
}

/* ══════════════════════════════════════════════════════════════
   LOYER Pro v7 — طبقة التصميم الاحترافي (نفس ألوان النظام)
   النماذج والمدخلات · البطاقات · الجداول · الأزرار · رأس الصفحة
   ══════════════════════════════════════════════════════════════ */
:root {
    --px-ink: var(--lx-navy, #231f1c);
    --px-accent: var(--lx-gold, #6b5344);
    --px-accent-soft: rgba(var(--t-accent-rgb, 107, 83, 68), .10);
    --px-ring: 0 0 0 4px rgba(var(--t-accent-rgb, 107, 83, 68), .16);
    --px-line: var(--t-line, #e3ddd3);
    --px-line-strong: var(--t-line2, #d3cbbf);
    --px-field-bg: var(--t-field, #fdfcfa);
    --px-muted: #7a736a;
    --px-radius: 12px;
    --px-radius-lg: 16px;
    --px-shadow: 0 1px 2px rgba(var(--t-ink-rgb, 35, 31, 28), .04), 0 4px 16px rgba(var(--t-ink-rgb, 35, 31, 28), .05);
    --px-shadow-hover: 0 2px 4px rgba(var(--t-ink-rgb, 35, 31, 28), .05), 0 12px 28px rgba(var(--t-ink-rgb, 35, 31, 28), .09);
}

/* ——— رأس الصفحة ——— */
body.loyer-app .loyer-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 4px 0 18px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--px-line);
}
body.loyer-app .loyer-page-header h1 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--px-ink);
    margin: 0;
}
body.loyer-app .loyer-page-header h1 i {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    background: var(--px-ink);
    color: var(--t-tile-fg, #e8dccb);
    font-size: 1.05rem;
    margin: 0 !important;
}
body.loyer-app .loyer-page-header p {
    margin: 6px 0 0;
    color: var(--px-muted);
    font-size: .875rem;
}
body.loyer-app .loyer-page-header-text { min-width: 0; }

/* أيقونات العناوين لا تلتصق بالنص */
body.loyer-app h1 > i.fas, body.loyer-app h2 > i.fas, body.loyer-app h3 > i.fas,
body.loyer-app h4 > i.fas, body.loyer-app h5 > i.fas, body.loyer-app h6 > i.fas,
body.loyer-app .card-header i.fas, body.loyer-app .btn > i.fas, body.loyer-app .btn > i.fab {
    margin-inline-end: .45rem;
    margin-inline-start: 0;
}

/* ——— البطاقات ——— */
body.loyer-app .card,
body.loyer-app .content-card,
body.loyer-app .main-content .content-card {
    background: #fff;
    border: 1px solid var(--px-line);
    border-radius: var(--px-radius-lg);
    box-shadow: var(--px-shadow);
}
body.loyer-app .card-header {
    background: #faf8f4;
    border-bottom: 1px solid var(--px-line);
    padding: 14px 20px;
    font-weight: 700;
    color: var(--px-ink);
    border-radius: var(--px-radius-lg) var(--px-radius-lg) 0 0 !important;
}
body.loyer-app .card-header h5, body.loyer-app .card-header h6, body.loyer-app .card-header .card-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}
body.loyer-app .card-body { padding: 20px 22px; }

/* ——— أقسام النماذج ——— */
body.loyer-app .loyer-form-section {
    position: relative;
    border: 1px solid var(--px-line) !important;
    border-radius: 14px;
    padding: 18px 20px 20px !important;
    margin-bottom: 18px !important;
    background: #fff;
}
body.loyer-app .loyer-form-section:last-of-type { margin-bottom: 0 !important; }
body.loyer-app .loyer-form-section > h4,
body.loyer-app .loyer-form-section > h5,
body.loyer-app .loyer-form-section > h6 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .98rem !important;
    font-weight: 700 !important;
    color: var(--px-ink) !important;
    margin: -2px 0 16px !important;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--px-line);
}
body.loyer-app .loyer-form-section > h4 i,
body.loyer-app .loyer-form-section > h5 i,
body.loyer-app .loyer-form-section > h6 i {
    width: 32px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    border-radius: 9px;
    background: var(--px-accent-soft);
    color: var(--px-accent);
    font-size: .9rem;
    margin: 0 !important;
}

/* ——— الحقول ——— */
body.loyer-app .form-label {
    font-size: .84rem;
    font-weight: 600;
    color: #3d3832;
    margin-bottom: 6px;
}
body.loyer-app .form-label .text-danger,
body.loyer-app .form-label span.required { color: #b42318 !important; font-weight: 700; }
body.loyer-app .form-control,
body.loyer-app .form-select {
    min-height: 44px;
    padding: 9px 14px;
    font-size: .92rem;
    color: var(--px-ink);
    background-color: var(--px-field-bg);
    border: 1px solid var(--px-line-strong);
    border-radius: 10px;
    box-shadow: inset 0 1px 1px rgba(var(--t-ink-rgb, 35, 31, 28), .03);
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
body.loyer-app .form-control-sm, body.loyer-app .form-select-sm { min-height: 36px; padding: 6px 10px; font-size: .85rem; border-radius: 8px; }
body.loyer-app .form-control-lg, body.loyer-app .form-select-lg { min-height: 50px; font-size: 1rem; }
body.loyer-app .form-control:hover,
body.loyer-app .form-select:hover { border-color: #bfb5a6; }
body.loyer-app .form-control:focus,
body.loyer-app .form-select:focus {
    background-color: #fff;
    border-color: var(--px-accent);
    box-shadow: var(--px-ring);
    outline: 0;
}
body.loyer-app .form-control::placeholder { color: #a8a096; }
body.loyer-app .form-control:disabled, body.loyer-app .form-control[readonly],
body.loyer-app .form-select:disabled { background-color: #f1eee8; color: #7a736a; }
body.loyer-app textarea.form-control { min-height: 96px; line-height: 1.7; resize: vertical; }
body.loyer-app input[type="date"].form-control,
body.loyer-app input[type="time"].form-control,
body.loyer-app input[type="datetime-local"].form-control { direction: rtl; text-align: right; }
body.loyer-app input[type="number"].form-control { font-variant-numeric: tabular-nums; }

/* سهم القوائم المنسدلة في الاتجاه الصحيح */
body.loyer-app .form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%236b5344' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left 14px center;
    background-size: 12px 10px;
    padding-left: 38px;
    padding-right: 14px;
    appearance: none;
}

/* المجموعات (رمز العملة، أيقونة) */
body.loyer-app .input-group-text {
    background: var(--t-soft, #f3efe8);
    border: 1px solid var(--px-line-strong);
    color: #5c564e;
    font-size: .85rem;
    font-weight: 600;
    border-radius: 10px;
}
body.loyer-app .input-group > .form-control,
body.loyer-app .input-group > .form-select { min-height: 44px; }

/* التحقق */
body.loyer-app .was-validated .form-control:invalid, body.loyer-app .form-control.is-invalid,
body.loyer-app .was-validated .form-select:invalid, body.loyer-app .form-select.is-invalid {
    border-color: #d92d20;
    background-color: #fffbfa;
    box-shadow: 0 0 0 4px rgba(217, 45, 32, .10);
}
body.loyer-app .was-validated .form-control:valid, body.loyer-app .form-control.is-valid { border-color: #12b76a; }
body.loyer-app .invalid-feedback { font-size: .8rem; font-weight: 500; }
body.loyer-app .form-text { color: var(--px-muted); font-size: .78rem; }

/* مربعات الاختيار والمفاتيح */
body.loyer-app .form-check-input {
    width: 1.15em;
    height: 1.15em;
    border: 1.5px solid #bfb5a6;
    margin-top: .2em;
}
body.loyer-app .form-check-input:checked { background-color: var(--px-ink); border-color: var(--px-ink); }
body.loyer-app .form-check-input:focus { box-shadow: var(--px-ring); border-color: var(--px-accent); }
body.loyer-app .form-switch .form-check-input { width: 2.4em; height: 1.3em; }
body.loyer-app .form-check-label { font-size: .9rem; color: #3d3832; }

/* ——— الأزرار ——— */
body.loyer-app .btn {
    border-radius: 10px;
    font-weight: 600;
    font-size: .88rem;
    padding: 9px 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .1s ease;
}
body.loyer-app .btn:active { transform: translateY(1px); }
body.loyer-app .btn-sm { padding: 6px 12px; font-size: .8rem; border-radius: 8px; }
body.loyer-app .btn-lg { padding: 12px 26px; font-size: .98rem; border-radius: 12px; }
body.loyer-app .btn-primary {
    background: var(--px-ink);
    border-color: var(--px-ink);
    color: #fff;
    box-shadow: 0 1px 2px rgba(var(--t-ink-rgb, 35, 31, 28), .2);
}
body.loyer-app .btn-primary:hover, body.loyer-app .btn-primary:focus {
    background: #3d3832;
    border-color: #3d3832;
    color: #fff;
}
body.loyer-app .btn:focus-visible { box-shadow: var(--px-ring) !important; }
body.loyer-app .btn-secondary, body.loyer-app .btn-light {
    background: #fff;
    border: 1px solid var(--px-line-strong);
    color: #3d3832;
}
body.loyer-app .btn-secondary:hover, body.loyer-app .btn-light:hover { background: var(--t-soft2, #f6f3ee); border-color: #bfb5a6; color: var(--px-ink); }
body.loyer-app .btn-outline-primary { color: var(--px-ink); border-color: var(--px-line-strong); background: #fff; }
body.loyer-app .btn-outline-primary:hover { background: var(--px-ink); border-color: var(--px-ink); color: #fff; }
body.loyer-app .btn-outline-secondary { color: #5c564e; border-color: var(--px-line-strong); background: #fff; }
body.loyer-app .btn-outline-secondary:hover { background: var(--t-soft, #f3efe8); color: var(--px-ink); border-color: #bfb5a6; }
body.loyer-app .btn-success { background: #0f7a62; border-color: #0f7a62; }
body.loyer-app .btn-danger { background: #b42318; border-color: #b42318; }
body.loyer-app .btn-outline-danger { color: #b42318; border-color: #f1c4bf; background: #fff; }
body.loyer-app .btn-outline-danger:hover { background: #b42318; border-color: #b42318; color: #fff; }

/* أزرار الإجراءات داخل الجداول */
body.loyer-app .btn-group-sm > .btn, body.loyer-app td .btn-sm {
    min-width: 32px;
    height: 32px;
    padding: 0 9px;
}

/* شريط أزرار نهاية النموذج */
body.loyer-app form .d-flex.justify-content-between.pt-2,
body.loyer-app form .d-flex.justify-content-end.pt-2 {
    position: sticky;
    bottom: 0;
    z-index: 5;
    margin: 18px -22px -20px;
    padding: 14px 22px !important;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(6px);
    border-top: 1px solid var(--px-line);
    border-radius: 0 0 var(--px-radius-lg) var(--px-radius-lg);
}

/* ——— الجداول ——— */
body.loyer-app .table {
    --bs-table-bg: transparent;
    margin-bottom: 0;
    font-size: .88rem;
    color: var(--px-ink);
    border-collapse: separate;
    border-spacing: 0;
}
body.loyer-app .table > thead > tr > th,
body.loyer-app .table thead th {
    background: var(--t-soft2, #f6f3ee) !important;
    color: #5c564e !important;
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: none;
    white-space: nowrap;
    padding: 12px 14px;
    border-bottom: 1px solid var(--px-line) !important;
    border-top: 0;
}
body.loyer-app .table > tbody > tr > td {
    padding: 12px 14px;
    vertical-align: middle;
    border-bottom: 1px solid #efebe4;
}
body.loyer-app .table > tbody > tr:last-child > td { border-bottom: 0; }
body.loyer-app .table-hover > tbody > tr:hover > *,
body.loyer-app .table > tbody > tr:hover > td { background: #faf7f2 !important; }
body.loyer-app .table-responsive {
    border: 1px solid var(--px-line);
    border-radius: 12px;
    background: #fff;
}
body.loyer-app .card .table-responsive, body.loyer-app .content-card .table-responsive { border: 0; border-radius: 0; }

/* ——— الشارات والتنبيهات ——— */
body.loyer-app .badge {
    font-weight: 600;
    font-size: .74rem;
    padding: .38em .7em;
    border-radius: 999px;
    letter-spacing: 0;
}
body.loyer-app .badge.bg-success { background: #e7f6ef !important; color: #0b6b54 !important; }
body.loyer-app .badge.bg-danger { background: #fdeceb !important; color: #a8201a !important; }
body.loyer-app .badge.bg-warning { background: #fff4e0 !important; color: #8a4a06 !important; }
body.loyer-app .badge.bg-info { background: #e8f0fd !important; color: #1849a9 !important; }
body.loyer-app .badge.bg-primary { background: #ece7e0 !important; color: var(--px-ink) !important; }
body.loyer-app .badge.bg-secondary { background: #efedea !important; color: #57534e !important; }
body.loyer-app .badge.bg-light { background: var(--t-soft2, #f6f3ee) !important; color: #5c564e !important; border: 1px solid var(--px-line); }

body.loyer-app .alert {
    border-radius: 12px;
    border: 1px solid transparent;
    font-size: .9rem;
    padding: 12px 16px;
}
body.loyer-app .alert-success { background: #ecfdf3; border-color: #abefc6; color: #085d3a; }
body.loyer-app .alert-danger { background: #fef3f2; border-color: #fecdca; color: #912018; }
body.loyer-app .alert-warning { background: #fffaeb; border-color: #fedf89; color: #93370d; }
body.loyer-app .alert-info { background: #f0f6ff; border-color: #c7dcfb; color: #1849a9; }

/* ——— الحالات الفارغة ——— */
body.loyer-app .text-center.py-5 > i.fas, body.loyer-app .dash-empty i {
    width: 72px;
    height: 72px;
    display: inline-grid;
    place-items: center;
    border-radius: 20px;
    background: var(--t-soft, #f3efe8);
    color: #8a7f72 !important;
    font-size: 1.8rem !important;
    margin-bottom: 12px;
}

/* ——— النوافذ المنبثقة والقوائم ——— */
body.loyer-app .modal-content { border: 0; border-radius: 18px; box-shadow: 0 24px 60px rgba(var(--t-ink-rgb, 35, 31, 28), .22); }
body.loyer-app .modal-header { border-bottom: 1px solid var(--px-line); padding: 16px 22px; }
body.loyer-app .modal-title { font-weight: 700; font-size: 1.05rem; }
body.loyer-app .modal-footer { border-top: 1px solid var(--px-line); background: #faf8f4; border-radius: 0 0 18px 18px; }
body.loyer-app .dropdown-menu { border: 1px solid var(--px-line); border-radius: 12px; box-shadow: var(--px-shadow-hover); padding: 6px; }
body.loyer-app .dropdown-item { border-radius: 8px; padding: 8px 12px; font-size: .88rem; }
body.loyer-app .dropdown-item:hover { background: var(--t-soft2, #f6f3ee); }

/* ——— ترقيم الصفحات والتبويبات ——— */
body.loyer-app .pagination .page-link { border-radius: 8px !important; margin: 0 2px; border-color: var(--px-line); color: var(--px-ink); }
body.loyer-app .pagination .page-item.active .page-link { background: var(--px-ink); border-color: var(--px-ink); color: #fff; }
body.loyer-app .nav-tabs { border-bottom: 1px solid var(--px-line); gap: 4px; }
body.loyer-app .nav-tabs .nav-link { border: 0; border-bottom: 2px solid transparent; color: var(--px-muted); font-weight: 600; padding: 10px 14px; border-radius: 0; }
body.loyer-app .nav-tabs .nav-link.active { color: var(--px-ink); border-bottom-color: var(--px-ink); background: transparent; }
body.loyer-app .nav-pills .nav-link.active { background: var(--px-ink); }

/* ——— بطاقات الإحصاء ——— */
body.loyer-app .stat-card, body.loyer-app .dash-kpi {
    border-radius: var(--px-radius-lg);
    border: 1px solid var(--px-line);
    box-shadow: var(--px-shadow);
    transition: box-shadow .2s ease, transform .2s ease;
}
body.loyer-app .stat-card:hover, body.loyer-app .dash-kpi:hover { box-shadow: var(--px-shadow-hover); transform: translateY(-2px); }

@media (max-width: 767px) {
    body.loyer-app .loyer-page-header h1 { font-size: 1.2rem; }
    body.loyer-app .loyer-form-section { padding: 14px !important; }
    body.loyer-app form .d-flex.justify-content-between.pt-2 { margin: 14px -14px -14px; }
}

/* ——— رأس الصفحات القديمة (welcome-banner) بنفس شكل رأس الصفحة ——— */
body.loyer-app .welcome-banner {
    background: transparent !important;
    color: var(--px-ink) !important;
    box-shadow: none !important;
    border: 0 !important;
    border-bottom: 1px solid var(--px-line) !important;
    border-radius: 0 !important;
    padding: 4px 0 18px !important;
    margin-bottom: 20px !important;
}
body.loyer-app .welcome-banner::before, body.loyer-app .welcome-banner::after { display: none !important; }
body.loyer-app .welcome-banner h1, body.loyer-app .welcome-banner h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.45rem !important;
    font-weight: 700 !important;
    color: var(--px-ink) !important;
    margin: 0 !important;
}
body.loyer-app .welcome-banner h1 > i, body.loyer-app .welcome-banner h2 > i {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    background: var(--px-ink);
    color: var(--t-tile-fg, #e8dccb) !important;
    font-size: 1.05rem;
    margin: 0 !important;
}
body.loyer-app .welcome-banner p { color: var(--px-muted) !important; font-size: .875rem !important; margin: 6px 0 0 !important; opacity: 1 !important; }

/* زر المساعد الذكي فوق شريط الحفظ */
body.loyer-app .loyer-ai-fab { bottom: 92px !important; width: 50px; height: 50px; }
body.loyer-app .loyer-ai-panel { bottom: 152px !important; }

/* ——— LOYER Pro: أدوات الجداول + التاريخ الهجري (عام) ——— */
body.loyer-app .loyer-hijri { display: block; font-size: .7rem; color: var(--px-muted, #7a736a); margin-top: 2px; font-weight: 500; white-space: nowrap; }
body.loyer-app .pro-table-tools { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin: 0 0 10px; flex-wrap: wrap; }
body.loyer-app .pro-table-search { position: relative; flex: 0 1 260px; margin-inline-end: auto; }
body.loyer-app .pro-table-search i { position: absolute; top: 50%; right: 11px; transform: translateY(-50%); font-size: .75rem; color: var(--px-muted, #7a736a); pointer-events: none; }
body.loyer-app .pro-table-search .form-control { padding-right: 30px !important; height: 34px !important; min-height: 34px !important; font-size: .8rem; }
body.loyer-app .pro-export-btn { font-size: .78rem !important; padding: 5px 12px !important; border-radius: 9px !important; background: #fff !important; }
body.loyer-app .pro-export-btn i { color: #1d7044; }
body.loyer-app .pro-today-hijri { font-size: .72rem; color: var(--px-muted, #7a736a); white-space: nowrap; }
@media print { .pro-table-tools, .loyer-ai-fab { display: none !important; } }


/* إصلاح القائمة الجانبية في الجوال (RTL): تطلع من اليمين ومخفية وهي مقفلة */
@media (max-width: 767.98px) {
  body.loyer-app .loyer-sidebar-col {
    left: auto !important;
    right: 0 !important;
    inset-inline-end: auto !important;
    transform: translateX(100%) !important;
  }
  body.loyer-app.loyer-sidebar-open .loyer-sidebar-col,
  body.loyer-sidebar-open .loyer-sidebar-col {
    transform: translateX(0) !important;
  }
}
