:root {
  color-scheme: light;
  --bg: #f3f6f9;
  --text: #14243d;
  --muted: #748197;
  --line: #dfe7ef;
  --surface: #ffffff;
  --soft: #f6f9fc;
  --accent: #0ea5a4;
  --accent-dark: #087f86;
  --blue: #2e6cf6;
  --ink: #10182c;
  --shadow: 0 20px 55px rgba(24, 44, 76, 0.11);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 12% 0%, rgba(14, 165, 164, 0.18), transparent 30rem),
    linear-gradient(180deg, #fbfdff, var(--bg));
  color: var(--text);
}

button,
input {
  font: inherit;
  letter-spacing: 0;
}

.page {
  width: min(860px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 22px 12px 34px;
}

.panel {
  min-height: calc(100vh - 44px);
  padding: 28px;
  border: 1px solid rgba(223, 231, 239, 0.9);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

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

.eyebrow {
  margin: 0 0 7px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: var(--ink);
  font-size: 34px;
  line-height: 1.08;
  font-weight: 950;
}

.mode-pill {
  padding: 8px 11px;
  border: 1px solid rgba(14, 165, 164, 0.22);
  border-radius: 999px;
  background: rgba(14, 165, 164, 0.09);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.search-grid {
  display: grid;
  grid-template-columns: 1fr 132px;
  gap: 12px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f8fbff;
}

.search-wrap {
  position: relative;
}

#cityInput {
  width: 100%;
  min-height: 58px;
  border: 0;
  border-radius: 12px;
  outline: 0;
  background: var(--surface);
  color: var(--text);
  box-shadow: inset 0 0 0 1px #dbe5ef;
  padding: 0 16px;
  font-size: 18px;
}

#cityInput:focus {
  box-shadow: inset 0 0 0 2px rgba(14, 165, 164, 0.55), 0 0 0 4px rgba(14, 165, 164, 0.10);
}

.search-button,
.send-button {
  min-height: 58px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 24px rgba(14, 165, 164, 0.24);
  font-size: 15px;
  font-weight: 950;
  cursor: pointer;
}

.search-button:active,
.send-button:active {
  transform: translateY(1px);
}

.suggestions {
  position: absolute;
  z-index: 5;
  display: none;
  width: 100%;
  max-height: 286px;
  overflow: auto;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(28, 47, 86, 0.16);
}

.suggestions.visible {
  display: block;
}

.suggestion-row {
  display: grid;
  gap: 4px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid #edf2f8;
  background: #fff;
  padding: 13px 16px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.suggestion-row:hover {
  background: #f4fbfb;
}

.suggestion-title {
  font-size: 16px;
  font-weight: 850;
}

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

.summary-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 14px;
  margin-top: 18px;
}

.metric-card,
.sample-card {
  min-height: 104px;
  border-radius: 18px;
  padding: 22px;
  overflow: hidden;
}

.metric-card {
  background:
    linear-gradient(135deg, rgba(46, 108, 246, 0.96), rgba(14, 165, 164, 0.92));
  color: #fff;
}

.sample-card {
  background: var(--ink);
  color: #fff;
}

.metric-card span,
.sample-card span {
  display: block;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.metric-card strong {
  font-size: 36px;
  line-height: 1;
  font-weight: 950;
}

.sample-card strong {
  font-size: 18px;
}

.operators-card {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  background: var(--surface);
}

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

h2 {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
}

.preview-note {
  font-size: 14px;
  font-weight: 900;
  color: var(--muted);
}

.operators-list {
  display: grid;
  gap: 10px;
  max-height: 286px;
  overflow: auto;
  padding-right: 8px;
}

.operator-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 11px 14px;
  border-left: 4px solid rgba(14, 165, 164, 0.35);
  border-radius: 12px;
  background: var(--soft);
}

.operator-name {
  min-width: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.operator-count {
  min-width: 72px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #fff;
  color: #101828;
  box-shadow: inset 0 0 0 1px #dbe4ef;
  font-size: 12px;
  font-weight: 950;
  text-align: center;
}

.send-button {
  width: 100%;
  min-height: 56px;
  margin-top: 18px;
  background: var(--blue);
  font-size: 15px;
}

.send-button:disabled {
  background: #b8c4d8;
  box-shadow: none;
  cursor: default;
}

.empty {
  padding: 24px 12px;
  color: var(--muted);
  text-align: center;
  font-size: 15px;
}

@media (max-width: 700px) {
  .page {
    padding: 10px;
  }

  .panel {
    min-height: calc(100vh - 20px);
    padding: 18px;
    border-radius: 18px;
  }

  h1 {
    font-size: 28px;
  }

  .search-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .search-button {
    min-height: 52px;
  }

  .operator-row {
    grid-template-columns: 1fr;
  }

  .operator-count {
    width: max-content;
  }
}
