:root {
  --page-bg: #f4f8fb;
  --surface: #ffffff;
  --surface-soft: #f7fbfc;
  --surface-tint: #e7fbfa;
  --grid-line: rgba(20, 92, 111, 0.06);
  --teal: #0b9a9f;
  --teal-dark: #006f76;
  --teal-soft: #dff7f6;
  --teal-pale: #f0fcfb;
  --ink: #28364a;
  --ink-strong: #17263a;
  --muted: #6d7b91;
  --border: #dce7ee;
  --border-strong: #c8d9e2;
  --shadow-soft: 0 22px 60px rgba(29, 54, 76, 0.11);
  --shadow-card: 0 14px 34px rgba(29, 54, 76, 0.08);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --chat-width: 390px;
  --transition-fast: 0.22s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100%;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
}

body {
  background:
    radial-gradient(circle at 8% 8%, rgba(11, 154, 159, 0.12), transparent 24%),
    radial-gradient(circle at 88% 18%, rgba(52, 126, 161, 0.08), transparent 26%),
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    linear-gradient(180deg, #fbfdfd 0%, var(--page-bg) 48%, #eef6f8 100%);
  background-size: auto, auto, 42px 42px, 42px 42px, auto;
}

button,
input {
  font: inherit;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  min-height: 82px;
  padding: 16px clamp(18px, 3vw, 34px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(220, 231, 238, 0.86);
  box-shadow: 0 10px 30px rgba(38, 54, 75, 0.06);
  backdrop-filter: blur(14px);
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-icon {
  width: 160px;
  min-width: 160px;
  height: auto;
  display: flex;
  align-items: center;
}

.brand-icon img {
  width: 100%;
  max-height: 52px;
  object-fit: contain;
}

.brand-kicker {
  color: var(--teal-dark);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.brand-title {
  color: var(--ink-strong);
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.support-pill,
.portal-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.83rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.support-pill {
  padding: 0 16px;
  color: var(--teal-dark);
  background: var(--teal-soft);
  border: 1px solid #abe5e1;
}

.portal-link {
  padding: 0 18px;
  color: var(--ink-strong);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 8px 20px rgba(38, 54, 75, 0.06);
  transition: color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.portal-link:hover {
  color: var(--teal-dark);
  border-color: #9bdedb;
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(11, 154, 159, 0.14);
}

.layout-container {
  width: min(1220px, calc(100% - 40px));
  margin: 0 auto;
  flex: 1;
  padding: 38px 0 28px;
}

.hero-panel {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: clamp(24px, 4vw, 48px);
  margin-bottom: 28px;
  padding: clamp(30px, 4.5vw, 54px);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(247, 252, 252, 0.92)),
    var(--surface);
  border: 1px solid rgba(200, 217, 226, 0.9);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 8px;
  background: linear-gradient(180deg, var(--teal), #5fd0c9);
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: -42% -14% auto auto;
  width: 410px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(11, 154, 159, 0.15), transparent 68%);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--teal-dark);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 6px rgba(11, 154, 159, 0.12);
}

.hero-title {
  color: var(--ink-strong);
  font-size: clamp(2.35rem, 5.4vw, 4.9rem);
  font-weight: 850;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.hero-subtitle {
  max-width: 680px;
  margin-top: 18px;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  line-height: 1.65;
}

.hero-actions {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-actions span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--ink-strong);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--border);
  box-shadow: 0 8px 18px rgba(29, 54, 76, 0.06);
  font-size: 0.82rem;
  font-weight: 800;
}

.dashboard-card {
  position: relative;
  z-index: 1;
  width: min(360px, 100%);
  align-self: center;
  padding: 18px;
  display: grid;
  gap: 14px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--border);
  box-shadow: 0 20px 45px rgba(29, 54, 76, 0.12);
}

.dashboard-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-card-header strong {
  position: relative;
  padding-left: 14px;
  color: var(--teal-dark);
  font-size: 0.78rem;
}

.dashboard-card-header strong::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #25b47e;
  transform: translateY(-50%);
  box-shadow: 0 0 0 5px rgba(37, 180, 126, 0.12);
}

.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-metrics div {
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff, var(--teal-pale));
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 12px 22px rgba(29, 54, 76, 0.07);
}

.dashboard-metrics strong,
.dashboard-metrics span {
  display: block;
}

.dashboard-metrics strong {
  color: var(--ink-strong);
  font-size: 1.35rem;
  letter-spacing: -0.04em;
}

.dashboard-metrics span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.brand-card {
  position: relative;
  z-index: 1;
  padding: 18px;
  display: grid;
  gap: 12px;
  justify-items: center;
  border-radius: 22px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal-dark), var(--teal));
  box-shadow: 0 16px 30px rgba(11, 154, 159, 0.2);
}

.brand-card img {
  width: 170px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.18));
}

.brand-card span {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.9;
}

.services-section {
  padding: 0 0 34px;
}

.section-heading {
  margin: 0 0 18px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.section-description {
    margin: 0;
    padding-left: 12px;
    color: #64748b;
    font-size: 15px;
}

.heading-left {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.heading-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-marker {
  width: 6px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--teal), var(--teal-dark));
}

.section-label {
  color: var(--ink-strong);
  font-size: 1.55rem;
  font-weight: 850;
}

.section-heading p {
  color: var(--muted);
  font-size: 0.94rem;
}

.section-description {
    margin-top: 10px;
    color: #64748b;
    font-size: 15px;
    line-height: 1.5;
}

.tiles-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.tile {
  min-height: 292px;
  position: relative;
  padding: 26px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  text-decoration: none;
  background: var(--surface);
  border: 1px solid rgba(220, 231, 238, 0.95);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  isolation: isolate;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.tile:hover,
.tile:focus-visible {
  transform: translateY(-8px);
  border-color: #9ededa;
  background: linear-gradient(180deg, #ffffff 0%, #fbfefe 100%);
  box-shadow: 0 26px 54px rgba(11, 154, 159, 0.16);
  outline: none;
}

.tile-accent {
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: linear-gradient(90deg, var(--teal), #6edbd5);
}

.tile::after {
  content: "";
  position: absolute;
  right: -48px;
  top: -48px;
  width: 136px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--teal-pale);
  opacity: 0.84;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.tile:hover::after,
.tile:focus-visible::after {
  transform: scale(1.18);
  opacity: 0.9;
}

.tile-icon {
  width: 78px;
  height: 78px;
  margin-bottom: 24px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: linear-gradient(135deg, #ffffff, var(--teal-pale));
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 12px 22px rgba(29, 54, 76, 0.07);
  position: relative;
  z-index: 1;
}

.tile-icon img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.tile-content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
}

.tile-meta {
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--teal-dark);
  background: var(--teal-soft);
  border: 1px solid #b9e9e6;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tile-title {
  color: var(--ink-strong);
  font-size: 1.16rem;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.tile-description {
  color: var(--muted);
  font-size: 0.91rem;
  line-height: 1.55;
}

.tile-cta {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding-top: 22px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--teal-dark);
  font-size: 0.88rem;
  font-weight: 850;
  transition: gap var(--transition-fast), color var(--transition-fast);
}

.tile:hover .tile-cta,
.tile:focus-visible .tile-cta {
  gap: 12px;
}

.ai-assistant {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.ai-speech {
  width: min(320px, calc(100vw - 168px));
  min-height: 74px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: left;
  position: relative;
  color: var(--ink-strong);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--border);
  border-top: 4px solid var(--teal);
  border-radius: 20px;
  box-shadow: 0 18px 36px rgba(35, 61, 82, 0.16);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.45;
  animation: floatBubble 4s ease-in-out infinite;
}

.ai-speech::after {
  content: "";
  position: absolute;
  right: -9px;
  bottom: 22px;
  width: 16px;
  height: 16px;
  background: inherit;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transform: rotate(-45deg);
}

.ai-robot {
  width: 94px;
  height: 94px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.ai-robot img {
  width: 112px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 16px rgba(11, 154, 159, 0.16));
  transition: transform var(--transition-fast);
}

.ai-assistant:hover .ai-speech,
.ai-assistant:focus-visible .ai-speech {
  box-shadow: 0 22px 42px rgba(11, 154, 159, 0.2);
}

.ai-assistant:hover .ai-robot img,
.ai-assistant:focus-visible .ai-robot img {
  transform: translateY(-5px) scale(1.03);
}

.ai-assistant:focus-visible {
  outline: 3px solid rgba(11, 154, 159, 0.3);
  outline-offset: 6px;
  border-radius: 24px;
}

@keyframes floatBubble {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.ai-speech-text::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 1.1em;
  margin-left: 3px;
  background: var(--teal);
  vertical-align: -2px;
  animation: caretBlink 0.8s steps(1) infinite;
}

.ai-speech-text.typing-done::after {
  opacity: 0;
  animation: none;
}

@keyframes caretBlink {
  50% { opacity: 0; }
}

.footer {
  margin-top: auto;
  padding: 16px 24px 22px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}

.chat-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: var(--chat-width);
  max-width: 100%;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(18px);
  border-left: 1px solid var(--border);
  box-shadow: -18px 0 45px rgba(35, 61, 82, 0.18);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  z-index: 200;
}

.chat-panel.open {
  transform: translateX(0);
}

.chat-open .ai-assistant {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}

.chat-header {
  padding: 18px 18px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  background: linear-gradient(180deg, #ffffff, #f6fbfb);
}

.chat-header-title {
  color: var(--ink-strong);
  font-size: 1rem;
  font-weight: 850;
}

.chat-header-subtitle {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.chat-close {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink-strong);
  font-size: 1.25rem;
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}

.chat-close:hover {
  color: var(--teal-dark);
  border-color: #a5dfdd;
  background: var(--teal-soft);
}

.chat-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  font-size: 0.88rem;
  background:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    #fbfdfd;
  background-size: 36px 36px;
}

.chat-message {
  margin-bottom: 11px;
  max-width: 92%;
}

.chat-message.user {
  margin-left: auto;
  text-align: right;
}

.chat-bubble {
  display: inline-block;
  padding: 10px 12px;
  border-radius: 16px;
  line-height: 1.42;
}

.chat-message.user .chat-bubble {
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  color: #ffffff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 10px 20px rgba(11, 154, 159, 0.18);
}

.chat-message.bot .chat-bubble {
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
  box-shadow: 0 8px 18px rgba(35, 61, 82, 0.07);
}

.chat-input-area {
  padding: 13px;
  border-top: 1px solid var(--border);
  background: #ffffff;
}

.chat-input-area form {
  display: flex;
  width: 100%;
  gap: 8px;
}

.chat-input-area input[type="text"] {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--ink-strong);
  font-size: 0.85rem;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.chat-input-area input[type="text"]:focus {
  background: #ffffff;
  border-color: #96ddd9;
  box-shadow: 0 0 0 4px rgba(11, 154, 159, 0.12);
}

.chat-input-area input::placeholder {
  color: #8a97aa;
}

.chat-input-area button {
  padding: 9px 15px;
  border-radius: 999px;
  border: none;
  background: var(--teal);
  color: #ffffff;
  font-weight: 850;
  font-size: 0.82rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.chat-input-area button:hover {
  background: var(--teal-dark);
  transform: translateY(-1px);
}

.beta-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 8px;
  color: var(--teal-dark);
  background: var(--teal-soft);
  border: 1px solid #a9e5e2;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  vertical-align: middle;
}

@media (max-width: 1100px) {
  .tiles-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tile {
    min-height: 245px;
  }
}

@media (max-width: 820px) {
  .app-header,
  .section-heading,
  .hero-panel {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .layout-container {
    width: min(100% - 28px, 1180px);
    padding-top: 24px;
  }

  .hero-panel {
    padding: 28px;
  }

  .dashboard-card {
    width: 100%;
  }

  .brand-card {
    width: 100%;
    justify-items: start;
  }

  .ai-assistant {
    right: 18px;
    bottom: 18px;
  }

  .ai-speech {
    display: none;
  }
}

@media (max-width: 620px) {
  .app-header {
    padding: 14px;
  }

  .brand-area {
    align-items: flex-start;
  }

  .brand-subtitle {
    max-width: 260px;
  }

  .support-pill,
  .portal-link {
    width: 100%;
  }

  .hero-panel {
    padding: 24px 20px;
    border-radius: 22px;
  }

  .tiles-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .tile {
    min-height: 230px;
    padding: 22px;
  }

  .ai-robot {
    width: 78px;
    height: 78px;
    border-radius: 22px;
  }

  .ai-robot img {
    width: 94px;
  }

  .chat-panel {
    width: 100%;
  }
}
