:root {
  --orange: #f28f22;
  --orange-dark: #d96f08;
  --orange-soft: #fff1df;
  --blue: #229dc8;
  --blue-dark: #137da3;
  --blue-soft: #e8f7fc;
  --ink: #303030;
  --muted: #747474;
  --line: #ece8e2;
  --surface: #fff;
  --bg: #f7f4ef;
  --success: #38a878;
  --danger: #d95d58;
  --shadow: 0 18px 55px rgba(48, 48, 48, .16);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Nunito", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 18%, rgba(242,143,34,.18), transparent 27%),
    radial-gradient(circle at 86% 82%, rgba(34,157,200,.18), transparent 25%),
    #f6f3ed;
}
button, input { font: inherit; }
button { cursor: pointer; }

.stage {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 72px;
  padding: 40px;
}
.phone {
  width: 390px;
  height: min(844px, calc(100vh - 40px));
  min-height: 680px;
  background: var(--surface);
  border: 9px solid #222;
  border-radius: 44px;
  box-shadow: var(--shadow), inset 0 0 0 1px #555;
  overflow: hidden;
  position: relative;
}
.phone::before {
  content: "";
  position: absolute;
  z-index: 20;
  top: 8px;
  left: 50%;
  width: 112px;
  height: 25px;
  transform: translateX(-50%);
  border-radius: 18px;
  background: #222;
}
.statusbar {
  height: 38px;
  padding: 10px 23px 0;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 900;
  position: relative;
  z-index: 21;
}
.status-icons { letter-spacing: 2px; font-size: 8px; }
.app {
  height: calc(100% - 38px);
  overflow: hidden;
  position: relative;
  background: var(--bg);
}
.screen {
  height: 100%;
  overflow-y: auto;
  padding: 0 18px 130px;
  scrollbar-width: none;
  animation: appear .24s ease;
}
.screen::-webkit-scrollbar { display: none; }
@keyframes appear { from { opacity: 0; transform: translateY(5px); } }
@keyframes pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 14px 30px rgba(242,143,34,.27); }
  50% { transform: scale(1.07); box-shadow: 0 18px 38px rgba(242,143,34,.42); }
}

.demo-panel { max-width: 430px; }
.demo-brand {
  width: 360px;
  max-width: 100%;
  padding: 14px 0 8px;
}
.demo-brand img { display: block; width: 100%; height: auto; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.demo-panel > p:not(.eyebrow) { font-size: 19px; color: #666; line-height: 1.55; }
.eyebrow, .section-kicker {
  color: var(--orange-dark);
  letter-spacing: 1.7px;
  font-weight: 900;
  font-size: 11px;
}
.demo-hint {
  margin-top: 32px;
  padding: 18px;
  border-radius: 22px;
  display: flex;
  gap: 12px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(255,255,255,.9);
}
.demo-hint span { font-size: 24px; color: var(--blue); }
.demo-hint p { margin: 0; line-height: 1.45; color: #666; }
.role-shortcuts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.role-shortcuts button {
  border: 0;
  border-radius: 99px;
  padding: 10px 14px;
  color: var(--ink);
  background: #fff;
  font-weight: 800;
  box-shadow: 0 4px 15px rgba(0,0,0,.06);
}
.role-shortcuts button:hover { color: #fff; background: var(--blue); }

.topbar {
  padding: 15px 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar h2 { margin: 0; font-size: 22px; line-height: 1.1; }
.topbar p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.logo {
  width: 118px;
  height: 29px;
  display: flex;
  align-items: center;
}
.logo img { display: block; width: 100%; height: auto; }
.icon-btn, .avatar-btn, .back-btn {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 5px 14px rgba(48,48,48,.08);
  font-size: 18px;
  font-weight: 900;
}
.avatar-btn { overflow: hidden; padding: 0; }
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; }
.back-btn { box-shadow: none; background: transparent; font-size: 25px; }

.hero {
  padding: 20px;
  border-radius: 27px;
  color: #fff;
  background: linear-gradient(145deg, var(--orange), #f6aa4e);
  box-shadow: 0 13px 28px rgba(242,143,34,.26);
  position: relative;
  overflow: hidden;
}
.hero.blue { background: linear-gradient(145deg, var(--blue), #63c5e3); box-shadow: 0 13px 28px rgba(34,157,200,.23); }
.hero::after {
  content: "";
  position: absolute;
  width: 150px; height: 150px;
  border: 28px solid rgba(255,255,255,.13);
  border-radius: 50%;
  right: -70px; top: -60px;
}
.hero h1 { margin: 5px 0 8px; font-size: 27px; line-height: 1.08; max-width: 275px; }
.hero p { margin: 0 0 18px; max-width: 280px; font-size: 13px; line-height: 1.45; opacity: .94; }
.hero-row { display: flex; align-items: center; gap: 14px; }
.pet-avatar {
  width: 84px; height: 84px;
  border-radius: 25px;
  object-fit: cover;
  border: 4px solid rgba(255,255,255,.65);
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 900;
  background: rgba(255,255,255,.2);
}
.btn {
  border: 0;
  border-radius: 14px;
  min-height: 44px;
  padding: 11px 16px;
  font-weight: 900;
  color: #fff;
  background: var(--orange);
}
.btn.blue { background: var(--blue); }
.btn.white { color: var(--orange-dark); background: #fff; }
.btn.ghost { color: var(--ink); border: 1px solid var(--line); background: #fff; }
.btn.danger { background: var(--danger); }
.btn.block { width: 100%; }
.btn:active, .quick-card:active, .list-card:active { transform: scale(.98); }

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin: 22px 2px 11px;
}
.section-title h3 { margin: 0; font-size: 17px; }
.section-title button { border: 0; background: transparent; color: var(--blue-dark); font-size: 11px; font-weight: 900; }
.quick-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
.quick-card {
  min-height: 112px;
  text-align: left;
  padding: 15px;
  border: 1px solid #f0ece5;
  border-radius: 21px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(48,48,48,.05);
  transition: .15s ease;
}
.quick-card .qicon {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 13px;
  margin-bottom: 10px;
  font-size: 19px;
  background: var(--orange-soft);
}
.quick-card.blue .qicon { background: var(--blue-soft); }
.quick-card strong { display: block; font-size: 13px; }
.quick-card small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.25; }
.photo-tile { min-height: 150px; padding: 0; overflow: hidden; }
.photo-tile img { width: 100%; height: 100px; display: block; object-fit: cover; }
.photo-tile .tile-copy { display: block; padding: 10px 12px 12px; }
.photo-tile .tile-copy strong { font-size: 12px; }

.list-card {
  width: 100%;
  border: 0;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px;
  margin-bottom: 9px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 4px 15px rgba(48,48,48,.045);
}
.list-card .leading {
  width: 44px; height: 44px;
  border-radius: 14px;
  display: grid; place-items: center;
  flex: 0 0 auto;
  font-size: 20px;
  color: var(--orange-dark);
  background: var(--orange-soft);
}
.list-card .leading.blue { color: var(--blue-dark); background: var(--blue-soft); }
.list-card .thumb {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  border-radius: 16px;
  object-fit: cover;
  background: #eee;
}
.list-card.photo { padding: 9px; }
.list-card.photo strong { font-size: 12px; }
.list-card.photo small { white-space: normal; line-height: 1.3; }
.list-card .content { min-width: 0; flex: 1; }
.list-card strong { display: block; font-size: 13px; }
.list-card small { display: block; color: var(--muted); font-size: 10px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chevron { color: #bbb; font-size: 18px; }

.catalog-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
.product-card {
  border: 0;
  padding: 0;
  border-radius: 20px;
  overflow: hidden;
  text-align: left;
  background: #fff;
  box-shadow: 0 6px 18px rgba(48,48,48,.06);
}
.product-card img { width: 100%; aspect-ratio: 1 / .86; display: block; object-fit: cover; }
.product-card .product-copy { display: block; padding: 11px; }
.product-card strong { display: block; font-size: 11px; line-height: 1.25; }
.product-card small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.product-card .price { display: block; margin-top: 8px; color: var(--orange-dark); font-size: 13px; font-weight: 900; }
.product-card .free { color: var(--success); }

.portrait-hero { display: flex; align-items: center; gap: 14px; }
.portrait-hero img {
  width: 82px;
  height: 82px;
  flex: 0 0 auto;
  border: 4px solid rgba(255,255,255,.7);
  border-radius: 24px;
  object-fit: cover;
}

.nav {
  position: absolute;
  z-index: 10;
  left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,.96);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 22px rgba(48,48,48,.06);
}
.ad-strip {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #755629;
  background: #fff3d8;
  font-size: 9px;
  font-weight: 800;
  border-bottom: 1px solid #f4e4be;
}
.ad-strip b { color: var(--orange-dark); }
.bottom-nav { height: 66px; display: flex; align-items: center; justify-content: space-around; }
.nav-btn {
  width: 66px;
  border: 0;
  padding: 4px 0;
  color: #999;
  background: transparent;
  font-size: 9px;
  font-weight: 800;
}
.nav-btn span { display: block; font-size: 20px; margin-bottom: 2px; }
.nav-btn.active { color: var(--orange-dark); }

.login-screen {
  padding: 20px 22px 35px;
  background: linear-gradient(180deg, #fff8ee 0%, #fff 48%);
}
.brand-lockup { text-align: center; padding: 26px 0 18px; }
.brand-logo {
  display: block;
  width: 265px;
  max-width: 92%;
  height: auto;
  margin: 16px auto 17px;
}
.brand-icon {
  width: 74px; height: 74px;
  margin: 0 auto 10px;
  border-radius: 24px;
  display: grid; place-items: center;
  color: #fff; background: var(--orange);
  font-size: 39px; font-weight: 900;
  box-shadow: 0 14px 30px rgba(242,143,34,.27);
}
.brand-lockup p { margin: 5px auto; max-width: 270px; color: var(--muted); font-size: 12px; }
.role-list { display: grid; gap: 10px; }
.role-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 13px 14px;
  display: flex; align-items: center; gap: 12px;
  text-align: left;
  background: #fff;
}
.role-card:hover { border-color: var(--orange); box-shadow: 0 8px 20px rgba(242,143,34,.09); }
.role-card .r-icon { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; background: var(--orange-soft); }
.role-card:nth-child(even) .r-icon { background: var(--blue-soft); }
.role-card strong { display: block; font-size: 13px; }
.role-card small { color: var(--muted); font-size: 10px; }
.admin-link { display: block; margin: 20px auto 0; border: 0; background: transparent; color: #aaa; font-size: 10px; text-decoration: underline; }

.profile-cover {
  height: 125px;
  margin: 0 -18px;
  background: linear-gradient(135deg, var(--orange-soft), var(--blue-soft));
  position: relative;
}
.profile-cover img { width: 100%; height: 100%; object-fit: cover; opacity: .35; }
.profile-head { margin-top: -46px; position: relative; text-align: center; }
.profile-head img { width: 92px; height: 92px; object-fit: cover; border-radius: 28px; border: 5px solid var(--bg); }
.profile-head h2 { margin: 5px 0 0; font-size: 23px; }
.profile-head p { margin: 2px 0 10px; color: var(--muted); font-size: 11px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.stat { padding: 12px 5px; text-align: center; border-radius: 15px; background: #fff; }
.stat strong { display: block; font-size: 15px; }
.stat small { color: var(--muted); font-size: 9px; }

.qr-box {
  width: 185px; height: 185px;
  margin: 22px auto;
  padding: 14px;
  border: 8px solid #fff;
  border-radius: 25px;
  background:
    linear-gradient(90deg, var(--ink) 12px, transparent 12px) 0 0/30px 30px,
    linear-gradient(var(--ink) 12px, transparent 12px) 0 0/30px 30px,
    repeating-linear-gradient(45deg, transparent 0 6px, var(--ink) 6px 12px, transparent 12px 18px),
    #fff;
  box-shadow: 0 12px 30px rgba(48,48,48,.13);
}
.qr-center {
  width: 58px; height: 58px;
  margin: 54px auto;
  border: 5px solid #fff;
  border-radius: 13px;
  display: grid; place-items: center;
  background: #fff;
  overflow: hidden;
}
.qr-center img { width: 50px; height: auto; }
.center { text-align: center; }
.caption { color: var(--muted); font-size: 11px; line-height: 1.45; }

.timeline { position: relative; padding-left: 18px; }
.timeline::before { content:""; position:absolute; left:5px; top:8px; bottom:10px; width:2px; background:#ddd; }
.event { position: relative; padding: 0 0 18px 14px; }
.event::before { content:""; position:absolute; left:-18px; top:4px; width:10px; height:10px; border-radius:50%; background:var(--orange); border:3px solid var(--bg); }
.event.blue::before { background: var(--blue); }
.event time { color: var(--muted); font-size: 9px; font-weight: 800; }
.event h4 { margin: 2px 0; font-size: 13px; }
.event p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.35; }

.wallet-card {
  color: #fff;
  padding: 20px;
  border-radius: 25px;
  background: linear-gradient(135deg, #2f3438, #555b5f);
  box-shadow: 0 14px 28px rgba(48,48,48,.2);
}
.wallet-card p { margin: 0; color: #ddd; font-size: 11px; }
.wallet-card h2 { margin: 4px 0 18px; font-size: 32px; }
.wallet-meta { display: flex; justify-content: space-between; color: #ddd; font-size: 10px; }

.searchbox {
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 15px;
  display: flex; align-items: center; gap: 9px;
  padding: 0 13px;
  background: #fff;
}
.searchbox input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; }
.chips { display: flex; gap: 7px; overflow-x: auto; padding: 10px 0; scrollbar-width: none; }
.chip { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 99px; padding: 7px 11px; background: #fff; color: var(--muted); font-size: 10px; font-weight: 800; }
.chip.active { border-color: var(--orange); color: #fff; background: var(--orange); }
.map {
  height: 155px;
  border-radius: 22px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(35deg, transparent 44%, rgba(255,255,255,.8) 45% 49%, transparent 50%),
    linear-gradient(-28deg, transparent 44%, rgba(255,255,255,.8) 45% 49%, transparent 50%),
    #dfeccf;
}
.map::before, .map::after { content:""; position:absolute; border-radius:50% 50% 50% 0; width:31px; height:31px; transform:rotate(-45deg); background:var(--orange); box-shadow:0 5px 12px rgba(0,0,0,.2); }
.map::before { left:64px; top:44px; }
.map::after { right:75px; bottom:37px; background:var(--blue); }
.map-label { position:absolute; left:15px; bottom:12px; padding:6px 9px; border-radius:9px; background:rgba(255,255,255,.9); font-size:9px; font-weight:900; }

.modal-backdrop {
  position: absolute;
  z-index: 30;
  inset: 0;
  display: flex;
  align-items: end;
  padding: 16px;
  background: rgba(20,20,20,.45);
  backdrop-filter: blur(3px);
}
.modal {
  width: 100%;
  padding: 22px;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 15px 40px rgba(0,0,0,.2);
  animation: sheet .25s ease;
}
@keyframes sheet { from { transform: translateY(30px); opacity:0; } }
.modal h3 { margin: 0 0 7px; font-size: 20px; }
.modal p { color: var(--muted); font-size: 11px; line-height: 1.45; }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 18px; }

.urgent {
  padding: 18px;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(140deg, #dc5c50, #ed8b6c);
}
.urgent h2 { margin: 0 0 5px; font-size: 21px; }
.urgent p { margin: 0 0 14px; font-size: 11px; opacity:.9; }
.queue {
  margin: 12px 0;
  padding: 14px;
  border-radius: 18px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255,255,255,.16);
}
.queue strong { font-size: 13px; }
.queue span { font-size: 10px; }
.toggle {
  width: 48px; height: 27px;
  border: 0;
  border-radius: 99px;
  padding: 3px;
  background: #ddd;
}
.toggle::after { content:""; display:block; width:21px; height:21px; border-radius:50%; background:#fff; transition:.2s; }
.toggle.on { background: var(--success); }
.toggle.on::after { transform: translateX(21px); }

.appointment {
  border-left: 4px solid var(--orange);
  padding: 13px;
  margin-bottom: 9px;
  border-radius: 5px 17px 17px 5px;
  background: #fff;
}
.appointment.blue { border-color: var(--blue); }
.appointment .time { color: var(--orange-dark); font-weight: 900; font-size: 11px; }
.appointment h4 { margin: 3px 0; font-size: 13px; }
.appointment p { margin:0; color:var(--muted); font-size:10px; }

.progress { height: 8px; border-radius: 99px; overflow: hidden; background: #eee; }
.progress span { display:block; height:100%; border-radius:99px; background:var(--orange); }
.metric-card { padding: 16px; border-radius: 20px; background:#fff; margin-bottom:10px; }
.metric-card h3 { margin:0; font-size:26px; }
.metric-card p { margin:2px 0 10px; color:var(--muted); font-size:10px; }
.metric-row { display:grid; grid-template-columns:1fr 1fr; gap:10px; }

.bar-chart { height:120px; display:flex; align-items:end; gap:7px; padding-top:15px; }
.bar { flex:1; border-radius:7px 7px 2px 2px; background:var(--blue); opacity:.75; }
.bar:nth-child(2n) { background:var(--orange); }
.chart-labels { display:flex; justify-content:space-around; font-size:8px; color:var(--muted); }

.form-group { margin-bottom: 13px; }
.form-group label { display:block; margin:0 0 5px 2px; color:var(--muted); font-size:10px; font-weight:800; }
.input {
  width:100%; min-height:45px; padding:10px 13px;
  border:1px solid var(--line); border-radius:14px;
  outline:0; background:#fff; color:var(--ink);
}
.permission {
  display:flex; align-items:center; gap:12px;
  padding:13px; margin-bottom:8px;
  border-radius:17px; background:#fff;
}
.permission .content { flex:1; }
.permission strong { display:block; font-size:12px; }
.permission small { color:var(--muted); font-size:9px; }
.badge { display:inline-flex; padding:5px 8px; border-radius:99px; color:var(--success); background:#e8f7f1; font-size:9px; font-weight:900; }
.badge.orange { color:var(--orange-dark); background:var(--orange-soft); }
.badge.blue { color:var(--blue-dark); background:var(--blue-soft); }
.divider { height:1px; margin:16px 0; background:var(--line); }
.empty-note { padding:20px; border:1px dashed #d7d1c9; border-radius:18px; text-align:center; color:var(--muted); font-size:11px; }

.toast {
  position:absolute;
  z-index:50;
  left:50%; bottom:116px;
  max-width:310px;
  transform:translate(-50%, 18px);
  padding:10px 15px;
  border-radius:99px;
  color:#fff; background:#303030;
  font-size:10px; font-weight:800;
  opacity:0; pointer-events:none;
  transition:.25s;
  text-align:center;
}
.toast.show { opacity:1; transform:translate(-50%, 0); }

@media (max-width: 900px) {
  body { background:#222; }
  .stage { padding:0; display:block; }
  .phone { width:100%; height:100vh; min-height:600px; border:0; border-radius:0; box-shadow:none; }
  .phone::before { display:none; }
  .demo-panel { display:none; }
}
