/* ============================================================================
   PatitasQR — hoja de estilos
   Reescrita para: (1) cubrir TODAS las clases realmente usadas en las
   plantillas (varias no tenian ningun estilo definido: .tabla-admin,
   .paginacion, .saldos, .panel-reseller, .badge-pendiente, .lista-mascotas,
   .pqr-notif, .categoria), y (2) un diseño mas cuidado y llamativo en
   general (tipografia, espaciados, tarjetas, formularios, botones).
   ========================================================================= */

:root {
    --verde-oscuro: #1b4332;
    --verde: #2d6a4f;
    --verde-medio: #40916c;
    --verde-claro: #74c69d;
    --verde-pastel: #d8f3dc;
    --verde-fondo: #eef7f0;
    --rosa: #e07a9e;
    --dorado: #d4a017;
    --gris-texto: #2b2b2b;
    --gris-suave: #6b7280;
    --fondo: #f6f8f7;
    --blanco: #ffffff;
    --sombra-suave: 0 2px 10px rgba(27, 67, 50, 0.06);
    --sombra-media: 0 8px 28px rgba(27, 67, 50, 0.10);
    --sombra-fuerte: 0 14px 40px rgba(27, 67, 50, 0.16);
    --radio-chico: 10px;
    --radio-medio: 16px;
    --radio-grande: 22px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    background: var(--fondo);
    background-image:
        radial-gradient(circle at 15% 10%, rgba(45,106,79,0.05) 0%, transparent 45%),
        radial-gradient(circle at 85% 90%, rgba(224,122,158,0.05) 0%, transparent 45%);
    color: var(--gris-texto);
    position: relative;
    overflow-x: hidden;
    line-height: 1.55;
}

h1, h2, h3, h4 { color: var(--verde-oscuro); line-height: 1.25; }
h1 { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.3px; }
h2 { font-size: 1.4rem; font-weight: 700; margin: 1.2rem 0 0.6rem; }
h3 { font-size: 1.15rem; font-weight: 700; margin: 1rem 0 0.5rem; }
a { color: var(--verde); }
p { color: var(--gris-texto); }

/* Huellitas decorativas de fondo (perritos y gatitos) */
.huellas-fondo { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.huella { position: absolute; font-size: 3rem; opacity: 0.045; transform: rotate(15deg); }
.huella.h1 { top: 8%; left: 5%; transform: rotate(-20deg); font-size: 2.5rem; }
.huella.h2 { top: 25%; right: 8%; transform: rotate(25deg); font-size: 4rem; }
.huella.h3 { top: 55%; left: 3%; transform: rotate(10deg); font-size: 3rem; }
.huella.h4 { top: 70%; right: 12%; transform: rotate(-15deg); font-size: 2rem; }
.huella.h5 { top: 40%; left: 45%; transform: rotate(30deg); font-size: 2.5rem; }

/* ---------------------------------------------------------------------------
   Barra de navegación
   ------------------------------------------------------------------------ */
.navbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 2rem;
    background: linear-gradient(120deg, var(--verde-oscuro), var(--verde) 55%, var(--verde-medio));
    color: white;
    box-shadow: 0 4px 18px rgba(27, 67, 50, 0.22);
    position: sticky; top: 0; z-index: 50;
}
.navbar a { color: white; text-decoration: none; margin-left: 1.1rem; font-weight: 500; opacity: 0.92; transition: opacity 0.15s ease; }
.navbar nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }

.logo { display: flex; align-items: center; gap: 0.5rem; font-weight: 800; font-size: 1.5rem; letter-spacing: -0.3px; }
.logo-icono { font-size: 1.7rem; filter: drop-shadow(0 2px 3px rgba(0,0,0,0.15)); }
.logo-texto { letter-spacing: 0.2px; }
.logo-qr { color: var(--verde-pastel); font-weight: 800; }

main { max-width: 900px; margin: 2rem auto; padding: 0 1rem; position: relative; z-index: 1; }
.hero { text-align: center; padding: 3.5rem 1rem 2.5rem; }
.hero h1 { font-size: 2.3rem; }

.logo-principal { width: 220px; max-width: 60vw; height: auto; margin-bottom: 1.5rem; border-radius: 50%; box-shadow: var(--sombra-fuerte); border: 5px solid white; }

.hero h1::before { content: "🐕 "; }
.hero h1::after { content: " 🐈"; }

/* ---------------------------------------------------------------------------
   Planes / tarjetas de precio
   ------------------------------------------------------------------------ */
.planes { display: flex; gap: 1.3rem; justify-content: center; flex-wrap: wrap; margin-top: 2.2rem; }
.plan-card {
    border: 2px solid var(--verde-pastel); border-radius: var(--radio-medio);
    padding: 1.8rem 1.5rem; width: 230px; text-align: center;
    background: var(--blanco); position: relative;
    box-shadow: var(--sombra-suave);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.plan-card:hover { transform: translateY(-4px); box-shadow: var(--sombra-media); }
.plan-card::before {
    content: "🐾"; position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
    background: white; padding: 0.2rem 0.6rem; font-size: 1.4rem; border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.plan-card.destacado { border-color: var(--verde); box-shadow: 0 8px 26px rgba(45,106,79,0.28); background: linear-gradient(180deg, #ffffff, #f4fbf6); }
.plan-card h3 { display: flex; align-items: center; justify-content: center; gap: 0.4rem; }
.precio { font-size: 1.7rem; font-weight: 800; margin: 0.6rem 0; color: var(--verde); }

/* ---------------------------------------------------------------------------
   Botones
   ------------------------------------------------------------------------ */
.btn {
    display: inline-block; padding: 0.75rem 1.5rem; border-radius: 999px;
    text-decoration: none; border: none; cursor: pointer;
    font-size: 0.95rem; font-weight: 600; letter-spacing: 0.1px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.16); }
.btn:active { transform: translateY(0); }
.btn-primario { background: linear-gradient(120deg, var(--verde), var(--verde-medio)); color: white; box-shadow: 0 4px 14px rgba(45,106,79,0.3); }
.btn-secundario { background: var(--verde-fondo); color: var(--verde); border: 1.5px solid var(--verde-pastel); }
.btn-secundario:hover { background: #e2f3e7; }
.btn-google { background: #4285F4; color: white; width: 100%; text-align: center; margin-bottom: 1rem; border-radius: 10px; box-shadow: 0 4px 14px rgba(66,133,244,0.3); }
.btn-whatsapp { background: #25D366; color: white; margin: 1rem 0; border-radius: 10px; box-shadow: 0 4px 14px rgba(37,211,102,0.3); }

/* ---------------------------------------------------------------------------
   Formularios (inputs, selects, textareas, checkbox/radio personalizados)
   ------------------------------------------------------------------------ */
input, select, textarea, button { font-family: inherit; }

input[type="text"], input[type="email"], input[type="tel"], input[type="password"],
input[type="number"], input[type="date"], input[type="url"], input[type="search"],
select, textarea {
    width: 100%; padding: 0.75rem 0.9rem; margin-bottom: 0.9rem;
    border: 1.5px solid #dde3de; border-radius: var(--radio-chico);
    background: var(--blanco); font-size: 0.95rem; color: var(--gris-texto);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--verde-medio);
    box-shadow: 0 0 0 3px rgba(64, 145, 108, 0.18);
}
textarea { min-height: 90px; resize: vertical; }

input[type="checkbox"], input[type="radio"] {
    width: 1.15rem; height: 1.15rem; margin-right: 0.4rem;
    accent-color: var(--verde); vertical-align: middle; cursor: pointer;
}
label { cursor: pointer; }

input[type="file"] {
    width: 100%; padding: 0.7rem; margin-bottom: 0.7rem;
    border: 1.5px dashed var(--verde-claro); border-radius: var(--radio-chico);
    background: var(--verde-fondo); font-size: 0.88rem; cursor: pointer;
}

input[type="range"] { accent-color: var(--verde); width: 100%; margin: 0.3rem 0 0.8rem; cursor: pointer; }

.auth-box { max-width: 420px; margin: 2.5rem auto; background: var(--blanco); padding: 2.3rem 2rem; border-radius: var(--radio-grande); box-shadow: var(--sombra-media); position: relative; }
.auth-box::before {
    content: "🐾"; position: absolute; top: -18px; left: 50%; transform: translateX(-50%);
    font-size: 2rem; background: white; border-radius: 50%; padding: 0.35rem 0.55rem;
    box-shadow: var(--sombra-suave);
}
.separador { text-align: center; margin: 1.2rem 0; color: var(--gris-suave); font-size: 0.85rem; position: relative; }
.separador::before, .separador::after { content: ""; display: inline-block; width: 30%; height: 1px; background: #e3e7e4; vertical-align: middle; margin: 0 0.6rem; }

/* ---------------------------------------------------------------------------
   Perfil público de mascota
   ------------------------------------------------------------------------ */
.perfil-mascota {
    background: var(--blanco);
    border-radius: var(--radio-grande);
    padding: 2.3rem 2rem;
    text-align: center;
    box-shadow: var(--sombra-media);
    position: relative;
    overflow: hidden;
    border: 1px solid #eef1ee;
}
.perfil-mascota::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url('/static/img/Logo_PatitasQR.jpg');
    background-size: 340px;
    background-repeat: no-repeat;
    background-position: center 60px;
    opacity: 0.05;
    pointer-events: none;
    z-index: 0;
}
.perfil-mascota > * { position: relative; z-index: 1; }

.foto-mascota-contenedor {
    width: 200px; height: 200px; border-radius: 50%; overflow: hidden;
    border: 5px solid var(--verde-pastel); margin: 0 auto 1rem;
    box-shadow: var(--sombra-media);
}
.foto-mascota { width: 100%; height: 100%; object-fit: cover; display: block; }

.datos-mascota { width: 100%; margin: 1.2rem 0; text-align: left; border-collapse: collapse; }
.datos-mascota td { padding: 0.6rem 0.4rem; border-bottom: 1px solid #eef1ee; font-size: 0.95rem; }
.datos-mascota tr td:first-child { font-weight: 700; color: var(--verde); width: 40%; }
.datos-mascota tr td:first-child::before { content: "🐾 "; }
.datos-mascota tr:hover td { background: var(--verde-fondo); }

.badge { display: inline-block; padding: 0.25rem 0.75rem; border-radius: 999px; font-size: 0.78rem; font-weight: 700; background: var(--verde-fondo); color: var(--verde); }
.badge-activo { display: inline-block; padding: 0.2rem 0.7rem; border-radius: 999px; background: #e7f7ee; color: var(--verde); font-weight: 700; font-size: 0.78rem; }
.badge-inactivo { display: inline-block; padding: 0.2rem 0.7rem; border-radius: 999px; background: #fdf1e2; color: #b5650a; font-weight: 700; font-size: 0.78rem; }
.badge-pendiente { display: inline-block; padding: 0.2rem 0.7rem; border-radius: 999px; background: #fff4d6; color: #92650a; font-weight: 700; font-size: 0.78rem; }

.categoria { display: inline-block; padding: 0.2rem 0.65rem; border-radius: 999px; background: var(--verde-fondo); color: var(--verde-oscuro); font-size: 0.78rem; font-weight: 600; margin: 0.15rem; }

/* ---------------------------------------------------------------------------
   Tarjetas de listas (mascotas, publicaciones)
   ------------------------------------------------------------------------ */
.form-mascota input, .form-mascota select, .form-mascota textarea { width: 100%; }

.lista-mascotas { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; margin: 1.2rem 0; }
.mascota-card {
    background: var(--blanco); padding: 1.1rem; border-radius: var(--radio-medio);
    display: flex; gap: 1rem; align-items: center;
    box-shadow: var(--sombra-suave); border: 1px solid #eef1ee;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.mascota-card:hover { transform: translateY(-2px); box-shadow: var(--sombra-media); }
.mascota-card img { border-radius: 12px; flex-shrink: 0; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.mascota-card strong { display: block; font-size: 1.02rem; color: var(--verde-oscuro); }
.mascota-card strong::before { content: "🐕 "; }
.mascota-card a { font-size: 0.85rem; margin-right: 0.6rem; text-decoration: none; font-weight: 600; }

/* ---------------------------------------------------------------------------
   Paneles con marca de agua (dashboard general, reseller)
   ------------------------------------------------------------------------ */
.panel-usuario-final, .panel-reseller {
    background: var(--blanco);
    border-radius: var(--radio-grande);
    padding: 2rem;
    box-shadow: var(--sombra-media);
    position: relative;
    overflow: hidden;
    border: 1px solid #eef1ee;
    margin-bottom: 1.4rem;
}
.panel-usuario-final::before, .panel-reseller::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url('/static/img/Logo_PatitasQR.jpg');
    background-size: 380px;
    background-repeat: no-repeat;
    background-position: center 40px;
    opacity: 0.04;
    pointer-events: none;
    z-index: 0;
}
.panel-usuario-final > *, .panel-reseller > * { position: relative; z-index: 1; }

.saldos {
    display: flex; flex-wrap: wrap; gap: 0.9rem; margin: 1rem 0;
}
.saldos div {
    background: var(--verde-fondo); border: 1px solid var(--verde-pastel);
    border-radius: var(--radio-chico); padding: 0.7rem 1.1rem;
    font-size: 0.9rem; color: var(--verde-oscuro); flex: 1 1 200px;
}
.saldos div strong { display: block; font-size: 1.15rem; color: var(--verde); margin-top: 0.1rem; }

/* ---------------------------------------------------------------------------
   Tablas de administración
   ------------------------------------------------------------------------ */
table.admin-table, .tabla-admin {
    width: 100%; background: var(--blanco); border-collapse: collapse;
    border-radius: var(--radio-medio); overflow: hidden;
    box-shadow: var(--sombra-suave); border: 1px solid #eef1ee;
}
table.admin-table td, table.admin-table th,
.tabla-admin td, .tabla-admin th {
    padding: 0.75rem 0.9rem; border-bottom: 1px solid #f1f3f1; text-align: left; font-size: 0.9rem;
}
table.admin-table th, .tabla-admin th {
    background: var(--verde-fondo); color: var(--verde-oscuro); font-weight: 700;
    text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.4px;
}
table.admin-table tr:last-child td, .tabla-admin tr:last-child td { border-bottom: none; }
table.admin-table tbody tr:hover, .tabla-admin tbody tr:hover { background: #fafcfa; }

.paginacion {
    display: flex; align-items: center; justify-content: center; gap: 1rem;
    margin: 1.4rem 0; font-size: 0.9rem; color: var(--gris-suave);
}
.paginacion a {
    padding: 0.4rem 0.9rem; border-radius: 999px; background: var(--verde-fondo);
    color: var(--verde); text-decoration: none; font-weight: 700;
    border: 1px solid var(--verde-pastel); transition: background 0.15s ease;
}
.paginacion a:hover { background: #dff0e5; }

/* ---------------------------------------------------------------------------
   Mensajes flash / notificaciones
   ------------------------------------------------------------------------ */
.flash-messages { max-width: 900px; margin: 1rem auto 0; padding: 0 1rem; }
.flash {
    padding: 0.9rem 1.1rem; margin-bottom: 0.8rem; border-radius: 12px;
    display: flex; align-items: center; gap: 0.6rem; font-size: 0.92rem;
    box-shadow: var(--sombra-suave); border-left: 4px solid transparent;
    animation: flash-entrada 0.25s ease;
}
@keyframes flash-entrada { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.flash-error { background: #fef1f1; color: #b42318; border-left-color: #e5484d; }
.flash-success { background: #eefbf1; color: #1b6b3f; border-left-color: var(--verde); }
.flash-info { background: #eef4ff; color: #2452c9; border-left-color: #4d7fef; }

.pqr-notif {
    background: var(--blanco); border-radius: var(--radio-chico); padding: 0.9rem 1.1rem;
    margin-bottom: 0.7rem; box-shadow: var(--sombra-suave); border-left: 4px solid var(--verde);
}

.lang-toggle a { margin-left: 0.3rem; opacity: 0.75; padding: 0.25rem 0.6rem; border-radius: 8px; font-size: 0.85rem; }
.lang-toggle a.activo { opacity: 1; font-weight: 800; background: rgba(255,255,255,0.18); }

footer { text-align: center; padding: 2rem 1rem; color: var(--gris-suave); opacity: 0.85; font-size: 0.85rem; }
footer a { color: var(--verde); }

/* ---------------------------------------------------------------------------
   Responsive básico
   ------------------------------------------------------------------------ */
@media (max-width: 640px) {
    .navbar { padding: 0.8rem 1rem; flex-wrap: wrap; gap: 0.5rem; }
    .navbar a { margin-left: 0.6rem; font-size: 0.9rem; }
    .hero h1 { font-size: 1.7rem; }
    .lista-mascotas { grid-template-columns: 1fr; }
    .saldos div { flex: 1 1 100%; }
}
