@font-face {
  font-family: "Montserrat";
  src: url("/assets/fonts/Montserrat-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Oswald";
  src: url("/assets/fonts/Oswald-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 200 700;
  font-display: swap;
}

:root {
  --am-ink: #171717;
  --am-ink-soft: #252525;
  --am-muted: #6e6b68;
  --am-cream: #f7f3ea;
  --am-cream-dark: #ede6d9;
  --am-surface: #ffffff;
  --am-coffee: #5c341d;
  --am-coffee-dark: #3f2414;
  --am-coffee-dark-rgb: 92, 52, 29;
  --am-coffee-highlight: #8a6445;
  --am-coffee-soft: #f1e5d9;
  --am-green: #177b5b;
  --am-green-soft: #e5f5ef;
  --am-orange: #a85a00;
  --am-orange-soft: #fff0dc;
  --am-red: #b42318;
  --am-red-soft: #feeceb;
  --am-blue: #245f9c;
  --am-blue-soft: #e9f2fc;
  --am-border: #ded9d0;
  --am-radius-sm: 0.55rem;
  --am-radius: 0.85rem;
  --am-radius-lg: 1.25rem;
  --am-shadow-sm: 0 0.2rem 0.8rem rgba(23, 23, 23, 0.06);
  --am-shadow: 0 0.75rem 2rem rgba(23, 23, 23, 0.1);
  --am-sidebar-width: 17rem;
  --bs-body-font-family: "Montserrat", Arial, sans-serif;
  --bs-body-color: var(--am-ink);
  --bs-body-bg: var(--am-cream);
  --bs-primary: var(--am-coffee);
  --bs-primary-rgb: 122, 75, 42;
  --bs-link-color: var(--am-coffee);
  --bs-link-hover-color: var(--am-coffee-dark);
  --bs-border-color: var(--am-border);
}

html {
  min-height: 100%;
  background: var(--am-cream);
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 92% 3%, rgba(var(--am-coffee-dark-rgb), 0.11), transparent 28rem),
    var(--am-cream);
  color: var(--am-ink);
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 0.925rem;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

a {
  text-underline-offset: 0.18em;
}

.portal-line-info {
  color: var(--am-coffee);
  line-height: 1;
  text-decoration: none;
}

.portal-line-info:hover,
.portal-line-info:focus-visible {
  color: var(--am-coffee-dark);
}

.portal-line-tooltip .tooltip-inner {
  max-width: min(36rem, calc(100vw - 2rem));
  text-align: left;
  font-size: 0.9rem;
}

.portal-line-tooltip-label {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

:focus-visible {
  outline: 3px solid rgba(var(--am-coffee-dark-rgb), 0.28);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  z-index: 1090;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 1rem;
  transform: translateY(-160%);
  border-radius: var(--am-radius-sm);
  background: var(--am-surface);
  color: var(--am-ink);
  font-weight: 700;
  box-shadow: var(--am-shadow);
}

.skip-link:focus {
  transform: translateY(0);
}

.font-display,
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Oswald", "Arial Narrow", Arial, sans-serif;
  font-weight: 600;
}

.text-muted {
  color: var(--am-muted) !important;
}

.text-brand {
  color: var(--am-coffee) !important;
}

.bg-cream {
  background-color: var(--am-cream) !important;
}

.small-label,
.eyebrow {
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.085em;
  line-height: 1.3;
  text-transform: uppercase;
}

.eyebrow {
  margin-bottom: 0.35rem;
  color: var(--am-coffee);
}

.btn {
  --bs-btn-border-radius: 0.65rem;
  --bs-btn-padding-x: 1rem;
  --bs-btn-padding-y: 0.62rem;
  font-size: 0.86rem;
  font-weight: 700;
}

.btn-sm {
  --bs-btn-border-radius: 0.5rem;
  --bs-btn-padding-x: 0.75rem;
  --bs-btn-padding-y: 0.42rem;
}

.btn-primary {
  --bs-btn-bg: var(--am-coffee);
  --bs-btn-border-color: var(--am-coffee);
  --bs-btn-hover-bg: var(--am-coffee-dark);
  --bs-btn-hover-border-color: var(--am-coffee-dark);
  --bs-btn-active-bg: var(--am-coffee-dark);
  --bs-btn-active-border-color: var(--am-coffee-dark);
  --bs-btn-disabled-bg: var(--am-coffee);
  --bs-btn-disabled-border-color: var(--am-coffee);
  background-image: linear-gradient(135deg, var(--am-coffee-dark) 0%, var(--am-coffee) 58%, var(--am-coffee-highlight) 100%);
  box-shadow: 0 0.35rem 0.8rem rgba(var(--am-coffee-dark-rgb), 0.2);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background-image: linear-gradient(135deg, var(--am-coffee-dark) 0%, var(--am-coffee) 42%, var(--am-coffee-highlight) 100%);
  box-shadow: 0 0.5rem 1.1rem rgba(var(--am-coffee-dark-rgb), 0.3);
}

.btn-dark {
  --bs-btn-bg: var(--am-ink);
  --bs-btn-border-color: var(--am-ink);
  --bs-btn-hover-bg: #000;
  --bs-btn-hover-border-color: #000;
}

.auth-page {
  margin: 0;
  background: var(--am-cream);
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  padding: 1.5rem;
  place-items: center;
  background:
    radial-gradient(circle at 85% 5%, rgba(var(--am-coffee-dark-rgb), 0.15), transparent 24rem),
    var(--am-cream);
}

.auth-login-layout {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  grid-template-columns: 1fr;
  padding: 0;
  background:
    linear-gradient(90deg, rgba(8, 8, 8, 0.18) 0%, rgba(8, 8, 8, 0.08) 42%, rgba(8, 8, 8, 0.8) 100%),
    linear-gradient(0deg, rgba(8, 8, 8, 0.42) 0%, rgba(8, 8, 8, 0) 55%),
    url("/assets/brand/ambacht-pand.jpg") center center / cover no-repeat;
}

.auth-login-layout::before {
  position: absolute;
  z-index: -1;
  top: -15rem;
  right: -9rem;
  width: 38rem;
  height: 38rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--am-coffee-dark-rgb), 0.52), rgba(var(--am-coffee-dark-rgb), 0) 68%);
  filter: blur(0.1px);
  content: "";
  pointer-events: none;
}

.auth-login-layout::after {
  position: absolute;
  z-index: -1;
  right: clamp(1rem, 4vw, 4rem);
  bottom: clamp(1rem, 4vw, 4rem);
  width: clamp(6rem, 10vw, 10rem);
  height: 0.45rem;
  border-radius: 999px;
  background:
    linear-gradient(
      90deg,
      var(--am-coffee) 0 55%,
      rgba(255, 255, 255, 0.38) 55% 72%,
      rgba(255, 255, 255, 0.14) 72%
    );
  content: "";
}

.auth-screen-grid {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.045) 0,
      rgba(255, 255, 255, 0.045) 1px,
      rgba(0, 0, 0, 0.075) 1px,
      rgba(0, 0, 0, 0.075) 3px,
      transparent 3px,
      transparent 6px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(var(--am-coffee-dark-rgb), 0.04) 0,
      rgba(var(--am-coffee-dark-rgb), 0.04) 1px,
      rgba(30, 181, 255, 0.03) 1px,
      rgba(30, 181, 255, 0.03) 2px,
      transparent 2px,
      transparent 5px
    );
  mix-blend-mode: soft-light;
  opacity: 0.82;
  pointer-events: none;
}

.auth-screen-grid::before {
  position: absolute;
  inset: -22% 0 auto;
  height: 18%;
  background:
    linear-gradient(
      180deg,
      transparent 0,
      rgba(135, 220, 255, 0.025) 32%,
      rgba(255, 255, 255, 0.16) 72%,
      rgba(var(--am-coffee-dark-rgb), 0.09) 84%,
      transparent 100%
    );
  content: "";
  filter: blur(1px);
  animation: auth-crt-refresh 7.5s linear infinite;
}

.auth-screen-grid::after {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 45%, rgba(0, 0, 0, 0.12) 78%, rgba(0, 0, 0, 0.38) 118%),
    linear-gradient(90deg, rgba(var(--am-coffee-dark-rgb), 0.045), transparent 18% 82%, rgba(40, 190, 255, 0.025));
  box-shadow:
    inset 0 0 8rem rgba(0, 0, 0, 0.22),
    inset 0 0 1.5rem rgba(255, 255, 255, 0.035);
  content: "";
}

@keyframes auth-crt-refresh {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(790%);
  }
}

.auth-access {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(48rem, 48vw);
  min-width: 34rem;
  min-height: 100svh;
  margin-left: auto;
  padding: clamp(2rem, 4vw, 5rem);
  place-items: center;
}

.auth-card {
  width: min(100%, 35rem);
  padding: clamp(2rem, 4vw, 3.35rem);
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 1.35rem;
  background: rgba(255, 255, 255, 0.9);
  box-shadow:
    0 2rem 6rem rgba(0, 0, 0, 0.3),
    inset 0 1px rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(18px) saturate(1.12);
}

.auth-brand-corner {
  position: absolute;
  z-index: 2;
  top: clamp(1.75rem, 4vw, 4rem);
  left: clamp(1.75rem, 4vw, 4rem);
  padding: 1rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.9rem;
  background: rgba(10, 10, 10, 0.42);
  box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(12px);
}

.auth-brand-corner img {
  display: block;
  width: clamp(12rem, 18vw, 16.5rem);
  height: auto;
}

.auth-card .eyebrow {
  margin-bottom: 0.65rem;
}

.auth-card h1 {
  margin-bottom: 0.85rem;
  font-size: clamp(2.75rem, 5vw, 3.65rem);
  line-height: 1;
  letter-spacing: -0.025em;
}

.auth-intro {
  max-width: 28rem;
  margin-bottom: 2rem;
  color: var(--am-muted);
  font-size: 0.93rem;
}

.auth-login-button {
  display: grid;
  min-height: 3.65rem;
  margin-top: 2rem;
  grid-template-columns: 1.25rem 1fr 1.25rem;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  padding: 0.8rem 1.05rem;
  border-radius: 0.75rem;
  font-size: 0.86rem;
  text-align: left;
}

.auth-login-button .bi-microsoft {
  color: #fff;
  font-size: 1.05rem;
}

.auth-login-button .bi-arrow-right {
  opacity: 0.55;
  transition: transform 160ms ease, opacity 160ms ease;
}

.auth-login-button:hover .bi-arrow-right,
.auth-login-button:focus-visible .bi-arrow-right {
  opacity: 1;
  transform: translateX(0.2rem);
}

.auth-security-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin: 0.85rem 0 0;
  color: var(--am-muted);
  font-size: 0.67rem;
}

.auth-security-note i {
  color: var(--am-green);
  font-size: 0.78rem;
}

.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  border-color: #efd5a9;
  border-radius: 0.75rem;
  background: #fff7e8;
  color: #68410b;
}

.auth-alert > i {
  margin-top: 0.1rem;
}

.auth-alert strong,
.auth-alert span {
  display: block;
}

.auth-alert strong {
  margin-bottom: 0.2rem;
  font-size: 0.78rem;
}

.auth-alert span {
  font-size: 0.72rem;
}

.auth-card-footer {
  display: flex;
  flex-wrap: nowrap;
  gap: 0 0.45rem;
  margin-top: 2rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(74, 68, 62, 0.1);
  color: #8c8781;
  font-size: 0.62rem;
  white-space: nowrap;
}

.btn-outline-secondary {
  --bs-btn-color: #4c4946;
  --bs-btn-border-color: #cfc9bf;
  --bs-btn-hover-bg: var(--am-ink);
  --bs-btn-hover-border-color: var(--am-ink);
}

.btn-icon {
  display: inline-grid;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  place-items: center;
}

.btn-icon.btn-sm {
  width: 2rem;
  height: 2rem;
}

.form-control,
.form-select,
.input-group-text {
  min-height: 2.7rem;
  border-color: #d8d2c8;
  border-radius: 0.62rem;
  font-size: 0.88rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--am-coffee);
  box-shadow: 0 0 0 0.2rem rgba(var(--am-coffee-dark-rgb), 0.12);
}

.form-label {
  margin-bottom: 0.38rem;
  color: #373432;
  font-size: 0.77rem;
  font-weight: 750;
}

.form-text {
  color: var(--am-muted);
  font-size: 0.75rem;
}

.form-check-input:checked {
  border-color: var(--am-coffee);
  background-color: var(--am-coffee);
}

.input-group > :not(:first-child) {
  margin-left: -1px;
}

.card {
  --bs-card-border-color: rgba(74, 68, 62, 0.13);
  --bs-card-border-radius: var(--am-radius);
  --bs-card-cap-bg: transparent;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.92) 68%, rgba(241, 229, 217, 0.42) 100%);
  box-shadow: var(--am-shadow-sm);
}

.card-header {
  padding: 1rem 1.15rem;
  border-bottom-color: rgba(74, 68, 62, 0.1);
}

.card-body {
  padding: 1.15rem;
}

.card-title {
  margin: 0;
  font-size: 1.15rem;
}

.app-shell {
  min-height: 100vh;
  transition: filter 180ms ease, transform 180ms ease;
}

body.logout-modal-open .app-shell {
  filter: blur(20px);
  transform: scale(1.018);
}

body.logout-modal-open .modal-backdrop {
  opacity: 1;
  background: rgba(16, 16, 16, 0.58);
  -webkit-backdrop-filter: blur(12px) saturate(0.65);
  backdrop-filter: blur(12px) saturate(0.65);
}

.logout-confirmation .modal-dialog {
  max-width: 29rem;
  padding: 1rem;
}

.logout-confirmation .modal-content {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 2.25rem 7rem rgba(0, 0, 0, 0.42);
}

.logout-confirmation .modal-body {
  position: relative;
  padding: 2.25rem;
  text-align: center;
}

.logout-confirmation-close {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
}

.logout-confirmation-icon {
  display: grid;
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1.25rem;
  place-items: center;
  border-radius: 50%;
  background: var(--am-coffee-soft);
  color: var(--am-coffee);
  font-size: 1.55rem;
}

.logout-confirmation .eyebrow {
  margin-bottom: 0.45rem;
}

.logout-confirmation .modal-title {
  margin-bottom: 0.65rem;
  font-size: 2.25rem;
}

.logout-confirmation .modal-body > .text-muted {
  max-width: 22rem;
  margin: 0 auto;
}

.app-sidebar {
  --bs-offcanvas-width: var(--am-sidebar-width);
  width: var(--am-sidebar-width);
  background-color: var(--am-ink) !important;
  background-image:
    radial-gradient(circle at 15% 5%, rgba(var(--am-coffee-dark-rgb), 0.42), transparent 15rem),
    linear-gradient(160deg, #171717 0%, #21150f 52%, #171717 100%);
  color: rgba(255, 255, 255, 0.82);
}

.sidebar-inner {
  display: flex;
  height: 100%;
  min-height: 100vh;
  flex-direction: column;
  padding: 1.25rem 1rem;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.72rem;
  color: #fff;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 2.45rem;
  height: 2.45rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 0.75rem;
  background: linear-gradient(145deg, var(--am-coffee-highlight) 0%, var(--am-coffee) 48%, var(--am-coffee-dark) 100%);
  color: #fff;
  font-family: "Oswald", "Arial Narrow", sans-serif;
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: -0.05em;
}

.brand-copy {
  line-height: 1.05;
}

.brand-copy strong {
  display: block;
  font-family: "Oswald", "Arial Narrow", sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.brand-copy span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-section-label {
  margin: 1.75rem 0 0.55rem;
  padding: 0 0.7rem;
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.63rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sidebar-nav {
  gap: 0.22rem;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.67rem 0.72rem;
  border-radius: 0.65rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.82rem;
  font-weight: 650;
  text-decoration: none;
}

.sidebar-nav .nav-link i {
  width: 1.25rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1rem;
  text-align: center;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.sidebar-nav .nav-link.active {
  background: linear-gradient(110deg, var(--am-coffee-dark) 0%, var(--am-coffee) 58%, var(--am-coffee-highlight) 100%);
  color: #fff;
  box-shadow: 0 0.45rem 1rem rgba(var(--am-coffee-dark-rgb), 0.22);
}

.sidebar-nav .nav-link.active i {
  color: #fff;
}

.sidebar-count {
  min-width: 1.4rem;
  margin-left: auto;
  padding: 0.08rem 0.35rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 0.65rem;
  text-align: center;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: auto;
  padding: 0.85rem 0.65rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.avatar {
  display: inline-grid;
  width: 2.35rem;
  height: 2.35rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--am-coffee-soft);
  color: var(--am-coffee-dark);
  font-size: 0.72rem;
  font-weight: 800;
}

.sidebar-user .avatar {
  background: rgba(var(--am-coffee-dark-rgb), 0.25);
  color: #fff;
}

.sidebar-user-copy {
  min-width: 0;
  line-height: 1.25;
}

.sidebar-user-copy strong,
.sidebar-user-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-copy strong {
  color: #fff;
  font-size: 0.75rem;
}

.sidebar-user-copy span {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.65rem;
}

.app-main {
  min-width: 0;
}

.mobile-topbar {
  min-height: 4.25rem;
  border-bottom: 1px solid var(--am-border);
  background: rgba(247, 243, 234, 0.9);
  backdrop-filter: blur(12px);
}

.page-wrap {
  width: min(100%, 100rem);
  margin: 0 auto;
  padding: 1.25rem;
}

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

.page-title {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.45rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.page-description {
  max-width: 48rem;
  margin: 0.38rem 0 0;
  color: var(--am-muted);
  font-size: 0.84rem;
}

.page-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.metric-card {
  position: relative;
  height: 100%;
  overflow: hidden;
}

.metric-card .card-body {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.metric-card::after {
  position: absolute;
  right: -1rem;
  bottom: -2.5rem;
  width: 7rem;
  height: 7rem;
  border-radius: 50%;
  background: radial-gradient(circle, var(--metric-accent, rgba(var(--am-coffee-dark-rgb), 0.14)) 0%, transparent 70%);
  content: "";
}

.metric-icon {
  display: grid;
  align-self: stretch;
  flex: 0 0 auto;
  width: auto;
  min-width: 2.8rem;
  min-height: 2.8rem;
  height: auto;
  aspect-ratio: 1 / 1;
  place-items: center;
  border-radius: 0.7rem;
  background: var(--metric-soft, var(--am-coffee-soft));
  color: var(--metric-color, var(--am-coffee));
  font-size: 1.2rem;
}

.metric-content {
  min-width: 0;
}

.metric-icon-green {
  --metric-soft: var(--am-green-soft);
  --metric-color: var(--am-green);
}

.metric-icon-orange {
  --metric-soft: var(--am-orange-soft);
  --metric-color: var(--am-orange);
}

.metric-value {
  font-family: "Oswald", "Arial Narrow", sans-serif;
  font-size: 1.8rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1;
}

.metric-label {
  margin-top: 0.35rem;
  color: var(--am-muted);
  font-size: 0.73rem;
  font-weight: 650;
}

.metric-trend {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  margin-top: 0.65rem;
  font-size: 0.68rem;
  font-weight: 750;
}

.metric-coffee {
  --metric-soft: var(--am-coffee-soft);
  --metric-color: var(--am-coffee);
  --metric-accent: rgba(var(--am-coffee-dark-rgb), 0.075);
}

.metric-green {
  --metric-soft: var(--am-green-soft);
  --metric-color: var(--am-green);
  --metric-accent: rgba(23, 123, 91, 0.07);
}

.metric-orange {
  --metric-soft: var(--am-orange-soft);
  --metric-color: var(--am-orange);
  --metric-accent: rgba(168, 90, 0, 0.07);
}

.metric-blue {
  --metric-soft: var(--am-blue-soft);
  --metric-color: var(--am-blue);
  --metric-accent: rgba(36, 95, 156, 0.07);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.56rem;
  border-radius: 2rem;
  font-size: 0.65rem;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
}

.status-badge::before {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status-draft {
  background: #efedeb;
  color: #615c57;
}

.status-neutral {
  background: #efedeb;
  color: #615c57;
}

.status-sent {
  background: var(--am-blue-soft);
  color: var(--am-blue);
}

.status-published {
  background: var(--am-orange-soft);
  color: var(--am-orange);
}

.status-viewed,
.status-question {
  background: var(--am-orange-soft);
  color: var(--am-orange);
}

.status-accepted,
.status-complete {
  background: var(--am-green-soft);
  color: var(--am-green);
}

.status-declined,
.status-expired,
.status-error {
  background: var(--am-red-soft);
  color: var(--am-red);
}

.status-revoked {
  background: #efedeb;
  color: #615c57;
  text-decoration: line-through;
}

.table-card {
  overflow: hidden;
}

.table {
  --bs-table-bg: transparent;
  --bs-table-border-color: rgba(74, 68, 62, 0.1);
  margin: 0;
  vertical-align: middle;
}

.table > :not(caption) > * > * {
  padding: 0.82rem 0.9rem;
}

.table thead th {
  border-bottom-width: 1px;
  background: #faf8f4;
  color: #77716b;
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}

.table tbody td {
  font-size: 0.78rem;
}

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

.table tbody tr:hover {
  --bs-table-hover-bg: rgba(var(--am-coffee-dark-rgb), 0.025);
}

.message-row-unread {
  background: rgba(var(--am-coffee-dark-rgb), 0.035);
}

.message-preview-cell {
  max-width: 30rem;
}

.message-preview {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-bubble-thread {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.message-thread-surface {
  max-height: min(100vh, 48rem);
  overflow-y: auto;
  padding: 1rem;
  border: 1px solid rgba(74, 68, 62, 0.12);
  border-radius: 1rem;
  background: linear-gradient(180deg, #f7f3ea 0%, #fbfaf8 100%);
  scrollbar-color: #b9afa5 transparent;
}

.message-thread-shell {
  overflow: hidden;
  border: 1px solid rgba(74, 68, 62, 0.14);
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 0.25rem 0.9rem rgba(32, 29, 27, 0.06);
}

.message-thread-shell .message-thread-surface {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.message-thread-shell .message-composer,
.message-thread-shell .portal-message-composer {
  margin-top: 0;
  border: 0 !important;
  border-top: 1px solid rgba(74, 68, 62, 0.12) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.message-thread-shell .message-composer:not(.portal-message-composer) {
  padding: 1rem 1.25rem 1.1rem;
}

@media (max-width: 575.98px) {
  .message-thread-shell .message-composer:not(.portal-message-composer) {
    padding: 0.85rem;
  }
}

.message-composer,
.portal-message-composer {
  margin-top: 1rem;
  border: 1px solid rgba(74, 68, 62, 0.16) !important;
  border-radius: 1rem !important;
  background: #fff;
}

.message-composer-heading {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.7rem;
  color: var(--am-ink);
}

.message-composer-heading > span:last-child {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.message-composer-heading small {
  margin-top: 0.12rem;
  color: var(--am-muted);
  font-size: 0.7rem;
}

.message-composer-avatar {
  display: inline-grid;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--am-coffee-soft);
  color: var(--am-coffee-dark);
}

.message-composer-avatar-admin {
  background: var(--am-ink);
  color: #fff;
}

.message-composer-input-row {
  display: flex;
  align-items: flex-end;
  gap: 0.65rem;
  padding: 0.45rem 0.45rem 0.45rem 0.85rem;
  border: 1px solid rgba(74, 68, 62, 0.16);
  border-radius: 1.5rem;
  background: #faf8f4;
}

.message-composer-input {
  min-height: 2.1rem;
  max-height: 9rem;
  padding: 0.35rem 0;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  resize: vertical;
  overflow-y: auto;
}

.message-composer-input:focus {
  outline: 0;
}

.message-composer-send {
  display: inline-grid;
  width: 2.35rem;
  height: 2.35rem;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--am-ink);
  color: #fff;
  transition: transform 160ms ease, background-color 160ms ease;
}

.message-composer-send:hover,
.message-composer-send:focus-visible {
  background: var(--am-coffee-dark);
  transform: translateY(-1px);
}

.message-composer-send:focus-visible {
  outline: 2px solid var(--am-orange);
  outline-offset: 3px;
}

.message-thread-panel .card-body { padding: 1.25rem; }

.portal-section {
  padding: 1.5rem;
  border: 1px solid rgba(74, 68, 62, 0.13);
  border-radius: var(--am-radius);
  background: rgba(255, 255, 255, 0.56);
}

.portal-resources-section .portal-resource-card {
  border: 1px solid rgba(74, 68, 62, 0.15) !important;
  box-shadow: 0 0.35rem 1rem rgba(32, 29, 27, 0.07) !important;
}

.portal-response-card { top: 1.5rem; }

.message-composer-heading {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.7rem;
  color: var(--am-ink);
}

.message-composer-heading > span:last-child {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.message-composer-heading small {
  margin-top: 0.12rem;
  color: var(--am-muted);
  font-size: 0.7rem;
}

.message-composer-avatar {
  display: inline-grid;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--am-coffee-soft);
  color: var(--am-coffee-dark);
}

.message-composer-avatar-admin {
  background: #5a5048;
  color: #fff;
}

.message-composer-input-row {
  display: flex;
  align-items: flex-end;
  gap: 0.65rem;
  padding: 0.45rem 0.45rem 0.45rem 0.85rem;
  border: 1px solid rgba(74, 68, 62, 0.16);
  border-radius: 1.5rem;
  background: #faf8f4;
}

.message-composer-input {
  min-height: 2.1rem;
  max-height: 9rem;
  padding: 0.35rem 0;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  resize: vertical;
}

.message-composer-input:focus { outline: 0; }

.message-composer-send {
  display: inline-grid;
  width: 2.35rem;
  height: 2.35rem;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #5a5048;
  color: #fff;
  transition: transform 160ms ease, background-color 160ms ease;
}

.message-composer-send:hover,
.message-composer-send:focus-visible {
  background: #3f3732;
  transform: translateY(-1px);
}

.message-composer-send:focus-visible {
  outline: 2px solid var(--am-orange);
  outline-offset: 3px;
}

.message-bubble {
  width: fit-content;
  max-width: min(85%, 42rem);
  padding: 0.9rem 1rem;
  border: 1px solid rgba(74, 68, 62, 0.14);
  border-radius: 1rem;
  box-shadow: 0 0.2rem 0.75rem rgba(32, 29, 27, 0.07);
  overflow-wrap: anywhere;
}

.message-bubble-incoming {
  align-self: flex-start;
  border-bottom-left-radius: 0.28rem;
  background: #fff;
  color: var(--am-ink);
}

.message-bubble-outgoing {
  align-self: flex-end;
  border-color: #66594f;
  border-bottom-right-radius: 0.28rem;
  background: linear-gradient(135deg, #5a5048 0%, #473f39 100%);
  color: #fff;
  box-shadow: 0 0.25rem 0.9rem rgba(61, 51, 43, 0.16);
}

.message-bubble-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  margin-bottom: 0.45rem;
  font-size: 0.72rem;
}

.message-bubble-meta time {
  opacity: 0.72;
  white-space: nowrap;
}

.message-revision-label {
  display: inline-flex;
  align-items: center;
  min-height: 1.35rem;
  padding: 0.12rem 0.45rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 750;
  line-height: 1;
  opacity: 0.78;
  white-space: nowrap;
}

.message-bubble-body {
  line-height: 1.5;
}

.message-event-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 800;
}

.message-event-icon {
  display: inline-grid;
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 1rem;
  line-height: 1;
}

.message-bubble-rejection {
  border-color: rgba(179, 38, 30, 0.28);
  background: var(--am-red-soft);
  color: var(--am-red);
}

.message-bubble-rejection .message-bubble-body {
  color: var(--am-ink);
}

.portal-page {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  flex-direction: column;
}

.portal-page > main {
  flex: 1 0 auto;
}

.portal-page > footer {
  margin-top: auto;
}

.portal-invalid-link-section {
  display: flex;
  align-items: center;
  min-height: 32rem;
}

.portal-error-card {
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(var(--am-coffee-dark-rgb), 0.12);
  border-radius: var(--am-radius-lg);
  background: var(--am-surface);
  box-shadow: var(--am-shadow);
}

.portal-error-card-accent {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 8rem;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.1), transparent 70%),
    var(--am-coffee-dark);
}

.portal-error-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4.5rem;
  height: 4.5rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  color: #fff;
  font-size: 2.4rem;
}

.portal-error-card-body {
  padding: 2rem;
}

@media (min-width: 768px) {
  .portal-error-card {
    grid-template-columns: 10rem 1fr;
  }

  .portal-error-card-accent {
    min-height: 100%;
  }

  .portal-error-card-body {
    padding: 3rem;
  }
}

.portal-secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  font-size: 0.9rem;
  text-decoration: none;
}

.portal-secondary-action:hover,
.portal-secondary-action:focus-visible {
  color: var(--am-ink) !important;
  text-decoration: underline;
}

.portal-secondary-action:focus-visible {
  border-radius: 0.2rem;
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.portal-reject-action {
  opacity: 0.62;
}

.portal-reject-action:hover,
.portal-reject-action:focus-visible {
  opacity: 1;
}

.portal-brand-logo {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.portal-brand-logo img {
  display: block;
  width: auto;
  height: 2rem;
}

.portal-security-label {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 0.45rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  font-weight: 650;
}

.portal-security-icon {
  flex: 0 0 auto;
  color: #55d6ac;
  filter: drop-shadow(0 0 0.45rem rgba(85, 214, 172, 0.22));
}

.portal-code-inputs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.6rem;
  max-width: 25rem;
}

.portal-code-digit {
  min-width: 0;
  padding: 0.7rem 0.2rem;
  border-width: 2px;
  border-radius: 0.7rem;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  line-height: 1;
  text-align: center;
}

.portal-code-digit:focus {
  border-color: var(--am-coffee);
  box-shadow: 0 0 0 0.25rem rgba(var(--am-coffee-dark-rgb), 0.14);
}

#berichten[aria-busy="true"] {
  opacity: 0.72;
  transition: opacity 120ms ease;
}

.table-primary-link {
  color: var(--am-ink);
  font-weight: 750;
  text-decoration: none;
}

.table-primary-link:hover {
  color: var(--am-coffee);
  text-decoration: underline;
}

.list-group-item.active {
  border-color: var(--am-coffee-dark);
  background: linear-gradient(110deg, var(--am-coffee-dark) 0%, var(--am-coffee) 62%, var(--am-coffee-highlight) 100%);
  color: #fff;
}

.list-group-item.active:hover,
.list-group-item.active:focus-visible {
  border-color: var(--am-coffee-dark);
  background: linear-gradient(110deg, var(--am-coffee-dark) 0%, var(--am-coffee) 42%, var(--am-coffee-highlight) 100%);
  color: #fff;
}

.filter-bar {
  display: flex;
  align-items: end;
  gap: 0.65rem;
  padding: 1rem;
  border-bottom: 1px solid rgba(74, 68, 62, 0.1);
  background: rgba(250, 248, 244, 0.72);
}

.filter-search {
  width: min(100%, 25rem);
}

.filter-select {
  width: 12rem;
}

.empty-state {
  padding: 3.5rem 1.5rem;
  text-align: center;
}

.empty-state-icon {
  display: grid;
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1rem;
  place-items: center;
  border-radius: 1rem;
  background: var(--am-coffee-soft);
  color: var(--am-coffee);
  font-size: 1.45rem;
}

.alert-panel {
  display: flex;
  gap: 0.8rem;
  padding: 0.9rem;
  border: 1px solid rgba(74, 68, 62, 0.1);
  border-radius: 0.72rem;
  background: #fff;
  color: inherit;
  text-decoration: none;
}

.alert-panel + .alert-panel {
  margin-top: 0.65rem;
}

.alert-panel:hover {
  border-color: rgba(var(--am-coffee-dark-rgb), 0.3);
  color: inherit;
  box-shadow: var(--am-shadow-sm);
}

.alert-panel-icon {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 0.58rem;
  background: var(--am-orange-soft);
  color: var(--am-orange);
}

.alert-panel-danger .alert-panel-icon {
  background: var(--am-red-soft);
  color: var(--am-red);
}

.alert-panel-copy {
  min-width: 0;
}

.alert-panel-copy strong,
.alert-panel-copy span {
  display: block;
}

.alert-panel-copy strong {
  font-size: 0.76rem;
}

.alert-panel-copy span {
  margin-top: 0.15rem;
  color: var(--am-muted);
  font-size: 0.68rem;
}

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

.timeline::before {
  position: absolute;
  top: 0.6rem;
  bottom: 0.6rem;
  left: 0.45rem;
  width: 1px;
  background: var(--am-border);
  content: "";
}

.timeline-item {
  position: relative;
  padding: 0 0 1.05rem 1.65rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  top: 0.32rem;
  left: 0.13rem;
  width: 0.65rem;
  height: 0.65rem;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--am-coffee);
  box-shadow: 0 0 0 1px var(--am-coffee);
}

.timeline-copy {
  font-size: 0.73rem;
}

.timeline-copy strong {
  font-weight: 750;
}

.timeline-time {
  margin-top: 0.15rem;
  color: var(--am-muted);
  font-size: 0.64rem;
}

.pipeline-row + .pipeline-row {
  margin-top: 1rem;
}

.pipeline-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
}

.progress {
  --bs-progress-height: 0.42rem;
  --bs-progress-bg: #ece7df;
  border-radius: 2rem;
}

.progress-bar {
  border-radius: inherit;
  background: var(--am-coffee);
}

.resource-upload-progress {
  display: block;
  width: 100%;
  height: 0.42rem;
  overflow: hidden;
  border: 0;
  border-radius: 2rem;
  appearance: none;
  background: #ece7df;
}

.resource-upload-progress::-webkit-progress-bar {
  border-radius: inherit;
  background: #ece7df;
}

.resource-upload-progress::-webkit-progress-value {
  border-radius: inherit;
  background: var(--am-coffee);
}

.resource-upload-progress::-moz-progress-bar {
  border-radius: inherit;
  background: var(--am-coffee);
}

.progress-value-7 {
  width: 7%;
}

.progress-value-0 {
  width: 0;
}

.progress-value-22 {
  width: 22%;
}

.progress-value-30 {
  width: 30%;
}

.progress-value-41 {
  width: 41%;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.section-heading h2,
.section-heading h3 {
  margin: 0;
  font-size: 1.15rem;
}

.quote-layout {
  align-items: start;
}

.quote-toolbar {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: -1.25rem -1.25rem 1.25rem;
  padding: 0.8rem 1.25rem;
  border-bottom: 1px solid var(--am-border);
  background: rgba(247, 243, 234, 0.93);
  backdrop-filter: blur(10px);
}

.save-state {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--am-muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.save-state-dot {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: #9b958e;
}

.save-state.is-dirty .save-state-dot {
  background: var(--am-orange);
}

.save-state.is-saved .save-state-dot {
  background: var(--am-green);
}

.quote-lines {
  display: grid;
  gap: 0.75rem;
}

.quote-line {
  position: relative;
  border: 1px solid rgba(74, 68, 62, 0.14);
  border-radius: 0.78rem;
  background: #fff;
  box-shadow: 0 0.2rem 0.7rem rgba(23, 23, 23, 0.035);
  transition: border-color 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.quote-line:hover,
.quote-line:focus-within {
  border-color: rgba(var(--am-coffee-dark-rgb), 0.28);
  box-shadow: 0 0.35rem 1rem rgba(23, 23, 23, 0.07);
}

.quote-line.is-dragging {
  opacity: 0.45;
}

.quote-line.is-drop-target {
  border-color: var(--am-coffee);
  box-shadow: 0 0 0 0.18rem rgba(var(--am-coffee-dark-rgb), 0.1);
}

.quote-line-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.7rem;
  border-bottom: 1px solid rgba(74, 68, 62, 0.09);
  background: #fbfaf7;
  border-radius: 0.78rem 0.78rem 0 0;
}

.drag-handle {
  border: 0;
  background: transparent;
  color: #958f88;
  cursor: grab;
}

.drag-handle:active {
  cursor: grabbing;
}

.line-number {
  display: grid;
  width: 1.4rem;
  height: 1.4rem;
  place-items: center;
  border-radius: 50%;
  background: #ece8e2;
  color: #59544f;
  font-size: 0.62rem;
  font-weight: 800;
}

.line-kind-label {
  margin-right: auto;
  color: var(--am-muted);
  font-size: 0.65rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.quote-line-body {
  padding: 0.85rem;
}

.quote-line-total {
  font-family: "Oswald", "Arial Narrow", sans-serif;
  font-size: 1rem;
  font-weight: 650;
  white-space: nowrap;
}

.line-admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.45rem;
  border-radius: 0.4rem;
  background: #efedeb;
  color: #5f5a55;
  font-size: 0.59rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.line-admin-badge[data-admin="social"] {
  background: var(--am-coffee-soft);
  color: var(--am-coffee-dark);
}

.quote-line.is-content-line .js-priced-fields,
.quote-line.is-content-line .js-admin-field,
.quote-line.is-content-line .js-article-field {
  display: none !important;
}

.quote-line:not(.is-content-line) .js-content-hint {
  display: none !important;
}

.quote-line:not(.is-article-line) .js-article-field {
  display: none !important;
}

.quote-line .tox-tinymce {
  border-color: var(--bs-border-color);
  border-radius: var(--bs-border-radius-sm);
}

.quote-line .tox-tinymce:focus-within {
  border-color: #e86ba9;
  box-shadow: 0 0 0 0.2rem rgba(var(--am-coffee-dark-rgb), 0.12);
}

.quote-rich-text > :first-child {
  margin-top: 0;
}

.quote-rich-text > :last-child {
  margin-bottom: 0;
}

.quote-rich-text p {
  margin-bottom: 0.55rem;
}

.quote-rich-text ul,
.quote-rich-text ol {
  margin-bottom: 0.55rem;
  padding-left: 1.4rem;
}

.quote-add-menu {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.quote-add-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 3.25rem;
  padding: 0.65rem;
  border: 1px dashed #cbc4bb;
  border-radius: 0.68rem;
  background: #faf8f4;
  color: var(--am-ink);
  font-size: 0.7rem;
  font-weight: 750;
  text-align: left;
}

.quote-add-option:hover {
  border-color: var(--am-coffee);
  background: var(--am-coffee-soft);
  color: var(--am-coffee-dark);
}

.quote-add-option i {
  color: var(--am-coffee);
  font-size: 1rem;
}

.quote-summary {
  position: sticky;
  top: 1rem;
}

.summary-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0;
  color: var(--am-muted);
  font-size: 0.75rem;
}

.summary-line strong {
  color: var(--am-ink);
  font-weight: 750;
}

.summary-total {
  margin-top: 0.5rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--am-border);
  color: var(--am-ink);
  font-size: 0.85rem;
  font-weight: 750;
}

.summary-total strong {
  font-family: "Oswald", "Arial Narrow", sans-serif;
  font-size: 1.45rem;
}

.quote-preview {
  overflow: hidden;
  border: 1px solid #ddd6cc;
  border-radius: 0.7rem;
  background: #fff;
  color: #282522;
  box-shadow: 0 0.6rem 1.5rem rgba(23, 23, 23, 0.08);
}

.quote-preview-head {
  padding: 1.1rem;
  background: var(--am-ink);
  color: #fff;
}

.quote-preview-head .brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
  font-size: 0.95rem;
}

.quote-preview-body {
  padding: 1.1rem;
}

.quote-preview h4 {
  font-size: 1.15rem;
  text-transform: uppercase;
}

.preview-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee9e2;
  font-size: 0.65rem;
}

.preview-line.preview-section {
  display: block;
  padding-top: 0.85rem;
  border-bottom-color: var(--am-ink);
  font-family: "Oswald", "Arial Narrow", sans-serif;
  font-size: 0.74rem;
  font-weight: 650;
  text-transform: uppercase;
}

.preview-line.preview-text {
  display: block;
  color: #6c6660;
  font-size: 0.6rem;
  line-height: 1.5;
}

.preview-meta {
  color: #85807a;
  font-size: 0.58rem;
}

.form-section {
  padding: 1.15rem;
  border: 1px solid rgba(74, 68, 62, 0.13);
  border-radius: var(--am-radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--am-shadow-sm);
}

.form-section + .form-section {
  margin-top: 1rem;
}

.form-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(74, 68, 62, 0.1);
}

.form-section-heading h2 {
  margin: 0;
  font-size: 1.15rem;
}

.form-section-heading p {
  margin: 0.2rem 0 0;
  color: var(--am-muted);
  font-size: 0.72rem;
}

.customer-cell {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.customer-cell-copy {
  min-width: 0;
}

.customer-cell-copy strong,
.customer-cell-copy span {
  display: block;
}

.customer-cell-copy strong {
  overflow: hidden;
  font-size: 0.75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-cell-copy span {
  margin-top: 0.08rem;
  color: var(--am-muted);
  font-size: 0.65rem;
}

.sync-state {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--am-muted);
  font-size: 0.65rem;
  font-weight: 700;
}

.sync-state i {
  color: var(--am-green);
}

.sync-state.is-missing i {
  color: var(--am-orange);
}

.entity-card {
  height: 100%;
  padding: 1rem;
  border: 1px solid var(--am-border);
  border-radius: 0.75rem;
  background: #fbfaf7;
}

.entity-card.is-linked {
  border-color: rgba(23, 123, 91, 0.3);
  background: var(--am-green-soft);
}

.entity-mark {
  display: grid;
  width: 2.4rem;
  height: 2.4rem;
  place-items: center;
  border-radius: 0.65rem;
  background: var(--am-ink);
  color: #fff;
  font-family: "Oswald", "Arial Narrow", sans-serif;
  font-weight: 650;
}

.entity-mark.social {
  background: var(--am-coffee);
}

.mobile-records {
  display: none;
}

.mobile-record {
  display: block;
  padding: 1rem;
  border-bottom: 1px solid var(--am-border);
  color: inherit;
  text-decoration: none;
}

.mobile-record:last-child {
  border-bottom: 0;
}

.mobile-record:hover {
  background: #faf8f4;
  color: inherit;
}

.symen-escaping {
  transition: transform 140ms ease-out;
}

.mobile-record-head,
.mobile-record-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.mobile-record-meta {
  margin-top: 0.5rem;
  color: var(--am-muted);
  font-size: 0.68rem;
}

.toast-container {
  z-index: 1095;
}

.app-toast {
  overflow: hidden;
  border: 0;
  border-left: 4px solid var(--am-coffee);
  border-radius: 0.7rem;
  box-shadow: var(--am-shadow);
}

.app-toast.toast-success {
  border-left-color: var(--am-green);
}

.app-toast.toast-error {
  border-left-color: var(--am-red);
}
.app-toast.toast-warning {
  border-left-color: var(--am-orange);
}

.demo-notice {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid #efdcbf;
  border-radius: 0.65rem;
  background: #fff7ea;
  color: #72420a;
  font-size: 0.7rem;
}

@media (min-width: 992px) {
  .app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    transform: none !important;
    visibility: visible !important;
  }

  .app-main {
    min-height: 100vh;
    margin-left: var(--am-sidebar-width);
  }

  .page-wrap {
    padding: 1.75rem 2rem 2.5rem;
  }
}

@media (max-width: 991.98px) {
  .auth-login-layout {
    background-position: 44% center;
  }

  .auth-access {
    width: min(40rem, 58vw);
    min-width: 30rem;
    padding: 2rem;
  }

  .auth-brand-corner {
    top: 2rem;
    left: 2rem;
  }

  .app-sidebar .offcanvas-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .sidebar-inner {
    min-height: calc(100vh - 4.5rem);
  }

  .quote-toolbar {
    top: 4.25rem;
  }

  .quote-summary {
    position: static;
  }
}

@media (max-width: 767.98px) {
  .auth-login-layout {
    background:
      linear-gradient(0deg, rgba(8, 8, 8, 0.82) 0%, rgba(8, 8, 8, 0.16) 72%),
      linear-gradient(90deg, rgba(8, 8, 8, 0.18), rgba(8, 8, 8, 0.3)),
      url("/assets/brand/ambacht-pand.jpg") 44% center / cover no-repeat;
  }

  .auth-login-layout::before {
    top: auto;
    right: -12rem;
    bottom: -13rem;
  }

  .auth-access {
    width: 100%;
    min-width: 0;
    min-height: 100svh;
    padding: 7rem 1.25rem 1.25rem;
    place-items: end center;
  }

  .auth-brand-corner {
    top: 1.25rem;
    left: 1.25rem;
    padding: 0.8rem 0.9rem;
  }

  .auth-brand-corner img {
    width: 12rem;
  }

  .page-wrap {
    padding: 1rem;
  }

  .page-header {
    align-items: stretch;
    flex-direction: column;
  }

  .page-actions > .btn {
    flex: 1 1 auto;
  }

  .filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-search,
  .filter-select {
    width: 100%;
  }

  .message-bubble {
    max-width: 92%;
  }

  .message-bubble-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.25rem;
  }

  .message-bubble-meta > span {
    justify-content: flex-start !important;
  }

  .portal-brand-logo img {
    height: 1.65rem;
  }

  .portal-security-label {
    gap: 0.35rem;
    font-size: 0.72rem;
  }

  .portal-security-icon {
    width: 1.05rem;
    height: 1.05rem;
  }

  .portal-code-inputs {
    gap: 0.4rem;
  }

  .portal-code-digit {
    padding: 0.65rem 0.1rem;
    border-radius: 0.6rem;
  }

  .desktop-records {
    display: none;
  }

  .mobile-records {
    display: block;
  }

  .quote-add-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quote-toolbar {
    margin-right: -1rem;
    margin-left: -1rem;
    padding-right: 1rem;
    padding-left: 1rem;
  }
}

@media (max-width: 575.98px) {
  .auth-access {
    padding: 6.5rem 0.75rem 0.75rem;
  }

  .auth-card {
    padding: 1.6rem;
    border-radius: 1rem;
  }

  .auth-card h1 {
    font-size: 2.6rem;
  }

  .auth-intro {
    margin-bottom: 1.5rem;
  }

  .auth-login-button {
    margin-top: 1.5rem;
  }

  .auth-card-footer {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.2rem 0.45rem;
    margin-top: 1.5rem;
    text-align: center;
    white-space: normal;
  }

  .quote-line-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .quote-line-head .line-kind-label {
    flex: 1 1 calc(100% - 5rem);
  }

  .quote-add-menu {
    grid-template-columns: 1fr;
  }

  .quote-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .quote-toolbar > div {
    width: 100%;
    flex-wrap: wrap;
  }

  .quote-toolbar > .justify-content-end {
    justify-content: flex-start !important;
  }

  .quote-add-option {
    min-height: 2.75rem;
  }

  .form-section {
    padding: 0.9rem;
  }
}

.quote-detail-tabs .nav-link {
  padding: 0.95rem 0.9rem;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--am-muted);
  font-size: 0.75rem;
  font-weight: 750;
}

.quote-detail-tabs .nav-link:hover {
  border-bottom-color: rgba(var(--am-coffee-dark-rgb), 0.25);
  color: var(--am-coffee-dark);
}

.quote-detail-tabs .nav-link.active {
  border-bottom-color: var(--am-coffee);
  background: transparent;
  color: var(--am-ink);
}

.quote-detail-copy {
  line-height: 1.7;
  white-space: pre-line;
}

.quote-detail-blocks {
  display: grid;
  gap: 0.8rem;
}

.quote-detail-section-title {
  margin: 0.4rem 0 0;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--am-border);
  font-size: 1rem;
}

.quote-detail-lines th {
  color: var(--am-muted);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.quote-detail-lines td {
  font-size: 0.75rem;
}

.quote-detail-free-text td {
  border: 0;
  background: var(--am-surface, #fff);
}

.quote-detail-totals {
  width: min(100%, 23rem);
}

.quote-detail-totals > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0;
  color: var(--am-muted);
  font-size: 0.75rem;
}

.quote-detail-totals strong {
  color: var(--am-ink);
}

.quote-detail-totals .total {
  margin-top: 0.35rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--am-border);
  color: var(--am-ink);
  font-size: 0.9rem;
}

.quote-detail-totals .total strong {
  font-family: "Oswald", "Arial Narrow", sans-serif;
  font-size: 1.35rem;
}

.quote-detail-meta > div {
  display: grid;
  grid-template-columns: minmax(6.5rem, 0.8fr) minmax(0, 1.2fr);
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(74, 68, 62, 0.08);
}

.quote-detail-meta > div:last-child {
  border-bottom: 0;
}

.quote-detail-meta dt {
  color: var(--am-muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.quote-detail-meta dd {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  text-align: right;
  overflow-wrap: anywhere;
}

.quote-detail-meta dd span {
  display: block;
  margin-top: 0.15rem;
  color: var(--am-muted);
  font-size: 0.65rem;
  font-weight: 500;
}

.quote-audit-list {
  padding: 0.25rem 1.25rem 1.25rem;
}

.quote-audit-item {
  position: relative;
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.85rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(74, 68, 62, 0.1);
}

.quote-audit-item:last-child {
  border-bottom: 0;
}

.quote-audit-icon {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 50%;
  background: var(--am-coffee-soft);
  color: var(--am-coffee-dark);
}

.quote-audit-copy h3 {
  margin: 0;
  font-size: 0.82rem;
}

.quote-audit-copy code {
  display: inline-block;
  margin-top: 0.35rem;
  color: var(--am-muted);
  font-size: 0.62rem;
}

.health-container {
  max-width: 52.5rem;
}

@media print {
  .app-sidebar,
  .mobile-topbar,
  .page-actions,
  .quote-toolbar,
  .btn,
  .filter-bar {
    display: none !important;
  }

  .app-main {
    margin: 0;
  }

  .page-wrap {
    width: 100%;
    padding: 0;
  }

  body {
    background: #fff;
  }

  .card,
  .form-section {
    border-color: #ddd;
    box-shadow: none;
  }
}

.portal-confetti {
  position: fixed;
  z-index: 2000;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
.quote-resource-image,
.portal-resource-image {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: var(--bs-tertiary-bg);
}

@media (max-width: 575.98px) {
  .quote-resource-image,
  .portal-resource-image {
    height: 180px;
  }
}
