/* ══════════════════════════════════════════════════════════════════════
   ERPNex — SAP Fiori custom theme
   Loaded globally via page_header(). Do NOT edit default.css for styles.
   ══════════════════════════════════════════════════════════════════════ */

/* ── Push page content below fixed shell ──────────────────────────── */
body { 
padding-top: 48px; 
background: #fff;
}

/* ════════════════════════════════════════════════════════════════════
   Shell / Navbar  (navbar.php)
   ═══════════════════════════════════════════════════════════════════ */

.sap-shell {
    background-color: #1C2833;
    height: 48px;
    display: flex;
    align-items: center;
    padding: 0 1rem;
    gap: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.sap-brand {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    text-decoration: none;
    flex-shrink: 0;
    margin-right: 1.5rem;
}
.sap-brand-erp { color: #ffffff; }
.sap-brand-nex { color: #0070F2; }

.sap-nav-tabs {
    display: flex;
    align-items: center;
    gap: 0.125rem;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;
}
.sap-nav-tabs::-webkit-scrollbar { display: none; }

.sap-tab {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgba(255,255,255,0.65);
    border-radius: 4px;
    white-space: nowrap;
    text-decoration: none;
    transition: background-color 0.15s, color 0.15s;
}
.sap-tab:hover  { color: #fff; background-color: rgba(255,255,255,0.1); }
.sap-tab.active { color: #fff; background-color: rgba(255,255,255,0.18); font-weight: 600; }

.sap-shell-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
    flex-shrink: 0;
}

.sap-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #0070F2;
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    flex-shrink: 0;
}

.sap-user-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    color: rgba(255,255,255,0.75);
    font-size: 0.8125rem;
    transition: background-color 0.15s, color 0.15s;
}
.sap-user-btn:hover { background-color: rgba(255,255,255,0.1); color: #fff; }

.sap-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 180px;
    background: #fff;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    padding: 0.25rem 0;
    z-index: 100;
}
.sap-dropdown-item {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    color: #1A1A2E;
    text-decoration: none;
    transition: background-color 0.1s;
}
.sap-dropdown-item:hover { background-color: #EBF5FF; color: #0070F2; }
.sap-dropdown-divider {
    height: 1px;
    background: #E5E7EB;
    margin: 0.25rem 0;
}
.sap-dropdown-item.danger { color: #BB0000; }
.sap-dropdown-item.danger:hover { background-color: #FEF2F2; }

.sap-mobile-menu {
    background-color: #1C2833;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 0.5rem 1rem 0.75rem;
    position: fixed;
    top: 48px;
    left: 0;
    right: 0;
    z-index: 49;
}
.sap-mobile-tab {
    display: block;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.15s, color 0.15s;
}
.sap-mobile-tab:hover  { background-color: rgba(255,255,255,0.1); color: #fff; }
.sap-mobile-tab.active { background-color: rgba(255,255,255,0.18); color: #fff; font-weight: 600; }

/* ════════════════════════════════════════════════════════════════════
   Context bar  (navbar2.php)
   ═══════════════════════════════════════════════════════════════════ */

.sap-context-bar {
    height: 36px;
    background: #ffffff;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    align-items: center;
    padding: 0 1rem;
    gap: 1rem;
    font-size: 0.75rem;
}

.sap-company-name {
    color: #6B7280;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.sap-context-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: auto;
}

.sap-context-link {
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #6B7280;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.15s, color 0.15s;
    white-space: nowrap;
}
.sap-context-link:hover { color: #0070F2; background-color: #EBF5FF; }
.sap-context-link.logout { color: #BB0000; }
.sap-context-link.logout:hover { background-color: #FEF2F2; }

.sap-context-sep {
    width: 1px;
    height: 12px;
    background: #D1D5DB;
}

#ajaxmark {
    width: 16px;
    height: 16px;
}

/* ════════════════════════════════════════════════════════════════════
   Page content & tiles  (renderer.php)
   ═══════════════════════════════════════════════════════════════════ */

.sap-page-content {
    padding: 1rem 1.5rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.sap-page-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: #fff;
    border-bottom: 1px solid #E5E7EB;
    margin-bottom: 1.25rem;
}
.sap-page-title h2 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1A1A2E;
    margin: 0;
}
.sap-page-title-accent {
    width: 3px;
    height: 18px;
    background: #0070F2;
    border-radius: 2px;
    flex-shrink: 0;
}

.sap-module-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}
.sap-module-header:first-child { margin-top: 0.25rem; }
.sap-module-header span {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6B7280;
    white-space: nowrap;
}
.sap-module-header-line {
    flex: 1;
    height: 1px;
    background: #E5E7EB;
}

.sap-tile-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 0.75rem;
}
@media (min-width: 576px)  { .sap-tile-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px)  { .sap-tile-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .sap-tile-grid { grid-template-columns: repeat(4, 1fr); } }

.sap-tile {
    position: relative;
    display: block;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    padding: 0.875rem 0.875rem 0.875rem 1.125rem;
    overflow: hidden;
    text-decoration: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.sap-tile:hover {
    border-color: #0070F2;
    box-shadow: 0 2px 10px rgba(0,112,242,0.1);
}
.sap-tile.disabled {
    opacity: 0.45;
    pointer-events: none;
}

.sap-tile-accent {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 6px 0 0 6px;
}
.accent-blue   { background-color: #0070F2; }
.accent-green  { background-color: #188918; }
.accent-orange { background-color: #E9730C; }
.accent-gray   { background-color: #9CA3AF; }

.sap-tile-icon {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    font-size: 1.375rem;
    color: #D1D5DB;
    transition: color 0.15s;
    line-height: 1;
}
.sap-tile:hover .sap-tile-icon { color: #93C5FD; }

.sap-tile-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #1A1A2E;
    line-height: 1.35;
    padding-right: 1.75rem;
    margin-bottom: 0.5rem;
}

.sap-tile-count {
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
    line-height: 1;
}

#myLoader {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
}

/* ════════════════════════════════════════════════════════════════════
   Tables
   ═══════════════════════════════════════════════════════════════════ */

.erp-table-wrap {
    overflow-x: auto;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    background: #fff;
    margin-bottom: 1rem;
}

table.erp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
    color: #1A1A2E;
    background: #fff;
}
table.erp-table-striped tbody tr:nth-child(odd) td { background-color: #FAFAFA; }
table.erp-table-noborder td,
table.erp-table-noborder th { border: none !important; }

table.erp-table th,
.tableheader {
    font-size: 0.6875rem !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6B7280 !important;
    background: #F9FAFB !important;
    padding: 0.5rem 0.75rem !important;
    text-align: left !important;
    border-bottom: 2px solid #E5E7EB;
    white-space: nowrap;
}
.tableheader2 {
    font-size: 0.6875rem !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6B7280 !important;
    background: #F9FAFB !important;
    padding: 0.5rem 0.75rem !important;
    text-align: left !important;
    border-bottom: 2px solid #E5E7EB;
}

table.erp-table td {
    padding: 0.4375rem 0.75rem;
    border-bottom: 1px solid #F3F4F6;
    vertical-align: middle;
    font-size: 0.8125rem;
    line-height: 1.4;
}
table.erp-table tr:last-child td { border-bottom: none; }

.oddrow  { background-color: #FAFAFA !important; }
.evenrow { background-color: #ffffff !important; }
table.erp-table tbody tr:hover td { background-color: #EBF5FF !important; }

table.erp-table td.tableheader[colspan] {
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #374151 !important;
    background: #F0F4F8 !important;
    padding: 0.4375rem 0.75rem !important;
    border-top: 1px solid #E5E7EB;
    border-bottom: 1px solid #E5E7EB;
}

td.label, .label {
    font-size: 0.875rem !important;
    font-weight: 400 !important;
    color: #6A6D70 !important;
    background-color: #F4F4F4 !important;
    padding: 0.4375rem 0.75rem !important;
    white-space: nowrap;
    vertical-align: middle;
}

table.tablestyle_inner {
    border-collapse: collapse;
    width: 100%;
}
table.tablestyle_inner td {
    padding: 0.4375rem 0.5rem;
    vertical-align: middle;
    font-size: 0.875rem;
}

.amount {
    font-size: 0.8125rem !important;
    text-align: right;
    font-family: inherit !important;
}

/* ════════════════════════════════════════════════════════════════════
   Form inputs  —  SAP Fiori 3 style
   Border: #8696A9  |  Hover: #5B738B  |  Focus: #0070F2 + 1px inner shadow
   ═══════════════════════════════════════════════════════════════════ */

input.erp-input, select.erp-input, textarea.erp-input,
input.form-control, select.form-control, textarea.form-control,
input.searchbox {
    font-size: 0.875rem !important;
    color: #32363a !important;
    background: #ffffff !important;
    border: 1px solid #8696A9 !important;
    border-radius: 4px !important;
    padding: 0.375rem 0.5rem !important;
    height: 2.25rem;
    box-shadow: none !important;
    outline: none;
    transition: border-color 0.1s, box-shadow 0.1s;
    line-height: 1.4;
    box-sizing: border-box;
}
textarea.erp-input,
textarea.form-control {
    height: auto;
    min-height: 4rem;
}
select.erp-input,
select.form-control {
    padding-right: 1.75rem !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%238696A9'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.5rem center !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}
input.erp-input:hover, select.erp-input:hover,
input.form-control:hover, select.form-control:hover,
input.searchbox:hover {
    border-color: #5B738B !important;
}
input.erp-input:focus, select.erp-input:focus, textarea.erp-input:focus,
input.form-control:focus, select.form-control:focus, textarea.form-control:focus,
input.searchbox:focus {
    border-color: #0070F2 !important;
    box-shadow: 0 0 0 0.0625rem #0070F2 !important;
    outline: none !important;
}
input.erp-input:disabled, select.erp-input:disabled, textarea.erp-input:disabled,
input.form-control:disabled, select.form-control:disabled, textarea.form-control:disabled {
    background-color: #F4F4F4 !important;
    border-color: #D9D9D9 !important;
    color: #ABABAB !important;
    cursor: not-allowed;
}
input.erp-input[readonly], textarea.erp-input[readonly],
input.form-control[readonly], textarea.form-control[readonly] {
    background-color: #F4F4F4 !important;
    border-color: #D9D9D9 !important;
    color: #6A6D70 !important;
}
input.erp-input::placeholder,
input.form-control::placeholder,
textarea.erp-input::placeholder { color: #ABABAB; }

input.amount {
    font-size: 0.875rem !important;
    color: #32363a !important;
    background: #ffffff !important;
    border: 1px solid #8696A9 !important;
    border-radius: 4px !important;
    padding: 0.375rem 0.5rem !important;
    height: 2.25rem;
    text-align: right;
    box-shadow: none !important;
    outline: none;
    transition: border-color 0.1s, box-shadow 0.1s;
    box-sizing: border-box;
}
input.amount:hover { border-color: #5B738B !important; }
input.amount:focus {
    border-color: #0070F2 !important;
    box-shadow: 0 0 0 0.0625rem #0070F2 !important;
    outline: none;
}
input.amount:disabled {
    background-color: #F4F4F4 !important;
    border-color: #D9D9D9 !important;
    color: #ABABAB !important;
    cursor: not-allowed;
}

input.erp-checkbox,
input.form-check-input {
    width: 1rem !important;
    height: 1rem !important;
    border: 1px solid #8696A9 !important;
    border-radius: 2px !important;
    accent-color: #0070F2;
    cursor: pointer;
    vertical-align: middle;
    margin-right: 0.25rem;
    box-shadow: none !important;
    flex-shrink: 0;
}

.erp-date-wrap {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid #8696A9;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
    transition: border-color 0.1s, box-shadow 0.1s;
    height: 2.25rem;
}
.erp-date-wrap:hover { border-color: #5B738B; }
.erp-date-wrap:focus-within {
    border-color: #0070F2;
    box-shadow: 0 0 0 0.0625rem #0070F2;
}
.erp-date-wrap input.erp-date {
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 0.5rem !important;
    font-size: 0.875rem !important;
    color: #32363a !important;
    outline: none;
    background: transparent !important;
    min-width: 0;
    height: 100%;
}
.erp-date-icon {
    display: flex;
    align-items: center;
    padding: 0 0.5rem;
    color: #8696A9;
    font-size: 0.875rem;
    background: #F4F4F4;
    border-left: 1px solid #D9D9D9;
    cursor: pointer;
}

.input-group {
    display: inline-flex !important;
    align-items: stretch;
    border: 1px solid #8696A9;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
    transition: border-color 0.1s, box-shadow 0.1s;
    height: 2.25rem;
    width: auto !important;
}
.input-group:hover { border-color: #5B738B; }
.input-group:focus-within {
    border-color: #0070F2;
    box-shadow: 0 0 0 0.0625rem #0070F2;
}
.input-group-text {
    display: flex;
    align-items: center;
    padding: 0 0.5rem;
    color: #8696A9;
    background: #F4F4F4;
    border: none;
    border-right: 1px solid #D9D9D9;
    font-size: 0.875rem;
    flex: 0 0 auto;
}
/* Prevent Bootstrap's flex:1 1 auto from stretching select to full width */
.input-group > select,
.input-group > .form-control,
.input-group > select.combo,
.input-group > select.combo2,
.input-group > select.combo3 {
    flex: 0 1 auto !important;
    width: auto !important;
    min-width: 4rem;
}
.input-group .form-control,
.input-group select.combo,
.input-group select.combo2,
.input-group select.combo3,
.input-group input.erp-input {
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    height: 100%;
}

/* ════════════════════════════════════════════════════════════════════
   Buttons
   ═══════════════════════════════════════════════════════════════════ */

button.inputsubmit,
button.ajaxsubmit {
    display: inline-flex !important;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.875rem !important;
    font-size: 0.8125rem !important;
    font-weight: 500 !important;
    color: #fff !important;
    background-color: #0070F2 !important;
    border: 1px solid #0070F2 !important;
    border-radius: 4px !important;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s;
    line-height: 1.4;
    white-space: nowrap;
    box-shadow: none !important;
    text-shadow: none;
}
button.inputsubmit:hover,
button.ajaxsubmit:hover  { background-color: #0057C2 !important; border-color: #0057C2 !important; }
button.inputsubmit:active,
button.ajaxsubmit:active { background-color: #0040B0 !important; border-color: #0040B0 !important; }

button.inputsubmit[name="RESET"],
button.ajaxsubmit[name="RESET"],
button.inputsubmit[value="Cancel"],
button.ajaxsubmit[value="Cancel"] {
    color: #374151 !important;
    background-color: #fff !important;
    border-color: #D1D5DB !important;
}
button.inputsubmit[name="RESET"]:hover,
button.ajaxsubmit[name="RESET"]:hover,
button.inputsubmit[value="Cancel"]:hover,
button.ajaxsubmit[value="Cancel"]:hover {
    background-color: #F9FAFB !important;
}

button.editbutton,
input.editbutton {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0.1875rem 0.4375rem !important;
    font-size: 0.75rem !important;
    color: #6B7280 !important;
    background: #ffffff !important;
    border: 1px solid #E5E7EB !important;
    border-radius: 4px !important;
    cursor: pointer;
    transition: background-color 0.1s, border-color 0.1s;
    box-shadow: none !important;
    white-space: nowrap;
}
button.editbutton:hover,
input.editbutton:hover {
    background: #F3F4F6 !important;
    border-color: #D1D5DB !important;
    color: #1A1A2E !important;
}

/* Bootstrap Icons inside submit / action buttons */
button.inputsubmit .bi,
button.ajaxsubmit .bi {
    font-size: 0.875rem;
    line-height: 1;
    pointer-events: none;
}

button.editbutton .bi {
    font-size: 0.8125rem;
    line-height: 1;
    pointer-events: none;
}

/* Semantic colours for row-action buttons */
button.editbutton .bi-pencil       { color: #0070F2; }
button.editbutton:hover .bi-pencil { color: #0057C2; }

button.editbutton .bi-trash        { color: #DC2626; }
button.editbutton:hover .bi-trash  { color: #B91C1C; }

button.editbutton .bi-plus-circle       { color: #059669; }
button.editbutton:hover .bi-plus-circle { color: #047857; }

button.editbutton .bi-eye       { color: #6B7280; }
button.editbutton:hover .bi-eye { color: #374151; }

/* ════════════════════════════════════════════════════════════════════
   Tabs
   ═══════════════════════════════════════════════════════════════════ */

ul.ajaxtabs {
    display: flex !important;
    flex-wrap: wrap;
    gap: 0.125rem;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border-bottom: 2px solid #E5E7EB;
    background: transparent;
}
ul.ajaxtabs li.nav-item { margin: 0; }
ul.ajaxtabs button.nav-link,
ul.ajaxtabs li button {
    display: inline-block !important;
    padding: 0.4375rem 1rem !important;
    font-size: 0.8125rem !important;
    font-weight: 500 !important;
    color: #6B7280 !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 4px 4px 0 0 !important;
    cursor: pointer;
    transition: color 0.15s !important;
    margin-bottom: -2px;
}
ul.ajaxtabs button.nav-link:hover,
ul.ajaxtabs li button:hover {
    color: #0070F2 !important;
    background: #F9FAFB !important;
}
ul.ajaxtabs button.nav-link.current,
ul.ajaxtabs li button.current {
    color: #0070F2 !important;
    font-weight: 600 !important;
    background: #fff !important;
    border-color: #E5E7EB !important;
    border-bottom-color: #fff !important;
}
ul.ajaxtabs button.nav-link.disabled,
ul.ajaxtabs li button.disabled { opacity: 0.4; cursor: not-allowed; }

.spaceBox   { height: 0; }
.contentBox { padding: 0.75rem 0 0; }

/* ════════════════════════════════════════════════════════════════════
   Reports 3-panel layout
   ═══════════════════════════════════════════════════════════════════ */

.rep-layout {
    display: grid;
    grid-template-columns: 220px 1fr 320px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    min-height: 560px;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 6px rgba(0,0,0,0.07);
}

.rep-sidebar {
    background: #1C2833;
    display: flex;
    flex-direction: column;
}
.rep-sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: rgba(255,255,255,0.45);
    border-bottom: 1px solid rgba(255,255,255,0.07);
    flex-shrink: 0;
}
.rep-cats-nav {
    display: flex;
    flex-direction: column;
    padding: 0.375rem 0;
    flex: 1;
    overflow-y: auto;
}
a.rep-cat-item.repclass_link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 1rem;
    font-size: 0.8125rem;
    font-weight: 400;
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: background 0.12s, color 0.12s;
    cursor: pointer;
}
a.rep-cat-item.repclass_link:hover {
    background: rgba(255,255,255,0.07);
    color: #fff;
}
a.rep-cat-item.repclass_link.active,
a.rep-cat-item.repclass_link[style*="bold"] {
    background: rgba(0,112,242,0.22);
    color: #fff;
    border-left-color: #0070F2;
    font-weight: 600;
}
.rep-cat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    font-size: 0.9375rem;
    flex-shrink: 0;
    opacity: 0.8;
}
a.rep-cat-item.repclass_link.active .rep-cat-icon,
a.rep-cat-item.repclass_link:hover .rep-cat-icon { opacity: 1; }
.rep-cat-label { flex: 1; }
.rep-cat-badge {
    font-size: 0.625rem;
    font-weight: 600;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.55);
    padding: 0.1rem 0.375rem;
    border-radius: 10px;
    flex-shrink: 0;
    line-height: 1.6;
}
a.rep-cat-item.repclass_link.active .rep-cat-badge {
    background: rgba(0,112,242,0.5);
    color: #fff;
}

.rep-list-pane {
    border-right: 1px solid #E5E7EB;
    overflow-y: auto;
    background: #fff;
}
.rep-list-banner {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    background: #F9FAFB;
    border-bottom: 1px solid #E5E7EB;
    position: sticky;
    top: 0;
    z-index: 1;
}
.rep-list-banner-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: #EBF5FF;
    border-radius: 8px;
    color: #0070F2;
    font-size: 1.125rem;
    flex-shrink: 0;
}
.rep-list-banner-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1A1A2E;
    line-height: 1.2;
}
.rep-list-banner-sub {
    font-size: 0.75rem;
    color: #9CA3AF;
    margin-top: 0.1rem;
}
a.rep-item.repopts_link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6875rem 1.25rem;
    font-size: 0.8125rem;
    color: #374151;
    text-decoration: none;
    border-left: 3px solid transparent;
    border-bottom: 1px solid #F9FAFB;
    transition: background 0.1s, color 0.1s;
}
a.rep-item.repopts_link:hover {
    background: #F0F7FF;
    color: #0070F2;
    border-left-color: #93C5FD;
}
a.rep-item.repopts_link.selected,
a.rep-item.repopts_link[style*="bold"] {
    background: #EBF5FF;
    color: #0070F2;
    border-left-color: #0070F2;
    font-weight: 500;
}
.rep-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: #F3F4F6;
    border-radius: 6px;
    color: #9CA3AF;
    font-size: 0.875rem;
    flex-shrink: 0;
    transition: background 0.1s, color 0.1s;
}
a.rep-item.repopts_link:hover .rep-item-icon,
a.rep-item.repopts_link.selected .rep-item-icon,
a.rep-item.repopts_link[style*="bold"] .rep-item-icon {
    background: #DBEAFE;
    color: #0070F2;
}
.rep-item-label { flex: 1; line-height: 1.35; }
.rep-item-arrow {
    font-size: 0.625rem;
    color: #E5E7EB;
    flex-shrink: 0;
    transition: color 0.1s;
}
a.rep-item.repopts_link:hover .rep-item-arrow,
a.rep-item.repopts_link.selected .rep-item-arrow { color: #93C5FD; }

.rep-params-pane {
    display: flex;
    flex-direction: column;
    background: #fff;
    overflow: hidden;
}
#rep_form {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.rep-params-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: #F9FAFB;
    border-bottom: 1px solid #E5E7EB;
    flex-shrink: 0;
}
.rep-params-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: #EBF5FF;
    border-radius: 7px;
    color: #0070F2;
    font-size: 1rem;
    flex-shrink: 0;
}
.rep-params-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1A1A2E;
    line-height: 1.3;
}
.rep-params-form {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}
.rep-params-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 0.875rem 1rem 0.5rem;
}
.rep-params-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid #E5E7EB;
    background: #F9FAFB;
    flex-shrink: 0;
}
.rep-params-footer button.inputsubmit,
.rep-params-footer button.ajaxsubmit {
    width: 100% !important;
    justify-content: center !important;
    font-size: 0.875rem !important;
    padding: 0.5625rem 1rem !important;
    border-radius: 6px !important;
}

.rep-param-row { margin-bottom: 0.875rem; }
.rep-param-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6B7280;
    margin-bottom: 0.3125rem;
}
.rep-param-ctrl { width: 100%; }
.rep-param-ctrl select,
.rep-param-ctrl input[type="text"],
.rep-param-ctrl input.erp-input,
.rep-param-ctrl textarea.erp-input {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

.rep-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    text-align: center;
    min-height: 400px;
}
.rep-empty-icon {
    font-size: 2.75rem;
    color: #D1D5DB;
    margin-bottom: 1rem;
    display: block;
}
.rep-empty-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #9CA3AF;
    margin-bottom: 0.375rem;
}
.rep-empty-sub {
    font-size: 0.8125rem;
    color: #D1D5DB;
    max-width: 210px;
    line-height: 1.55;
}

/* ════════════════════════════════════════════════════════════════════
   Pager
   ═══════════════════════════════════════════════════════════════════ */

button.navibutton {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #374151;
    background: #F9FAFB;
    border: 1px solid #D1D5DB;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
    white-space: nowrap;
}
button.navibutton:hover:not(:disabled) {
    background: #EBF5FF;
    border-color: #0070F2;
    color: #0070F2;
}
button.navibutton:disabled {
    opacity: 0.38;
    cursor: not-allowed;
}
button.navibutton img { width: 14px; height: 14px; vertical-align: middle; }

tr.navibar td,
td.navibar {
    background: #F9FAFB !important;
    border-top: 1px solid #E5E7EB !important;
    border-bottom: none !important;
    padding: 0.4375rem 0.75rem !important;
    font-size: 0.75rem;
    color: #6B7280;
}

/* ════════════════════════════════════════════════════════════════════
   Status markers
   ═══════════════════════════════════════════════════════════════════ */

.overduebg td { background-color: #FEF2F2 !important; }
.overduefg    { color: #BB0000; font-size: 0.8125rem; }

/* ════════════════════════════════════════════════════════════════════
   Dropdown refresh / select buttons  (combo_select, combo_submit)
   Always visible as clickable icon buttons — fallback for AJAX.
   ═══════════════════════════════════════════════════════════════════ */

button.combo_select,
button.combo_submit {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 0.45rem;
    border-color: #D1D5DB;
    background-color: #F9FAFB;
    color: #374151;
    flex-shrink: 0;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
button.combo_select:hover,
button.combo_submit:hover {
    background-color: #EFF6FF;
    border-color: #0070F2;
    color: #0070F2;
}
button.combo_select:active,
button.combo_submit:active {
    background-color: #DBEAFE;
}

/* ════════════════════════════════════════════════════════════════════
   App Footer  (footer.inc)
   ═══════════════════════════════════════════════════════════════════ */

.app-footer {
    background-color: #1C2833;
    border-top: 3px solid #0070F2;
    color: rgba(255,255,255,0.55);
    font-size: 0.75rem;
    font-family: inherit;
    margin-top: auto;
}

.app-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
}

.app-footer-brand {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 0.8125rem;
    letter-spacing: -0.3px;
}
.app-footer-brand-erp { color: #ffffff; }
.app-footer-brand-nex { color: #0070F2; }

.app-footer-sep {
    width: 1px;
    height: 12px;
    background-color: rgba(255,255,255,0.2);
    margin: 0 0.25rem;
}

.app-footer-copy {
    font-size: 0.6875rem;
    color: rgba(255,255,255,0.4);
    font-weight: 400;
}

.app-footer-links {
    display: flex;
    align-items: center;
    gap: 0.125rem;
    margin-left: auto;
}

.app-footer-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.625rem;
    font-size: 0.6875rem;
    font-weight: 500;
    color: rgba(255,255,255,0.45);
    text-decoration: none;
    border-radius: 3px;
    transition: color 0.15s, background-color 0.15s;
    white-space: nowrap;
}
.app-footer-link:hover {
    color: #fff;
    background-color: rgba(255,255,255,0.08);
    text-decoration: none;
}
.app-footer-link svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.app-footer-version {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.125rem 0.5rem;
    font-size: 0.625rem;
    font-weight: 600;
    color: rgba(0,112,242,0.8);
    background-color: rgba(0,112,242,0.1);
    border: 1px solid rgba(0,112,242,0.2);
    border-radius: 3px;
    letter-spacing: 0.3px;
    margin-left: 0.5rem;
}

@media (max-width: 600px) {
    .app-footer-inner { flex-direction: column; align-items: flex-start; gap: 0.375rem; }
    .app-footer-links { margin-left: 0; }
}
