/* Global Search */
.sofl-search-box {
  width: min(380px, 100%);
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px 0 16px;
  border: 1px solid var(--sofl-border);
  border-radius: 14px;
  background: #ffffff;
  color: var(--sofl-muted);
  box-shadow: 0 10px 26px rgba(15, 23, 42, .06);
  text-align: left;
}

.sofl-search-box i {
  color: var(--sofl-gold);
}

.sofl-search-box span {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .9rem;
  font-weight: 650;
}

.sofl-search-box kbd,
.sofl-command-input kbd {
  border: 1px solid var(--sofl-border);
  border-bottom-width: 2px;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--sofl-muted);
  box-shadow: none;
  font-size: .72rem;
  font-weight: 800;
}

.sofl-search-box:hover {
  border-color: rgba(212, 168, 67, .52);
  box-shadow: 0 14px 34px rgba(15, 23, 42, .10);
}

.sofl-search-modal .modal-content {
  border: 0;
  border-radius: 18px;
}

.sofl-command-palette {
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, .24);
}

.sofl-command-input {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--sofl-border);
}

.sofl-command-input i {
  color: var(--sofl-gold);
  font-size: 1.05rem;
}

.sofl-command-input input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--sofl-dark);
  font-size: 1.05rem;
  font-weight: 700;
}

.sofl-search-suggestions {
  max-height: 520px;
  overflow-y: auto;
  padding: 12px;
  background: #ffffff;
}

.sofl-command-section {
  padding: 8px;
}

.sofl-command-section-title {
  margin-bottom: 10px;
  color: var(--sofl-muted);
  font-size: .75rem;
  font-weight: 850;
  text-transform: uppercase;
}

.sofl-search-suggestion-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto 16px;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  color: var(--sofl-text);
  text-decoration: none;
}

.sofl-search-suggestion-item:hover,
.sofl-search-suggestion-item.is-active {
  background: #f8fafc;
  color: var(--sofl-dark);
}

.sofl-search-item-icon {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 13px;
  background: rgba(212, 168, 67, .14);
  color: var(--sofl-gold-deep);
}

.sofl-search-item-body {
  min-width: 0;
}

.sofl-search-item-body strong,
.sofl-search-item-body small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sofl-search-item-body strong {
  color: var(--sofl-dark);
  font-weight: 850;
}

.sofl-search-item-body small {
  margin-top: 3px;
  color: var(--sofl-muted);
  font-size: .82rem;
}

.sofl-search-module-badge,
.sofl-access-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f3f4f6;
  color: var(--sofl-dark);
  font-size: .74rem;
  font-weight: 850;
}

.sofl-search-module-badge {
  background: rgba(15, 23, 42, .07);
}

.sofl-access-badge {
  background: rgba(34, 197, 94, .10);
  color: #15803d;
}

.sofl-access-badge.locked {
  background: rgba(212, 168, 67, .18);
  color: #8a6417;
}

.sofl-search-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sofl-search-chip-row.vertical {
  display: grid;
}

.sofl-search-chip-row a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid var(--sofl-border);
  border-radius: 999px;
  background: #ffffff;
  color: var(--sofl-text);
  font-size: .82rem;
  font-weight: 750;
  text-decoration: none;
}

.sofl-search-chip-row a:hover {
  border-color: rgba(212, 168, 67, .5);
  color: var(--sofl-dark);
}

.sofl-search-result-page {
  display: grid;
  gap: 22px;
}

.sofl-search-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 28px;
  align-items: end;
  padding: 28px;
  border: 1px solid rgba(212, 168, 67, .20);
  border-radius: 16px;
  background: linear-gradient(135deg, #0f172a, #172033);
  color: #ffffff;
  box-shadow: 0 22px 50px rgba(15, 23, 42, .16);
}

.sofl-search-hero h1 {
  max-width: 660px;
  margin: 12px 0 8px;
  color: #ffffff;
  font-size: clamp(1.65rem, 3vw, 2.5rem);
  font-weight: 900;
}

.sofl-search-hero p {
  max-width: 640px;
  margin: 0;
  color: rgba(255, 255, 255, .72);
}

.sofl-search-hero-form {
  position: relative;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 16px;
  background: #ffffff;
}

.sofl-search-hero-form > i {
  margin-left: 8px;
  color: var(--sofl-gold);
}

.sofl-search-hero-form .form-control {
  border: 0;
  box-shadow: none;
  font-weight: 700;
}

.sofl-search-hero-form .sofl-search-suggestions {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  z-index: 25;
  border: 1px solid var(--sofl-border);
  border-radius: 16px;
  box-shadow: 0 22px 50px rgba(15, 23, 42, .16);
}

.sofl-search-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 280px;
  gap: 22px;
  align-items: start;
}

.sofl-search-filter-card {
  padding: 18px;
  border: 1px solid var(--sofl-border);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--sofl-shadow-soft);
}

.sofl-filter-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.sofl-filter-card-header strong {
  color: var(--sofl-dark);
  font-weight: 900;
}

.sofl-check-list {
  display: grid;
  gap: 9px;
}

.sofl-check-list label {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--sofl-text);
  font-size: .9rem;
  font-weight: 700;
}

.sofl-search-results {
  display: grid;
  gap: 18px;
}

.sofl-search-results-head,
.sofl-search-group-title,
.sofl-search-mobile-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sofl-search-results-head h2 {
  margin: 0 0 4px;
  color: var(--sofl-dark);
  font-size: 1.25rem;
  font-weight: 900;
}

.sofl-search-results-head span,
.sofl-search-meta {
  color: var(--sofl-muted);
  font-size: .82rem;
  font-weight: 700;
}

.sofl-search-view-toggle {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--sofl-border);
  border-radius: 12px;
  background: #ffffff;
}

.sofl-search-view-toggle button {
  width: 34px;
  height: 32px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--sofl-muted);
}

.sofl-search-view-toggle button.active {
  background: var(--sofl-dark);
  color: #ffffff;
}

.sofl-search-group {
  display: grid;
  gap: 12px;
}

.sofl-search-group-title {
  justify-content: flex-start;
}

.sofl-search-group-title span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(212, 168, 67, .15);
  color: var(--sofl-gold-deep);
}

.sofl-search-group-title strong {
  color: var(--sofl-dark);
  font-weight: 900;
}

.sofl-search-group-title em {
  color: var(--sofl-muted);
  font-style: normal;
  font-weight: 800;
}

.sofl-search-result-list {
  display: grid;
  gap: 12px;
}

.sofl-search-result-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--sofl-border);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--sofl-shadow-soft);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.sofl-search-result-card:hover {
  transform: translateY(-2px);
  border-color: rgba(212, 168, 67, .42);
  box-shadow: 0 18px 44px rgba(15, 23, 42, .12);
}

.sofl-search-result-card.is-locked {
  background: linear-gradient(135deg, #ffffff, #fffaf0);
}

.sofl-search-result-main {
  display: flex;
  gap: 14px;
  min-width: 0;
}

.sofl-search-result-card h2 {
  margin: 0;
  color: var(--sofl-dark);
  font-size: 1.02rem;
  font-weight: 900;
  line-height: 1.35;
}

.sofl-search-result-card p {
  margin: 8px 0 0;
  color: var(--sofl-muted);
  line-height: 1.55;
}

.sofl-search-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.sofl-search-tags span {
  color: var(--sofl-muted);
  font-size: .76rem;
  font-weight: 800;
}

.sofl-search-result-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sofl-search-highlight,
.sofl-search-result-card mark {
  padding: 0 3px;
  border-radius: 5px;
  background: rgba(231, 200, 115, .42);
  color: inherit;
}

.sofl-search-empty-state {
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 42px 24px;
  border: 1px dashed rgba(107, 114, 128, .34);
  border-radius: 16px;
  background: #ffffff;
  color: var(--sofl-muted);
  text-align: center;
}

.sofl-search-empty-state > i {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(212, 168, 67, .16);
  color: var(--sofl-gold-deep);
  font-size: 1.3rem;
}

.sofl-search-empty-state strong {
  color: var(--sofl-dark);
  font-size: 1.05rem;
  font-weight: 900;
}

.sofl-search-help-card p {
  color: var(--sofl-muted);
  line-height: 1.55;
}

.sofl-admin-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.sofl-admin-page-head h1 {
  margin: 8px 0 4px;
  color: var(--sofl-dark);
  font-size: 1.8rem;
  font-weight: 900;
}

.sofl-admin-page-head p {
  margin: 0;
  color: var(--sofl-muted);
}

.sofl-premium-tabs {
  padding: 5px;
  border: 1px solid var(--sofl-border);
  border-radius: 14px;
  background: #ffffff;
}

.sofl-premium-tabs .nav-link {
  border-radius: 10px;
  color: var(--sofl-muted);
  font-weight: 800;
}

.sofl-premium-tabs .nav-link.active {
  background: var(--sofl-dark);
  color: #ffffff;
}

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

.sofl-search-kpi-card {
  display: flex;
  gap: 13px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--sofl-border);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--sofl-shadow-soft);
}

.sofl-search-kpi-card > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 13px;
  background: rgba(212, 168, 67, .15);
  color: var(--sofl-gold-deep);
}

.sofl-search-kpi-card small,
.sofl-search-kpi-card strong,
.sofl-search-kpi-card em {
  display: block;
}

.sofl-search-kpi-card small {
  color: var(--sofl-muted);
  font-size: .78rem;
  font-weight: 850;
}

.sofl-search-kpi-card strong {
  overflow: hidden;
  color: var(--sofl-dark);
  font-size: 1.35rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sofl-search-kpi-card em {
  color: var(--sofl-muted);
  font-size: .76rem;
  font-style: normal;
  font-weight: 700;
}

.sofl-admin-filter-bar {
  display: flex;
  align-items: end;
  gap: 12px;
  margin-bottom: 18px;
}

.sofl-admin-filter-bar .sofl-filter-search {
  min-width: min(360px, 100%);
}

.sofl-table-card {
  overflow: hidden;
  border: 1px solid var(--sofl-border);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--sofl-shadow-soft);
}

.sofl-premium-table {
  margin-bottom: 0;
}

.sofl-premium-table thead th {
  border-bottom: 1px solid var(--sofl-border);
  background: #f8fafc;
  color: var(--sofl-muted);
  font-size: .75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.sofl-premium-table tbody td {
  padding-top: 15px;
  padding-bottom: 15px;
  color: var(--sofl-text);
}

.sofl-premium-table tbody tr:hover {
  background: #f8fafc;
}

.sofl-table-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--sofl-gold-deep);
  font-size: .84rem;
  font-weight: 850;
  text-decoration: none;
}

.sofl-table-action:hover {
  color: var(--sofl-dark);
}

@media (max-width: 1199.98px) {
  .sofl-search-layout {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .sofl-search-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 991.98px) {
  .sofl-search-hero,
  .sofl-search-layout {
    grid-template-columns: 1fr;
  }

  .sofl-admin-page-head,
  .sofl-admin-filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .sofl-premium-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    width: 100%;
  }
}

@media (max-width: 767.98px) {
  .sofl-search-box {
    width: 46px;
    min-width: 46px;
    justify-content: center;
    padding: 0;
    border-radius: 13px;
  }

  .sofl-search-box span,
  .sofl-search-box kbd {
    display: none;
  }

  .sofl-search-hero {
    padding: 20px;
    border-radius: 14px;
  }

  .sofl-search-hero-form,
  .sofl-search-result-card {
    grid-template-columns: 1fr;
  }

  .sofl-search-hero-form > i {
    display: none;
  }

  .sofl-search-result-actions {
    justify-content: flex-end;
  }

  .sofl-search-kpi-grid {
    grid-template-columns: 1fr;
  }

  .sofl-search-suggestion-item {
    grid-template-columns: 38px minmax(0, 1fr) 16px;
  }

  .sofl-search-suggestion-item .sofl-search-module-badge {
    display: none;
  }
}
