/* ----------------------------- Brand ----------------------------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand__text strong {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.brand--sidebar {
  color: #f5efe2;
}

/* ----------------------------- Shell ----------------------------- */

.app-body {
  min-height: 100vh;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  width: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  padding: 24px 16px 18px;
  color: #dbe4dc;
  background:
    radial-gradient(circle at 25% 0%, rgba(214, 183, 111, 0.1), transparent 35%),
    linear-gradient(180deg, #123d30 0%, #0d2d24 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 24px;
}

.icon-button.sidebar__close {
  display: none;
  color: rgba(255, 255, 255, 0.65);
}

.nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 2px;
  scrollbar-width: thin;
}

.nav__label {
  padding: 18px 12px 7px;
  color: rgba(225, 235, 227, 0.4);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.nav__item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 9px;
  color: rgba(231, 238, 232, 0.76);
  font-size: 13.5px;
  font-weight: 500;
  transition: color 0.16s var(--ease), background 0.16s var(--ease);
}

.nav__item .icon {
  opacity: 0.58;
  transition: opacity 0.16s var(--ease);
}

.nav__item:hover {
  color: #fffdf7;
  background: rgba(255, 255, 255, 0.055);
}

.nav__item.is-active {
  color: #fffdf7;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.055);
}

.nav__item.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  bottom: 11px;
  width: 2px;
  border-radius: 2px;
  background: #d8b46c;
}

.nav__item.is-active .icon,
.nav__item:hover .icon {
  opacity: 1;
}

.sidebar__foot {
  padding-top: 17px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.account-card {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 8px;
  padding: 10px 8px 2px;
}

.account-card__meta {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.account-card__meta strong {
  color: rgba(250, 248, 241, 0.92);
  font-size: 12px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-button--inverse {
  color: rgba(231, 238, 232, 0.48);
}

.icon-button--inverse:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.app-frame {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin-left: var(--sidebar-w);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: 64px;
  padding: 0 38px;
  border-bottom: 1px solid rgba(211, 205, 192, 0.66);
  background: rgba(243, 241, 236, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.topbar__left {
  display: flex;
  align-items: center;
  gap: 16px;
}

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

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted-2);
  font-size: 12px;
}

.breadcrumbs strong {
  color: var(--ink-soft);
  font-weight: 600;
}

.breadcrumbs__sep {
  color: var(--line-strong);
}

.page {
  flex: 1;
  width: 100%;
  max-width: 1460px;
  margin: 0 auto;
  padding: 34px 40px 72px;
}

.sidebar-scrim {
  display: none;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 26px;
  margin-bottom: 28px;
}

.page-heading h1 {
  margin-top: 7px;
  font-family: var(--font-display);
  font-size: clamp(27px, 2.3vw, 36px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 23px 24px 0;
}

.card__head h2 {
  margin-top: 4px;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.card__head p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12.5px;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 22px;
}

.section-heading__index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
}

.section-heading h2 {
  font-size: 15.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.section-heading p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12.5px;
}

.section-heading.section-heading--muted h2 {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

/* ----------------------------- Buttons ----------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: background 0.16s var(--ease), border-color 0.16s var(--ease),
    color 0.16s var(--ease), transform 0.16s var(--ease);
}

.button:active:not(:disabled) {
  transform: translateY(1px);
}

.button--primary {
  background: var(--brand);
  color: #fffdf8;
  box-shadow: 0 1px 1px rgba(15, 53, 41, 0.16);
}

.button--primary:hover {
  background: var(--brand-strong);
}

.button--secondary {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink-soft);
}

.button--secondary:hover {
  border-color: #b9b2a4;
  background: var(--surface-2);
}

.button--ghost {
  background: transparent;
  color: var(--muted);
}

.button--ghost:hover {
  background: var(--surface-3);
  color: var(--ink);
}

.button--danger {
  background: var(--danger);
  color: #fff;
}

.button--danger:hover {
  background: var(--danger-strong);
}

.button--sm {
  min-height: 32px;
  padding: 0 11px;
  font-size: 12px;
  border-radius: 8px;
}

.button--xs {
  min-height: 28px;
  padding: 0 9px;
  font-size: 11px;
  border-radius: 7px;
}

.button--full {
  width: 100%;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.icon-button:hover {
  background: var(--surface-3);
  color: var(--ink);
}

.icon-button--danger {
  color: #a47771;
}

.icon-button--danger:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

.icon-button--xs {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

button.icon-button:disabled {
  opacity: 0.28;
}

/* ----------------------------- Badges & tags ----------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.badge__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.8;
}

.badge--published {
  color: var(--success);
  background: var(--success-soft);
}

.badge--draft {
  color: var(--warning);
  background: var(--warning-soft);
}

.badge--muted {
  color: var(--muted);
  background: var(--surface-3);
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}

.tag--soft {
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
}

.tag-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 25px;
  padding: 0 10px;
  border-radius: 99px;
  background: var(--surface-3);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

/* ----------------------------- Avatars ----------------------------- */

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 9px;
  background: var(--avatar-bg, var(--surface-3));
  color: var(--avatar-fg, var(--ink-soft));
  font-weight: 650;
  letter-spacing: 0;
  user-select: none;
}

img.avatar {
  border: 1px solid var(--line);
  background: #fff;
  object-fit: contain;
}

.avatar--sm {
  width: 34px;
  height: 34px;
  font-size: 12px;
  border-radius: 9px;
}

.avatar--md {
  width: 42px;
  height: 42px;
  font-size: 14px;
}

/* ----------------------------- Cards ----------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}

.form-card {
  padding: 25px;
}

.form-card + .form-card,
.card + .card {
  margin-top: 18px;
}

/* ----------------------------- Stats ----------------------------- */

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

.stats-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.welcome-name {
  color: var(--blue);
}

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

.quick-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.quick-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-xs);
}

.quick-card__icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border-radius: 9px;
  background: var(--blue-soft);
  color: var(--blue);
}

.quick-card__body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.quick-card__body strong {
  font-size: 13px;
  font-weight: 600;
}

.quick-card__body small {
  color: var(--muted);
  font-size: 11.5px;
}

.quick-card__arrow {
  margin-left: auto;
  color: var(--muted-2);
}

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

@media (max-width: 600px) {
  .quick-grid {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  min-height: 88px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: border-color 0.18s ease, transform 0.18s var(--ease),
    box-shadow 0.18s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.stat-card__label {
  color: #737373;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}

.stat-card__value {
  font-family: var(--font-sans);
  font-size: 28px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

/* ----------------------------- Tables ----------------------------- */

.table-card {
  overflow: hidden;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
}

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

.data-table th {
  padding: 16px 16px 10px;
  vertical-align: bottom;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-align: left;
  white-space: nowrap;
  text-transform: uppercase;
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 12.5px;
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background 0.14s ease;
}

.data-table tbody tr:hover {
  background: rgba(248, 246, 240, 0.62);
}

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

.data-table .col-actions {
  width: 150px;
  text-align: right;
}

.data-table .col-company {
  min-width: 220px;
}

.entity-cell {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.entity-cell > span:last-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.entity-cell strong {
  overflow: hidden;
  max-width: 300px;
  color: #222;
  font-size: 13px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entity-cell small {
  margin-top: 1px;
  color: var(--muted-2);
  font-size: 10px;
}

.entity-cell:hover strong {
  color: var(--brand);
}

.entity-cell--plain {
  align-items: center;
}

.field-table tr.is-inactive {
  background: rgba(248, 246, 240, 0.55);
}

.field-table tr.is-inactive td {
  color: var(--muted);
}

.row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  white-space: nowrap;
}

.row-actions form {
  display: inline-flex;
}
.tag-count + .truncate {
  margin-left: 7px;
}

/* ----------------------------- Pagination ----------------------------- */

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 22px;
  border-top: 1px solid var(--line);
}

.pagination__summary {
  color: var(--muted);
  font-size: 11px;
}

.pagination__summary strong {
  color: var(--ink-soft);
  font-weight: 600;
}

.pagination__controls {
  display: flex;
  align-items: center;
  gap: 3px;
}

.pagination__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 7px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.pagination__btn:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.pagination__btn.is-current {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  box-shadow: var(--shadow-xs);
}

.pagination__btn.is-disabled {
  opacity: 0.32;
  pointer-events: none;
}

.pagination__ellipsis {
  padding: 0 3px;
  color: var(--muted-2);
  font-size: 10px;
}

/* ----------------------------- Filters ----------------------------- */

.filter-card {
  margin-bottom: 18px;
  padding: 13px;
}

.filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.search-field {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 230px;
  min-width: 190px;
  max-width: 300px;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.search-field:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(23, 72, 56, 0.08);
}

.search-field .icon {
  position: absolute;
  left: 11px;
  color: var(--muted-2);
  pointer-events: none;
}

.search-field input {
  width: 100%;
  height: 100%;
  padding: 0 12px 0 35px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  outline: 0;
  font-size: 12.5px;
}

.search-field input::placeholder {
  color: var(--muted-2);
}

.search-field--lg {
  flex: 1;
  max-width: none;
  height: 42px;
}

.select-field {
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 1 auto;
}

.filters .select-field {
  width: 160px;
  flex: 0 0 160px;
}

.select-field select {
  appearance: none;
  -webkit-appearance: none;
  min-width: 120px;
  height: 38px;
  padding: 0 31px 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 12px;
  outline: 0;
  cursor: pointer;
}

.filters .select-field select {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.select-field select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(23, 72, 56, 0.08);
}

.select-field .icon {
  position: absolute;
  right: 10px;
  color: var(--muted-2);
  pointer-events: none;
}

.filters > .button {
  flex: 0 0 auto;
}

/* ----------------------------- Forms ----------------------------- */

.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 20px;
  align-items: start;
}

.form-layout__main {
  min-width: 0;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.field--full {
  grid-column: 1 / -1;
}

.field__label {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
}

.field__hint {
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.5;
}

.field-error {
  margin: 0;
  color: var(--danger);
  font-size: 11px;
  line-height: 1.5;
}

.field--error .input,
.field--error .select-control select {
  border-color: rgba(168, 59, 52, 0.55);
  background: rgba(248, 233, 230, 0.26);
}

.input {
  width: 100%;
  min-height: 41px;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
  outline: 0;
  transition: border-color 0.16s ease, box-shadow 0.16s ease,
    background 0.16s ease;
}

.input::placeholder {
  color: var(--muted-2);
}

.input:hover {
  border-color: #c5beb1;
}

.input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(23, 72, 56, 0.08);
}

.input:disabled {
  background: var(--surface-3);
  color: var(--muted);
  cursor: not-allowed;
}

.input--sm {
  min-height: 34px;
  padding: 6px 9px;
  font-size: 12px;
}

.textarea {
  min-height: 92px;
  resize: vertical;
  line-height: 1.65;
}

.select-control {
  position: relative;
  display: block;
}

.select-control select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 34px;
  cursor: pointer;
}

.select-control > .icon {
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-2);
  pointer-events: none;
}

.input-prefix {
  display: flex;
  align-items: stretch;
  min-height: 41px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  overflow: hidden;
  background: var(--surface);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.input-prefix:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(23, 72, 56, 0.08);
}

.input-prefix > span {
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-right: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 10.5px;
  white-space: nowrap;
}

.input-prefix .input {
  border: 0;
  box-shadow: none;
  min-height: 39px;
  border-radius: 0;
  font-family: var(--font-mono);
  font-size: 12px;
}

.field--error .input-prefix {
  border-color: rgba(168, 59, 52, 0.55);
}

.form-footer {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 6px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 12px;
  cursor: pointer;
}

.checkbox input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.checkbox__box {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.checkbox__text {
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.3;
}

.checkbox input:checked + .checkbox__box {
  border-color: var(--brand);
  background: var(--brand);
}

.checkbox input:checked + .checkbox__box::after {
  content: "";
  width: 7px;
  height: 4px;
  margin-top: -2px;
  border-left: 1.5px solid #fff;
  border-bottom: 1.5px solid #fff;
  transform: rotate(-45deg);
}

.checkbox input:focus-visible + .checkbox__box {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.checkbox--compact {
  margin-top: 8px;
  font-size: 11px;
}

.switch-line {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
  cursor: pointer;
}

.switch-line > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.switch-line strong {
  font-size: 12px;
  font-weight: 600;
}

.switch-line small {
  color: var(--muted);
  font-size: 10.5px;
}

.switch {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  margin-top: 1px;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.switch__track {
  position: relative;
  display: block;
  width: 32px;
  height: 18px;
  border-radius: 99px;
  background: var(--line-strong);
  transition: background 0.15s ease;
}

.switch__track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(24, 35, 30, 0.2);
  transition: transform 0.15s var(--ease);
}

.switch input:checked + .switch__track {
  background: var(--brand);
}

.switch input:checked + .switch__track::after {
  transform: translateX(14px);
}

.switch input:focus-visible + .switch__track {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* ----------------------------- Flash ----------------------------- */

.form-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.65;
}

.form-alert .icon {
  margin-top: 1px;
  flex: 0 0 auto;
}

.form-alert--error {
  color: var(--danger-strong);
  border-color: rgba(168, 59, 52, 0.2);
  background: var(--danger-soft);
}

.form-alert code {
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.55);
  font-size: 11px;
}

/* ----------------------------- Empty & info ----------------------------- */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 52px 24px 56px;
  text-align: center;
}

.empty-state__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: 13px;
  border-radius: 13px;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.empty-state h3 {
  font-size: 14px;
  font-weight: 650;
}

.empty-state p {
  max-width: 390px;
  margin: 5px 0 15px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.inline-empty {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  color: var(--muted);
}

.inline-empty > .icon {
  flex: 0 0 auto;
  color: var(--muted-2);
}

.inline-empty > div {
  flex: 1;
}

.inline-empty strong {
  display: block;
  color: var(--ink-soft);
  font-size: 12px;
}

.inline-empty p {
  margin-top: 2px;
  font-size: 11px;
}

.inline-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
}

.help-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 20px;
  margin-right: 18px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.help-link span {
  display: block;
  line-height: 1;
}

.help-link .icon {
  position: relative;
  top: -0.5px;
}

.help-link:hover {
  color: var(--ink);
}

.permission-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.permission-list > div {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 12px;
}

.permission-list strong {
  font-size: 12.5px;
  font-weight: 400;
}

.permission-list p {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.7;
}

.inline-note--plain {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.inline-note .icon {
  margin-top: 1px;
  flex: 0 0 auto;
  color: var(--muted-2);
}

.inline-note p {
  font-size: 11px;
  line-height: 1.65;
}

.meta-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.meta-list > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

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

.meta-list dt {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.meta-list dd {
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 500;
  text-align: right;
  overflow-wrap: anywhere;
}

.meta-list--tight > div {
  padding: 6px 0;
}

/* ----------------------------- Company founder picker ----------------------------- */

.drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 28px;
  flex: 0 0 auto;
  color: var(--muted-2);
  cursor: grab;
}

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

.file-name {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.file-name.is-error {
  color: var(--danger);
}

/* ----------------------------- Modal & picker ----------------------------- */

body:has(dialog[open]) {
  overflow: hidden;
}

.modal {
  width: min(430px, calc(100vw - 28px));
  max-height: min(90vh, 760px);
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: transparent;
  box-shadow: var(--shadow-md);
}

.modal::backdrop {
  background: rgba(13, 29, 23, 0.46);
  backdrop-filter: blur(3px);
}

.modal__panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.modal__panel--wide {
  width: 100%;
}

.modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.modal__head h2,
.modal__panel > h2 {
  margin-top: 4px;
  font-size: 17px;
  font-weight: 650;
}

.modal__panel > p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.65;
}

.picker-results {
  width: 100%;
  max-height: 270px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.picker-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}

.picker-result + .picker-result {
  border-top: 1px solid var(--line);
}

.picker-result__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.picker-result__body strong {
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.picker-result__body small {
  color: var(--muted-2);
  font-size: 10px;
}

.picker-hint {
  padding: 14px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
  line-height: 1.6;
}

.picker-hint--error {
  color: var(--danger);
}

/* ----------------------------- Detail layout ----------------------------- */

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 20px;
  align-items: start;
}

.detail-layout__main {
  min-width: 0;
}

.option-list {
  margin-top: 14px;
  padding: 0 18px;
}

.option-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.option-row:first-child {
  border-top: 0;
}

.option-row .input {
  flex: 1;
  max-width: 340px;
}

.option-row__usage {
  flex: 0 0 auto;
  min-width: 68px;
  color: var(--muted-2);
  font-size: 10px;
  text-align: right;
}

/* ----------------------------- Ranking list marks ----------------------------- */

/* ----------------------------- Ranking editor ----------------------------- */

.editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}

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

.company-search {
  position: relative;
  z-index: 12;
  margin-bottom: 14px;
}

.company-search .search-field {
  max-width: none;
}

.company-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 25;
  max-height: 280px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.lineup {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lineup-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.lineup-row:hover {
  border-color: var(--line-strong);
  background: var(--surface);
}

.lineup-row__position {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  width: 22px;
  flex: 0 0 auto;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 10px;
}

.lineup-row__company {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  min-width: 0;
}

.lineup-row__company > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.lineup-row__company strong {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lineup-row__company small {
  color: var(--muted-2);
  font-size: 10px;
}

.lineup-row > .icon-button {
  opacity: 0.52;
}

.lineup-row:hover > .icon-button {
  opacity: 1;
}

.lineup-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 34px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  text-align: center;
}

.lineup-empty .icon {
  margin-bottom: 8px;
  color: var(--muted-2);
}

.lineup-empty h3 {
  font-size: 12.5px;
  font-weight: 600;
}

.lineup-empty p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10.5px;
}

.field-config-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.field-config-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 47px;
  padding: 7px 3px;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s ease, opacity 0.15s ease;
}

.field-config-row:hover {
  background: rgba(248, 246, 240, 0.55);
}

.field-config-row__check {
  flex: 0 0 auto;
}

.field-config-row__label {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.field-config-row__label strong {
  font-size: 12px;
  font-weight: 550;
}

.field-config-row__label small {
  color: var(--muted-2);
  font-size: 10px;
}

.field-config-row .tag {
  flex: 0 0 auto;
}

.field-config-row .row-actions {
  flex: 0 0 auto;
}

.sort-config {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(120px, 0.7fr);
  gap: 14px;
  margin-top: 15px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  transition: opacity 0.18s ease;
}

/* ----------------------------- API docs ----------------------------- */

.docs-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 20px;
  align-items: start;
}

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

.docs-main .card + .card {
  margin-top: 18px;
}

.docs-card {
  padding: 24px;
}

.docs-card .card__head {
  padding: 0;
  margin-bottom: 18px;
}

.docs-card > .inline-note {
  margin-top: 16px;
  padding-top: 14px;
}

.api-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.api-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.api-meta span {
  color: var(--muted-2);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.api-meta code {
  overflow-wrap: anywhere;
  color: var(--ink-soft);
  font-size: 11px;
}

.docs-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.docs-section-heading h2 {
  margin-top: 4px;
  font-size: 16px;
  font-weight: 650;
}

.docs-section-heading p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.docs-section-heading code {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--surface-3);
  font-size: 11px;
}

.code-block {
  margin-top: 14px;
  border: 1px solid #1b3e32;
  border-radius: 10px;
  overflow: hidden;
  background: #102a21;
}

.code-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  color: rgba(231, 239, 233, 0.55);
  font-size: 10px;
}

.code-copy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 6px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: rgba(231, 239, 233, 0.6);
  font-size: 10px;
}

.code-copy:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.code-block pre {
  margin: 0;
  padding: 15px 16px;
  overflow-x: auto;
  color: #dfeae0;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.7;
  tab-size: 2;
}

.code-block code {
  font-family: inherit;
}

.endpoint-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

.endpoint-heading h2 {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.endpoint-heading p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11.5px;
}

.method-tag {
  display: inline-flex;
  align-items: center;
  height: 23px;
  padding: 0 8px;
  border-radius: 5px;
  background: var(--success-soft);
  color: var(--success);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.docs-params h3 {
  margin: 18px 0 8px;
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 600;
}

.param-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.param-table th {
  padding: 8px 11px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  text-align: left;
}

.param-table td {
  padding: 9px 11px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

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

.param-table code {
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 10px;
  white-space: nowrap;
}

.docs-copy {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

/* ----------------------------- Errors ----------------------------- */

.error-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 0%, rgba(216, 180, 108, 0.08), transparent 30%),
    var(--bg);
}

.error-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 24px;
}

.error-shell > .brand {
  margin-bottom: 30px;
}

.error-panel {
  width: min(520px, 100%);
  padding: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.error-code {
  display: block;
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.error-panel h1 {
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.error-panel p {
  max-width: 370px;
  margin: 9px auto 22px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.error-actions {
  display: flex;
  justify-content: center;
}


/* ----------------------------- Data import ----------------------------- */

.import-upload-card {
  padding: 22px;
  margin-bottom: 18px;
}

.import-upload-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.import-dropzone {
  display: flex;
  min-height: 280px;
  padding: 42px 24px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1.5px dashed var(--blue-line);
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 0%, var(--blue-tint), transparent 64%),
    var(--blue-soft);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.import-dropzone:hover,
.import-dropzone.is-dragging {
  border-color: var(--blue);
  background:
    radial-gradient(circle at 50% 0%, #ffffff, transparent 66%),
    var(--blue-hover);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.import-dropzone.is-dragging {
  border-style: solid;
}

.import-dropzone__icon {
  display: inline-flex;
  margin-bottom: 4px;
  color: var(--blue);
}

.import-dropzone__title {
  color: var(--ink);
  font-size: 15px;
  font-weight: 400;
}

.import-dropzone__hint {
  color: var(--muted);
  font-size: 12px;
}

.import-dropzone__file {
  max-width: 100%;
  margin-top: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.import-upload-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
}

.import-upload-footer .button {
  flex: 0 0 auto;
}

.import-stats .stat-card__value {
  font-size: 16px;
}

.import-diagnostics td {
  font-size: 12px;
}

.founder-token__title-trigger {
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink-soft);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.founder-token__title-trigger:hover {
  border-color: var(--line-strong);
}

.founder-token__title-trigger.is-empty {
  color: var(--muted);
}

.founder-company-title {
  margin-left: 7px;
  color: var(--muted);
  font-size: 11px;
}

.founder-company-inline {
  display: flex;
  align-items: baseline;
  gap: 7px;
  max-width: 100%;
  min-width: 0;
}

.founder-company-inline .founder-company-more {
  align-self: center;
}

.founder-company-inline .founder-company-link {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.founder-company-inline .founder-company-title {
  margin-left: 0;
  white-space: nowrap;
}

.founder-company-inline .founder-company-more {
  margin-left: 0;
  flex: 0 0 auto;
}

.api-key-secret {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
}

.api-key-secret code {
  overflow: hidden;
  color: var(--muted);
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 700px) {
  .import-upload-card {
    padding: 14px;
  }

  .import-dropzone {
    min-height: 230px;
    padding: 32px 16px;
  }

  .import-upload-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .import-upload-footer .button {
    width: 100%;
  }
}

.import-export-card {
  padding: 22px;
  margin-bottom: 18px;
}

.import-export-card .section-heading {
  margin-bottom: 14px;
}

.import-export-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.import-export-body p {
  max-width: 760px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.import-export-body .button {
  flex: 0 0 auto;
}

@media (max-width: 700px) {
  .import-export-card {
    padding: 14px;
  }

  .import-export-body {
    align-items: stretch;
    flex-direction: column;
  }

  .import-export-body .button {
    width: 100%;
  }
}

.import-template-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #ffffff;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.import-template-box__note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
}

.import-template-box__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.import-template-box .text-link {
  font-size: 12px;
}

.import-template-box__sep {
  color: var(--muted-2);
}

@media (max-width: 700px) {
  .import-template-box__sep {
    display: none;
  }
}

.import-ai-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--blue);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.import-ai-link:hover {
  text-decoration: underline;
}

.ai-guide-copy {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.ai-guide-prompt {
  margin-top: 14px;
}

.ai-guide-prompt textarea {
  min-height: 240px;
  resize: vertical;
  line-height: 1.7;
}

.import-export-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

@media (max-width: 700px) {
  .import-export-actions {
    flex-direction: column;
    width: 100%;
  }

  .import-export-actions .button {
    width: 100%;
  }
}

.import-changes {
  overflow: hidden;
}

.card__hint {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.import-changes__count {
  color: var(--muted);
  font-size: 11px;
}

.import-change-list {
  border-top: 1px solid var(--line);
}

.import-change {
  border-bottom: 1px solid var(--line);
}

.import-change:last-child {
  border-bottom: 0;
}

.import-change summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  cursor: pointer;
  list-style: none;
}

.import-change summary::-webkit-details-marker {
  display: none;
}

.import-change summary:hover {
  background: var(--surface-2);
}

.import-change__kind {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--surface-3);
  color: var(--muted);
  font-size: 10px;
}

.import-change summary strong {
  color: var(--ink);
  font-size: 12px;
}

.import-change summary small {
  color: var(--muted-2);
  font-size: 11px;
}

.import-change__count {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
}

.import-change__chevron {
  display: flex;
  color: var(--muted-2);
  transition: transform 0.15s;
}

.import-change[open] .import-change__chevron {
  transform: rotate(180deg);
}

.import-change__table {
  min-width: 560px;
  border-top: 1px solid var(--line);
}

.import-change__table th,
.import-change__table td {
  padding: 8px 16px;
  font-size: 11px;
}

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

.import-change__after {
  color: var(--ink);
  font-weight: 600;
}

.preview-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 16px;
  overflow: hidden;
  background: var(--line);
}

.preview-summary > div {
  display: grid;
  gap: 4px;
  padding: 13px 16px;
  background: var(--surface);
}

.preview-summary span {
  color: var(--muted);
  font-size: 11px;
}

.preview-summary strong {
  color: var(--ink);
  font-size: 13px;
}

.ranking-preview-table .col-rank {
  width: 64px;
}

.preview-rank {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.preview-company {
  display: flex;
  align-items: center;
  gap: 9px;
}

.preview-image {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  object-fit: contain;
  background: var(--surface-2);
}

.preview-company strong {
  display: block;
  color: var(--ink);
  font-size: 12px;
}

.preview-company small {
  color: var(--muted-2);
  font-size: 10px;
}

.preview-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.preview-chip {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--surface-3);
  color: var(--ink-soft);
  font-size: 10px;
}

.preview-founders {
  display: grid;
  gap: 3px;
  font-size: 11px;
}

.preview-founders small {
  margin-left: 4px;
  color: var(--muted);
}

@media (max-width: 800px) {
  .preview-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.docs-layout.docs-layout--single {
  grid-template-columns: minmax(0, 1fr);
}

.docs-layout--single .docs-main {
  width: 100%;
}

.docs-field-types {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
}

@media (max-width: 640px) {
  .docs-field-types {
    grid-template-columns: 1fr;
  }
}

.method-tag--public {
  background: var(--blue-soft);
  color: var(--blue);
}

.company-table th.col-actions,
.company-table td.col-actions {
  position: sticky;
  right: 0;
  z-index: 2;
  border-left: 0;
  background: var(--surface);
  box-shadow: inset 1px 0 0 var(--line), -8px 0 12px -14px rgba(25, 35, 30, 0.2);
}

.company-table th.col-actions {
  z-index: 3;
  background: var(--surface-2);
}

.company-table tbody tr:hover td.col-actions {
  background: var(--surface-2);
}

.table-wrap.is-dragging,
.table-wrap.is-dragging * {
  cursor: grabbing !important;
  user-select: none;
}

.table-wrap.is-holding,
.table-wrap.is-holding * {
  cursor: grabbing !important;
}

.preview-tab-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 11px;
}

.preview-tab-head > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.company-table th.col-company,
.company-table td.col-company {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--surface);
  box-shadow: inset -1px 0 0 var(--line);
}

.company-table th.col-company {
  z-index: 3;
  background: var(--surface-2);
}

.company-table tbody tr:hover td.col-company {
  background: var(--surface-2);
}
