:root {
    --ng-ink: #18212f;
    --ng-muted: #647084;
    --ng-navy: #13263b;
    --ng-navy-2: #1c3955;
    --ng-blue: #2176ae;
    --ng-blue-soft: #e8f3fa;
    --ng-copper: #d97745;
    --ng-surface: #ffffff;
    --ng-canvas: #f3f6f8;
    --ng-border: #dce3e8;
    --ng-success: #16785b;
    --ng-danger: #b33a3a;
    --ng-radius: 12px;
    --ng-shadow: 0 14px 38px rgba(19, 38, 59, .08);
    --ng-font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--ng-canvas); }

body {
    margin: 0 !important;
    color: var(--ng-ink) !important;
    background: var(--ng-canvas) !important;
    font-family: var(--ng-font) !important;
    font-size: 13px;
    line-height: 1.35;
}

a { color: var(--ng-blue); }
a:hover { color: #155b88; }

#mobile-top-section { display: none !important; }
.mobile-footer, .zoom { display: none !important; }

#top-section {
    position: relative;
    z-index: 100;
    top: 0;
    min-height: 54px;
    padding: 0 18px;
    color: #fff;
    background: linear-gradient(118deg, #102336, var(--ng-navy-2));
    border: 0 !important;
    box-shadow: 0 8px 24px rgba(10, 28, 44, .18);
}

#top-section::before {
    position: absolute;
    inset: 0;
    content: "";
    pointer-events: none;
    opacity: .18;
    background: linear-gradient(135deg, transparent 56%, rgba(255,255,255,.12) 56.2%, transparent 56.6%);
}

#top-section .housley-brand,
#login-logo .housley-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: inherit;
    text-decoration: none;
}

#top-section .housley-brand { float: left; height: 54px; }

.housley-brand-mark {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    color: #fff;
    background: var(--ng-copper);
    border-radius: 10px 3px 10px 3px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.24);
    font-size: 17px;
    font-weight: 800;
}

.housley-brand-copy { display: grid; line-height: 1.05; }
.housley-brand-copy strong { color: #fff; font-size: 15px; letter-spacing: .02em; }
.housley-brand-copy small { margin-top: 4px; color: #afc3d4; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; }

#top-section nav.tables { float: left; margin-left: 26px; }
#top-section nav.tables,
#top-section nav.tables ul { min-height: 54px; background: transparent !important; }
#top-section nav.tables ul,
#top-section #table_selection_tabs {
    display: flex;
    gap: 3px;
    margin: 0;
    padding: 0;
    list-style: none;
}

#top-section nav.tables li { margin: 0; padding: 0; background: none; }
#top-section nav.tables a {
    display: flex;
    align-items: center;
    min-height: 54px;
    padding: 0 10px;
    color: #c8d7e3;
    border: 0;
    border-bottom: 3px solid transparent;
    background: transparent !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

#top-section nav.tables a:hover,
#top-section nav.tables a.selected,
#top-section nav.tables li.selected a {
    color: #fff;
    border-bottom-color: var(--ng-copper);
}

#user-status {
    display: flex;
    float: right;
    align-items: center;
    min-height: 54px;
    color: #d6e1e9;
}

#user-status ul { margin: 0; list-style: none; }
#user-status a { color: #d6e1e9; text-decoration: none; }
#user-status select { width: auto; margin: 0 0 0 10px; }

#top-search-form {
    position: absolute;
    top: 62px;
    right: 18px;
    z-index: 10;
}

#top-search-form form {
    display: flex;
    align-items: center;
    padding: 3px 6px;
    background: #fff;
    border: 1px solid var(--ng-border);
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(19,38,59,.07);
}

#top-search-form input[type="text"] { width: 180px; min-height: 30px; border: 0 !important; box-shadow: none !important; }
#top-search-form label { color: var(--ng-muted); }

#status-bar {
    height: 124px !important;
    min-height: 124px;
    width: calc(100% + 36px);
    margin: 0 -18px;
    padding: 15px 36px 12px;
    background: var(--ng-canvas) !important;
    border: 0 !important;
}

#status-bar .responsive-content { max-width: 1600px; margin: 0 auto; }
#status-bar .site-title { float: left; }
#status-bar h1 { margin: 0; color: var(--ng-ink); font-size: clamp(21px, 2vw, 28px); font-weight: 750; letter-spacing: -.025em; }
#status-bar h1.is-empty { display: none; }
.bread-crumbs { max-width: 1600px; margin: 0 auto 8px; color: var(--ng-muted); font-size: 12px; }
.bread-crumbs a { color: var(--ng-muted); }

.page-actions { display: flex; float: right; gap: 5px; margin-right: 205px; }
.page-actions ul { display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.page-actions li,
.page-actions li.featured-action,
#status-bar .page-actions li {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}
.page-actions a,
.actions-menu a,
input[type="submit"],
input[type="button"],
button,
.button,
.xf-button {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    color: #fff !important;
    background: var(--ng-blue) !important;
    border: 0 !important;
    border-radius: 7px !important;
    box-shadow: 0 3px 9px rgba(33,118,174,.16);
    font: 650 12px/1 var(--ng-font) !important;
    text-decoration: none !important;
    cursor: pointer;
}

.page-actions a:hover, input[type="submit"]:hover, button:hover { background: #185f8e !important; }
.page-actions li:not(.featured-action) > a {
    color: #46566a !important;
    background: #fff !important;
    border: 1px solid #cfd8df !important;
    box-shadow: none;
}
.page-actions li:not(.featured-action) > a:hover { color: var(--ng-ink) !important; background: #f4f7f9 !important; }

#main_table {
    width: calc(100% - 16px) !important;
    max-width: 1800px;
    margin: 0 auto 22px;
    border: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0;
}

#main_table > tbody > tr > td { border: 0 !important; }
#left_column:empty { display: none; }
#left_column { width: 220px; padding: 0 20px 0 0 !important; }
#main_column {
    overflow: hidden;
    padding: 10px !important;
    background: var(--ng-surface);
    border: 1px solid var(--ng-border) !important;
    border-radius: 8px;
    box-shadow: var(--ng-shadow);
}

/* Legacy Xataface constrains list and browse content to 1000px. */
.nextgen-list-page #region-content > .responsive-content,
.nextgen-list-page #list-window,
.nextgen-list-page #list-window > div,
.nextgen-list-page .resultlist-parent,
.nextgen-browse-page #region-content > .responsive-content {
    width: 100% !important;
    max-width: none !important;
}

/* Xataface fields with filter = 1 render here on desktop list views. */
@media (min-width: 801px) {
.nextgen-list-page .resultlist-filters {
    display: block !important;
    margin: 0 0 10px !important;
    padding: 9px 11px;
    background: #f7fafc;
    border: 1px solid var(--ng-border);
    border-radius: 8px;
}
.nextgen-list-page .resultlist-filters-heading { display: block; margin: 0 0 7px !important; padding: 0 !important; background: transparent !important; border: 0 !important; font-size: 10px !important; font-weight: 800 !important; letter-spacing: .08em; text-transform: uppercase; }
.nextgen-list-page .resultlist-filters ul { display: flex; flex-wrap: wrap; align-items: end; gap: 7px 10px; margin: 0; padding: 0; }
.nextgen-list-page .resultlist-filters li { display: grid; gap: 3px; color: var(--ng-muted); font-size: 10px; font-weight: 700; list-style: none; }
.nextgen-list-page .resultlist-filters select { min-width: 145px; min-height: 30px; margin: 0; padding: 3px 7px !important; font-size: 11px !important; }
}

.ng-confirm-action { width: min(760px, 100%); margin: 4px auto; }
.ng-confirm-action > header { margin-bottom: 16px; }
.ng-confirm-action h1 { margin: 4px 0; color: var(--ng-ink); font-size: 25px; }
.ng-confirm-action header p { margin: 0; color: var(--ng-muted); }
.ng-confirm-action form { overflow: hidden; background: #fff; border: 1px solid var(--ng-border); border-radius: 10px; }
.ng-confirm-date { padding: 16px; background: #f7fafc; border-bottom: 1px solid var(--ng-border); }
.ng-confirm-date label, .ng-confirm-date small { display: block; }
.ng-confirm-date label { margin-bottom: 6px; color: var(--ng-ink); }
.ng-confirm-date input { width: 190px; }
.ng-confirm-date small { margin-top: 5px; color: var(--ng-muted); }
.ng-confirm-list-heading, .ng-confirm-job { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.ng-confirm-list-heading { padding: 10px 14px; color: var(--ng-muted); background: #f4f7f9; font-size: 11px; }
.ng-confirm-rule { margin: 0; padding: 8px 14px; color: #795324; background: #fff8e9; border-bottom: 1px solid #f2dfb8; font-size: 11px; }
.ng-confirm-job { min-height: 54px; padding: 8px 14px; border-bottom: 1px solid #edf1f4; }
.ng-confirm-job > span { min-width: 0; }
.ng-confirm-job > span > b { display: inline-block; width: 62px; color: var(--ng-blue); }
.ng-confirm-job > span > strong { color: var(--ng-ink); }
.ng-confirm-job small { display: block; overflow: hidden; margin: 3px 0 0 62px; color: var(--ng-muted); text-overflow: ellipsis; white-space: nowrap; }
.ng-confirm-job > b { white-space: nowrap; }
.ng-confirm-buttons { display: flex; align-items: center; gap: 12px; padding: 13px 14px; }
.ng-confirm-buttons a { color: var(--ng-muted); font-weight: 650; text-decoration: none; }

body.ng-modal-open { overflow: hidden; }
.ng-modal[hidden] { display: none !important; }
.ng-modal { position: fixed; z-index: 10000; inset: 0; display: grid; place-items: center; padding: 18px; }
.ng-modal-backdrop { position: absolute; inset: 0; background: rgba(10, 25, 38, .58); backdrop-filter: blur(2px); }
.ng-modal-dialog {
    position: relative;
    width: min(470px, 100%);
    padding: 22px;
    background: #fff;
    border: 1px solid rgba(255,255,255,.4);
    border-radius: 12px;
    box-shadow: 0 28px 80px rgba(9, 25, 39, .32);
}
.ng-modal-dialog h2 { margin: 5px 32px 6px 0; color: var(--ng-ink); font-size: 23px; }
.ng-modal-intro { margin: 0 0 17px; color: var(--ng-muted); }
.ng-modal-dialog > label { display: block; margin-bottom: 6px; color: var(--ng-ink); }
.ng-modal-dialog > input[type="text"], .ng-modal-dialog > input[type="date"] { width: 100%; font-variant-numeric: tabular-nums; }
.ng-modal-dialog > small { display: block; margin-top: 6px; color: var(--ng-muted); }
.ng-modal-close { position: absolute; top: 12px; right: 12px; width: 32px; min-height: 32px; padding: 0 !important; color: #647283 !important; background: transparent !important; box-shadow: none; font-size: 23px !important; }
.ng-modal-close:hover { color: var(--ng-ink) !important; background: #eef3f6 !important; }
.ng-modal-rule { margin: 17px 0 0; padding: 9px 10px; color: #795324; background: #fff8e9; border: 1px solid #f2dfb8; border-radius: 6px; font-size: 11px; }
.ng-modal-actions { display: flex; align-items: center; gap: 8px; margin-top: 18px; }
.ng-modal-cancel { color: #526174 !important; background: #fff !important; border: 1px solid #cfd8df !important; box-shadow: none; }
.ng-modal-cancel:hover { color: var(--ng-ink) !important; background: #f4f7f9 !important; }
.ng-job-dialog { width: min(650px, 100%); max-height: calc(100vh - 36px); overflow-y: auto; }
#ng-quick-job-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.ng-form-field { min-width: 0; }
.ng-form-wide { grid-column: 1 / -1; }
.ng-form-field label { display: flex; justify-content: space-between; margin-bottom: 5px; color: var(--ng-ink); font-weight: 700; }
.ng-form-field label small { color: var(--ng-muted); font-weight: 500; }
.ng-form-field input, .ng-form-field select, .ng-form-field textarea { width: 100%; }
.ng-show-all-customers { min-height: 30px; margin-top: 6px; padding: 5px 9px !important; color: var(--ng-blue) !important; background: #fff !important; border: 1px solid #cbd8e1 !important; box-shadow: none !important; font-size: 11px !important; }
.ng-show-all-customers:hover { background: var(--ng-blue-soft) !important; }
.ng-form-field textarea { min-height: 0; resize: vertical; }
.ng-form-message { grid-column: 1 / -1; margin: 0; padding: 9px 11px; color: #8a332c; background: #fff0ee; border: 1px solid #f2c8c3; border-radius: 7px; }

.portalMessage,
.alert {
    margin: 0 0 18px !important;
    padding: 12px 15px !important;
    color: #11583f !important;
    background: #e7f7f0 !important;
    border: 1px solid #bce9d7 !important;
    border-radius: 9px;
}

table.listing,
table.xf-table,
#result_list table,
.resultList {
    width: 100%;
    border: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0;
}

table.listing th,
.resultList th,
#result_list th {
    padding: 7px 8px !important;
    color: #526174 !important;
    background: #f4f7f9 !important;
    border: 0 !important;
    border-bottom: 1px solid var(--ng-border) !important;
    font-size: 10px !important;
    font-weight: 750 !important;
    letter-spacing: .06em;
    text-align: left;
    text-transform: uppercase;
}

table.listing td,
.resultList td,
#result_list td {
    padding: 6px 8px !important;
    background: #fff !important;
    border: 0 !important;
    border-bottom: 1px solid #e9eef2 !important;
    vertical-align: middle;
}

table.listing tr:hover td,
.resultList tr:hover td,
#result_list tr:hover td { background: #f8fbfd !important; }

@media (min-width: 801px) {
    #result_list td br { display: inline; content: ""; }
    #result_list td br::after { content: " · "; }
    #result_list td { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

fieldset {
    margin: 0 0 12px !important;
    padding: 10px !important;
    background: #fbfcfd;
    border: 1px solid var(--ng-border) !important;
    border-radius: 11px;
}

legend { padding: 0 6px; color: var(--ng-navy); font-size: 13px; font-weight: 750; }
label { color: #526174; font-weight: 650; }

input[type="text"], input[type="password"], input[type="email"], input[type="number"],
input[type="date"], textarea, select {
    min-height: 32px;
    padding: 5px 8px !important;
    color: var(--ng-ink);
    background: #fff !important;
    border: 1px solid #cbd5dc !important;
    border-radius: 6px !important;
    font: 13px/1.25 var(--ng-font) !important;
    box-shadow: 0 1px 2px rgba(19,38,59,.04);
}
input[type="datetime-local"] { min-height: 36px; padding: 7px 9px; color: var(--ng-ink); background: #fff; border: 1px solid #c5d0d8; border-radius: 6px; }
.ng-date-control { position: relative; display: inline-block; width: min(100%, 300px); vertical-align: middle; }
.ng-date-control > input[type="text"] { width: 100% !important; padding-right: 43px !important; font-variant-numeric: tabular-nums; }
.ng-date-picker-native { position: absolute; width: 1px !important; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.ng-date-control > .ng-date-picker-button {
    position: absolute;
    top: 1px;
    right: 1px;
    bottom: 1px;
    width: 38px !important;
    min-width: 38px;
    min-height: 0;
    padding: 0 !important;
    color: #527088 !important;
    background: transparent !important;
    border: 0 !important;
    border-left: 1px solid #d7e0e6 !important;
    border-radius: 0 5px 5px 0 !important;
    box-shadow: none !important;
}
.ng-date-control > .ng-date-picker-button:hover { color: var(--ng-blue) !important; background: #f1f6f9 !important; }
.ng-date-control > .ng-date-picker-button svg { display: block; margin: auto; }
.ng-calendar-popover {
    position: fixed;
    z-index: 12000;
    width: 286px;
    padding: 10px;
    color: var(--ng-ink);
    background: #fff;
    border: 1px solid #cbd7df;
    border-radius: 10px;
    box-shadow: 0 16px 45px rgba(12, 29, 43, .25);
}
.ng-calendar-popover[hidden] { display: none !important; }
.ng-calendar-popover header { display: grid; grid-template-columns: 32px 1fr 32px; align-items: center; margin-bottom: 7px; }
.ng-calendar-popover header strong { color: var(--ng-navy); text-align: center; }
.ng-calendar-popover header button { min-height: 30px; padding: 0 !important; color: var(--ng-blue) !important; background: transparent !important; border: 0 !important; box-shadow: none !important; font-size: 22px !important; }
.ng-calendar-weekdays, .ng-calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.ng-calendar-weekdays span { padding: 4px 0; color: var(--ng-muted); font-size: 9px; font-weight: 800; text-align: center; text-transform: uppercase; }
.ng-calendar-day { min-height: 32px; padding: 0 !important; color: var(--ng-ink) !important; background: transparent !important; border: 0 !important; border-radius: 6px !important; box-shadow: none !important; font-size: 12px !important; }
.ng-calendar-day:hover { color: var(--ng-blue) !important; background: var(--ng-blue-soft) !important; }
.ng-calendar-day.is-adjacent { color: #a8b2bb !important; }
.ng-calendar-day.is-today { box-shadow: inset 0 0 0 1px var(--ng-blue) !important; }
.ng-calendar-day.is-selected { color: #fff !important; background: var(--ng-blue) !important; }

textarea { min-height: 72px; }
input:focus, textarea:focus, select:focus { outline: 3px solid rgba(33,118,174,.14); border-color: var(--ng-blue) !important; }
input[type="file"] {
    max-width: 100%;
    color: var(--ng-muted);
    font: 12px/1.3 var(--ng-font);
}
input[type="file"]::file-selector-button {
    margin-right: 9px;
    padding: 6px 10px;
    color: #34475b;
    background: #f4f7f9;
    border: 1px solid #cbd5dc;
    border-radius: 5px;
    font: 650 12px/1.2 var(--ng-font);
    cursor: pointer;
}
input[type="file"]::file-selector-button:hover { background: #eaf0f4; }

/* Xataface form normalization */
.xf-form-group-wrapper { margin: 0 0 8px !important; padding: 0 !important; }
.xf-form-group-wrapper > h3.Dataface_collapsible_sidebar {
    height: auto !important;
    min-height: 30px;
    margin: 0 !important;
    padding: 7px 10px !important;
    color: #415166 !important;
    background: #f2f5f7 !important;
    border: 1px solid var(--ng-border) !important;
    border-radius: 6px 6px 0 0;
    font: 700 12px/1.2 var(--ng-font) !important;
}
.xf-form-group-wrapper > h3.Dataface_collapsible_sidebar img { width: 11px; height: 11px; margin-right: 5px; opacity: .55; }
table.Dataface_QuickForm-table-wrapper {
    width: 100% !important;
    margin: 0 !important;
    background: #fff;
    border: 1px solid var(--ng-border);
    border-top: 0;
    border-collapse: collapse !important;
}
table.Dataface_QuickForm-table-wrapper > tbody > tr > td {
    height: 40px !important;
    padding: 4px 8px !important;
    border: 0 !important;
    border-bottom: 1px solid #edf1f4 !important;
    vertical-align: middle !important;
}
table.Dataface_QuickForm-table-wrapper > tbody > tr:last-child > td { border-bottom: 0 !important; }
td.Dataface_QuickForm-label-cell {
    width: 245px !important;
    color: #526174 !important;
    background: #fafbfd;
    font-size: 12px !important;
    font-weight: 650 !important;
    text-align: right !important;
}
td.Dataface_QuickForm-widget-cell { padding-left: 12px !important; }
table.Dataface_QuickForm-table-wrapper > tbody > tr > td.Dataface_QuickForm-block-label-cell { padding: 8px 8px 8px 257px !important; }
td.Dataface_QuickForm-block-label-cell > .field > label { display: block; margin-bottom: 5px; font-size: 12px; }
td.Dataface_QuickForm-block-label-cell > .field > div > textarea { width: min(100%, 720px) !important; }
.Dataface_QuickForm-widget-cell .field { margin: 0 !important; padding: 0 !important; }
.Dataface_QuickForm-widget-cell > .field > div > input[type="text"],
.Dataface_QuickForm-widget-cell > .field > div > input[type="email"],
.Dataface_QuickForm-widget-cell > .field > div > input[type="password"],
.Dataface_QuickForm-widget-cell > .field > div > input[type="number"],
.Dataface_QuickForm-widget-cell > .field > div > input[type="date"],
.Dataface_QuickForm-widget-cell > .field > div > input[type="datetime-local"],
.Dataface_QuickForm-widget-cell > .field > div > textarea { width: min(100%, 560px) !important; }
.Dataface_QuickForm-widget-cell > .field > div > select { width: min(100%, 360px) !important; }
.Dataface_QuickForm-widget-cell .formHelp,
.Dataface_QuickForm-widget-cell .field-description { display: block; margin-top: 3px; color: #7b8795; font-size: 11px; }
.Dataface_QuickForm-widget-cell a[href="#"] { margin-left: 5px; color: #54758e; font-size: 12px; text-decoration: none; }
.Dataface_QuickForm-widget-cell a[href="#"]:hover { color: var(--ng-blue); text-decoration: underline; }
a[id^="f-calendar-trigger-"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin-left: 5px !important;
    color: #567188 !important;
    background: #f4f7f9;
    border: 1px solid #cbd5dc;
    border-radius: 5px;
    vertical-align: middle;
}
a[id^="f-calendar-trigger-"]::before { content: "\1F4C5"; font: 15px/1 var(--ng-font); }
a[id^="f-calendar-trigger-"] img { display: none; }
a[id^="f-calendar-trigger-"]:hover { color: var(--ng-blue) !important; background: #eaf0f4; text-decoration: none !important; }
.Dataface_QuickForm-required { color: #d34f4f !important; }

input[type="checkbox"] {
    appearance: none;
    width: 17px !important;
    height: 17px !important;
    margin: 0 5px 0 0 !important;
    vertical-align: middle;
    background: #fff !important;
    border: 1px solid #aebbc5 !important;
    border-radius: 4px !important;
    cursor: pointer;
}
input[type="checkbox"]:checked { background: var(--ng-blue) !important; border-color: var(--ng-blue) !important; box-shadow: inset 0 0 0 3px #fff; }

table.xf-grid-table { width: 100% !important; border: 1px solid var(--ng-border) !important; border-collapse: collapse !important; }
table.xf-grid-table th { padding: 5px 6px !important; color: var(--ng-muted); background: #f4f7f9 !important; font-size: 10px !important; }
table.xf-grid-table td { padding: 4px !important; border-top: 1px solid #edf1f4 !important; }
table.xf-grid-table input[type="text"], table.xf-grid-table select { width: 100% !important; min-width: 76px; }

.result-list-actions a { padding: 5px 8px !important; border-radius: 5px; font-size: 12px; }
.result-list-actions, .result-stats { font-size: 12px; }

#record-tabs, .record-tabs, .tabs { border-bottom: 1px solid var(--ng-border) !important; }
#record-tabs a, .record-tabs a, .tabs a { border-radius: 8px 8px 0 0 !important; }

.result-stats, #result-stats, .result-controller { color: var(--ng-muted); }
.result-list-actions { margin: 3px 0 !important; }
.resultList-header, .result-list-header, .result-stats { padding-top: 4px !important; padding-bottom: 4px !important; }
.tabs_wrapper, #table_tabs_wrapper { margin-bottom: 6px !important; }
.table_tabs a, .tabs a, #record-tabs a { padding-top: 6px !important; padding-bottom: 6px !important; }
.listing .material-icons, .resultList .material-icons { font-size: 16px !important; }
.footer, #fineprint { padding: 18px 34px 30px; color: #8591a0; text-align: center; font-size: 12px; }

body.nextgen-login #top-section { display: none !important; }
body.nextgen-login #top-section nav,
body.nextgen-login #user-status,
body.nextgen-login #status-bar,
body.nextgen-login #left_column,
body.nextgen-login #top-search-form { display: none !important; }
body.nextgen-login { min-height: 100vh; background: radial-gradient(circle at 15% 10%, #254b6d 0, #142b40 38%, #0c1c2a 100%) !important; }
body.nextgen-login #main_table { display: grid; min-height: 100vh; place-items: center; margin-bottom: 0; }
body.nextgen-login #main_column { width: min(440px, calc(100vw - 32px)); padding: 34px !important; border: 1px solid rgba(255,255,255,.16) !important; box-shadow: 0 30px 80px rgba(0,0,0,.28); }
body.nextgen-login #login-window { width: 100%; }
body.nextgen-login .nextgen-login-intro { margin-bottom: 24px; }
body.nextgen-login .nextgen-login-intro h1 { margin: 0; color: var(--ng-ink); font-size: 28px; letter-spacing: -.025em; }
body.nextgen-login #Login-Username, body.nextgen-login #Login-Password { margin-bottom: 16px; }
body.nextgen-login label { display: block !important; float: none !important; width: auto !important; margin-bottom: 6px; padding: 0 !important; text-align: left !important; }
body.nextgen-login input[type="text"], body.nextgen-login input[type="password"] { width: 100%; }
body.nextgen-login #Login-submit { width: 100%; margin-top: 8px; }
.nextgen-login-links { margin-top: 18px; text-align: center; }
.nextgen-login-links a { color: var(--ng-muted); font-size: 12px; }

.nextgen-menu-toggle { display: none; }

.nextgen-dashboard-page #status-bar { display: none; }
.nextgen-dashboard-page #top-search-form { display: none; }
.nextgen-dashboard-page #main_table { margin-top: 18px; }
.nextgen-dashboard-page #main_column { padding: 16px !important; }
.ng-dashboard { display: grid; gap: 12px; }
.ng-dashboard-hero { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 2px; }
.ng-dashboard-hero h1 { margin: 2px 0 0; color: var(--ng-ink); font-size: 25px; letter-spacing: -.03em; }
.ng-dashboard-hero p { margin: 0; color: var(--ng-muted); }
.ng-eyebrow { color: var(--ng-copper); font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.ng-primary-action { padding: 11px 17px; color: #fff !important; background: var(--ng-blue); border-radius: 9px; font-weight: 700; text-decoration: none; }
.ng-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ng-metric { position: relative; overflow: hidden; padding: 12px 14px; background: #f7fafc; border: 1px solid var(--ng-border); border-radius: 9px; }
.ng-metric::after { position: absolute; top: 0; right: 0; width: 4px; height: 100%; content: ""; background: var(--ng-blue); }
.ng-metric-warn::after { background: var(--ng-copper); }
.ng-metric span, .ng-metric small { display: block; color: var(--ng-muted); }
.ng-metric span { font-size: 11px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.ng-metric strong { display: block; margin: 5px 0 1px; color: var(--ng-navy); font-size: 24px; line-height: 1; }
.ng-panel { overflow: hidden; background: #fff; border: 1px solid var(--ng-border); border-radius: 11px; }
.ng-panel-heading { display: flex; align-items: center; justify-content: space-between; padding: 11px 14px; border-bottom: 1px solid var(--ng-border); }
.ng-panel-heading h2 { margin: 3px 0 0; color: var(--ng-ink); font-size: 17px; }
.ng-panel-heading h2 small { color: var(--ng-muted); font-size: 11px; font-weight: 600; }
.ng-panel-heading > a { font-size: 12px; font-weight: 700; text-decoration: none; }
.ng-panel-heading-actions { display: flex; align-items: center; gap: 12px; }
.ng-panel-heading-actions a { font-size: 12px; font-weight: 700; text-decoration: none; }
.ng-panel-action { min-height: 34px; padding: 7px 11px !important; font-size: 11px !important; }
.ng-panel-action:disabled { cursor: default; opacity: .45; }
.ng-table-wrap { overflow-x: auto; }
.ng-work-groups { max-height: 650px; overflow: auto; }
.ng-work-table thead { position: sticky; z-index: 3; top: 0; }
.ng-work-table .ng-work-group-heading th { position: sticky; z-index: 2; top: 34px; padding: 7px 11px; color: var(--ng-muted); background: #eaf0f4; border-top: 1px solid #d4dee5; border-bottom: 1px solid #d4dee5; font-size: 11px; letter-spacing: 0; text-align: left; text-transform: none; }
.ng-work-table .ng-work-group-heading th:nth-last-child(3) { white-space: nowrap; }
.ng-work-table .ng-work-group-heading strong { color: var(--ng-ink); font-size: 14px; }
.ng-work-table .ng-work-group-heading b { color: var(--ng-navy); font-size: 14px; }
.ng-table { width: 100%; border-collapse: collapse; }
.ng-table th { padding: 11px 13px; color: var(--ng-muted); background: #f7f9fb; border-bottom: 1px solid var(--ng-border); font-size: 10px; letter-spacing: .08em; text-align: left; text-transform: uppercase; }
.ng-table td { padding: 8px 11px; border-bottom: 1px solid #edf1f4; }
.ng-table tbody tr:last-child td { border-bottom: 0; }
.ng-table tbody tr:hover td { background: #f9fbfc; }
.ng-inline-job-form { margin: 0; }
.ng-inline-field { box-sizing: border-box; width: 100%; min-width: 105px; height: 32px; padding: 4px 6px !important; color: var(--ng-ink); background: #fff; border: 1px solid var(--ng-border) !important; border-radius: 6px !important; font-size: 11px !important; }
.ng-inline-date { min-width: 125px; }
.ng-money-field { display: inline-flex; align-items: center; gap: 3px; color: var(--ng-muted); }
.ng-inline-cost { min-width: 75px; max-width: 92px; text-align: right; }
.ng-inline-save { min-height: 32px; padding: 6px 9px !important; font-size: 11px !important; white-space: nowrap; }
.ng-inline-save:disabled,
.ng-inline-save:disabled:hover {
    color: #8995a3 !important;
    background: #e3e8ec !important;
    box-shadow: none !important;
    cursor: not-allowed;
    opacity: 1;
}
.ng-inline-message { margin: 5px 0 0; color: #a33b25; font-size: 11px; line-height: 1.25; }
.ng-inline-message-success { color: #237447; font-weight: 700; }
.ng-job-saved { animation: ng-job-saved .7s ease both; }
.ng-job-moving { pointer-events: none; animation: ng-job-moving 1s .15s ease forwards; }
@keyframes ng-job-saved { 0% { background: transparent; } 35%, 100% { background: #e8f7ee; box-shadow: inset 4px 0 #35a265; } }
@keyframes ng-job-moving { 0% { opacity: 1; transform: translateX(0); } 70%, 100% { opacity: 0; transform: translateX(28px); } }
@media (prefers-reduced-motion: reduce) { .ng-job-saved, .ng-job-moving { animation-duration: .01ms; } }
.ng-id { font-weight: 800; text-decoration: none; }
.ng-number { text-align: right !important; white-space: nowrap; }
.ng-status { display: inline-flex; padding: 4px 8px; color: #16597f; background: var(--ng-blue-soft); border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.ng-empty { padding: 22px !important; color: var(--ng-muted); text-align: center; }
.ng-dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ng-compact-list a { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 9px 14px; color: var(--ng-ink); border-bottom: 1px solid #edf1f4; text-decoration: none; }
.ng-compact-list a:last-child { border-bottom: 0; }
.ng-compact-list a:hover { background: #f9fbfc; }
.ng-compact-list span:first-child { min-width: 0; }
.ng-compact-list strong, .ng-compact-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ng-compact-list small { margin-top: 2px; color: var(--ng-muted); }
.ng-invoice-list { max-height: 292px; overflow-y: auto; }
.ng-invoice-row { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 8px 10px; min-height: 48px; padding: 9px 14px; border-bottom: 1px solid #edf1f4; }
.ng-invoice-row:hover { background: #f9fbfc; }
.ng-invoice-row:last-child { border-bottom: 0; }
.ng-invoice-row input { margin: 0; }
.ng-invoice-row span { min-width: 0; }
.ng-invoice-row strong, .ng-invoice-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ng-invoice-row small { margin-top: 2px; color: var(--ng-muted); }
.ng-invoice-row > a { font-size: 11px; font-weight: 700; text-decoration: none; }
.ng-invoice-edit-fields { display: grid; grid-column: 2 / -1; grid-template-columns: minmax(120px, 1fr) minmax(125px, 1fr) minmax(100px, .7fr) auto; align-items: end; gap: 7px; }
.ng-invoice-edit-fields label { min-width: 0; color: var(--ng-muted); font-size: 9px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.ng-invoice-edit-fields label > .ng-inline-field, .ng-invoice-edit-fields label > .ng-money-field { display: flex; margin-top: 3px; }
.ng-invoice-edit-fields .ng-money-field .ng-inline-field { max-width: none; }
.ng-invoice-row > .ng-inline-message { grid-column: 2 / -1; }
.ng-job-confirm-dialog { width: min(440px, 100%); }
.ng-confirm-summary { overflow: hidden; margin: 0; border: 1px solid var(--ng-border); border-radius: 8px; }
.ng-confirm-summary > div { display: grid; grid-template-columns: 135px minmax(0, 1fr); padding: 10px 12px; border-bottom: 1px solid #edf1f4; }
.ng-confirm-summary > div:last-child { border-bottom: 0; }
.ng-confirm-summary dt { color: var(--ng-muted); font-size: 11px; font-weight: 700; }
.ng-confirm-summary dd { margin: 0; color: var(--ng-ink); font-weight: 750; text-align: right; }
.ng-panel-footer { display: block; padding: 9px 14px; border-top: 1px solid var(--ng-border); font-size: 11px; font-weight: 700; text-align: right; text-decoration: none; }
.ng-invoice-table-wrap { max-height: 310px; overflow: auto; }
.ng-outstanding-table thead { position: sticky; z-index: 1; top: 0; }
.ng-outstanding-table .ng-check { width: 34px; padding-right: 5px; padding-left: 13px; text-align: center; }
.ng-outstanding-table input[type="checkbox"] { margin: 0; }
.ng-month-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1px; background: var(--ng-border); }
.ng-month-grid div { padding: 13px; background: #fff; }
.ng-month-grid span, .ng-month-grid strong { display: block; }
.ng-month-grid span { color: var(--ng-muted); font-size: 11px; }
.ng-month-grid strong { margin-top: 3px; color: var(--ng-navy); }

@media (min-width: 801px) {
    .ng-dashboard .ng-panel-heading { padding-top: 8px; padding-bottom: 8px; }
    .ng-work-groups { max-height: 720px; }
    .ng-work-table { table-layout: auto; font-size: 12px; }
    .ng-work-table th { padding-top: 7px; padding-bottom: 7px; }
    .ng-work-table td { height: 36px; padding: 3px 8px; }
    .ng-work-table .ng-work-group-heading th { top: 28px; padding-top: 5px; padding-bottom: 5px; }
    .ng-work-table .ng-work-group-heading strong,
    .ng-work-table .ng-work-group-heading b { font-size: 12px; }
    .ng-work-table .ng-status { padding: 3px 7px; font-size: 10px; }
    .ng-work-table .ng-inline-field { height: 28px; min-height: 28px; padding: 2px 6px !important; font-size: 11px !important; }
    .ng-work-table .ng-date-control > .ng-date-picker-button { width: 32px !important; min-width: 32px; }
    .ng-work-table .ng-date-control > input[type="text"] { padding-right: 35px !important; }
    .ng-work-table .ng-date-picker-button svg { width: 15px; height: 15px; }
    .ng-work-table .ng-inline-save { min-height: 28px; padding: 4px 8px !important; font-size: 10px !important; }
    .ng-work-table .ng-job-description-cell { max-width: 430px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

@media (max-width: 1100px) {
    #top-section { padding: 0 22px; }
    #top-section nav.tables { margin-left: 18px; }
    #top-section nav.tables a { padding: 0 7px; font-size: 12px; }
    #status-bar { padding-right: 22px; padding-left: 22px; }
    #main_table { width: calc(100% - 44px) !important; }
    .page-actions { margin-right: 0; }
    #top-search-form { display: none; }
    .ng-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ng-month-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 800px) {
    #top-section { display: block !important; min-height: 64px; padding: 0 18px; }
    #top-section .housley-brand { height: 64px; }
    #user-status { min-height: 64px; margin-right: 48px; }
    .nextgen-menu-toggle { position: absolute; top: 14px; right: 18px; display: grid; width: 38px; min-height: 36px; padding: 9px !important; gap: 4px; }
    .nextgen-menu-toggle span { display: block; width: 20px; height: 2px; margin: 0 auto; background: #fff; }
    #top-section nav.tables { display: none; clear: both; float: none; margin: 0 -18px; padding: 8px 18px 16px; }
    #top-section.nextgen-nav-open nav.tables { display: block; }
    #top-section nav.tables ul, #top-section #table_selection_tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #top-section nav.tables ul,
    #top-section nav.tables li,
    #top-section nav.tables a { border: 0 !important; box-shadow: none !important; }
    #top-section nav.tables a { min-height: 42px; padding: 7px 10px; border-radius: 7px; }
    #top-section nav.tables a.selected, #top-section nav.tables li.selected a { background: rgba(255,255,255,.1) !important; }
    #status-bar { width: calc(100% + 36px); height: auto !important; min-height: 100px; margin: 0 -18px; padding: 24px 18px 18px; }
    #status-bar .site-title, .page-actions { float: none; }
    .page-actions { margin-top: 14px; overflow-x: auto; }
    #main_table { display: block; width: calc(100% - 28px) !important; }
    #main_table > tbody, #main_table > tbody > tr, #main_table > tbody > tr > td { display: block; width: 100% !important; }
    #left_column { padding: 0 0 12px !important; }
    #main_column { padding: 16px !important; }
    .listing-wrapper, #result_list { overflow-x: auto; }
    .mobile-listing .mobile-listing-row { min-height: 50px; padding: 7px 10px !important; }
    .mobile-listing .mobile-row-content { display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: center; min-height: 36px; }
    .mobile-listing .mobile-logo { grid-row: 1 / span 2; width: 28px; }
    .mobile-listing .mobile-logo .material-icons { color: #aeb7be; font-size: 28px !important; }
    .mobile-listing .mobile-title { min-width: 0; font-size: 14px; line-height: 1.25; }
    .mobile-listing .mobile-title a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .mobile-listing .mobile-description { min-width: 0; color: var(--ng-muted); font-size: 11px; }
    .mobile-listing .mobile-description:empty { display: none; }
    .ng-dashboard-grid { grid-template-columns: 1fr; }
    .ng-month-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
    #user-status { display: none; }
    #status-bar { padding: 20px 14px 14px; }
    #main_table { width: calc(100% - 20px) !important; }
    #main_column { border-radius: 9px; }
    .housley-brand-copy small { display: none; }
    .ng-dashboard-hero { align-items: flex-start; flex-direction: column; gap: 14px; }
    .ng-metrics, .ng-month-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #ng-quick-job-form { grid-template-columns: 1fr; }
    .ng-form-wide { grid-column: auto; }
    .ng-invoice-row { grid-template-columns: 18px minmax(0, 1fr) auto; }
    .ng-invoice-row > a { display: none; }
    .ng-invoice-edit-fields { grid-column: 1 / -1; grid-template-columns: 1fr; }
    .xf-form-group-wrapper { margin-bottom: 10px !important; }
    table.Dataface_QuickForm-table-wrapper,
    table.Dataface_QuickForm-table-wrapper > tbody,
    table.Dataface_QuickForm-table-wrapper > tbody > tr,
    table.Dataface_QuickForm-table-wrapper > tbody > tr > td { display: block; width: 100% !important; }
    table.Dataface_QuickForm-table-wrapper > tbody > tr { padding: 8px 9px; border-bottom: 1px solid #edf1f4; }
    table.Dataface_QuickForm-table-wrapper > tbody > tr:last-child { border-bottom: 0; }
    table.Dataface_QuickForm-table-wrapper > tbody > tr > td {
        height: auto !important;
        padding: 0 !important;
        border: 0 !important;
    }
    td.Dataface_QuickForm-label-cell {
        margin-bottom: 5px;
        color: #526174 !important;
        background: transparent;
        font-size: 12px !important;
        text-align: left !important;
    }
    table.Dataface_QuickForm-table-wrapper > tbody > tr > td.Dataface_QuickForm-block-label-cell { padding: 0 !important; }
    td.Dataface_QuickForm-widget-cell { padding-left: 0 !important; }
    .Dataface_QuickForm-widget-cell > .field > div > input[type="text"],
    .Dataface_QuickForm-widget-cell > .field > div > input[type="email"],
    .Dataface_QuickForm-widget-cell > .field > div > input[type="password"],
    .Dataface_QuickForm-widget-cell > .field > div > input[type="number"],
    .Dataface_QuickForm-widget-cell > .field > div > input[type="date"],
    .Dataface_QuickForm-widget-cell > .field > div > input[type="datetime-local"],
    .Dataface_QuickForm-widget-cell > .field > div > textarea,
    .Dataface_QuickForm-widget-cell > .field > div > select { width: 100% !important; max-width: none !important; }
    table.xf-grid-table { display: table !important; min-width: 520px; }
    table.xf-grid-table tbody { display: table-row-group !important; }
    table.xf-grid-table tr { display: table-row !important; }
    table.xf-grid-table th, table.xf-grid-table td { display: table-cell !important; width: auto !important; }
    .Dataface_QuickForm-widget-cell:has(table.xf-grid-table) { overflow-x: auto; }
}
