body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  scroll-behavior: smooth;
}

main {
  flex: 1 1 auto;
  min-height: 0;
}

:root {
  --bs-violet-rgb: 111, 66, 193;
}

/* Уменьшаем отступы глобальных утилит и контейнеров, чтобы сократить визуальные разрывы */
.mb-4 {
  margin-bottom: 0.1rem !important;
}

.px-4 {
  padding-right: 0.2rem !important;
  padding-left: 0.2rem !important;
}

.container,
.container-fluid,
.container-lg,
.container-md,
.container-sm,
.container-xl,
.container-xxl {
  --bs-gutter-x: 0.8rem;
}

/* Плавное появление виджетов после загрузки */
@keyframes widget-fade-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.app-navbar {
  --bs-navbar-padding-y: 0.9rem;
  border-bottom: 1px solid var(--bs-border-color);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.08);
}

[data-bs-theme="dark"] .app-navbar {
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.08);
}

.app-navbar .container-fluid {
  align-items: center;
  gap: 1rem;
}

.app-navbar-layout {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.app-navbar .navbar-brand {
  line-height: 1.2;
}

.app-navbar .navbar-subtitle {
  display: block;
  margin-top: 0.1rem;
}

.api-status-dot {
  width: 0.65rem;
  height: 0.65rem;
}

.api-status-note {
  color: var(--bs-secondary-color);
}

.api-status-panel {
  padding: 0.25rem 0;
}

.health-widget {
  max-width: 320px;
}

.theme-swatch {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.65rem;
  display: inline-block;
  background: linear-gradient(135deg, #ffffff 0%, #eef2f4 100%);
  box-shadow: inset 0 0 0 1px var(--bs-border-color-translucent);
}

.theme-swatch.theme-dark {
  background: linear-gradient(135deg, #0b1722 0%, #2f3640 100%);
}

#theme-menu .dropdown-item {
  color: var(--bs-body-color);
  transition: background-color 160ms ease, color 160ms ease, box-shadow 180ms ease;
}

#theme-menu {
  max-height: 360px;
  overflow-y: auto;
}

#theme-menu .dropdown-item:hover,
#theme-menu .dropdown-item:focus-visible,
#theme-menu .dropdown-item.active {
  background-color: var(--bs-tertiary-bg);
  color: var(--bs-body-color);
  box-shadow: inset 0 0 0 1px var(--bs-border-color-translucent);
}

#theme-menu .theme-title .fw-semibold {
  color: var(--bs-body-color);
}

#theme-menu .theme-hint,
#theme-menu .theme-hint .bi {
  color: var(--bs-secondary-color);
  opacity: 0.92;
}

#theme-menu .theme-option.active .theme-hint {
  opacity: 1;
}

.theme-option.active .fw-semibold {
  color: var(--bs-primary);
}

#theme-menu .theme-option {
  border-radius: 0.65rem;
}

#theme-menu .theme-option:hover .theme-swatch,
#theme-menu .theme-option:focus-visible .theme-swatch {
  box-shadow: 0 0 0 2px rgba(var(--bs-primary-rgb), 0.3);
}

.grid-stack {
  height: 100%;
}

.grid-stack > .grid-stack-item {
  animation: widget-fade-in 320ms ease;
}

.grid-stack > .grid-stack-item > .ui-resizable-se {
  opacity: 0;
}

.grid-stack-item-content {
  display: flex;
  flex-direction: column;
  transition: box-shadow 200ms ease, transform 200ms ease, background-color 180ms ease;
}

.grid-stack-item:hover .grid-stack-item-content {
  box-shadow: 0 0.85rem 1.6rem rgba(0, 0, 0, 0.12);
}

[data-bs-theme="dark"] .grid-stack-item:hover .grid-stack-item-content {
  box-shadow: 0 0.85rem 1.6rem rgba(0, 0, 0, 0.35);
}

.grid-stack-item .card-header {
  cursor: move;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 1;
  background-color: var(--bs-secondary-bg);
  color: var(--bs-body-color);
}

.grid-stack-item .card-body {
  overflow: auto;
  flex: 1 1 auto;
  min-height: 0;
}

.ioc-input {
  font-family: "JetBrains Mono", "Fira Code", monospace;
  resize: none;
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);
  border-color: var(--bs-border-color);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
  flex: 1 1 auto;
  min-height: 160px;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease, color 160ms ease;
}

.input-widget-body {
  display: flex;
  flex-direction: column;
    height: 100%;
}

.input-widget-controls {
  flex-shrink: 0;
}

.ioc-input:focus {
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.15);
}

.ioc-input::placeholder {
  color: var(--bs-secondary-color);
}

.type-card {
  min-height: 140px;
}

.type-card .icon-ring {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.parsed-values .list-group-item {
  background-color: transparent;
}

.parsed-list .badge {
  letter-spacing: 0.02em;
}

.parsed-item {
  background-color: transparent;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.parsed-item .parsed-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.ioc-tags {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.ioc-tag-icon {
  width: 1rem;
  height: 1rem;
}

.ioc-tag-badge {
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);
}

.ioc-vt-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-2px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

.parsed-item:hover .ioc-vt-link,
.parsed-item:focus-within .ioc-vt-link {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.ioc-vt-link img {
  width: 1rem;
  height: 1rem;
}

.parsed-item .ioc-value {
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.ioc-value-copyable {
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}

.ioc-value-copyable:hover,
.ioc-value-copyable:focus-visible {
  color: inherit;
  text-decoration: underline dotted;
}

.ioc-type-badge {
  background-color: var(--bs-tertiary-bg);
  color: var(--bs-body-color);
  border: 1px solid var(--bs-border-color);
}

.hash-badge {
  background-color: transparent;
  border-width: 1px;
}

.hash-md5 {
  background-color: rgba(var(--bs-success-rgb), 0.15);
  border-color: rgba(var(--bs-success-rgb), 0.65);
  color: rgb(var(--bs-success-rgb));
}

.hash-sha1 {
  background-color: rgba(var(--bs-warning-rgb), 0.15);
  border-color: rgba(var(--bs-warning-rgb), 0.65);
  color: rgb(var(--bs-warning-rgb));
}

.hash-sha256 {
  background-color: rgba(var(--bs-primary-rgb), 0.15);
  border-color: rgba(var(--bs-primary-rgb), 0.65);
  color: rgb(var(--bs-primary-rgb));
}

.parsed-item .font-monospace {
  font-size: 0.95rem;
}

.filter-row .filter-pill {
  cursor: pointer;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: transform 140ms ease, box-shadow 180ms ease, opacity 160ms ease;
}

.filter-pill:hover,
.filter-pill:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 0.65rem 1.2rem rgba(0, 0, 0, 0.12);
  opacity: 1;
}

.filter-pill-muted {
  opacity: 0.55;
}

.filter-pill i {
  pointer-events: none;
}

.bg-violet {
  background-color: rgba(var(--bs-violet-rgb), var(--bs-bg-opacity)) !important;
}

.text-violet {
  color: rgba(var(--bs-violet-rgb), 1) !important;
}

.border-violet {
  border-color: rgba(var(--bs-violet-rgb), 1) !important;
}

.verdict-header {
  font-size: 0.95rem;
}

.verdict-label {
  font-weight: 600;
}

.verdict-copy {
  cursor: pointer;
  align-self: flex-start;
}

.verdict-copy:hover,
.verdict-copy:focus-visible {
  text-decoration: none;
}

.btn {
  transition: transform 140ms ease, box-shadow 180ms ease, background-color 150ms ease, color 150ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0.65rem 1.2rem rgba(0, 0, 0, 0.12);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 0.35rem 0.8rem rgba(0, 0, 0, 0.18);
}

[data-bs-theme="dark"] .btn:hover {
  box-shadow: 0 0.65rem 1.2rem rgba(0, 0, 0, 0.35);
}

.toast .toast-body,
.toast .toast-body .small {
  word-break: break-word;
  overflow-wrap: anywhere;
}

.history-entry {
  cursor: pointer;
}

.history-entry .flex-grow-1 {
  min-width: 0;
}

.history-preview {
  display: block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
