
.ris-content tfoot td {
    background-color: #f0f0f0;
    border: 1px solid #dee2e6;
    padding: 8px 10px;
    font-weight: bold;
}

.ris-content a.btn,
.ris-content button.btn,
.ris-content .btn {
    display: inline-block;
}

.ris-content .main {
    margin: 0;
    padding: 0;
}

.ris-content .data-table td,
.ris-content .data-table th {
    text-align: right;
}

.ris-content input.form-control,
.ris-content select.form-control,
.ris-content textarea.form-control {
    background: #fff;
    color: #1e293b;
}

.ris-content .form-control:focus {
    outline: none;
    border-color: #00ab55;
}

/* الوضع الداكن */
.dark .ris-content .card {
    background: #0e1726;
    box-shadow: none;
    border: 1px solid #1b2e4b;
}

.dark .ris-content,
.dark .ris-content h2,
.dark .ris-content h3,
.dark .ris-content h4 {
    color: #e0e6ed;
}

.dark .ris-content .muted {
    color: #888ea8;
}

.dark .ris-content .data-table th {
    background: #1b2e4b;
    color: #e0e6ed;
}

.dark .ris-content .data-table td,
.dark .ris-content .data-table th {
    border-color: #1b2e4b;
}

.dark .ris-content .data-table tbody tr:hover {
    background: #121e32;
}

.dark .ris-content .detail-item {
    background: #121e32;
}

.dark .ris-content .btn-light {
    background: #1b2e4b;
    color: #e0e6ed;
}

.dark .ris-content .form-control {
    background: #121e32;
    border-color: #253b5c;
    color: #e0e6ed;
}

.dark .ris-content .actions .action-link {
    background: #1b2e4b;
    border-color: #253b5c;
    color: #e0e6ed;
}

.ris-content .topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 28px;

    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: linear-gradient(120deg, #09e49e 0%, #059669 58%, #09694b 100%) !important;
    color: #ffffff;
    padding: 1.4rem 1.4rem;
    box-shadow: 0 16px 32px rgba(9, 56, 63, 0.28);
}

.ris-content .topbar .home-hero h2 {
    padding: 20px 0;
    font-size: 40px !important;
}

.ris-content .card {
    background: white;
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 3px 15px #0f172a0a;
}

.ris-content .stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.ris-content .stat-number {
    font-size: 30px;
    font-weight: bold;
    margin-top: 12px;
}

.ris-content .muted {
    color: #718096;
    font-size: 13px;
}

.ris-content button:not(.no-style) {
    border: 0;
    background: #047955;
    color: white;
    padding: 11px 18px;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    box-shadow: 0px 2px 5px 0px #534e53;
    font-weight: bold;
}

.ris-content .content {
    margin-top: 22px;
}

.ris-content .form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    margin-top: 8px;
}

@media (max-width: 900px) {
    .ris-content .stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .ris-content .stats {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .ris-content .topbar {
        align-items: flex-start;
        flex-direction: column;
    }
}

.stat-card {
    position: relative;
    background: #fff;
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    border-right: 5px solid var(--c);
    /* الشريط الملون على الجنب (يمين في الـ"آر تي إل") */
    min-height: 130px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    color: var(--c);
    background: color-mix(in srgb, var(--c) 15%, white);
}

@media (max-width: 600px) {
    .stats {
        grid-template-columns: 1fr !important;
    }
}

.stat-number {
    font-size: 28px;
    font-weight: 800;
    color: #1f2937;
}

.stat-sub {
    font-size: 12px;
    color: #6b7280;
}

/* ألوان الكروت */
.stat-blue {
    --c: #2f80c9;
}

.stat-green {
    --c: #1a9e8f;
}

.stat-orange {
    --c: #e8962e;
}

.stat-purple {
    --c: #6c63d9;
}

.ris-content .login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 25px;
    background: linear-gradient(135deg, #1b2e4b, #00ab55);
}

.ris-content .login-card {
    width: 100%;
    max-width: 430px;
    background: #fff;
    padding: 38px;
    border-radius: 16px;
    box-shadow: 0 15px 50px #0002;
}

.ris-content .login-brand {
    text-align: center;
    margin-bottom: 30px;
}

.ris-content .login-logo {
    font-size: 42px;
    font-weight: bold;
    color: #00ab55;
}

.ris-content .login-brand h2 {
    font-size: 20px;
    margin-bottom: 8px;
}

.ris-content .login-brand p,
.ris-content .login-footer {
    color: #718096;
    font-size: 12px;
}

.ris-content .form-group {
    margin-bottom: 20px;
}

.ris-content .form-group label {
    display: block;
    font-size: 14px;
    font-weight: bold;
}

.ris-content .remember {
    display: block;
    margin-bottom: 20px;
    font-size: 13px;
}

.ris-content .login-button {
    width: 100%;
    padding: 14px;
    font-size: 16px;
}

.ris-content .login-error {
    background: #fee2e2;
    color: #991b1b;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 13px;
}

.ris-content .login-footer {
    text-align: center;
    margin-top: 25px;
}

.ris-content .page-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 24px;
}

.ris-content .page-heading h2 {
    margin: 0 0 8px;
}

.ris-content .heading-actions,
.ris-content .form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ris-content .btn-light {
    background: #e8eef5;
    color: #263b50;
}

.ris-content .search-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ris-content .search-form .form-control {
    margin: 0;
    flex: 1;
}

.ris-content .table-card {
    margin-top: 20px;
}

.ris-content .table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.ris-content .table-header h3 {
    margin: 0;
}

.ris-content .table-responsive {
    width: 100%;
    overflow-x: auto;
}

.ris-content .data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
    white-space: nowrap;
}

.ris-content .data-table th,
.ris-content .data-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #edf1f5;
    font-size: 13px;
}

.ris-content .data-table th {
    background: #f7f9fc;
    color: #526477;
    font-weight: bold;
}

.ris-content .data-table tbody tr:hover {
    background: #fafcfe;
}

.ris-content .actions {
    display: flex;
    gap: 12px;
}

.ris-content .action-link {
    color: #00ab55;
    text-decoration: none;
    font-weight: bold;
}

.ris-content .action-link:hover {
    text-decoration: underline;
}

.ris-content .empty-state {
    text-align: center;
    padding: 35px !important;
    color: #718096;
}

.ris-content .pagination-wrap {
    margin-top: 20px;
}

/* .ris-content .form-card {
    max-width: 950px;
} */

.ris-content .form-grid,
.ris-content .details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.ris-content .form-group {
    margin-bottom: 5px;
}

.ris-content .form-group label {
    display: block;
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 7px;
}

.ris-content .form-group .form-control {
    margin-top: 0;
}

.ris-content .full-width {
    grid-column: 1 / -1;
}

.ris-content .form-actions {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #edf1f5;
}

.ris-content .alert {
    padding: 14px 16px;
    border-radius: 8px;
    margin-bottom: 18px;
    font-size: 13px;
}

.ris-content .alert-success {
    background: #dcfce7;
    color: #166534;
}

.ris-content .alert-error {
    background: #fee2e2;
    color: #991b1b;
}

.ris-content .alert ul {
    margin-bottom: 0;
}

.ris-content .detail-item {
    padding: 16px;
    background: #f7f9fc;
    border-radius: 9px;
}

.ris-content .detail-item span {
    display: block;
    color: #718096;
    font-size: 12px;
    margin-bottom: 8px;
}

.ris-content .detail-item strong {
    display: block;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.ris-content .status-badge {
    background: #e6f7ee;
    color: #00ab55;
    padding: 7px 12px;
    border-radius: 20px;
    font-size: 12px;
}

@media (max-width: 700px) {
    .ris-content .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .ris-content .search-form {
        align-items: stretch;
        flex-direction: column;
    }

    .ris-content .form-grid,
    .ris-content .details-grid {
        grid-template-columns: 1fr;
    }

    .ris-content .full-width {
        grid-column: auto;
    }
}

.ris-content .order-status {
    display: inline-block;
    padding: 6px 11px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    white-space: nowrap;
}

.ris-content .status-registered {
    background: #e0f2fe;
    color: #075985;
}

.ris-content .status-emergancy {
    background: #da0d0d3b;
    color: #da0d0d;
}

.ris-content .status-scheduled {
    background: #ede9fe;
    color: #5b21b6;
}

.ris-content .status-in_progress {
    background: #fef3c7;
    color: #92400e;
}

.ris-content .status-completed {
    background: #dcfce7;
    color: #166534;
}

.ris-content .status-cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.ris-content .content {
    margin-top: 22px;
}

@media (max-width: 700px) {
    .ris-content .search-form {
        flex-wrap: wrap;
    }

    .ris-content .search-form .form-control {
        min-width: 100%;
    }
}

.ris-content .actions {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.ris-content .actions .action-link:nth-child(2) {
    background-color: #d9b11f !important;
}
.ris-content .actions .action-link:nth-child(3) {
    background-color: #c22c2c !important;
    color: #fff !important;
}
.ris-content .actions form {
    margin: 0;
    padding: 0;
}

.ris-content .actions .action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 65px;
    height: 34px;
    padding: 0 12px;
    border: 1px solid #dbe3ed;
    border-radius: 7px;
    background: #f1f5f9;
    color: #334155;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    box-shadow: none !important;
}

.ris-content .actions .action-link:hover {
    background: #e2e8f0;
}

.ris-content .actions form .action-link {
    background: #fff1f2;
    color: #be123c;
    border-color: #fecdd3;
}

.ris-content .actions form .action-link:hover {
    background: #ffe4e6;
}

/* تنظيف حدود الجداول اللي بيضيفها الثيم */
.ris-content .data-table {
    border: 0;
}

.ris-content .data-table th,
.ris-content .data-table td {
    border-width: 0 0 1px 0;
    border-style: solid;
    border-color: #edf1f5;
}

.ris-content .data-table td.actions {
    display: table-cell;
    white-space: nowrap;
}

.dark .ris-content .data-table th,
.dark .ris-content .data-table td {
    border-color: #1b2e4b;
}

.ris-content td.actions>* {
    display: inline-flex;
    vertical-align: middle;
    margin: 0 0 0 6px;
}

.ris-content td.actions>form {
    display: inline-block;
}


/* ===== Select2: نفس مقاس وشكل حقول الفورم ===== */
.ris-content .select2-container {
    width: 100% !important;
    margin-top: 8px;
}

.select2-container--default .select2-selection--single {
    height: 44px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    display: flex;
    align-items: center;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 44px;
    padding: 0 12px;
    color: #1e293b;
    font-size: 14px;
    width: 100%;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #94a3b8;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 42px;
    left: 8px;
    right: auto;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: #00ab55;
}

/* القايمة المنسدلة */
.select2-dropdown {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    z-index: 9999;
}

.select2-container--default .select2-search--dropdown {
    padding: 8px;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    height: 38px;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 0 10px;
    outline: none;
}

.select2-container--default .select2-results__option {
    padding: 10px 12px;
    font-size: 14px;
    text-align: right;
}

.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background: #00ab55;
    color: #fff;
}

/* الوضع الداكن */
.dark .select2-container--default .select2-selection--single {
    background: #121e32;
    border-color: #253b5c;
}

.dark .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #e0e6ed;
}

.dark .select2-dropdown {
    background: #0e1726;
    border-color: #253b5c;
    color: #e0e6ed;
}

.dark .select2-container--default .select2-search--dropdown .select2-search__field {
    background: #121e32;
    border-color: #253b5c;
    color: #e0e6ed;
}

.ris-content .note-editor .note-btn {
    background: #fff;
    color: #333;
    border: 1px solid #fff;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 14px;
}

.ris-content .note-editor .note-btn:hover {
    background: #e6e6e6;
}

table tbody tr>td {
    background-color: var(--row-color) !important;
}

@media print {
    .content{
        padding: .5cm !important;
    }
    body * {
        visibility: hidden;
    }

    #print-area,
    #print-area * {
        visibility: visible;
    }

    #print-area {
        position: absolute;
        top: 0;
        right: 0;
        width: 100%;
    }

    table {
        width: 100%;
        border-collapse: collapse;
    }

    th,
    td {
        border: 1px solid #000;
        padding: 6px;
        font-size: 12px;
    }

    * {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

.page-heading {
    background: rgb(5 150 105);
    padding: 8px;
    border-radius: 8px;
    color: white;
}

.page-heading h2 {
    font-size: 24px !important;
    font-weight: bold;
    margin-bottom: 6px;

}

.btn {
    box-shadow: 0px 2px 1px 0px #534e5359 !important;

}

.rpt-header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
}


.filter-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    align-items: end;
    margin-bottom: 20px;
}

.filter-item {
    min-width: 0;
}

.filter-item label {
    display: block;
    margin-bottom: 6px;
}

.filter-item .form-control {
    width: 100%;
    box-sizing: border-box;
}

.filter-btn button {
    width: 100%;
}

@media (min-width: 992px) {
    .filter-form {
        grid-template-columns: repeat(3, 1fr) auto;
    }

    .filter-btn button {
        width: auto;
        padding-inline: 28px;
    }
}

.note-toolbar .note-btn-group button {
    box-shadow: none;
}