@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700&display=swap");
/*
  SWIFTDOX admin theme on Bootstrap 4.4 (loaded last: after bootstrap, plugins, css/coc.css and the chamber style.css).
  Same look as the swiftdox-v2 client portal (its css/theme.css): light slate canvas, white cards, SWIFTDOX blue,
  dark blue sidebar. Bootstrap 4 has no component CSS variables, so components are restyled directly.
  No build step: plain CSS variables.
*/
:root {
  --sd-brand: #2d6cb5;
  --sd-brand-dark: #1f4f8a;
  --sd-brand-tint: #eaf1fa;
  --sd-brand-line: #c5d6ec;
  --sd-ink: #1d2733;
  --sd-muted: #5d6b7a;
  --sd-faint: #8a96a3;
  --sd-line: #e3e8ee;
  --sd-canvas: #f3f5f8;
  --sd-panel: #fafbfd;
  --sd-ok: #1f7a4d;
  --sd-ok-tint: #e7f5ee;
  --sd-ok-line: #cbe8d8;
  --sd-warn: #9a6700;
  --sd-warn-ink: #5c4a00;
  --sd-warn-tint: #fff6e0;
  --sd-warn-line: #f3e0b0;
  --sd-bad: #8d2b2e;
  --sd-bad-ink: #6b1f22;
  --sd-bad-tint: #fbeeee;
  --sd-bad-line: #f0d3d4;
  --sd-nav: #7a1f2b; /* burgundy, from the logo: tells the admin portal apart from the blue client portal */
  --sd-nav-deep: #4a1018;
  --sd-radius: 10px;
  --sd-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 16px rgba(16, 24, 40, .04);
  --sd-shadow-pop: 0 4px 12px rgba(16, 24, 40, .08), 0 16px 40px rgba(16, 24, 40, .12);
  --sd-focus: 0 0 0 .2rem rgba(45, 108, 181, .2);
  --sd-sidebar: 16rem;
  --sd-rail: 4.5rem;
  --sd-font: Roboto, "Helvetica Neue", Arial, sans-serif;

  /* chamber colours used by css/coc.css (set per chamber in config/{coc}/style.css): one SWIFTDOX palette for every chamber */
  --coc-primary: var(--sd-brand-dark);
  --coc-accent: var(--sd-brand);
  --coc-accent-light: var(--sd-brand-tint);
  --coc-accent2: var(--sd-ok);
  --coc-accent2-light: var(--sd-ok-tint);
  --success: var(--sd-ok);
  --danger: var(--sd-bad);
  --pending: #c98a00;
  --draft: var(--sd-faint);
  --prime-green: var(--sd-ok);
  /* CanvasJS colour set (dashboard2.js reads these at load) */
  --chart-color-1: #2d6cb5;
  --chart-color-2: #3fa7c4;
  --chart-color-3: #e0a020;
  --chart-color-4: #1f7a4d;
  --chart-color-5: #7258cc;
  --chart-color-6: #c2185b;
}

body { background: var(--sd-canvas); color: var(--sd-ink); font-family: var(--sd-font); font-size: .9375rem; line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-weight: 600; letter-spacing: -.01em; color: inherit; }
a, [data-track] { color: var(--sd-brand); text-decoration: none; }
a:hover, [data-track]:hover { color: var(--sd-brand-dark); text-decoration: underline; }
a.btn:hover, a.dropdown-item:hover, a.list-group-item:hover, a.nav-link:hover { text-decoration: none; }
.text-muted { color: var(--sd-muted) !important; }
.text-primary { color: var(--sd-brand) !important; }
.text-success { color: var(--sd-ok) !important; }
.text-danger { color: var(--sd-bad) !important; }
.text-warning { color: var(--sd-warn) !important; }
.bg-primary { background-color: var(--sd-brand) !important; }
.bg-light { background-color: var(--sd-panel) !important; }
.font-weight-medium { font-weight: 500 !important; }
.eyebrow { color: var(--sd-faint); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.sd-lh-sm { line-height: 1.25; }
hr { border-color: var(--sd-line); }
::selection { background: var(--sd-brand-tint); }

/* ---------------- layout: sidebar + top bar (templates/sideBar.tpl, topBar.tpl; js/layout.js) ---------------- */
.sd-sidebar {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 1040; width: var(--sd-sidebar);
  display: flex; flex-direction: column; color: #fff;
  background: linear-gradient(180deg, var(--sd-nav), var(--sd-nav-deep));
  transition: width .2s, transform .2s;
}
.sd-sidebar a { color: inherit; text-decoration: none; }
.sd-brand { height: 4rem; flex: none; display: flex; align-items: center; padding: 0 1.25rem; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.sd-brand img { height: 1.75rem; width: auto; }
.sd-brand .sd-brand-icon { display: none; height: 2rem; }
/* chamber name in the top bar (templates/topBar.tpl) */
.sd-chamber { display: flex; align-items: center; gap: .6rem; flex: 0 1 auto; min-width: 0; max-width: 36rem; padding-right: .75rem; margin-right: .25rem; border-right: 1px solid var(--sd-line); font-weight: 600; color: var(--sd-ink); }
.sd-chamber img { flex: none; border-radius: 4px; }
.sd-chamber img.sd-chamber-logo { height: 2.25rem; width: auto; max-width: 9rem; object-fit: contain; border-radius: 0; }
.sd-chamber-tag { flex: none; padding: 1px 8px; border-radius: 999px; background: var(--sd-brand-tint); color: var(--sd-brand-dark); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
/*chamber switcher (topBar.tpl; same as the client company switcher). One-chamber users get the plain div.*/
.sd-chamber .sd-switcher-btn { display: flex; align-items: center; gap: .6rem; min-width: 0; max-width: 100%; padding: .3rem .6rem; margin-left: -.6rem; border: 1px solid transparent; border-radius: 8px; background: transparent; color: inherit; font-weight: 600; text-align: left; }
.sd-chamber button.sd-switcher-btn:hover, .sd-chamber .sd-switcher-btn[aria-expanded="true"] { background: var(--sd-canvas); border-color: var(--sd-line); }
.sd-chamber button.sd-switcher-btn:focus { outline: none; box-shadow: 0 0 0 .15rem var(--sd-brand-line); }
.sd-switcher-pill { flex: none; display: inline-flex; align-items: center; gap: .3rem; height: 20px; padding: 0 10px; border: 1px solid var(--sd-brand-line); border-radius: 999px; background: var(--sd-brand-tint); color: var(--sd-brand-dark); font-size: 11.5px; font-weight: 600; line-height: 1; white-space: nowrap; }
.sd-switcher-btn:hover .sd-switcher-pill, .sd-switcher-btn[aria-expanded="true"] .sd-switcher-pill { background: var(--sd-brand); border-color: var(--sd-brand); color: #fff; }
.sd-switcher-menu { width: 22rem; max-width: calc(100vw - 2rem); max-height: 70vh; overflow-y: auto; }
.sd-switcher-menu .dropdown-item { display: flex; align-items: center; font-size: .875rem; } /*no .d-flex: its !important would beat .d-none from the filter*/
.sd-switcher-menu .dropdown-item.active, .sd-switcher-menu .dropdown-item:active { background: var(--sd-brand-tint); color: var(--sd-brand-dark); font-weight: 600; }
.sd-nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: .75rem; }
.sd-nav ul { list-style: none; margin: 0 0 .75rem; padding: 0 0 .75rem; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.sd-nav ul:last-child { border-bottom: 0; }
.sd-nav-label { padding: .25rem .75rem .4rem; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .45); }
.sd-nav-link {
  position: relative; display: flex; align-items: center; gap: .75rem; padding: .5rem .75rem; margin-bottom: 2px;
  border-radius: 6px; font-size: .875rem; font-weight: 500; color: rgba(255, 255, 255, .75) !important; transition: background-color .15s;
}
.sd-nav-link i { width: 1.25em; text-align: center; color: rgba(255, 255, 255, .6); }
.sd-nav-link:hover { background: rgba(255, 255, 255, .1); color: #fff !important; text-decoration: none !important; }
.sd-nav-link.active { background: rgba(255, 255, 255, .15); color: #fff !important; }
.sd-nav-link.active i { color: #fff; }
.sd-nav-link.active::before { content: ""; position: absolute; left: 0; top: .375rem; bottom: .375rem; width: 4px; border-radius: 0 4px 4px 0; background: #fff; }

/* page shell from the page files: #wrapper > sidebar + #content-wrapper > #content > top bar + #page-content */
#wrapper { min-height: 100vh; }
#content-wrapper { min-height: 100vh; min-width: 0; transition: padding .2s; }
#content { flex: 1 0 auto; }
#page-content { padding: 1.25rem 1.5rem; }
.applicationHome #page-content { height: calc(100vh - 4rem); }
.scroll-to-top { display: none !important; }

.sd-topbar { position: sticky; top: 0; z-index: 1020; height: 4rem; display: flex; align-items: center; gap: .75rem; padding: 0 1.5rem; background: rgba(255, 255, 255, .95); backdrop-filter: blur(6px); border-bottom: 1px solid var(--sd-line); }
.sd-menu-btn { margin-left: -.5rem; padding: .35rem .6rem; font-size: 1.1rem; }
.sd-topbar-tools { flex: 1; min-width: 0; display: flex; align-items: center; gap: .75rem; }
.sd-topbar-tools #nav-search { flex: 0 1 20rem; min-width: 10rem; }
.sd-topbar-tools #nav-filter { flex: 1; min-width: 0; display: flex; align-items: center; gap: .5rem; }
/* list toolbars the profiles / applications scripts move into the top bar: one compact row.
   No overflow on #nav-filter: any overflow value (even overflow-x) clips the filter / sort dropdown menus under the bar */
#nav-filter .btn-toolbar { flex-wrap: nowrap; gap: .5rem; }
#nav-filter .btn-group.btn-sm { padding: 0; margin: 0 !important; flex: none; }
#nav-filter .btn { font-size: .8125rem; padding: .3rem .65rem; white-space: nowrap; }
#nav-filter .searchInput { height: calc(1.5em + .6rem + 2px); font-size: .8125rem; width: 14rem; padding-left: 2rem; background: var(--sd-canvas); border-color: transparent; }
#nav-filter .searchInput:focus { background: #fff; border-color: var(--sd-brand); }
#nav-filter span.searchIcon::before { margin-top: .4rem; margin-left: .7rem; color: var(--sd-faint); font-size: .8125rem; }
#nav-filter .dropdown-toggle::after { display: none; }
.sd-topbar #search { padding-left: 2.1rem; background: var(--sd-canvas) url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3ccircle cx='7' cy='7' r='5' fill='none' stroke='%238a96a3' stroke-width='1.6'/%3e%3cpath d='m11 11 3.5 3.5' stroke='%238a96a3' stroke-width='1.6' stroke-linecap='round'/%3e%3c/svg%3e") no-repeat .7rem center / 14px; border-color: transparent; }
.sd-topbar #search:focus { background-color: #fff; border-color: var(--sd-brand); }
.sd-user-btn { display: inline-flex; align-items: center; gap: .5rem; padding: .25rem .5rem; border: 1px solid transparent; border-radius: 8px; background: transparent; color: inherit; }
.sd-user-btn:hover, .sd-user-btn[aria-expanded="true"] { background: var(--sd-canvas); border-color: var(--sd-line); }
.sd-user-btn:focus { outline: 0; box-shadow: var(--sd-focus); }
.sd-avatar { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--sd-brand-tint); color: var(--sd-brand-dark); font-size: .75rem; font-weight: 700; }
.sd-backdrop { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1035; background: rgba(29, 39, 51, .5); display: none; }

@media (min-width: 992px) {
  #content-wrapper { padding-left: var(--sd-sidebar); }
  /* collapsed icon rail: <html class="nav-collapsed"> (js/layout.js, remembered per browser) */
  .nav-collapsed .sd-sidebar { width: var(--sd-rail); }
  .nav-collapsed #content-wrapper { padding-left: var(--sd-rail); }
  .nav-collapsed .sd-brand { justify-content: center; padding: 0; }
  .nav-collapsed .sd-brand .sd-brand-logo, .nav-collapsed .sd-hide-collapsed { display: none !important; }
  .nav-collapsed .sd-brand .sd-brand-icon { display: block; }
  .nav-collapsed .sd-nav { padding: .75rem .5rem; }
  .nav-collapsed .sd-nav-link { justify-content: center; padding: .55rem 0; }
  .nav-collapsed .sd-nav-link.active::before { display: none; }
}
@media (max-width: 991.98px) {
  .sd-sidebar { transform: translateX(-100%); box-shadow: var(--sd-shadow-pop); }
  .sd-drawer-open .sd-sidebar { transform: none; }
  .sd-drawer-open .sd-backdrop { display: block; }
  .sd-topbar { padding: 0 1rem; }
  .sd-chamber { max-width: 11rem; }
  .sd-chamber img.sd-chamber-logo { height: 1.75rem; max-width: 6rem; }
  .sd-chamber-tag { display: none; }
  #page-content { padding: 1rem; }
}

/* page blocker (tpl/pageBlocker.tpl) */
#pageBlocker { background: rgba(29, 39, 51, .7) !important; color: #fff; }

/* ---------------- components ---------------- */
.card { border: 1px solid var(--sd-line); border-radius: var(--sd-radius); box-shadow: var(--sd-shadow); background: #fff; }
.card > .card-header { background: var(--sd-panel); color: var(--sd-ink); border-bottom: 1px solid var(--sd-line); font-weight: 600; }
.card > .card-header:first-child { border-radius: calc(var(--sd-radius) - 1px) calc(var(--sd-radius) - 1px) 0 0; }
.card > .card-footer { background: var(--sd-panel); border-top: 1px solid var(--sd-line); color: var(--sd-muted); }
.card .card { box-shadow: none; border-radius: 8px; }
.card-title { font-weight: 600; }
/* old coloured section headers -> white header with a coloured accent bar (same as the client's section cards) */
.card-header.jn-rh, .card-header.jn-oh, .card-header.jn-accent { background: var(--sd-panel); color: var(--sd-ink) !important; border-left: 4px solid var(--sd-bad); }
.card-header.jn-oh { border-left-color: var(--sd-warn); }
.card-header.jn-accent { border-left-color: var(--sd-brand); }
.card.jn-accent { background: var(--sd-panel); box-shadow: none; border-radius: var(--sd-radius); }

.btn { font-weight: 600; font-size: .875rem; padding: .45rem .95rem; border-radius: 7px; box-shadow: none; transition: background-color .15s, border-color .15s, color .15s; }
.btn-sm, .btn-group-sm > .btn { font-size: .8125rem; padding: .3rem .7rem; border-radius: 6px; }
.btn-lg, .btn-group-lg > .btn { font-size: .9375rem; padding: .65rem 1.25rem; }
.btn:focus, .btn.focus, .btn:not(:disabled):not(.disabled):active:focus { box-shadow: var(--sd-focus) !important; }
.btn.disabled, .btn:disabled { opacity: .55; }
.btn-primary, .btn-primary:disabled, .btn-primary.disabled { color: #fff; background: var(--sd-brand); border-color: var(--sd-brand); }
.btn-primary:hover, .btn-primary:focus, .btn-primary:not(:disabled):not(.disabled):active, .btn-primary:not(:disabled):not(.disabled).active, .show > .btn-primary.dropdown-toggle { color: #fff; background: var(--sd-brand-dark); border-color: var(--sd-brand-dark); }
.btn-secondary, .btn-light, .btn-default, .btn-neutral, .btn-outline-primary, .btn-outline-secondary, .btn-outline-dark {
  color: var(--sd-brand); background: #fff; border-color: var(--sd-brand-line);
}
.btn-secondary:hover, .btn-light:hover, .btn-default:hover, .btn-neutral:hover, .btn-outline-primary:hover, .btn-outline-secondary:hover, .btn-outline-dark:hover,
.btn-secondary:focus, .btn-light:focus, .btn-outline-primary:focus, .btn-outline-secondary:focus {
  color: var(--sd-brand); background: var(--sd-brand-tint); border-color: var(--sd-brand-line);
}
.btn-secondary:not(:disabled):not(.disabled):active, .btn-secondary:not(:disabled):not(.disabled).active, .show > .btn-secondary.dropdown-toggle,
.btn-light:not(:disabled):not(.disabled):active, .btn-light:not(:disabled):not(.disabled).active, .show > .btn-light.dropdown-toggle,
.btn-outline-primary:not(:disabled):not(.disabled):active, .btn-outline-primary:not(:disabled):not(.disabled).active,
.btn-outline-secondary:not(:disabled):not(.disabled):active, .btn-outline-secondary:not(:disabled):not(.disabled).active {
  color: var(--sd-brand-dark); background: var(--sd-brand-tint); border-color: var(--sd-brand);
}
.btn-secondary:disabled, .btn-secondary.disabled, .btn-light:disabled, .btn-outline-primary:disabled, .btn-outline-secondary:disabled { color: var(--sd-faint); background: #fff; border-color: var(--sd-line); }
.btn-success, .btn-approved, .btn-approve { color: #fff !important; background: var(--sd-ok) !important; border-color: var(--sd-ok) !important; }
.btn-success:hover, .btn-approved:hover, .btn-approve:hover { background: #186040 !important; border-color: #186040 !important; }
.btn-danger, .btn-declined, .btn-decline { color: #fff !important; background: var(--sd-bad) !important; border-color: var(--sd-bad) !important; }
.btn-danger:hover, .btn-declined:hover, .btn-decline:hover { background: var(--sd-bad-ink) !important; border-color: var(--sd-bad-ink) !important; }
.btn-pending, .btn-warning { color: var(--sd-warn-ink) !important; background: var(--sd-warn-tint) !important; border-color: var(--sd-warn-line) !important; }
.btn-pending:hover, .btn-warning:hover { background: #ffedc2 !important; }
.btn-info { color: var(--sd-brand-dark); background: var(--sd-brand-tint); border-color: var(--sd-brand-line); }
.btn-info:hover, .btn-info:focus, .btn-info:not(:disabled):not(.disabled):active { color: #fff; background: var(--sd-brand); border-color: var(--sd-brand); }
.btn-outline-danger { color: var(--sd-bad); border-color: var(--sd-bad-line); background: #fff; }
.btn-outline-danger:hover, .btn-outline-danger:not(:disabled):not(.disabled):active { color: var(--sd-bad); background: var(--sd-bad-tint); border-color: var(--sd-bad-line); }
.btn-link { color: var(--sd-brand); font-weight: 600; }
.btn-quiet { color: var(--sd-muted); background: transparent; border-color: transparent; }
.btn-quiet:hover { color: var(--sd-ink); background: var(--sd-canvas); }
.btn-activate { min-width: 123px; }
.btn-toolbar { gap: .5rem; }
.btn-group > .btn:not(:first-child) { margin-left: -1px; }

.form-control, .custom-select { border: 1px solid var(--sd-line); border-radius: 7px; background-color: #fff; color: var(--sd-ink); font-size: .9375rem; box-shadow: none; transition: border-color .15s, box-shadow .15s; }
.form-control-sm, .custom-select-sm { font-size: .8125rem; border-radius: 6px; }
.form-control:focus, .custom-select:focus { border-color: var(--sd-brand); box-shadow: var(--sd-focus); background-color: #fff; }
.form-control:disabled, .form-control[readonly] { background-color: var(--sd-canvas); }
.form-control.flatpickr-input[readonly], .flatpickr-input + .form-control[readonly] { background-color: #fff; cursor: pointer; }
.form-control::placeholder { color: var(--sd-faint); }
textarea.form-control { min-height: 2.5rem; }
label { font-weight: 500; margin-bottom: .375rem; }
.form-text { color: var(--sd-muted); }
.input-group-text { background: var(--sd-panel); border-color: var(--sd-line); color: var(--sd-muted); border-radius: 7px; }
.custom-control-input:checked ~ .custom-control-label::before { background-color: var(--sd-brand); border-color: var(--sd-brand); }
.custom-control-input:focus ~ .custom-control-label::before { box-shadow: var(--sd-focus); }
.custom-control-label { font-weight: 400; }
.form-error { margin-top: .25rem; color: var(--sd-bad); } /* JustValidate messages (assets/js/form-validation.js), same place and look as the old FormValidation message */

.dropdown-menu { border: 1px solid var(--sd-line); border-radius: 8px; box-shadow: var(--sd-shadow-pop); padding: .375rem 0; font-size: .875rem; color: var(--sd-ink); }
.dropdown-item { display: flex; align-items: center; gap: .6rem; padding: .5rem 1rem; color: var(--sd-ink); }
.dropdown-item:hover, .dropdown-item:focus { background: var(--sd-canvas); color: var(--sd-ink); text-decoration: none; }
.dropdown-item.active, .dropdown-item:active, #profileDetails .dropdown-item.active { background: var(--sd-brand-tint) !important; color: var(--sd-brand-dark) !important; }
.dropdown-divider { border-top-color: var(--sd-line); }
.dropdown-header { color: var(--sd-faint); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

.modal-content { border: 1px solid var(--sd-line); border-radius: var(--sd-radius); box-shadow: var(--sd-shadow-pop); }
.modal-header { border-bottom-color: var(--sd-line); }
.modal-footer { background: var(--sd-panel); border-top-color: var(--sd-line); border-radius: 0 0 var(--sd-radius) var(--sd-radius); }
.modal-title { font-size: 1.125rem; font-weight: 600; }
.modal-backdrop.show { opacity: .4; background: #1d2733; }
.popover { border-color: var(--sd-line); box-shadow: var(--sd-shadow-pop); font-family: var(--sd-font); }
.popover-header { background: var(--sd-panel); border-bottom-color: var(--sd-line); font-size: .875rem; }
.tooltip { font-family: var(--sd-font); }

/* tabs: underline (profile tabs etc.) */
.nav-tabs { border-bottom: 1px solid var(--sd-line); margin-bottom: 1rem; }
.nav-tabs .nav-link { border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: var(--sd-muted); font-weight: 600; padding: .6rem .9rem; margin-bottom: -1px; }
.nav-tabs .nav-link:hover { color: var(--sd-ink); border-bottom-color: var(--sd-line); }
.nav-tabs .nav-link.active, .nav-tabs .nav-item.show .nav-link { color: var(--sd-brand); background: transparent; border-bottom-color: var(--sd-brand); }
.nav-pills .nav-link.active, .nav-pills .show > .nav-link { background: var(--sd-brand); }

/* notices / alerts (secure.swiftdox.com style) */
.alert { border-radius: 8px; border: 1px solid; font-size: .875rem; }
.alert-warning { background: var(--sd-warn-tint); color: var(--sd-warn-ink); border-color: var(--sd-warn-line); }
.alert-danger { background: var(--sd-bad-tint); color: var(--sd-bad-ink); border-color: var(--sd-bad-line); }
.alert-success { background: var(--sd-ok-tint); color: var(--sd-ok); border-color: var(--sd-ok-line); }
.alert-info, .alert-primary { background: var(--sd-brand-tint); color: var(--sd-brand-dark); border-color: var(--sd-brand-line); }
.alert-heading { font-size: 1rem; font-weight: 700; }
.callout.success { border-left: 4px solid var(--sd-ok); }
.callout.warning { border-left: 4px solid var(--sd-bad); }

/* badges: soft tags instead of solid colours */
.badge { font-size: 11.5px; font-weight: 600; letter-spacing: .02em; padding: .3em .6em; border-radius: 4px; margin-right: 3px; }
.badge-pill { border-radius: 999px; }
.badge-primary, .badge-info { background: var(--sd-brand-tint); color: var(--sd-brand-dark); }
.badge-success { background: var(--sd-ok-tint); color: var(--sd-ok); }
.badge-danger { background: var(--sd-bad-tint); color: var(--sd-bad); }
.badge-warning { background: var(--sd-warn-tint); color: var(--sd-warn); }
.badge-secondary, .badge-light { background: var(--sd-canvas); color: var(--sd-muted); }
.badge-dark { background: var(--sd-ink); color: #fff; }
/* certificate type tags (outlined in config/{coc}/style.css): same soft look, type colour kept */
.badge.cfs, .badge.gmp, .badge.coo, .badge.cgs { border: 1px solid; min-width: 0; }
.badge.cfs { background: #fff0f6; color: #c2185b; border-color: #ffc2dc; }
.badge.gmp { background: #fff5e0; color: #a86d00; border-color: #f8dca6; }
.badge.coo { background: #eaf6fa; color: #2f7f99; border-color: #bfe2ee; }
.badge.cgs { background: #f2f8e3; color: #5f7d14; border-color: #d6e8ad; }

/* tables */
.table { color: var(--sd-ink); font-size: .875rem; }
.table th, .table td { border-top-color: var(--sd-line); padding: .65rem .75rem; vertical-align: middle; }
.table-sm th, .table-sm td { padding: .4rem .6rem; }
.table thead th, table.dataTable thead th { background: var(--sd-panel); color: var(--sd-faint); font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; border-bottom: 1px solid var(--sd-line); border-top: 0; }
.table-bordered, .table-bordered th, .table-bordered td { border-color: var(--sd-line); }
.table-striped tbody tr:nth-of-type(odd) { background-color: var(--sd-panel); }
tbody tr:hover, .table-hover tbody tr:hover { background-color: var(--sd-brand-tint); }
tr.active, table.dataTable tbody > tr.selected, table.dataTable tbody > tr > .selected { background-color: var(--sd-brand-tint) !important; color: var(--sd-ink) !important; box-shadow: inset 3px 0 0 var(--sd-brand); }
tfoot.billFoot { background: var(--sd-brand-tint); color: var(--sd-brand-dark) !important; font-size: 1.1em; font-weight: 600; }
caption { color: var(--sd-ink); font-size: 1.125rem; font-weight: 600; }
.dataTables_wrapper { font-size: .875rem; }
.dataTables_wrapper .dataTables_filter input, .dataTables_wrapper .dataTables_length select { border: 1px solid var(--sd-line); border-radius: 7px; }
.page-link { color: var(--sd-brand); border-color: var(--sd-line); }
.page-link:hover { color: var(--sd-brand-dark); background: var(--sd-brand-tint); border-color: var(--sd-line); }
.page-item.active .page-link { color: #fff !important; background: var(--sd-brand); border-color: var(--sd-brand); filter: none; }
.page-item.disabled .page-link { color: var(--sd-faint); filter: none; }
.page-item:first-child .page-link { border-radius: 7px 0 0 7px; }
.page-item:last-child .page-link { border-radius: 0 7px 7px 0; }

/* list groups */
.list-group-item { border-color: var(--sd-line); color: var(--sd-ink); }
.list-group-item.active { background: var(--sd-brand-tint); border-color: var(--sd-line); color: var(--sd-ink) !important; box-shadow: inset 3px 0 0 var(--sd-brand); }
.list-group-item-action:hover { background: var(--sd-panel); }

/* ---------------- admin screens (css/coc.css structure) ---------------- */
/* profiles / applications: list pane + detail pane */
div#profileList, div#applicationList { padding: 0; border: 1px solid var(--sd-line); border-radius: var(--sd-radius); background: #fff; box-shadow: var(--sd-shadow); overflow: hidden; }
div.listBox { background: #fff; border-radius: 0; box-shadow: none; overflow-y: auto; }
div.listBox .list-group-item, .paList .list-group-item { margin: 0; border: 0; border-bottom: 1px solid var(--sd-line); border-radius: 0; box-shadow: none; padding: .7rem 1rem; transition: background-color .15s; }
div.listBox .list-group-item:hover { background: var(--sd-panel); }
div.listBox .list-group-item.active, .paList .list-group-item.active { margin: 0; background: var(--sd-brand-tint); color: var(--sd-ink) !important; box-shadow: inset 3px 0 0 var(--sd-brand); }
.list-group-item { box-shadow: none; }
div.mainGrid { gap: 1rem; grid-template-columns: minmax(16rem, 25%) minmax(0, 1fr); }
div.leftPanel, div.rightPanel { min-width: 0; }
div#application, div#application-list, div#attachments, #profiles-col, #profile-details { border: 1px solid var(--sd-line); border-radius: var(--sd-radius); background: #fff; box-shadow: var(--sd-shadow); }
#applicationDetails { padding: 0; }
.softbox, .profileEditTools { box-shadow: var(--sd-shadow-pop); }
.profileEditTools { border: 1px solid var(--sd-line); border-radius: var(--sd-radius) 0 0 0; }
.status { font-size: 16px; }
.paContent .status { font-size: 24px; }

/* dashboard (dashboard/dashboard2.tpl) */
.dash2Wrap { max-width: 1920px; padding-top: 0; }
.dash2Wrap .card-block { margin: .5rem; padding: 1.25rem; }
.dash2Wrap .row { margin-left: -.5rem; margin-right: -.5rem; }
.dash2Wrap .row > [class*="col-"] { padding-left: .5rem; padding-right: .5rem; }
.dashTopLabel, .chartTitle h2 { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--sd-muted); border-top: 0; }
.dashTopLabel i { color: var(--sd-faint); margin-right: .25rem; }
.dashTopLabel small, .summary-year { color: var(--sd-faint); font-weight: 600; }
.dash2Wrap h2 { font-size: 1.5rem; font-weight: 700; }
.dash2Wrap hr { margin: .75rem -1.25rem; }
.dash2Wrap .dash2Header { margin: .25rem; padding: .25rem .75rem 1rem; border-radius: 8px; background: var(--sd-brand-tint); color: var(--sd-brand-dark); font-size: .8125rem; font-weight: 700; letter-spacing: .08em; }
.dash2Header.cfs { background: #fff0f6; color: #c2185b; }
.dash2Header.gmp { background: #fff5e0; color: #a86d00; }
.dash2Header.coo { background: #eaf6fa; color: #2f7f99; }
.dash2Header.cgs { background: #f2f8e3; color: #5f7d14; }
.dash2Header.d2Profile { background: #f0edfb; color: #5b45b0; }
.dash2Wrap .d2link, .dash2Wrap .d2link:hover { color: inherit !important; text-decoration: none; }
.dash2Wrap .dash2Header:hover { filter: brightness(.97); }
span.d2Value { font-size: 2.25rem; font-weight: 700; line-height: 1; }
.d2p-1 { margin: .75rem 0 .35rem !important; }
.chartTitle { border-bottom: 1px solid var(--sd-line); }
div.dashTop { background: var(--sd-brand); border-radius: var(--sd-radius); }
.canvasjs-chart-toolbar button::before { color: var(--sd-faint); font-size: 16px; }

/* application messages timeline + notes */
.msg-timeline::before { width: 2px; background: var(--sd-line); margin-left: -8px; }
.msg-content { background: var(--sd-brand-tint); color: var(--sd-ink); font-weight: 400; box-shadow: none; border: 1px solid var(--sd-brand-line); }
.msg-content::after { border-right-color: var(--sd-brand-line); }
.msg-content-message { background: #fff; color: var(--sd-ink); border: 1px solid var(--sd-line); }
.msg-day, .msg-month, .msg-time { color: var(--sd-brand-dark); }
.msg-day { font-size: 26px; font-weight: 700; }
.msg-month { font-size: 13px; }
.msg-timeline > li .msg-icon { border: 3px solid #fff; box-shadow: 0 0 0 1px var(--sd-line); }
.msg-icon.submitted { background: var(--sd-brand); }
.msg-icon.approved, .msg-icon.payment_charged { background: var(--sd-ok); color: #fff; }
.msg-icon.declined, .msg-icon.voided { background: var(--sd-bad); }
.msg-icon.withdrawn, .msg-icon.void_payment { background: var(--sd-muted); }
.fa-layers-counter { background: var(--sd-brand); box-shadow: none; }
.note-col-1 { background: var(--sd-brand); border-radius: 8px 0 0 8px; }
.note-col-2 { border: 1px solid var(--sd-line); border-left: 0; border-radius: 0 8px 8px 0; }
.note.active .note-col-2 { border-color: var(--sd-brand); }
.note-content[contenteditable="true"] { box-shadow: none; background: var(--sd-panel); outline: 1px solid var(--sd-brand-line); }

/* misc plugins */
#trackingList li:first-child { background: var(--sd-brand-tint); color: var(--sd-brand-dark); transform: none; }
.flatpickr-calendar { box-shadow: var(--sd-shadow-pop); border-radius: 8px; font-family: var(--sd-font); }
.note-editor.note-frame { border-color: var(--sd-line); border-radius: 8px; }
.note-editor .note-toolbar { background: var(--sd-panel); border-bottom: 1px solid var(--sd-line); }
.bootbox .modal-body { font-size: .9375rem; }
#toast-container > div { box-shadow: var(--sd-shadow-pop); border-radius: 8px; opacity: 1; font-family: var(--sd-font); }
#toast-container > div:hover { box-shadow: var(--sd-shadow-pop); }
.toast-success { background-color: var(--sd-ok); }
.toast-error { background-color: var(--sd-bad); }
.toast-info { background-color: var(--sd-brand); }
.toast-warning { background-color: #b07800; }
.dropzone { border: 2px dashed var(--sd-brand-line); border-radius: var(--sd-radius); background: var(--sd-panel); }
label.ft input[type="radio"] ~ span::before, label.ft input[type="checkbox"] ~ span::before { font-size: 1.25em; top: 3px; color: var(--sd-faint); }
label.ft input[type="radio"]:checked ~ span, label.ft input[type="checkbox"]:checked ~ span { color: var(--sd-ink); }
label.ft input[type="radio"]:checked ~ span::before, label.ft input[type="checkbox"]:checked ~ span::before { color: var(--sd-brand); }

/* ================= page anatomy (Settings, Proof Reviews, Reports, Receivables) =================
   .sd-page > .sd-page-head (title, one-line description, main action) + white cards.
   Rows: .sd-row (main text + .sd-row-actions small quiet buttons). Hover menus (.sd-hover-menu) are moved into rows by the page scripts. */
.sd-page { max-width: 72rem; margin: 0 auto; }
.sd-page.sd-page-wide { max-width: none; }
.sd-page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin: .25rem 0 1.25rem; }
.sd-page-title { font-size: 1.5rem; font-weight: 700; margin: 0; }
.sd-page-sub { margin: .25rem 0 0; color: var(--sd-muted); font-size: .9375rem; }
.sd-page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.sd-page-actions .custom-select { width: auto; min-width: 16rem; }
.sd-card-title { font-size: 1rem; font-weight: 600; margin: 0; }
.card-header .sd-card-title + small { display: block; margin-top: .15rem; font-weight: 400; }
.sd-card-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.sd-search { max-width: 22rem; padding-left: 2.1rem; background: #fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3ccircle cx='7' cy='7' r='5' fill='none' stroke='%238a96a3' stroke-width='1.6'/%3e%3cpath d='m11 11 3.5 3.5' stroke='%238a96a3' stroke-width='1.6' stroke-linecap='round'/%3e%3c/svg%3e") no-repeat .7rem center / 14px; }
.sd-gap { gap: .5rem; }
.card > .list-group-flush:last-child .list-group-item:last-child { border-bottom-left-radius: var(--sd-radius); border-bottom-right-radius: var(--sd-radius); }
.card > .table-responsive:last-child, .card > .table:last-child { border-radius: 0 0 var(--sd-radius) var(--sd-radius); }
.card > .table-responsive > .table, .card > .table, .sd-card-flush > .table { margin-bottom: 0; }
.card > .table-responsive > .table thead th:first-child, .card > .table thead th:first-child, .card > .table td:first-child, .card > .table-responsive > .table td:first-child { padding-left: 1.25rem; }
.card > .table-responsive > .table thead th:last-child, .card > .table-responsive > .table td:last-child { padding-right: 1.25rem; }

.sd-row { display: flex; align-items: center; gap: .875rem; padding: .85rem 1.25rem; transition: background-color .15s; }
.sd-row:hover { background: var(--sd-panel); }
.sd-row-main { flex: 1; min-width: 0; }
.sd-row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .35rem; flex: none; }
.sd-row .sd-avatar { flex: none; text-transform: uppercase; }
.sd-hover-row { position: relative; }
.sd-hover-menu { position: absolute; top: 50%; right: 1rem; transform: translateY(-50%); padding: .25rem; background: #fff; border: 1px solid var(--sd-line); border-radius: 8px; box-shadow: var(--sd-shadow-pop); z-index: 2; }
.sd-list-table td { padding: .85rem 1.25rem; border-top: 1px solid var(--sd-line); }
.sd-list-table tr:first-child td { border-top: 0; }
.sd-list-table tbody tr:hover { background: var(--sd-panel); }
.sd-notification-body > :last-child { margin-bottom: 0; }
#industries-table span.icon::before { content: none; }
.sd-empty { align-items: center; justify-content: center; padding: 3rem 1rem; text-align: center; color: var(--sd-muted); }
.sd-empty > i { font-size: 2rem; color: var(--sd-faint); margin-bottom: .75rem; }
@media (max-width: 767.98px) {
  .sd-row { flex-wrap: wrap; }
  .sd-row-actions { width: 100%; justify-content: flex-start; }
  .sd-hover-menu { position: static; transform: none; display: inline-flex; margin-top: .5rem; box-shadow: none; }
}

/* segmented filter buttons (Proof Reviews, Document types) */
.sd-segmented .btn.active, #types [data-type-filter].active { background: var(--sd-brand-tint) !important; border-color: var(--sd-brand) !important; color: var(--sd-brand-dark) !important; }

/* Proof Reviews */
#proof-queue .list-group-item { padding: .75rem 1rem; }
#proof-queue .list-group-item.active .text-muted { color: var(--sd-muted) !important; }
#proof-queue .card-header { background: #fff; }

/* Reports: options card + results card (reports/*.js fill #report-options / #report-table, some fill #report directly) */
#report-options, #report-table:not(:empty), #report:not(:has(#report-options)):not(:empty) { margin-bottom: 1.25rem; padding: 1.25rem; background: #fff; border: 1px solid var(--sd-line); border-radius: var(--sd-radius); box-shadow: var(--sd-shadow); }
#report-table { overflow-x: auto; }
#report-table > hr:first-child { display: none; }
#report-options label.ft { font-weight: 500; }
.billingTypeGrid { border-radius: 8px; overflow: hidden; border: 1px solid var(--sd-line); }
.billingTypeHeader { font-size: .75rem; font-weight: 700; letter-spacing: .08em; }
.billingTypeHeader.cfs { background: #c2185b; } .billingTypeHeader.gmp { background: #c98a00; } .billingTypeHeader.coo { background: #2f7f99; }
.billingTypeContent.cfs { background: #fff0f6; } .billingTypeContent.gmp { background: #fff5e0; } .billingTypeContent.coo { background: #eaf6fa; }

/* Profiles + Applications detail panes */
#profile > .card-header h3, #application > .card-header h3 { font-size: 1.25rem; font-weight: 700; }
#profile > .card-header, #application > .card-header { background: #fff; padding: 1rem 1.25rem; }
#profile > .card-body { padding: 0; }
#profileTabs { padding: 0 1.25rem; margin-bottom: 0; background: #fff; }
#profileWrapper { border: 0 !important; border-radius: 0 !important; box-shadow: none !important; padding: 1.25rem !important; background: var(--sd-canvas) !important; }
#profileWrapper > .tab-pane > .card, #profileWrapper .card { margin-bottom: 1rem; }
.profileDetailsGrid, .profileContactGrid, .appInfoGrid, .coInfoGrid { row-gap: .4rem; column-gap: 1rem; }
.profileDetailsGrid > div:nth-child(odd), .profileContactGrid > div:nth-child(odd), .appInfoGrid > div:nth-child(odd), .coInfoGrid > div:nth-child(odd) { color: var(--sd-muted); }
.profileDetailsGrid b, .profileContactGrid b, .appInfoGrid b, .coInfoGrid b { font-weight: 500; }
.profileContactGrid > div:first-child b { color: var(--sd-ink); font-weight: 600; }
#profile-content > .card hr, #application hr { margin: 1rem 0; }
#application > .card-header small { color: var(--sd-muted); margin-left: .5rem; }
#applicationMenu { padding: 0 !important; }
#applicationMenu .btn-declined { color: var(--sd-bad) !important; background: #fff !important; border-color: var(--sd-bad-line) !important; }
#applicationMenu .btn-declined:hover { background: var(--sd-bad-tint) !important; }
#applicationOptions hr { margin: .75rem 0; }

/* Application header (applications/tpl/co.tpl): title + tools, then the review bar (pending only) */
#application > .app-head { padding: 1rem 1.25rem 0; }
.app-head-top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: .75rem 1.5rem; padding-bottom: 1rem; }
.app-head-title h3 { display: flex; align-items: center; gap: .5rem; margin: 0; font-size: 1.25rem; font-weight: 700; }
.app-head-title .app-type { display: inline-block; padding: .1rem .5rem; border-radius: 6px; background: #eaf6fa; color: #2f7f99; font-size: .75rem; font-weight: 700; letter-spacing: .06em; }
.app-head-title .app-type.cg { background: #fff0f6; color: #c2185b; }
.app-head-meta { color: var(--sd-muted); font-size: .875rem; margin-top: .2rem; }
.app-head-meta:empty { display: none; }

.app-toolbar { display: flex; flex-wrap: wrap; gap: .375rem; }
.app-toolbar .btn { align-items: center; gap: .4rem; padding: .375rem .7rem; border: 1px solid var(--sd-line); border-radius: 8px; background: #fff; color: var(--sd-ink); font-size: .8125rem; font-weight: 500; line-height: 1.4; }
.app-toolbar .btn i { color: var(--sd-brand); width: 1em; text-align: center; margin-right: .35rem; }
.app-toolbar .btn:hover { background: var(--sd-brand-tint); border-color: var(--sd-brand-line); }
.app-toolbar .btn:focus { box-shadow: var(--sd-focus); }
.app-toolbar .tb-count { display: inline-block; min-width: 1.35rem; margin-left: .4rem; padding: 0 .35rem; border-radius: 999px; background: var(--sd-canvas); color: var(--sd-muted); font-size: .75rem; font-weight: 600; text-align: center; }
.app-toolbar .tb-danger, .app-toolbar .tb-danger i { color: var(--sd-bad); }
.app-toolbar .tb-danger:hover { background: var(--sd-bad-tint); border-color: var(--sd-bad-line); }

.app-review { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; margin: 0 -1.25rem; padding: .75rem 1.25rem; border-top: 1px solid var(--sd-line); background: var(--sd-panel); }
.app-stamp { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; }
.app-review-label { color: var(--sd-muted); font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.app-seg { display: inline-flex; padding: 3px; border: 1px solid var(--sd-line); border-radius: 9px; background: #fff; }
.app-seg label { margin: 0; cursor: pointer; }
.app-seg input { position: absolute; opacity: 0; pointer-events: none; }
.app-seg span { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .75rem; border-radius: 6px; color: var(--sd-muted); font-size: .8125rem; font-weight: 500; }
.app-seg label:hover span { color: var(--sd-ink); }
.app-seg input:checked + span { background: var(--sd-brand); color: #fff; }
.app-seg input:focus-visible + span { box-shadow: var(--sd-focus); }
/* page glyph with the stamp mark at the chosen side */
.stamp-glyph { position: relative; display: inline-block; width: 12px; height: 15px; border: 1.5px solid currentColor; border-radius: 2px; }
.stamp-glyph::after { content: ''; position: absolute; bottom: 2px; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.stamp-glyph.l::after { left: 1px; } .stamp-glyph.c::after { left: 2.5px; } .stamp-glyph.r::after { right: 1px; }

.app-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.app-actions .btn { padding: .45rem 1rem; border-radius: 8px; font-weight: 600; font-size: .875rem; border: 1px solid transparent; }
.app-actions .btn i { margin-right: .3rem; }
.app-actions .btn.preview { background: #fff; color: var(--sd-brand); border-color: var(--sd-brand-line); }
.app-actions .btn.preview:hover { background: var(--sd-brand-tint); }
.app-actions .btn.decline { background: #fff; color: var(--sd-bad); border-color: var(--sd-bad-line); }
.app-actions .btn.decline:hover { background: var(--sd-bad-tint); }
.app-actions .btn.approve { background: var(--sd-ok); color: #fff; }
.app-actions .btn.approve:hover { background: #18633e; }
.app-actions .btn:focus { box-shadow: var(--sd-focus); }

@media (max-width: 575.98px) {
    .app-toolbar .tb-label { display: none; }
    .app-toolbar .btn i { margin-right: 0; }
    .app-actions { width: 100%; }
    .app-actions .btn { flex: 1 1 0; text-align: center; }
}
#application > .card-body .card { margin-bottom: 1rem !important; }
#billing-info { border-radius: var(--sd-radius); box-shadow: var(--sd-shadow-pop); }
#billing-info .card-title { border-color: var(--sd-line) !important; padding-bottom: .5rem; }
#billing-info .card-body { padding: .75rem 0 0; }
#billing-info h4 { border-color: var(--sd-line) !important; font-size: 1.125rem; }
.paContent .card-footer small { color: var(--sd-muted); }
#profileList-message .card { margin: 1rem; padding: 2rem 1rem; box-shadow: none; }
.noResults { color: var(--sd-faint); }

/* list toolbars (applications, profiles; moved into the top bar): search + multi-select filters (js/listFilter.js) + sort + count.
   Same as the client list filters: fixed width, room for the × always reserved so ticking / clearing doesn't move anything */
.sd-list-tools { display: flex; flex-wrap: nowrap; align-items: center; gap: .5rem; }
.sd-list-tools .sd-search { width: 15rem; flex: none; }
.sd-list-tools .btn-group, .sd-list-tools .dropdown { flex: none; }
.list-filter { position: relative; }
.list-filter > [data-toggle] { width: 12.5rem; max-width: 100%; padding-right: 3.4rem; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; background-color: #fff; }
.list-filter.is-filtered > [data-toggle] { border-color: var(--sd-brand); color: var(--sd-brand-dark); background-color: var(--sd-brand-tint); font-weight: 600; }
.list-filter .filter-x { position: absolute; right: 1.75rem; top: 50%; transform: translateY(-50%); border: 0; background: none; padding: 0 .15rem; line-height: 1; color: var(--sd-faint); cursor: pointer; }
.list-filter .filter-x:hover, .list-filter .filter-x:focus-visible { color: var(--sd-brand); }
.list-filter .dropdown-menu { min-width: 100%; }
.list-filter .dropdown-item { gap: .5rem; margin: 0; font-weight: 400; cursor: pointer; }
.list-filter .dropdown-item input { margin: 0; flex: none; accent-color: var(--sd-brand); }
.list-filter .dropdown-item .status { font-size: 14px; margin: 0; }
.list-filter .dropdown-item .badge { margin: 0; }
input[type="search"]::-webkit-search-cancel-button { cursor: pointer; }
