:root {
    --navy: #10223f;
    --navy-2: #183456;
    --gold: #c8a24a;
    --ink: #172033;
    --muted: #667085;
    --line: #d8dee8;
    --paper: #ffffff;
    --soft: #f5f7fa;
    --danger: #9f1d1d;
    --success: #1f7a4d;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--soft);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

a {
    color: var(--navy-2);
}

.site-header {
    background: var(--navy);
    color: #fff;
    padding: 18px clamp(16px, 4vw, 48px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.brand {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 20px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.nav a {
    color: #fff;
    text-decoration: none;
    padding: 7px 10px;
    border-radius: 6px;
}

.nav a:hover,
.nav a.active {
    background: rgba(255, 255, 255, 0.12);
}

.page {
    width: min(1120px, calc(100% - 32px));
    margin: 28px auto 48px;
}

.site-footer {
    border-top: 1px solid var(--line);
    color: var(--muted);
    display: flex;
    gap: 16px;
    justify-content: center;
    padding: 24px 16px;
    flex-wrap: wrap;
}

.hero,
.section,
.admin-panel {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: clamp(18px, 4vw, 36px);
    margin-bottom: 18px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
    gap: 28px;
    align-items: center;
    border-top: 4px solid var(--gold);
}

.hero img,
.dog-photo {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--line);
}

h1,
h2,
h3 {
    line-height: 1.2;
    margin: 0 0 14px;
}

h1 {
    font-size: clamp(30px, 5vw, 48px);
}

h2 {
    font-size: 24px;
}

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

.actions,
.tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.button,
button {
    appearance: none;
    border: 1px solid var(--navy);
    background: var(--navy);
    color: #fff;
    text-decoration: none;
    padding: 9px 13px;
    border-radius: 6px;
    font: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
}

.button.secondary,
button.secondary {
    background: #fff;
    color: var(--navy);
}

.button.gold {
    background: var(--gold);
    border-color: var(--gold);
    color: #111827;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
}

.meta {
    display: grid;
    gap: 6px;
    margin: 14px 0;
}

.badge {
    display: inline-flex;
    width: fit-content;
    border: 1px solid var(--gold);
    color: #59420d;
    background: #fff8df;
    border-radius: 999px;
    padding: 3px 9px;
    font-size: 14px;
}

form {
    display: grid;
    gap: 14px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

label {
    display: grid;
    gap: 5px;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 8px 10px;
    font: inherit;
    background: #fff;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

.checkbox {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-weight: 400;
}

.checkbox input {
    width: auto;
    min-height: auto;
    margin-top: 5px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

th,
td {
    text-align: left;
    padding: 10px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

th {
    background: #eef2f7;
}

.flash {
    border-radius: 6px;
    padding: 12px 14px;
    margin-bottom: 18px;
    background: #eef8f1;
    color: var(--success);
    border: 1px solid #b7e2c8;
}

.flash.error {
    background: #fff1f1;
    color: var(--danger);
    border-color: #f0b8b8;
}

.pedigree,
.pedigree ul {
    list-style: none;
    padding-left: 18px;
}

.pedigree li {
    margin: 8px 0;
    border-left: 2px solid var(--gold);
    padding-left: 10px;
}

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

.admin-page {
    width: min(1240px, calc(100% - 32px));
}

.admin-header {
    background: var(--navy-2);
}

@media (max-width: 760px) {
    .hero {
        grid-template-columns: 1fr;
    }

    .site-header {
        align-items: flex-start;
    }

    th,
    td {
        padding: 8px 6px;
        font-size: 14px;
    }
}

