/* ===== Operations pages: Renewals, Late Fees, Energy, Documents, Vendor Directory ===== */
html body .tp .tone-amber { background: #fff4e0; color: #b45309; }
html body .tp.ops .card { border-radius: 14px; border: 1px solid #e4e7f4; box-shadow: 0 1px 2px rgba(30,27,75,.04), 0 10px 28px rgba(30,27,75,.05); }
html body .tp.ops .card-header { border-bottom: 1px solid #eef0f8; padding-top: 1rem; padding-bottom: 1rem; }
html body .tp.ops .card-header h5 { font-weight: 700; color: #000; }
html body .tp.ops .table > thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: #374151; background: #f8f9fd; white-space: nowrap; }
html body .tp.ops .table td { color: #000; }
html body .tp.ops .table tbody tr:hover { background: #fafaff; }
html body .tp.ops .tp-filter { display: flex; flex-wrap: wrap; gap: .4rem; }
html body .tp.ops .tp-filter-pill span { display: inline-block; min-width: 1.4rem; margin-left: .3rem; padding: 0 .35rem; border-radius: 999px; background: #eef2ff; color: #4338ca; font-size: .72rem; text-align: center; }
html body .tp.ops .tp-filter-pill.active span { background: rgba(255,255,255,.25); color: #fff; }
html body .tp.ops tr.lf-off td:not(:first-child) { opacity: .45; }
html body .tp.ops tr.lf-off td:not(:first-child) * { pointer-events: auto; }
html body .tp.ops .progress { background: #f1f2f9; border-radius: 999px; }
html body .tp.ops .progress-bar { border-radius: 999px; }
html body .tp.ops .tp-stat-value small { font-weight: 600; color: #4b5563; }
@media (max-width: 575.98px) {
  html body .tp.ops .tp-filter { overflow-x: auto; flex-wrap: nowrap; padding-bottom: .25rem; }
  html body .tp.ops .tp-filter-pill { white-space: nowrap; }
}

/* ===== Related-pages bar (pages linked from a menu item) ===== */
html body .page-links { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin: -.35rem 0 1.25rem; }
html body .page-links-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #4b5563; margin-right: .15rem; }
html body .page-link-chip { display: inline-flex; align-items: center; gap: .3rem; padding: .32rem .8rem; border-radius: 999px; border: 1px solid #d9dcef; background: #fff; color: #1f2937 !important; font-size: .84rem; font-weight: 600; text-decoration: none; transition: all .15s ease; }
html body .page-link-chip:hover { border-color: #6366f1; color: #4338ca !important; background: #f5f5ff; }
html body .page-link-chip.active { background: #4f46e5; border-color: #4f46e5; color: #fff !important; }
html body .page-link-chip.page-link-back { background: #eef2ff; border-color: #c7d2fe; color: #3730a3 !important; }
html body .page-link-chip i { font-size: 1rem; }

/* ===== Sidebar submenu: simple dot bullets instead of the template's glyph ===== */
html body #layout-menu .menu-sub > .menu-item > .menu-link::before { content: "" !important; font-family: inherit !important; width: 6px !important; height: 6px !important; border-radius: 50% !important; background: rgba(255,255,255,.45) !important; border: 0 !important; left: 1.6rem !important; top: 50% !important; transform: translateY(-50%) !important; position: absolute !important; }
html body #layout-menu .menu-sub > .menu-item.active > .menu-link::before { background: #fff !important; box-shadow: 0 0 0 3px rgba(255,255,255,.18) !important; }

/* ===== Collapsible filters ===== */
html body .filter-bar { display: flex; align-items: center; gap: .5rem; }
html body .filter-toggle { border-radius: 999px; font-weight: 600; }
html body .filter-toggle.active { background: #eef2ff; }
html body .filter-toggle .filter-caret { transition: transform .2s ease; }
html body .filter-toggle.active .filter-caret { transform: rotate(180deg); }
html body .filter-panel { display: none; margin-top: .9rem; }
html body .filter-panel.open { display: block; animation: filterIn .18s ease; }
html body .filter-panel.row.open { display: flex; }
html body .filter-panel.row { margin-top: .9rem; }
html body .has-filter-panel.card-header { padding-top: .85rem; padding-bottom: .85rem; }
html body .filter-panel .select2-container { width: 100% !important; }
@keyframes filterIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* Filters button on the right end of the card heading */
html body .filter-title-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex: 1 1 auto; flex-wrap: wrap; }
html body .filter-title-row > .card-title, html body .filter-title-row > h4, html body .filter-title-row > h5 { margin-bottom: 0 !important; }
html body .filter-bar.in-title { margin: 0 0 0 auto; }
html body .filter-bar:not(.in-title) { justify-content: flex-end; }
html body .filter-bar.in-toolbar { margin: 0 0 0 .75rem; flex-shrink: 0; }
html body .filter-bar.in-toolbar .filter-toggle { height: 38px; }
html body .action-btn-col:has(.filter-bar.in-header) { display: flex; justify-content: flex-end; align-items: center; gap: .5rem; flex-wrap: wrap; }
html body .filter-bar.in-header .filter-toggle { height: 38px; }

/* One control height (42px) for inputs, selects, select2 and the buttons that sit beside them in filter / form rows */
html body .form-control:not(.form-control-sm):not(.form-control-lg):not(textarea):not([type="file"]):not([type="color"]),
html body .form-select:not(.form-select-sm):not(.form-select-lg):not([multiple]) { min-height: 42px; }
html body input.form-control[type="date"]:not(.form-control-sm),
html body input.form-control[type="month"]:not(.form-control-sm),
html body input.form-control[type="time"]:not(.form-control-sm) { height: 42px; }
html body .row > [class*="col"] > .btn:not(.btn-sm):not(.btn-icon):not(.btn-lg),
html body .row > [class*="col"] > .btn-group > .btn:not(.btn-sm):not(.btn-lg),
html body .row > [class*="col"] > .d-flex > .btn:not(.btn-sm):not(.btn-icon):not(.btn-lg),
html body .filter-panel .btn:not(.btn-sm):not(.btn-icon):not(.btn-lg),
html body .pm-period > .btn { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; }

/* ---------- Form sections: Features / Units (property & package forms) ---------- */
html body .pf-section { margin-top: 1.25rem; padding: 1.1rem 1.2rem 1.2rem !important; background: #fafaff; border: 1px solid #e8e6f5; border-radius: 14px; }
html body .pf-section-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; margin-bottom: 1rem; padding-bottom: .85rem; border-bottom: 1px dashed #e1def0; }
html body .pf-title-wrap { display: flex; align-items: center; gap: .7rem; }
html body .pf-icon { width: 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: #ece9ff; color: #5b4ff0; font-size: 1.15rem; flex-shrink: 0; }
html body .pf-title { margin: 0; font-size: 1.02rem; font-weight: 700; color: #111; }
html body .pf-sub { color: #6b6f80; font-size: .78rem; }
html body .pf-add { background: #fff; color: #5b4ff0 !important; border: 1px solid #cfc9fb; font-weight: 600; border-radius: 9px; padding: .45rem .85rem; white-space: nowrap; }
html body .pf-add:hover { background: #5b4ff0; color: #fff !important; border-color: #5b4ff0; }

html body .pf-section .feature-item { display: flex; flex-wrap: nowrap; align-items: center; gap: .5rem; margin: 0 0 .6rem !important; }
html body .pf-section .feature-item > [class*="col"] { width: auto; padding: 0; margin: 0; }
html body .pf-section .feature-item > [class*="col"]:first-child { flex: 1 1 auto; }
html body .pf-section .feature-item .form-control { background: #fff; }
html body .pf-section .remove-feature-item,
html body .pf-section .unit-row .delete-btn { width: 42px; height: 42px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: #fff1f0 !important; border: 1px solid #ffd6d2 !important; color: #e0362b !important; box-shadow: none !important; }
html body .pf-section .remove-feature-item:hover,
html body .pf-section .unit-row .delete-btn:hover { background: #e0362b !important; color: #fff !important; }
html body .pf-section .unit-row .delete-btn i, html body .pf-section .unit-row .copy-btn i { color: inherit !important; font-size: 1.05rem; }

html body .pf-section #unitsContainer { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .7rem; }
html body .pf-section #unitsContainer > br { display: none; }
html body .pf-section #unitsContainer:not(:has(.unit-row))::before { content: "No units yet \2014  use Add Unit to create floors / blocks."; grid-column: 1 / -1; color: #6b6f80; font-size: .85rem; text-align: center; padding: 1.1rem; border: 1px dashed #d9d6ea; border-radius: 12px; background: #fff; }
html body .pf-section .unit-row { display: flex; flex-wrap: nowrap; align-items: center; gap: .5rem; margin: 0; padding: .65rem .7rem .65rem .9rem; background: #fff; border: 1px solid #e6e4f2; border-radius: 12px; transition: border-color .15s, box-shadow .15s; }
html body .pf-section .unit-row:hover { border-color: #cfc9fb; box-shadow: 0 4px 14px rgba(91, 79, 240, .08); }
html body .pf-section .unit-row > [class*="col"] { width: auto; padding: 0; margin: 0; }
html body .pf-section .unit-row > [class*="col"]:first-child { flex: 1 1 auto; min-width: 0; }
html body .pf-section .unit-row .form-control { border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 0 !important; min-height: 0 !important; height: auto; font-weight: 700; color: #111; cursor: pointer; }
html body .pf-section .unit-row .form-text { display: inline-block; margin-top: .2rem; color: #5b4ff0 !important; font-size: .75rem; font-weight: 600; }
html body .pf-section .unit-actions { display: flex; gap: .4rem; flex-shrink: 0; }
html body .pf-section .unit-row .copy-btn { width: 36px; height: 36px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; background: #f1efff !important; border: 1px solid #ddd8fd !important; color: #5b4ff0 !important; box-shadow: none !important; }
html body .pf-section .unit-row .copy-btn:hover { background: #5b4ff0 !important; color: #fff !important; }
html body .pf-section .unit-row .delete-btn { width: 36px; height: 36px; }
html body .pf-section .remove-feature-item i { color: #e0362b !important; font-size: 1rem; }
html body .pf-section .remove-feature-item:hover i { color: #fff !important; }
html body .pf-section .unit-row .delete-btn:hover i, html body .pf-section .unit-row .copy-btn:hover i { color: #fff !important; }

/* ---------- Repeater sections everywhere (lease, tenant, user, utilities, workflows, stock requests) ---------- */
html body .pf-section .pf-body { margin-top: 0; }
html body .pf-section [id$="Container"] > br, html body .pf-section [id$="Container"] > hr,
html body .pf-section .textBoxWrapper > br, html body .pf-section .textBoxWrapper > hr,
html body .pf-section .pf-body > br { display: none !important; }
html body .pf-section .textBoxWrapper { margin: 1rem 0 0 !important; padding-top: 1rem; border-top: 1px dashed #dcd8ee; }
html body .pf-section .textBoxWrapper:first-child { margin-top: .25rem !important; }
html body .pf-section .row:has(> [class*="col"] > .removeButton),
html body .pf-section .row:has(> [class*="col"] > .remove-row),
html body .pf-section .textBoxWrapper { align-items: flex-end; }
html body .pf-section .removeButton, html body .pf-section .remove-row, html body .pf-section .remove-step,
html body .pf-section .remove-item-row, html body .pf-section .remove-btn {
  margin: 0 !important; width: 42px; height: 42px; padding: 0 !important; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; background: #fff1f0 !important; border: 1px solid #ffd6d2 !important; color: #e0362b !important; box-shadow: none !important; }
html body .pf-section .removeButton i, html body .pf-section .remove-row i, html body .pf-section .remove-step i,
html body .pf-section .remove-item-row i, html body .pf-section .remove-btn i { color: #e0362b !important; font-size: 1.05rem; }
html body .pf-section .removeButton:hover, html body .pf-section .remove-row:hover, html body .pf-section .remove-step:hover,
html body .pf-section .remove-item-row:hover, html body .pf-section .remove-btn:hover { background: #e0362b !important; }
html body .pf-section .removeButton:hover i, html body .pf-section .remove-row:hover i, html body .pf-section .remove-step:hover i,
html body .pf-section .remove-item-row:hover i, html body .pf-section .remove-btn:hover i { color: #fff !important; }
html body .pf-section .removeButton[style] { margin: 0 !important; }
html body .pf-section .form-control, html body .pf-section .form-select, html body .pf-section .select2-selection { background-color: #fff; }
html body .pf-section .table { background: #fff; border-radius: 10px; overflow: hidden; margin-bottom: 0; }
html body .pf-section > .pf-body > [class*="col"] > p[style] { margin-top: 1.6rem !important; margin-bottom: 0; }
html body .pf-section p:has(> .form-check-input), html body .pf-section div:has(> .form-check-input.gst-checkbox) { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: .45rem .5rem; margin: 0 0 .55rem !important; }
html body .pf-section p:has(> .form-check-input) > br, html body .pf-section div:has(> .form-check-input.gst-checkbox) > br { display: none; }
html body .pf-section p:has(> .form-check-input) .form-check-input, html body .pf-section div:has(> .form-check-input.gst-checkbox) .form-check-input { margin: 0; }
html body .pf-section p:has(> .form-check-input) .form-check-label, html body .pf-section div:has(> .form-check-input.gst-checkbox) .form-check-label { white-space: nowrap; font-size: .85rem; }
html body .pf-section .pf-body > .textBoxWrapper:first-child { border-top: 0; padding-top: 0; margin-top: 0 !important; }
html body .row > div[id$="Container"]:not([class*="col"]) { flex: 0 0 100%; max-width: 100%; }
html body .pf-section .pf-body > .table, html body .pf-section .pf-body > .table-responsive { margin-bottom: 0; }
html body .pf-section .step-row { background: #fff; border: 1px solid #e6e4f2; border-radius: 12px; padding: .75rem .5rem; margin: 0 0 .65rem !important; }

/* Modal close button: clear dark X on a soft chip */
html body .modal .modal-header .btn-close {
  background: #f1f3f8 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E") center / 14px 14px no-repeat !important;
  opacity: 1 !important; border-radius: 8px !important; width: 32px; height: 32px; box-shadow: none !important; transform: translateY(-50%) !important; z-index: 5; }
html body .modal .modal-header .btn-close:hover { background-color: #e6e8f0 !important; }

/* Bootstrap 4 class names still used in a few views (Bootstrap 5 dropped them) */
html body .text-right { text-align: right !important; }
html body .text-left { text-align: left !important; }
html body .ml-2 { margin-left: .5rem !important; }
html body .mr-1 { margin-right: .25rem !important; }
html body .form-group { margin-bottom: 1rem; }
html body .btn-block { display: block; width: 100%; }

/* Delete / remove buttons in repeated rows outside the new sections: drop the old inline offsets */
html body .textBoxWrapper .removeButton[style] { margin: 0 !important; }
html body .textBoxWrapper { align-items: flex-end; }

/* Page header: actions line up with the page title (not with title + breadcrumb block) */
html body .page-header .row { align-items: flex-start !important; }
html body .page-header .action-btn-col { align-items: center; align-self: flex-start; min-height: 2.6rem; }
html body .page-header .action-btn-col .page-add-btn { min-height: 40px; display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; border-radius: 10px; }

/* ---------- List card title row: Title ........ [Filters] [+ Add] ---------- */
html body .list-card-header { padding: 1rem 1.5rem !important; border-bottom: 1px solid #ecebf3; }
html body .list-card-bare { background: #fff; border: 1px solid #ecebf3; border-bottom: 0; border-radius: 14px 14px 0 0; }
html body .list-card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; width: 100%; }
html body .list-card-head > .card-title, html body .list-card-head > h4, html body .list-card-head > h5 { margin: 0 !important; font-size: 1.05rem; font-weight: 700; color: #111; }
html body .list-card-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-left: auto; }
html body .list-card-actions .filter-bar { margin: 0; }
html body .list-card-actions .filter-toggle, html body .list-card-actions .btn { min-height: 38px; display: inline-flex; align-items: center; border-radius: 10px; font-weight: 600; }
html body .list-card-actions .page-add-btn { padding-left: 1rem; padding-right: 1rem; }
html body .filter-panel.in-listcard { margin: 0; padding: 1rem 1.5rem 1.25rem; border-bottom: 1px solid #ecebf3; background: #fbfbfe; }
html body .list-card-header .filter-panel.in-listcard { padding: 1rem 0 0; border: 0; background: transparent; }
html body form > .filter-panel.in-listcard { padding: 0; border: 0; background: transparent; }
html body .list-card-header + form:has(.filter-panel.in-listcard.open) { padding: 1rem 1.5rem 1.25rem; border-bottom: 1px solid #ecebf3; background: #fbfbfe; }
html body .list-card-actions .list-tool-btn { min-height: 38px; background: #fff; }
html body .dataTables_filter input[type=search] { margin-left: 0 !important; min-width: 220px; }
html body .dataTables_length select { margin: 0 !important; }

/* Summernote (lite) editor + its dialogs (insert image / link / table) on top of the theme */
html body .note-editor.note-frame { border: 1px solid #d9d6ea !important; border-radius: 12px; overflow: hidden; }
html body .note-editor .note-toolbar { background: #f7f7fb; border-bottom: 1px solid #ecebf3; padding: .4rem .5rem; }
html body .note-editor .note-btn { border-radius: 7px !important; }
html body .note-modal-backdrop { z-index: 2000 !important; background: rgba(17, 17, 34, .45) !important; opacity: 1 !important; }
html body .note-modal { z-index: 2001 !important; }
html body .note-modal .note-modal-content { border-radius: 14px; border: 0; box-shadow: 0 20px 60px rgba(17, 17, 34, .25); margin-top: 8vh; }
html body .note-modal .note-modal-header { padding: 1rem 1.25rem; border-bottom: 1px solid #ecebf3; }
html body .note-modal .note-modal-title { font-weight: 700; font-size: 1rem; color: #111; }
html body .note-modal .note-modal-body { padding: 1.1rem 1.25rem; }
html body .note-modal .note-modal-footer { padding: .9rem 1.25rem; height: auto; border-top: 1px solid #ecebf3; text-align: right; }
html body .note-modal .note-input { border: 1px solid #d9d6ea; border-radius: 9px; padding: .55rem .75rem; min-height: 42px; width: 100%; }
html body .note-modal .note-btn-primary { background: #5b4ff0 !important; border-color: #5b4ff0 !important; color: #fff !important; border-radius: 9px; padding: .5rem 1rem; font-weight: 600; }
html body .note-modal .note-btn-primary[disabled] { opacity: .55; }
html body .note-modal .close { font-size: 1.4rem; opacity: .6; }
html body .note-dropdown-menu { z-index: 2002 !important; border-radius: 10px; }

/* Filters = icon-only button everywhere (count shown as a small badge on the icon) */
html body .filter-icon-btn { position: relative; width: 40px; height: 40px; min-height: 40px !important; padding: 0 !important; display: inline-flex !important; align-items: center; justify-content: center; border-radius: 10px !important; font-size: 1.15rem; }
html body .filter-icon-btn i { margin: 0 !important; }
html body .filter-icon-btn .filter-count { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #e0362b; color: #fff; font-size: .68rem; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px #fff; }
html body .filter-icon-btn.active, html body .filter-icon-btn[aria-expanded="true"] { background: #5b4ff0 !important; color: #fff !important; border-color: #5b4ff0 !important; }
html body .filter-bar .filter-clear { display: none !important; }
/* the title row and the filter panel always stack (some card headers are d-flex rows) */
html body .list-card-header { display: block !important; }
html body .list-card-header > .list-card-head { width: 100%; }
html body .list-card-header > .filter-panel.in-listcard { margin: 0 !important; }
html body .list-card-header > .filter-panel.row.in-listcard { padding-top: 1rem; }

/* popup header always has height (even before / without a title) so the close button sits inside it and is clickable */
html body .modal .modal-header { min-height: 58px; }

/* Themed confirm / notice popup */
html body .app-confirm-modal .modal-content { border-radius: 16px; border: 0; box-shadow: 0 24px 60px rgba(17,17,34,.25); }
html body .app-confirm-modal .app-confirm-icon { width: 56px; height: 56px; margin: 0 auto; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.7rem; }
html body .app-confirm-modal .app-confirm-icon.is-danger { background: #fff1f0; color: #e0362b; }
html body .app-confirm-modal .app-confirm-icon.is-primary { background: #f1efff; color: #5b4ff0; }
html body .app-confirm-modal .app-confirm-icon.is-info { background: #eef6ff; color: #2f6fd8; }
html body .app-confirm-modal .app-confirm-title { font-weight: 700; color: #111; }
html body .app-confirm-modal .app-confirm-text { color: #444; font-size: .92rem; }
html body .app-confirm-modal .btn { min-width: 120px; border-radius: 10px; font-weight: 600; }
