:root {
  color-scheme: only light;
  --bg: #f6f4ef;
  --card: #ffffff;
  --accent: #0f6b62;
  --accent-dark: #0c534c;
  --ink: #1a1c1f;
  --muted: #5a646e;
  --stroke: #e5dfd6;
  --shadow: 0 16px 32px rgba(26, 33, 41, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Manrope", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  padding-bottom: env(safe-area-inset-bottom);
}

h1,
h2,
h3 {
  font-family: "Rubik", "Manrope", sans-serif;
}

button,
input,
select {
  font-family: inherit;
}

.bg {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(255, 198, 122, 0.45), transparent 45%),
    radial-gradient(circle at 10% 20%, rgba(82, 170, 161, 0.35), transparent 40%);
  z-index: 0;
}

.app {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  padding: 20px 16px calc(96px + env(safe-area-inset-bottom));
}

.top {
  background: var(--card);
  border-radius: 22px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand__logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 20px;
}

.brand__name {
  font-weight: 700;
  font-size: 18px;
}

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

.pill {
  border: 1px solid var(--stroke);
  background: #fff;
  color: var(--accent-dark);
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
}

.profile-badge {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.profile-badge:active {
  transform: translateY(1px);
}

.profile-badge__ring {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: conic-gradient(from 120deg, #19a891, #0f6b62, #49cbb4, #19a891);
  display: grid;
  place-items: center;
  position: relative;
  box-shadow: 0 10px 18px rgba(15, 107, 98, 0.25);
}

.profile-badge__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  color: var(--accent-dark);
  display: grid;
  place-items: center;
  font-weight: 700;
  overflow: hidden;
}

.profile-badge__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.profile-badge__avatar span {
  display: block;
}

.profile-badge__avatar.is-image img {
  display: block;
}

.profile-badge__avatar.is-image span {
  display: none;
}


.filters {
  background: var(--card);
  border-radius: 22px;
  padding: 16px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
}

.filters__row {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
  font-weight: 600;
  color: var(--accent-dark);
}

.field input[type="range"] {
  accent-color: var(--accent);
}

.field input[type="text"] {
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
}

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

.filters__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.select,
.ghost {
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: #fff;
  padding: 10px 12px;
  font-weight: 600;
  color: var(--accent-dark);
}

.ghost {
  cursor: pointer;
}

.cards {
  margin-top: 16px;
  display: grid;
  gap: 14px;
}

.promo {
  margin-top: 16px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 24px;
  background: linear-gradient(135deg, #0f6b62, #15897c 55%, #1da18f);
  color: #e8fff6;
  box-shadow: 0 26px 44px rgba(15, 107, 98, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.18);
  position: relative;
  overflow: hidden;
}

.promo__icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.2);
  color: #e8fff6;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 20px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.promo__title {
  font-weight: 800;
  font-size: 16px;
  margin-bottom: 4px;
}

.promo__text {
  color: rgba(232, 255, 246, 0.85);
  font-size: 13px;
}

.promo__counter {
  text-align: center;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 18px;
  padding: 8px 14px;
  min-width: 78px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 12px 20px rgba(8, 74, 66, 0.25);
}

.promo__count {
  font-weight: 800;
  font-size: 20px;
  color: #0c534c;
}

.promo::before {
  content: "";
  position: absolute;
  inset: -40% -10% -40% -10%;
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.28), transparent 45%),
    radial-gradient(circle at 80% 40%, rgba(255, 255, 255, 0.22), transparent 50%),
    radial-gradient(circle at 50% 80%, rgba(255, 255, 255, 0.18), transparent 55%);
  opacity: 0.6;
  animation: promo-shimmer 6s ease-in-out infinite;
}

.promo__counter {
  box-shadow: 0 0 0 rgba(255, 255, 255, 0.4);
  animation: promo-glow 2.6s ease-in-out infinite;
}

@keyframes promo-shimmer {
  0%,
  100% {
    opacity: 0.45;
    filter: blur(0px);
  }
  50% {
    opacity: 0.9;
    filter: blur(1px);
  }
}

@keyframes promo-glow {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(255, 255, 255, 0.35);
  }
  50% {
    box-shadow: 0 0 18px rgba(255, 255, 255, 0.6), 0 0 36px rgba(15, 107, 98, 0.3);
  }
}

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

.tab {
  display: none;
  animation: tab-fade 0.35s ease;
}

.tab.is-active {
  display: block;
}

@keyframes tab-fade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  background: var(--card);
  border-radius: 20px;
  padding: 16px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
}

.card__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
}

.card__brand {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: flex-start;
  column-gap: 10px;
  min-width: 0;
}

.card__logo {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(15, 107, 98, 0.1);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

.card__logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card__logo span {
  display: none;
}

.card__logo--text span {
  display: block;
}

.card__logo--text img {
  display: none;
}

.card__title {
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card__badge {
  font-size: 11px;
  font-weight: 700;
  color: #0f6b62;
  background: rgba(15, 107, 98, 0.12);
  padding: 6px 10px;
  border-radius: 999px;
  display: block;
  align-self: start;
  justify-self: end;
  line-height: 1.2;
  flex-shrink: 0;
  max-width: 140px;
  text-align: left;
  overflow: hidden;
  word-break: break-word;
}

.card__badge span {
  display: inline-block;
  margin-right: 6px;
}

.card__rating {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
  flex-shrink: 0;
  border: 1px solid transparent;
  box-shadow: 0 10px 18px rgba(26, 33, 41, 0.08);
  letter-spacing: 0.2px;
}

.card__rating--high {
  color: #0c534c;
  background: linear-gradient(135deg, rgba(15, 107, 98, 0.2), rgba(255, 255, 255, 0.4));
  border-color: rgba(15, 107, 98, 0.2);
}

.card__rating--mid {
  color: #9a4a12;
  background: linear-gradient(135deg, rgba(255, 198, 122, 0.3), rgba(255, 255, 255, 0.4));
  border-color: rgba(255, 198, 122, 0.4);
}

.card__rating--low {
  color: #7a2f2f;
  background: linear-gradient(135deg, rgba(227, 64, 64, 0.15), rgba(255, 255, 255, 0.4));
  border-color: rgba(227, 64, 64, 0.25);
}

.badge--top {
  background: rgba(247, 161, 90, 0.2);
  color: #b24a18;
}

.badge--check {
  background: rgba(79, 172, 120, 0.2);
  color: #2e6b46;
}

.badge--new {
  background: rgba(93, 140, 255, 0.18);
  color: #2b4aa6;
}

.badge--term {
  background: rgba(255, 203, 76, 0.24);
  color: #a26b00;
}

.badge--online {
  background: rgba(255, 126, 96, 0.2);
  color: #a43820;
}

.badge--docs {
  background: rgba(140, 206, 255, 0.2);
  color: #246689;
}

.badge--loyal {
  background: rgba(167, 112, 255, 0.2);
  color: #5f2fa6;
}

.badge--stable {
  background: rgba(92, 197, 183, 0.2);
  color: #2c7b71;
}

.badge--fast {
  background: rgba(255, 179, 219, 0.28);
  color: #8c2c63;
}

.card__info {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.card__info span {
  color: var(--ink);
  font-weight: 600;
}

.card__actions {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 10px;
  align-items: center;
}

.card__info-btn {
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: #f2f0ea;
  color: var(--accent-dark);
  font-weight: 700;
  cursor: pointer;
  height: 40px;
  line-height: 1;
  width: 40px;
}

.card__apply {
  border: none;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  padding: 10px 12px;
  height: 40px;
  width: 100%;
}

.bottom {
  --active-index: 0;
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(16px + env(safe-area-inset-bottom));
  width: calc(100% - 32px);
  max-width: 640px;
  background: #fff;
  border-radius: 20px;
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid rgba(15, 107, 98, 0.08);
}

.bottom__indicator {
  position: absolute;
  inset: 6px;
  width: calc((100% - 12px) / 3);
  background: linear-gradient(135deg, rgba(15, 107, 98, 0.16), rgba(15, 107, 98, 0.08));
  border-radius: 16px;
  transform: translateX(calc(var(--active-index) * 100%));
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 0;
}

.bottom__item {
  border: none;
  background: transparent;
  padding: 8px 6px;
  border-radius: 14px;
  font-weight: 600;
  color: var(--muted);
  display: grid;
  place-items: center;
  gap: 4px;
  cursor: pointer;
  position: relative;
  z-index: 1;
  transition: color 0.2s ease, transform 0.2s ease;
}

.bottom__item.active {
  color: var(--accent-dark);
}

.bottom__item:active {
  transform: scale(0.98);
}

.bottom__icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
}

.bottom__icon svg {
  width: 100%;
  height: 100%;
}

.bottom__label {
  font-size: 12px;
}

.panel {
  background: var(--card);
  border-radius: 20px;
  padding: 16px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.panel--soft {
  background: #f9f6f1;
}

.panel--accent {
  background: linear-gradient(135deg, rgba(15, 107, 98, 0.12), rgba(255, 198, 122, 0.16));
}

.panel__title {
  font-weight: 700;
  font-size: 18px;
}

.panel__subtitle {
  color: var(--muted);
  font-size: 13px;
}

.panel__list {
  display: grid;
  gap: 10px;
}

.panel__empty {
  color: var(--muted);
  font-size: 13px;
  padding: 8px 2px;
}

.panel__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--stroke);
  background: #fff;
}

.panel__name {
  font-weight: 700;
}

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

.panel__cta {
  border: none;
  background: var(--accent);
  color: #fff;
  border-radius: 14px;
  padding: 10px 12px;
  font-weight: 700;
  cursor: pointer;
}

.chip {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.chip--progress {
  background: rgba(255, 198, 122, 0.25);
  color: #a85a1c;
}

.chip--approved {
  background: rgba(15, 107, 98, 0.16);
  color: var(--accent-dark);
}

.chip--need {
  background: rgba(227, 64, 64, 0.12);
  color: #b22b2b;
}

.chip--muted {
  background: rgba(90, 100, 110, 0.12);
  color: var(--muted);
}

.profile-card {
  background: var(--card);
  border-radius: 22px;
  padding: 16px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  margin-top: 16px;
}

.profile-card__avatar {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  overflow: hidden;
}

.profile-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.profile-card__avatar span {
  display: block;
}

.profile-card__name {
  font-weight: 700;
}

.profile-card__meta {
  color: var(--muted);
  font-size: 12px;
}

.profile-card__action {
  border: 1px solid var(--stroke);
  background: #fff;
  border-radius: 12px;
  padding: 8px 12px;
  font-weight: 600;
  cursor: pointer;
}

.profile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--stroke);
  font-size: 14px;
}

.toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--stroke);
  font-weight: 600;
}

.toggle__button {
  width: 44px;
  height: 24px;
  border-radius: 999px;
  border: none;
  background: rgba(15, 107, 98, 0.2);
  padding: 3px;
  cursor: pointer;
  position: relative;
  transition: background 0.2s ease;
}

.toggle__button span {
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  display: block;
  transform: translateX(18px);
  transition: transform 0.2s ease;
  box-shadow: 0 4px 8px rgba(26, 33, 41, 0.15);
}

.toggle__button[aria-pressed="false"] {
  background: rgba(90, 100, 110, 0.25);
}

.toggle__button[aria-pressed="false"] span {
  transform: translateX(0);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(12, 15, 18, 0.4);
  display: grid;
  place-items: end center;
  padding: 20px 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 10;
}

.modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal__panel {
  width: 100%;
  max-width: 520px;
  background: #fff;
  border-radius: 22px;
  padding: 18px 16px 20px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
  max-height: 88vh;
  overflow: auto;
  position: relative;
}

.modal__close {
  position: absolute;
  right: 20px;
  top: 14px;
  border: none;
  background: #f2f0ea;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 20px;
  color: var(--muted);
}

.modal__header {
  display: grid;
  gap: 4px;
}

.modal__title {
  font-weight: 700;
  font-size: 20px;
}

.modal__subtitle {
  color: var(--muted);
  font-size: 13px;
}

.modal__stats {
  display: grid;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.modal__stats span {
  color: var(--ink);
  font-weight: 600;
}

.modal__lists {
  display: grid;
  gap: 12px;
}

.modal__lists ul {
  list-style: none;
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.modal__label {
  font-weight: 700;
  font-size: 13px;
  color: var(--accent-dark);
  margin-bottom: 6px;
}

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

.modal__chips span {
  background: #f2f0ea;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  color: var(--accent-dark);
}

.modal__org {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.modal__action {
  border: none;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  padding: 12px;
}

@media (min-width: 640px) {
  .modal {
    place-items: center;
  }

  .modal__panel {
    max-height: 80vh;
  }
}

@media (min-width: 640px) {
  .filters__row {
    grid-template-columns: repeat(2, 1fr);
  }

  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}
