﻿:root { --sp-sidebar-width: 18rem; --sp-bg: #f5f7fb; --sp-primary: #155eef; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--sp-bg); font-family: Tahoma, Arial, sans-serif; }
.app-loading { min-height: 100vh; display: grid; place-items: center; color: #475467; }
.app-header { min-height: 4.5rem; z-index: 1035; }
.app-frame { display: grid; grid-template-columns: var(--sp-sidebar-width) minmax(0, 1fr); min-height: calc(100vh - 4.5rem); }
.app-sidebar { width: var(--sp-sidebar-width); background: #101828; color: #fff; padding: 1rem; }
.app-sidebar a { color: #eaecf0; text-decoration: none; }
.app-content { min-width: 0; padding: 1.25rem; }
.app-content > :first-child { margin-top: 0; }
.app-content .container { max-width: 100%; }
body:not(.is-admin) .app-frame { display: block; }
body:not(.is-admin) .app-sidebar { display: none !important; }
body.is-standalone { background: #eef1f5; }
body.is-standalone .app-header,
body.is-standalone .app-sidebar { display: none !important; }
body.is-standalone .app-frame { display: block; min-height: 100vh; }
body.is-standalone .app-content { padding: 0; min-height: 100vh; }
body.has-legacy-layout { background: #fff; }
body.has-legacy-layout .app-header,
body.has-legacy-layout .app-sidebar { display: none !important; }
body.has-legacy-layout .app-frame { display: block; min-height: 100vh; }
body.has-legacy-layout .app-content { padding: 0; min-height: 100vh; }
.site-global-loader {
  position: fixed;
  inset: 0;
  z-index: 20000;
  align-items: center;
  justify-content: center;
  background: rgb(244 245 240 / 65%);
  backdrop-filter: blur(1px);
}
.site-global-loader .site-loader-message {
  padding: 20px 32px;
  border: 1px solid #e3e1d6;
  border-radius: 12px;
  background: #fff;
  color: #152420;
  box-shadow: 0 8px 35px rgb(21 36 32 / 15%);
}
.site-global-loader .site-loader-bar {
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: #0f6b4c;
}
.site-global-loader.is-passive {
  pointer-events: none;
  background: transparent;
  backdrop-filter: none;
}
.site-global-loader.is-passive .site-loader-message { display: none; }
.datepicker-plot-area { z-index: 1090 !important; }
@media (max-width: 991.98px) {
  .app-frame { display: block; }
  .app-content { padding: .75rem; }
  .app-sidebar { width: min(88vw, var(--sp-sidebar-width)); }
}

/* Independent document windows: keep the statement and sibling documents usable. */
.site-document-window {
    position: fixed;
    top: calc(1rem + var(--site-document-row, 0) * 2rem);
    left: calc(1rem + var(--site-document-column, 0) * 49vw);
    width: min(48vw, 920px);
    height: calc(100vh - 2rem - var(--site-document-row, 0) * 2rem);
    max-width: calc(100vw - 2rem);
    max-height: calc(100vh - 1rem);
    min-width: min(340px, calc(100vw - 2rem));
    min-height: 280px;
    resize: both;
    overflow: hidden;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 12px 40px rgb(20 35 55 / 30%);
    direction: rtl;
}
.site-document-panel {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: 0;
}
.site-document-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 0 0 auto;
    gap: 8px;
    min-height: 46px;
    padding: 6px 12px;
    border-bottom: 1px solid #dce5ee;
    background: #f1f5f9;
    cursor: move;
    touch-action: none;
    user-select: none;
}
.site-document-header h2 {
    margin: 0;
    color: #16364d;
    font: 700 15px Tahoma, sans-serif;
}
.site-document-controls { display: flex; gap: 6px; }
.site-document-controls button {
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    background: #fff;
    color: #16364d;
    font-size: 23px;
    line-height: 1;
}
.site-document-window iframe {
    display: block;
    flex: 1 1 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    border: 0;
    background: #fff;
}
.site-document-window.is-expanded {
    top: 1rem !important;
    left: 1rem !important;
    width: calc(100vw - 2rem) !important;
    height: calc(100vh - 2rem) !important;
    resize: none;
}
@media (max-width: 900px) {
    .site-document-window {
        left: 1rem;
        width: calc(100vw - 2rem);
    }
}
@media print { .site-document-window { display: none; } }
.site-operation-progress {
    position: fixed;
    inset: auto 50% 20% auto;
    transform: translateX(50%);
    max-width: 90vw;
    width: max-content;
    padding: 14px 20px;
    background: #fff;
    border: 1px solid #7c3aed;
    border-radius: 12px;
    color: #312e81;
    box-shadow: 0 8px 30px #0002;
    direction: rtl;
}
.admin-report-pager[hidden] {
    display: none !important;
}

.site-table-actions { flex-wrap: wrap; }
.site-table-size, .site-table-page-number { display: inline-block; width: 90px; min-width: 70px; }
.site-table-scroll { overflow-x: auto !important; max-width: 100% !important; }

.site-document-window.is-minimized {
    top: auto !important;
    bottom: calc(.5rem + var(--site-window-slot, 0) * 49px) !important;
    left: .5rem !important;
    width: min(330px, calc(100vw - 1rem)) !important;
    height: 46px !important;
    min-height: 46px;
    resize: none;
}
.site-document-window.is-minimized iframe { display: none; }
.site-loan-eye { margin-inline-start: .25rem; }
body.is-embedded-loan #main-navbar,
body.is-embedded-loan #sidebar,
body.is-embedded-loan .breadcrumb-box,
body.is-embedded-loan footer { display: none !important; }
body.is-embedded-loan #wrapper,
body.is-embedded-loan #page-content { margin: 0 !important; padding: .5rem !important; width: 100% !important; }
body.is-embedded-loan #page-host { padding: 0; }

body.is-embedded-loan { padding-top: 0 !important; }
body.is-admin .site-table-scroll { overflow-x: auto !important; max-width: 100% !important; }

body.is-admin .site-table-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-block: .75rem;
}
body.is-admin .site-table-actions { display: flex; align-items: center; gap: .4rem; }
body.is-admin .site-table-size,
body.is-admin .site-table-page-number { width: 90px !important; min-width: 70px; display: inline-block !important; }
body.is-admin .site-table-search-label { margin: 0; max-width: 320px; }

body.is-admin .site-table-control-label { display: inline-flex; align-items: center; gap: 5px; margin: 0; white-space: nowrap; }
body.is-admin .site-table-actions { padding: 7px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; }
.site-table-numbered { display: inline-flex; gap: 3px; align-items: center; }
.site-table-numbered button { min-width: 30px; height: 30px; border: 1px solid #d4dce8; border-radius: 6px; background: #fff; color: #334155; }
.site-table-numbered button[aria-current="page"] { background: #155eef; border-color: #155eef; color: #fff; font-weight: bold; }
.site-table-numbered[hidden], .site-table-control-label[hidden] { display: none !important; }
th.site-table-sortable { cursor: pointer; white-space: nowrap; }
th.site-table-sortable::after { content: " ↕"; display: inline-block; margin-inline-start: 6px; color: #64748b; font-size: 15px; }
th.site-table-sortable[aria-sort="ascending"]::after { content: " ▲"; color: #155eef; }
th.site-table-sortable[aria-sort="descending"]::after { content: " ▼"; color: #155eef; }

#menu_right .menu-search-hidden {
    display: none !important;
}

/* Preserve full report row stripes while only the current page is connected. */
.table.table-striped[data-site-detached-rows="true"] > tbody > tr[data-site-row-parity="odd"] {
    --bs-table-accent-bg: var(--bs-table-striped-bg);
    color: var(--bs-table-striped-color);
}

.table.table-striped[data-site-detached-rows="true"] > tbody > tr[data-site-row-parity="even"] {
    --bs-table-accent-bg: inherit;
    color: inherit;
}

.table.table-striped[data-site-detached-rows="true"] > tbody > tr[data-site-row-parity="even"].table-active {
    --bs-table-accent-bg: var(--bs-table-active-bg);
}

.table.table-striped.table-hover[data-site-detached-rows="true"] > tbody > tr[data-site-row-parity]:hover {
    --bs-table-accent-bg: var(--bs-table-hover-bg);
    color: var(--bs-table-hover-color);
}
