:root {
  --bg: #fbfbff;
  --surface: #ffffff;
  --surface-soft: #f7f5ff;
  --surface-cyan: #eefcff;
  --ink: #11133f;
  --text: #3f4265;
  --muted: #7c819f;
  --line: #ececf6;
  --purple: #6b5df5;
  --purple-strong: #5b4be7;
  --teal: #27c3c1;
  --pink: #ee4f9a;
  --danger: #e24c87;
  --shadow: 0 24px 70px rgba(51, 45, 112, 0.10);
  --soft-shadow: 0 12px 32px rgba(76, 69, 144, 0.08);
  --radius: 28px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 78% 12%, rgba(107, 93, 245, 0.12), transparent 30%),
    radial-gradient(circle at 8% 42%, rgba(39, 195, 193, 0.10), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 42%, #f8f7ff 100%);
  font-family: var(--font);
}

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

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0 3.25rem;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 240px;
  color: var(--ink);
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  font-size: 1.75rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--teal), var(--purple));
  box-shadow: 0 12px 24px rgba(39, 195, 193, 0.22);
}

.brand strong {
  display: block;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.brand small {
  display: block;
  margin-top: 0.1rem;
  color: var(--muted);
  font-size: 0.76rem;
}

.nav-links {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: clamp(1rem, 2vw, 2.4rem);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.95rem;
}

.nav-links a {
  position: relative;
  padding: 1.7rem 0;
}

.nav-links a.is-active::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 1.05rem;
  height: 3px;
  border-radius: 999px;
  background: var(--purple);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.icon-btn,
.outline-btn,
.primary-btn,
.soft-btn,
.danger-btn,
.experience-tab,
.tab {
  border: 0;
  cursor: pointer;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--purple);
  font-size: 1.2rem;
}

.outline-btn,
.soft-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.72rem 1.25rem;
  border-radius: 12px;
  color: var(--purple-strong);
  background: #fff;
  border: 1px solid #d9d7ee;
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.84rem 1.45rem;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, #7667f5, #5848e5);
  box-shadow: 0 18px 35px rgba(91, 75, 231, 0.25);
}

.primary-btn.small {
  min-height: 44px;
}

.soft-btn {
  gap: 0.45rem;
  color: var(--ink);
  box-shadow: var(--soft-shadow);
}

.danger-btn {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  color: var(--danger);
  background: #fff2f8;
  border: 1px solid rgba(226, 76, 135, 0.35);
}

button:hover,
.soft-btn:hover,
.outline-btn:hover {
  transform: translateY(-1px);
}

.app-shell {
  max-width: 1380px;
  margin: 0 auto;
  padding: 2.5rem 2rem 4rem;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: 2rem;
  align-items: center;
  min-height: 430px;
}

.hero-copy {
  padding: 1.5rem 0 2rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: #139d9e;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-copy h1,
.section-heading h2,
.vet-hero h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.25rem, 4vw, 4.4rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.hero-copy h1 span,
.section-heading h2 span {
  color: var(--purple);
}

.hero-copy p:not(.eyebrow),
.vet-hero p {
  max-width: 610px;
  margin: 1.25rem 0 0;
  color: #656987;
  font-size: 1.05rem;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.7rem;
}

.security-note {
  position: relative;
  padding-left: 1.9rem;
  font-size: 0.92rem !important;
}

.security-note::before {
  content: "◇";
  position: absolute;
  left: 0;
  color: var(--purple);
}

.hero-visual {
  position: relative;
  min-height: 410px;
  display: grid;
  place-items: end center;
  overflow: hidden;
  border-radius: 40px;
  background:
    radial-gradient(circle at 65% 36%, rgba(112, 92, 245, 0.17), transparent 32%),
    radial-gradient(circle at 30% 58%, rgba(39, 195, 193, 0.16), transparent 34%),
    linear-gradient(135deg, #f7fcff, #f7f1ff);
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 9% 5% 0 18%;
  border-radius: 999px;
  border: 1px dashed rgba(107, 93, 245, 0.23);
}

.hero-visual img {
  position: relative;
  z-index: 1;
  width: min(620px, 94%);
  height: 390px;
  object-fit: cover;
  object-position: center;
  mix-blend-mode: multiply;
  border-radius: 38px;
}

.float-chip {
  position: absolute;
  z-index: 2;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.86);
  color: var(--purple);
  box-shadow: var(--soft-shadow);
  font-size: 1.5rem;
}

.chip-a { top: 18%; left: 18%; color: var(--purple); }
.chip-b { top: 19%; right: 8%; color: var(--teal); }
.chip-c { bottom: 23%; left: 11%; color: var(--pink); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.35rem;
  margin-top: 1rem;
}

.feature-card,
.form-card,
.history-panel,
.activity-card,
.problem-card,
.emergency-card,
.pet-profile,
.vet-hero {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
}

.feature-card {
  min-height: 150px;
  padding: 1.6rem;
}

.feature-card h2,
.form-card h2,
.history-panel h2,
.activity-card h2,
.problem-card h3,
.emergency-card h3 {
  margin: 0;
  color: var(--ink);
  line-height: 1.2;
}

.feature-card h2 {
  margin-top: 1rem;
  font-size: 1.05rem;
}

.feature-card p {
  margin: 0.65rem 0 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.92rem;
}

.feature-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 19px;
  font-size: 1.35rem;
  font-weight: 900;
}

.feature-icon.purple { color: var(--purple); background: #f0edff; }
.feature-icon.teal { color: #12aeb0; background: #eafafb; }
.feature-icon.pink { color: var(--pink); background: #fff0f7; }
.feature-icon.violet { color: #8a6df1; background: #f2efff; }

.symptom-guide {
  margin-top: 1.7rem;
  padding: 2rem;
  border-radius: 36px;
  background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(250,249,255,0.93));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.section-heading {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 380px);
  gap: 1.5rem;
  align-items: end;
}

.section-heading h2 {
  max-width: 680px;
  font-size: clamp(1.9rem, 3vw, 3.2rem);
}

.notice-card {
  padding: 1.2rem;
  border-radius: 22px;
  background: #f4f0ff;
  color: #55506e;
  line-height: 1.55;
}

.notice-card strong {
  color: var(--ink);
}

.steps-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1.7rem 0;
  padding: 1rem;
  border-radius: 25px;
  background: #fff;
  border: 1px solid var(--line);
}

.steps-strip div {
  display: grid;
  grid-template-columns: 48px 1fr;
  column-gap: 0.9rem;
  align-items: center;
}

.steps-strip span {
  grid-row: span 2;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--purple);
  font-weight: 900;
}

.steps-strip strong {
  color: var(--ink);
  font-size: 0.94rem;
}

.steps-strip small {
  color: var(--muted);
}

.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1.25rem;
}

.problem-card,
.emergency-card {
  padding: 1.5rem;
}

.problem-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 0.9rem;
  margin-top: 1.3rem;
}

.problem-grid button {
  min-height: 112px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 0.6rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.problem-grid button span {
  color: var(--teal);
  font-size: 1.7rem;
}

.emergency-card {
  background: #fff6fb;
}

.emergency-card p {
  color: var(--muted);
  line-height: 1.55;
}

.emergency-card ul {
  display: grid;
  gap: 0.55rem;
  padding: 0;
  margin: 1rem 0 1.25rem;
  list-style: none;
}

.emergency-card li {
  position: relative;
  padding-left: 1.4rem;
  color: var(--ink);
  font-weight: 750;
  font-size: 0.92rem;
}

.emergency-card li::before {
  content: "△";
  position: absolute;
  left: 0;
  color: var(--danger);
}

.experience-switcher {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin: 2rem auto 1rem;
  padding: 0.35rem;
  width: fit-content;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--soft-shadow);
}

.experience-tab {
  min-width: 190px;
  padding: 0.9rem 1.3rem;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
}

.experience-tab.is-active {
  color: #fff;
  background: var(--purple);
}

.experience-view {
  display: none;
}

.experience-view.is-active {
  display: block;
}

.workspace-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.side-rail {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 0.45rem;
  padding: 1.2rem;
  border-radius: 24px;
  background: rgba(255,255,255,0.85);
  border: 1px solid var(--line);
  box-shadow: var(--soft-shadow);
}

.side-rail strong {
  margin-bottom: 0.5rem;
  color: var(--ink);
}

.side-rail a {
  padding: 0.75rem 0.85rem;
  border-radius: 13px;
  color: var(--muted);
  font-weight: 800;
}

.side-rail a.is-active,
.side-rail a:hover {
  color: #fff;
  background: var(--purple);
}

.owner-main {
  display: grid;
  gap: 1.1rem;
}

.pet-profile {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem;
}

.pet-avatar {
  position: relative;
  width: 130px;
  height: 130px;
  overflow: hidden;
  border-radius: 32px;
  background: var(--surface-cyan);
}

.pet-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pet-profile h2 {
  margin: 0;
  color: var(--ink);
  font-size: 2rem;
}

.pet-profile p:not(.eyebrow) {
  margin: 0.35rem 0 0;
  max-width: 520px;
  color: var(--muted);
}

.owner-contact {
  min-width: 220px;
  padding-left: 1.5rem;
  border-left: 1px solid var(--line);
  display: grid;
  gap: 0.35rem;
}

.owner-contact span,
.owner-contact small {
  color: var(--muted);
}

.owner-contact strong {
  color: var(--ink);
}

.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.dashboard-cards article {
  min-height: 160px;
  display: grid;
  gap: 0.55rem;
  align-content: start;
  padding: 1.25rem;
  border-radius: 22px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--soft-shadow);
}

.dashboard-cards strong {
  color: var(--ink);
}

.dashboard-cards b {
  color: var(--teal);
}

.dashboard-cards small {
  color: var(--muted);
}

.form-card,
.history-panel,
.activity-card {
  padding: 1.35rem;
}

.owner-primary {
  background:
    radial-gradient(circle at 96% 0%, rgba(39, 195, 193, 0.13), transparent 30%),
    #fff;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.mini-switch {
  display: flex;
  gap: 0.4rem;
  padding: 0.25rem;
  border-radius: 999px;
  background: var(--surface-soft);
}

.tab {
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
}

.tab.is-active {
  color: #fff;
  background: var(--purple);
}

.stack-form {
  display: grid;
  gap: 0.85rem;
}

.two-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.span-2 {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.8rem 0.95rem;
  border: 1px solid #e4e4f0;
  border-radius: 15px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

textarea {
  resize: vertical;
  line-height: 1.45;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(107, 93, 245, 0.55);
  box-shadow: 0 0 0 4px rgba(107, 93, 245, 0.10);
}

.register-drawer {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.register-drawer summary {
  cursor: pointer;
  color: var(--purple);
  font-weight: 900;
}

.register-drawer-body {
  padding-top: 1rem;
}

.conditional-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.hidden {
  display: none;
}

.status-box,
.demo-users,
.history-summary {
  margin-top: 0.85rem;
  padding: 0.95rem 1rem;
  border-radius: 17px;
  background: #fafaff;
  border: 1px solid var(--line);
  color: var(--text);
  line-height: 1.5;
}

.demo-users {
  display: none;
  white-space: pre-wrap;
  font-size: 0.88rem;
}

.demo-users.is-visible {
  display: block;
}

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

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.34rem 0.7rem;
  border-radius: 999px;
  background: #f1efff;
  color: var(--purple);
  font-size: 0.75rem;
  font-weight: 900;
  white-space: nowrap;
}

.badge-owner { color: #0f9c9e; background: #e8fbfb; }
.badge-access { color: #8a54d9; background: #f4efff; }
.badge-vet { color: #078f91; background: #e6fbfc; }
.badge-validated { color: #d83f88; background: #fff0f7; }

.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
}

.history-list {
  position: relative;
  display: grid;
  gap: 0.9rem;
  margin-top: 1rem;
}

.event-card {
  position: relative;
  padding: 1rem 1rem 1rem 1.2rem;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--soft-shadow);
}

.event-card::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 1.2rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--purple);
}

.event-card.owner::before { background: var(--teal); }
.event-card.vet::before { background: var(--purple); }
.event-card.validated::before { background: var(--pink); }

.event-meta {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.45rem;
}

.event-title {
  margin: 0 0 0.3rem;
  color: var(--ink);
  font-size: 1rem;
}

.vet-hero {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 1.5rem;
  align-items: center;
  overflow: hidden;
  padding: 2rem;
  margin-bottom: 1.2rem;
  background:
    radial-gradient(circle at 82% 18%, rgba(107, 93, 245, 0.12), transparent 36%),
    #fff;
}

.vet-hero h2 {
  max-width: 760px;
  font-size: clamp(2rem, 3vw, 3.4rem);
}

.vet-hero img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 28px;
}

.vet-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.activity-card {
  margin-top: 1.2rem;
}

.log-box {
  margin: 0;
  min-height: 160px;
  max-height: 330px;
  overflow: auto;
  padding: 1rem;
  border-radius: 18px;
  background: #141735;
  color: #eff0ff;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.82rem;
  line-height: 1.45;
}

@media (max-width: 1100px) {
  .topbar {
    padding-inline: 1.2rem;
  }

  .nav-links {
    display: none;
  }

  .hero-panel,
  .section-heading,
  .guide-layout,
  .workspace-grid,
  .vet-hero {
    grid-template-columns: 1fr;
  }

  .side-rail {
    position: static;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .side-rail strong,
  .side-rail .demo-users {
    grid-column: 1 / -1;
  }

  .feature-grid,
  .dashboard-cards,
  .steps-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .vet-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .topbar {
    position: static;
    flex-wrap: wrap;
    gap: 0.8rem;
    padding: 1rem;
  }

  .brand {
    min-width: 0;
    flex: 1 1 100%;
  }

  .top-actions {
    width: 100%;
  }

  .top-actions .outline-btn,
  .top-actions .primary-btn {
    flex: 1;
  }

  .app-shell {
    padding: 1rem 0.85rem 2rem;
  }

  .hero-panel {
    gap: 1rem;
    min-height: auto;
  }

  .hero-visual {
    min-height: 270px;
    border-radius: 28px;
  }

  .hero-visual img {
    height: 270px;
    width: 100%;
  }

  .feature-grid,
  .dashboard-cards,
  .steps-strip,
  .action-grid,
  .two-cols,
  .conditional-fields,
  .side-rail {
    grid-template-columns: 1fr;
  }

  .symptom-guide {
    padding: 1rem;
    border-radius: 26px;
  }

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

  .problem-grid button {
    min-height: 98px;
  }

  .pet-profile {
    grid-template-columns: 1fr;
  }

  .owner-contact {
    padding-left: 0;
    padding-top: 1rem;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .experience-switcher {
    width: 100%;
  }

  .experience-tab {
    min-width: 0;
    flex: 1;
    padding-inline: 0.8rem;
  }
}
