:root {
  --demo-bg: #f3f2ee;
  --demo-paper: #ffffff;
  --demo-ink: #15171a;
  --demo-muted: #6f7278;
  --demo-line: #deddd7;
  --demo-dark: #0d0f12;
  --demo-dark-2: #15181d;
  --demo-gold: #d6b476;
  --demo-gold-pale: #f5ead6;
  --demo-green: #2e8159;
  --demo-green-pale: #e4f2ea;
  --demo-orange: #a85f22;
  --demo-orange-pale: #faeadc;
  --demo-red: #a43a3f;
  --demo-red-pale: #f7e4e5;
  --demo-blue: #3f648d;
  --demo-blue-pale: #e5edf6;
  --demo-sidebar: 16.75rem;
  --demo-topbar: 4.75rem;
  --demo-disclaimer: 2.25rem;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

:focus-visible {
  outline: 3px solid rgba(214, 180, 118, 0.82);
  outline-offset: 3px;
}

.demo-body {
  min-width: 320px;
  min-height: 100vh;
  background: var(--demo-bg);
  color: var(--demo-ink);
}

.demo-skip {
  position: fixed;
  z-index: 1000;
  left: 1rem;
  top: 0;
  padding: 0.8rem 1rem;
  background: var(--demo-gold);
  color: var(--demo-dark);
  font-weight: 800;
  transform: translateY(-120%);
  transition: transform 160ms ease;
}

.demo-skip:focus {
  transform: translateY(0.5rem);
}

.demo-disclaimer {
  position: fixed;
  z-index: 90;
  inset: 0 0 auto;
  min-height: var(--demo-disclaimer);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.48rem 1.25rem;
  border-bottom: 1px solid rgba(214, 180, 118, 0.2);
  background: #08090b;
  color: #d6d3cc;
  font-size: 0.68rem;
  letter-spacing: 0.025em;
}

.demo-disclaimer span {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  color: var(--demo-gold);
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.demo-disclaimer i,
.demo-sidebar__footer i {
  width: 0.45rem;
  height: 0.45rem;
  display: inline-block;
  border-radius: 50%;
  background: #62ba88;
  box-shadow: 0 0 0 0.22rem rgba(98, 186, 136, 0.12);
}

.demo-disclaimer p {
  margin: 0;
}

.demo-disclaimer a {
  font-weight: 700;
  text-underline-offset: 0.2em;
}

.demo-topbar {
  position: fixed;
  z-index: 80;
  inset: var(--demo-disclaimer) 0 auto;
  height: var(--demo-topbar);
  display: grid;
  grid-template-columns: var(--demo-sidebar) 1fr auto;
  align-items: center;
  border-bottom: 1px solid var(--demo-line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
}

.demo-brand {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0 1.35rem;
  border-right: 1px solid #2a2d33;
  background: var(--demo-dark);
  color: #fff;
  text-decoration: none;
}

.demo-brand__mark {
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--demo-gold);
  color: var(--demo-gold);
  font-family: Georgia, serif;
  font-size: 1.25rem;
}

.demo-brand > span:last-child {
  min-width: 0;
  display: grid;
  gap: 0.1rem;
}

.demo-brand strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.demo-brand small {
  overflow: hidden;
  color: #9d9fa5;
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.demo-company {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding-left: 1.5rem;
}

.demo-company > span {
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--demo-gold-pale);
  color: #704f22;
  font-weight: 900;
}

.demo-company div {
  display: grid;
  gap: 0.15rem;
}

.demo-company strong {
  font-size: 0.83rem;
}

.demo-company small {
  color: var(--demo-muted);
  font-size: 0.7rem;
}

.demo-topbar__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-right: 1.25rem;
}

.demo-icon-button,
.demo-menu {
  border: 1px solid var(--demo-line);
  background: #fff;
  color: var(--demo-ink);
}

.demo-icon-button {
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 50%;
  font-weight: 900;
}

.demo-request {
  min-height: 2.65rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 1rem;
  background: var(--demo-dark);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.055em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.demo-request:hover {
  background: var(--demo-gold);
  color: var(--demo-dark);
  transform: translateY(-1px);
}

.demo-menu {
  width: 2.75rem;
  height: 2.75rem;
  display: none;
  place-items: center;
  padding: 0.65rem;
}

.demo-menu span {
  width: 1.2rem;
  height: 1px;
  display: block;
  margin: 0.16rem auto;
  background: currentColor;
}

.demo-sidebar {
  position: fixed;
  z-index: 70;
  inset: calc(var(--demo-topbar) + var(--demo-disclaimer)) auto 0 0;
  width: var(--demo-sidebar);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  border-right: 1px solid #2a2d33;
  background: var(--demo-dark);
  color: #d7d7d4;
}

.demo-sidebar__intro {
  display: grid;
  gap: 0.38rem;
  padding: 1.5rem 1.35rem 1rem;
}

.demo-sidebar__intro span,
.demo-sidebar__footer span {
  color: #777b83;
  font-size: 0.59rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.demo-sidebar__intro strong {
  color: #f1efe9;
  font-size: 0.83rem;
}

.demo-navigation {
  display: grid;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem 1.25rem;
}

.demo-navigation button {
  position: relative;
  min-height: 2.95rem;
  display: grid;
  grid-template-columns: 1.3rem 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid transparent;
  background: transparent;
  color: #a9acb2;
  text-align: left;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.demo-navigation button:hover {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
  color: #fff;
}

.demo-navigation button.is-current {
  border-color: rgba(214, 180, 118, 0.2);
  background: rgba(214, 180, 118, 0.1);
  color: var(--demo-gold);
}

.demo-navigation button.is-current::before {
  position: absolute;
  inset: 0 auto 0 -0.76rem;
  width: 2px;
  content: "";
  background: var(--demo-gold);
}

.demo-navigation svg {
  width: 1.2rem;
  height: 1.2rem;
}

.demo-navigation button span {
  font-size: 0.78rem;
  font-weight: 650;
}

.demo-navigation button b {
  min-width: 1.45rem;
  padding: 0.2rem 0.3rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.08);
  color: #afb1b5;
  font-size: 0.61rem;
  text-align: center;
}

.demo-sidebar__footer {
  display: grid;
  gap: 1rem;
  margin-top: auto;
  padding: 1.2rem;
  border-top: 1px solid #282b30;
}

.demo-sidebar__footer div {
  display: grid;
  gap: 0.45rem;
}

.demo-sidebar__footer strong {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: #d5d4d0;
  font-size: 0.73rem;
}

.demo-sidebar__footer small {
  color: #85888e;
  font-size: 0.66rem;
  line-height: 1.5;
}

.demo-sidebar__footer button {
  min-height: 2.4rem;
  border: 1px solid #35383e;
  background: transparent;
  color: #aaa;
  font-size: 0.68rem;
  font-weight: 750;
}

.demo-sidebar__footer button:hover {
  border-color: var(--demo-gold);
  color: var(--demo-gold);
}

.demo-sidebar-overlay {
  display: none;
}

.demo-main {
  min-height: 100vh;
  margin-left: var(--demo-sidebar);
  padding: calc(var(--demo-topbar) + var(--demo-disclaimer) + 2rem) clamp(1.25rem, 3vw, 3rem) 3rem;
}

.demo-view {
  width: min(100%, 95rem);
  margin: 0 auto;
}

.demo-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.75rem;
}

.demo-page-head__copy {
  min-width: 0;
}

.demo-page-head__copy > span,
.demo-section-label {
  color: var(--demo-muted);
  font-size: 0.61rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.demo-page-head h1 {
  margin: 0.35rem 0 0.4rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 3.6vw, 3.4rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1;
}

.demo-page-head p {
  max-width: 62ch;
  margin: 0;
  color: var(--demo-muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.demo-page-head__aside {
  flex: 0 0 auto;
  color: var(--demo-muted);
  font-size: 0.72rem;
  text-align: right;
}

.demo-page-head__aside strong {
  display: block;
  margin-top: 0.25rem;
  color: var(--demo-ink);
  font-size: 0.86rem;
}

.demo-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}

.demo-kpi {
  position: relative;
  min-height: 10rem;
  overflow: hidden;
  padding: 1.2rem;
  border: 1px solid var(--demo-line);
  background: var(--demo-paper);
}

.demo-kpi::after {
  position: absolute;
  width: 6rem;
  height: 6rem;
  right: -2rem;
  bottom: -3rem;
  content: "";
  border-radius: 50%;
  background: var(--demo-gold-pale);
  opacity: 0.65;
}

.demo-kpi__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--demo-muted);
  font-size: 0.68rem;
  font-weight: 750;
}

.demo-kpi__top i {
  width: 0.55rem;
  height: 0.55rem;
  display: inline-block;
  border-radius: 50%;
  background: var(--demo-gold);
}

.demo-kpi strong {
  position: relative;
  z-index: 1;
  display: block;
  margin: 1rem 0 0.35rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.75rem;
  font-weight: 500;
  line-height: 1;
}

.demo-kpi small {
  position: relative;
  z-index: 1;
  color: var(--demo-muted);
  font-size: 0.67rem;
}

.demo-kpi.is-attention .demo-kpi__top i {
  background: var(--demo-orange);
}

.demo-kpi.is-good .demo-kpi__top i {
  background: var(--demo-green);
}

.demo-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(19rem, 0.65fr);
  gap: 1.2rem;
}

.demo-panel {
  border: 1px solid var(--demo-line);
  background: var(--demo-paper);
}

.demo-panel + .demo-panel {
  margin-top: 1.2rem;
}

.demo-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid var(--demo-line);
}

.demo-panel__head div {
  display: grid;
  gap: 0.2rem;
}

.demo-panel__head h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
  font-weight: 500;
}

.demo-panel__head small {
  color: var(--demo-muted);
  font-size: 0.66rem;
}

.demo-text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #76501f;
  font-size: 0.68rem;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 0.24em;
}

.demo-status-overview {
  display: grid;
  grid-template-columns: minmax(10rem, 0.7fr) minmax(0, 1.3fr);
  align-items: center;
  gap: 2rem;
  padding: 1.5rem;
}

.demo-ring {
  --progress: 82;
  width: 10.5rem;
  height: 10.5rem;
  display: grid;
  place-items: center;
  margin: auto;
  border-radius: 50%;
  background: conic-gradient(var(--demo-gold) calc(var(--progress) * 1%), #ece9e1 0);
}

.demo-ring::before {
  width: 7.8rem;
  height: 7.8rem;
  content: "";
  grid-area: 1 / 1;
  border-radius: 50%;
  background: #fff;
}

.demo-ring div {
  z-index: 1;
  grid-area: 1 / 1;
  text-align: center;
}

.demo-ring strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 500;
}

.demo-ring small {
  color: var(--demo-muted);
  font-size: 0.62rem;
}

.demo-bars {
  display: grid;
  gap: 0.9rem;
}

.demo-bar__label {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.4rem;
  color: var(--demo-muted);
  font-size: 0.68rem;
}

.demo-bar__label strong {
  color: var(--demo-ink);
}

.demo-bar__track {
  height: 0.4rem;
  overflow: hidden;
  background: #eceae4;
}

.demo-bar__track i {
  height: 100%;
  display: block;
  background: var(--demo-gold);
}

.demo-activity-list,
.demo-deadline-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.demo-activity-list li,
.demo-deadline-list li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 0.75rem;
  padding: 0.95rem 1.15rem;
  border-bottom: 1px solid var(--demo-line);
}

.demo-activity-list li:last-child,
.demo-deadline-list li:last-child {
  border-bottom: 0;
}

.demo-activity-list i,
.demo-deadline-list i {
  width: 0.56rem;
  height: 0.56rem;
  margin-top: 0.25rem;
  border-radius: 50%;
  background: var(--demo-blue);
}

.demo-activity-list div,
.demo-deadline-list div {
  min-width: 0;
}

.demo-activity-list strong,
.demo-deadline-list strong {
  display: block;
  font-size: 0.74rem;
}

.demo-activity-list small,
.demo-deadline-list small {
  display: block;
  margin-top: 0.22rem;
  color: var(--demo-muted);
  font-size: 0.64rem;
  line-height: 1.4;
}

.demo-activity-list time,
.demo-deadline-list time {
  color: var(--demo-muted);
  font-size: 0.61rem;
  white-space: nowrap;
}

.demo-filterbar {
  display: grid;
  grid-template-columns: minmax(14rem, 1fr) repeat(2, minmax(10rem, auto));
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.demo-search {
  position: relative;
}

.demo-search svg {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  width: 1rem;
  height: 1rem;
  color: var(--demo-muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.demo-filterbar input,
.demo-filterbar select {
  width: 100%;
  min-height: 3rem;
  border: 1px solid var(--demo-line);
  border-radius: 0;
  background: #fff;
  color: var(--demo-ink);
  font-size: 0.75rem;
}

.demo-filterbar input {
  padding: 0.75rem 0.9rem 0.75rem 2.75rem;
}

.demo-filterbar select {
  padding: 0.75rem 2.4rem 0.75rem 0.9rem;
}

.demo-results-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.65rem;
  color: var(--demo-muted);
  font-size: 0.66rem;
}

.demo-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--demo-line);
  background: #fff;
}

.demo-table {
  width: 100%;
  min-width: 50rem;
  border-collapse: collapse;
  font-size: 0.72rem;
}

.demo-table th,
.demo-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--demo-line);
  text-align: left;
  vertical-align: middle;
}

.demo-table th {
  background: #f8f7f3;
  color: var(--demo-muted);
  font-size: 0.6rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.demo-table tbody tr {
  transition: background 140ms ease;
}

.demo-table tbody tr:hover {
  background: #fbfaf7;
}

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

.demo-table__primary {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 12rem;
}

.demo-avatar {
  width: 2.1rem;
  height: 2.1rem;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--demo-gold-pale);
  color: #785526;
  font-size: 0.66rem;
  font-weight: 900;
}

.demo-table__primary div {
  min-width: 0;
}

.demo-table__primary strong {
  display: block;
  font-size: 0.72rem;
}

.demo-table__primary small {
  display: block;
  margin-top: 0.12rem;
  color: var(--demo-muted);
  font-size: 0.61rem;
}

.demo-row-action {
  min-height: 2.1rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--demo-line);
  background: #fff;
  color: var(--demo-ink);
  font-size: 0.63rem;
  font-weight: 800;
  white-space: nowrap;
}

.demo-row-action:hover {
  border-color: var(--demo-gold);
}

.demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
  padding: 0.35rem 0.55rem;
  border-radius: 5rem;
  background: #eee;
  color: #54575c;
  font-size: 0.59rem;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

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

.demo-badge--completed,
.demo-badge--active {
  background: var(--demo-green-pale);
  color: var(--demo-green);
}

.demo-badge--soon,
.demo-badge--review {
  background: var(--demo-orange-pale);
  color: var(--demo-orange);
}

.demo-badge--overdue,
.demo-badge--expired {
  background: var(--demo-red-pale);
  color: var(--demo-red);
}

.demo-badge--upcoming,
.demo-badge--draft {
  background: var(--demo-blue-pale);
  color: var(--demo-blue);
}

.demo-empty {
  padding: 3rem 1.25rem;
  border: 1px solid var(--demo-line);
  background: #fff;
  text-align: center;
}

.demo-empty strong {
  display: block;
  margin-bottom: 0.4rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
  font-weight: 500;
}

.demo-empty p {
  margin: 0;
  color: var(--demo-muted);
  font-size: 0.74rem;
}

.demo-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.demo-card {
  display: grid;
  min-height: 13rem;
  padding: 1.15rem;
  border: 1px solid var(--demo-line);
  background: #fff;
}

.demo-card__top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.demo-card__type {
  color: var(--demo-muted);
  font-size: 0.57rem;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.demo-card h2 {
  margin: 0.75rem 0 0.5rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.15;
}

.demo-card p {
  margin: 0;
  color: var(--demo-muted);
  font-size: 0.69rem;
  line-height: 1.5;
}

.demo-card__meta {
  align-self: end;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 1.2rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--demo-line);
  color: var(--demo-muted);
  font-size: 0.61rem;
}

.demo-card__meta button {
  border: 0;
  background: transparent;
  color: #76501f;
  font-size: 0.62rem;
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.demo-deadline-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.demo-deadline-column {
  min-width: 0;
  border-top: 2px solid var(--demo-blue);
}

.demo-deadline-column.is-soon {
  border-top-color: var(--demo-orange);
}

.demo-deadline-column.is-overdue {
  border-top-color: var(--demo-red);
}

.demo-deadline-column.is-completed {
  border-top-color: var(--demo-green);
}

.demo-deadline-column__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0.75rem;
  color: var(--demo-muted);
  font-size: 0.64rem;
  font-weight: 850;
  text-transform: uppercase;
}

.demo-deadline-column__head b {
  min-width: 1.35rem;
  padding: 0.18rem;
  border-radius: 50%;
  background: #e7e5df;
  color: var(--demo-ink);
  font-size: 0.57rem;
  text-align: center;
}

.demo-deadline-item {
  margin-bottom: 0.55rem;
  padding: 0.85rem;
  border: 1px solid var(--demo-line);
  background: #fff;
}

.demo-deadline-item span {
  color: var(--demo-muted);
  font-size: 0.57rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.demo-deadline-item strong {
  display: block;
  margin: 0.45rem 0;
  font-size: 0.71rem;
  line-height: 1.35;
}

.demo-deadline-item small {
  color: var(--demo-muted);
  font-size: 0.59rem;
}

.demo-report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.demo-report-grid .demo-panel {
  margin: 0;
}

.demo-report-body {
  padding: 1.35rem;
}

.demo-report-body .demo-bars {
  gap: 1rem;
}

.demo-donut-row {
  display: grid;
  grid-template-columns: 9rem 1fr;
  align-items: center;
  gap: 1.5rem;
}

.demo-donut-row .demo-ring {
  width: 8.5rem;
  height: 8.5rem;
}

.demo-donut-row .demo-ring::before {
  width: 6.25rem;
  height: 6.25rem;
}

.demo-legend {
  display: grid;
  gap: 0.6rem;
}

.demo-legend div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--demo-line);
  color: var(--demo-muted);
  font-size: 0.66rem;
}

.demo-legend b {
  color: var(--demo-ink);
}

.demo-company-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(20rem, 0.9fr);
  gap: 1rem;
}

.demo-company-card {
  padding: 1.5rem;
  border: 1px solid var(--demo-line);
  background: #fff;
}

.demo-company-card h2 {
  margin: 0.45rem 0 1rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.6rem;
  font-weight: 500;
}

.demo-definition-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
}

.demo-definition-list div {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--demo-line);
}

.demo-definition-list div:nth-child(odd) {
  padding-right: 1rem;
}

.demo-definition-list dt {
  color: var(--demo-muted);
  font-size: 0.59rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.demo-definition-list dd {
  margin: 0.3rem 0 0;
  font-size: 0.74rem;
  font-weight: 700;
}

.demo-company-card p {
  color: var(--demo-muted);
  font-size: 0.73rem;
  line-height: 1.65;
}

.demo-module-list {
  display: grid;
  gap: 0.5rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.demo-module-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem;
  background: #f5f4f0;
  font-size: 0.68rem;
}

.demo-module-list span {
  color: var(--demo-green);
  font-weight: 850;
}

.demo-dialog {
  width: min(48rem, calc(100% - 2rem));
  max-height: calc(100vh - 2rem);
  padding: 0;
  overflow: hidden;
  border: 1px solid #cfcac0;
  border-radius: 0;
  background: #fff;
  color: var(--demo-ink);
  box-shadow: 0 2rem 8rem rgba(0, 0, 0, 0.38);
}

.demo-dialog::backdrop {
  background: rgba(9, 10, 12, 0.72);
  backdrop-filter: blur(3px);
}

.demo-dialog__head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.3rem 1.5rem;
  border-bottom: 1px solid var(--demo-line);
}

.demo-dialog__head span {
  color: #8b6a38;
  font-size: 0.59rem;
  font-weight: 850;
  letter-spacing: 0.13em;
}

.demo-dialog__head h2 {
  margin: 0.35rem 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.8rem;
  font-weight: 500;
  line-height: 1.1;
}

.demo-dialog__head > button {
  width: 2.5rem;
  height: 2.5rem;
  flex: 0 0 auto;
  border: 1px solid var(--demo-line);
  background: #fff;
  color: var(--demo-ink);
  font-size: 1.4rem;
}

.demo-dialog__body {
  max-height: calc(100vh - 14rem);
  overflow-y: auto;
  padding: 1.5rem;
}

.demo-dialog__footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--demo-line);
  background: #f8f7f3;
}

.demo-primary-button,
.demo-secondary-button {
  min-height: 2.8rem;
  padding: 0.7rem 1rem;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.demo-primary-button {
  border: 1px solid var(--demo-dark);
  background: var(--demo-dark);
  color: #fff;
}

.demo-primary-button:hover {
  border-color: var(--demo-gold);
  background: var(--demo-gold);
  color: var(--demo-dark);
}

.demo-secondary-button {
  border: 1px solid var(--demo-line);
  background: #fff;
  color: var(--demo-ink);
}

.demo-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 1.2rem;
  border-top: 1px solid var(--demo-line);
}

.demo-detail-grid div {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--demo-line);
}

.demo-detail-grid div:nth-child(odd) {
  padding-right: 1rem;
}

.demo-detail-grid span {
  display: block;
  color: var(--demo-muted);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.demo-detail-grid strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.74rem;
}

.demo-detail-section {
  margin-top: 1.25rem;
}

.demo-detail-section h3 {
  margin: 0 0 0.6rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.1rem;
  font-weight: 500;
}

.demo-detail-section p {
  margin: 0;
  color: var(--demo-muted);
  font-size: 0.72rem;
  line-height: 1.65;
}

.demo-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.demo-tags li {
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--demo-line);
  background: #f8f7f3;
  color: #56595e;
  font-size: 0.62rem;
}

.demo-document-preview {
  position: relative;
  min-height: 15rem;
  margin-top: 1.25rem;
  padding: 1.5rem;
  overflow: hidden;
  border: 1px solid var(--demo-line);
  background: #f8f7f3;
}

.demo-document-preview::after {
  position: absolute;
  inset: 1rem 1rem auto auto;
  content: "DEMO";
  color: rgba(164, 58, 63, 0.22);
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  transform: rotate(-8deg);
}

.demo-document-preview > span {
  color: #76501f;
  font-size: 0.57rem;
  font-weight: 900;
  letter-spacing: 0.13em;
}

.demo-document-preview h3 {
  width: 70%;
  margin: 0.8rem 0 1rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 500;
}

.demo-document-lines {
  display: grid;
  gap: 0.45rem;
}

.demo-document-lines i {
  height: 0.42rem;
  display: block;
  background: #dedbd2;
}

.demo-document-lines i:nth-child(2) { width: 82%; }
.demo-document-lines i:nth-child(3) { width: 91%; }
.demo-document-lines i:nth-child(4) { width: 62%; }

.demo-confirm-box {
  margin-top: 1.2rem;
  padding: 1rem;
  border: 1px solid #d8c49e;
  background: #fbf5ea;
}

.demo-confirm-box strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.74rem;
}

.demo-confirm-box p {
  margin: 0;
  color: #6e6556;
  font-size: 0.68rem;
  line-height: 1.55;
}

.demo-help {
  width: min(40rem, calc(100% - 2rem));
}

.demo-help__steps {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.demo-help__steps li {
  display: grid;
  grid-template-columns: 2.6rem 1fr;
  gap: 0.9rem;
}

.demo-help__steps li > span {
  width: 2.6rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  border: 1px solid #d8c49e;
  color: #76501f;
  font-size: 0.65rem;
  font-weight: 900;
}

.demo-help__steps strong {
  font-size: 0.78rem;
}

.demo-help__steps p {
  margin: 0.25rem 0 0;
  color: var(--demo-muted);
  font-size: 0.69rem;
  line-height: 1.55;
}

.demo-notice {
  margin: 1.5rem 0 0;
  padding: 0.9rem;
  border-left: 2px solid var(--demo-gold);
  background: #f8f7f3;
  color: var(--demo-muted);
  font-size: 0.67rem;
  line-height: 1.6;
}

.demo-toast {
  position: fixed;
  z-index: 120;
  right: 1rem;
  bottom: 1rem;
  max-width: min(24rem, calc(100% - 2rem));
  padding: 0.9rem 1rem;
  border-left: 3px solid var(--demo-green);
  background: var(--demo-dark);
  color: #fff;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.25);
  font-size: 0.7rem;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transform: translateY(1rem);
  transition: opacity 170ms ease, transform 170ms ease;
}

.demo-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1100px) {
  :root {
    --demo-sidebar: 14.75rem;
  }

  .demo-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .demo-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .demo-deadline-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  :root {
    --demo-sidebar: min(19rem, 86vw);
    --demo-disclaimer: 2.6rem;
  }

  .demo-disclaimer {
    grid-template-columns: 1fr auto;
    padding-inline: 0.8rem;
  }

  .demo-disclaimer p {
    display: none;
  }

  .demo-topbar {
    grid-template-columns: auto 1fr auto;
    gap: 0.65rem;
    padding: 0 0.75rem;
  }

  .demo-menu {
    display: block;
  }

  .demo-brand {
    height: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--demo-ink);
  }

  .demo-brand__mark {
    width: 2rem;
    height: 2rem;
    background: var(--demo-dark);
  }

  .demo-brand small,
  .demo-company {
    display: none;
  }

  .demo-sidebar {
    z-index: 100;
    width: var(--demo-sidebar);
    transform: translateX(-102%);
    transition: transform 190ms ease;
  }

  .demo-body.is-menu-open {
    overflow: hidden;
  }

  .demo-body.is-menu-open .demo-sidebar {
    transform: translateX(0);
  }

  .demo-sidebar-overlay {
    position: fixed;
    z-index: 95;
    inset: calc(var(--demo-topbar) + var(--demo-disclaimer)) 0 0;
    display: block;
    border: 0;
    background: rgba(8, 9, 11, 0.64);
    opacity: 0;
    pointer-events: none;
    transition: opacity 190ms ease;
  }

  .demo-body.is-menu-open .demo-sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .demo-main {
    margin-left: 0;
  }

  .demo-dashboard-grid,
  .demo-company-grid {
    grid-template-columns: 1fr;
  }

  .demo-report-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 650px) {
  :root {
    --demo-topbar: 4.15rem;
  }

  .demo-disclaimer span {
    font-size: 0.58rem;
  }

  .demo-disclaimer a {
    font-size: 0.62rem;
  }

  .demo-brand > span:last-child {
    display: none;
  }

  .demo-topbar__actions {
    gap: 0.45rem;
    padding: 0;
  }

  .demo-icon-button {
    display: none;
  }

  .demo-request {
    min-height: 2.45rem;
    padding: 0.65rem 0.72rem;
    font-size: 0.59rem;
  }

  .demo-main {
    padding: calc(var(--demo-topbar) + var(--demo-disclaimer) + 1.35rem) 0.8rem 2rem;
  }

  .demo-page-head {
    display: block;
    margin-bottom: 1.25rem;
  }

  .demo-page-head__aside {
    margin-top: 0.8rem;
    text-align: left;
  }

  .demo-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }

  .demo-kpi {
    min-height: 8rem;
    padding: 0.85rem;
  }

  .demo-kpi__top {
    align-items: start;
    font-size: 0.59rem;
  }

  .demo-kpi strong {
    margin-top: 0.8rem;
    font-size: 2rem;
  }

  .demo-status-overview {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1rem;
  }

  .demo-panel__head {
    padding: 1rem;
  }

  .demo-filterbar {
    grid-template-columns: 1fr;
  }

  .demo-cards,
  .demo-deadline-board {
    grid-template-columns: 1fr;
  }

  .demo-donut-row {
    grid-template-columns: 1fr;
  }

  .demo-definition-list,
  .demo-detail-grid {
    grid-template-columns: 1fr;
  }

  .demo-definition-list div:nth-child(odd),
  .demo-detail-grid div:nth-child(odd) {
    padding-right: 0;
  }

  .demo-dialog {
    width: 100%;
    max-height: calc(100dvh - 0.5rem);
    margin: auto 0 0;
    border-width: 1px 0 0;
  }

  .demo-dialog__head,
  .demo-dialog__body,
  .demo-dialog__footer {
    padding-inline: 1rem;
  }

  .demo-dialog__head h2 {
    font-size: 1.45rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto;
    transition-duration: 0.01ms;
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
  }
}
