/* ===========================================================================
   Paw Health Pro — Stylesheet
   Mobile-first, warm palette. Custom CSS3 only.
   =========================================================================== */

/* Self-hosted Nunito (headings) */
@font-face {
    font-family: 'Nunito';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('/assets/fonts/nunito.woff2') format('woff2');
}

:root {
    --primary: #E8734A;
    --primary-dark: #d5612f;
    --secondary: #4A90A4;
    --secondary-dark: #3b7585;
    --accent: #F5C842;
    --bg: #FAFAF8;
    --surface: #ffffff;
    --text: #2C2C2C;
    --muted: #6b6b6b;
    --success: #5BAD6F;
    --warning: #F5A623;
    --error: #D0021B;
    --border: #ece7e0;
    --radius: 14px;
    --radius-sm: 9px;
    --shadow: 0 2px 14px rgba(44, 44, 44, 0.07);
    --shadow-lg: 0 12px 40px rgba(44, 44, 44, 0.12);
    --font-head: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --maxw: 1140px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .5em; font-weight: 800; }

a { color: var(--secondary); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 800px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.text-primary { color: var(--primary); }

/* ---------------- Buttons ---------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    font-family: var(--font-head); font-weight: 700; font-size: 1rem;
    padding: .75rem 1.5rem; border-radius: var(--radius-sm);
    border: 2px solid transparent; cursor: pointer; transition: all .18s ease;
    text-decoration: none; line-height: 1.1;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-secondary { background: var(--secondary); color: #fff; }
.btn-secondary:hover { background: var(--secondary-dark); color: #fff; }
.btn-outline { background: transparent; border-color: var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-danger { background: var(--error); color: #fff; }
.btn-danger:hover { background: #a90217; color: #fff; }
.btn-danger-outline { border-color: var(--error); color: var(--error); background: transparent; }
.btn-danger-outline:hover { background: var(--error); color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-on-dark { background: #fff; color: var(--primary); }
.btn-on-dark:hover { background: #fff5ef; color: var(--primary-dark); }
.btn-lg { padding: 1rem 2rem; font-size: 1.1rem; }
.btn-sm { padding: .5rem 1rem; font-size: .9rem; }
.btn-block { display: flex; width: 100%; }

/* ---------------- Site header / footer ---------------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--font-head); font-weight: 800; font-size: 1.2rem; color: var(--text); }
.logo:hover { text-decoration: none; }
.logo-mark { flex: none; }
.site-nav { display: flex; align-items: center; gap: 1.4rem; }
.site-nav a { color: var(--text); font-weight: 600; }
.site-nav a.btn { color: #fff; }
.site-nav a.btn-outline { color: var(--primary); }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; width: 40px; height: 40px; flex-direction: column; gap: 5px; justify-content: center; align-items: center; }
.nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: .2s; }

.site-footer { background: #2b2622; color: #d9d2c9; margin-top: 64px; padding: 48px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; padding-bottom: 32px; }
.site-footer h4 { color: #fff; margin-bottom: .8rem; font-size: 1rem; }
.site-footer a { display: block; color: #c9c1b7; margin-bottom: .4rem; }
.site-footer a:hover { color: #fff; }
.footer-brand p { color: #b3aa9f; }
.logo-light { color: #fff; }
.footer-bottom { border-top: 1px solid #443d36; padding: 18px 0; font-size: .85rem; color: #a89e93; }

/* ---------------- Flash ---------------- */
.flash-wrap { margin: 16px auto; }
.flash { padding: .85rem 1.1rem; border-radius: var(--radius-sm); margin-bottom: .6rem; font-weight: 600; }
.flash-success { background: #e8f6ec; color: #2f7d44; border: 1px solid #bfe6c9; }
.flash-error { background: #fdeaea; color: var(--error); border: 1px solid #f3c2c2; }

/* ---------------- Hero ---------------- */
.hero { background: linear-gradient(160deg, #fff 0%, #fdf1ea 100%); padding: 56px 0 64px; }
.hero-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.eyebrow { display: inline-block; background: #fff; color: var(--primary); border: 1px solid #f3d3c4; padding: .35rem .85rem; border-radius: 999px; font-weight: 700; font-size: .82rem; margin-bottom: 1rem; }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); }
.hero-lead { font-size: 1.18rem; color: #574f49; max-width: 30rem; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; margin: 1.6rem 0 .8rem; }
.hero-note { color: var(--muted); font-size: .9rem; }
.hero-art { position: relative; display: flex; justify-content: center; }
.hero-blob { position: absolute; inset: 0; background: radial-gradient(circle at 70% 30%, #f7c9b6, transparent 60%); filter: blur(10px); z-index: 0; }
.hero-card { position: relative; z-index: 1; background: #fff; border-radius: 20px; box-shadow: var(--shadow-lg); padding: 22px; display: flex; gap: 16px; align-items: center; max-width: 320px; }
.hero-card-photo { width: 84px; height: 84px; border-radius: 16px; background: #fdeee6; display: grid; place-items: center; font-size: 2.6rem; }
.hero-card-body strong { display: block; font-family: var(--font-head); font-size: 1.15rem; }
.hero-card-body span { color: var(--muted); font-size: .9rem; }
.hero-pills { display: flex; gap: .4rem; margin-top: .5rem; flex-wrap: wrap; }
.hero-pills em { font-style: normal; background: #eef6f8; color: var(--secondary); font-size: .72rem; font-weight: 700; padding: .25rem .5rem; border-radius: 6px; }

/* ---------------- Sections ---------------- */
.section { padding: 60px 0; }
.section-alt { background: #fff; }
.section-title { text-align: center; max-width: 40rem; margin: 0 auto 40px; }
.section-title h1, .section-title h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); }

.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.info-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.info-icon { font-size: 2rem; margin-bottom: .6rem; }
.info-card h3 { font-size: 1.2rem; }

.steps-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step { text-align: center; padding: 18px; }
.step-num { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--primary); color: #fff; font-family: var(--font-head); font-weight: 800; font-size: 1.3rem; margin-bottom: .8rem; }

.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; transition: transform .18s, box-shadow .18s; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature-icon { font-size: 1.8rem; margin-bottom: .5rem; }
.feature h3 { font-size: 1.1rem; }

/* ---------------- Pricing ---------------- */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: stretch; }
.price-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px 26px; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.price-card.is-popular { border: 2px solid var(--primary); box-shadow: var(--shadow-lg); transform: translateY(-6px); }
.popular-badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--primary); color: #fff; font-size: .78rem; font-weight: 700; padding: .3rem .9rem; border-radius: 999px; }
.price-card h3 { font-size: 1.4rem; }
.price { font-size: 1rem; color: var(--muted); margin: .3rem 0; }
.price span { font-family: var(--font-head); font-size: 2.4rem; font-weight: 800; color: var(--text); }
.price-features { list-style: none; padding: 0; margin: 1.2rem 0; flex: 1; }
.price-features li { padding: .45rem 0 .45rem 1.7rem; position: relative; border-bottom: 1px dashed var(--border); }
.price-features li::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 800; }

/* Comparison table */
.compare-wrap { margin-top: 64px; }
.compare-title { text-align: center; margin-bottom: 24px; }
.table-scroll { overflow-x: auto; }
.compare-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); min-width: 560px; }
.compare-table th, .compare-table td { padding: 14px 16px; text-align: center; border-bottom: 1px solid var(--border); }
.compare-table th { background: var(--secondary); color: #fff; font-family: var(--font-head); }
.compare-table td:first-child, .compare-table th:first-child { text-align: left; font-weight: 600; }
.compare-table tbody tr:nth-child(even) { background: #faf7f3; }

.faq { max-width: 760px; margin: 56px auto 0; }
.faq h2 { text-align: center; margin-bottom: 20px; }
.faq details { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 18px; margin-bottom: 12px; }
.faq summary { cursor: pointer; font-weight: 700; font-family: var(--font-head); }
.faq p { margin: .7rem 0 0; color: var(--muted); }

/* Testimonials */
.testimonial { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; margin: 0; box-shadow: var(--shadow); }
.testimonial p { font-size: 1.05rem; font-style: italic; }
.testimonial footer { color: var(--muted); font-weight: 700; margin-top: .8rem; }

/* CTA banner */
.cta-banner { background: linear-gradient(135deg, var(--primary), #d2592b); color: #fff; padding: 56px 0; text-align: center; }
.cta-inner h2 { color: #fff; font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
.cta-inner p { font-size: 1.1rem; opacity: .95; margin-bottom: 1.5rem; }

/* ---------------- Legal ---------------- */
.legal h1 { font-size: 2.2rem; }
.legal h2 { font-size: 1.3rem; margin-top: 2rem; color: var(--secondary); }
.legal h3 { font-size: 1.05rem; margin-top: 1.4rem; }
.legal p, .legal li { color: #444; }
.legal ul { padding-left: 1.3rem; }
.legal-links { margin-top: 2.5rem; font-weight: 700; }

/* ===========================================================================
   Auth pages
   =========================================================================== */
.auth-body { background: linear-gradient(160deg, #fdf1ea, #eef6f8); min-height: 100vh; display: flex; }
.auth-shell { margin: auto; width: 100%; max-width: 460px; padding: 32px 20px; }
.auth-card { background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); padding: 34px 30px; }
.auth-logo { justify-content: center; margin-bottom: 1.2rem; font-size: 1.3rem; }
.auth-title { text-align: center; font-size: 1.6rem; margin-bottom: .3rem; }
.auth-sub { text-align: center; color: var(--muted); margin-bottom: 1.6rem; }
.auth-links { text-align: center; margin-top: 1.2rem; display: flex; flex-direction: column; gap: .5rem; font-size: .95rem; }
.auth-foot { text-align: center; margin-top: 1.2rem; color: var(--muted); font-size: .85rem; }
.auth-foot a { color: var(--secondary); }
.error-card { text-align: center; }
.error-code { font-size: 4rem; color: var(--primary); margin-bottom: 0; }

/* ---------------- Forms ---------------- */
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 700; margin-bottom: .4rem; font-size: .92rem; }
.field input, .field select, .field textarea {
    width: 100%; padding: .7rem .85rem; border: 1px solid #d8d2ca; border-radius: var(--radius-sm);
    font-size: 1rem; font-family: var(--font-body); background: #fff; color: var(--text);
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(232,115,74,.15); }
.field-hint { display: block; color: var(--muted); font-size: .8rem; margin-top: .3rem; }
.field-error { display: block; color: var(--error); font-size: .85rem; margin-top: .35rem; font-weight: 600; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-check .checkbox { display: flex; gap: .6rem; align-items: flex-start; font-weight: 500; }
.field-check input { width: auto; margin-top: .25rem; }
.field-check-inline { display: flex; align-items: center; }

/* Plan picker */
.plan-picker { border: none; padding: 0; margin: 0 0 1.4rem; }
.plan-picker legend { font-weight: 700; margin-bottom: .6rem; font-family: var(--font-head); }
.plan-option { display: flex; align-items: center; gap: .8rem; border: 2px solid var(--border); border-radius: var(--radius-sm); padding: .8rem 1rem; margin-bottom: .6rem; cursor: pointer; transition: .15s; }
.plan-option:hover { border-color: #f0c4b1; }
.plan-option.is-selected, .plan-option:has(input:checked) { border-color: var(--primary); background: #fdf3ee; }
.plan-option input { accent-color: var(--primary); }
.plan-option-body { display: grid; grid-template-columns: 1fr auto; gap: .15rem .8rem; width: 100%; align-items: center; }
.plan-option-name { font-weight: 800; font-family: var(--font-head); }
.plan-option-price { font-weight: 800; color: var(--primary); }
.plan-option-meta { grid-column: 1 / -1; color: var(--muted); font-size: .85rem; }
.pill { font-style: normal; background: var(--accent); color: #5a4500; font-size: .68rem; padding: .1rem .45rem; border-radius: 5px; font-weight: 800; vertical-align: middle; }

/* ===========================================================================
   App (authenticated)
   =========================================================================== */
.app-body { background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
.app-header { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
.app-header-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; height: 64px; display: flex; align-items: center; justify-content: space-between; }
.app-nav { display: flex; align-items: center; gap: 1.2rem; }
.app-nav a { color: var(--text); font-weight: 600; padding: .3rem 0; border-bottom: 2px solid transparent; }
.app-nav a.is-active { color: var(--primary); border-bottom-color: var(--primary); }
.app-nav a:hover { text-decoration: none; color: var(--primary); }
.app-user { color: var(--muted); font-weight: 700; }
.app-main { flex: 1; padding: 32px 0 48px; }
.app-container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.app-footer { background: #fff; border-top: 1px solid var(--border); padding: 18px 0; color: var(--muted); font-size: .88rem; }
.app-footer .app-container { display: flex; }

.page-head { margin-bottom: 24px; }
.page-head h1 { font-size: 1.8rem; }
.page-head-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.back-link { display: inline-block; margin-bottom: .5rem; font-weight: 600; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card-title { font-size: 1.15rem; margin-bottom: 1rem; }
.form-card { max-width: 720px; }

/* Banners */
.banner { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 20px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.banner-warning { background: #fff4e2; border: 1px solid #f6d99f; color: #8a5a00; }
.banner-error { background: #fdeaea; border: 1px solid #f3c2c2; color: var(--error); }
.banner-info { background: #eef6f8; border: 1px solid #c3dde4; color: var(--secondary-dark); }
.banner .btn { margin-left: auto; }

/* Dashboard */
.dash-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-bottom: 32px; }
.badge { display: inline-block; padding: .25rem .7rem; border-radius: 999px; font-size: .8rem; font-weight: 800; font-family: var(--font-head); }
.badge-primary { background: #fdebe2; color: var(--primary); }
.sub-tier { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; }
.sub-status { font-weight: 700; text-transform: capitalize; }
.status-trialing { color: var(--secondary); }
.status-active { color: var(--success); }
.status-past_due { color: var(--warning); }
.status-canceled, .status-none { color: var(--error); }
.trial-countdown { background: #eef6f8; border-radius: var(--radius-sm); padding: 18px; text-align: center; margin-bottom: 1rem; }
.trial-number { font-family: var(--font-head); font-size: 2.6rem; font-weight: 800; color: var(--secondary); line-height: 1; }
.trial-label { font-weight: 700; color: var(--secondary-dark); }
.sub-actions { margin-top: .5rem; }
.stat-widget { text-align: center; }
.stat-big { font-family: var(--font-head); font-size: 2.6rem; font-weight: 800; color: var(--primary); }
.stat-big span { color: var(--muted); font-size: 1.4rem; }
.upgrade-hint { color: var(--warning); font-weight: 600; font-size: .9rem; }

.section-block { margin-top: 8px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.section-head h2 { font-size: 1.4rem; margin: 0; }

/* Dog grid + cards */
.dog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.dog-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.dog-photo { aspect-ratio: 1 / 1; background: #fdeee6; }
.dog-photo img { width: 100%; height: 100%; object-fit: cover; }
.dog-photo-placeholder { width: 100%; height: 100%; display: grid; place-items: center; font-size: 3rem; }
.dog-card-body { padding: 16px 18px 8px; flex: 1; }
.dog-card-body h3 { font-size: 1.25rem; margin-bottom: .1rem; }
.dog-breed { color: var(--muted); margin: 0 0 .8rem; }
.dog-meta { list-style: none; padding: 0; margin: 0; }
.dog-meta li { display: flex; justify-content: space-between; padding: .3rem 0; border-top: 1px dashed var(--border); font-size: .92rem; }
.dog-meta li span { color: var(--muted); }
.dog-card-actions { display: flex; gap: 10px; padding: 14px 18px 18px; }
.dog-card-actions form { margin: 0; }

/* Empty state */
.empty-state { text-align: center; padding: 48px 24px; }
.empty-emoji { font-size: 3rem; }

/* Photo upload */
.photo-upload { display: flex; gap: 20px; align-items: center; margin-bottom: 1.4rem; flex-wrap: wrap; }
.photo-preview { width: 120px; height: 120px; border-radius: var(--radius-sm); background: #fdeee6; display: grid; place-items: center; font-size: 2.4rem; overflow: hidden; flex: none; }
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.form-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 1.4rem; }

/* Tabs */
.tabs { display: flex; gap: 6px; border-bottom: 2px solid var(--border); margin-bottom: 24px; flex-wrap: wrap; }
.tab { padding: .7rem 1.1rem; font-weight: 700; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -2px; }
.tab.is-active { color: var(--primary); border-bottom-color: var(--primary); }
.tab:hover { text-decoration: none; color: var(--primary); }

.sub-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 18px; margin-bottom: 1.4rem; }
.sub-detail-grid strong { display: block; font-size: 1.1rem; margin-top: .2rem; }
.sub-manage-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 1rem 0; }
.sub-manage-actions form { margin: 0; }

/* Payment */
.payment-card { max-width: 520px; }
.payment-summary { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; padding-bottom: 1rem; margin-bottom: 1.2rem; border-bottom: 1px solid var(--border); }
.payment-skip { text-align: center; margin-top: 1rem; font-size: .9rem; }
#payment-element { margin-bottom: 1.2rem; }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===========================================================================
   Responsive
   =========================================================================== */
@media (max-width: 880px) {
    .nav-toggle { display: flex; }
    .site-nav, .app-nav { position: absolute; top: 64px; right: 0; left: 0; background: #fff; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 20px 16px; border-bottom: 1px solid var(--border); box-shadow: var(--shadow); display: none; }
    .site-nav.open, .app-nav.open { display: flex; }
    .site-nav a, .app-nav a { padding: .8rem 0; border-bottom: 1px solid var(--border); }
    .site-nav a.btn { margin-top: .6rem; }
    .hero-inner { grid-template-columns: 1fr; }
    .hero-art { order: -1; }
    .cards-3, .steps-3, .features-grid, .pricing-grid { grid-template-columns: 1fr; }
    .price-card.is-popular { transform: none; }
    .dash-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
    .field-row { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .form-actions { flex-direction: column-reverse; }
    .form-actions .btn { width: 100%; }
    .app-user { display: none; }
}



/* ===========================================================================
   Phase 2 — AI Chat, Reminders, Dashboard widgets
   =========================================================================== */

/* --- Dashboard: reminders + AI widgets ----------------------------------- */
.widget-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.widget-link { font-size: .85rem; font-weight: 700; white-space: nowrap; }
.widget-empty { text-align: center; padding: 10px 0 4px; }
.dash-reminder-list { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.dash-reminder { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: baseline;
    padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; }
.dash-reminder.is-overdue { border-color: #f3c2c2; background: #fdf4f4; }
.dash-reminder-type { grid-row: 1; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em;
    color: var(--secondary-dark); background: #eef6f8; padding: .15rem .5rem; border-radius: 999px; }
.dash-reminder-title { grid-row: 1; font-weight: 700; }
.dash-reminder-meta { grid-column: 1 / -1; font-size: .82rem; color: var(--muted); }
.dash-reminder-overdue { color: var(--error); font-weight: 800; margin-left: 6px; }
.ai-cta-widget { text-align: center; }
.ai-cta-emoji { font-size: 2.2rem; margin-bottom: 6px; }

/* --- Chat ----------------------------------------------------------------- */
.chat-quota { margin-bottom: 16px; font-size: .92rem; color: var(--muted); }
.chat-quota .quota-count { font-weight: 800; color: var(--text); }
.chat-quota .upgrade-hint { margin-left: 8px; font-weight: 700; }
.chat-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.chat-toolbar { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.chat-dog-label { font-weight: 700; font-size: .9rem; }
.chat-dog-select { padding: .4rem .6rem; border: 1px solid var(--border); border-radius: var(--radius-sm); font: inherit; }
.chat-clear-form { margin-left: auto; }
.chat-thread { display: flex; flex-direction: column; gap: 14px; padding: 20px 18px; min-height: 320px; max-height: 56vh; overflow-y: auto; }
.chat-empty { text-align: center; margin: auto; max-width: 460px; }
.chat-empty-emoji { font-size: 2.6rem; }
.chat-suggestions { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.chat-suggestion { text-align: left; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: #fff; cursor: pointer; font: inherit; color: var(--text); transition: border-color .15s, background .15s; }
.chat-suggestion:hover { border-color: var(--primary); background: #fdf3ee; }
.chat-msg { display: flex; max-width: 85%; }
.chat-msg-user { align-self: flex-end; justify-content: flex-end; }
.chat-msg-ai, .chat-msg-error { align-self: flex-start; }
.chat-bubble { padding: 11px 15px; border-radius: 16px; line-height: 1.5; word-wrap: break-word; }
.chat-msg-user .chat-bubble { background: var(--primary); color: #fff; border-bottom-right-radius: 5px; }
.chat-msg-ai .chat-bubble { background: #f1ede7; color: var(--text); border-bottom-left-radius: 5px; }
.chat-bubble-error { background: #fdeaea; color: var(--error); border: 1px solid #f3c2c2; }
.chat-typing { padding: 0 18px 6px; }
.chat-bubble-typing { display: inline-flex; gap: 4px; align-items: center; background: #f1ede7; padding: 12px 16px; border-radius: 16px; }
.chat-bubble-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); opacity: .5; animation: chat-blink 1.2s infinite both; }
.chat-bubble-typing span:nth-child(2) { animation-delay: .2s; }
.chat-bubble-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes chat-blink { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.chat-form { display: flex; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--border); align-items: flex-end; }
.chat-form textarea { flex: 1; resize: none; padding: .7rem .8rem; border: 1px solid var(--border); border-radius: var(--radius-sm);
    font: inherit; line-height: 1.4; max-height: 160px; }
.chat-form textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(232,115,74,.15); }
.chat-disclaimer { padding: 0 18px 14px; }

/* --- Reminders ------------------------------------------------------------ */
.reminder-filters { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 20px; }
.reminder-filters .field { margin-bottom: 0; flex: 1 1 150px; }
.reminder-filter-clear { flex: 0 0 auto; }
.reminder-list { display: flex; flex-direction: column; gap: 14px; }
.reminder-item { display: flex; gap: 14px; align-items: flex-start; padding: 16px; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); transition: opacity .2s; }
.reminder-item.is-overdue { border-left: 4px solid var(--error); }
.reminder-item.is-done { opacity: .62; }
.reminder-item.is-done .reminder-title { text-decoration: line-through; }
.reminder-item.is-saving { opacity: .5; pointer-events: none; }
.reminder-check { flex: 0 0 auto; width: 28px; height: 28px; margin-top: 2px; border: 2px solid var(--border);
    border-radius: 8px; background: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-weight: 800; color: var(--success); transition: border-color .15s, background .15s; }
.reminder-check:hover { border-color: var(--success); }
.reminder-item.is-done .reminder-check { background: var(--success); border-color: var(--success); color: #fff; }
.reminder-body { flex: 1; min-width: 0; }
.reminder-title-row { display: flex; gap: 8px; align-items: center; margin-bottom: 4px; flex-wrap: wrap; }
.reminder-type-tag { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em;
    color: var(--secondary-dark); background: #eef6f8; padding: .15rem .55rem; border-radius: 999px; }
.reminder-overdue-tag { font-size: .72rem; font-weight: 800; text-transform: uppercase; color: #fff; background: var(--error);
    padding: .15rem .55rem; border-radius: 999px; }
.reminder-title { margin: 0 0 6px; font-size: 1.08rem; }
.reminder-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: .86rem; color: var(--muted); }
.reminder-notes { margin: 8px 0 0; font-size: .9rem; }
.reminder-actions { flex: 0 0 auto; display: flex; gap: 8px; align-items: center; }

@media (max-width: 640px) {
    .reminder-item { flex-wrap: wrap; }
    .reminder-actions { width: 100%; justify-content: flex-end; margin-top: 8px; }
    .chat-msg { max-width: 92%; }
    .chat-thread { max-height: 60vh; }
}



/* ============================================================
   Phase 4 — Reports, Milestones, Care Tips, Sharing
   ============================================================ */

/* ---- Page head ---- */
.page-head { margin-bottom: 24px; }
.page-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.back-link { display: inline-block; font-weight: 700; font-size: .9rem; margin-bottom: 10px; }

/* ---- Empty state ---- */
.empty-state { text-align: center; padding: 56px 24px; }
.empty-emoji { font-size: 2.6rem; margin-bottom: 10px; }

/* ---- Tags ---- */
.tag { display: inline-block; padding: .2rem .6rem; border-radius: 999px; font-size: .74rem; font-weight: 800;
    font-family: var(--font-head); background: #eef0f2; color: var(--muted); text-transform: capitalize; }
.tag-success { background: #e7f5ec; color: var(--success); }

/* ---- Report grid / cards ---- */
.report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.report-card { display: flex; gap: 16px; align-items: center; }
.report-card-body { flex: 1; min-width: 0; }
.report-card-month { font-size: 1.1rem; margin: 0 0 4px; }
.report-card-summary { font-size: .9rem; color: var(--muted); margin: 6px 0 10px; }
.report-card-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.report-card-link { font-weight: 700; font-size: .9rem; }
.report-card-image img { width: 100%; border-radius: var(--radius-sm); border: 1px solid var(--border); }

/* ---- Wellness gauge ---- */
.report-card-gauge { flex: none; width: 76px; height: 76px; border-radius: 50%; display: flex; flex-direction: column;
    align-items: center; justify-content: center; color: #fff; line-height: 1; }
.report-gauge-big { width: 130px; height: 130px; border-radius: 50%; display: flex; flex-direction: column;
    align-items: center; justify-content: center; color: #fff; margin: 0 auto 10px; line-height: 1; }
.report-gauge-score { font-family: var(--font-head); font-weight: 800; font-size: 1.7rem; }
.report-gauge-big .report-gauge-score { font-size: 3rem; }
.report-gauge-out { font-size: .75rem; opacity: .9; }
.report-gauge-label { text-align: center; font-weight: 700; color: var(--muted); margin: 0; }
.report-gauge-low { background: var(--error); }
.report-gauge-mid { background: var(--warning); }
.report-gauge-high { background: var(--success); }
.report-gauge-card { text-align: center; }

/* ---- Report detail ---- */
.report-show-grid { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: start; }
.report-show-side { display: flex; flex-direction: column; gap: 20px; }
.report-body-card { padding: 28px; }
.report-html { font-size: .96rem; line-height: 1.7; }
.report-html h2, .report-html h3, .report-html h4 { color: var(--primary); margin-top: 1.4em; }
.report-html ul { padding-left: 1.2em; }
.report-html li { margin-bottom: .35em; }
.report-generated { font-size: .82rem; color: var(--muted); margin-top: 18px; }

/* ---- Milestone grid / cards ---- */
.milestone-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.milestone-card { padding: 0; overflow: hidden; }
.milestone-card-image { display: block; width: 100%; height: auto; }
.milestone-card-placeholder { display: flex; align-items: center; justify-content: center; height: 200px;
    background: #fbf2ec; font-size: 2.4rem; }
.milestone-card-body { padding: 18px; }
.milestone-tag { display: inline-block; padding: .2rem .6rem; border-radius: 999px; font-size: .74rem; font-weight: 800;
    font-family: var(--font-head); background: #fdebe2; color: var(--primary); margin-bottom: 8px; }
.milestone-card-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

/* ---- Care tip dashboard widget ---- */
.care-tip-widget { background: linear-gradient(135deg, #fff7f2, #fffdf5); border: 1px solid #f6e3d6; }
.care-tip-cat { display: inline-block; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em;
    color: var(--primary); background: #fdebe2; padding: .15rem .55rem; border-radius: 999px; margin-bottom: 8px; }
.care-tip-title { font-size: 1.05rem; margin: 0 0 6px; }
.care-tip-body { font-size: .92rem; color: var(--text); margin: 0; line-height: 1.6; }

/* ---- Account: Sharing tab ---- */
.badge-preview { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 8px; }
.badge-preview img { width: 150px; height: auto; }
.embed-code { width: 100%; min-height: 84px; font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
    font-size: .82rem; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fafafa;
    color: var(--text); resize: vertical; }
.share-link-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.share-link-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px;
    border: 1px solid var(--border); border-radius: var(--radius-sm); flex-wrap: wrap; }
.share-link-info { min-width: 0; }
.share-link-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ============================================================
   Public share page (standalone — no app chrome)
   ============================================================ */
.share-public-body { background: linear-gradient(160deg, #fff3ec 0%, #fdfbf5 60%); min-height: 100vh; margin: 0;
    font-family: var(--font-body); color: var(--text); display: flex; flex-direction: column; }
.share-public { flex: 1; display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.share-public-card { width: 100%; max-width: 460px; text-align: center; padding: 32px; }
.share-public-logo { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--font-head); font-weight: 800;
    font-size: 1.15rem; color: var(--primary); margin-bottom: 18px; }
.share-public-image img { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); margin-bottom: 18px; }
.share-breed { color: var(--muted); margin: 0 0 18px; }
.share-public-score { width: 120px; height: 120px; border-radius: 50%; display: flex; flex-direction: column;
    align-items: center; justify-content: center; color: #fff; margin: 0 auto 8px; line-height: 1; }
.share-score-num { font-family: var(--font-head); font-weight: 800; font-size: 2.6rem; }
.share-score-out { font-size: .78rem; opacity: .9; }
.share-score-label { font-weight: 700; color: var(--muted); margin: 0 0 18px; }
.share-gauge-low { background: var(--error); }
.share-gauge-mid { background: var(--warning); }
.share-gauge-high { background: var(--success); }
.share-public-tagline { font-size: 1rem; margin: 0 0 20px; }
.share-public-cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 22px; }
.share-public-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.share-action { display: inline-flex; align-items: center; gap: 6px; padding: .5rem 1rem; border-radius: var(--radius-sm);
    font-weight: 700; font-size: .9rem; background: #f1f1f1; color: var(--text); border: none; cursor: pointer; }
.share-action:hover { background: #e7e7e7; text-decoration: none; }
.share-public-foot { text-align: center; padding: 18px; font-size: .82rem; color: var(--muted); }

@media (max-width: 768px) {
    .report-show-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .report-card { flex-direction: column; text-align: center; }
    .page-head-row { flex-direction: column; }
}



/* ============================================================
   Support / Contact page
   ============================================================ */
.support-intro { margin-bottom: 2rem; }
.support-intro-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; }
.support-intro-card { background: #fff; padding: 1.5rem; border-radius: var(--radius); border: 1px solid var(--border);
    text-align: center; transition: all .2s; }
.support-intro-card:hover { border-color: var(--primary); box-shadow: 0 4px 12px rgba(232, 115, 74, 0.1); }
.support-intro-icon { font-size: 2.5rem; margin-bottom: .75rem; }
.support-intro-card h3 { font-size: 1.15rem; margin: 0 0 .5rem; font-weight: 700; color: var(--text); }
.support-intro-card p { margin: 0; color: var(--muted); font-size: .9rem; }

.support-form-card { max-width: 720px; margin: 0 auto 2.5rem; }
.support-form .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.support-form .required { color: var(--error); }
.support-form textarea { resize: vertical; min-height: 120px; }
.field-hint { font-size: .85rem; color: var(--muted); margin: .35rem 0 0; }

.support-form-actions { display: flex; flex-direction: column; gap: 1rem; align-items: stretch; }
.support-form-actions .btn { width: 100%; justify-content: center; }
.support-form-note { margin: 0; font-size: .88rem; color: var(--muted); padding: 1rem; background: #f9f9f9;
    border-radius: var(--radius-sm); line-height: 1.6; }

.support-faq { max-width: 800px; margin: 0 auto 2.5rem; }
.support-faq h2 { font-size: 1.8rem; margin: 0 0 1.5rem; text-align: center; }
.support-faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.support-faq-item { background: #fff; padding: 1.25rem; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.support-faq-item h4 { margin: 0 0 .5rem; font-size: 1rem; color: var(--text); font-weight: 700; }
.support-faq-item p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.6; }
.support-faq-item a { color: var(--primary); font-weight: 600; }
.support-faq-item a:hover { text-decoration: underline; }

.support-direct-contact { max-width: 640px; margin: 0 auto 2rem; text-align: center; padding: 1.5rem;
    background: linear-gradient(135deg, #E8734A 0%, #F5C842 100%); border-radius: var(--radius); color: #fff; }
.support-direct-contact p { margin: 0; font-size: 1.05rem; }
.support-direct-contact a { color: #fff; text-decoration: underline; font-weight: 700; }
.support-direct-contact a:hover { text-decoration: none; }

@media (max-width: 768px) {
    .support-intro-grid { grid-template-columns: 1fr; }
    .support-faq-grid { grid-template-columns: 1fr; }
    .support-form .field-row { grid-template-columns: 1fr; }
}



/* ===========================================================================
   Floating Help Bot widget
   =========================================================================== */
.helpbot {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1200;
    font-family: var(--font-body);
}

/* --- Panel --- */
.helpbot-panel {
    width: 350px;
    max-width: calc(100vw - 32px);
    height: 460px;
    max-height: calc(100vh - 120px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    transition: transform .25s ease, opacity .25s ease;
}

.helpbot.is-minimised .helpbot-panel {
    transform: scale(.85) translateY(12px);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

/* --- Launcher bubble (shown when minimised) --- */
.helpbot-launcher {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: transform .2s ease, background .2s ease;
}
.helpbot-launcher:hover { background: var(--primary-dark); transform: scale(1.06); }
.helpbot-launcher-icon { font-size: 28px; line-height: 1; }
.helpbot.is-minimised .helpbot-launcher { display: flex; animation: helpbot-pop .25s ease; }

@keyframes helpbot-pop {
    from { transform: scale(.6); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

/* --- Header --- */
.helpbot-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
}
.helpbot-head-id { display: flex; align-items: center; gap: 10px; }
.helpbot-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .22);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
}
.helpbot-head strong { font-family: var(--font-head); font-size: 1rem; display: block; }
.helpbot-status { font-size: .74rem; opacity: .9; }
.helpbot-min {
    background: rgba(255, 255, 255, .18);
    border: none;
    color: #fff;
    width: 28px; height: 28px;
    border-radius: 8px;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background .2s ease;
}
.helpbot-min:hover { background: rgba(255, 255, 255, .34); }

/* --- Body / thread --- */
.helpbot-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.helpbot-tip {
    background: #fff;
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    box-shadow: var(--shadow);
    transition: opacity .3s ease;
}
.helpbot-tip.is-fading { opacity: 0; }
.helpbot-tip-label {
    display: inline-block;
    font-family: var(--font-head);
    font-weight: 800;
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--primary);
    margin-bottom: 4px;
}
.helpbot-tip-text { display: block; font-size: .86rem; color: var(--text); line-height: 1.45; }

.helpbot-thread { display: flex; flex-direction: column; gap: 10px; }

.helpbot-msg { display: flex; max-width: 100%; }
.helpbot-msg-user { justify-content: flex-end; }
.helpbot-msg-bot, .helpbot-msg-error { justify-content: flex-start; }

.helpbot-bubble {
    max-width: 82%;
    padding: 9px 12px;
    border-radius: 14px;
    font-size: .88rem;
    line-height: 1.45;
    word-wrap: break-word;
    box-shadow: var(--shadow);
    animation: helpbot-msg-in .2s ease;
}
@keyframes helpbot-msg-in {
    from { transform: translateY(6px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}
.helpbot-msg-user .helpbot-bubble {
    background: var(--primary);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.helpbot-msg-bot .helpbot-bubble {
    background: #fff;
    color: var(--text);
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
}
.helpbot-msg-error .helpbot-bubble {
    background: #fdecec;
    color: var(--error);
    border: 1px solid #f5c6c6;
}

/* Typing indicator */
.helpbot-typing .helpbot-bubble { display: flex; gap: 4px; align-items: center; }
.helpbot-typing .helpbot-bubble span {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--muted);
    display: inline-block;
    animation: helpbot-blink 1.2s infinite ease-in-out both;
}
.helpbot-typing .helpbot-bubble span:nth-child(2) { animation-delay: .2s; }
.helpbot-typing .helpbot-bubble span:nth-child(3) { animation-delay: .4s; }
@keyframes helpbot-blink {
    0%, 80%, 100% { opacity: .25; transform: scale(.85); }
    40% { opacity: 1; transform: scale(1); }
}

/* --- Input form --- */
.helpbot-form {
    display: flex;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid var(--border);
    background: var(--surface);
}
.helpbot-input {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 9px 14px;
    font-family: var(--font-body);
    font-size: .88rem;
    color: var(--text);
    outline: none;
    transition: border-color .2s ease;
}
.helpbot-input:focus { border-color: var(--primary); }
.helpbot-input:disabled { background: #f3f0ec; }
.helpbot-send {
    flex: 0 0 auto;
    width: 40px; height: 40px;
    border: none;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: background .2s ease, transform .1s ease;
}
.helpbot-send:hover:not(:disabled) { background: var(--primary-dark); }
.helpbot-send:active:not(:disabled) { transform: scale(.92); }
.helpbot-send:disabled { opacity: .55; cursor: default; }

/* --- Mobile --- */
@media (max-width: 600px) {
    .helpbot { right: 12px; bottom: 12px; }
    .helpbot-panel {
        width: calc(100vw - 24px);
        height: 70vh;
        max-height: calc(100vh - 90px);
    }
    .helpbot-launcher { width: 54px; height: 54px; }
    .helpbot-launcher-icon { font-size: 25px; }
}
