.kvs-portal {
  --kvs-blue: #001840;
  --kvs-green: #65865e;
  --kvs-ink: #172033;
  --kvs-muted: #667085;
  --kvs-line: #e2e8f0;
  --kvs-bg: #f8fafc;
  --kvs-panel: #ffffff;
  --kvs-soft: #eef3f8;
  --kvs-warning: #a15c00;
  --kvs-danger: #9f1239;
  --kvs-success: #2f6f39;
  --kvs-radius: 3px;
  color: var(--kvs-ink);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.5;
  margin: 0;
  max-width: 100%;
  padding: 0;
  width: 100%;
}

.kvs-portal * {
  box-sizing: border-box;
}

html.kvs-portal-modal-lock,
body.kvs-portal-modal-lock {
  overflow: hidden;
}

body.kvs-portal-modal-lock {
  left: 0;
  position: fixed;
  right: 0;
  width: 100%;
}

.kvs-portal a {
  color: var(--kvs-blue);
  text-decoration: none;
}

.kvs-portal a:not(.kvs-portal__button):hover {
  text-decoration: underline;
}

.kvs-portal h1,
.kvs-portal h2,
.kvs-portal h3,
.kvs-portal h4,
.kvs-portal p {
  margin: 0;
}

.kvs-portal h1,
.kvs-portal h2,
.kvs-portal h3,
.kvs-portal h4 {
  color: var(--kvs-blue);
  font-family: inherit;
  line-height: 1.18;
  overflow-wrap: anywhere;
  text-transform: none;
}

.kvs-portal h1 {
  font-size: 30px;
}

.kvs-portal h2 {
  font-size: 24px;
}

.kvs-portal h3 {
  font-size: 18px;
}

.kvs-portal h4 {
  font-size: 14px;
}

.kvs-portal__login {
  background: var(--kvs-bg);
  border: 1px solid var(--kvs-line);
  border-radius: var(--kvs-radius);
  display: grid;
  margin-inline: auto;
  max-width: 100%;
  min-height: auto;
  padding: clamp(28px, 5vw, 58px);
  place-items: center;
  width: 100%;
}

.kvs-portal__login-shell {
  display: grid;
  gap: 26px;
  max-width: 680px;
  width: 100%;
}

.kvs-portal__login-head {
  display: grid;
  gap: 10px;
}

.kvs-portal__login-head p:not(.kvs-portal__eyebrow) {
  color: var(--kvs-muted);
  max-width: 560px;
}

.kvs-portal__login-card {
  background: #ffffff;
  border: 1px solid var(--kvs-line);
  border-radius: var(--kvs-radius);
  display: grid;
  gap: 20px;
  padding: clamp(24px, 3vw, 34px);
}

.kvs-portal__panel,
.kvs-portal__surface,
.kvs-portal__card,
.kvs-portal__summary,
.kvs-portal__metric {
  background: var(--kvs-panel);
  border: 1px solid var(--kvs-line);
  border-radius: var(--kvs-radius);
  box-shadow: none;
  max-width: 100%;
}

.kvs-portal__panel,
.kvs-portal__surface {
  padding: clamp(26px, 3vw, 34px);
}

.kvs-portal__surface--narrow {
  max-width: 760px;
}

.kvs-portal__detail--empty .kvs-portal__surface--narrow {
  max-width: none;
  width: 100%;
}

.kvs-portal__eyebrow {
  color: var(--kvs-green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.kvs-portal__shell {
  align-items: stretch;
  background: var(--kvs-bg);
  border: 1px solid var(--kvs-line);
  border-radius: var(--kvs-radius);
  box-shadow: none;
  display: grid;
  grid-template-columns: 204px minmax(0, 1fr);
  max-width: 100%;
  min-height: 0;
  overflow: hidden;
  width: 100%;
}

.kvs-portal__sidebar {
  background: #ffffff;
  border-right: 1px solid var(--kvs-line);
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 100%;
  min-width: 0;
  padding: 28px 18px;
  width: 100%;
}

.kvs-portal__side-nav {
  display: grid;
  gap: 10px;
}

.kvs-portal__side-nav a {
  align-items: center;
  border: 1px solid transparent;
  border-radius: var(--kvs-radius);
  color: var(--kvs-ink);
  display: flex;
  gap: 10px;
  font-weight: 750;
  justify-content: flex-start;
  line-height: 1.2;
  min-height: 44px;
  padding: 12px 14px;
  text-decoration: none;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
  white-space: nowrap;
}

.kvs-portal__side-nav a:hover,
.kvs-portal__side-nav a.is-active {
  background: var(--kvs-blue);
  border-color: var(--kvs-blue);
  color: #ffffff;
  text-decoration: none;
}

.kvs-portal__side-nav a svg {
  display: block;
  flex: 0 0 auto;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 18px;
}

.kvs-portal__nav-divider {
  border-top: 1px solid var(--kvs-line);
  display: block;
  margin: 8px 4px;
}

.kvs-portal__side-nav a.kvs-portal__nav-logout {
  color: var(--kvs-danger);
}

.kvs-portal__side-nav a.kvs-portal__nav-logout:hover,
.kvs-portal__side-nav a.kvs-portal__nav-logout:focus-visible {
  background: #fff1f2;
  border-color: #fecdd3;
  color: var(--kvs-danger);
}

.kvs-portal__workspace {
  display: grid;
  gap: 36px;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: clamp(30px, 4vw, 48px);
  width: 100%;
}

.kvs-portal__topbar,
.kvs-portal__page-head,
.kvs-portal__client-head,
.kvs-portal__section-title,
.kvs-portal__card-head {
  align-items: flex-start;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  min-width: 0;
}

.kvs-portal__topbar {
  align-items: center;
  padding-bottom: 2px;
}

.kvs-portal__topbar > div,
.kvs-portal__page-head > div,
.kvs-portal__client-head > div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.kvs-portal__topbar p,
.kvs-portal__page-head p,
.kvs-portal__client-head p,
.kvs-portal__section-title span,
.kvs-portal__subtle,
.kvs-portal__meta,
.kvs-portal__small,
.kvs-portal__summary em,
.kvs-portal__row-card span,
.kvs-portal__table td span {
  color: var(--kvs-muted);
  font-size: 14px;
  font-style: normal;
}

.kvs-portal__top-actions,
.kvs-portal__client-head-actions,
.kvs-portal__manage-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.kvs-portal__client-head-actions {
  justify-content: flex-end;
}

.kvs-portal__client-head-actions .kvs-portal__status {
  flex: 0 0 auto;
}

.kvs-portal__main {
  display: grid;
  gap: 34px;
}

.kvs-portal__columns {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
}

.kvs-portal__columns--main {
  grid-template-columns: 1fr;
}

.kvs-portal__metrics {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.kvs-portal__metric,
.kvs-portal__summary {
  color: inherit;
  display: grid;
  gap: 10px;
  min-height: 144px;
  padding: 24px;
  text-decoration: none;
}

.kvs-portal__metric span,
.kvs-portal__summary span {
  color: var(--kvs-muted);
  font-size: 13px;
  font-weight: 800;
}

.kvs-portal__metric strong,
.kvs-portal__summary strong {
  color: var(--kvs-blue);
  font-size: 32px;
  line-height: 1;
}

.kvs-portal__master-detail {
  display: grid;
  gap: 34px;
  grid-template-columns: 1fr;
}

.kvs-portal__client-list {
  align-self: start;
  background: #ffffff;
  border: 1px solid var(--kvs-line);
  border-radius: var(--kvs-radius);
  display: grid;
  gap: 22px;
  max-width: 100%;
  min-width: 0;
  padding: 24px;
  width: 100%;
}

.kvs-portal__client-items,
.kvs-portal__stack,
.kvs-portal__cards {
  display: grid;
}

.kvs-portal__stack {
  gap: 12px;
}

.kvs-portal__cards {
  gap: 14px;
}

.kvs-portal__client-items {
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.kvs-portal__stack--compact {
  gap: 0;
  margin-top: 12px;
}

.kvs-portal__activity-list {
  max-height: 360px;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-gutter: stable;
}

.kvs-portal__client-item,
.kvs-portal__activity {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--kvs-line);
  border-radius: 0;
  min-width: 0;
  padding: 18px 0;
}

.kvs-portal__client-item {
  border: 1px solid var(--kvs-line);
  border-radius: var(--kvs-radius);
  display: grid;
  gap: 6px;
  padding: 16px;
  text-decoration: none;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.kvs-portal__client-item:hover,
.kvs-portal__client-item.is-active {
  background: var(--kvs-bg);
  border-color: #c7d4c3;
}

.kvs-portal__client-item strong,
.kvs-portal__row-card strong,
.kvs-portal__activity strong {
  color: var(--kvs-blue);
  overflow-wrap: anywhere;
}

.kvs-portal__client-item span,
.kvs-portal__activity span {
  color: var(--kvs-muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.kvs-portal__activity:last-child {
  border-bottom: 0;
}

.kvs-portal__detail {
  display: grid;
  gap: 34px;
  max-width: 100%;
  min-width: 0;
  width: 100%;
}

.kvs-portal__row-card {
  align-items: start;
  background: #ffffff;
  border: 1px solid var(--kvs-line);
  border-radius: var(--kvs-radius);
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 18px 20px;
  transition: background 0.16s ease;
}

.kvs-portal__row-card--wrap {
  grid-template-columns: minmax(0, 1fr) auto;
}

.kvs-portal__row-card > div:first-child {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.kvs-portal__row-card .kvs-portal__status {
  align-self: start;
  justify-self: end;
}

.kvs-portal__row-card-actions {
  align-self: start;
  display: grid;
  gap: 9px;
  justify-items: end;
}

.kvs-portal__row-card.is-deleted {
  opacity: 0.68;
}

.kvs-portal__row-card:target {
  background: #f8fafc;
  border-color: #9fb0c3;
  scroll-margin-top: 120px;
}

.kvs-portal__card {
  display: grid;
  gap: 16px;
  padding: 22px;
  transition: border-color 0.16s ease;
}

.kvs-portal__card:hover {
  border-color: #c8d4df;
}

.kvs-portal__next {
  background: var(--kvs-bg);
  border-left: 4px solid var(--kvs-green);
  border-radius: var(--kvs-radius);
  padding: 14px 16px;
}

.kvs-portal__status {
  align-items: center;
  border: 1px solid var(--kvs-line);
  border-radius: var(--kvs-radius);
  color: var(--kvs-blue);
  display: inline-flex;
  font-size: 12px;
  font-weight: 850;
  justify-content: center;
  line-height: 1;
  min-height: 28px;
  padding: 7px 10px;
  white-space: nowrap;
}

.kvs-portal__status--open,
.kvs-portal__status--assigned,
.kvs-portal__status--more_info_needed,
.kvs-portal__status--warning {
  background: #fff8e8;
  border-color: #f3c56b;
  color: var(--kvs-warning);
}

.kvs-portal__status--submitted,
.kvs-portal__status--in_progress,
.kvs-portal__status--in_review {
  background: #edf5ff;
  border-color: #b9d6f6;
  color: #174178;
}

.kvs-portal__status--complete,
.kvs-portal__status--resolved,
.kvs-portal__status--reviewed,
.kvs-portal__status--active,
.kvs-portal__status--received,
.kvs-portal__status--success {
  background: #edf8ef;
  border-color: #b8dfbf;
  color: var(--kvs-success);
}

.kvs-portal__status--disabled,
.kvs-portal__status--archived,
.kvs-portal__status--cancelled,
.kvs-portal__status--error {
  background: #fff1f2;
  border-color: #fecdd3;
  color: var(--kvs-danger);
}

.kvs-portal .kvs-portal__button,
.kvs-portal #wp-submit,
.kvs-portal #kvs-portal-submit {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--kvs-line);
  border-radius: 0;
  color: var(--kvs-blue);
  cursor: pointer;
  display: inline-flex;
  font-family: "Montserrat", var(--bookly-font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
  font-size: var(--text-s, 14px);
  font-weight: 600;
  justify-content: center;
  letter-spacing: 0.5px;
  line-height: 1.7;
  min-height: 46px;
  padding: 0.5em 1em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
  white-space: nowrap;
}

.kvs-portal .kvs-portal__button:hover,
.kvs-portal .kvs-portal__button:focus-visible {
  background: var(--kvs-bg);
  border-color: #c8d2df;
  color: var(--kvs-blue);
}

.kvs-portal .kvs-portal__button > *,
.kvs-portal .kvs-portal__action-card > * {
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

.kvs-portal .kvs-portal__button--primary,
.kvs-portal #wp-submit,
.kvs-portal #kvs-portal-submit {
  background: var(--kvs-blue);
  border-color: var(--kvs-blue);
  color: #ffffff;
}

.kvs-portal .kvs-portal__button--primary:hover,
.kvs-portal #wp-submit:hover,
.kvs-portal #kvs-portal-submit:hover {
  background: #0c2c63;
  border-color: #0c2c63;
  color: #ffffff;
}

.kvs-portal .kvs-portal__button--secondary {
  background: #ffffff;
  border-color: var(--kvs-line);
  color: var(--kvs-blue);
}

.kvs-portal button.kvs-portal__button--secondary,
.kvs-portal a.kvs-portal__button--secondary,
.kvs-portal button.kvs-portal__action-card {
  color: var(--kvs-blue);
}

.kvs-portal .kvs-portal__button--secondary:hover {
  background: var(--kvs-soft);
  border-color: var(--kvs-line);
  color: var(--kvs-blue);
}

.kvs-portal .kvs-portal__button--danger {
  background: #ffffff;
  border-color: #fecdd3;
  color: var(--kvs-danger);
}

.kvs-portal .kvs-portal__button--danger > * {
  color: inherit;
}

.kvs-portal .kvs-portal__button--danger:hover {
  background: #fff1f2;
  border-color: #fecdd3;
  color: var(--kvs-danger);
}

.kvs-portal .kvs-portal__button--small {
  min-height: 34px;
  padding: 8px 11px;
}

.kvs-portal__text-link {
  color: var(--kvs-blue);
  font-weight: 800;
  text-decoration: none;
}

.kvs-portal__text-link:hover {
  text-decoration: underline;
}

.kvs-portal__action-menu {
  justify-self: end;
  max-width: 100%;
  position: relative;
  width: max-content;
  z-index: 1;
}

.kvs-portal__action-menu[open] {
  z-index: 30;
}

.kvs-portal__action-menu summary {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--kvs-line);
  border-radius: 0;
  color: var(--kvs-blue);
  cursor: pointer;
  display: inline-flex;
  font-family: "Montserrat", var(--bookly-font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
  font-size: 12px;
  font-weight: 600;
  gap: 8px;
  justify-content: center;
  letter-spacing: 0.5px;
  line-height: 1;
  list-style: none;
  min-height: 36px;
  padding: 0 12px;
  text-transform: uppercase;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
  user-select: none;
  white-space: nowrap;
}

.kvs-portal__action-menu summary::-webkit-details-marker {
  display: none;
}

.kvs-portal__action-menu summary::after {
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  content: "";
  display: block;
  height: 0;
  width: 0;
}

.kvs-portal__action-menu summary:hover,
.kvs-portal__action-menu summary:focus-visible,
.kvs-portal__action-menu[open] summary {
  background: var(--kvs-bg);
  border-color: #c8d2df;
  color: var(--kvs-blue);
}

.kvs-portal__action-menu-panel {
  background: #ffffff;
  border: 1px solid var(--kvs-line);
  border-radius: var(--kvs-radius);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  display: grid;
  max-height: calc(100dvh - 24px);
  max-width: min(260px, calc(100vw - 24px));
  min-width: 190px;
  overflow-y: auto;
  padding: 6px;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
}

.kvs-portal__action-menu.is-positioned .kvs-portal__action-menu-panel {
  left: var(--kvs-action-menu-left);
  position: fixed;
  right: auto;
  top: var(--kvs-action-menu-top);
  width: max-content;
  z-index: 100000;
}

.kvs-portal__action-menu-panel a {
  color: var(--kvs-blue);
  display: block;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.25;
  padding: 9px 10px;
  text-decoration: none;
  white-space: nowrap;
}

.kvs-portal__action-menu-panel a:hover,
.kvs-portal__action-menu-panel a:focus-visible {
  background: var(--kvs-bg);
  color: var(--kvs-blue);
  text-decoration: none;
}

.kvs-portal__action-menu-panel a.is-danger {
  color: var(--kvs-danger);
}

.kvs-portal__action-menu-panel a.is-danger:hover,
.kvs-portal__action-menu-panel a.is-danger:focus-visible {
  background: #fff1f2;
  color: var(--kvs-danger);
}

.kvs-portal__table .kvs-portal__action-menu {
  justify-self: start;
}

.kvs-portal__table .kvs-portal__action-menu summary {
  font-size: 11px;
  gap: 6px;
  min-height: 34px;
  padding: 0 10px;
}

.kvs-portal__action-menu--table .kvs-portal__action-menu-panel {
  min-width: 180px;
}

.kvs-portal__form,
.kvs-portal__upload,
.kvs-portal__search {
  display: grid;
  gap: 22px;
}

.kvs-portal__search {
  align-items: stretch;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.kvs-portal__search label {
  min-width: 0;
}

.kvs-portal__search input[type="search"] {
  border-radius: 0;
  height: 46px;
  min-height: 46px;
}

.kvs-portal__search .kvs-portal__button {
  height: 46px;
  line-height: 1;
  min-height: 46px;
  padding: 0 1em;
}

.kvs-portal__surface--filters {
  padding: 16px;
}

.kvs-portal__filter-bar {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
}

.kvs-portal__filter-bar label {
  flex: 1 1 160px;
  gap: 6px;
  min-width: 0;
}

.kvs-portal__filter-bar label span {
  font-size: 12px;
  line-height: 1.15;
}

.kvs-portal__filter-bar input,
.kvs-portal__filter-bar select {
  min-height: 46px;
  padding-bottom: 10px;
  padding-top: 10px;
}

.kvs-portal__filter-search {
  flex: 1.8 1 260px;
  min-width: 0;
}

.kvs-portal__filter-more {
  align-self: end;
  flex: 0 0 auto;
  min-height: 46px;
}

.kvs-portal__filter-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  justify-content: flex-end;
}

.kvs-portal__filter-actions .kvs-portal__button {
  min-height: 46px;
  padding: 0.5em 1em;
}

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

.kvs-portal__filter-actions--modal {
  grid-column: 1 / -1;
  justify-content: flex-start;
}

.kvs-portal__modal--compact {
  max-width: min(560px, calc(100vw - 32px));
}

.kvs-portal__form > .kvs-portal__button,
.kvs-portal__upload > .kvs-portal__button,
.kvs-portal__card > .kvs-portal__button,
.kvs-portal__settings-layout .kvs-portal__button {
  justify-self: start;
}

.kvs-portal__form--compact {
  gap: 18px;
}

.kvs-portal__form-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}

.kvs-portal__form-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
}

.kvs-portal__form-actions .kvs-portal__privacy-consent {
  flex: 0 0 100%;
}

.kvs-portal__intake-form {
  margin-top: 20px;
}

.kvs-portal__intake-fields {
  display: grid;
  gap: 22px;
}

.kvs-portal__intake-field {
  display: grid;
  gap: 8px;
}

.kvs-portal__intake-field[hidden] {
  display: none;
}

.kvs-portal__intake-field > span {
  color: var(--kvs-blue);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.35;
}

.kvs-portal__intake-notice {
  background: var(--kvs-bg);
  border-left: 4px solid var(--kvs-green);
  border-radius: var(--kvs-radius);
  color: var(--kvs-ink);
  line-height: 1.55;
  padding: 14px 16px;
}

.kvs-portal__answer-list {
  display: grid;
  gap: 0;
  margin: 20px 0 0;
}

.kvs-portal__answer-list > div {
  border-top: 1px solid var(--kvs-line);
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(180px, 0.36fr) minmax(0, 1fr);
  padding: 14px 0;
}

.kvs-portal__answer-list > div:first-child {
  border-top: 0;
}

.kvs-portal__answer-list dt,
.kvs-portal__answer-list dd {
  margin: 0;
}

.kvs-portal__answer-list dt {
  color: var(--kvs-muted);
  font-size: 13px;
  font-weight: 850;
}

.kvs-portal__answer-list dd {
  color: var(--kvs-ink);
  overflow-wrap: anywhere;
}

.kvs-portal__manage-client {
  display: grid;
  gap: 26px;
}

.kvs-portal__manage-section {
  border-top: 1px solid var(--kvs-line);
  display: grid;
  gap: 18px;
  padding-top: 24px;
}

.kvs-portal__manage-section:first-child {
  border-top: 0;
  padding-top: 0;
}

.kvs-portal__manage-section--danger {
  border-top-color: #fecdd3;
}

.kvs-portal__manage-section-head {
  display: grid;
  gap: 5px;
}

.kvs-portal__manage-section-head p {
  color: var(--kvs-muted);
  font-size: 14px;
}

.kvs-portal__manage-section .kvs-portal__form {
  gap: 18px;
}

.kvs-portal__manage-section .kvs-portal__form > .kvs-portal__button {
  margin-top: 2px;
}

.kvs-portal__manage-actions {
  justify-content: flex-start;
}

.kvs-portal label,
.kvs-portal .login-username,
.kvs-portal .login-password {
  display: grid;
  gap: 8px;
  margin: 0;
  min-width: 0;
}

.kvs-portal label span,
.kvs-portal .login label,
.kvs-portal__fieldset legend {
  color: var(--kvs-blue);
  font-size: 13px;
  font-weight: 850;
}

.kvs-portal input[type="text"],
.kvs-portal input[type="password"],
.kvs-portal input[type="email"],
.kvs-portal input[type="number"],
.kvs-portal input[type="date"],
.kvs-portal input[type="search"],
.kvs-portal select,
.kvs-portal textarea,
.kvs-portal .input {
  background: #ffffff;
  border: 1px solid var(--kvs-line);
  border-radius: var(--kvs-radius);
  color: var(--kvs-ink);
  font: inherit;
  min-height: 46px;
  padding: 11px 14px;
  transition: border-color 0.16s ease;
  width: 100%;
}

.kvs-portal textarea {
  resize: vertical;
}

.kvs-portal input:focus,
.kvs-portal select:focus,
.kvs-portal textarea:focus,
.kvs-portal a:focus,
.kvs-portal button:focus,
.kvs-portal summary:focus {
  box-shadow: none;
  outline: 0;
}

.kvs-portal input:focus-visible,
.kvs-portal select:focus-visible,
.kvs-portal textarea:focus-visible,
.kvs-portal a:focus-visible,
.kvs-portal button:focus-visible,
.kvs-portal summary:focus-visible {
  box-shadow: none;
  outline: 0;
}

.kvs-portal input[type="text"]:focus,
.kvs-portal input[type="password"]:focus,
.kvs-portal input[type="email"]:focus,
.kvs-portal input[type="number"]:focus,
.kvs-portal input[type="date"]:focus,
.kvs-portal input[type="search"]:focus,
.kvs-portal select:focus,
.kvs-portal textarea:focus,
.kvs-portal .input:focus {
  border-color: var(--kvs-line);
}

.kvs-portal__check {
  align-items: flex-start;
  display: flex !important;
  gap: 10px;
}

.kvs-portal__check input {
  margin-top: 2px;
}

.kvs-portal__fieldset {
  border: 1px solid var(--kvs-line);
  border-radius: var(--kvs-radius);
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 16px;
}

.kvs-portal__quick-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0 30px;
}

.kvs-portal__request-review .kvs-portal__quick-actions {
  margin: 18px 0 0;
}

.kvs-portal__quick-actions--single {
  display: flex;
}

.kvs-portal__section-actions,
.kvs-portal__card-actions {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.kvs-portal__card-title {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.kvs-portal__action-card {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--kvs-line);
  border-radius: 0;
  color: var(--kvs-blue);
  cursor: pointer;
  display: flex;
  font-family: "Montserrat", var(--bookly-font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
  font-size: var(--text-s, 14px);
  font-weight: 600;
  gap: 10px;
  justify-content: center;
  letter-spacing: 0.5px;
  line-height: 1.7;
  min-height: 46px;
  padding: 0.5em 1em;
  text-align: left;
  text-transform: uppercase;
  transition: background 0.16s ease, border-color 0.16s ease;
  width: auto;
}

.kvs-portal__action-card:hover,
.kvs-portal__action-card:focus-visible {
  background: var(--kvs-bg);
  border-color: #c7d4c3;
  color: var(--kvs-blue);
}

.kvs-portal__section-stack,
.kvs-portal__settings-layout {
  display: grid;
  gap: 32px;
}

.kvs-portal__settings-layout {
  max-width: 980px;
}

.kvs-portal__settings-group {
  border-top: 1px solid var(--kvs-line);
  display: grid;
  gap: 20px;
  padding-top: 26px;
}

.kvs-portal__section-title + .kvs-portal__settings-group {
  border-top: 0;
  padding-top: 0;
}

.kvs-portal__empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.kvs-portal__list-heading {
  display: block;
  margin: 0;
}

.kvs-portal__list-heading + .kvs-portal__empty,
.kvs-portal__list-heading + .kvs-portal__stack {
  margin-top: 16px;
}

.kvs-portal__section-title + .kvs-portal__stack,
.kvs-portal__section-title + .kvs-portal__cards,
.kvs-portal__section-title + .kvs-portal__card,
.kvs-portal__section-title + .kvs-portal__empty,
.kvs-portal__section-title + .kvs-portal__section-stack,
.kvs-portal__section-title + .kvs-portal__subtle,
.kvs-portal__section-title + .kvs-portal__table-wrap {
  margin-top: 16px;
}

.kvs-portal__dropzone {
  align-items: center;
  background: var(--kvs-bg);
  border: 2px dashed #b8c4d5;
  border-radius: var(--kvs-radius);
  cursor: pointer;
  display: grid;
  gap: 10px;
  min-height: 148px;
  padding: 32px;
  text-align: center;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.kvs-portal__dropzone strong {
  color: var(--kvs-blue);
}

.kvs-portal__dropzone span {
  color: var(--kvs-muted);
  font-size: 13px;
}

.kvs-portal__dropzone input {
  height: 1px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

.kvs-portal__dropzone.is-dragging {
  background: #edf8ef;
  border-color: var(--kvs-green);
}

.kvs-portal__file-list {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.kvs-portal__file-list li {
  background: var(--kvs-bg);
  border: 1px solid var(--kvs-line);
  border-radius: var(--kvs-radius);
  overflow-wrap: anywhere;
  padding: 10px 12px;
}

.kvs-portal__progress {
  background: var(--kvs-line);
  border-radius: var(--kvs-radius);
  height: 8px;
  overflow: hidden;
}

.kvs-portal__progress span {
  background: var(--kvs-green);
  display: block;
  height: 100%;
  transition: width 0.2s ease;
  width: 0;
}

.kvs-portal__upload-message {
  border-radius: var(--kvs-radius);
  padding: 0;
}

.kvs-portal__upload-message:not(:empty),
.kvs-portal__notice {
  background: #edf5ff;
  border: 1px solid #b9d6f6;
  border-radius: var(--kvs-radius);
  color: #174178;
  padding: 14px 16px;
}

.kvs-portal__upload-message.is-success,
.kvs-portal__notice--success {
  background: #edf8ef;
  border-color: #b8dfbf;
  color: var(--kvs-success);
}

.kvs-portal__upload-message.is-error,
.kvs-portal__notice--error {
  background: #fff1f2;
  border-color: #fecdd3;
  color: var(--kvs-danger);
}

.kvs-portal__notice--warning {
  background: #fff8e8;
  border-color: #f3c56b;
  color: var(--kvs-warning);
}

.kvs-portal__empty {
  background: var(--kvs-bg);
  border: 1px solid #d8e0ea;
  border-radius: var(--kvs-radius);
  display: grid;
  gap: 8px;
  padding: 22px;
}

.kvs-portal__empty strong {
  color: var(--kvs-blue);
}

.kvs-portal__empty p {
  color: var(--kvs-muted);
}

.kvs-portal__activity {
  display: grid;
  gap: 8px;
}

.kvs-portal__modal {
  background: transparent;
  border: 0;
  color: var(--kvs-ink);
  margin: auto;
  max-height: calc(100dvh - 32px);
  max-width: min(720px, calc(100vw - 32px));
  overflow: visible;
  padding: 0;
  width: 100%;
}

.kvs-portal__modal::backdrop {
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(2px);
}

.kvs-portal__modal-panel {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--kvs-radius);
  box-shadow: 0 24px 56px rgba(15, 23, 42, 0.2);
  display: block;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.kvs-portal__modal-head {
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid var(--kvs-line);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 24px 26px;
  position: sticky;
  top: 0;
  z-index: 2;
}

.kvs-portal__modal-body {
  overflow: visible;
  padding: 26px;
}

.kvs-portal__icon-button {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--kvs-line);
  border-radius: 0;
  color: var(--kvs-muted);
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  height: 36px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
  width: 36px;
}

.kvs-portal__icon-button svg {
  display: block;
  height: 18px;
  pointer-events: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 18px;
}

.kvs-portal__icon-button:hover,
.kvs-portal__icon-button:focus-visible {
  background: var(--kvs-bg);
  border-color: #c8d2df;
  color: var(--kvs-blue);
}

.kvs-portal__code {
  background: var(--kvs-bg);
  border: 1px solid var(--kvs-line);
  border-radius: var(--kvs-radius);
  display: block;
  font-size: 13px;
  margin-top: 12px;
  overflow-wrap: anywhere;
  padding: 10px 12px;
}

.kvs-portal__table-wrap {
  overflow: visible;
}

.kvs-portal__table {
  border-collapse: collapse;
  width: 100%;
}

.kvs-portal__table--files {
  table-layout: fixed;
}

.kvs-portal__table--file-library th:nth-child(1) {
  width: 13%;
}

.kvs-portal__table--file-library th:nth-child(2) {
  width: 31%;
}

.kvs-portal__table--file-library th:nth-child(3) {
  width: 28%;
}

.kvs-portal__table--file-library th:nth-child(4) {
  width: 14%;
}

.kvs-portal__table--file-library th:nth-child(5) {
  width: 128px;
}

.kvs-portal__table--workspace-files th:nth-child(1) {
  width: 42%;
}

.kvs-portal__table--workspace-files th:nth-child(2) {
  width: 30%;
}

.kvs-portal__table--workspace-files th:nth-child(3) {
  width: 14%;
}

.kvs-portal__table--workspace-files th:nth-child(4) {
  width: 126px;
}

.kvs-portal__table--portal-files th:nth-child(1) {
  width: 42%;
}

.kvs-portal__table--portal-files th:nth-child(2) {
  width: 30%;
}

.kvs-portal__table--portal-files th:nth-child(3) {
  width: 16%;
}

.kvs-portal__table--portal-files th:nth-child(4) {
  width: 12%;
}

.kvs-portal__table th,
.kvs-portal__table td {
  border-bottom: 1px solid var(--kvs-line);
  padding: 17px 14px;
  text-align: left;
  vertical-align: middle;
}

.kvs-portal__table td {
  font-size: 15px;
  line-height: 1.45;
}

.kvs-portal__table th {
  color: var(--kvs-muted);
  font-size: 12px;
  text-transform: uppercase;
}

.kvs-portal__table-primary {
  color: var(--kvs-ink);
  display: block;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.kvs-portal__table--files td:last-child {
  white-space: nowrap;
}

.kvs-portal__table tr.is-deleted {
  opacity: 0.62;
}

.kvs-portal__file-cell {
  display: block;
  line-height: 1.35;
  max-width: 100%;
  min-width: 0;
}

.kvs-portal__file-name {
  display: inline;
  line-height: inherit;
  overflow-wrap: anywhere;
}

.kvs-portal__file-info {
  align-items: center;
  color: var(--kvs-muted);
  cursor: help;
  display: inline-flex;
  height: 24px;
  justify-content: center;
  margin-left: 5px;
  margin-top: 0;
  position: relative;
  transition: color 0.16s ease;
  vertical-align: -6px;
  width: 24px;
  z-index: 2;
}

.kvs-portal__file-info svg {
  fill: none;
  height: 16px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 16px;
}

.kvs-portal__file-info:hover,
.kvs-portal__file-info:focus {
  color: var(--kvs-blue);
}

.kvs-portal__file-tooltip {
  display: none;
  position: absolute;
  visibility: hidden;
}

.kvs-portal__floating-tooltip {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 3px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  color: #172033;
  display: grid;
  font-size: 12px;
  gap: 4px;
  line-height: 1.35;
  max-width: min(280px, calc(100vw - 32px));
  min-width: 210px;
  padding: 10px 12px;
  pointer-events: none;
  position: fixed;
  white-space: normal;
  z-index: 2147483647;
}

.kvs-portal__floating-tooltip[hidden] {
  display: none;
}

.kvs-portal #kvs-portal-login {
  display: grid;
  gap: 18px;
  margin: 0;
}

.kvs-portal #kvs-portal-login p {
  margin: 0;
}

.kvs-portal #kvs-portal-login label {
  color: var(--kvs-blue);
  display: grid;
  font-size: 13px;
  font-weight: 850;
  gap: 8px;
  margin: 0;
}

.kvs-portal #kvs-portal-login .login-remember label {
  align-items: center;
  color: var(--kvs-muted);
  display: inline-flex;
  flex-direction: row;
  font-size: 14px;
  font-weight: 750;
  gap: 8px;
  line-height: 1.3;
}

.kvs-portal #kvs-portal-remember {
  accent-color: var(--kvs-blue);
  display: inline-block;
  flex: 0 0 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
  width: 16px;
}

.kvs-portal .login-submit {
  display: flex;
  justify-content: flex-start;
  margin: 0;
}

.kvs-portal #kvs-portal-submit {
  min-width: 154px;
  width: auto;
}

.kvs-portal__login-links {
  border-top: 1px solid var(--kvs-line);
  display: grid;
  gap: 8px;
  padding-top: 18px;
}

.kvs-portal__admin-gateway {
  margin: 0 auto;
  max-width: 680px;
}

@media (max-width: 1180px) {
  .kvs-portal__metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kvs-portal__surface--filters {
    overflow: visible;
  }

  .kvs-portal__filter-bar {
    min-width: 0;
  }
}

@media (max-width: 940px) {
  .kvs-portal__shell {
    grid-template-columns: 1fr;
  }

  .kvs-portal__sidebar {
    border-bottom: 1px solid var(--kvs-line);
    border-right: 0;
    gap: 12px;
    padding: 18px;
  }

  .kvs-portal__side-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
  }

  .kvs-portal__side-nav a {
    flex: 0 0 auto;
  }

  .kvs-portal__nav-divider {
    display: none;
  }

  .kvs-portal__workspace {
    padding: 24px;
  }

  .kvs-portal__columns,
  .kvs-portal__columns--main,
  .kvs-portal__master-detail,
  .kvs-portal__form-grid,
  .kvs-portal__search {
    grid-template-columns: 1fr;
  }

  .kvs-portal__client-list {
    position: static;
  }
}

@media (max-width: 680px) {
  .kvs-portal h1 {
    font-size: 24px;
  }

  .kvs-portal h2 {
    font-size: 21px;
  }

  .kvs-portal__topbar,
  .kvs-portal__page-head,
  .kvs-portal__client-head,
  .kvs-portal__section-title,
  .kvs-portal__card-head,
  .kvs-portal__row-card {
    align-items: stretch;
    display: grid;
    grid-template-columns: 1fr;
  }

  .kvs-portal__section-actions,
  .kvs-portal__card-actions {
    display: grid;
    justify-content: stretch;
  }

  .kvs-portal__row-card .kvs-portal__status,
  .kvs-portal__row-card-actions {
    grid-column: 1;
    justify-self: start;
  }

  .kvs-portal__row-card-actions {
    justify-items: start;
  }

  .kvs-portal__action-menu {
    justify-self: stretch;
    width: 100%;
  }

  .kvs-portal__action-menu summary {
    justify-content: space-between;
    width: 100%;
  }

  .kvs-portal__action-menu-panel {
    box-shadow: none;
    margin-top: 6px;
    min-width: 0;
    position: static;
    width: 100%;
  }

  .kvs-portal__metrics {
    grid-template-columns: 1fr;
  }

  .kvs-portal__top-actions,
  .kvs-portal__client-head-actions,
  .kvs-portal__manage-actions {
    align-items: stretch;
    display: grid;
  }

  .kvs-portal__client-head-actions .kvs-portal__status {
    justify-self: start;
  }

  .kvs-portal .kvs-portal__button,
  .kvs-portal #wp-submit {
    width: 100%;
  }

  .kvs-portal__client-items {
    grid-template-columns: 1fr;
  }

  .kvs-portal__quick-actions {
    align-items: stretch;
    display: grid;
  }

  .kvs-portal__filter-bar,
  .kvs-portal__filter-actions {
    display: grid;
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .kvs-portal__filter-search {
    grid-column: 1;
  }

  .kvs-portal__filter-advanced {
    grid-template-columns: 1fr;
  }

  .kvs-portal__action-card {
    width: 100%;
  }

  .kvs-portal__answer-list > div {
    grid-template-columns: 1fr;
  }

  .kvs-portal__modal {
    max-width: calc(100vw - 18px);
  }

  .kvs-portal__modal-head,
  .kvs-portal__modal-body {
    padding: 20px;
  }

  .kvs-portal__table thead {
    display: none;
  }

  .kvs-portal__table,
  .kvs-portal__table tbody,
  .kvs-portal__table tr,
  .kvs-portal__table td {
    display: block;
    width: 100%;
  }

  .kvs-portal__table tr {
    border-bottom: 1px solid var(--kvs-line);
    padding: 10px 0;
  }

  .kvs-portal__table td {
    border: 0;
    padding: 7px 0;
  }

  .kvs-portal__table--files td:last-child {
    white-space: normal;
  }

  .kvs-portal__table td::before {
    color: var(--kvs-blue);
    content: attr(data-label);
    display: block;
    font-size: 12px;
    font-weight: 850;
    margin-bottom: 3px;
    text-transform: uppercase;
  }
}

@media (prefers-reduced-motion: reduce) {
  .kvs-portal *,
  .kvs-portal *::before,
  .kvs-portal *::after {
    transition-duration: 0.01ms !important;
  }
}
