:root {
  --bg: #f7f9f8;
  --surface: #ffffff;
  --surface-soft: #edf4f1;
  --text: #18201f;
  --muted: #66736f;
  --line: #dce6e2;
  --accent: #19a88a;
  --accent-dark: #0d7c68;
  --blue: #3d7eff;
  --warning: #f2b84b;
  --danger: #d94b4b;
  --ink: #111816;
  --shadow: 0 18px 50px rgba(15, 39, 34, 0.1);
  --radius: 8px;
  --header: 76px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  min-width: 320px;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 32px;
  background: rgba(247, 249, 248, 0.92);
  border-bottom: 1px solid rgba(220, 230, 226, 0.82);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 190px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--text);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.1;
}

.brand small {
  color: var(--muted);
  margin-top: 3px;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.main-nav a,
.header-cta,
.btn,
.ghost-btn,
.icon-btn,
.chip,
.tab-btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}

.main-nav a {
  flex: 0 0 auto;
  padding: 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--text);
  background: var(--surface);
  border-color: var(--line);
}

.header-cta,
.btn {
  padding: 0 16px;
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-weight: 700;
}

.header-cta:hover,
.btn:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  transform: translateY(-1px);
}

.ghost-btn {
  padding: 0 16px;
  color: var(--text);
  background: var(--surface);
  border-color: var(--line);
  font-weight: 700;
}

.ghost-btn:hover {
  background: var(--surface-soft);
}

.app-shell {
  min-height: calc(100vh - var(--header));
}

.page {
  width: min(1180px, calc(100% - 40px));
  max-width: 100%;
  margin: 0 auto;
  padding: 34px 0 72px;
}

.full-page {
  width: min(1400px, calc(100% - 28px));
  max-width: 100%;
}

.section {
  margin-top: 54px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 20px;
}

.section-head > *,
.chat-head > *,
.product-detail > *,
.support-layout > * {
  min-width: 0;
}

.section-head h2,
.section-title {
  margin: 0;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.08;
  letter-spacing: 0;
}

.section-head p,
.lead {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.65;
  max-width: 760px;
  overflow-wrap: anywhere;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: 34px;
  align-items: center;
  padding: 72px 0 44px;
}

.home-page {
  position: relative;
}

.home-page::before {
  content: "";
  position: absolute;
  inset: 18px auto auto 50%;
  width: min(620px, 46vw);
  height: 420px;
  background:
    radial-gradient(circle at 30% 35%, rgba(61, 126, 255, 0.12), transparent 42%),
    radial-gradient(circle at 70% 55%, rgba(242, 184, 75, 0.16), transparent 38%);
  transform: translateX(-6%);
  pointer-events: none;
  filter: blur(8px);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent-dark);
  background: #fff;
  font-size: 14px;
  font-weight: 700;
}

.hero h1 {
  margin: 0;
  font-size: clamp(40px, 5.2vw, 68px);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
  max-width: 650px;
  overflow-wrap: anywhere;
}

.hero-actions,
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-media {
  position: relative;
  min-height: 620px;
  display: grid;
  align-items: center;
  isolation: isolate;
}

.hero-image {
  width: 100%;
  height: 520px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.75);
  animation: softReveal 0.7s ease both;
}

.air-chip {
  position: absolute;
  z-index: 2;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  box-shadow: 0 12px 34px rgba(15, 39, 34, 0.12);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  animation: floatChip 4.8s ease-in-out infinite;
}

.air-chip-one {
  top: 54px;
  left: 36px;
}

.air-chip-two {
  top: 112px;
  right: 22px;
  animation-delay: 0.45s;
}

.air-chip-three {
  right: 74px;
  bottom: 112px;
  animation-delay: 0.9s;
}

.hero-chat-preview {
  position: absolute;
  left: 24px;
  bottom: 28px;
  width: min(420px, calc(100% - 48px));
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(19, 50, 45, 0.16);
  padding: 14px;
}

.mini-message {
  padding: 12px;
  border-radius: 8px;
  background: var(--surface-soft);
  margin-top: 10px;
  color: var(--text);
  line-height: 1.45;
}

.mini-message.user {
  background: var(--accent);
  color: white;
  margin-left: 40px;
}

.stats-grid,
.cards-grid,
.product-grid,
.knowledge-grid,
.admin-grid {
  display: grid;
  gap: 16px;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.product-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.card,
.product-card,
.article-card,
.admin-card,
.panel,
.chat-shell,
.detail-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 34px rgba(15, 39, 34, 0.05);
}

.card,
.article-card,
.admin-card,
.panel,
.detail-box {
  padding: 20px;
}

.card h3,
.article-card h3,
.admin-card h3,
.panel h3,
.detail-box h3 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.2;
}

.card p,
.article-card p,
.admin-card p,
.panel p,
.detail-box p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.stat {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.stat strong {
  display: block;
  font-size: 30px;
  line-height: 1;
  margin-bottom: 8px;
}

.stat span {
  color: var(--muted);
  font-size: 14px;
}

.product-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(25, 168, 138, 0.35);
  box-shadow: 0 18px 46px rgba(15, 39, 34, 0.11);
}

.product-image {
  height: 245px;
  background: var(--surface-soft);
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 0.35s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.07);
}

.product-image.ap img {
  object-position: 18% 58%;
}

.product-image.ah img {
  object-position: 39% 58%;
}

.product-image.br img {
  object-position: 60% 54%;
}

.product-image.as img {
  object-position: 78% 58%;
}

.product-image.fp img {
  object-position: 93% 62%;
}

.product-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.product-meta,
.tags,
.filter-row,
.status-row,
.field-grid,
.ticket-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.tag,
.chip {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
}

.tag.accent {
  color: var(--accent-dark);
  background: rgba(25, 168, 138, 0.12);
  border-color: rgba(25, 168, 138, 0.28);
}

.product-body h3 {
  margin: 0;
  font-size: 22px;
}

.price {
  font-size: 22px;
  font-weight: 800;
}

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

.filter-row {
  margin-bottom: 22px;
}

.chip {
  background: #fff;
  cursor: pointer;
}

.chip.active,
.tab-btn.active {
  background: var(--text);
  border-color: var(--text);
  color: #fff;
}

.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(370px, 0.72fr);
  gap: 24px;
  align-items: start;
}

.detail-hero-image {
  height: 430px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}

.detail-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.spec-list,
.steps-list,
.clean-list {
  padding: 0;
  margin: 14px 0 0;
  list-style: none;
}

.spec-list li,
.steps-list li,
.clean-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.45;
}

.spec-list strong {
  color: var(--text);
  min-width: 136px;
}

.steps-list li::before,
.clean-list li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex: 0 0 auto;
  margin-top: 7px;
}

.support-layout {
  display: grid;
  grid-template-columns: minmax(310px, 0.42fr) minmax(0, 0.58fr);
  gap: 18px;
  align-items: start;
}

.support-sidebar {
  display: grid;
  gap: 16px;
}

.chat-shell {
  min-height: 680px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.chat-shell.full {
  min-height: calc(100vh - var(--header) - 72px);
}

.chat-head {
  padding: 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.agent-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(25, 168, 138, 0.13);
  color: var(--accent-dark);
  font-weight: 900;
}

.chat-status {
  display: none;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  background: #fbfcfc;
}

.chat-status.show {
  display: block;
}

.chat-messages {
  padding: 18px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background:
    linear-gradient(rgba(247, 249, 248, 0.7), rgba(247, 249, 248, 0.7)),
    radial-gradient(circle at 10% 0%, rgba(25, 168, 138, 0.12), transparent 28%);
}

.message {
  width: fit-content;
  max-width: min(78%, 680px);
  padding: 13px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  line-height: 1.5;
  white-space: pre-line;
}

.message.user {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.message.tool {
  align-self: center;
  max-width: min(92%, 760px);
  background: #eef5ff;
  border-color: rgba(61, 126, 255, 0.18);
  color: #23467e;
  font-size: 14px;
}

.message.ticket {
  align-self: stretch;
  max-width: 100%;
  background: #fff8e8;
  border-color: rgba(242, 184, 75, 0.38);
}

.chat-form {
  border-top: 1px solid var(--line);
  padding: 14px;
  background: var(--surface);
}

.chat-form-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--text);
}

.chat-input,
.input,
.textarea,
.select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 8px;
  padding: 12px 13px;
  outline: none;
}

.chat-input {
  min-height: 44px;
  max-height: 128px;
  resize: vertical;
}

.input:focus,
.textarea:focus,
.select:focus,
.chat-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(25, 168, 138, 0.14);
}

.search-box {
  display: grid;
  gap: 10px;
}

.form-grid {
  display: grid;
  gap: 10px;
}

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

.article-card {
  display: grid;
  gap: 12px;
}

.article-card footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.admin-login {
  max-width: 440px;
  margin: 70px auto;
}

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

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.tab-btn {
  padding: 0 14px;
  background: #fff;
  border-color: var(--line);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  text-align: left;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 13px;
  background: #fbfcfc;
  font-weight: 700;
}

tr:last-child td {
  border-bottom: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.badge.new,
.badge.diagnosis {
  background: rgba(61, 126, 255, 0.12);
  color: #265bc2;
}

.badge.waiting_service,
.badge.waiting_client {
  background: rgba(242, 184, 75, 0.17);
  color: #8a630c;
}

.badge.resolved,
.badge.closed {
  background: rgba(25, 168, 138, 0.14);
  color: var(--accent-dark);
}

.badge.high {
  background: rgba(217, 75, 75, 0.12);
  color: #b52e2e;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  max-width: 360px;
  padding: 13px 14px;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.lifestyle-band,
.support-hero,
.service-form-band {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.7fr);
  gap: 26px;
  align-items: center;
  padding: 34px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(237, 244, 241, 0.96)),
    radial-gradient(circle at 85% 10%, rgba(61, 126, 255, 0.13), transparent 32%);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(15, 39, 34, 0.08);
}

.lifestyle-band h2,
.support-hero h3,
.service-form-band h2 {
  margin: 10px 0 12px;
  font-size: clamp(28px, 3.4vw, 48px);
  line-height: 1.08;
}

.lifestyle-band p,
.support-hero p,
.service-form-band p {
  color: var(--muted);
  line-height: 1.65;
}

.process-list {
  display: grid;
  gap: 12px;
}

.process-list div {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
}

.process-list strong {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: var(--accent-dark);
  background: rgba(25, 168, 138, 0.12);
}

.support-device {
  height: 330px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}

.support-device img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.public-question {
  box-shadow: none;
}

.support-widget {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
}

.widget-launcher {
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px 0 10px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--text);
  box-shadow: 0 18px 45px rgba(15, 39, 34, 0.22);
}

.widget-launcher span {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  color: var(--text);
  background: var(--warning);
  font-weight: 900;
}

.widget-panel {
  position: absolute;
  right: 0;
  bottom: 74px;
  width: min(430px, calc(100vw - 24px));
  height: min(690px, calc(100vh - 112px));
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  pointer-events: none;
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
}

.support-widget.open .widget-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.support-widget.open .widget-launcher {
  display: none;
}

.widget-chat {
  height: 100%;
  min-height: 0;
  box-shadow: 0 24px 70px rgba(15, 39, 34, 0.22);
}

.widget-chat .chat-head {
  background: var(--text);
  color: #fff;
}

.widget-chat .chat-head .muted {
  color: rgba(255, 255, 255, 0.72);
}

.widget-chat .agent-avatar {
  background: var(--warning);
  color: var(--text);
}

@keyframes floatChip {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-9px);
  }
}

@keyframes softReveal {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hidden {
  display: none !important;
}

@media (max-width: 980px) {
  .site-header {
    height: auto;
    min-height: var(--header);
    padding: 14px 18px;
    flex-wrap: wrap;
  }

  .brand {
    min-width: 0;
  }

  .main-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
  }

  .header-cta {
    min-height: 38px;
    padding: 0 12px;
  }

  .hero,
  .product-detail,
  .support-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 22px;
  }

  .hero-media {
    min-height: auto;
  }

  .hero-image {
    height: 420px;
  }

  .stats-grid,
  .cards-grid,
  .product-grid,
  .knowledge-grid,
  .admin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .page,
  .full-page {
    width: 100%;
    max-width: 430px;
    padding-left: 12px;
    padding-right: 12px;
    padding-top: 22px;
  }

  .hero h1 {
    font-size: 35px;
    line-height: 1.08;
    max-width: 330px;
    overflow-wrap: anywhere;
  }

  .header-cta {
    display: none;
  }

  .main-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow-x: visible;
  }

  .main-nav a {
    width: 100%;
    min-height: 36px;
    padding: 0 4px;
    font-size: 12px;
  }

  .chat-head .badge {
    display: none;
  }

  .hero p {
    font-size: 16px;
    max-width: 320px;
  }

  .hero-actions,
  .inline-actions,
  .section-head,
  .admin-top {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-image {
    height: 330px;
  }

  .air-chip {
    display: none;
  }

  .hero-chat-preview {
    position: static;
    width: 100%;
    margin-top: 12px;
  }

  .lifestyle-band,
  .support-hero,
  .service-form-band {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .support-device {
    height: 260px;
  }

  .support-widget {
    right: 12px;
    bottom: 12px;
  }

  .widget-panel {
    right: -2px;
    bottom: 0;
    width: calc(100vw - 24px);
    height: calc(100vh - 24px);
  }

  .widget-launcher {
    width: 58px;
    height: 58px;
    padding: 0;
    justify-content: center;
  }

  .widget-launcher strong {
    display: none;
  }

  .stats-grid,
  .cards-grid,
  .product-grid,
  .knowledge-grid,
  .field-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .message {
    max-width: 92%;
  }

  .chat-form-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .chat-form-row .btn {
    grid-column: 1 / -1;
  }
}
