/* ===== Petiva App Prototype — phone frame ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--lagoon-dark, #06212A);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Manrope', system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

/* Phone frame */
.phone-frame {
  width: 390px;
  max-width: 100%;
  height: 780px;
  max-height: 95vh;
  background: var(--paper, #FFFDF8);
  border-radius: 44px;
  overflow: hidden;
  box-shadow: 0 0 0 12px #1a1a1a, 0 0 0 14px #333, 0 20px 60px rgba(0,0,0,0.4);
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Notch */
.phone-notch {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 150px; height: 28px;
  background: #1a1a1a;
  border-radius: 0 0 18px 18px;
  z-index: 200;
}

/* Status bar */
.status-bar {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--lagoon, #0B2F3A);
  flex-shrink: 0;
  padding-top: 10px;
}
.status-bar-icons { display: flex; gap: 0.35rem; font-size: 0.75rem; }

/* Screen container */
.screen-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  -webkit-overflow-scrolling: touch;
}
.screen-container::-webkit-scrollbar { display: none; }
.screen-container { scrollbar-width: none; }

/* Screens */
.screen { display: none; padding: 0 0 80px; min-height: 100%; }
.screen.active { display: block; }

/* Bottom navigation */
.bottom-nav {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 70px;
  background: #fff;
  border-top: 1px solid #e8e2d5;
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
  padding-bottom: 6px;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.65rem;
  font-weight: 600;
  color: #61747A;
  transition: color 0.2s;
  padding: 0.4rem;
}
.nav-item.active { color: #FF6B4A; }
.nav-item svg { width: 24px; height: 24px; }

/* ===== Shared app styles ===== */
.app-prototype-notice {
  background: rgba(255, 212, 92, 0.12);
  border-bottom: 2px solid #FFD45C;
  padding: 0.5rem 1.25rem;
  font-size: 0.72rem;
  color: #0B2F3A;
  text-align: center;
  font-weight: 600;
}

/* Splash */
.splash {
  background: linear-gradient(160deg, #0B2F3A 0%, #06212A 100%);
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  padding: 2rem;
  text-align: center;
}
.splash-logo { width: 72px; height: 72px; border-radius: 18px; margin-bottom: 1.5rem; }
.splash h1 { color: #fff; font-size: 1.8rem; font-weight: 800; margin-bottom: 0.5rem; }
.splash h1 span { color: #FF6B4A; }
.splash p { color: rgba(255,255,255,0.6); font-size: 0.9rem; margin-bottom: 2rem; }
.splash-btn {
  background: #FF6B4A; color: #fff;
  padding: 0.85rem 2.5rem; border-radius: 14px;
  font-weight: 700; font-size: 1rem; border: none; cursor: pointer;
  transition: background 0.2s;
}
.splash-btn:hover { background: #ff8a6f; }

/* Pet selector */
.pet-selector { padding: 1.5rem 1.25rem; }
.pet-selector h2 { font-size: 1.3rem; margin-bottom: 0.25rem; }
.pet-selector p { color: #61747A; font-size: 0.88rem; margin-bottom: 1.5rem; }
.pet-card-select {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem; border: 1.5px solid #e8e2d5; border-radius: 18px;
  margin-bottom: 0.75rem; cursor: pointer; transition: all 0.2s;
  background: #fff; width: 100%; text-align: left; border-left: none; font-family: inherit;
}
.pet-card-select:hover { border-color: #46D7CF; }
.pet-card-select.selected { border-color: #FF6B4A; background: rgba(255,107,74,0.05); }
.pet-card-select img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,0.92); box-shadow: 0 3px 10px rgba(7,47,58,0.12); flex-shrink: 0; }
.pet-card-select .emoji { width: 56px; height: 56px; border-radius: 50%; background: rgba(70,215,207,0.1); display: flex; align-items: center; justify-content: center; font-size: 1.8rem; flex-shrink: 0; }
.pet-card-select strong { display: block; color: #0B2F3A; font-size: 1rem; }
.pet-card-select span { font-size: 0.8rem; color: #61747A; }
.pet-card-select .arrow { margin-left: auto; color: #61747A; font-size: 1.2rem; }

/* App header */
.app-header {
  padding: 0.75rem 1.25rem 1rem;
  display: flex; align-items: center; gap: 0.85rem;
  border-bottom: 1px solid #f0ebe0;
}
.app-header img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,0.92); box-shadow: 0 3px 10px rgba(7,47,58,0.12); flex-shrink: 0; }
.app-header .emoji { width: 48px; height: 48px; border-radius: 50%; background: rgba(70,215,207,0.1); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; flex-shrink: 0; }
.app-header strong { display: block; color: #0B2F3A; font-size: 1.05rem; font-family: 'Manrope', sans-serif; }
.app-header span { font-size: 0.78rem; color: #61747A; }
.app-header .badge { margin-left: auto; }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.22rem 0.6rem; border-radius: 100px;
  font-size: 0.72rem; font-weight: 600; white-space: nowrap;
}
.badge-verified { background: rgba(70,215,207,0.2); color: #0B2F3A; }
.badge-owner { background: rgba(255,212,92,0.12); color: #8a7330; }
.badge-coral { background: rgba(255,107,74,0.1); color: #FF6B4A; }
.badge-aqua { background: rgba(70,215,207,0.1); color: #0B2F3A; }
.badge-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.badge-dot.verified { background: #46D7CF; }
.badge-dot.owner { background: #FFD45C; }

/* Tabs */
.app-tabs {
  display: flex; gap: 0.5rem; padding: 0 1.25rem;
  border-bottom: 2px solid #f0ebe0; margin-bottom: 1rem;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.app-tab {
  padding: 0.65rem 1rem; font-weight: 600; font-size: 0.88rem;
  color: #61747A; border: none; background: none;
  border-bottom: 3px solid transparent; margin-bottom: -2px;
  white-space: nowrap; cursor: pointer; transition: all 0.2s;
}
.app-tab.active { color: #FF6B4A; border-bottom-color: #FF6B4A; }

/* Cards */
.app-card {
  background: #fff; border: 1px solid #f0ebe0;
  border-radius: 16px; padding: 1rem 1.15rem;
  margin: 0 1.25rem 0.75rem;
  box-shadow: 0 1px 3px rgba(11,47,58,0.04);
}

/* Today screen */
.section-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #61747A; margin: 1.25rem 1.25rem 0.65rem; }
.today-reminder {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 1rem 1.15rem; background: rgba(255,107,74,0.06);
  border-radius: 16px; border-left: 4px solid #FF6B4A;
  margin: 0 1.25rem 0.75rem;
}
.today-reminder-icon { font-size: 1.3rem; flex-shrink: 0; }
.today-reminder strong { display: block; color: #0B2F3A; font-size: 0.92rem; }
.today-reminder p { font-size: 0.78rem; color: #61747A; }
.today-reminder .badge { margin-left: auto; flex-shrink: 0; }

.entry-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.65rem 0; border-bottom: 1px solid #f0ebe0; }
.entry-row:last-child { border-bottom: none; }
.entry-row .icon { font-size: 1.2rem; flex-shrink: 0; width: 32px; text-align: center; }
.entry-row .body { flex: 1; }
.entry-row strong { display: block; color: #0B2F3A; font-size: 0.88rem; }
.entry-row span { font-size: 0.76rem; color: #61747A; }
.entry-row .badge { flex-shrink: 0; }

.weight-chart { display: flex; gap: 0.65rem; margin: 0.5rem 0; }
.weight-bar { flex: 1; text-align: center; }
.weight-bar .bar { height: 60px; background: rgba(70,215,207,0.15); border-radius: 8px; position: relative; margin-bottom: 0.3rem; display: flex; align-items: flex-end; justify-content: center; }
.weight-bar .bar .fill { width: 100%; background: #46D7CF; border-radius: 8px; }
.weight-bar .bar.owner .fill { background: #FFD45C; }
.weight-bar strong { display: block; font-size: 0.82rem; color: #0B2F3A; }
.weight-bar span { font-size: 0.68rem; color: #61747A; }
.weight-bar .tag { font-size: 0.62rem; font-weight: 600; color: #46D7CF; }
.weight-bar .tag.owner { color: #FFD45C; }

/* Timeline */
.timeline-item-app { display: flex; gap: 0.85rem; padding: 0 1.25rem 1rem; }
.timeline-dot-app { width: 36px; height: 36px; border-radius: 50%; background: #fff; border: 2px solid #46D7CF; display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; z-index: 1; }
.timeline-dot-app.owner { border-color: #FFD45C; }
.timeline-line { position: relative; }
.timeline-line::before { content: ''; position: absolute; left: 17px; top: 36px; bottom: 0; width: 2px; background: #f0ebe0; }
.timeline-card-app { flex: 1; background: #fff; border: 1px solid #f0ebe0; border-radius: 14px; padding: 0.85rem 1rem; box-shadow: 0 1px 3px rgba(11,47,58,0.04); }
.timeline-card-app h4 { font-size: 0.9rem; color: #0B2F3A; margin-bottom: 0.2rem; }
.timeline-card-app .date { font-size: 0.75rem; color: #61747A; display: block; margin-bottom: 0.35rem; }
.timeline-card-app p { font-size: 0.82rem; color: #61747A; line-height: 1.5; }
.timeline-card-app .meta { display: flex; gap: 0.4rem; margin-top: 0.4rem; flex-wrap: wrap; }
.timeline-card-app .due { margin-top: 0.4rem; font-size: 0.78rem; color: #FF6B4A; font-weight: 600; }

/* Share */
.share-card-app { display: flex; align-items: center; gap: 0.75rem; padding: 0.85rem; border: 1px solid #f0ebe0; border-radius: 14px; margin-bottom: 0.65rem; background: #fff; }
.share-card-app.revoked { opacity: 0.45; }
.share-avatar-app { width: 40px; height: 40px; border-radius: 50%; background: #0B2F3A; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem; flex-shrink: 0; }
.share-card-app .info { flex: 1; }
.share-card-app strong { display: block; color: #0B2F3A; font-size: 0.88rem; }
.share-card-app span { font-size: 0.76rem; color: #61747A; }
.share-card-app .access { font-size: 0.72rem; color: #0B2F3A; font-weight: 600; }
.share-card-app .expiry { font-size: 0.72rem; color: #61747A; }
.share-card-app button { font-size: 0.72rem; font-weight: 600; color: #FF6B4A; background: none; border: 1px solid #FF6B4A; padding: 0.3rem 0.65rem; border-radius: 8px; cursor: pointer; }
.share-card-app button:hover { background: rgba(255,107,74,0.1); }

.consent-box { background: rgba(70,215,207,0.06); border: 1px solid rgba(70,215,207,0.2); border-radius: 14px; padding: 1rem; margin: 0 1.25rem; }
.consent-box h4 { font-size: 0.9rem; margin-bottom: 0.65rem; }
.consent-item-app { display: flex; gap: 0.55rem; align-items: flex-start; margin-bottom: 0.5rem; }
.consent-item-app span { font-size: 1rem; flex-shrink: 0; }
.consent-item-app p { font-size: 0.8rem; color: #61747A; }
.consent-item-app strong { color: #0B2F3A; }

/* Reminders */
.reminder-item-app { display: flex; align-items: center; gap: 0.75rem; padding: 0.85rem 1.15rem; border: 1px solid #f0ebe0; border-radius: 14px; margin: 0 1.25rem 0.65rem; background: #fff; border-left: 4px solid; }
.reminder-item-app.overdue { border-left-color: #FF6B4A; }
.reminder-item-app.due { border-left-color: #FFD45C; }
.reminder-item-app.upcoming { border-left-color: #46D7CF; }
.reminder-item-app .icon { font-size: 1.2rem; flex-shrink: 0; }
.reminder-item-app .info { flex: 1; }
.reminder-item-app strong { display: block; color: #0B2F3A; font-size: 0.88rem; }
.reminder-item-app span { font-size: 0.76rem; color: #61747A; }
.reminder-item-app .book-btn { font-size: 0.72rem; font-weight: 700; color: #fff; background: #0B2F3A; border: none; padding: 0.35rem 0.7rem; border-radius: 8px; cursor: pointer; flex-shrink: 0; }

/* Lost mode */
.lost-banner-app { background: rgba(255,107,74,0.1); border: 1px solid #FF6B4A; border-radius: 14px; padding: 1rem; margin: 0 1.25rem 1rem; display: flex; align-items: center; gap: 0.75rem; }
.lost-pulse { width: 10px; height: 10px; border-radius: 50%; background: #FF6B4A; animation: pulse-app 2s infinite; flex-shrink: 0; }
@keyframes pulse-app { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.3); } }
.lost-banner-app strong { display: block; color: #0B2F3A; font-size: 0.88rem; }
.lost-banner-app p { font-size: 0.76rem; color: #61747A; }

.zone-btn { display: flex; align-items: center; gap: 0.65rem; padding: 0.85rem; border: 1.5px solid #e8e2d5; border-radius: 14px; margin: 0 1.25rem 0.65rem; background: #fff; cursor: pointer; width: calc(100% - 2.5rem); text-align: left; font-family: inherit; transition: border-color 0.2s; }
.zone-btn:hover { border-color: #FF6B4A; }
.zone-btn .zone-icon { font-size: 1.2rem; flex-shrink: 0; }
.zone-btn strong { display: block; color: #0B2F3A; font-size: 0.88rem; }
.zone-btn span { font-size: 0.76rem; color: #61747A; }

.lost-active-map { margin: 0 1.25rem 1rem; background: #fff; border: 1px solid #f0ebe0; border-radius: 16px; overflow: hidden; }
.lost-active-map svg { width: 100%; height: auto; display: block; }
.lost-info-row { display: flex; justify-content: space-between; padding: 0.5rem 1rem; border-bottom: 1px solid #f0ebe0; font-size: 0.82rem; }
.lost-info-row:last-child { border-bottom: none; }
.lost-info-row strong { color: #0B2F3A; }
.lost-info-row .muted { color: #61747A; }

.sighting-form { margin: 0 1.25rem 1rem; }
.sighting-form textarea { width: 100%; padding: 0.75rem; border: 1.5px solid #e8e2d5; border-radius: 12px; font-family: inherit; font-size: 0.88rem; resize: none; min-height: 70px; margin-bottom: 0.65rem; }
.sighting-form textarea:focus { outline: none; border-color: #46D7CF; }
.sighting-form .checkbox { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.65rem; }
.sighting-form .checkbox label { font-size: 0.8rem; color: #61747A; }
.sighting-form .submit-btn { width: 100%; background: #FF6B4A; color: #fff; border: none; padding: 0.75rem; border-radius: 12px; font-weight: 700; font-size: 0.92rem; cursor: pointer; }

.sighting-item-app { padding: 0.75rem; border: 1px solid #f0ebe0; border-radius: 12px; margin-bottom: 0.5rem; }
.sighting-item-app .header { display: flex; gap: 0.4rem; align-items: center; margin-bottom: 0.3rem; flex-wrap: wrap; }
.sighting-item-app .zone { font-size: 0.8rem; color: #0B2F3A; font-weight: 600; }
.sighting-item-app .time { font-size: 0.72rem; color: #61747A; }
.sighting-item-app p { font-size: 0.82rem; color: #61747A; }

/* Profile */
.profile-section { padding: 1.5rem 1.25rem; }
.profile-pet-header { text-align: center; margin-bottom: 1.5rem; }
.profile-pet-header img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; border: 3px solid rgba(255,255,255,0.92); box-shadow: 0 4px 14px rgba(7,47,58,0.15); margin: 0 auto 0.65rem; }
.profile-pet-header .emoji { width: 88px; height: 88px; border-radius: 50%; background: rgba(70,215,207,0.1); display: flex; align-items: center; justify-content: center; font-size: 2.8rem; margin: 0 auto 0.65rem; }
.profile-pet-header h2 { font-size: 1.4rem; margin-bottom: 0.2rem; }
.profile-pet-header p { font-size: 0.85rem; color: #61747A; }

.profile-detail-row { display: flex; justify-content: space-between; padding: 0.65rem 0; border-bottom: 1px solid #f0ebe0; font-size: 0.88rem; }
.profile-detail-row span { color: #61747A; }
.profile-detail-row strong { color: #0B2F3A; }

.profile-action { display: flex; align-items: center; gap: 0.75rem; padding: 0.85rem 1.15rem; border: 1px solid #f0ebe0; border-radius: 14px; margin: 0 1.25rem 0.65rem; background: #fff; cursor: pointer; width: calc(100% - 2.5rem); font-family: inherit; text-align: left; transition: border-color 0.2s; }
.profile-action:hover { border-color: #46D7CF; }
.profile-action .icon { font-size: 1.2rem; flex-shrink: 0; }
.profile-action strong { color: #0B2F3A; font-size: 0.88rem; flex: 1; }
.profile-action .arrow { color: #61747A; }

/* Buttons */
.app-btn { display: inline-block; background: #FF6B4A; color: #fff; padding: 0.75rem 1.75rem; border-radius: 12px; font-weight: 700; font-size: 0.92rem; border: none; cursor: pointer; text-decoration: none; text-align: center; }
.app-btn:hover { background: #ff8a6f; }
.app-btn.secondary { background: transparent; color: #0B2F3A; border: 1.5px solid #0B2F3A; }
.app-btn.aqua { background: #46D7CF; color: #0B2F3A; }
.app-btn.block { display: block; width: 100%; }

/* Back button */
.back-btn { display: flex; align-items: center; gap: 0.4rem; background: none; border: none; font-size: 0.88rem; font-weight: 600; color: #0B2F3A; cursor: pointer; padding: 0.5rem 1.25rem; font-family: inherit; }

/* Travel folder */
.travel-doc { display: flex; align-items: center; gap: 0.75rem; padding: 0.85rem 1.15rem; border: 1px solid #f0ebe0; border-radius: 14px; margin: 0 1.25rem 0.65rem; background: #fff; }
.travel-doc .icon { font-size: 1.4rem; flex-shrink: 0; }
.travel-doc .info { flex: 1; }
.travel-doc strong { display: block; color: #0B2F3A; font-size: 0.88rem; }
.travel-doc span { font-size: 0.76rem; color: #61747A; }

/* Vaccination record */
.vax-record { background: #fff; border: 1px solid #f0ebe0; border-radius: 16px; padding: 1rem 1.15rem; margin: 0 1.25rem 0.75rem; }
.vax-record .header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.65rem; }
.vax-record h4 { font-size: 0.95rem; }
.vax-record .row { display: flex; justify-content: space-between; padding: 0.4rem 0; font-size: 0.82rem; border-bottom: 1px solid #f5f2ea; }
.vax-record .row:last-child { border-bottom: none; }
.vax-record .row span { color: #61747A; }
.vax-record .row strong { color: #0B2F3A; }

/* Settings */
.settings-section { padding: 1rem 1.25rem; }
.setting-row { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 0; border-bottom: 1px solid #f0ebe0; }
.setting-row span { font-size: 0.9rem; color: #0B2F3A; font-weight: 600; }
.setting-row .val { font-size: 0.82rem; color: #61747A; }
.toggle { width: 44px; height: 26px; background: #e8e2d5; border-radius: 100px; position: relative; cursor: pointer; transition: background 0.2s; }
.toggle.on { background: #46D7CF; }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: #fff; border-radius: 50%; transition: transform 0.2s; }
.toggle.on::after { transform: translateX(18px); }

/* Responsive */
@media (max-width: 440px) {
  body { padding: 0; background: #FFFDF8; }
  .phone-frame { border-radius: 0; box-shadow: none; width: 100%; height: 100vh; max-height: 100vh; border: none; }
  .phone-notch { display: none; }
  .status-bar { display: none; }
}