.tm-search {
  --tm-text: #07152f;
  --tm-muted: #64748b;
  --tm-border: #dbe3ef;
  --tm-surface: #ffffff;
  --tm-surface-alt: #f8fbff;
  --tm-primary: #2850ea;
  --tm-primary-dark: #1737b8;
  --tm-success-bg: #e8f7ed;
  --tm-success-text: #0f9f4f;
  --tm-warning-bg: #fff5de;
  --tm-warning-text: #b98200;
  --tm-neutral-bg: #eef3fb;
  --tm-neutral-text: #4a5b7a;
  --tm-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  --tm-shadow-hover: 0 18px 34px rgba(15, 23, 42, 0.1);
  color: var(--tm-text);
  font-family: "Segoe UI", Tahoma, sans-serif;
  margin: 0 auto;
  max-width: 1220px;
  padding: 24px 0 48px;
}

.tm-search__header {
  margin-bottom: 24px;
}

.tm-search__title {
  color: var(--tm-text);
  font-size: clamp(2.15rem, 4vw, 3.45rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0 0 10px;
}

.tm-search__subtitle {
  color: var(--tm-muted);
  font-size: 1rem;
  line-height: 1.5;
  margin: 0;
  max-width: 720px;
}

.tm-search__form {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  margin-bottom: 32px;
}

.tm-search__input-wrap {
  align-items: center;
  background: var(--tm-surface);
  border: 1px solid var(--tm-border);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  display: flex;
  min-height: 60px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tm-search__input-wrap:focus-within {
  border-color: #bdd0f8;
  box-shadow: none;
}

.tm-search__input-wrap * {
  box-sizing: border-box;
}

.tm-search__icon,
.tm-search__submit-icon {
  color: #7a8498;
  display: inline-flex;
  flex: 0 0 auto;
  height: 22px;
  justify-content: center;
  width: 22px;
}

.tm-search__icon {
  margin-left: 16px;
  margin-right: 12px;
}

.tm-search__icon svg,
.tm-search__submit-icon svg {
  display: block;
  height: 100%;
  width: 100%;
}

.tm-search__input {
  appearance: none;
  -webkit-appearance: none;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0;
  box-shadow: none !important;
  color: var(--tm-text);
  flex: 1 1 auto;
  font-size: 1rem;
  height: auto;
  margin: 0;
  min-width: 0;
  outline: none;
  padding: 17px 0;
}

.tm-search__input:hover,
.tm-search__input:focus,
.tm-search__input:active {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: none !important;
}

.tm-search__input::placeholder {
  color: #96a0b2;
}

.tm-search__input::-webkit-search-decoration,
.tm-search__input::-webkit-search-cancel-button,
.tm-search__input::-webkit-search-results-button,
.tm-search__input::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

.tm-search__input::-ms-clear,
.tm-search__input::-ms-reveal {
  display: none;
  height: 0;
  width: 0;
}

.tm-search__clear {
  background: transparent;
  border: 0;
  box-shadow: none;
  color: #6b7280;
  cursor: pointer;
  font-size: 1.9rem;
  line-height: 1;
  margin: 0;
  min-height: 100%;
  padding: 0 18px;
  transition: color 0.2s ease;
}

.tm-search__clear:hover,
.tm-search__clear:focus-visible {
  background: transparent;
  border: 0;
  box-shadow: none;
  color: #111827;
  outline: none;
}

.tm-search__submit-icon[hidden],
.tm-search__spinner[hidden] {
  display: none !important;
}

.tm-search.is-loading .tm-search__submit-icon {
  display: none !important;
}

.tm-search.is-loading .tm-search__spinner {
  display: inline-flex !important;
}

.tm-search__submit,
.tm-search__reset {
  align-items: center;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  font-size: 1rem;
  font-weight: 600;
  justify-content: center;
  min-height: 60px;
  padding: 0 22px;
  transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.tm-search__submit {
  background: var(--tm-primary);
  color: #fff;
  gap: 10px;
  min-width: 120px;
  position: relative;
}

.tm-search__submit:hover,
.tm-search__submit:focus-visible {
  background: var(--tm-primary-dark);
  color: #fff;
  transform: translateY(-1px);
}

.tm-search__submit:disabled {
  cursor: progress;
  opacity: 0.8;
}

.tm-search__reset {
  background: #f1f4f9;
  color: #111827;
  min-width: 90px;
}

.tm-search__reset:hover,
.tm-search__reset:focus-visible {
  background: #e6ecf5;
}

.tm-search__spinner {
  animation: tm-spin 0.8s linear infinite;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  border-top-color: #fff;
  display: inline-flex;
  flex: 0 0 18px;
  height: 18px;
  width: 18px;
}

.tm-search__spinner[hidden] {
  display: none;
}

.tm-search__feedback {
  margin-bottom: 22px;
  min-height: 32px;
}

.tm-search__message {
  color: var(--tm-muted);
  font-size: 1.05rem;
}

.tm-search__message.is-error {
  color: #c62828;
}

.tm-search__summary {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 4px;
}

.tm-search__summary-main,
.tm-search__summary-side {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tm-search__summary-main {
  font-size: 1.15rem;
}

.tm-search__context {
  color: var(--tm-muted);
  font-size: 1rem;
}

.tm-pill {
  background: #fff;
  border: 1px solid #dfe5ef;
  border-radius: 999px;
  color: var(--tm-text);
  display: inline-flex;
  font-size: 0.95rem;
  line-height: 1;
  padding: 7px 12px;
}

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

.tm-card {
  background: var(--tm-surface);
  border: 1px solid var(--tm-border);
  border-radius: 18px;
  box-shadow: var(--tm-shadow);
  display: flex;
  flex-direction: column;
  min-height: 100%;
  position: relative;
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
  z-index: 0;
}

.tm-card:hover {
  border-color: #cfdaf0;
  box-shadow: var(--tm-shadow-hover);
  transform: translateY(-5px);
  z-index: 1;
}

.tm-card__head {
  border-bottom: 1px solid var(--tm-border);
  display: flex;
  gap: 16px;
  padding: 16px 18px 14px;
}

.tm-card__image {
  border: 1px solid var(--tm-border);
  border-radius: 10px;
  flex: 0 0 72px;
  height: 72px;
  object-fit: contain;
  width: 72px;
}

.tm-card__image--placeholder {
  align-items: center;
  background: var(--tm-surface-alt);
  color: var(--tm-muted);
  display: inline-flex;
  font-size: 1rem;
  font-weight: 700;
  justify-content: center;
}

.tm-card__head-content {
  flex: 1 1 auto;
  min-width: 0;
}

.tm-card__title {
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 10px;
  text-transform: uppercase;
  word-break: break-word;
}

.tm-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tm-badge {
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1;
  padding: 6px 10px;
}

.tm-badge--primary {
  background: var(--tm-primary);
  color: #fff;
}

.tm-badge--soft {
  background: #f4f1ee;
  color: #0f172a;
}

.tm-badge--status.is-success {
  background: var(--tm-success-bg);
  color: var(--tm-success-text);
}

.tm-badge--status.is-warning {
  background: var(--tm-warning-bg);
  color: var(--tm-warning-text);
}

.tm-badge--status.is-neutral {
  background: var(--tm-neutral-bg);
  color: var(--tm-neutral-text);
}

.tm-card__body {
  display: grid;
  gap: 0;
  padding: 0 18px 18px;
}

.tm-card__alert {
  align-items: flex-start;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  color: #ef2323;
  display: flex;
  gap: 12px;
  margin: 0 18px 12px;
  padding: 12px 14px;
}

.tm-card__alert-icon {
  align-items: center;
  border: 1px solid currentColor;
  border-radius: 999px;
  display: inline-flex;
  flex: 0 0 18px;
  font-size: 0.8rem;
  font-weight: 700;
  height: 18px;
  justify-content: center;
  line-height: 1;
  margin-top: 2px;
  width: 18px;
}

.tm-card__alert-copy {
  display: grid;
  gap: 4px;
}

.tm-card__alert-copy strong {
  color: inherit;
  font-size: 0.86rem;
  line-height: 1.2;
}

.tm-card__alert-copy span {
  color: inherit;
  font-size: 0.84rem;
  line-height: 1.35;
}

.tm-card__row {
  border-top: 1px solid var(--tm-border);
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(100px, 140px) minmax(0, 1fr);
  padding: 12px 0;
}

.tm-card__row--stacked {
  grid-template-columns: 1fr;
  gap: 8px;
}

.tm-card__label {
  color: var(--tm-muted);
  font-size: 0.82rem;
}

.tm-card__value {
  color: var(--tm-text);
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.4;
  text-align: right;
  word-break: break-word;
}

.tm-card__row--stacked .tm-card__value {
  text-align: left;
}

.tm-search__empty {
  background: var(--tm-surface-alt);
  border: 1px dashed var(--tm-border);
  border-radius: 16px;
  color: var(--tm-muted);
  padding: 24px;
  text-align: center;
}

.tm-card--skeleton {
  border-radius: 18px;
  overflow: hidden;
}

.tm-skeleton,
.tm-card__image--placeholder {
  animation: tm-pulse 1.4s ease-in-out infinite;
}

.tm-skeleton {
  background: linear-gradient(90deg, #f5f7fb 25%, #edf2f8 37%, #f5f7fb 63%);
  background-size: 400% 100%;
  border-radius: 10px;
  min-height: 18px;
}

.tm-skeleton--title {
  height: 22px;
  margin-bottom: 14px;
  max-width: 58%;
}

.tm-skeleton-row {
  display: flex;
  gap: 10px;
}

.tm-skeleton--badge {
  height: 32px;
  width: 96px;
}

.tm-skeleton--line {
  height: 16px;
  margin-top: 16px;
  width: 62%;
}

.tm-skeleton--wide {
  width: 84%;
}

@keyframes tm-pulse {
  0% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0 50%;
  }
}

@keyframes tm-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

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

@media (max-width: 782px) {
  .tm-search {
    padding: 12px 0 32px;
  }

  .tm-search__subtitle {
    font-size: 1.1rem;
  }

  .tm-search__form {
    grid-template-columns: 1fr;
    margin-bottom: 24px;
  }

  .tm-search__submit,
  .tm-search__reset {
    width: 100%;
  }

  .tm-search__summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .tm-search__grid {
    grid-template-columns: 1fr;
  }

  .tm-card:hover {
    box-shadow: var(--tm-shadow);
    transform: translateY(-2px);
  }

  .tm-card__row {
    gap: 8px;
    grid-template-columns: 1fr;
  }

  .tm-card__value {
    text-align: left;
  }
}
