* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 32px 18px;
    background: #f3f5ef;
    color: #293e38;
    font-family: "Segoe UI", Arial, sans-serif;
}

.marca {
    display: block;
    margin: 0 auto 24px;
    text-align: center;
    color: #456b5d;
    font-size: 20px;
    font-weight: 800;
    text-decoration: none;
}

.tarjeta {
    max-width: 490px;
    margin: auto;
    padding: clamp(24px, 6vw, 40px);
    background: white;
    border: 1px solid #e0e7df;
    border-radius: 26px;
    box-shadow: 0 18px 48px #263d3210;
}

.panel {
    max-width: 960px;
}

h1 {
    margin: 0 0 12px;
    font-size: clamp(26px, 4vw, 34px);
    overflow-wrap: anywhere;
}

h2 {
    margin-top: 32px;
}

h3 {
    margin: 12px 0;
}

p {
    line-height: 1.6;
    color: #607269;
}

a {
    color: #365e4d;
}

label {
    display: block;
    margin: 20px 0 8px;
    font-weight: 600;
}

input {
    width: 100%;
    padding: 14px;
    border: 1px solid #cdd9d0;
    border-radius: 12px;
    background: #fcfdfb;
    color: #293e38;
    font: inherit;
    font-size: 16px;
}

input:focus {
    outline: 3px solid #d9e9df;
    border-color: #527b65;
}

button {
    width: 100%;
    margin-top: 26px;
    padding: 16px;
    border: 0;
    border-radius: 12px;
    background: #365e4d;
    color: white;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

button:hover {
    background: #294b3c;
}

button:focus-visible,
a:focus-visible {
    outline: 3px solid #b88831;
    outline-offset: 4px;
}

.aviso {
    padding: 16px;
    border-radius: 12px;
    line-height: 1.5;
}

.error {
    background: #fff0ed;
    color: #8b3526;
}

.pie {
    margin-top: 24px;
    text-align: center;
    font-size: 15px;
}

.cabecera {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e5ebe3;
}

.cabecera > div {
    min-width: 0;
}

.cabecera form {
    flex-shrink: 0;
}

.secundario {
    width: auto;
    margin: 0;
    padding: 12px 18px;
    background: #edf2eb;
    color: #365e4d;
}

.secundario:hover {
    background: #dfe9dc;
}

.etiqueta {
    display: block;
    margin-bottom: 10px;
    color: #617d69;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.vacio {
    padding: 36px 20px;
    border: 1px dashed #c9d8c8;
    border-radius: 20px;
    background: #f8faf5;
    text-align: center;
}

.huella {
    font-size: 42px;
}

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

.mascota {
    padding: 24px;
    border: 1px solid #dfe7dc;
    border-radius: 18px;
    background: #f8faf5;
    overflow-wrap: anywhere;
}

@media (max-width: 560px) {
    .cabecera {
        align-items: flex-start;
        flex-direction: column;
    }

    .mascotas {
        grid-template-columns: 1fr;
    }
}

.mascota {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #fdfdfc;
    border: 1px solid #dce5d7;
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.mascota-imagen {
    flex-shrink: 0;
    width: 150px;
    height: 150px;
    border-radius: 10px;
    overflow: hidden;
    background: #f0f4ec;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mascota-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mascota-info {
    flex-grow: 1;
    min-width: 0;
}

.mascota-info h3 {
    margin: 4px 0 6px 0;
    font-size: 1.4rem;
    color: #293e38;
}

.mascota-info p {
    margin: 0 0 12px 0;
    color: #555;
    font-size: 1rem;
}

/* Responsivo para celulares */
@media (max-width: 600px) {
    .mascota {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .mascota-imagen {
        width: 100%;
        height: 200px;
        margin-bottom: 10px;
    }
}
