:root {
  --bg-top: #f8fdff;
  --bg-bottom: #dff4ff;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-soft: rgba(244, 251, 255, 0.92);
  --panel-strong: rgba(228, 245, 255, 0.96);
  --line: rgba(105, 192, 255, 0.46);
  --line-strong: rgba(70, 170, 245, 0.92);
  --line-soft: rgba(70, 170, 245, 0.18);
  --blue: #4db6ff;
  --blue-strong: #1f9bf0;
  --blue-deep: #1074c3;
  --text: #17405a;
  --muted: #6f8ea4;
  --muted-soft: #8eabbe;
  --shadow: 0 18px 45px rgba(58, 157, 228, 0.2);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  overflow-x: hidden;
  background:
    radial-gradient(circle at 20% 12%, rgba(124, 210, 255, 0.45), transparent 26%),
    radial-gradient(circle at 85% 85%, rgba(155, 227, 255, 0.48), transparent 28%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  color: var(--text);
  font-family: "Inter", sans-serif;
}

button,
input {
  font: inherit;
}

.app {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
}

.login-shell,
.panel-shell {
  width: min(100%, 560px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(241, 250, 255, 0.94));
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(14px);
}

.login-card {
  padding: 34px 28px;
}

.login-hero {
  position: relative;
  min-height: 220px;
  margin: -8px -6px 18px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(76, 173, 240, 0.14);
  background: #f8fcff;
}

.login-hero-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
}

.login-logo {
  position: absolute;
  left: 50%;
  top: 54%;
  transform: translate(-50%, -50%);
  z-index: 3;
  display: grid;
  text-align: center;
  line-height: 0.9;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #ffffff;
  text-shadow:
    0 3px 0 rgba(145, 198, 232, 0.95),
    0 10px 24px rgba(74, 160, 222, 0.4);
}

.login-logo span:first-child {
  font-size: clamp(2.6rem, 9vw, 4.7rem);
}

.login-logo span:last-child {
  font-size: clamp(2.4rem, 8vw, 4.1rem);
}

.login-logo span {
  filter: drop-shadow(0 0 14px rgba(150, 212, 255, 0.55));
}

.snow {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(154, 210, 247, 0.55);
  box-shadow:
    0 0 0 4px rgba(203, 236, 255, 0.34),
    0 0 12px rgba(154, 210, 247, 0.28);
}

.snow-1 {
  top: 24px;
  left: 56px;
}

.snow-2 {
  top: 48px;
  right: 78px;
  width: 10px;
  height: 10px;
}

.snow-3 {
  top: 120px;
  left: 28%;
  width: 9px;
  height: 9px;
}

.snow-4 {
  top: 82px;
  right: 18%;
  width: 12px;
  height: 12px;
}

.cloud {
  position: absolute;
  bottom: -8px;
  width: 44%;
  height: 86px;
  border-radius: 50px;
  background:
    radial-gradient(circle at 24% 40%, #ffffff 0, #ffffff 18px, transparent 19px),
    radial-gradient(circle at 42% 28%, #ffffff 0, #ffffff 24px, transparent 25px),
    radial-gradient(circle at 62% 38%, #ffffff 0, #ffffff 20px, transparent 21px),
    radial-gradient(circle at 80% 44%, #ffffff 0, #ffffff 16px, transparent 17px),
    linear-gradient(180deg, #ffffff 0%, #e8f5fe 100%);
  box-shadow: 0 -8px 20px rgba(169, 218, 248, 0.26);
}

.cloud-left {
  left: -6px;
}

.cloud-right {
  right: -6px;
}

.mascot {
  position: absolute;
  bottom: 54px;
  width: 84px;
  height: 116px;
  border: 5px solid #131820;
  border-bottom: 4px solid transparent;
  border-radius: 48px 48px 22px 22px;
  background: rgba(255, 255, 255, 0.95);
  z-index: 2;
}

.mascot-left {
  left: 18px;
  transform: rotate(-3deg);
}

.mascot-right {
  right: 18px;
  transform: rotate(3deg);
}

.mascot-top {
  left: 50%;
  top: 20px;
  bottom: auto;
  width: 74px;
  height: 100px;
  transform: translateX(-50%);
}

.mascot .eye {
  position: absolute;
  top: 32px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #131820;
}

.mascot .eye-left {
  left: 22px;
}

.mascot .eye-right {
  right: 22px;
}

.mascot .smile {
  position: absolute;
  left: 50%;
  top: 54px;
  width: 40px;
  height: 18px;
  border-bottom: 5px solid #131820;
  border-radius: 0 0 28px 28px;
  transform: translateX(-50%);
}

.mascot .smirk {
  width: 34px;
  border-bottom-width: 4px;
  transform: translateX(-50%) rotate(-6deg);
}

.mascot .open-mouth {
  width: 30px;
  height: 28px;
  border: 5px solid #131820;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 18px;
  background: #131820;
}

.mascot .open-mouth::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 20px;
  height: 10px;
  border-radius: 12px 12px 8px 8px;
  background: #ffffff;
  transform: translateX(-50%);
}

.mascot .arm {
  position: absolute;
  top: 56px;
  width: 38px;
  height: 5px;
  border-radius: 999px;
  background: #131820;
  transform-origin: center;
}

.mascot .arm::after {
  content: "";
  position: absolute;
  right: -2px;
  top: -5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #131820;
}

.mascot .arm-left {
  left: -22px;
  transform: rotate(-58deg);
}

.mascot .arm-right {
  right: -22px;
  transform: rotate(58deg);
}

.mascot .arm-left.raised {
  top: 34px;
  left: -18px;
  transform: rotate(-82deg);
}

.mascot .arm-right.raised {
  top: 34px;
  right: -18px;
  transform: rotate(82deg);
}

.login-card h1 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 5vw, 2.6rem);
  line-height: 1.02;
  color: #134160;
}

.login-copy {
  margin: 0 0 26px;
  color: var(--muted);
  line-height: 1.45;
}

.install-card {
  display: grid;
  gap: 14px;
  margin: 14px 18px 0;
  padding: 16px 18px;
  border: 1px solid rgba(70, 170, 245, 0.14);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(234, 247, 255, 0.96));
}

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

.install-brand strong {
  display: block;
  color: #18496b;
  font-size: 1rem;
}

.install-brand p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.35;
}

.install-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(31, 155, 240, 0.16);
}

.install-btn {
  width: 100%;
}

.login-form h3 {
  margin: 0 0 10px;
  color: #18496b;
  font-size: 1.08rem;
}

.login-form {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(70, 170, 245, 0.14);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(237, 248, 255, 0.94));
}

.field {
  display: grid;
  gap: 9px;
}

.field span,
.group-title {
  color: #4a7593;
  font-weight: 700;
}

.field input {
  width: 100%;
  padding: 15px 16px;
  border: 1px solid rgba(76, 173, 240, 0.26);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus {
  border-color: rgba(31, 155, 240, 0.65);
  box-shadow: 0 0 0 4px rgba(77, 182, 255, 0.16);
}

.field input.input-error {
  border-color: rgba(210, 78, 109, 0.5);
  background: rgba(255, 245, 247, 0.95);
  box-shadow: 0 0 0 4px rgba(210, 78, 109, 0.1);
}

.field input::placeholder {
  color: var(--muted-soft);
}

.autocomplete {
  position: relative;
}

.suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 20;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(76, 173, 240, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 30px rgba(58, 157, 228, 0.18);
}

.suggestion-item {
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-radius: 12px;
  background: rgba(227, 244, 255, 0.72);
  color: #2f6488;
  text-align: left;
  font-weight: 600;
  cursor: pointer;
}

.suggestion-item:hover {
  background: rgba(182, 228, 255, 0.8);
}

.login-btn,
.subtab.active,
.nav-icon.active,
.pill.active,
.generate-btn {
  background: linear-gradient(180deg, #77d1ff 0%, #33aef3 100%);
  color: #ffffff;
}

.login-btn {
  border: 0;
  border-radius: 16px;
  padding: 15px 18px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(51, 174, 243, 0.22);
}

.secondary-btn {
  border: 0;
  border-radius: 16px;
  padding: 15px 18px;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(180deg, #7f76ff 0%, #5f46df 100%);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(95, 70, 223, 0.2);
}

.login-hint,
.login-error,
.login-success {
  margin: 0;
  font-size: 0.93rem;
}

.login-hint {
  color: var(--muted);
}

.login-error {
  color: #d24e6d;
  font-weight: 700;
}

.login-success {
  color: #1777b8;
  font-weight: 700;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--line-soft);
}

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

.title-wrap h1 {
  margin: 2px 0 0;
  font-size: clamp(1.12rem, 3vw, 1.45rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #2f81bd;
}

.eyebrow {
  margin: 0;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #85a8be;
}

.title-icon,
.icon {
  position: relative;
  display: inline-flex;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  color: currentColor;
}

.title-icon::before,
.title-icon::after,
.icon::before,
.icon::after {
  content: "";
  position: absolute;
}

.current-icon {
  color: var(--blue-strong);
}

.close-btn {
  min-width: 70px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(70, 170, 245, 0.26);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: #4b83aa;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

.subtabs {
  display: flex;
  gap: 10px;
  padding: 14px 18px 0;
}

.subtab {
  min-width: 0;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid rgba(70, 170, 245, 0.16);
  background: rgba(255, 255, 255, 0.68);
  color: #5f8299;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

.subtab.active {
  box-shadow: 0 8px 18px rgba(51, 174, 243, 0.2);
  border-color: transparent;
}

.panel-body {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 14px;
  padding: 14px 16px 16px;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nav-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(70, 170, 245, 0.14);
  background: rgba(255, 255, 255, 0.7);
  color: #7fa0b7;
  cursor: pointer;
  transition: 0.2s ease;
}

.nav-icon.active {
  box-shadow: 0 8px 18px rgba(51, 174, 243, 0.24);
}

.content-area {
  min-height: 430px;
}

.content-panel {
  display: none;
  gap: 12px;
  align-content: start;
}

.content-panel.active {
  display: grid;
}

.setting-card,
.hero-card,
.empty-state {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(237, 248, 255, 0.96));
  border: 1px solid rgba(70, 170, 245, 0.14);
  border-radius: 18px;
  padding: 16px;
}

.setting-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.setting-card.single,
.setting-card.form-card,
.setting-card.compact {
  display: grid;
}

.setting-text h2,
.hero-card h2,
.empty-state h2 {
  margin: 0 0 6px;
  font-size: 1.08rem;
  font-weight: 700;
  color: #18496b;
}

.setting-text p,
.hero-card p,
.empty-state p {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
}

.range-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
}

.range-row span,
.range-row strong {
  font-weight: 700;
}

.range-row strong {
  min-width: 32px;
  color: var(--blue-strong);
  text-align: right;
}

.slider-input {
  width: 100%;
  appearance: none;
  height: 6px;
  border-radius: 999px;
  background: #d5edf9;
  outline: none;
}

.slider-input::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--blue-strong);
  box-shadow: 0 0 0 4px rgba(77, 182, 255, 0.18);
  cursor: pointer;
}

.slider-input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 50%;
  background: var(--blue-strong);
  box-shadow: 0 0 0 4px rgba(77, 182, 255, 0.18);
  cursor: pointer;
}

.toggle {
  position: relative;
  display: inline-flex;
  width: 46px;
  height: 28px;
  flex: 0 0 46px;
}

.toggle input {
  position: absolute;
  opacity: 0;
  inset: 0;
}

.toggle span {
  width: 100%;
  border-radius: 999px;
  background: #d9ecf7;
  border: 1px solid rgba(70, 170, 245, 0.12);
  transition: 0.2s ease;
}

.toggle span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(23, 64, 90, 0.14);
  transition: 0.2s ease;
}

.toggle input:checked + span {
  background: rgba(77, 182, 255, 0.34);
  border-color: rgba(31, 155, 240, 0.4);
}

.toggle input:checked + span::after {
  transform: translateX(18px);
  background: var(--blue-strong);
}

.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.pill {
  padding: 11px 16px;
  border-radius: 999px;
  border: 1px solid rgba(70, 170, 245, 0.14);
  background: rgba(255, 255, 255, 0.78);
  color: #4d7490;
  font-weight: 700;
  cursor: pointer;
}

.generate-btn {
  border: 0;
  border-radius: 16px;
  padding: 14px 18px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(51, 174, 243, 0.2);
}

.generator-copy {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.4;
}

.generator-copy.error {
  color: #d24e6d;
  font-weight: 700;
}

.generator-copy.success {
  color: #1d7bc0;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.result-card {
  display: grid;
  gap: 8px;
  padding: 15px 16px;
  border-radius: 18px;
  border: 1px solid rgba(70, 170, 245, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(232, 246, 255, 0.95));
}

.result-card span {
  color: #6d92ab;
  font-weight: 700;
}

.result-card strong {
  font-size: 1.8rem;
  line-height: 1;
  color: var(--blue-deep);
}

.hidden {
  display: none !important;
}

.target::before,
.crosshair::before {
  inset: 2px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.target::after,
.crosshair::after {
  inset: 8px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.trash::before {
  inset: 5px 7px 3px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 3px 3px;
}

.trash::after {
  left: 6px;
  right: 6px;
  top: 3px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 4px 0 -1px currentColor;
}

.grid::before {
  inset: 4px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.grid::after {
  inset: 4px;
  background:
    linear-gradient(currentColor, currentColor) 50% 0 / 2px 100% no-repeat,
    linear-gradient(currentColor, currentColor) 0 50% / 100% 2px no-repeat;
}

.shield::before {
  left: 4px;
  right: 4px;
  top: 3px;
  bottom: 3px;
  border: 2px solid currentColor;
  border-radius: 10px 10px 12px 12px;
  clip-path: polygon(50% 0, 100% 16%, 92% 70%, 50% 100%, 8% 70%, 0 16%);
}

.phone::before {
  inset: 2px 5px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.phone::after {
  left: 9px;
  right: 9px;
  bottom: 4px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
}

.sun::before {
  inset: 6px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.sun::after {
  inset: 1px;
  background:
    linear-gradient(currentColor, currentColor) 50% 0 / 2px 100% no-repeat,
    linear-gradient(currentColor, currentColor) 0 50% / 100% 2px no-repeat;
  opacity: 0.8;
}

.spark::before {
  inset: 4px;
  background:
    linear-gradient(45deg, transparent 44%, currentColor 44% 56%, transparent 56%),
    linear-gradient(-45deg, transparent 44%, currentColor 44% 56%, transparent 56%);
}

@media (max-width: 560px) {
  .app {
    padding: 18px 10px;
  }

  .login-card {
    padding: 28px 20px;
  }

  .login-hero {
    min-height: 190px;
  }

  .mascot {
    width: 68px;
    height: 94px;
    bottom: 48px;
  }

  .mascot-top {
    width: 60px;
    height: 84px;
  }

  .cloud {
    width: 50%;
    height: 78px;
  }

  .subtabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .subtab {
    padding-inline: 12px;
    font-size: 0.92rem;
  }

  .panel-body {
    grid-template-columns: 46px 1fr;
    gap: 10px;
    padding: 12px;
  }

  .nav-icon {
    width: 40px;
    height: 40px;
  }

  .setting-card {
    padding: 14px;
  }

  .setting-text h2,
  .hero-card h2,
  .empty-state h2 {
    font-size: 1rem;
  }

  .results-grid {
    grid-template-columns: 1fr;
  }

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

  .range-row strong {
    text-align: left;
  }
}
