/* =====================================================================
   Supplier Portal: portal.css
   One stylesheet for every page.

   1  Tokens and base
   2  Backdrop
   3  Glass surfaces
   4  Buttons
   5  Forms
   6  Tables (plain and DataTables)
   7  Pills, alerts, toasts
   8  App shell (sidebar, topbar, grid, panels)
   9  Dashboard widgets
   10 Login page
   11 Responsive
   12 Reduced motion

   Icons come from Bootstrap Icons (<i class="bi bi-..."></i>).
   ===================================================================== */


/* 1. Tokens and base ------------------------------------------------- */
:root {
  --cream: #f6efe0;
  --ink: #0f2237;
  --muted: rgba(15, 34, 55, .68);
  --line: rgba(15, 34, 55, .12);

  --blue: #2b6cb8;
  --blue-d: #1f5fa6;
  --teal: #1c9c93;
  --amber: #e09a45;
  --red: #d64545;

  --field-bg: rgba(255, 255, 255, .72);
  --field-border: rgba(15, 34, 55, .26);
  --ring: 0 0 0 4px rgba(59, 130, 196, .28);

  --sidebar-w: 264px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 96px;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.4;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;

}

body.menu-open {
  overflow: hidden;
}

h1,
h2,
h3,
p {
  margin: 0;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

table {
  border-collapse: collapse;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--blue-d);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.muted {
  color: var(--muted);
}

.link {
  color: var(--blue-d);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(31, 95, 166, .45);
  text-underline-offset: 3px;
}

.link:hover {
  color: #174a85;
  text-decoration-color: #174a85;
}


/* 2. Backdrop -------------------------------------------------------- */
.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(90% 70% at 0% 0%, #fffaf0 0%, transparent 60%),
    radial-gradient(80% 70% at 100% 100%, #efe2c8 0%, transparent 60%),
    var(--cream);
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
}

.page-app .glow {
  filter: blur(80px);
}

.page-app .glow.g1 {
  width: 38vmax;
  height: 38vmax;
  background: #7fb2e5;
  opacity: .5;
  right: 4vw;
  top: -14vmax;
}

.page-app .glow.g2 {
  width: 32vmax;
  height: 32vmax;
  background: #6fd6c9;
  opacity: .42;
  right: -8vmax;
  bottom: -12vmax;
}

.page-app .glow.g3 {
  width: 30vmax;
  height: 30vmax;
  background: #f4b97d;
  opacity: .5;
  left: 18vw;
  bottom: -14vmax;
}

.page-app .glow.g4 {
  width: 26vmax;
  height: 26vmax;
  background: #9db8f2;
  opacity: .35;
  left: -8vmax;
  top: 30vh;
}

.page-login .glow.g1 {
  width: 36vmax;
  height: 36vmax;
  background: #7fb2e5;
  opacity: .5;
  right: 8vw;
  top: -10vmax;
}

.page-login .glow.g2 {
  width: 30vmax;
  height: 30vmax;
  background: #6fd6c9;
  opacity: .42;
  right: -6vmax;
  bottom: -10vmax;
}

.page-login .glow.g3 {
  width: 22vmax;
  height: 22vmax;
  background: #f4b97d;
  opacity: .55;
  left: 30vw;
  bottom: -8vmax;
}


/* 3. Glass surfaces -------------------------------------------------- */
.glass {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .74), rgba(255, 255, 255, .36) 60%, rgba(255, 255, 255, .55)),
    rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: blur(20px) saturate(170%);
  backdrop-filter: blur(20px) saturate(170%);
  box-shadow:
    inset 0 1.5px 0 #fff,
    inset 0 -1px 0 rgba(255, 255, 255, .55),
    0 24px 48px -30px rgba(70, 55, 30, .4),
    0 6px 16px -10px rgba(70, 55, 30, .22);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {

  .glass,
  .glass-card {
    background: rgba(255, 255, 255, .92);
  }

  .points li {
    background: rgba(255, 255, 255, .8);
  }
}


/* 4. Buttons --------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  height: 44px;
  padding: 0 1.1rem;
  font-weight: 700;
  font-size: .92rem;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 14px;
  cursor: pointer;
  border: 1px solid rgba(15, 34, 55, .16);
  background: rgba(255, 255, 255, .75);
  color: var(--ink);
  box-shadow: inset 0 1px 0 #fff;
  transition: filter .15s, background .15s, transform .15s;
}

.btn:hover {
  background: #fff;
}

.btn:active {
  transform: translateY(1px);
}

.btn[disabled] {
  cursor: progress;
  filter: saturate(.7) brightness(.92);
}

.btn.primary {
  color: #fff;
  border-color: rgba(255, 255, 255, .65);
  background: linear-gradient(180deg, #4a9ae0, #2b6cb8);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, .5),
    inset 0 -3px 8px rgba(9, 40, 90, .3),
    0 12px 22px -12px rgba(31, 95, 166, .75);
}

.btn.primary:hover {
  filter: brightness(1.07);
  background: linear-gradient(180deg, #4a9ae0, #2b6cb8);
}

.btn.sm {
  height: 36px;
  padding: 0 .85rem;
  font-size: .85rem;
  border-radius: 12px;
}

.btn.lg {
  height: 52px;
  font-size: 1rem;
  border-radius: 16px;
}

.btn.block {
  width: 100%;
}

/* compact buttons inside table rows */
.mini {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 .8rem;
  margin-left: .35rem;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  font-size: .82rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.mini.ok {
  color: #fff;
  background: linear-gradient(180deg, #27b3a9, #14877f);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4);
}

.mini.ok:hover {
  filter: brightness(1.07);
}

.mini.no {
  color: #a32424;
  background: rgba(255, 255, 255, .8);
  border-color: rgba(214, 69, 69, .4);
}

.mini.no:hover {
  background: rgba(214, 69, 69, .1);
}

.mini.ghost {
  color: var(--blue-d);
  background: rgba(255, 255, 255, .8);
  border-color: rgba(43, 108, 184, .35);
}

.mini.ghost:hover {
  background: rgba(43, 108, 184, .1);
}

.icon-btn {
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  border-radius: 14px;
  cursor: pointer;
  border: 1px solid rgba(15, 34, 55, .14);
  background: rgba(255, 255, 255, .7);
  color: var(--ink);
}

.icon-btn:hover {
  background: #fff;
}

.icon-btn .dot {
  position: absolute;
  top: 9px;
  right: 10px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red);
  border: 2px solid #fff;
}


/* 5. Forms ----------------------------------------------------------- */
.field {
  display: block;
  min-width: 0;
}

.label {
  display: block;
  margin-bottom: .4rem;
  font-size: .9rem;
  font-weight: 600;
}

.label .req {
  color: var(--red);
  margin-left: .15rem;
}

.input,
.select,
.textarea {
  display: block;
  width: 100%;
  height: 46px;
  padding: 0 .95rem;
  font-size: .95rem;
  font-weight: 500;
  color: var(--ink);
  background: var(--field-bg);
  border: 1px solid var(--field-border);
  border-radius: 14px;
  box-shadow: inset 0 2px 5px rgba(70, 55, 30, .08);
  transition: border-color .2s, background .2s, box-shadow .2s;
}

.input::placeholder,
.textarea::placeholder {
  color: rgba(15, 34, 55, .52);
  font-weight: 400;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--blue);
  box-shadow: var(--ring);
}

.input:user-invalid,
.select:user-invalid,
.textarea:user-invalid {
  border-color: var(--red);
}

.input-lg {
  height: 54px;
  font-size: 1.05rem;
}

.textarea {
  height: auto;
  min-height: 112px;
  padding: .75rem .95rem;
  resize: vertical;
  line-height: 1.5;
}

.select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.6rem;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230f2237' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .9rem center;
  background-size: 16px;
}

.input[type="file"] {
  height: auto;
  padding: .55rem .7rem;
  cursor: pointer;
}

.input[type="file"]::file-selector-button {
  margin-right: .8rem;
  padding: .45rem .9rem;
  cursor: pointer;
  font: inherit;
  font-size: .85rem;
  font-weight: 700;
  color: var(--ink);
  border: 1px solid rgba(15, 34, 55, .16);
  border-radius: 10px;
  background: #fff;
}

.hint {
  margin-top: .35rem;
  font-size: .8rem;
  color: var(--muted);
}

/* input with a leading icon and an optional trailing button */
.input-wrap {
  position: relative;
}

.input-wrap>.icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  color: rgba(15, 34, 55, .7);
  pointer-events: none;
}

.input-wrap .input {
  padding-left: 2.8rem;
}

.input-wrap.has-action .input {
  padding-right: 3.2rem;
}

.input-action {
  position: absolute;
  right: .4rem;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.input-action:hover {
  background: rgba(15, 34, 55, .08);
}

/* checkbox and switch */
.check {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  cursor: pointer;
  font-size: .92rem;
}

.check input {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  margin: 0;
  cursor: pointer;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 6px;
  display: grid;
  place-items: center;
  border: 1.5px solid rgba(15, 34, 55, .45);
  background: rgba(255, 255, 255, .85);
}

.check input:checked {
  background: var(--blue);
  border-color: var(--blue);
}

.check input:checked::after {
  content: "";
  width: .3rem;
  height: .58rem;
  margin-top: -2px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  cursor: pointer;
  font-size: .92rem;
}

.switch input {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  margin: 0;
  cursor: pointer;
  position: relative;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: rgba(15, 34, 55, .22);
  transition: background .2s;
}

.switch input::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .3);
  transition: transform .2s;
}

.switch input:checked {
  background: var(--blue);
}

.switch input:checked::before {
  transform: translateX(18px);
}

/* choice pills (radio and checkbox groups) */
.choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.choice {
  position: relative;
  display: inline-block;
}

.choice input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.choice span {
  display: inline-flex;
  align-items: center;
  padding: .55rem .95rem;
  border-radius: 12px;
  font-size: .9rem;
  font-weight: 600;
  border: 1px solid rgba(15, 34, 55, .22);
  background: rgba(255, 255, 255, .65);
  transition: background .15s, border-color .15s;
}

.choice:hover span {
  background: #fff;
}

.choice input:checked+span {
  background: rgba(43, 108, 184, .14);
  border-color: var(--blue);
  color: var(--blue-d);
  box-shadow: inset 0 0 0 1px var(--blue);
}

.choice input:focus-visible+span {
  outline: 3px solid var(--blue-d);
  outline-offset: 2px;
}

/* form layout */
.form-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.1rem 1.25rem;
}

.col-3 {
  grid-column: span 3;
}

.col-4 {
  grid-column: span 4;
}

.col-6 {
  grid-column: span 6;
}

.col-12 {
  grid-column: span 12;
}

.form-section+.form-section {
  margin-top: 1.6rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.form-section h3 {
  margin-bottom: 1rem;
  font-size: .98rem;
  font-weight: 800;
  letter-spacing: -.01em;
}

.form-section h3 small {
  display: block;
  margin-top: .15rem;
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-top: 1.6rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--line);
}

.form-actions .right {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  margin-left: auto;
}


/* 6. Tables ---------------------------------------------------------- */
.table-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .7rem;
  margin-bottom: 1rem;
}

.table-tools .select {
  width: auto;
  min-width: 156px;
  height: 42px;
}

.table-tools .push {
  margin-left: auto;
}

.table-wrap {
  position: relative;
  overflow-x: auto;
  margin: 0 -.4rem;
  padding: 0 .4rem;
}

.data-table {
  width: 100%;
  min-width: 720px;
}

.data-table th {
  text-align: left;
  white-space: nowrap;
  padding: .6rem .7rem;
  font-size: .78rem;
  font-weight: 700;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.data-table td {
  padding: .8rem .7rem;
  vertical-align: middle;
  font-size: .9rem;
  border-bottom: 1px solid var(--line);
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, .55);
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table td.act {
  white-space: nowrap;
  text-align: right;
}

.who {
  display: flex;
  align-items: center;
  gap: .7rem;
}

.who>div {
  min-width: 8.5rem;
}

.who strong {
  display: block;
  font-size: .92rem;
  line-height: 1.25;
}

.who span {
  font-size: .78rem;
  color: var(--muted);
}

.av {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: .78rem;
  font-weight: 800;
  color: var(--blue-d);
  background: rgba(43, 108, 184, .16);
}

.score-mini {
  display: flex;
  align-items: center;
  gap: .65rem;
}

.score-mini .bar {
  width: 72px;
  height: 8px;
  flex: none;
}

.score-mini .sv {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  min-width: 1.8rem;
}

.table-foot {
  margin-top: .9rem;
  font-size: .82rem;
  color: var(--muted);
}

/* DataTables 2 theme (loaded after dataTables.dataTables.css, so selectors are
   written with extra specificity to win over the library defaults) */
div.dt-container {
  font-size: .9rem;
  color: var(--ink);
  min-width: 0;
  max-width: 100%;
}

.table-wrap:has(> .dt-container) {
  overflow-x: clip;
  margin: 0;
  padding: 0;
}

/* DataTables scrolls the table itself */

div.dt-container div.dt-layout-row {
  gap: .75rem;
  margin: .75rem 0;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

div.dt-container div.dt-layout-row:first-child {
  margin-top: 0;
}

div.dt-container div.dt-layout-row:last-child {
  margin-bottom: 0;
}

div.dt-container div.dt-layout-cell {
  min-width: 0;
}

div.dt-container div.dt-layout-table>div.dt-layout-cell {
  position: relative;
  overflow-x: auto;
  width: 100%;
}

/* search box and rows-per-page menu */
div.dt-container div.dt-search input.dt-input,
div.dt-container div.dt-length select.dt-input {
  height: 42px;
  margin: 0;
  font: inherit;
  font-size: .9rem;
  font-weight: 500;
  color: var(--ink);
  background-color: var(--field-bg);
  border: 1px solid var(--field-border);
  border-radius: 12px;
  box-shadow: inset 0 2px 5px rgba(70, 55, 30, .08);
  transition: border-color .2s, background-color .2s, box-shadow .2s;
}

div.dt-container div.dt-search input.dt-input {
  min-width: 270px;
  padding: 0 .9rem 0 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230f2237' stroke-opacity='.6' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: .85rem center;
  background-size: 16px;
}

div.dt-container div.dt-search input.dt-input::placeholder {
  color: rgba(15, 34, 55, .52);
  font-weight: 400;
}

div.dt-container div.dt-length select.dt-input {
  appearance: none;
  -webkit-appearance: none;
  padding: 0 2.2rem 0 .85rem;
  margin-right: .5rem;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230f2237' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .7rem center;
  background-size: 14px;
}

div.dt-container div.dt-search input.dt-input:focus,
div.dt-container div.dt-length select.dt-input:focus {
  outline: none;
  background-color: #fff;
  border-color: var(--blue);
  box-shadow: var(--ring);
}

div.dt-container div.dt-search label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

div.dt-container div.dt-length {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: var(--muted);
  font-weight: 600;
}

div.dt-container div.dt-info {
  padding: 0;
  color: var(--muted);
  font-size: .84rem;
}

/* pagination */
div.dt-container div.dt-paging {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0;
}

div.dt-container div.dt-paging nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .4rem;
}

div.dt-container div.dt-paging .dt-paging-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  margin: 0 !important;
  padding: 0 .75rem !important;
  font-family: inherit;
  font-size: .88rem !important;
  font-weight: 700;
  line-height: 1;
  color: var(--ink) !important;
  text-decoration: none !important;
  cursor: pointer;
  background: rgba(255, 255, 255, .78) !important;
  border: 1px solid rgba(15, 34, 55, .16) !important;
  border-radius: 12px !important;
  box-shadow: inset 0 1px 0 #fff, 0 6px 14px -10px rgba(70, 55, 30, .5) !important;
  transition: background .15s, border-color .15s, color .15s, transform .15s;
}

div.dt-container div.dt-paging .dt-paging-button.first,
div.dt-container div.dt-paging .dt-paging-button.previous,
div.dt-container div.dt-paging .dt-paging-button.next,
div.dt-container div.dt-paging .dt-paging-button.last {
  font-size: 1.15rem !important;
  padding: 0 .6rem !important;
}

div.dt-container div.dt-paging .dt-paging-button:hover:not(.disabled):not(.current) {
  color: var(--blue-d) !important;
  background: #fff !important;
  border-color: rgba(43, 108, 184, .55) !important;
  transform: translateY(-1px);
}

div.dt-container div.dt-paging .dt-paging-button:active:not(.disabled) {
  transform: translateY(0);
}

div.dt-container div.dt-paging .dt-paging-button:focus-visible {
  outline: 3px solid var(--blue-d);
  outline-offset: 2px;
}

div.dt-container div.dt-paging .dt-paging-button.current,
div.dt-container div.dt-paging .dt-paging-button.current:hover {
  color: #fff !important;
  cursor: default;
  background: linear-gradient(180deg, #4a9ae0, #2b6cb8) !important;
  border-color: rgba(255, 255, 255, .7) !important;
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .5), inset 0 -3px 8px rgba(9, 40, 90, .3), 0 10px 18px -10px rgba(31, 95, 166, .8) !important;
  transform: none;
}

div.dt-container div.dt-paging .dt-paging-button.disabled,
div.dt-container div.dt-paging .dt-paging-button.disabled:hover,
div.dt-container div.dt-paging .dt-paging-button.disabled:active {
  color: var(--ink) !important;
  opacity: .4;
  cursor: not-allowed;
  transform: none;
  background: rgba(255, 255, 255, .6) !important;
  border-color: rgba(15, 34, 55, .12) !important;
  box-shadow: none !important;
}

div.dt-container div.dt-paging .ellipsis {
  display: inline-flex;
  align-items: center;
  padding: 0 .2rem;
  color: var(--muted);
  font-weight: 700;
}

table.data-table.dataTable {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

table.data-table.dataTable>thead>tr>th,
table.data-table.dataTable>thead>tr>td {
  padding: .6rem 1.6rem .6rem .7rem;
  text-align: left;
  white-space: nowrap;
  background: transparent;
  font-size: .78rem;
  font-weight: 700;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

table.data-table.dataTable>thead>tr>th.dt-orderable-asc:hover,
table.data-table.dataTable>thead>tr>th.dt-orderable-desc:hover {
  outline: none;
  color: var(--ink);
}

table.data-table.dataTable>thead>tr>th.dt-ordering-asc,
table.data-table.dataTable>thead>tr>th.dt-ordering-desc {
  color: var(--ink);
}

table.data-table.dataTable>tbody>tr {
  background: transparent;
}

table.data-table.dataTable>tbody>tr>td {
  padding: .8rem .7rem;
  text-align: left;
  vertical-align: middle;
  font-size: .9rem;
  background: transparent;
  border-top: 0;
  border-bottom: 1px solid var(--line);
}

table.data-table.dataTable>tbody>tr:hover>td {
  background: rgba(255, 255, 255, .55);
}

table.data-table.dataTable>tbody>tr:last-child>td {
  border-bottom: 0;
}

table.data-table.dataTable>tbody>tr>td.act {
  text-align: right;
  white-space: nowrap;
}

table.data-table.dataTable>tbody>tr>td.dt-empty {
  text-align: center;
  color: var(--muted);
  font-weight: 600;
  padding: 1.5rem;
}


/* 7. Pills, alerts, toasts ------------------------------------------ */
.pill {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .22rem .65rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  white-space: nowrap;
}

.pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.pill.ok {
  color: #0f6b64;
  background: rgba(28, 156, 147, .16);
}

.pill.warn {
  color: #8a5410;
  background: rgba(224, 154, 69, .24);
}

.pill.danger {
  color: #a32424;
  background: rgba(214, 69, 69, .14);
}

.pill.info {
  color: #1f5fa6;
  background: rgba(43, 108, 184, .14);
}

.pill.neutral {
  color: #324a63;
  background: rgba(15, 34, 55, .08);
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  margin-bottom: 1.1rem;
  padding: .75rem 1rem;
  border-radius: 14px;
  font-size: .92rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: opacity .2s;
}

.alert>.bi:first-child {
  margin-top: .12rem;
  font-size: 1.05rem;
}

.alert .alert-text {
  flex: 1;
}

.alert.is-hiding {
  opacity: 0;
}

.alert-close {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  margin: -.2rem -.4rem 0 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  opacity: .7;
  cursor: pointer;
}

.alert-close:hover {
  opacity: 1;
  background: rgba(15, 34, 55, .08);
}

.alert-danger {
  color: #8a1c14;
  background: rgba(214, 69, 69, .12);
  border-color: rgba(214, 69, 69, .42);
}

.alert-success {
  color: #0f6b64;
  background: rgba(28, 156, 147, .14);
  border-color: rgba(28, 156, 147, .4);
}

.alert-warning {
  color: #8a5410;
  background: rgba(224, 154, 69, .2);
  border-color: rgba(224, 154, 69, .5);
}

.alert-info {
  color: #1f5fa6;
  background: rgba(43, 108, 184, .12);
  border-color: rgba(43, 108, 184, .35);
}

.toast-stack {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 60;
  transform: translateX(-50%);
  display: grid;
  gap: .5rem;
  justify-items: center;
  width: min(92vw, 440px);
  pointer-events: none;
}

/* Portal toast: always visible (override Bootstrap's .toast:not(.show) { display: none }) */
.toast,
.toast:not(.show):not(.showing) {
  display: flex !important;
  align-items: center;
  gap: .6rem;
  padding: .75rem 1.1rem;
  border-radius: 14px;
  font-weight: 600;
  font-size: .9rem;
  color: #fff;
  background: rgba(15, 34, 55, .95);
  box-shadow: 0 16px 32px -14px rgba(0, 0, 0, .55);
  pointer-events: auto;
  animation: toast-in .25s ease-out;
  transition: opacity .25s, transform .25s;
  /* Cancel Bootstrap toast variables so BS values never bleed through */
  --bs-toast-max-width: none;
  --bs-toast-bg: transparent;
  --bs-toast-border-width: 0;
  --bs-toast-border-color: transparent;
  --bs-toast-border-radius: 14px;
  --bs-toast-padding-x: .75rem;
  --bs-toast-padding-y: .75rem;
  --bs-toast-font-size: .9rem;
  --bs-toast-color: #fff;
  width: auto;
  max-width: 100%;
  border: 0;
  background-clip: border-box;
}

.toast.success .bi {
  color: #6fe0d4;
}

.toast.danger .bi {
  color: #ffb3aa;
}

.toast.warning .bi {
  color: #ffd08a;
}

.toast.is-leaving {
  opacity: 0;
  transform: translateY(8px);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}


/* 8. App shell ------------------------------------------------------- */
.app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  z-index: 30;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 1.25rem 1rem 1rem;
  border-radius: 0;
  border-left: 0;
}

.main {
  margin-left: var(--sidebar-w);
  padding: 88px 24px 40px;
  transition: margin-left .25s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: .7rem;
}

.sidebar .brand {
  flex-direction: column;
  align-items: flex-start;
  gap: .65rem;
  padding: .25rem .5rem 1.25rem;
}

.brand-mark {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.35rem;
  background: linear-gradient(145deg, #4a9ae0, #1f5fa6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 8px 18px -8px rgba(31, 95, 166, .6);
}

.brand-logo {
  flex: none;
  display: grid;
  place-items: center;
  height: 44px;
  padding: 0 .7rem;
  border-radius: 13px;
  background: rgba(255, 255, 255, .95);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 #fff;
}

.brand-logo img {
  display: block;
  max-height: 28px;
  max-width: 120px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.brand-name {
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: -.01em;
  line-height: 1.15;
}

.brand-sub {
  font-size: .74rem;
  color: var(--muted);
  font-weight: 500;
}

.nav-group {
  margin-top: .6rem;
}

.nav-title {
  margin: 0 .75rem .35rem;
  font-size: .74rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .02em;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 2px;
  padding: .62rem .75rem;
  border-radius: 14px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 600;
  font-size: .92rem;
  color: rgba(15, 34, 55, .82);
  transition: background .15s;
}

.nav-link .bi {
  flex: none;
  width: 1.3rem;
  font-size: 1.15rem;
  text-align: center;
}

.nav-link:hover {
  background: rgba(255, 255, 255, .65);
}

.nav-link[aria-current="page"] {
  color: #fff;
  background: linear-gradient(180deg, #4a9ae0, #2b6cb8);
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .5), 0 10px 20px -10px rgba(31, 95, 166, .7);
}

.nav-link .count {
  margin-left: auto;
  min-width: 24px;
  padding: .05rem .45rem;
  text-align: center;
  font-size: .76rem;
  font-weight: 700;
  border-radius: 999px;
  background: rgba(224, 154, 69, .25);
  color: #8a5410;
}

.side-foot {
  margin-top: auto;
  padding-top: 1rem;
}

.user {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin-top: .75rem;
  padding: .7rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, .6);
  border: 1px solid rgba(255, 255, 255, .9);
}

.user strong {
  display: block;
  font-size: .88rem;
  line-height: 1.2;
}

.user span {
  font-size: .76rem;
  color: var(--muted);
}

.topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  z-index: 20;
  height: 64px;
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 0 24px;
  border-radius: 0;
  border-width: 0 0 1px;
  transition: left .25s ease;
}

.topbar-end {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-left: auto;
}

.crumbs {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-width: 0;
  font-size: .9rem;
  font-weight: 600;
  color: var(--muted);
}

.crumbs a {
  display: inline-flex;
  text-decoration: none;
}

.crumbs a:hover {
  color: var(--ink);
}

.crumbs .bi-chevron-right {
  font-size: .7rem;
}

.crumbs [aria-current="page"] {
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
}

.date-chip {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .5rem .85rem;
  border-radius: 12px;
  font-size: .84rem;
  font-weight: 600;
  white-space: nowrap;
  background: rgba(255, 255, 255, .6);
  border: 1px solid rgba(255, 255, 255, .9);
}

/* dropdown menus: <div class="dropdown"><button data-dropdown-toggle ...></button><div class="dropdown-menu" hidden>...</div></div> */
.dropdown {
  position: relative;
}

.dropdown .icon-btn[aria-expanded="true"] {
  background: #fff;
  border-color: rgba(43, 108, 184, .5);
}

.icon-btn.profile {
  border-radius: 50%;
  font-size: 1.6rem;
  color: var(--blue-d);
}

/* Portal dropdown-menu: visible by default, hidden via [hidden] attribute.
   Overrides Bootstrap's .dropdown-menu { display: none; } which would otherwise
   keep the menu invisible because portal.js toggles [hidden], not .show. */
.dropdown-menu {
  display: block;
  position: absolute;
  right: 0;
  top: calc(100% + .7rem);
  z-index: 40;
  min-width: 240px;
  padding: .5rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, .97);
  border: 1px solid rgba(255, 255, 255, .95);
  box-shadow: 0 24px 48px -20px rgba(70, 55, 30, .5), 0 6px 16px -8px rgba(70, 55, 30, .25);
  animation: menu-in .15s ease-out;
  /* Cancel Bootstrap's .dropdown-menu variables so BS values never bleed through */
  --bs-dropdown-zindex: 40;
  --bs-dropdown-min-width: 240px;
  --bs-dropdown-padding-x: .5rem;
  --bs-dropdown-padding-y: .5rem;
  --bs-dropdown-bg: rgba(255, 255, 255, .97);
  --bs-dropdown-border-color: rgba(255, 255, 255, .95);
  --bs-dropdown-border-radius: 18px;
  --bs-dropdown-border-width: 1px;
  --bs-dropdown-box-shadow: none;
  --bs-dropdown-color: var(--ink);
  background-clip: border-box;
  list-style: none;
  margin: 0;
  font-size: .92rem;
}

.dropdown-menu[hidden] {
  display: none !important;
}

.dropdown-menu.show {
  display: block;
}

/* play nice if Bootstrap JS ever toggles .show */
@keyframes menu-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .6rem .75rem;
  border-radius: 12px;
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
}

.dropdown-menu a:hover {
  background: rgba(43, 108, 184, .1);
}

.dropdown-menu a .bi {
  font-size: 1.05rem;
  color: var(--muted);
}

.dropdown-menu a.danger,
.dropdown-menu a.danger .bi {
  color: #a32424;
}

.dropdown-menu a.danger:hover {
  background: rgba(214, 69, 69, .1);
}

.dropdown-menu hr {
  margin: .4rem .25rem;
  border: 0;
  border-top: 1px solid var(--line);
}

.menu-user {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .55rem .75rem .75rem;
}

.menu-user strong {
  display: block;
  font-size: .92rem;
  line-height: 1.2;
}

.menu-user span {
  font-size: .78rem;
  color: var(--muted);
}

.notif-menu {
  width: 340px;
}

.dropdown-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .45rem .75rem .6rem;
  font-size: .92rem;
}

.dropdown-menu a.notif {
  align-items: flex-start;
}

.notif .nt {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.dropdown-menu .nt .bi {
  color: inherit;
  font-size: .95rem;
}

.notif .nt.blue {
  background: rgba(43, 108, 184, .16);
  color: var(--blue-d);
}

.notif .nt.teal {
  background: rgba(28, 156, 147, .18);
  color: #0f6b64;
}

.notif .nt.amber {
  background: rgba(224, 154, 69, .26);
  color: #8a5410;
}

.notif strong {
  display: block;
  font-size: .86rem;
  line-height: 1.3;
  font-weight: 600;
}

.notif small {
  font-size: .76rem;
  font-weight: 500;
  color: var(--muted);
}

.scrim {
  display: none;
}

.content {
  padding-top: 0;
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.page-head h1 {
  margin: 0 0 .25rem;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.1;
}

.page-head p {
  color: var(--muted);
}

.head-actions {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
}

.s3 {
  grid-column: span 3;
}

.s4 {
  grid-column: span 4;
}

.s6 {
  grid-column: span 6;
}

.s8 {
  grid-column: span 8;
}

.s12 {
  grid-column: span 12;
}

.panel {
  min-width: 0;
  padding: 1.3rem 1.4rem;
  border-radius: 26px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.panel h2 {
  font-size: 1.06rem;
  font-weight: 800;
  letter-spacing: -.015em;
}

.panel .sub {
  margin-top: .15rem;
  font-size: .84rem;
  color: var(--muted);
}


@media (min-width: 992px) {
  .sidebar {
    transition: transform .25s ease, visibility 0s linear 0s;
  }

  body.sidebar-collapsed .sidebar {
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform .25s ease, visibility 0s linear .25s;
  }

  body.sidebar-collapsed .main {
    margin-left: 0;
  }

  body.sidebar-collapsed .topbar {
    left: 0;
  }
}


/* 9. Dashboard widgets ---------------------------------------------- */
.kpi {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

/* Quick actions panel — buttons row */
.quick-actions .btn {
  min-width: 0;
}

.quick-actions .btn .bi {
  font-size: 1.05rem;
}

.quick-actions .btn .count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 .35rem;
  font-size: .76rem;
  font-weight: 700;
  line-height: 1;
  border-radius: 999px;
  background: rgba(224, 154, 69, .28);
  color: #8a5410;
}

.quick-actions .btn.primary .count {
  background: rgba(255, 255, 255, .25);
  color: #fff;
}

@media (max-width: 640px) {
  .quick-actions .btn {
    flex: 1 1 calc(50% - .5rem);
  }
}

.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.kpi-label {
  font-size: .88rem;
  font-weight: 600;
  color: var(--muted);
}

.kpi-ico {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
}

.kpi-ico.blue {
  color: var(--blue-d);
  background: rgba(43, 108, 184, .15);
}

.kpi-ico.amber {
  color: #a8670f;
  background: rgba(224, 154, 69, .22);
}

.kpi-ico.red {
  color: #a32424;
  background: rgba(214, 69, 69, .14);
}

.kpi-ico.teal {
  color: #0f6b64;
  background: rgba(28, 156, 147, .16);
}

.kpi-value {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.kpi-note {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .84rem;
  color: var(--muted);
}

.delta {
  padding: .1rem .5rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
}

.delta.up {
  color: #0f6b64;
  background: rgba(28, 156, 147, .16);
}

.delta.warn {
  color: #8a5410;
  background: rgba(224, 154, 69, .22);
}

.delta.bad {
  color: #a32424;
  background: rgba(214, 69, 69, .14);
}

/* Chart.js canvases are drawn by your own script */
.chart-box {
  position: relative;
  height: 290px;
}

.chart-box canvas,
.donut-box canvas {
  display: block;
  max-width: 100%;
}

.chart-stats {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.6rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.chart-stats div {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-size: .88rem;
  font-weight: 600;
}

.chart-stats i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.chart-stats strong {
  font-variant-numeric: tabular-nums;
}

.donut-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: .25rem 0 1rem;
}

.donut-box {
  position: relative;
  width: 190px;
  height: 190px;
}

.donut-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  pointer-events: none;
}

.donut-center strong {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1;
}

.donut-center span {
  font-size: .8rem;
  color: var(--muted);
  font-weight: 600;
}

.d-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .55rem;
}

.d-legend li {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .9rem;
  font-weight: 600;
}

.d-legend i {
  width: 11px;
  height: 11px;
  border-radius: 4px;
  flex: none;
}

.d-legend .n {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

.d-legend .p {
  width: 3.2rem;
  text-align: right;
  color: var(--muted);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.list li {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .75rem 0;
  border-bottom: 1px solid var(--line);
}

.list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.list li:first-child {
  padding-top: 0;
}

.doc-ico {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  color: var(--blue-d);
  background: rgba(43, 108, 184, .14);
}

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

.list .grow strong {
  display: block;
  font-size: .92rem;
  line-height: 1.25;
}

.list .grow span {
  font-size: .8rem;
  color: var(--muted);
}

.score-group+.score-group {
  margin-top: 1.3rem;
}

.score-group h3 {
  margin-bottom: .6rem;
  font-size: .8rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .02em;
}

.score-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.6fr) 46px;
  align-items: center;
  gap: .9rem;
  padding: .65rem 0;
  border-bottom: 1px solid var(--line);
}

.score-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.score-row strong {
  display: block;
  font-size: .92rem;
  line-height: 1.25;
}

.score-row .m {
  font-size: .78rem;
  color: var(--muted);
}

.bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(15, 34, 55, .09);
  overflow: hidden;
}

.bar b {
  display: block;
  height: 100%;
  border-radius: 999px;
}

.score-val {
  font-weight: 800;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.feed {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.feed::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--line);
}

.feed li {
  position: relative;
  display: flex;
  gap: .85rem;
  padding: 0 0 1.05rem;
}

.feed li:last-child {
  padding-bottom: 0;
}

.feed .pt {
  position: relative;
  z-index: 1;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: .85rem;
  border: 3px solid #fbf6ea;
}

.feed .pt.blue {
  background: rgba(43, 108, 184, .2);
  color: var(--blue-d);
}

.feed .pt.teal {
  background: rgba(28, 156, 147, .22);
  color: #0f6b64;
}

.feed .pt.amber {
  background: rgba(224, 154, 69, .3);
  color: #8a5410;
}

.feed p {
  font-size: .88rem;
  line-height: 1.4;
}

.feed small {
  color: var(--muted);
  font-size: .78rem;
}


/* 10. Login page ----------------------------------------------------- */
.page-login {
  overflow-x: hidden;
}

.login-layout {
  position: relative;
  min-height: 100vh;
  max-width: 1240px;
  margin: 0 auto;
  padding: 3rem 2.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: center;
  gap: 3rem;
}

.login-layout .intro {
  max-width: 520px;
}

.login-layout .brand {
  gap: .8rem;
  margin-bottom: 2.5rem;
}

.login-layout .brand-logo {
  height: 52px;
  padding: 0 1rem;
  border-radius: 15px;
  box-shadow: inset 0 1px 0 #fff, 0 8px 18px -10px rgba(70, 55, 30, .4);
}

.login-layout .brand-logo img {
  max-height: 34px;
  max-width: 170px;
}

.login-layout .brand-name {
  font-weight: 700;
  font-size: 1.1rem;
}

.intro h2 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 3.6vw, 2.9rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.03em;
}

.intro p.sub {
  margin: 0 0 2.25rem;
  max-width: 44ch;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--muted);
}

.points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .9rem;
}

.points li {
  display: flex;
  align-items: center;
  gap: .95rem;
  padding: .85rem 1.1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, .5);
  border: 1px solid rgba(255, 255, 255, .85);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  box-shadow: inset 0 1px 0 #fff, 0 10px 24px -16px rgba(70, 55, 30, .35);
}

.points .ico {
  flex: none;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  border-radius: 12px;
  color: var(--blue-d);
  background: rgba(59, 130, 196, .16);
}

.points strong {
  display: block;
  font-size: .96rem;
  font-weight: 600;
}

.points span {
  font-size: .86rem;
  color: var(--muted);
}

/* the liquid glass sign-in card */
.glass-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  justify-self: center;
  width: min(100%, 440px);
  padding: 2.6rem 2.4rem 1.9rem;
  border-radius: 32px;
  --muted: rgba(15, 34, 55, .74);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .6), rgba(255, 255, 255, .22) 55%, rgba(255, 255, 255, .42)),
    rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(24px) saturate(180%) brightness(1.04);
  backdrop-filter: blur(24px) saturate(180%) brightness(1.04);
  border: 1px solid rgba(255, 255, 255, .85);
  box-shadow:
    inset 0 1.5px 0 #fff,
    inset 0 -1.5px 0 rgba(255, 255, 255, .6),
    inset 0 0 40px rgba(255, 255, 255, .35),
    0 32px 64px -28px rgba(70, 55, 30, .4),
    0 10px 22px -12px rgba(70, 55, 30, .28);
}

.glass-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(420px circle at 50% 0%, rgba(255, 255, 255, .7), transparent 60%);
}

.glass-card::after {
  content: "";
  position: absolute;
  top: -58%;
  left: -20%;
  width: 140%;
  height: 90%;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 70%);
}

.glass-card h1 {
  margin: 0 0 .45rem;
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1.15;
}

.glass-card .lede {
  margin: 0 0 1.8rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--muted);
}

.glass-card .field {
  margin-bottom: 1.1rem;
}

.glass-card .label {
  font-size: .95rem;
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: .2rem 0 1.5rem;
  font-size: .95rem;
}

.secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin: 1.4rem 0 0;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  font-size: .9rem;
  color: var(--muted);
}

.legal {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1.5rem;
  padding-top: 1.25rem;
  font-size: .82rem;
  color: var(--muted);
}

.legal nav {
  display: flex;
  gap: 1.25rem;
}

.legal a {
  color: var(--muted);
  text-decoration: none;
}

.legal a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* chain-of-custody backdrop: tilted route, checkpoints, moving lot pulses, record chips (CSS only) */
.stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.plane {
  position: absolute;
  left: 52%;
  top: 52%;
  width: 1600px;
  height: 1000px;
  margin: -500px 0 0 -800px;
  transform: perspective(1500px) rotateX(58deg) rotateZ(-34deg) scale(1.1);
  -webkit-mask-image: radial-gradient(closest-side, #000 48%, transparent 98%);
  mask-image: radial-gradient(closest-side, #000 48%, transparent 98%);
}

#chain .road {
  fill: none;
  stroke: rgba(42, 95, 168, .2);
  stroke-width: 30;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#chain .flow {
  fill: none;
  stroke: rgba(31, 95, 166, .55);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 2 18;
  animation: flow 3s linear infinite;
}

#chain .pulse {
  fill: none;
  stroke: #1c9c93;
  stroke-width: 9;
  stroke-linecap: round;
  stroke-dasharray: 55 945;
  stroke-dashoffset: 1000;
  animation: travel 14s linear infinite;
  filter: drop-shadow(0 0 8px rgba(28, 156, 147, .75));
}

#chain .pulse.p2 {
  stroke: #2b6cb8;
  animation-delay: -7s;
  filter: drop-shadow(0 0 8px rgba(43, 108, 184, .7));
}

#chain .branch {
  fill: none;
  stroke: rgba(224, 154, 69, .25);
  stroke-width: 18;
  stroke-linecap: round;
}

#chain .branch-flow {
  fill: none;
  stroke: rgba(224, 154, 69, .9);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 2 16;
  animation: flow 3.5s linear infinite;
}

@keyframes flow {
  to {
    stroke-dashoffset: -20;
  }
}

@keyframes travel {
  to {
    stroke-dashoffset: 0;
  }
}

#chain .pad-shadow {
  fill: rgba(40, 30, 10, .16);
}

#chain .pad {
  fill: rgba(255, 255, 255, .8);
  stroke: #fff;
  stroke-width: 3;
}

#chain .pad-edge {
  fill: none;
  stroke: rgba(42, 95, 168, .3);
  stroke-width: 2;
}

#chain .icon {
  fill: none;
  stroke: #1f5fa6;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#chain .amber .icon {
  stroke: #b8741f;
}

#chain .amber .pad-edge {
  stroke: rgba(224, 154, 69, .55);
}

#chain .ring {
  fill: none;
  stroke: #1c9c93;
  stroke-width: 4;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: ripple 7s ease-out var(--delay, 0s) infinite;
}

#chain .badge {
  opacity: .35;
  transform-box: fill-box;
  transform-origin: center;
  animation: confirm 7s ease-out var(--delay, 0s) infinite;
}

#chain .badge circle {
  fill: #1c9c93;
  stroke: #fff;
  stroke-width: 3;
}

#chain .badge path {
  fill: none;
  stroke: #fff;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes ripple {
  0% {
    opacity: 0;
    transform: scale(.85);
  }

  3% {
    opacity: .85;
  }

  22% {
    opacity: 0;
    transform: scale(1.7);
  }

  100% {
    opacity: 0;
    transform: scale(1.7);
  }
}

@keyframes confirm {
  0% {
    opacity: .35;
    transform: scale(.7);
  }

  4% {
    opacity: 1;
    transform: scale(1.25);
  }

  12% {
    transform: scale(1);
  }

  60% {
    opacity: 1;
  }

  100% {
    opacity: .35;
    transform: scale(.7);
  }
}

.chip {
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: flex;
  align-items: center;
  gap: .65rem;
  white-space: nowrap;
  padding: .6rem .95rem .6rem .7rem;
  border-radius: 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, .58);
  border: 1px solid rgba(255, 255, 255, .95);
  box-shadow: inset 0 1px 0 #fff, 0 14px 28px -16px rgba(70, 55, 30, .45);
  -webkit-backdrop-filter: blur(10px) saturate(160%);
  backdrop-filter: blur(10px) saturate(160%);
  animation: bob var(--bob, 9s) ease-in-out var(--d, 0s) infinite alternate;
}

.chip .ci {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 1rem;
  color: var(--blue-d);
  background: rgba(59, 130, 196, .16);
}

.chip.ok .ci {
  color: #137a72;
  background: rgba(28, 156, 147, .16);
}

.chip.amber .ci {
  color: #a8670f;
  background: rgba(224, 154, 69, .2);
}

.chip strong {
  display: block;
  font-size: .86rem;
  font-weight: 700;
  line-height: 1.2;
}

.chip span.s {
  display: block;
  font-size: .76rem;
  color: var(--muted);
  line-height: 1.25;
}

@keyframes bob {
  from {
    transform: translateY(-9px);
  }

  to {
    transform: translateY(9px);
  }
}


/* 11. Responsive ----------------------------------------------------- */
@media (max-width: 1280px) {
  .s3 {
    grid-column: span 6;
  }

  .s4,
  .s6,
  .s8 {
    grid-column: span 12;
  }

  .donut-split {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2rem;
    align-items: center;
  }

  .donut-split .donut-wrap {
    margin: 0;
  }
}

@media (max-width: 1100px) {
  .hide-md {
    display: none;
  }
}

@media (max-width: 991px) {
  .main {
    margin-left: 0;
    padding: 76px 14px 32px;
  }

  .topbar {
    left: 0;
    padding: 0 14px;
  }

  .sidebar {
    top: 0;
    left: 0;
    bottom: 0;
    border-radius: 0 28px 28px 0;
    transform: translateX(-110%);
    visibility: hidden;
    transition: transform .25s ease, visibility 0s linear .25s;
  }

  .sidebar.open {
    transform: none;
    visibility: visible;
    transition: transform .25s ease;
  }

  .scrim.show {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 25;
    background: rgba(15, 34, 55, .35);
  }

  .col-3,
  .col-4 {
    grid-column: span 6;
  }
}

@media (max-width: 960px) {
  .login-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem 1.25rem;
  }

  .login-layout .intro {
    max-width: none;
  }

  .login-layout .brand {
    margin-bottom: 0;
  }

  .intro h2,
  .intro p.sub,
  .points {
    display: none;
  }

  .legal {
    justify-content: center;
  }

  .plane {
    left: 62%;
    transform: perspective(1500px) rotateX(58deg) rotateZ(-34deg) scale(.7);
  }
}

@media (max-width: 700px) {
  .hide-sm {
    display: none;
  }

  .dropdown-menu {
    position: fixed;
    top: 72px;
    left: 12px;
    right: 12px;
    width: auto;
    min-width: 0;
  }

  .plane {
    left: 50%;
    top: 56%;
    transform: perspective(1500px) rotateX(58deg) rotateZ(-34deg) scale(.62);
  }

  .chip {
    display: none;
  }

  .col-6,
  .col-3,
  .col-4 {
    grid-column: span 12;
  }
}

@media (max-width: 640px) {
  .s3 {
    grid-column: span 12;
  }

  .page-head h1 {
    font-size: 1.6rem;
  }

  .panel {
    padding: 1.1rem;
    border-radius: 22px;
  }

  .donut-split {
    display: block;
  }

  .donut-split .donut-wrap {
    margin: .25rem 0 1rem;
  }

  .score-row {
    grid-template-columns: 1fr 44px;
  }

  .score-row .bar {
    grid-column: 1 / -1;
    order: 3;
  }

  .head-actions .btn {
    flex: 1;
  }

  .table-tools>label {
    flex: 1 1 calc(50% - .35rem);
  }

  .table-tools .select {
    width: 100%;
  }

  div.dt-container .dt-search,
  div.dt-container .dt-search input {
    width: 100%;
    min-width: 0;
  }

  .form-actions .right {
    width: 100%;
    margin-left: 0;
  }

  .form-actions .right .btn {
    flex: 1;
  }
}

@media (max-width: 480px) {
  .glass-card {
    padding: 2rem 1.4rem 1.5rem;
    border-radius: 28px;
  }
}


/* 12. Reduced motion ------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
  }

  .chip,
  .toast,
  #chain .flow,
  #chain .branch-flow,
  #chain .pulse,
  #chain .ring,
  #chain .badge {
    animation: none;
  }

  #chain .pulse {
    stroke-dashoffset: 700;
  }

  #chain .ring {
    display: none;
  }

  #chain .badge {
    opacity: 1;
  }
}


/* 13. Supplier detail page ------------------------------------------- */
.sv-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 18px;
  padding: 1.4rem 1.6rem;
}

.sv-avatar {
  flex: none;
  width: 72px;
  height: 72px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: .02em;
  color: #fff;
  background: linear-gradient(145deg, #4a9ae0, #1f5fa6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 14px 28px -14px rgba(31, 95, 166, .7);
}

.sv-title {
  flex: 1 1 260px;
  min-width: 0;
}

.sv-title h1 {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.sv-title .meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .65rem;
}

.sv-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-left: auto;
}

.sv-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.sv-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .4rem;
}

.sv-stat .kpi-top {
  width: 100%;
}

.sv-stat-value {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.sv-stat-value.ok {
  color: #0f6b64;
}

.sv-stat-value.warn {
  color: #8a5410;
}

.sv-stat-value.danger {
  color: #a32424;
}

.sv-stat-value.info {
  color: #1f5fa6;
}

.sv-stat-note {
  font-size: .84rem;
  color: var(--muted);
}

.sv-stack {
  display: grid;
  gap: 18px;
  align-content: start;
  min-width: 0;
}

.dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem 1.75rem;
  margin: 0;
}

.dl>div {
  min-width: 0;
}

.dl dt {
  margin-bottom: .2rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .01em;
  color: var(--muted);
}

.dl dd {
  margin: 0;
  font-size: .95rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.dl .wide {
  grid-column: 1 / -1;
}

.sv-sub {
  margin: 1.4rem 0 1rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--line);
  font-size: .95rem;
  font-weight: 800;
}

.sv-inline {
  margin-left: .75rem;
  vertical-align: middle;
}

.contact {
  display: flex;
  gap: .9rem;
  padding: .95rem 0;
  border-bottom: 1px solid var(--line);
}

.contact:first-of-type {
  padding-top: 0;
}

.contact:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.contact>.av {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: .85rem;
}

.contact>div {
  min-width: 0;
}

.contact .role {
  display: block;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--muted);
}

.contact strong {
  display: block;
  margin: .1rem 0 .3rem;
  font-size: 1rem;
}

.contact a,
.contact .line {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: .2rem;
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.contact a:hover {
  color: var(--blue-d);
}

.contact .bi {
  flex: none;
  color: var(--muted);
}

.sv-empty {
  display: grid;
  justify-items: center;
  gap: .4rem;
  padding: 1.4rem 0;
  text-align: center;
  font-weight: 600;
  color: var(--muted);
}

.sv-empty .bi {
  font-size: 1.8rem;
  opacity: .6;
}

.feed .pt.red {
  background: rgba(214, 69, 69, .18);
  color: #a32424;
}

@media (max-width: 1280px) {
  .sv-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .sv-stats {
    grid-template-columns: 1fr;
  }

  .dl {
    grid-template-columns: 1fr;
  }

  .sv-hero {
    padding: 1.2rem;
  }

  .sv-actions {
    width: 100%;
    margin-left: 0;
  }

  .sv-actions .btn {
    flex: 1;
  }
}

/* Active-state "tab" button — used in supplier-type filter and similar tab groups */
.btn.active,
.btn[aria-current="page"] {
  color: #fff !important;
  background: linear-gradient(180deg, #4a9ae0, #2b6cb8) !important;
  border-color: rgba(255, 255, 255, .65) !important;
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, .5),
    inset 0 -3px 8px rgba(9, 40, 90, .3),
    0 10px 18px -10px rgba(31, 95, 166, .65) !important;
  pointer-events: none;
  /* can't click the tab you're already on */
}

/* Keep the icon visible on the active (blue) tab — white instead of dark */
.btn.active .bi,
.btn[aria-current="page"] .bi {
  color: #fff;
}

/* Small check mark on the right side of the active tab */
.btn.active .active-mark,
.btn[aria-current="page"] .active-mark {
  margin-left: .15rem;
  font-size: .9rem;
  opacity: .9;
}

/* Hover should NOT change the active tab's look */
.btn.active:hover,
.btn[aria-current="page"]:hover {
  background: linear-gradient(180deg, #4a9ae0, #2b6cb8) !important;
  filter: none;
}

/* Inactive tabs in this group: stronger hover so users feel the option */
.supplier-tabs .btn:not(.active):not([aria-current="page"]):hover {
  border-color: rgba(43, 108, 184, .55);
  color: var(--blue-d);
  background: #fff;
}










/* =====================================================================
   4b. Colored buttons — portal-flavored variants
   Use: <a class="btn primary"> / .success / .warning / .danger / .info / .teal / .dark
   ===================================================================== */

/* Primary (blue) — main action: Save, Add, Submit */
.btn.primary {
  color: #fff;
  border-color: rgba(255, 255, 255, .65);
  background: linear-gradient(180deg, #4a9ae0, #2b6cb8);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, .5),
    inset 0 -3px 8px rgba(9, 40, 90, .3),
    0 12px 22px -12px rgba(31, 95, 166, .75);
}

.btn.primary:hover {
  filter: brightness(1.07);
  background: linear-gradient(180deg, #4a9ae0, #2b6cb8);
}

/* Success (teal/green) — positive: Approve, Activate, Mark complete */
.btn.success {
  color: #fff;
  border-color: rgba(255, 255, 255, .65);
  background: linear-gradient(180deg, #27b3a9, #14877f);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, .45),
    inset 0 -3px 8px rgba(8, 60, 56, .3),
    0 12px 22px -12px rgba(28, 156, 147, .75);
}

.btn.success:hover {
  filter: brightness(1.07);
  background: linear-gradient(180deg, #27b3a9, #14877f);
}

/* Warning (amber) — caution: Edit, Request renewal, Conditional status */
.btn.warning {
  color: #fff;
  border-color: rgba(255, 255, 255, .65);
  background: linear-gradient(180deg, #ecb25e, #d18936);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, .45),
    inset 0 -3px 8px rgba(110, 70, 18, .3),
    0 12px 22px -12px rgba(224, 154, 69, .75);
}

.btn.warning:hover {
  filter: brightness(1.07);
  background: linear-gradient(180deg, #ecb25e, #d18936);
}

/* Danger (red) — destructive: Reject, Delete, Raise NC, Delist */
.btn.danger {
  color: #fff;
  border-color: rgba(255, 255, 255, .65);
  background: linear-gradient(180deg, #e26868, #c43b3b);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, .45),
    inset 0 -3px 8px rgba(95, 18, 18, .3),
    0 12px 22px -12px rgba(214, 69, 69, .75);
}

.btn.danger:hover {
  filter: brightness(1.07);
  background: linear-gradient(180deg, #e26868, #c43b3b);
}

/* Info (light blue) — secondary info: View, Help, Export */
.btn.info {
  color: #fff;
  border-color: rgba(255, 255, 255, .65);
  background: linear-gradient(180deg, #6ba3db, #4a86c4);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, .45),
    inset 0 -3px 8px rgba(20, 60, 110, .3),
    0 12px 22px -12px rgba(74, 134, 196, .7);
}

.btn.info:hover {
  filter: brightness(1.07);
  background: linear-gradient(180deg, #6ba3db, #4a86c4);
}

/* Teal — alternate positive (compliance / audit pass) */
.btn.teal {
  color: #fff;
  border-color: rgba(255, 255, 255, .65);
  background: linear-gradient(180deg, #2bbcb2, #1c9c93);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, .45),
    inset 0 -3px 8px rgba(8, 70, 65, .3),
    0 12px 22px -12px rgba(28, 156, 147, .7);
}

.btn.teal:hover {
  filter: brightness(1.07);
  background: linear-gradient(180deg, #2bbcb2, #1c9c93);
}

/* Dark (ink) — quiet, premium: secondary actions, settings */
.btn.dark {
  color: #fff;
  border-color: rgba(255, 255, 255, .55);
  background: linear-gradient(180deg, #2a4258, #0f2237);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, .25),
    inset 0 -3px 8px rgba(0, 0, 0, .35),
    0 12px 22px -12px rgba(15, 34, 55, .7);
}

.btn.dark:hover {
  filter: brightness(1.12);
  background: linear-gradient(180deg, #2a4258, #0f2237);
}

/* Outline / ghost variants — same color palette, but transparent background
   Use: <a class="btn outline-primary"> / .outline-success / .outline-danger / etc.
   Better for table rows and dense layouts where filled buttons are too heavy. */

.btn.outline-primary {
  color: var(--blue-d);
  border-color: rgba(43, 108, 184, .45);
  background: rgba(255, 255, 255, .75);
}

.btn.outline-primary:hover {
  background: rgba(43, 108, 184, .1);
  border-color: var(--blue);
}

.btn.outline-success {
  color: #0f6b64;
  border-color: rgba(28, 156, 147, .45);
  background: rgba(255, 255, 255, .75);
}

.btn.outline-success:hover {
  background: rgba(28, 156, 147, .12);
  border-color: var(--teal);
}

.btn.outline-warning {
  color: #8a5410;
  border-color: rgba(224, 154, 69, .5);
  background: rgba(255, 255, 255, .75);
}

.btn.outline-warning:hover {
  background: rgba(224, 154, 69, .14);
  border-color: var(--amber);
}

.btn.outline-danger {
  color: #a32424;
  border-color: rgba(214, 69, 69, .45);
  background: rgba(255, 255, 255, .75);
}

.btn.outline-danger:hover {
  background: rgba(214, 69, 69, .1);
  border-color: var(--red);
}

.btn.outline-info {
  color: #1f5fa6;
  border-color: rgba(74, 134, 196, .45);
  background: rgba(255, 255, 255, .75);
}

.btn.outline-info:hover {
  background: rgba(74, 134, 196, .12);
}

.btn.outline-dark {
  color: var(--ink);
  border-color: rgba(15, 34, 55, .3);
  background: rgba(255, 255, 255, .75);
}

.btn.outline-dark:hover {
  background: rgba(15, 34, 55, .08);
}

/* Active state — "you are here" pill, used on filter tabs and segmented controls */
.btn.active,
.btn[aria-current="page"] {
  color: #fff !important;
  background: linear-gradient(180deg, #4a9ae0, #2b6cb8) !important;
  border-color: rgba(255, 255, 255, .65) !important;
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, .5),
    inset 0 -3px 8px rgba(9, 40, 90, .3),
    0 10px 18px -10px rgba(31, 95, 166, .65) !important;
  pointer-events: none;
}

.btn.active:hover,
.btn[aria-current="page"]:hover {
  filter: none;
}

.btn.active .bi,
.btn[aria-current="page"] .bi {
  color: #fff;
}

/* Disabled — faded, no pointer */
.btn[disabled] {
  cursor: not-allowed;
  opacity: .55;
  filter: saturate(.6);
  pointer-events: none;
}

/* Compact buttons inside table rows */
.mini.ok {
  color: #fff;
  background: linear-gradient(180deg, #27b3a9, #14877f);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4);
}

.mini.ok:hover {
  filter: brightness(1.07);
}

.mini.no {
  color: #a32424;
  background: rgba(255, 255, 255, .8);
  border-color: rgba(214, 69, 69, .4);
}

.mini.no:hover {
  background: rgba(214, 69, 69, .1);
}

.mini.ghost {
  color: var(--blue-d);
  background: rgba(255, 255, 255, .8);
  border-color: rgba(43, 108, 184, .35);
}

.mini.ghost:hover {
  background: rgba(43, 108, 184, .1);
}

/* Same color variants for .mini (table-row) buttons */
.mini.primary {
  color: #fff;
  background: linear-gradient(180deg, #4a9ae0, #2b6cb8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4);
}

.mini.success {
  color: #fff;
  background: linear-gradient(180deg, #27b3a9, #14877f);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4);
}

.mini.warning {
  color: #fff;
  background: linear-gradient(180deg, #ecb25e, #d18936);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4);
}

.mini.danger {
  color: #fff;
  background: linear-gradient(180deg, #e26868, #c43b3b);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4);
}

.mini.info {
  color: #fff;
  background: linear-gradient(180deg, #6ba3db, #4a86c4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4);
}

.mini.dark {
  color: #fff;
  background: linear-gradient(180deg, #2a4258, #0f2237);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
}

/* =====================================================================
   9b. Risk assessment question + summary
   ===================================================================== */

/* One question = a numbered chip on the left + body on the right */
.risk-q {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, .55);
  border: 1px solid var(--line);
  transition: background .15s, border-color .15s;
}

.risk-q:hover {
  background: rgba(255, 255, 255, .85);
  border-color: rgba(43, 108, 184, .25);
}

.risk-q:focus-within {
  background: #fff;
  border-color: var(--blue);
  box-shadow: var(--ring);
}

.risk-q-num {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: .92rem;
  color: var(--blue-d);
  background: rgba(43, 108, 184, .15);
}

.risk-q-body {
  flex: 1;
  min-width: 0;
}

.risk-q-body .label {
  margin-bottom: .45rem;
  font-size: .95rem;
  line-height: 1.4;
}

/* Score summary panel */
.risk-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
  padding: 1.3rem 1.4rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, .6);
  border: 1px solid var(--line);
}

.risk-stat {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  min-width: 0;
}

.risk-stat-label {
  font-size: .74rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.risk-stat strong {
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.risk-stat .pill {
  font-size: .9rem;
  padding: .35rem .85rem;
  align-self: flex-start;
}

.risk-thresholds {
  font-size: .82rem;
  color: var(--muted);
  line-height: 1.4;
}

/* Stack the number above the body on small screens */
@media (max-width: 640px) {
  .risk-q {
    flex-direction: column;
    gap: .65rem;
  }

  .risk-summary {
    grid-template-columns: 1fr 1fr;
  }
}


/* Risk assessment question card */
.risk-q {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, .55);
  border: 1px solid var(--line);
  transition: background .15s, border-color .15s;
}

.risk-q:hover {
  background: rgba(255, 255, 255, .85);
  border-color: rgba(43, 108, 184, .25);
}

.risk-q:focus-within {
  background: #fff;
  border-color: var(--blue);
  box-shadow: var(--ring);
}

/* Header row: number chip + category name + dashed divider */
.risk-q-head {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding-bottom: .55rem;
  border-bottom: 1px dashed var(--line);
}

.risk-q-num {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: .88rem;
  color: var(--blue-d);
  background: rgba(43, 108, 184, .15);
}

.risk-q-name {
  font-size: .98rem;
  font-weight: 700;
  color: var(--ink);
}

/* Body — aligns with the number chip on the left */
.risk-q-body {
  padding-left: 2.5rem;
}

.risk-q-body .label {
  margin-bottom: .45rem;
  font-size: .95rem;
  line-height: 1.4;
  font-weight: 500;
}

/* Score summary panel */
.risk-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
  padding: 1.3rem 1.4rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, .6);
  border: 1px solid var(--line);
}

.risk-stat {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  min-width: 0;
}

.risk-stat-label {
  font-size: .74rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.risk-stat strong {
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.risk-stat .pill {
  font-size: .9rem;
  padding: .35rem .85rem;
  align-self: flex-start;
}

.risk-thresholds {
  font-size: .82rem;
  color: var(--muted);
  line-height: 1.4;
}

/* Stack on small screens */
@media (max-width: 640px) {
  .risk-q-body {
    padding-left: 0;
  }

  .risk-summary {
    grid-template-columns: 1fr 1fr;
  }
}

/* Supplier detail: Google Map placeholder. Put your embed <iframe> inside <div class="sv-map"></div> */
.sv-map {
  position: relative;
  height: 260px;
  margin-top: 1.25rem;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(15, 34, 55, .12);
  background: rgba(15, 34, 55, .05);
}

.sv-map:empty::before {
  content: "Map will appear here";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: .9rem;
  font-weight: 600;
  color: var(--muted);
}

.sv-map iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 640px) {
  .sv-map {
    height: 220px;
  }
}






/* Risk-list cell pills — compact so the 9-factor row stays readable */
.risk-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 .4rem;
  font-size: .82rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  border-radius: 8px;
}

.risk-cell::before {
  display: none;
}

/* Make the S1–S9 columns narrow and centered */
#riskTable th[title],
#riskTable td:nth-child(n+4):nth-child(-n+12) {
  text-align: center;
  width: 44px;
  padding-left: .35rem;
  padding-right: .35rem;
}

#riskTable tbody td {
  padding: .55rem .5rem;
}