:root {
    --ink: #18222f;
    --muted: #667085;
    --line: #dfe5ec;
    --bg: #f5f7fb;
    --panel: #ffffff;
    --green: #16a673;
    --blue: #2563eb;
    --red: #dc2626;
    --amber: #f59e0b;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--ink);
    background: var(--bg);
}
a { color: var(--blue); text-decoration: none; }
.topbar {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 10;
}
.brand { display: flex; gap: 10px; align-items: center; font-weight: 800; color: var(--ink); }
.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: white;
    background: linear-gradient(135deg, #16a673, #2563eb);
}
nav { display: flex; gap: 16px; align-items: center; }
.container { width: min(1180px, calc(100% - 32px)); margin: 28px auto; }
.auth-shell { display: grid; grid-template-columns: 1.15fr .85fr; gap: 36px; align-items: center; min-height: 72vh; }
h1 { font-size: clamp(32px, 5vw, 56px); line-height: 1.02; margin: 0 0 16px; letter-spacing: 0; }
h2 { margin: 0 0 16px; font-size: 24px; }
h3 { margin: 0 0 6px; }
.lead { font-size: 18px; color: var(--muted); line-height: 1.6; }
.eyebrow { color: var(--green); font-weight: 800; text-transform: uppercase; font-size: 12px; letter-spacing: 0; }
.panel, .stat, .pet-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 22px;
    box-shadow: 0 16px 40px rgba(24,34,47,.06);
}
label { display: grid; gap: 8px; font-weight: 700; color: #334155; }
input, select, textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px 13px;
    font: inherit;
    background: #fff;
}
textarea { min-height: 96px; resize: vertical; }
.button {
    border: 0;
    background: var(--blue);
    color: #fff;
    border-radius: 8px;
    padding: 12px 16px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.button.small { padding: 8px 11px; font-size: 13px; }
.button.full { width: 100%; }
.button.ghost { color: var(--blue); background: #eaf1ff; }
.button.danger { background: var(--red); }
.muted { color: var(--muted); }
.alert { padding: 14px 16px; border-radius: 8px; margin-bottom: 18px; }
.alert.success { background: #e9fbf4; color: #08724d; }
.alert.error { background: #fff1f2; color: #be123c; }
.grid { display: grid; gap: 18px; }
.cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stat strong { display: block; font-size: 34px; }
.stat span { color: var(--muted); }
.page-title { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 24px; }
.section { margin-top: 28px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid.wide { max-width: 980px; }
.span-2 { grid-column: span 2; }
.inline-form { display: grid; grid-template-columns: 1fr 160px auto; gap: 16px; align-items: end; margin-bottom: 18px; }
.pet-card { display: grid; grid-template-columns: 140px 1fr; gap: 18px; }
.pet-card img, .profile-photo {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
    background: #edf2f7;
}
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.empty { color: var(--muted); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 13px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 13px; }
.badge { display: inline-block; padding: 5px 8px; border-radius: 999px; background: #eef2ff; color: #3730a3; font-weight: 700; font-size: 12px; }
.public-profile { display: grid; gap: 20px; }
.profile-hero {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 24px;
    align-items: center;
    padding: 28px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--line);
}
.profile-hero .profile-photo { width: 180px; height: 180px; }
.placeholder { display: grid; place-items: center; font-size: 64px; font-weight: 900; color: var(--blue); }
.lost-banner { background: var(--red); color: #fff; padding: 16px; border-radius: 8px; font-weight: 900; text-align: center; }
dl { display: grid; grid-template-columns: 150px 1fr; gap: 8px 14px; margin: 0; }
dt { color: var(--muted); font-weight: 800; }
dd { margin: 0; }
.centered { text-align: center; max-width: 680px; margin: 60px auto; }
@media (max-width: 820px) {
    .topbar { height: auto; padding: 16px; align-items: flex-start; gap: 12px; flex-direction: column; }
    nav { flex-wrap: wrap; }
    .auth-shell, .cards-2, .cards-3, .cards-5, .form-grid, .profile-hero { grid-template-columns: 1fr; }
    .span-2 { grid-column: span 1; }
    .inline-form { grid-template-columns: 1fr; }
    .page-title { align-items: flex-start; flex-direction: column; }
    .pet-card { grid-template-columns: 1fr; }
    .pet-card img, .profile-hero .profile-photo { width: 100%; height: auto; aspect-ratio: 1 / 1; }
    table { display: block; overflow-x: auto; white-space: nowrap; }
    dl { grid-template-columns: 1fr; }
}
