/* ========== MODERN UI DESIGN - KONIFINANCA ========== */

/* Full width layout */
.t-Body-contentInner .container,
.t-Body-contentInner .container-fluid {
    max-width: 100% !important;
    width: 100% !important;
}
.t-Body-content {
    max-width: 100% !important;
    padding-top: 0 !important;
    box-sizing: border-box !important;
}

/* Page background */
.t-Body-contentInner {
    background: #F5F7F7;
    padding: 8px 28px !important;
}

/* HIDE breadcrumb bar */
.t-Body-title,
.t-Body-title-shrinkWrap,
.t-Breadcrumb-region {
    display: none !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Page title in header */
#headerPageTitle {
    color: #fff !important;
    font-size: 16px;
    font-weight: normal;
    margin-left: 12px;
}

/* ---- Search toolbar card ---- */
.search-toolbar-card {
    background: #FFFFFF;
    border: 1px solid #E7ECEF;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    padding: 12px 20px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.search-toolbar-card .search-field-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}
.search-toolbar-card .search-field-wrap label {
    font-size: 14px;
    font-weight: 500;
    color: #4B5563;
    white-space: nowrap;
}
.search-toolbar-card .search-field-wrap input {
    flex: 1;
    height: 42px !important;
    border-radius: 8px !important;
    border: 1px solid #D7DEE3 !important;
    padding: 0 14px !important;
    font-size: 14px !important;
}
.search-toolbar-card .search-field-wrap input:focus {
    border-color: #3466b2 !important;
    box-shadow: 0 0 0 3px rgba(52,102,178,0.12) !important;
    outline: none !important;
}
.search-toolbar-card button {
    height: 42px;
    padding: 0 28px !important;
    border-radius: 8px !important;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ---- Table card ---- */
.t-Region {
    background: #FFFFFF;
    border: 1px solid #E7ECEF;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    overflow: hidden;
    padding-top: 8px !important;
}
.t-Region-header {
    display: none;
}
.t-Region-body {
    padding: 0;
}

/* Table header */
.t-Report-report th,
.t-Report-report thead th {
    background: #F8FAFB !important;
    color: #374151;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 12px !important;
    border-bottom: 2px solid #E7ECEF;
    white-space: nowrap;
}

/* Table rows */
.t-Report-report td {
    padding: 4px 12px !important;
    font-size: 14px;
    color: #1F2937;
    border-bottom: 1px solid #F0F2F4;
    vertical-align: middle;
}

/* Zebra striping */
.t-Report-report tbody tr:nth-child(even) {
    background: #FAFBFC;
}

/* Row hover + clickable */
.t-Report-report tbody tr {
    cursor: pointer;
}
.t-Report-report tbody tr:hover td {
    background: #EBF0F8 !important;
    transition: background 0.15s ease;
}

/* Edit icon button */
.t-Report-report td:first-child {
    text-align: center;
    width: 48px;
}
.t-Report-report td:first-child a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: #EBF0F8;
    color: #3466b2;
    transition: background 0.15s, color 0.15s;
}
.t-Report-report td:first-child a:hover {
    background: #3466b2;
    color: #FFFFFF;
}

/* Table header link colors */
.t-Report-report th a {
    color: #374151 !important;
    text-decoration: none !important;
}
.t-Report-report th a:hover {
    color: #3466b2 !important;
}

/* Content starts at top */
[id=t_Body_content] {
    margin-top: 48px !important;
}
[id=t_Body_content] > :first-child {
    display: none !important;
}
.t-Body-contentInner {
    width: 100%;
}

/* Help icons hidden */
.js-itemHelp { display: none !important; }

/* Pagination styling */
.t-Report-paginationWrap {
    text-align: center;
    padding: 12px 16px;
}
.t-Report-paginationWrap .t-Report-paginationLink {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    border-radius: 8px;
    margin: 0 2px;
    font-size: 14px;
    color: #374151;
    text-decoration: none;
}
.t-Report-paginationWrap .t-Report-paginationLink:hover {
    background: #EBF0F8;
    color: #3466b2;
}
.t-Report-paginationWrap .t-Report-paginationLink--current {
    background: #3466b2;
    color: #FFFFFF;
}

/* ---- Form / Editor styling ---- */

/* Form card */
.t-Region {
    overflow: visible;
    padding: 8px 0 !important;
    margin-bottom: 12px;
}
.t-Region-body {
    padding: 8px 20px 8px 40px;
    overflow: visible !important;
}
.t-Region-body .container,
.t-Region-body > .container {
    overflow: visible !important;
}
.t-Body-content {
    overflow: visible !important;
}
.t-Body-contentInner .container {
    overflow: visible !important;
}

/* Labels */
.t-Form-labelContainer {
    padding: 0 8px 0 0 !important;
}
.t-Form-label {
    text-align: right !important;
    white-space: nowrap !important;
    font-size: 13px;
    font-weight: 500;
    color: #4B5563;
}
.t-Form-labelContainer.col.col-1 {
    min-width: 100px !important;
    flex: 0 0 100px !important;
    width: 100px !important;
}

/* Field containers: vertically centered */
.t-Form-fieldContainer:not([style*="display: none"]) {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
}
.t-Form-fieldContainer[style*="display: none"] {
    display: none !important;
}
.t-Form-labelContainer {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
}

/* Form inputs */
.t-Form-fieldContainer input[type="text"],
.t-Form-fieldContainer input[type="number"],
.t-Form-fieldContainer input[type="email"],
.t-Form-fieldContainer input[type="password"],
.t-Form-fieldContainer textarea,
.t-Form-fieldContainer select,
.t-Form-inputContainer input[type="text"],
.t-Form-inputContainer input[type="number"],
.t-Form-inputContainer select,
.t-Form-inputContainer textarea,
.apex-item-text,
.apex-item-select,
.apex-item-textarea {
    border: 1px solid #D7DEE3 !important;
    border-radius: 6px !important;
    padding: 6px 10px !important;
    font-size: 14px !important;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.t-Form-fieldContainer input:focus,
.t-Form-fieldContainer textarea:focus,
.t-Form-fieldContainer select:focus,
.t-Form-inputContainer input:focus,
.t-Form-inputContainer select:focus,
.t-Form-inputContainer textarea:focus {
    border-color: #3466b2 !important;
    box-shadow: 0 0 0 3px rgba(52,102,178,0.12) !important;
    outline: none !important;
}

/* Form row spacing */
.row {
    margin-bottom: 4px;
}

/* Buttons: right-aligned, standardized */
.t-Region-body > table {
    width: 100% !important;
}
.t-Region-body > table td {
    text-align: right !important;
    padding: 16px 0 !important;
}
.t-Region-body > table .t-Button,
.t-Region-buttons .t-Button {
    height: 42px !important;
    padding: 0 28px !important;
    font-size: 14px !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin-left: 8px !important;
}

/* ======== SIDEBAR MENU - matching puzzlemedia ======== */
.t-Body-nav, .t-TreeNav {
    background: linear-gradient(180deg, #3466b2 0%, #2b5699 100%) !important;
}

/* Hide default row backgrounds */
.t-Body-nav .t-TreeNav .a-TreeView-node--topLevel > .a-TreeView-row {
    height: 0 !important; min-height: 0 !important; max-height: 0 !important;
    overflow: hidden !important; margin: 0 !important; padding: 0 !important; border: none !important;
}

/* Top-level menu items */
.t-Body-nav .t-TreeNav .a-TreeView-node--topLevel > .a-TreeView-content {
    display: flex !important; align-items: center !important;
    height: 40px !important; margin: 1px 8px !important;
    border-radius: 8px !important; padding: 0 12px !important;
    cursor: pointer !important; border-left: 3px solid transparent !important;
    transition: background 0.1s !important;
}
.t-Body-nav .t-TreeNav .a-TreeView-node--topLevel > .a-TreeView-content .a-TreeView-label {
    font-size: 14px !important; font-weight: 500 !important;
    color: rgba(255,255,255,0.95) !important; letter-spacing: 0.3px !important;
    white-space: nowrap !important;
}
.t-Body-nav .t-TreeNav .a-TreeView-node--topLevel > .a-TreeView-content .fa,
.t-Body-nav .t-TreeNav .a-TreeView-node--topLevel > .a-TreeView-content .a-Icon {
    color: rgba(255,255,255,0.85) !important; font-size: 16px !important;
    margin-right: 8px !important; display: inline-block !important;
    flex-shrink: 0 !important; width: 20px !important; text-align: center !important;
}

/* Top-level hover */
.t-Body-nav .t-TreeNav .a-TreeView-node--topLevel > .a-TreeView-content:hover {
    background: rgba(255,255,255,0.10) !important;
}

/* Top-level active/selected */
.t-Body-nav .t-TreeNav .a-TreeView-node--topLevel > .a-TreeView-content.is-selected,
.t-Body-nav .t-TreeNav .a-TreeView-node--topLevel > .a-TreeView-content.is-current {
    background: rgba(255,255,255,0.18) !important;
    border-left: 3px solid #fff !important;
}
.t-Body-nav .t-TreeNav .a-TreeView-node--topLevel > .a-TreeView-content.is-selected .a-TreeView-label,
.t-Body-nav .t-TreeNav .a-TreeView-node--topLevel > .a-TreeView-content.is-current .a-TreeView-label {
    font-weight: 600 !important; color: #fff !important;
}
.t-Body-nav .t-TreeNav .a-TreeView-node--topLevel > .a-TreeView-content.is-current--top {
    border-left: 3px solid rgba(255,255,255,0.5) !important;
    background: transparent !important;
}
.t-Body-nav .t-TreeNav .a-TreeView-node--topLevel > .a-TreeView-content.is-current--top .a-TreeView-label {
    font-weight: 600 !important;
}
.t-Body-nav .t-TreeNav .a-TreeView-node--topLevel > .a-TreeView-content:has(.a-TreeView-label.is-current) {
    background: rgba(255,255,255,0.18) !important;
    border-left: 3px solid #fff !important;
}
.t-Body-nav .t-TreeNav .a-TreeView-node--topLevel > .a-TreeView-content .a-TreeView-label.is-current {
    font-weight: 600 !important; color: #fff !important;
}

/* Toggle arrow */
.t-Body-nav .t-TreeNav .a-TreeView-node--topLevel > .a-TreeView-toggle {
    position: absolute !important; right: 16px !important; top: 1px !important;
    height: 40px !important; z-index: 3 !important;
    display: flex !important; align-items: center !important;
    color: rgba(255,255,255,0.5) !important;
}
.t-TreeNav .a-TreeView-toggle:hover {
    color: rgba(255,255,255,0.9) !important;
}

/* Separator between top-level items */
.t-TreeNav .a-TreeView-node--topLevel + .a-TreeView-node--topLevel > .a-TreeView-content {
    border-top: 1px solid rgba(255,255,255,0.06);
}
.t-TreeNav .a-TreeView-node--topLevel {
    position: relative !important; margin: 0 !important; padding: 0 !important;
    border-bottom: none !important;
}

/* Sub-menu items */
.t-TreeNav .a-TreeView-node:not(.a-TreeView-node--topLevel) {
    position: relative !important; margin: 0 !important; padding: 0 !important;
}
.t-Body-nav .t-TreeNav .a-TreeView-node:not(.a-TreeView-node--topLevel) > .a-TreeView-row {
    height: 0 !important; min-height: 0 !important; max-height: 0 !important;
    overflow: hidden !important; margin: 0 !important; padding: 0 !important; border: none !important;
}
.t-Body-nav .t-TreeNav .a-TreeView-node:not(.a-TreeView-node--topLevel) > .a-TreeView-content {
    display: flex !important; align-items: center !important;
    height: 32px !important; margin: 0 8px 0 20px !important;
    border-radius: 6px !important; padding: 0 10px !important;
    cursor: pointer !important; border-left: 3px solid transparent !important;
    transition: background 0.1s !important;
}
.t-Body-nav .t-TreeNav .a-TreeView-node:not(.a-TreeView-node--topLevel) > .a-TreeView-content .a-TreeView-label {
    font-size: 13px !important; font-weight: 400 !important;
    color: rgba(255,255,255,0.8) !important;
    white-space: normal !important; line-height: 1.3 !important;
}
.t-TreeNav .a-TreeView-node:not(.a-TreeView-node--topLevel) > .a-TreeView-content .fa,
.t-TreeNav .a-TreeView-node:not(.a-TreeView-node--topLevel) > .a-TreeView-content .a-Icon {
    display: inline-block !important; margin-right: 6px !important;
    flex-shrink: 0 !important; width: 16px !important; text-align: center !important;
    font-size: 14px !important; color: rgba(255,255,255,0.7) !important;
}
.t-TreeNav .a-TreeView-content .a-TreeView-label {
    display: inline !important; vertical-align: middle !important;
}

/* Sub-menu hover */
.t-Body-nav .t-TreeNav .a-TreeView-node:not(.a-TreeView-node--topLevel) > .a-TreeView-content:hover {
    background: rgba(255,255,255,0.10) !important;
}
.t-Body-nav .t-TreeNav .a-TreeView-node:not(.a-TreeView-node--topLevel) > .a-TreeView-content:hover .a-TreeView-label {
    color: #fff !important;
}

/* Sub-menu active/selected */
.t-Body-nav .t-TreeNav .a-TreeView-node:not(.a-TreeView-node--topLevel) > .a-TreeView-content.is-current--top {
    border-left: 3px solid rgba(255,255,255,0.5) !important;
}
.t-Body-nav .t-TreeNav .a-TreeView-node:not(.a-TreeView-node--topLevel) > .a-TreeView-content.is-selected,
.t-Body-nav .t-TreeNav .a-TreeView-node:not(.a-TreeView-node--topLevel) > .a-TreeView-content.is-current {
    background: rgba(255,255,255,0.15) !important;
    border-left: 3px solid #fff !important;
}
.t-Body-nav .t-TreeNav .a-TreeView-node:not(.a-TreeView-node--topLevel) > .a-TreeView-content.is-selected .a-TreeView-label,
.t-Body-nav .t-TreeNav .a-TreeView-node:not(.a-TreeView-node--topLevel) > .a-TreeView-content.is-current .a-TreeView-label {
    color: #fff !important; font-weight: 600 !important;
}
.t-Body-nav .t-TreeNav .a-TreeView-node:not(.a-TreeView-node--topLevel) > .a-TreeView-content:has(.a-TreeView-label.is-current) {
    background: rgba(255,255,255,0.15) !important;
    border-left: 3px solid #fff !important;
}
.t-Body-nav .t-TreeNav .a-TreeView-node:not(.a-TreeView-node--topLevel) > .a-TreeView-content .a-TreeView-label.is-current {
    color: #fff !important; font-weight: 600 !important;
}

/* Focus outline removal */
.t-TreeNav .a-TreeView-row:focus,
.t-TreeNav .a-TreeView-row.is-focused,
.t-TreeNav .a-TreeView-content:focus {
    outline: none !important; box-shadow: none !important;
}

/* Scrollbar styling */
.t-Body-nav::-webkit-scrollbar { width: 4px; }
.t-Body-nav::-webkit-scrollbar-track { background: transparent; }
.t-Body-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 4px; }
.t-Body-nav::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.35); }

/* Header branding */
.t-Header .t-Header-branding .t-Header-logo-link, #headerPageTitle {
    font-weight: 700 !important; font-size: 18px !important; letter-spacing: 0.3px !important;
}

/* Collapsed nav */
.js-navCollapsed .t-Body-nav .t-TreeNav .a-TreeView-node--topLevel > .a-TreeView-content {
    padding: 0 !important; margin: 1px 0 !important;
    justify-content: center !important; overflow: visible !important;
    border-left: none !important;
}
.js-navCollapsed .t-Body-nav .t-TreeNav .a-TreeView-node--topLevel > .a-TreeView-content .fa,
.js-navCollapsed .t-Body-nav .t-TreeNav .a-TreeView-node--topLevel > .a-TreeView-content .a-Icon {
    margin-right: 0 !important; font-size: 18px !important; width: auto !important;
}
.js-navCollapsed .t-Body-nav .t-TreeNav .a-TreeView-node--topLevel > .a-TreeView-content .a-TreeView-label {
    display: none !important;
}
.js-navCollapsed .t-Body-nav .t-TreeNav .a-TreeView-node--topLevel > .a-TreeView-toggle {
    display: none !important;
}
.js-navCollapsed .t-Body-nav .t-TreeNav .a-TreeView-node--topLevel > .a-TreeView-content.is-current,
.js-navCollapsed .t-Body-nav .t-TreeNav .a-TreeView-node--topLevel > .a-TreeView-content.is-selected,
.js-navCollapsed .t-Body-nav .t-TreeNav .a-TreeView-node--topLevel > .a-TreeView-content:has(.a-TreeView-label.is-current) {
    background: rgba(255,255,255,0.18) !important; border-radius: 8px !important;
}
.js-navCollapsed .t-Body-nav .t-TreeNav .a-TreeView-node--topLevel > .a-TreeView-content.is-current--top,
.js-navCollapsed .t-Body-nav .t-TreeNav .a-TreeView-node--topLevel > .a-TreeView-content:has(.a-TreeView-label.is-current--top) {
    background: transparent !important;
}

/* ---- Mobile responsive ---- */
@media (max-width: 640px) {
    .t-Body-contentInner { padding: 8px 8px !important; }
    .search-toolbar-card { padding: 8px 12px; gap: 8px; }
    .t-Report-report td,
    .t-Report-report th {
        padding: 8px 4px !important;
        font-size: 13px !important;
    }
}
@media (max-width: 960px) {
    .t-Body-contentInner { padding: 12px 16px !important; }
}
