:root {
  --tk-ice: #fdfeff;
  --tk-cyan: #00cfe8;
  --tk-indigo: #3f51b5;
  --tk-charcoal: #1e2238;
  --tk-ink: #22283f;
  --tk-muted: #667085;
  --tk-line: #d9e8f2;
  --tk-soft: #f1fbff;
  --tk-green: #0f8f68;
  --tk-amber: #9a6a00;
  --tk-shadow: 0 16px 42px rgba(30, 34, 56, 0.12);
}

* {
  box-sizing: border-box;
}

.tk-body {
  margin: 0;
  min-height: 100vh;
  background: var(--tk-ice);
  color: var(--tk-ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.tk-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.tk-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
}

.tk-brand {
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: var(--tk-charcoal);
  text-decoration: none;
}

.tk-brand strong {
  font-size: 19px;
}

.tk-brand span {
  color: var(--tk-muted);
  font-size: 13px;
}

.tk-nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tk-nav-links a,
.tk-chip,
.tk-tab {
  border: 1px solid var(--tk-line);
  border-radius: 8px;
  color: var(--tk-charcoal);
  background: #fff;
  padding: 9px 12px;
  text-decoration: none;
  font-size: 14px;
  line-height: 1;
}

.tk-nav-links a:hover,
.tk-chip:hover,
.tk-tab:hover {
  border-color: var(--tk-cyan);
}

.tk-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 28px;
  align-items: center;
  padding: 32px 0 28px;
}

.tk-kicker {
  color: var(--tk-indigo);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
  margin: 0 0 12px;
}

.tk-hero h1,
.tk-page-title {
  color: var(--tk-charcoal);
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: 0;
  margin: 0 0 18px;
}

.tk-hero p,
.tk-lead {
  color: #43506a;
  font-size: 18px;
  line-height: 1.65;
  margin: 0 0 20px;
}

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

.tk-button {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--tk-indigo);
  color: #fff;
  min-height: 42px;
  padding: 11px 15px;
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.tk-button.primary {
  background: var(--tk-cyan);
  color: var(--tk-charcoal);
}

.tk-button.secondary {
  background: #fff;
  color: var(--tk-charcoal);
  border-color: var(--tk-line);
}

.tk-button.danger {
  background: #fff4f2;
  color: #9e2d22;
  border-color: #ffd5cc;
}

.tk-button:disabled {
  opacity: 0.6;
  cursor: progress;
}

.tk-panel,
.tk-card {
  background: #fff;
  border: 1px solid var(--tk-line);
  border-radius: 8px;
  box-shadow: var(--tk-shadow);
}

.tk-panel {
  padding: 22px;
}

.tk-card {
  padding: 18px;
}

.tk-section {
  padding: 26px 0;
}

.tk-section h2 {
  color: var(--tk-charcoal);
  margin: 0 0 14px;
  font-size: 28px;
  letter-spacing: 0;
}

.tk-section-title {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 16px;
}

.tk-grid {
  display: grid;
  gap: 16px;
}

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

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

.tk-card h3,
.tk-panel h2,
.tk-panel h3 {
  margin: 0 0 8px;
  color: var(--tk-charcoal);
  letter-spacing: 0;
}

.tk-card p,
.tk-panel p,
.tk-faq p {
  color: var(--tk-muted);
  line-height: 1.55;
}

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

.tk-metric {
  background: var(--tk-soft);
  border: 1px solid var(--tk-line);
  border-radius: 8px;
  padding: 14px;
}

.tk-metric strong {
  display: block;
  color: var(--tk-charcoal);
  font-size: 26px;
}

.tk-metric span {
  color: var(--tk-muted);
  font-size: 13px;
}

.tk-form {
  display: grid;
  gap: 12px;
}

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

.tk-field {
  display: grid;
  gap: 6px;
}

.tk-field label,
.tk-check {
  color: var(--tk-charcoal);
  font-weight: 700;
  font-size: 14px;
}

.tk-field input,
.tk-field select,
.tk-field textarea {
  width: 100%;
  border: 1px solid var(--tk-line);
  border-radius: 8px;
  padding: 11px 12px;
  min-height: 42px;
  font: inherit;
  color: var(--tk-charcoal);
  background: #fff;
}

.tk-field textarea {
  min-height: 106px;
  resize: vertical;
}

.tk-check {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  line-height: 1.4;
}

.tk-check input {
  margin-top: 2px;
}

.tk-status {
  min-height: 20px;
  color: var(--tk-green);
  font-weight: 700;
}

.tk-status.error {
  color: #a33125;
}

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

.tk-list-item {
  border: 1px solid var(--tk-line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.tk-list-item header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.tk-list-item h3,
.tk-list-item h4 {
  margin: 0 0 5px;
  color: var(--tk-charcoal);
}

.tk-badge {
  border-radius: 999px;
  border: 1px solid var(--tk-line);
  background: var(--tk-soft);
  color: var(--tk-indigo);
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.tk-filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.tk-filter-row .tk-chip.active {
  background: var(--tk-cyan);
  color: var(--tk-charcoal);
  border-color: var(--tk-cyan);
}

.tk-chat {
  display: grid;
  gap: 12px;
}

.tk-chat-log {
  min-height: 240px;
  max-height: 390px;
  overflow: auto;
  padding: 12px;
  background: #f8fcff;
  border: 1px solid var(--tk-line);
  border-radius: 8px;
}

.tk-msg {
  max-width: 88%;
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 8px;
  line-height: 1.45;
  background: #fff;
  border: 1px solid var(--tk-line);
}

.tk-msg.user {
  margin-left: auto;
  background: var(--tk-charcoal);
  color: #fff;
  border-color: var(--tk-charcoal);
}

.tk-msg.bot {
  margin-right: auto;
}

.tk-robot {
  min-height: 320px;
  display: grid;
  place-items: center;
  background: #f5fbff;
  border: 1px solid var(--tk-line);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}

.tk-robot-figure {
  width: 178px;
  height: 230px;
  position: relative;
}

.tk-robot-head,
.tk-robot-body {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 3px solid var(--tk-cyan);
  box-shadow: 0 18px 34px rgba(63, 81, 181, 0.16);
}

.tk-robot-head {
  top: 18px;
  width: 134px;
  height: 98px;
  border-radius: 24px;
}

.tk-robot-head::before,
.tk-robot-head::after {
  content: "";
  position: absolute;
  top: 38px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--tk-indigo);
}

.tk-robot-head::before {
  left: 34px;
}

.tk-robot-head::after {
  right: 34px;
}

.tk-robot-mouth {
  position: absolute;
  left: 50%;
  bottom: 22px;
  width: 42px;
  height: 7px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: var(--tk-cyan);
}

.tk-robot-body {
  bottom: 16px;
  width: 150px;
  height: 96px;
  border-radius: 26px 26px 18px 18px;
}

.tk-robot-body::before {
  content: "TIYA";
  position: absolute;
  left: 50%;
  top: 27px;
  transform: translateX(-50%);
  color: var(--tk-indigo);
  font-weight: 850;
  letter-spacing: 0;
}

.tk-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--tk-line);
  border-radius: 8px;
  overflow: hidden;
}

.tk-table th,
.tk-table td {
  padding: 12px;
  border-bottom: 1px solid var(--tk-line);
  text-align: left;
  vertical-align: top;
}

.tk-table th {
  color: var(--tk-charcoal);
  background: var(--tk-soft);
}

.tk-footer {
  padding: 30px 0 42px;
  color: var(--tk-muted);
}

.tiya-widget-root {
  position: fixed;
  left: 22px;
  bottom: 22px;
  z-index: 9998;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.tiya-widget-toggle {
  min-width: 132px;
  min-height: 52px;
  border: 0;
  border-radius: 999px;
  background: var(--tk-charcoal);
  color: #fff;
  box-shadow: var(--tk-shadow);
  cursor: pointer;
  font-weight: 800;
}

.tiya-widget-panel {
  display: none;
  width: min(360px, calc(100vw - 36px));
  margin-bottom: 12px;
  background: #fff;
  border: 1px solid var(--tk-line);
  border-radius: 8px;
  box-shadow: var(--tk-shadow);
  overflow: hidden;
}

.tiya-widget-root.open .tiya-widget-panel {
  display: block;
}

.tiya-widget-head {
  padding: 12px;
  background: var(--tk-charcoal);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tiya-widget-body {
  padding: 12px;
}

.tiya-widget-log {
  min-height: 172px;
  max-height: 230px;
  overflow: auto;
  border: 1px solid var(--tk-line);
  border-radius: 8px;
  padding: 10px;
  background: #f8fcff;
}

.tiya-widget-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 10px;
}

.tiya-widget-form input {
  min-width: 0;
  border: 1px solid var(--tk-line);
  border-radius: 8px;
  padding: 10px;
  font: inherit;
}

.tiya-widget-form button,
.tiya-widget-escalate {
  border: 0;
  border-radius: 8px;
  background: var(--tk-cyan);
  color: var(--tk-charcoal);
  padding: 10px 12px;
  font-weight: 800;
  cursor: pointer;
}

.tiya-widget-escalate {
  width: 100%;
  margin-top: 9px;
  background: #fff;
  border: 1px solid var(--tk-line);
}

@media (max-width: 900px) {
  .tk-hero,
  .tk-grid.two,
  .tk-grid.three,
  .tk-metrics,
  .tk-form-grid {
    grid-template-columns: 1fr;
  }

  .tk-nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .tk-nav-links {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .tk-shell {
    width: min(100% - 22px, 1180px);
  }

  .tk-hero h1,
  .tk-page-title {
    font-size: 34px;
  }

  .tiya-widget-root {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }

  .tiya-widget-toggle {
    width: 100%;
  }
}
