/* =====================================================================
   NNIL Account System - "Ledger" theme for Bootstrap 5.3   (Nov 2026)
   ---------------------------------------------------------------------
   Palette   ledger green #0E5A3A | treasury #0A3D29 | brass #B8892B
             paper #F5F7F4 | hairline #DCE3DC | ink #1C2A23
   Type      IBM Plex Sans (falls back to Segoe UI), tabular figures for money
   Signature tables ruled like a ledger book; one brass rule under the top bar
   ===================================================================== */

:root {
    --nnil-green: #0E5A3A;
    --nnil-green-dark: #0A3D29;
    --nnil-green-soft: #E7F0EA;
    --nnil-brass: #B8892B;
    --nnil-brass-soft: #F6EEDC;
    --nnil-paper: #F5F7F4;
    --nnil-rule: #DCE3DC;
    --nnil-ink: #1C2A23;
    --nnil-muted: #5F6F66;

    --bs-body-font-family: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    --bs-body-font-size: .9375rem;
    --bs-body-line-height: 1.5;
    --bs-body-color: var(--nnil-ink);
    --bs-body-bg: var(--nnil-paper);
    --bs-secondary-color: var(--nnil-muted);
    --bs-border-color: var(--nnil-rule);
    --bs-border-radius: .5rem;
    --bs-border-radius-sm: .375rem;
    --bs-border-radius-lg: .625rem;
    --bs-primary: #0E5A3A;
    --bs-primary-rgb: 14, 90, 58;
    --bs-link-color: #0E5A3A;
    --bs-link-color-rgb: 14, 90, 58;
    --bs-link-hover-color: #0A3D29;
    --bs-link-hover-color-rgb: 10, 61, 41;
    --bs-focus-ring-color: rgba(184, 137, 43, .35);
}

body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6 { color: var(--nnil-ink); font-weight: 600; letter-spacing: -.01em; }
.text-muted { color: var(--nnil-muted) !important; }
::selection { background: var(--nnil-brass-soft); }

/* money and codes line up digit by digit */
.text-end, td.text-end, .nnil-amt, .font-monospace, table.dataTable td, .badge { font-variant-numeric: tabular-nums; }
.font-monospace { font-family: "IBM Plex Mono", Consolas, "Courier New", monospace; }

/* keyboard focus is always visible */
:focus-visible { outline: 2px solid var(--nnil-brass); outline-offset: 2px; }
.form-control:focus, .form-select:focus, .btn:focus-visible {
    border-color: var(--nnil-brass);
    box-shadow: 0 0 0 .2rem rgba(184, 137, 43, .22);
}

/* ------------------------------------------------------------ buttons */
.btn { font-weight: 500; }
.btn-primary {
    --bs-btn-bg: var(--nnil-green); --bs-btn-border-color: var(--nnil-green);
    --bs-btn-hover-bg: var(--nnil-green-dark); --bs-btn-hover-border-color: var(--nnil-green-dark);
    --bs-btn-active-bg: var(--nnil-green-dark); --bs-btn-active-border-color: var(--nnil-green-dark);
    --bs-btn-disabled-bg: var(--nnil-green); --bs-btn-disabled-border-color: var(--nnil-green);
}
.btn-outline-primary {
    --bs-btn-color: var(--nnil-green); --bs-btn-border-color: #9DBBA9;
    --bs-btn-hover-bg: var(--nnil-green); --bs-btn-hover-border-color: var(--nnil-green);
    --bs-btn-active-bg: var(--nnil-green-dark); --bs-btn-active-border-color: var(--nnil-green-dark);
}
.btn-outline-secondary {
    --bs-btn-color: var(--nnil-ink); --bs-btn-border-color: var(--nnil-rule);
    --bs-btn-hover-bg: #EEF2EE; --bs-btn-hover-color: var(--nnil-ink); --bs-btn-hover-border-color: #C7D1C8;
    --bs-btn-active-bg: #E3E9E4; --bs-btn-active-color: var(--nnil-ink);
    background: #fff;
}
.btn-success { --bs-btn-bg: #1D7A4C; --bs-btn-border-color: #1D7A4C; --bs-btn-hover-bg: #166039; --bs-btn-hover-border-color: #166039; }
.btn-warning { --bs-btn-bg: var(--nnil-brass); --bs-btn-border-color: var(--nnil-brass); --bs-btn-color: #fff; --bs-btn-hover-bg: #9C7322; --bs-btn-hover-border-color: #9C7322; --bs-btn-hover-color: #fff; }
.btn-outline-warning { --bs-btn-color: #8A6519; --bs-btn-border-color: #D9BE83; --bs-btn-hover-bg: var(--nnil-brass); --bs-btn-hover-border-color: var(--nnil-brass); --bs-btn-hover-color: #fff; }
.text-bg-warning { background-color: var(--nnil-brass-soft) !important; color: #7A5A17 !important; border: 1px solid #E6D3A6; }
.text-bg-success { background-color: var(--nnil-green-soft) !important; color: var(--nnil-green-dark) !important; border: 1px solid #C5DACB; }

/* ------------------------------------------------------------ forms */
.form-control, .form-select { border-color: #CDD6CF; }
.form-label { font-weight: 500; font-size: .875rem; margin-bottom: .3rem; }
.form-text { color: var(--nnil-muted); }
.input-group-text { background: #F0F3F0; border-color: #CDD6CF; color: var(--nnil-muted); }

/* ------------------------------------------------------------ app shell */
.nnil-navbar {
    background: var(--nnil-green-dark);
    border-bottom: 3px solid var(--nnil-brass);          /* the brass rule */
    --bs-navbar-color: rgba(255, 255, 255, .78);
    --bs-navbar-hover-color: #fff;
    --bs-navbar-active-color: #fff;
    padding-top: .35rem; padding-bottom: .35rem;
}
.nnil-navbar .navbar-brand { font-weight: 600; letter-spacing: -.01em; }
.nnil-navbar .navbar-brand img { height: 34px; width: auto; border-radius: 6px; background: #fff; padding: 2px; }
.nnil-navbar .navbar-brand small { display: block; font-size: .7rem; font-weight: 400; opacity: .72; line-height: 1.1; }
.nnil-navbar .nav-link { font-size: .9rem; border-radius: .375rem; padding-left: .65rem !important; padding-right: .65rem !important; }
.nnil-navbar .nav-link.active, .nnil-navbar .nav-link:hover { background: rgba(255, 255, 255, .08); }
.nnil-navbar .nav-link.active { box-shadow: inset 0 -2px 0 var(--nnil-brass); }
.nnil-navbar .dropdown-menu { max-height: 72vh; overflow-y: auto; border-color: var(--nnil-rule); box-shadow: 0 10px 30px rgba(10, 61, 41, .14); }
.dropdown-item { font-size: .9rem; }
.dropdown-item.active, .dropdown-item:active { background: var(--nnil-green); }

.nnil-main { max-width: 1480px; margin: 0 auto; }
.nnil-footer { color: var(--nnil-muted); font-size: .8rem; border-top: 1px solid var(--nnil-rule); margin-top: 2rem; }

/* page title: a short brass bar marks where you are */
.page-head h1 { font-size: 1.35rem; padding-left: .75rem; border-left: 4px solid var(--nnil-brass); line-height: 1.25; }
.page-head h1 + .text-muted, .page-head h1 + div { padding-left: calc(.75rem + 4px); }

/* cards: thin rules instead of heavy shadows */
.card { border-color: var(--nnil-rule); border-radius: var(--bs-border-radius-lg); }
.card.shadow-sm { box-shadow: 0 1px 2px rgba(16, 40, 28, .05) !important; }
.card-header { background: #fff; font-weight: 600; border-bottom-color: var(--nnil-rule); }
.card-footer { border-top-color: var(--nnil-rule); }

/* ------------------------------------------------------------ ledger tables */
.table { --bs-table-color: var(--nnil-ink); --bs-table-border-color: #E4EAE5; --bs-table-hover-bg: #F1F6F2; font-size: .9rem; }
.table > thead > tr > th, table.dataTable > thead > tr > th {
    background: #FBFCFA; color: var(--nnil-muted); font-weight: 600; font-size: .8125rem;
    border-bottom: 2px solid var(--nnil-green) !important; white-space: nowrap; vertical-align: bottom;
}
.table > tbody > tr > td { border-bottom-color: #E9EEEA; padding-top: .55rem; padding-bottom: .55rem; }
.table > tbody > tr:last-child > td { border-bottom-color: var(--nnil-rule); }
table.dataTable > tbody > tr.selected > *, .table > tbody > tr.nnil-selected > * { box-shadow: inset 3px 0 0 var(--nnil-brass); background: var(--nnil-brass-soft); }
table.dataTable td.dt-actions, table.dataTable th.dt-actions { white-space: nowrap; width: 1%; }

/* DataTables controls */
div.dt-container { font-size: .875rem; }
div.dt-container .dt-search input { min-width: 240px; border-radius: .375rem; }
div.dt-container .dt-paging .dt-paging-button.current,
div.dt-container .dt-paging .page-item.active .page-link { background: var(--nnil-green) !important; border-color: var(--nnil-green) !important; color: #fff !important; }
div.dt-container .page-link { color: var(--nnil-green); }
@media (max-width: 575.98px) {
    div.dt-container .dt-search input { min-width: 0; width: 100%; }
    div.dt-container .dt-length, div.dt-container .dt-search { text-align: left !important; }
}

/* ------------------------------------------------------------ dashboard */
.nnil-tile { height: 100%; }
.nnil-tile .card-body { padding: 1.1rem 1.15rem; }
.nnil-tile .tile-icon {
    width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
    background: var(--nnil-green-soft); color: var(--nnil-green); font-size: 1.2rem;
}
.nnil-tile h2 { font-size: 1rem; }
.nnil-tile .list-group-item { border: 0; padding: .28rem 0; background: transparent; }
.nnil-tile .list-group-item a { text-decoration: none; color: var(--nnil-ink); }
.nnil-tile .list-group-item a:hover { color: var(--nnil-green); text-decoration: underline; text-underline-offset: 3px; }
.nnil-tile .bi-chevron-right { color: var(--nnil-brass) !important; font-size: .75rem; }

/* ------------------------------------------------------------ sign-in */
.nnil-login-bg {
    min-height: 100vh;
    background:
        repeating-linear-gradient(180deg, transparent 0 31px, rgba(255, 255, 255, .06) 31px 32px),
        linear-gradient(90deg, transparent 0 72px, rgba(184, 137, 43, .5) 72px 74px, transparent 74px),
        var(--nnil-green-dark);
}
.nnil-login-card { max-width: 430px; width: 100%; border: 0; border-top: 4px solid var(--nnil-brass); box-shadow: 0 24px 60px rgba(0, 0, 0, .28) !important; }
.nnil-login-card .logo { height: 76px; width: auto; }

/* ------------------------------------------------------------ edit forms */
.nnil-edit .card-header { border-bottom: 2px solid var(--nnil-green); }
.nnil-hint { border: 1px dashed #C4CEC6; background: transparent; }

/* ------------------------------------------------------------ toasts */
.nnil-toast { color: #fff; min-width: 280px; border-radius: .5rem; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); }
.nnil-toast .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }
.nnil-toast-success { background: #1D7A4C; }
.nnil-toast-info    { background: var(--nnil-green-dark); }
.nnil-toast-warning { background: #8A6519; }
.nnil-toast-danger  { background: #A3271E; }

/* UpdatePanel busy indicator: a brass line sweeping under the top bar */
.nnil-busy { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 2000;
             background: linear-gradient(90deg, transparent, var(--nnil-brass), transparent);
             background-size: 50% 100%; background-repeat: no-repeat; animation: nnil-busy 1s linear infinite; }
@keyframes nnil-busy { from { background-position: -50% 0; } to { background-position: 150% 0; } }

/* ------------------------------------------------------------ G/L reports menu */
.nnil-gl-search { min-width: 240px; }
.gl-item .fw-semibold { color: var(--nnil-ink); }
.gl-item:hover .fw-semibold { color: var(--nnil-green); }
.list-group-item-action:hover { background: #F4F8F5; }

/* ------------------------------------------------------------ audit notifications */
.nnil-bell .badge { font-size: .62rem; vertical-align: top; }
.nnil-notif-menu { width: min(380px, 92vw); max-height: 70vh; overflow-y: auto; }
.nnil-notif-menu .dropdown-item { white-space: normal; }
.nnil-unread, .table > tbody > tr.nnil-unread > * { background: var(--nnil-brass-soft); }
.nnil-comment-text { white-space: pre-wrap; }

/* ------------------------------------------------------------ team chat */
.nnil-chat-btn { position: fixed; left: 1rem; bottom: 1rem; z-index: 1040; background: var(--nnil-green-dark); border-color: var(--nnil-green-dark); }
.nnil-chat { --bs-offcanvas-width: 380px; }
.nnil-chat-msgs { background: var(--nnil-paper); display: flex; flex-direction: column; gap: .5rem; }
.nnil-msg { max-width: 85%; padding: .45rem .7rem; border-radius: .75rem; box-shadow: 0 1px 1px rgba(0, 0, 0, .05); }
.nnil-msg.theirs { align-self: flex-start; background: #fff; border: 1px solid var(--nnil-rule); border-top-left-radius: .2rem; }
.nnil-msg.mine { align-self: flex-end; background: var(--nnil-green); color: #fff; border-top-right-radius: .2rem; }
.nnil-msg-from { font-size: .72rem; font-weight: 600; color: var(--nnil-green); }
.nnil-msg-body { white-space: pre-wrap; word-wrap: break-word; }
.nnil-msg-at { font-size: .68rem; opacity: .65; text-align: right; margin-top: .15rem; }
#nnilChatText { resize: none; }

/* ------------------------------------------------------------ starter.aspx entry grids */
.nnil-entry .nnil-sign { width: 3.2rem; }
.nnil-entry .nnil-code { min-width: 12rem; }
.nnil-entry .nnil-amt  { min-width: 7.5rem; }
.nnil-entry .nnil-dur  { width: 5rem; }
.nnil-entry > thead > tr > th { border-bottom-width: 1px !important; }
.nnil-passport { max-width: 160px; max-height: 190px; object-fit: cover; }
.nnil-thumb { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; }
.nav-tabs { --bs-nav-tabs-link-active-color: var(--nnil-green-dark); --bs-nav-tabs-link-active-border-color: var(--nnil-rule) var(--nnil-rule) #fff; }
.nav-tabs .nav-link { color: var(--nnil-muted); }
.nav-tabs .nav-link.active { font-weight: 600; box-shadow: inset 0 2px 0 var(--nnil-brass); }

/* ------------------------------------------------------------ site search box */
.nnil-nav-search { min-width: 240px; }
.nnil-nav-search .input-group-text { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .25); color: rgba(255, 255, 255, .8); }
.nnil-nav-search .form-control { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .25); color: #fff; }
.nnil-nav-search .form-control::placeholder { color: rgba(255, 255, 255, .6); }
.nnil-nav-search .form-control:focus { background: #fff; color: var(--nnil-ink); }
.nnil-bar-search { order: 0; }
.nnil-bar-search .form-control { width: 200px; background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .3); color: #fff; }
.nnil-bar-search .form-control::placeholder { color: rgba(255, 255, 255, .6); }
.nnil-bar-search .form-control:focus { background: #fff; color: var(--nnil-ink); }
@media (max-width: 575.98px) { .nnil-bar-search { width: 100%; order: 5; } .nnil-bar-search .form-control { width: 100%; } }

/* =====================================================================
   OLDER PAGES (html.nnil-legacy) - shared top bar + paper sheet + ledger grids.
   Inline colours from the old designer (brown/orange grids, red links) are
   overridden so every page reads as one system. Undo: LegacySkin=false.
   ===================================================================== */
html.nnil-legacy body { background: var(--nnil-paper); margin: 0; padding: 0 0 2rem; }

/* shared top bar (built by js/site.js) */
.nnil-legacy-bar {
    position: sticky; top: 0; z-index: 1030;
    display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
    background: var(--nnil-green-dark); color: #fff; border-bottom: 3px solid var(--nnil-brass);
    padding: .5rem 1rem;
}
.nnil-legacy-bar a.brand { color: #fff; text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; gap: .5rem; margin-right: auto; }
.nnil-legacy-bar a.brand img { height: 30px; border-radius: 5px; background: #fff; padding: 2px; }
.nnil-legacy-bar .page-name { color: rgba(255, 255, 255, .72); font-weight: 400; font-size: .9rem; }
.nnil-legacy-bar .btn { --bs-btn-padding-y: .2rem; --bs-btn-padding-x: .6rem; --bs-btn-font-size: .85rem;
                        color: #fff; border-color: rgba(255, 255, 255, .35); background: transparent; }
.nnil-legacy-bar .btn:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .6); color: #fff; }

/* the page content sits on a sheet */
html.nnil-legacy form#form1, html.nnil-legacy body > form {
    max-width: 1400px; margin: 1.25rem auto 0; background: #fff;
    border: 1px solid var(--nnil-rule); border-radius: .625rem; padding: 1.25rem 1.5rem;
    box-shadow: 0 1px 2px rgba(16, 40, 28, .05);
}
@media (max-width: 767.98px) {
    html.nnil-legacy form#form1, html.nnil-legacy body > form { margin: .5rem; padding: .85rem; border-radius: .5rem; }
}
html.nnil-legacy .container { max-width: 100%; padding: 0; }
html.nnil-legacy [style*="width"] { max-width: 100%; }
html.nnil-legacy img { max-width: 100%; height: auto; }
html.nnil-legacy .nnil-hidden-brand { display: none !important; }   /* old logo + company name: now in the top bar */

/* old headings / status labels */
html.nnil-legacy span[style*="color:#009933"], html.nnil-legacy span[style*="color:#009900"],
html.nnil-legacy span[style*="color:Green"] { color: var(--nnil-green) !important; font-weight: 600; }

/* inputs and buttons */
html.nnil-legacy input[type=text], html.nnil-legacy input[type=password], html.nnil-legacy input[type=date],
html.nnil-legacy input[type=number], html.nnil-legacy input[type=email], html.nnil-legacy select, html.nnil-legacy textarea {
    border: 1px solid #CDD6CF; border-radius: .375rem; padding: .32rem .55rem; max-width: 100%;
    font: inherit; font-size: .9rem; background: #fff; color: var(--nnil-ink);
}
html.nnil-legacy input[type=text]:focus, html.nnil-legacy input[type=password]:focus,
html.nnil-legacy select:focus, html.nnil-legacy textarea:focus { outline: none; border-color: var(--nnil-brass); box-shadow: 0 0 0 .2rem rgba(184, 137, 43, .22); }
html.nnil-legacy input[type=submit], html.nnil-legacy input[type=button] {
    border: 1px solid var(--nnil-green) !important; background: var(--nnil-green) !important; color: #fff !important;
    border-radius: .375rem; padding: .36rem .95rem !important; margin: 2px; cursor: pointer; max-width: 100%;
    font: inherit; font-size: .875rem; font-weight: 500; height: auto !important; width: auto !important;
}
html.nnil-legacy input[type=submit]:hover, html.nnil-legacy input[type=button]:hover { background: var(--nnil-green-dark) !important; }
html.nnil-legacy input[type=submit]:disabled, html.nnil-legacy input[type=button]:disabled { opacity: .5; cursor: not-allowed; }
html.nnil-legacy input[type=submit][value^="Exit"], html.nnil-legacy input[type=submit][value^="Abandon"],
html.nnil-legacy input[type=button][value^="Exit"], html.nnil-legacy input[type=button][value^="Abandon"] {
    background: #fff !important; color: var(--nnil-ink) !important; border-color: #C7D1C8 !important;
}
/* old red "Exit" hyperlinks become quiet link-buttons */
html.nnil-legacy a[href]:not(.btn):not(.brand)[style*="color:#CC0000"],
html.nnil-legacy a[href]:not(.btn):not(.brand)[style*="color:#993333"] {
    color: var(--nnil-green) !important; font-weight: 500; text-decoration: none;
    border: 1px solid #C7D1C8; border-radius: .375rem; padding: .25rem .7rem; display: inline-block; margin: 2px;
}

/* old GridViews: ledger look, whatever colours were set in the designer */
html.nnil-legacy table.nnil-grid { font-size: .875rem; border-collapse: collapse !important; border: 1px solid var(--nnil-rule) !important; background: #fff !important; width: auto; }
html.nnil-legacy table.nnil-grid th, html.nnil-legacy table.nnil-grid td { padding: .4rem .6rem !important; vertical-align: middle; border-color: #E9EEEA !important; }
html.nnil-legacy table.nnil-grid > thead > tr, html.nnil-legacy table.nnil-grid > thead > tr > th,
html.nnil-legacy table.nnil-grid > tbody > tr:first-child > th {
    background: #FBFCFA !important; color: var(--nnil-muted) !important; font-weight: 600 !important;
    border-bottom: 2px solid var(--nnil-green) !important;
}
html.nnil-legacy table.nnil-grid th a { color: var(--nnil-green) !important; }
html.nnil-legacy table.nnil-grid > tbody > tr { background: #fff !important; color: var(--nnil-ink) !important; }
html.nnil-legacy table.nnil-grid > tbody > tr:nth-child(even) { background: #FAFBF9 !important; }
html.nnil-legacy table.nnil-grid > tbody > tr:hover { background: #F1F6F2 !important; }
html.nnil-legacy table.nnil-grid > tbody > tr > td { border-bottom: 1px solid #E9EEEA !important; }
html.nnil-legacy table.nnil-grid a { color: var(--nnil-green) !important; font-weight: 500; }
html.nnil-legacy table.nnil-grid > caption { caption-side: top; color: var(--nnil-ink); font-weight: 600; padding: .25rem 0 .5rem; }
/* GridView "selected row" -> brass marker */
html.nnil-legacy table.nnil-grid > tbody > tr[style*="font-weight:bold"] { background: var(--nnil-brass-soft) !important; box-shadow: inset 3px 0 0 var(--nnil-brass); }
/* pager rows */
html.nnil-legacy table.nnil-grid tr td table td { border: 0 !important; }
html.nnil-legacy table.nnil-grid tr td table td a, html.nnil-legacy table.nnil-grid tr td table td span {
    display: inline-block; min-width: 2rem; padding: .15rem .5rem; border-radius: .3rem; text-align: center;
}
html.nnil-legacy table.nnil-grid tr td table td span { background: var(--nnil-green); color: #fff; }
/* footer totals */
html.nnil-legacy table.nnil-grid > tfoot > tr, html.nnil-legacy table.nnil-grid > tbody > tr:last-child[style*="background-color:Yellow"] {
    background: var(--nnil-green-soft) !important; color: var(--nnil-green-dark) !important; font-weight: 600;
}
.nnil-scroll { -webkit-overflow-scrolling: touch; margin-bottom: .75rem; }

/* old TreeView menus (admin.aspx, gl.aspx, payroll.aspx ...) */
html.nnil-legacy a[id*="TreeView"] { color: var(--nnil-ink) !important; text-decoration: none; font-size: .95rem !important; padding: .15rem .25rem; border-radius: .25rem; }
html.nnil-legacy a[id*="TreeView"]:hover { background: var(--nnil-green-soft); color: var(--nnil-green) !important; }

/* ReportViewer 2010 breaks with Bootstrap's border-box sizing */
[id*="ReportViewer"], [id*="ReportViewer"] * { box-sizing: content-box; }

/* ------------------------------------------------------------ user trail (usertrail.aspx) */
.trail-kpi { display: flex; flex-direction: column; gap: .1rem; height: 100%; padding: .7rem .9rem; text-decoration: none; color: var(--nnil-ink);
    border-left: 3px solid var(--nnil-green); transition: background .15s, box-shadow .15s; }
a.trail-kpi:hover, a.trail-kpi:focus-visible { background: #F4F8F5; box-shadow: 0 2px 8px rgba(16, 40, 28, .08); color: var(--nnil-ink); }
.trail-kpi-static { border-left-color: #9DB3A4; }
.trail-kpi-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--nnil-muted); font-weight: 600; }
.trail-kpi-value { font-size: 1.6rem; font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; }
.trail-kpi-note { font-size: .75rem; color: var(--nnil-muted); }
.trail-kpi-alert { border-left-color: #A3271E; }
.trail-kpi-alert .trail-kpi-value { color: #A3271E; }
.trail-kpi-warn { border-left-color: var(--nnil-brass); }
.trail-kpi-warn .trail-kpi-value { color: #8A6519; }

.trail-cat { font-weight: 500; border: 1px solid transparent; white-space: nowrap; }
.trail-cat-signin, .trail-cat-signout { background: #E8F0FA; color: #1F4E86; border-color: #C9DAF0; }
.trail-cat-create   { background: var(--nnil-green-soft); color: var(--nnil-green-dark); border-color: #C5DACB; }
.trail-cat-update   { background: var(--nnil-brass-soft); color: #7A5A17; border-color: #E6D3A6; }
.trail-cat-delete   { background: #FBEAE8; color: #A3271E; border-color: #F0C9C4; }
.trail-cat-approval { background: #EEE9F7; color: #4F3A86; border-color: #D8CFEE; }
.trail-cat-security { background: #2B2F2C; color: #fff; }
.trail-cat-report, .trail-cat-pageview, .trail-cat-system, .trail-cat-activity { background: #F0F3F0; color: var(--nnil-muted); border-color: #DDE4DE; }

.trail-table td { vertical-align: top; }
.trail-table tr.trail-failed > td { background: #FDF3F2; }
.trail-table tr.trail-failed > td:first-child { box-shadow: inset 3px 0 0 #A3271E; }
.trail-table tr.trail-delete > td:first-child { box-shadow: inset 3px 0 0 #D98A82; }
.trail-details { max-width: 42rem; white-space: pre-wrap; word-break: break-word; }
.trail-howto li { margin-bottom: .35rem; }

@media print {
    .trail-table { font-size: 8.5pt; }
    .trail-table tr { break-inside: avoid; }
    .trail-cat { border: 1px solid #999 !important; background: #fff !important; color: #000 !important; }
}

/* ------------------------------------------------------------ print & motion */
@media print {
    .nnil-navbar, .nnil-legacy-bar, .nnil-chat-btn, .nnil-chat, .nnil-footer, .toast-container, .btn, div.dt-container .dt-search, div.dt-container .dt-length, div.dt-container .dt-paging { display: none !important; }
    body, html.nnil-legacy body { background: #fff !important; }
    .card, html.nnil-legacy form#form1 { border: 0 !important; box-shadow: none !important; }
}
@media (prefers-reduced-motion: reduce) {
    .nnil-busy { animation: none; }
    *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* ------------------------------------------------------------ breadcrumbs (App_Code/NavMap.vb) */
.nnil-crumbs { margin: -.25rem 0 .75rem; font-size: .82rem; }
.nnil-crumbs .breadcrumb-item a { color: var(--nnil-green); text-decoration: none; }
.nnil-crumbs .breadcrumb-item a:hover { text-decoration: underline; text-underline-offset: 3px; }
.nnil-crumbs .breadcrumb-item.active { color: var(--nnil-ink); font-weight: 500; }
.nnil-bar-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; margin: 0; padding: 0; font-size: .85rem; }
.nnil-bar-crumbs li { color: rgba(255, 255, 255, .72); }
.nnil-bar-crumbs li + li::before { content: "\203A"; padding: 0 .4rem; color: rgba(255, 255, 255, .45); }
.nnil-bar-crumbs li[aria-current] { color: #fff; font-weight: 500; }
.nnil-bar-crumbs a { color: rgba(255, 255, 255, .85); text-decoration: none; }
.nnil-bar-crumbs a:hover { color: #fff; text-decoration: underline; }
.nnil-legacy-bar .nnil-bar-crumbs { margin-right: auto; }
@media print { .nnil-crumbs, .nnil-ai-btn, .nnil-ai { display: none !important; } }

/* ------------------------------------------------------------ AI assistant */
.nnil-ai-btn { position: fixed; left: 1rem; bottom: 4.25rem; z-index: 1040; background: var(--nnil-brass); border-color: var(--nnil-brass); color: #fff; }
.nnil-ai-btn:hover, .nnil-ai-btn:focus-visible { background: #9C7322; border-color: #9C7322; color: #fff; }
.nnil-ai { --bs-offcanvas-width: 460px; }
.nnil-ai .nnil-msg { max-width: 92%; }
.nnil-ai-answer p { margin-bottom: .4rem; }
.nnil-ai-answer ul, .nnil-ai-answer ol { padding-left: 1.2rem; margin-bottom: .4rem; }
.nnil-ai-answer code { color: var(--nnil-green-dark); background: var(--nnil-green-soft); padding: 0 .2rem; border-radius: .2rem; }
.nnil-ai-table { font-size: .8rem; margin: .25rem 0 .5rem; background: #fff; }
.nnil-ai-table th { white-space: nowrap; }
.nnil-ai-steps summary { cursor: pointer; }
.nnil-ai-sql { font-size: .72rem; white-space: pre-wrap; background: #F0F3F0; border-radius: .3rem; padding: .35rem .5rem; max-height: 10rem; overflow: auto; }
.nnil-ai-empty .btn { white-space: normal; }
.nnil-ai-typing span { display: inline-block; width: .4rem; height: .4rem; margin-right: .15rem; border-radius: 50%; background: var(--nnil-muted); animation: nnil-dot 1s infinite ease-in-out; }
.nnil-ai-typing span:nth-child(2) { animation-delay: .15s; }
.nnil-ai-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes nnil-dot { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.trail-cat-ai { background: #FBF4E4; color: #7A5A17; border-color: #E6D3A6; }
.nnil-commentary { border-left: 3px solid var(--nnil-brass); }

/* voucher risk checks (approve.aspx, riskreview.aspx) */
.nnil-risk-flag { border-left: 3px solid #C4CEC6; padding: .3rem .6rem; margin-bottom: .35rem; background: #FAFBFA; border-radius: 0 .3rem .3rem 0; font-size: .875rem; }
.nnil-risk-flag .nnil-risk-badge { font-size: .65rem; margin-right: .25rem; }
.nnil-risk-high { border-left-color: #A3271E; } .nnil-risk-high .nnil-risk-badge { background: #A3271E; }
.nnil-risk-medium { border-left-color: var(--nnil-brass); } .nnil-risk-medium .nnil-risk-badge { background: var(--nnil-brass); }
.nnil-risk-low { border-left-color: #9DB3A4; } .nnil-risk-low .nnil-risk-badge { background: #7D8C82; }
.nnil-risk-line { padding-left: .5rem; border-left: 3px solid #C4CEC6; margin-bottom: .15rem; cursor: help; }
.nnil-risk-line.nnil-risk-high { border-left-color: #A3271E; }
.nnil-risk-line.nnil-risk-medium { border-left-color: var(--nnil-brass); }
.nnil-legacy-bar.has-crumbs a.brand { margin-right: .75rem; }
@media (max-width: 767.98px) { .nnil-legacy-bar.has-crumbs a.brand { margin-right: auto; } }

/* top bar: never push the bell and user menu off the screen on laptop widths */
@media (min-width: 1200px) {
    .nnil-navbar .navbar-collapse { min-width: 0; }
    .nnil-navbar .navbar-nav.me-auto { flex-wrap: wrap; min-width: 0; }
    .nnil-navbar .navbar-nav:not(.me-auto) { flex-shrink: 0; }
    .nnil-navbar .nav-link { padding-left: .5rem !important; padding-right: .5rem !important; }
    .nnil-nav-search { min-width: 0; width: 200px; flex-shrink: 1; }
}
@media (min-width: 1200px) and (max-width: 1399.98px) {
    .nnil-navbar .navbar-brand small { display: none; }
    .nnil-nav-search { width: 160px; }
}

/* ---------------------------------------------------------------- cash & bank (round 8) */
.nnil-kpi-ok { border-left-color: var(--nnil-green); }
.nnil-kpi-ok .trail-kpi-value { color: var(--nnil-green); }
/* bank reconciliation: matching lists */
.nnil-rec-list { max-height: 460px; overflow-y: auto; border: 1px solid var(--nnil-rule); border-radius: .375rem; }
.nnil-rec-table { margin-bottom: 0; font-size: .85rem; }
.nnil-rec-table thead th { position: sticky; top: 0; background: #fff; z-index: 1; box-shadow: inset 0 -1px 0 var(--nnil-rule); }
.nnil-rec-table tbody tr { cursor: pointer; }
.nnil-rec-table tbody tr:hover { background: var(--nnil-paper); }
.nnil-rec-table tr.nnil-after { color: #8A968F; }
.nnil-rec-bar { position: sticky; bottom: 0; z-index: 5; background: #fff; border-top: 2px solid var(--nnil-green); padding: .5rem .75rem; box-shadow: 0 -4px 12px rgba(0,0,0,.06); }
/* reconciliation / liquidity statements */
.nnil-recstmt td { border-bottom-color: transparent; padding-top: .3rem; padding-bottom: .3rem; }
.nnil-recstmt tr.nnil-subtotal td { border-top: 1px solid var(--nnil-ink); }
.nnil-recstmt tr.nnil-total td { border-top: 1px solid var(--nnil-ink); border-bottom: 3px double var(--nnil-ink); font-weight: 700; }
.nnil-liq-table tr.nnil-group td { background: var(--nnil-paper); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--nnil-green-dark); }
.nnil-liq-table tr.nnil-subtotal td { border-top: 1px solid var(--nnil-ink); font-weight: 600; }
/* 30-day trend */
.nnil-trend { width: 100%; height: 140px; display: block; }
.nnil-trend-area { fill: var(--nnil-green-soft); stroke: none; }
.nnil-trend-line { fill: none; stroke: var(--nnil-green); stroke-width: 2; vector-effect: non-scaling-stroke; }
/* printable reconciliation statement */
.nnil-print-sheet { max-width: 820px; }
.nnil-signatures { display: flex; gap: 2rem; margin-top: 3rem; }
.nnil-signatures > div { flex: 1; }
.nnil-sign-line { border-top: 1px solid var(--nnil-ink); padding-top: .25rem; margin-top: 2.5rem; font-size: .85rem; }
@media print {
    .nnil-print-sheet { box-shadow: none !important; border: 0 !important; max-width: none; }
    .nnil-rec-bar { display: none; }
    .nnil-trend-area { fill: #E7F0EA; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------------------------------------------------------------- liquidity planning (round 11) */
.nnil-liq-alerts { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: .5rem; }
.nnil-liq-alert { display: flex; gap: .65rem; align-items: flex-start; padding: .65rem .85rem; border-radius: .5rem; border: 1px solid var(--nnil-rule); border-left-width: 4px; background: #fff; }
.nnil-liq-alert > i { font-size: 1.1rem; line-height: 1.3; }
.nnil-liq-alert.danger  { border-left-color: #A3271E; background: #FBEDEB; } .nnil-liq-alert.danger > i  { color: #A3271E; }
.nnil-liq-alert.warning { border-left-color: var(--nnil-brass); background: var(--nnil-brass-soft); } .nnil-liq-alert.warning > i { color: #8A6519; }
.nnil-liq-alert.info    { border-left-color: #2F6690; background: #EEF4F9; } .nnil-liq-alert.info > i    { color: #2F6690; }
.nnil-liq-alert.ok      { border-left-color: var(--nnil-green); background: var(--nnil-green-soft); } .nnil-liq-alert.ok > i { color: var(--nnil-green); }
/* forecast chart */
.nnil-fc { width: 100%; height: auto; max-height: 260px; display: block; }
.nnil-fc-line { fill: none; stroke: var(--nnil-green); stroke-width: 2.5; }
.nnil-fc-dot { fill: #fff; stroke: var(--nnil-green); stroke-width: 2; }
.nnil-fc-dot.low { stroke: var(--nnil-brass); fill: var(--nnil-brass-soft); }
.nnil-fc-dot.neg { stroke: #A3271E; fill: #FBEDEB; }
.nnil-fc-zero { stroke: #9AA79F; stroke-width: 1; }
.nnil-fc-min { stroke: var(--nnil-brass); stroke-width: 1.5; stroke-dasharray: 6 4; }
.nnil-fc-label { font-size: 11px; fill: #6B7A71; font-family: inherit; }
.nnil-fc-key { display: inline-block; width: 18px; height: 0; vertical-align: middle; margin-right: .25rem; border-top: 3px solid var(--nnil-green); }
.nnil-fc-key.min { border-top: 2px dashed var(--nnil-brass); }
.nnil-fc-neg { color: #A3271E; }
.nnil-fc-low { color: #8A6519; }
.nnil-fc-table td, .nnil-fc-table th { white-space: nowrap; }
/* funds by bank */
.nnil-conc-row { display: grid; grid-template-columns: minmax(140px, 1.2fr) 2fr auto; gap: .75rem; align-items: center; padding: .3rem 0; border-bottom: 1px solid var(--nnil-rule); }
.nnil-conc-row:last-of-type { border-bottom: 0; }
.nnil-conc-bar { position: relative; height: 10px; border-radius: 5px; background: #EDF1EE; }
.nnil-conc-bar > span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; background: var(--nnil-green); }
.nnil-conc-bar > span.over { background: #A3271E; }
.nnil-conc-bar > i { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--nnil-brass); }
.nnil-conc-val { text-align: right; white-space: nowrap; }
@media print {
    .nnil-liq-alert { break-inside: avoid; }
    .nnil-fc-line, .nnil-conc-bar > span { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
