/* ============================================================================
   PROPERTY TRACKER - CONSOLIDATED STYLESHEET
   ============================================================================
   Replaces: reset.css + grid.css + style.css + modern.css
   Loaded BEFORE third-party CSS (jquery-ui.css, prettyPhoto.css) which provide
   widget-specific styling that this file then selectively overrides.

   Structure:
     1. CSS Variables (single source of truth for colours, fonts, sizes)
     2. Reset / Base
     3. Grid System (legacy 960gs subset for used classes only)
     4. Typography
     5. Layout (container, header, content, footer)
     6. Navigation (top nav + Report dropdown menu)
     7. Tables (.download_forms - used for grids and Edit form)
     8. Form Inputs
     9. Buttons (.btn-pt-* + legacy .btn variants kept for compatibility)
    10. jQuery UI Overrides (tabs, datepicker)
    11. Edit Page
    12. MyProperties Page
    13. Login / Homepage
    14. Utilities (visibility, helpers, error states)
    15. Loading Modal
    16. Scrollbars
    17. Responsive Breakpoints
   ============================================================================ */


/* ============================================================================
   1. CSS VARIABLES
   ============================================================================ */
:root {
    /* Colours */
    --color-primary:         #1e293b;
    --color-primary-light:   #334155;
    --color-secondary:       #475569;
    --color-accent:          #2563eb;
    --color-accent-light:    #dbeafe;
    --color-accent-hover:    #1d4ed8;
    --color-bg:              #f1f5f9;
    --color-bg-white:        #ffffff;
    --color-bg-subtle:       #f8fafc;
    --color-border:          #e2e8f0;
    --color-border-strong:   #cbd5e1;
    --color-text:            #1e293b;
    --color-text-secondary:  #64748b;
    --color-text-light:      #94a3b8;
    --color-success:         #059669;
    --color-warning:         #d97706;
    --color-danger:          #dc2626;
    --color-info:            #0284c7;
    --color-row-hover:       #eef0f3;   /* subtle cool grey */
    --color-row-alt:         #f8fafc;
    --color-row-locked:      #e6e9ee;   /* locked-list rows (GenList Manager) - a touch greyer so they stand out */
    --color-header-bg:       #5a5b5d;   /* BEO header / table header background */

    /* Font family */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

    /* Font size scale - bump --font-base to move the whole UI together */
    --font-xs:    11px;
    --font-sm:    13px;     /* table headers, secondary text */
    --font-base:  14px;     /* default body, grids, forms */
    --font-md:    16px;
    --font-lg:    18px;
    --font-xl:    22px;

    /* Radii / shadows */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-xl: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);

    --transition: 150ms ease;
}


/* ============================================================================
   2. RESET / BASE
   ============================================================================ */
a, abbr, acronym, address, applet, article, aside, audio,
b, blockquote, big, body,
center, canvas, caption, cite, code, command,
datalist, dd, del, details, dfn, dl, div, dt,
em, embed,
fieldset, figcaption, figure, font, footer, form,
h1, h2, h3, h4, h5, h6, header, hgroup, html,
i, iframe, img, ins,
kbd, keygen,
label, legend, li,
meter, nav,
object, ol, output,
p, pre, progress,
q,
s, samp, section, small, span, source, strike, strong, sub, sup,
table, tbody, tfoot, thead, th, tr, td, video, tt,
u, ul, var {
    background: transparent;
    border: 0 none;
    font-size: 100%;
    margin: 0;
    padding: 0;
    outline: 0;
    vertical-align: top;
}

ol, ul              { padding-left: 20px; }
blockquote, q       { quotes: none; }
table, table td     { padding: 0; border: none; border-collapse: collapse; }
img, embed          { vertical-align: top; }

/* HTML5 element fallback display */
article, aside, audio, canvas, command, datalist, details, embed,
figcaption, figure, footer, header, hgroup, keygen, meter, nav,
output, progress, section, source, video { display: block; }
mark, rp, rt, ruby, summary, time         { display: inline; }

html { width: 100%; }

body, .ui-widget, .ui-widget .ui-widget {
    font-family: var(--font-family) !important;
    font-size: var(--font-base);
    color: var(--color-text);
    background:
        linear-gradient(180deg,
            #d1d5db 0%,
            #b8bcc4 6%,
            #c9cdd5 12%,
            #e2e5ea 22%,
            #f1f3f6 40%,
            #f8f9fb 60%,
            #f1f5f9 100%) !important;
    background-attachment: fixed !important;
    min-width: 0 !important;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


/* ============================================================================
   3. GRID SYSTEM (subset of legacy 960gs - only used classes kept)
   ============================================================================ */
.grid_6, .grid_8, .grid_9, .grid_12 {
    display: inline;
    float: left;
    position: relative;
}

.alpha { margin-left:  0; }
.omega { margin-right: 0; }

.clear {
    clear: both;
    width: 100%;
    line-height: 0;
    font-size: 0;
}


/* ============================================================================
   4. TYPOGRAPHY
   ============================================================================ */
h2 {
    color: var(--color-primary);
    font-weight: 600;
    letter-spacing: -0.5px;
}

h3 {
    color: var(--color-primary) !important;
    font-weight: 600;
    letter-spacing: -0.5px;
    font-size: 20px !important;
    margin-bottom: 8px !important;
}

h4 {
    color: var(--color-primary);
    font-weight: 600;
    letter-spacing: -0.3px;
}

h5 {
    color: var(--color-secondary);
    font-weight: 600;
}

h6 { font-weight: bold; }

a {
    color: var(--color-accent);
    text-decoration: none;
    outline: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--color-accent-hover);
}


/* ============================================================================
   5. LAYOUT
   ============================================================================ */
.bg       { background: transparent !important; }
.top_tail { background: none !important; padding-top: 0 !important; }
.light    { background: none !important; }

/* Sticky footer. Body is a flex column so the content wrapper (.bg) grows to fill the
   viewport on short pages - keeping .site-footer at the very bottom of the window, and
   pushing it further down naturally on longer pages. The loading modals (#waitDiv /
   #waitDivMessage) are position:fixed/absolute, so they stay out of this flex flow. */
body { display: flex; flex-direction: column; min-height: 100vh; }
.bg  { flex: 1 0 auto; }
.site-footer { flex-shrink: 0; }

.main {
    width: 100% !important;
    max-width: 1800px;
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 auto !important;
    padding: 0 !important;
}

.container_12 {
    width: 100% !important;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
}

.container_12 .grid_9,
.container_12 .grid_12 { width: 100% !important; }

.container_12 .grid_6,
.container_12 .grid_8  { width: auto  !important; }

.wrapper { overflow: visible !important; }

#content { padding: 24px 0 56px !important; }

.box {
    background: var(--color-bg-white) !important;
    border: 1px solid var(--color-border) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.06) !important;
    min-height: auto !important;
}

.box .padding,
.box .padding2,
.box .padding3 { padding: 24px !important; }

.tabscontent       { min-height: 600px; }
.tabscontentsmall  { min-height: 1100px; }   /* matches the DD tab's natural height so all Arrow tabs sit equal */
.tabscontentmedium { min-height: 230px; }


/* ============================================================================
   6. NAVIGATION - TOP HEADER
   ============================================================================ */
header {
    background: var(--color-header-bg) !important;
    padding: 0 !important;
    margin-bottom: 0;
    position: relative;   /* anchor for the centred layout toggle */
}

header .container_12 { padding: 0 24px; }

header .wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    min-height: 80px;
}

header .grid_12 {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    float: none !important;
    width: 100% !important;
}

header .grid_6 {
    float: none !important;
    display: flex;
    align-items: center;
    padding: 0 !important;
}

header .suffix_1 { padding-right: 0 !important; }

header .toplogo {
    height: 64px !important;
    width: auto !important;
    margin: 8px 0 !important;
    box-shadow: none !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

header .alignright {
    text-align: right;
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    justify-content: center;
    gap: 0;
}

header .grid_8.omega { display: none !important; }

#menucontainer {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    font-size: var(--font-base) !important;
    font-weight: 400 !important;
    color: #ffffff;
}

#menucontainer a {
    color: #ffffff !important;
    font-size: var(--font-base) !important;
    font-weight: 400 !important;
    padding: 6px 12px !important;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

#menucontainer a:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.12);
    text-decoration: none !important;
}

.nav-row {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: nowrap;
}

.nav-row-top {
    padding-bottom: 2px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    justify-content: flex-end;
}

.nav-row-bottom {
    padding-top: 2px;
    width: 100%;
    justify-content: flex-end;
}

.nav-user-info {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--font-base);
    padding: 6px 12px;
    white-space: nowrap;
}

.btn-nav {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: var(--font-base);
    font-weight: 400;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    text-decoration: none !important;
    white-space: nowrap;
}

.btn-nav:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.12);
    text-decoration: none !important;
}

.btn-nav .icon-svg       { opacity: 0.85; }
.btn-nav:hover .icon-svg { opacity: 1; }

.btn-nav-danger:hover {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #fca5a5 !important;
}


/* ============================================================================
   REPORT DROPDOWN MENU (.nav)
   ============================================================================
   Used on MyProperties and AdvancedSearch for the "Reports" button.
   Hidden off-screen by default, slid into view on hover. */
.nav {
    list-style: none;
    width: 120px !important;
    background: none !important;
    position: relative;
    z-index: 10 !important;
}

.nav > li {
    width: 120px !important;
    background: var(--color-bg-white) !important;
    box-shadow: var(--shadow-md) !important;
    border: 1px solid var(--color-border) !important;
    border-radius: var(--radius-md) !important;
    position: relative;
    left: 0 !important;
    padding: 4px !important;
    line-height: 28px !important;
}

.nav a {
    color: var(--color-text) !important;
    display: block;
    text-decoration: none;
}

.nav > li > .report-dropdown-trigger { color: #ffffff !important; }

.nav ul {
    list-style: none;
    background: var(--color-bg-white) !important;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 4px 0 !important;
    position: absolute;
    left: -9999px;          /* hide off-screen until hover */
}

.nav ul li {
    background: var(--color-bg-white) !important;
    box-shadow: none !important;
    border: none !important;
    padding: 2px 8px !important;
    width: auto !important;
    left: 0 !important;
    float: none;
}

.nav ul a       { white-space: nowrap; }
.nav ul li span { font-size: 12px; color: var(--color-text); }

.nav li:hover ul     { left: 0 !important; }
.nav li:hover ul a   { text-decoration: none; }

.report-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    background: var(--color-accent);
    color: #ffffff !important;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: var(--font-family);
    font-size: 13px;
    font-weight: 500;
    transition: background var(--transition);
    text-decoration: none !important;
    line-height: 1.4;
}

.report-dropdown-trigger:hover {
    background: var(--color-accent-hover);
    color: #ffffff !important;
    text-decoration: none !important;
}

.report-dropdown-trigger .icon-svg { stroke: #ffffff; }

.btn-report {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-family);
    font-size: 12px;
    color: var(--color-text);
    border-radius: var(--radius-sm);
    transition: background var(--transition);
    white-space: nowrap;
}

.btn-report:hover { background: var(--color-bg); }


/* ============================================================================
   7. TABLES (.download_forms - grids and Edit form)
   ============================================================================ */
.download_forms {
    width: 100%;
    text-align: left;
    border-collapse: separate !important;
    border-spacing: 0;
    border: 1px solid var(--color-border);
    border-right: none;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.download_forms thead tr th,
.download_forms th {
    background: var(--color-header-bg) !important;
    color: #ffffff !important;
    font-weight: 500 !important;
    font-size: var(--font-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 8px !important;
    border: none !important;
    border-right: 1px solid rgba(255, 255, 255, 0.15) !important;
}

.download_forms thead tr th:first-child { border-radius: var(--radius-md) 0 0 0; }
.download_forms thead tr th:last-child  { border-radius: 0 var(--radius-md) 0 0; }

.download_forms td {
    padding: 4px 8px !important;
    border: none !important;
    border-bottom: 1px solid var(--color-border) !important;
    border-right:  1px solid var(--color-border) !important;
    font-size: var(--font-base) !important;
    line-height: 1.3 !important;
    vertical-align: middle;
}

.download_forms tr:last-child td { border-bottom: none !important; }

.download_forms td a {
    color: var(--color-text) !important;
    font-weight: normal;
    line-height: 1.3;
    font-size: inherit;   /* anchor follows td size, not its own */
}

.download_forms td a:hover {
    color: var(--color-accent) !important;
    text-decoration: none !important;
}

/* Row state */
.normal_row    { background: var(--color-bg-white)  !important; }
.alternate_row { background: var(--color-row-alt)   !important; }
.highlight_row { background: var(--color-row-hover) !important; }

/* Locked GenList types (List Manager) - tinted grey so they read as "protected" at a glance */
.download_forms tr.pt-locked-row { background: var(--color-row-locked) !important; }

.download_forms tbody tr {
    transition: background-color var(--transition);
}

.download_forms tbody tr:hover {
    background: var(--color-row-hover) !important;
}

/* Notes/Updates row variants */
.note-row-priority { background-color: #fef9c3 !important; }
.note-row-normal   { background-color: var(--color-bg-white) !important; }
.note-row-alt      { background-color: var(--color-row-alt)  !important; }

/* Generic column widths used across grids */
.download_forms .item1 { width: 50% !important; max-width: none !important; }
.download_forms .item4 { width: 12% !important; }
.download_forms .item5 { width: 15% !important; }

/* MyProperties grid - dedicated column shapes.
   .item-min   shrinks to content (but grows if content is wide)
   .item-notes for the Borrower Ref / extra notes column - gets the leftover width.
   The nth-child rules extend the nowrap behaviour down to the BODY cells in the
   same columns (which have no class), otherwise the column collapses while the
   text wraps - making Status look squeezed. */
.download_forms .item-min   { white-space: nowrap; width: 1% !important; }
.download_forms .item-notes { width: 35% !important; }

#propertyGrid td:nth-child(2),   /* Status */
#propertyGrid td:nth-child(4) {  /* Added / Key */
    white-space: nowrap;
}

/* Ensure inputs fill their cells */
td input[type="text"],
td select { width: 95% !important; }

.download_forms .inputbig   { width: 98% !important; }
.download_forms .inputsmall { width: 60px !important; }

/* ===== Add Update - per-row layout (editor + two control columns) ===== */
#updatesTable { table-layout: fixed; width: 100%; }
#updatesTable > tbody > tr { border-bottom: 1px solid var(--color-border); }
#updatesTable > tbody > tr:last-child { border-bottom: none; }
#updatesTable > tbody > tr > td { vertical-align: top; padding: 16px; }
#updatesTable td.mu-left  { width: 50%; }
#updatesTable td.mu-mid   { width: 25%; }
#updatesTable td.mu-right { width: 25%; position: relative; }

#updatesTable .mu-field { margin-bottom: 14px; }
#updatesTable .mu-field:last-child { margin-bottom: 0; }
#updatesTable .mu-label { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: #6b7280; margin-bottom: 4px; }
#updatesTable td.mu-mid input[type="text"], #updatesTable td.mu-mid select,
#updatesTable td.mu-right input[type="text"], #updatesTable td.mu-right select { width: 100% !important; box-sizing: border-box; margin: 0 !important; }
#updatesTable td.mu-mid input.r-date { width: 110px !important; }
#updatesTable td.mu-mid input[type="file"] { width: 100%; }
#updatesTable .mu-type { font-weight: 600; color: var(--color-text); }
#updatesTable .mu-check { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--color-text); cursor: pointer; }
#updatesTable .mu-check input[type="checkbox"] { width: 16px !important; height: 16px; margin: 0; }
#updatesTable .mu-remove { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; line-height: 22px; text-align: center; border: 1px solid var(--color-border); border-radius: 4px; background: #fff; color: #dc2626; cursor: pointer; font-weight: 700; padding: 0; z-index: 2; }
#updatesTable .mu-remove:hover { background: #fff5f5; border-color: #dc2626; }

/* Sort icon (next to grid column headers).
   The dark ui-icons sprite is inverted to white so it stays visible on the
   dark .download_forms thead background. */
.ui-icon-sort {
    background-image: url(/Content/Themes/Base/images/ui-icons_222222_256x240.png);
    background-position: -128px 0;
    background-repeat: no-repeat;
    width: 16px;
    height: 16px;
    display: inline-block;
    vertical-align: middle;
    text-indent: -99999px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.7;
    margin-left: 4px;
    transition: opacity var(--transition);
    filter: brightness(0) invert(1);   /* force the sprite to render white */
}

.ui-icon-sort:hover { opacity: 1; }

/* Inputs/selects inside table-layout:fixed tables stay within their cell */
.download_forms[style*="table-layout"] td input[type="text"],
.download_forms[style*="table-layout"] td select {
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
}


/* ============================================================================
   8. FORM INPUTS
   ============================================================================ */
input[type=text],
input[type=password],
input[type=email],
input[type=number] {
    font-family: var(--font-family) !important;
    font-size: var(--font-base) !important;
    border: 1px solid var(--color-border-strong) !important;
    border-radius: var(--radius-md) !important;
    padding: 7px 10px !important;
    margin-left: 0 !important;
    transition: border-color var(--transition), box-shadow var(--transition);
    background: var(--color-bg-white);
    color: var(--color-text);
    box-sizing: border-box;
}

input[type=text]:focus,
input[type=password]:focus,
input[type=email]:focus,
input[type=number]:focus {
    border-color: var(--color-accent) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
    outline: none;
}

select {
    font-family: var(--font-family) !important;
    font-size: var(--font-base) !important;
    border: 1px solid var(--color-border-strong) !important;
    border-radius: var(--radius-md) !important;
    padding: 7px 10px !important;
    margin-left: 0 !important;
    background-color: var(--color-bg-white) !important;
    color: var(--color-text);
    cursor: pointer;
    transition: border-color var(--transition);
    box-sizing: border-box;
}

select:focus {
    border-color: var(--color-accent) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    outline: none;
}

textarea {
    font-family: var(--font-family) !important;
    font-size: var(--font-base) !important;
    border: 1px solid var(--color-border-strong) !important;
    border-radius: var(--radius-md) !important;
    padding: 8px 12px !important;
    transition: border-color var(--transition);
    box-sizing: border-box;
}

textarea:focus {
    border-color: var(--color-accent) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    outline: none;
}

input[type="checkbox"] {
    accent-color: var(--color-accent);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

input[type="image"] {
    transition: opacity var(--transition);
    vertical-align: middle;
}

input[type="image"]:hover { opacity: 0.75; }

/* Datepicker input visual hint */
.dtpicker { background-color: #f0f9ff !important; }

/* Specific input widths used in views */
.numericOnly          { width: 80px;  }
.text-box-single-line { width: 200px; }


/* ============================================================================
   9. BUTTONS
   ============================================================================ */
.submitButton {
    background-color: var(--color-primary) !important;
    color: #ffffff !important;
    font-family: var(--font-family) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    padding: 8px 24px !important;
    border: none !important;
    border-radius: var(--radius-md) !important;
    cursor: pointer;
    transition: background-color var(--transition);
    letter-spacing: 0.3px;
}

.submitButton:hover { background-color: var(--color-primary-light) !important; }

/* Legacy .btn from old style.css - kept flat in modern colours */
.btn {
    display: inline-block;
    font-family: var(--font-family) !important;
    font-size: 12px;
    font-weight: 500;
    padding: 6px 10px;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-md) !important;
    background: var(--color-bg-white);
    color: var(--color-text);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition);
    text-shadow: none !important;
    box-shadow: none !important;
}

.btn:hover    { background: var(--color-bg); }
.btn.small    { font-size: 11px; }
.btn.medium   { font-size: 1.3em; }
.btn.large    { font-size: 1.6em; }

/* Status-coloured legacy buttons (.success/.warning/.danger/.inf) */
.success { background: var(--color-success) !important; background-image: none !important; border-color: var(--color-success) !important; color: #fff !important; }
.warning { background: var(--color-warning) !important; background-image: none !important; border-color: var(--color-warning) !important; color: #fff !important; }
.danger  { background: var(--color-danger)  !important; background-image: none !important; border-color: var(--color-danger)  !important; color: #fff !important; }
.inf     { background: var(--color-info)    !important; background-image: none !important; border-color: var(--color-info)    !important; color: #fff !important; }

/* Modern button system (.btn-pt-*) */
.btn-pt {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-family);
    font-size: 13px;
    font-weight: 500;
    padding: 7px 16px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none !important;
    line-height: 1.4;
    white-space: nowrap;
    box-sizing: border-box;
}

.btn-pt:hover { text-decoration: none !important; }

.btn-pt-primary       { background: var(--color-accent); color: #ffffff !important; }
.btn-pt-primary:hover { background: var(--color-accent-hover); color: #ffffff !important; }

.btn-pt-success       { background: #059669; color: #ffffff !important; }
.btn-pt-success:hover { background: #047857; color: #ffffff !important; }

.btn-pt-danger        { background: #dc2626; color: #ffffff !important; }
.btn-pt-danger:hover  { background: #b91c1c; color: #ffffff !important; }

.btn-pt-ghost {
    background: transparent;
    color: var(--color-secondary) !important;
    border: 1px solid var(--color-border);
}

.btn-pt-ghost:hover {
    background: var(--color-bg);
    color: var(--color-primary) !important;
    border-color: var(--color-primary);
}

.btn-pt-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 7px;
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-secondary);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none !important;
    font-family: var(--font-family);
    font-size: 13px;
    line-height: 1;
}

.btn-pt-icon:hover {
    background: var(--color-bg);
    color: var(--color-accent);
    border-color: var(--color-accent);
    text-decoration: none !important;
}

.btn-pt-fixed    { height: 34px; box-sizing: border-box; }
.btn-pt-lg       { font-size: 14px !important; padding: 10px 22px !important; }
.btn-pt-outline {
    background: transparent !important;
    border: 1.5px solid var(--color-accent) !important;
    color: var(--color-accent) !important;
}
.btn-pt-outline:hover { background: var(--color-accent-light) !important; }

.btn-pt-disabled {
    opacity: 0.45;
    cursor: default;
    pointer-events: none;
}

/* SVG icon system */
.icon-svg {
    display: inline-block;
    width: 16px;
    height: 16px;
    vertical-align: middle;
    flex-shrink: 0;
}

.icon-svg-sm  { width: 14px; height: 14px; }
.icon-svg-lg  { width: 20px; height: 20px; }
.icon-svg-xl  { width: 24px; height: 24px; }

/* Bare icon button - strips native <button> chrome so it reads as an inline icon-link (used for in-form POST deletes) */
.icon-btn { background: none; border: none; padding: 0; margin: 0; cursor: pointer; vertical-align: middle; line-height: 0; }


/* ============================================================================
   10. jQuery UI OVERRIDES (Tabs, Datepicker)
   ============================================================================ */
.ui-tabs {
    border: 1px solid var(--color-border) !important;
    border-radius: var(--radius-lg) !important;
    padding: 0 !important;
    background: var(--color-bg-white) !important;
}

.ui-tabs .ui-tabs-nav {
    background: var(--color-bg-subtle) !important;
    border: none !important;
    border-bottom: 1px solid var(--color-border) !important;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
    padding: 0 8px !important;
    margin: 0 !important;
    display: flex;
    flex-wrap: wrap;
}

.ui-tabs .ui-tabs-nav li {
    margin: 0 !important;
    border: none !important;
    background: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    float: none !important;
}

.ui-tabs .ui-tabs-nav li a {
    font-family: var(--font-family) !important;
    font-size: var(--font-base) !important;
    font-weight: 500 !important;
    color: var(--color-text-secondary) !important;
    padding: 12px 16px !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    background: none !important;
    transition: all var(--transition);
    display: block;
    float: none !important;
}

.ui-tabs .ui-tabs-nav li a:hover {
    color: var(--color-primary) !important;
    background: rgba(0, 0, 0, 0.03) !important;
    text-decoration: none !important;
}

.ui-tabs .ui-tabs-nav li.ui-tabs-active,
.ui-tabs .ui-tabs-nav li.ui-state-active {
    border: none !important;
    background: none !important;
}

.ui-tabs .ui-tabs-nav li.ui-tabs-active a,
.ui-tabs .ui-tabs-nav li.ui-state-active a {
    color: var(--color-accent) !important;
    border-bottom: 2px solid var(--color-accent) !important;
    font-weight: 600 !important;
    background: none !important;
}

.ui-tabs .ui-tabs-panel {
    padding: 4px 20px 20px 20px !important;   /* trim top padding - tab content sits closer to the tab strip */
    border: none !important;
}

/* Main top-of-Edit tab block */
#tabs1 {
    border-top: 3px solid var(--color-primary) !important;
    margin-top: 24px !important;
}

.ui-datepicker {
    font-family: var(--font-family) !important;
    border: 1px solid var(--color-border) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-lg) !important;
}


/* ============================================================================
   11. EDIT PAGE
   ============================================================================ */
.edit-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.edit-header-actions input[type="image"] { padding: 2px; }

.edit-hint {
    font-size: 11px;
    color: var(--color-text-light);
    margin-top: 2px;
}

/* The full-row colspan="4" cells in the Edit form are visual section dividers,
   not real headers. Render them as a thin grey line in --color-header-bg
   (background falls through from the general .download_forms th rule). */
#propertyInformationForm .download_forms th[colspan="4"] {
    height: 4px !important;
    line-height: 4px !important;
    padding: 0 !important;
    font-size: 0 !important;
    border-bottom: none !important;
}

/* Opt-in: a colspan="4" cell tagged .pt-group-header IS a real, visible header (e.g. the OLD-tab
   group labels). Higher specificity than the thin-divider rule above, so it wins. */
#propertyInformationForm .download_forms th[colspan="4"].pt-group-header {
    height: auto !important;
    line-height: 1.4 !important;
    padding: 6px 10px !important;
    font-size: var(--font-sm) !important;
}

.edit-footer-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
    padding: 20px 0 4px;
    border-top: 1px solid var(--color-border);
}

.edit-footer-actions .nav li { position: relative; }

.edit-footer-actions .nav ul {
    bottom: 100%;
    top: auto;
    padding-top: 0;
    padding-bottom: 3px;
}

#propertyInformationForm select[multiple] {
    border: 1px solid var(--color-border) !important;
    border-radius: var(--radius-md) !important;
    width: 100% !important;
}

/* Borderless, transparent inputs across the Edit form */
#propertyInformationForm input[type="text"],
#propertyInformationForm input[type="date"],
#propertyInformationForm input[type="number"],
#propertyInformationForm input[type="password"],
#propertyInformationForm input[type="email"],
#propertyInformationForm select:not([multiple]),
#propertyInformationForm textarea {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 2px 4px !important;
}

/* Updates-tab filter dropdowns: re-add a faint grey border (the borderless
   rule above strips it from every Edit-form select). */
#propertyInformationForm #PropertyNoteUsersID,
#propertyInformationForm #docSectionFilter,
#propertyInformationForm #docTypeFilter {
    border: 1px solid var(--color-border) !important;
    background: var(--color-bg-white) !important;
    border-radius: var(--radius-md) !important;
    padding: 3px 6px !important;
    width: 180px !important;
}

#propertyInformationForm .download_forms td {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
    line-height: 1.3 !important;
}

/* On row hover, give inputs white background so they stand out */
#propertyInformationForm .download_forms tbody tr:hover input[type="text"],
#propertyInformationForm .download_forms tbody tr:hover input[type="date"],
#propertyInformationForm .download_forms tbody tr:hover input[type="number"],
#propertyInformationForm .download_forms tbody tr:hover input[type="password"],
#propertyInformationForm .download_forms tbody tr:hover input[type="email"],
#propertyInformationForm .download_forms tbody tr:hover select:not([multiple]),
#propertyInformationForm .download_forms tbody tr:hover textarea {
    background: #ffffff !important;
}

/* Updates tab (#tabs1-0) keeps original padding - not squished like property rows */
#propertyInformationForm #tabs1-0 .download_forms td {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
    line-height: 1.3 !important;
}

/* Updates tab: vertical-align top for multi-line content */
#tabs1-0 .download_forms td { vertical-align: top; }

/* Updates table: Logged By + Date columns shrink to content, Description grows */
#tabs1-0 .download_forms .item2,
#tabs1-0 .download_forms .item4 {
    white-space: nowrap;
    width: 1% !important;
}

/* DD tab tables: enforce consistent 4-column layout */
#tabs1-13 .download_forms {
    table-layout: fixed;
    width: 100%;
}

/* Textareas are fluid; tightened min-height */
#propertyInformationForm textarea {
    width: 100% !important;
    box-sizing: border-box;
    min-height: 80px;
}

/* Edit page inline field groups (e.g. Country + County on one row) */
.edit-inline-fields {
    display: flex;
    gap: 10px;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.edit-inline-fields input[type="text"],
.edit-inline-fields select {
    flex: 1;
    width: auto !important;
    min-width: 0;
    box-sizing: border-box;
}

/* Listbox panels (Users + Groups columns) */
.edit-listbox-panel {
    display: flex;
    gap: 12px;
    padding-left: 8px;
}

.edit-listbox-group { flex: 1; min-width: 0; }

.edit-listbox-with-actions {
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.edit-listbox-with-actions select { flex: 1; min-width: 0; }

.edit-listbox-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

.nowrap-cell {
    white-space: nowrap;
    overflow: hidden;
}


/* ============================================================================
   12. MyProperties PAGE
   ============================================================================ */
.properties-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.property-list-container { flex: 1; min-width: 0; }

.status-filter-sidebar {
    width: 260px;
    flex-shrink: 0;
}

.status-filter-sidebar select[multiple] {
    width: 100% !important;
    height: 500px !important;
    border: 1px solid var(--color-border) !important;
    border-radius: var(--radius-md) !important;
    padding: 4px !important;
    font-family: var(--font-family) !important;
    font-size: 13px;
}

.status-filter-sidebar select[multiple] option {
    padding: 6px 8px;
    border-radius: var(--radius-sm);
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    margin-bottom: 10px;
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 7px 12px !important;
    font-size: 13px !important;
    border: 1px solid var(--color-border-strong) !important;
    border-radius: var(--radius-md) !important;
}

.search-bar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.pagination-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 0;
    font-size: 13px;
    color: var(--color-text-secondary);
}

.pagination-controls input[type="image"] { padding: 4px; }

.no-items-message {
    padding: 60px 40px;
    color: var(--color-text-secondary);
    font-size: 15px;
    text-align: center;
}

.advancedDiv         { margin-bottom: 10px; }
.hiddenAdvancedDiv   { display: none;  margin-bottom: 10px; }
.visibleAdvancedDiv  { display: block; margin-bottom: 10px; }


/* ============================================================================
   13. LOGIN / HOMEPAGE
   ============================================================================ */
.login-form-container { padding: 8px 0; }

.login-fields {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.login-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.login-field label {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-input {
    width: 200px !important;
    padding: 8px 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    border-radius: var(--radius-md) !important;
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    font-size: 13px !important;
    transition: all var(--transition);
}

.login-input::placeholder { color: rgba(255, 255, 255, 0.4); }

.login-input:focus {
    border-color: var(--color-accent) !important;
    background: rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2) !important;
    outline: none;
}

.login-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 2px;
}

/* Stacks the "Forgot password?" link directly above the Log In button */
.login-submit-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.login-help-link {
    font-size: 11px !important;
    color: rgba(255, 255, 255, 0.5) !important;
    text-decoration: underline !important;
    white-space: nowrap;
}

.login-help-link:hover { color: rgba(255, 255, 255, 0.8) !important; }

.login-form-container .field-validation-error {
    color: #fca5a5 !important;
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

.login-error-message {
    color: #fca5a5 !important;
    font-size: 11px;
    margin-top: 4px;
    display: block;
}

.login-error-message ul { list-style: none; margin: 0; padding: 0; }


/* ============================================================================
   AUTH CARDS - standalone Forgot / Reset / Set Password pages. These sit on a
   LIGHT page (unlike the dark header login), so the shared .login-* inputs - which
   are white-on-dark for the header - are re-skinned dark-on-light inside the card.
   ============================================================================ */
.pt-auth-card {
    max-width: 460px;
    margin: 48px auto;
    padding: 32px 36px !important;
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.pt-auth-title {
    font-size: var(--font-xl);
    color: var(--color-text);
    margin: 0 0 12px;
}

.pt-auth-intro,
.pt-auth-message {
    font-size: var(--font-base);
    color: var(--color-text-secondary);
    line-height: 1.5;
    margin: 0 0 20px;
}

.pt-auth-message { color: var(--color-text); }
.pt-auth-error   { color: var(--color-danger); }

.pt-auth-card .login-fields { flex-direction: column; align-items: stretch; gap: 16px; }
.pt-auth-card .login-field  { width: 100%; }

.pt-auth-card .login-field label {
    display: block;
    font-size: var(--font-sm);
    color: var(--color-text-secondary);
    margin-bottom: 6px;
}

.pt-auth-card .login-input {
    width: 100% !important;
    box-sizing: border-box;
    border: 1px solid var(--color-border-strong) !important;
    border-radius: var(--radius-md) !important;
    background: var(--color-bg-white) !important;
    color: var(--color-text) !important;
    font-size: var(--font-base) !important;
}

.pt-auth-card .login-input::placeholder { color: var(--color-text-light) !important; }

.pt-auth-card .login-actions { justify-content: space-between; margin-top: 8px; }

.pt-auth-card .login-help-link {
    color: var(--color-accent) !important;
    text-decoration: none !important;
}
.pt-auth-card .login-help-link:hover { color: var(--color-accent-hover) !important; text-decoration: underline !important; }

/* Admin action confirmation banner (e.g. "link emailed", "N passwords hashed") */
.pt-admin-message {
    margin: 12px 0;
    padding: 10px 14px;
    background: var(--color-accent-light);
    border: 1px solid var(--color-accent);
    border-radius: var(--radius-md);
    color: var(--color-accent-hover);
    font-size: var(--font-sm);
}


/* Homepage hero */
.hp-hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.hp-hero-inner {
    display: flex;
    align-items: stretch;
    gap: 48px;
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 40px;
    margin-top: 32px;
}

.hp-hero-text {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hp-hero-title {
    font-size: 30px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--color-primary);
    margin-bottom: 16px;
}

.hp-hero-subtitle {
    font-size: 15px;
    line-height: 1.7;
    color: var(--color-secondary);
    margin-bottom: 24px;
}

.hp-hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hp-version {
    display: inline-block;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    margin-left: 12px;
    align-self: flex-end;
    margin-bottom: 10px;
}

.hp-hero-image {
    flex: 0 0 420px;
    max-width: 420px;
    display: flex;
    align-items: center;
}

.hp-hero-image img { width: 100%; height: auto; display: block; }

/* Trust signals strip */
.hp-trust {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.hp-trust-inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 28px 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.hp-trust-item  { text-align: center; padding: 12px 8px; }
.hp-trust-icon  { width: 32px; height: 32px; color: var(--color-accent); margin-bottom: 8px; }
.hp-trust-label { font-size: 14px; font-weight: 600; color: var(--color-primary); margin-bottom: 4px; }
.hp-trust-desc  { font-size: 12px; color: var(--color-text-secondary); line-height: 1.5; }

/* Homepage section containers */
.hp-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px;
}

.hp-section-alt {
    background: var(--color-bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.hp-section-inner { max-width: 100%; }

.hp-section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-primary);
    text-align: center;
    margin-bottom: 8px;
}

.hp-section-subtitle {
    font-size: 14px;
    color: var(--color-text-secondary);
    text-align: center;
    margin-bottom: 36px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.hp-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.hp-card {
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    transition: box-shadow var(--transition), border-color var(--transition);
}

.hp-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--color-border-strong);
}

.hp-card-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: var(--color-accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.hp-card-icon  { width: 24px; height: 24px; color: var(--color-accent); }
.hp-card-title { font-size: 16px; font-weight: 600; color: var(--color-primary); margin-bottom: 8px; }
.hp-card-text  { font-size: 13px; line-height: 1.7; color: var(--color-secondary); }

.hp-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.hp-feature        { text-align: center; padding: 8px; }
.hp-feature-icon   { width: 36px; height: 36px; color: var(--color-accent); margin-bottom: 12px; }
.hp-feature-title  { font-size: 15px; font-weight: 600; color: var(--color-primary); margin-bottom: 8px; }
.hp-feature-text   { font-size: 13px; line-height: 1.65; color: var(--color-secondary); }

.hp-demo-cta {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.hp-demo-cta-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    background: var(--color-primary);
    border-radius: var(--radius-lg);
    padding: 24px 36px;
    margin-top: 24px;
    margin-bottom: 32px;
}

.hp-demo-cta-text {
    font-size: 16px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.hp-demo-cta .btn-pt-primary { flex-shrink: 0; }

/* Static (privacy/faq) pages */
.static-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px 48px;
}

.static-page-inner {
    background: var(--color-bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 40px 48px;
}

.static-page-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border);
}

.static-page-content h3 { font-size: 16px; font-weight: 600; color: var(--color-primary); margin-top: 28px; margin-bottom: 10px; }
.static-page-content h4 { font-size: 14px; font-weight: 600; color: var(--color-primary-light); margin-top: 20px; margin-bottom: 8px; }
.static-page-content p  { font-size: 14px; line-height: 1.7; color: var(--color-secondary); margin-bottom: 12px; }

/* Site footer */
.site-footer {
    clear: both;
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    padding: 14px 24px;
    background: var(--color-primary) !important;
}

.site-footer p,
.site-footer .site-footer-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6) !important;
    margin: 0;
}

.site-footer a,
.site-footer p a,
.site-footer .site-footer-text a {
    color: rgba(255, 255, 255, 0.75) !important;
    text-decoration: none !important;
}

.site-footer a:hover,
.site-footer p a:hover,
.site-footer .site-footer-text a:hover {
    color: #ffffff !important;
    text-decoration: underline !important;
}

/* Legacy footer wrapper from old layout */
body > div:last-of-type {
    background: var(--color-bg);
    padding: 12px 0 !important;
}

body > div:last-of-type p { color: var(--color-text-secondary) !important; font-size: 12px; }
body > div:last-of-type a { color: var(--color-text-secondary); }
body > div:last-of-type a:hover { color: var(--color-accent); }


/* ============================================================================
   14. UTILITIES
   ============================================================================ */
.hiddenDiv  { visibility: hidden; }
.visibleDiv { visibility: visible; }

.transition {
    transition: opacity 1s ease-out;
    -moz-transition: opacity 1s ease-out;
    -webkit-transition: opacity 1s ease-out;
    -o-transition: opacity 1s ease-out;
}

.search {
    background-color: lightgrey;
    width: 100%;
}

/* Error states */
.error          { color: red; }
label.error     { margin-left: 10px; width: auto; display: inline; color: red; }
#registerMessage { font-weight: bold; color: red; }

.alignright { text-align: right; }

/* Legacy spacing utilities (still used as margin helpers in some views) */
.p1 { margin-top: 12px; }
.p2 { margin-bottom: 10px; }
.p3 { margin-bottom: 30px; }
.p4 { margin-bottom: 14px; }
.p5 { margin-bottom: 22px; }
.p6 { margin-left: 20px; margin-right: 20px; }

.fleft  { float: left; }
.fright { float: right; }


/* ============================================================================
   15. WAIT / LOADING MODAL (#waitDiv + #waitDivMessage)
   ============================================================================ */
#waitDiv {
    background-color: rgba(15, 23, 42, 0.5) !important;
    color: white;
    text-align: center;
    z-index: 1000;
    position: absolute;
    height: 100%;
    width: 100%;
    opacity: 1 !important;
}

#waitDivMessage {
    background: var(--color-bg-white) !important;
    border: 1px solid var(--color-border) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 8px 20px rgba(0, 0, 0, 0.15) !important;
    font-family: var(--font-family);
    padding: 40px 48px !important;
    width: 480px !important;
    height: auto !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--color-text);
    z-index: 1001;
    position: fixed;
}

#waitDivMessage h1 { font-size: 16px !important; font-weight: 600; color: var(--color-primary); margin: 12px 0 20px !important; }
#waitDivMessage h2 { font-size: 22px !important; font-weight: 700; color: var(--color-accent); margin: 0 0 8px !important; }
#waitDivMessage p  { font-size: 13px; color: var(--color-text-secondary); line-height: 1.6; margin: 0 0 6px; }


/* ============================================================================
   16. SCROLLBARS
   ============================================================================ */
::-webkit-scrollbar       { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--color-bg); border-radius: 4px; }
::-webkit-scrollbar-thumb { background: var(--color-border-strong); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-secondary); }


/* ============================================================================
   17. RESPONSIVE BREAKPOINTS
   ============================================================================ */
@media (max-width: 1200px) {
    .container_12,
    header .container_12 { padding: 0 16px; }

    .box .padding,
    .box .padding2,
    .box .padding3 { padding: 16px !important; }

    .properties-layout    { gap: 16px; }
    .status-filter-sidebar { width: 220px; }

    #menucontainer a { font-size: 12px !important; padding: 5px 8px !important; }
    .btn-nav         { font-size: 12px; padding: 5px 8px; gap: 4px; }
    header .toplogo  { height: 52px !important; }
    .btn-pt          { font-size: 12px; padding: 6px 12px; }
}

@media (max-width: 900px) {
    header .grid_12 { flex-wrap: wrap !important; }
    header .grid_6  { width: 100% !important; justify-content: center; }
    header .alignright { width: 100%; align-items: center; }
    .login-fields   { justify-content: center; }

    .hp-hero-inner       { flex-direction: column; text-align: center; padding: 28px; }
    .hp-hero-image       { flex: 0 0 auto; max-width: 100%; width: 100%; }
    .hp-hero-actions     { justify-content: center; }
    .hp-demo-cta-inner   { flex-direction: column; text-align: center; }
    .hp-trust-inner      { grid-template-columns: repeat(2, 1fr); }
    .hp-cards-grid       { grid-template-columns: 1fr; }
    .hp-features-grid    { grid-template-columns: 1fr 1fr; }
    .static-page-inner   { padding: 28px 24px; }
}

@media (max-width: 600px) {
    header .toplogo { height: 48px !important; }
    .login-input    { width: 150px !important; }
    .login-fields   { gap: 8px; }

    .hp-hero-title    { font-size: 24px; }
    .hp-trust-inner   { grid-template-columns: 1fr 1fr; }
    .hp-features-grid { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
    .login-input  { width: 100% !important; }
    .login-field  { width: 100%; }
    .login-fields { flex-direction: column; align-items: stretch; }
    .login-actions { justify-content: center; }
}

@media (min-width: 1600px) {
    .container_12,
    header .container_12 { padding: 0 40px; }

    .status-filter-sidebar { width: 300px; }
}

@media (min-width: 1920px) {
    .main { max-width: 1800px; margin: 0 auto !important; }
}


/* ============================================================================
   18. RESPONSIVE BOX GRID  (reusable)
   ----------------------------------------------------------------------------
   Lay content side-by-side that stacks on narrow screens. Put the content
   (normally a .download_forms table, to keep the sharp app-wide look) in a
   .pt-w-* column inside a .pt-flex-row. A complementary pair (60+40, 66+33,
   50+50, ...) fills one row on desktop; below 900px every column goes
   full-width and stacks. The calc() trims half the 24px row gap so a 2-up
   pair adds up to exactly 100%. Reusable across the app.
   ============================================================================ */
.pt-flex-row {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: flex-start;
}
.pt-flex-row > * { box-sizing: border-box; }

/* Width utilities - flex-basis as a % minus half the gap (for 2-up rows) */
.pt-w-25 { flex: 1 1 calc(25% - 12px); }
.pt-w-33 { flex: 1 1 calc(33.333% - 12px); }
.pt-w-40 { flex: 1 1 calc(40% - 12px); }
.pt-w-50 { flex: 1 1 calc(50% - 12px); }
.pt-w-60 { flex: 1 1 calc(60% - 12px); }
.pt-w-66 { flex: 1 1 calc(66.666% - 12px); }
.pt-w-75 { flex: 1 1 calc(75% - 12px); }

/* White card panel - the responsive "box" itself. Put a .download_forms table
   (or any content) inside. Combine with a .pt-w-* class on the same element. */
.pt-box {
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 16px;
}

/* Small helper text under a field; muted empty-state text */
.pt-field-hint { font-size: var(--font-xs); color: var(--color-text-light); margin-top: 4px; }
.pt-muted      { color: var(--color-text-light); font-style: italic; }

/* Read-only mode notice - shown atop the Edit screen for the Read Only role */
.pt-readonly-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    color: #92400e;
    border-radius: var(--radius-lg, 8px);
    padding: 10px 14px;
    margin-bottom: 16px;
    font-size: var(--font-sm, 13px);
}

/* Edit2 (experimental) cards: responsive tiling - 3-up wide, 2-up medium, 1-up narrow. The selector
   includes .pt-flex-row so it outranks the shared §18 rules (incl. the 900px stack) by specificity,
   regardless of source order. Basis math accounts for the 24px row gap. Edit2-scoped. */
.pt-flex-row.pt-edit2-cards > [class*="pt-w-"] { min-width: 0; flex: 1 1 calc(33.333% - 16px); }   /* 3-up */
.pt-edit2-cards .download_forms { table-layout: fixed; width: 100%; }
.pt-edit2-cards .download_forms td input[type="text"],
.pt-edit2-cards .download_forms td select,
.pt-edit2-cards .download_forms td textarea { width: 100%; max-width: 100%; box-sizing: border-box; }

@media (max-width: 1200px) {
    .pt-flex-row.pt-edit2-cards > [class*="pt-w-"] { flex-basis: calc(50% - 12px); }   /* 2-up */
}
@media (max-width: 768px) {
    .pt-flex-row.pt-edit2-cards > [class*="pt-w-"] { flex-basis: 100%; }               /* 1-up */
}

/* Capex tab: dropdowns fill their fixed-width columns so cols 1&3 (labels) and 2&4 (narrow numeric) line up - both Edit + Edit2. */
#tabs1-16 table.download_forms select { width: 100%; box-sizing: border-box; }

/* Valuations tab: inputs fill their fixed cells so narrow label columns line up across the top + comparable tables - both views. */
#tabs1-17 table.download_forms input[type="text"], #tabs1-17 table.download_forms select, #tabs1-17 table.download_forms textarea { width: 100%; box-sizing: border-box; }

/* Layout toggle (cards <-> classic) - centred in the header, understated so it doesn't shout. */
.btn-layout-toggle {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.30);
    color: #fff !important;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    z-index: 5;
    transition: background 0.1s ease;
}
.btn-layout-toggle:hover { background: rgba(255, 255, 255, 0.20); color: #fff !important; }
.btn-layout-toggle .icon-svg { width: 15px; height: 15px; }

/* Centered narrow wrapper - caps content at half the viewport, centred; goes
   full-width on small screens. Used by the error page; reusable for any
   single-card page that shouldn't sprawl across a wide monitor. */
.pt-center-50 {
    max-width: 50%;
    margin: 0 auto;
}

@media (max-width: 900px) {
    .pt-flex-row > [class*="pt-w-"] { flex-basis: 100%; }
    .pt-center-50 { max-width: 100%; }
}