/* ==========================================================================
   Registro Pet — app do tutor (cliente)
   Cores da logo: azul #0b9ed9 → turquesa #22c9c0
   Seletores com ".rp-app" na frente para vencer o reset do Tailwind (CDN), que é injetado depois deste arquivo.
   ========================================================================== */

:root {
    --rp-azul: #0b9ed9;
    --rp-turquesa: #22c9c0;
    --rp-marinho: #0b3d5c;
    --rp-gradiente: linear-gradient(135deg, var(--rp-azul) 0%, var(--rp-turquesa) 100%);
    --rp-sombra: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 32px -14px rgba(15, 23, 42, .18);
    --rp-patinha-azul: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='%230b9ed9'%3E%3Cellipse cx='14' cy='26' rx='6' ry='8'/%3E%3Cellipse cx='26' cy='14' rx='6' ry='8'/%3E%3Cellipse cx='38' cy='14' rx='6' ry='8'/%3E%3Cellipse cx='50' cy='26' rx='6' ry='8'/%3E%3Cpath d='M32 31c-9 0-18 10-18 18 0 6 5 8 10 8 3 0 5-2 8-2s5 2 8 2c5 0 10-2 10-8 0-8-9-18-18-18z'/%3E%3C/svg%3E");
    --rp-patinha-branca: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='%23ffffff'%3E%3Cellipse cx='14' cy='26' rx='6' ry='8'/%3E%3Cellipse cx='26' cy='14' rx='6' ry='8'/%3E%3Cellipse cx='38' cy='14' rx='6' ry='8'/%3E%3Cellipse cx='50' cy='26' rx='6' ry='8'/%3E%3Cpath d='M32 31c-9 0-18 10-18 18 0 6 5 8 10 8 3 0 5-2 8-2s5 2 8 2c5 0 10-2 10-8 0-8-9-18-18-18z'/%3E%3C/svg%3E");
}

@keyframes rp-surgir {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes rp-gradiente {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes rp-flutuar {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}

@keyframes rp-girar {
    to { transform: rotate(360deg); }
}

/* --- Fundo --- */
body.rp-app {
    min-height: 100vh;
    color: #0f172a;
    background:
        radial-gradient(900px 420px at 100% -5%, rgba(34, 201, 192, .14), transparent 60%),
        radial-gradient(700px 380px at -10% 0%, rgba(11, 158, 217, .10), transparent 60%),
        #f1f5f9;
    background-attachment: fixed;
    -webkit-tap-highlight-color: transparent;
}

body.rp-app::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: var(--rp-patinha-azul);
    background-size: 64px 64px;
    opacity: .035;
    transform: rotate(-12deg) scale(1.4);
    pointer-events: none;
    z-index: -1;
}

/* Telas de entrada (boas-vindas, login, cadastro) */
body.rp-app.rp-entrada {
    background: linear-gradient(135deg, var(--rp-marinho) 0%, #0b7fb3 35%, var(--rp-azul) 60%, var(--rp-turquesa) 100%);
    background-size: 220% 220%;
    animation: rp-gradiente 20s ease infinite;
}

body.rp-app.rp-entrada::before {
    background-image: var(--rp-patinha-branca);
    background-size: 70px 70px;
    opacity: .06;
}

/* --- Cartões --- */
.rp-app .rp-card {
    background: #fff;
    border-radius: 1.75rem;
    border: 1px solid rgba(15, 23, 42, .05);
    box-shadow: var(--rp-sombra);
    animation: rp-surgir .5s cubic-bezier(.2, .8, .2, 1) backwards;
}

.rp-app .rp-card-entrada {
    background: rgba(255, 255, 255, .97);
    border-radius: 2rem;
    box-shadow: 0 30px 60px -20px rgba(3, 30, 50, .55);
    position: relative;
    overflow: hidden;
    animation: rp-surgir .6s cubic-bezier(.2, .8, .2, 1) backwards;
}

.rp-app .rp-card-entrada::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 5px;
    background: var(--rp-gradiente);
}

.rp-app .rp-logo-flutuante {
    animation: rp-flutuar 5s ease-in-out infinite;
    filter: drop-shadow(0 10px 14px rgba(11, 158, 217, .35));
}

.rp-app .rp-titulo-gradiente {
    background: linear-gradient(135deg, var(--rp-marinho), var(--rp-azul));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* --- Formulários --- */
.rp-app .rp-label {
    display: block;
    margin: 0 0 .35rem .25rem;
    font-size: .8rem;
    font-weight: 600;
    color: #334155;
}

.rp-app .rp-label small {
    font-weight: 500;
    color: #94a3b8;
}

.rp-app .rp-input {
    display: block;
    width: 100%;
    padding: .85rem 1rem;
    border-radius: 1rem;
    border: 2px solid #e2e8f0;
    background: #f8fafc;
    font-weight: 500;
    font-size: .95rem;
    color: #0f172a;
    outline: none;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.rp-app .rp-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.rp-app .rp-input:focus {
    border-color: var(--rp-turquesa);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(34, 201, 192, .15);
}

.rp-app select.rp-input {
    appearance: none;
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2364748b'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.17l3.71-3.94a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .9rem center;
    background-size: 1.15rem;
}

.rp-app .rp-separador {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: .5rem 0;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #94a3b8;
}

.rp-app .rp-separador::before,
.rp-app .rp-separador::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

/* --- Botões --- */
.rp-app .rp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    width: 100%;
    padding: 1rem 1.25rem;
    border-radius: 1.1rem;
    font-weight: 800;
    font-size: 1rem;
    color: #fff;
    background: var(--rp-gradiente);
    box-shadow: 0 10px 22px -10px rgba(11, 158, 217, .75);
    transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
    cursor: pointer;
    text-align: center;
}

.rp-app .rp-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

.rp-app .rp-btn:active {
    transform: scale(.98);
}

.rp-app .rp-btn[disabled] {
    opacity: .75;
    cursor: wait;
    transform: none;
}

.rp-app .rp-btn-verde {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    box-shadow: 0 10px 22px -10px rgba(16, 185, 129, .8);
}

.rp-app .rp-btn-claro {
    color: var(--rp-azul);
    background: #fff;
    border: 2px solid rgba(11, 158, 217, .35);
    box-shadow: none;
}

.rp-app .rp-btn-claro:hover {
    background: #f0f9ff;
}

.rp-app .rp-btn-neutro {
    color: #334155;
    background: #f1f5f9;
    box-shadow: none;
}

.rp-app .rp-btn-neutro:hover {
    background: #e2e8f0;
}

.rp-app .rp-btn-pequeno {
    width: auto;
    padding: .6rem .9rem;
    border-radius: .85rem;
    font-size: .82rem;
    font-weight: 700;
}

.rp-app .rp-btn-perigo {
    color: #e11d48;
    background: #fff1f2;
    box-shadow: none;
}

.rp-app .rp-btn-perigo:hover {
    background: #ffe4e6;
}

.rp-app .rp-spinner {
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    animation: rp-girar .8s linear infinite;
}

/* --- Cabeçalho --- */
.rp-app .rp-topo {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 1px 0 rgba(15, 23, 42, .06), 0 8px 24px -16px rgba(15, 23, 42, .2);
}

.rp-app .rp-topo-botao {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: .9rem;
    color: #475569;
    background: #f1f5f9;
    transition: background-color .15s ease, color .15s ease;
}

.rp-app .rp-topo-botao:hover {
    color: var(--rp-azul);
    background: #e0f2fe;
}

.rp-app .rp-topo-sair:hover {
    color: #e11d48;
    background: #ffe4e6;
}

/* --- Passos do pedido --- */
.rp-app .rp-passos {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.75rem;
    counter-reset: passo;
}

.rp-app .rp-passos li {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .35rem;
    font-size: .7rem;
    font-weight: 600;
    color: #94a3b8;
}

.rp-app .rp-passos li:not(:first-child)::before {
    content: "";
    position: absolute;
    top: 1rem;
    right: 50%;
    width: 100%;
    height: 3px;
    border-radius: 3px;
    background: #e2e8f0;
    z-index: 0;
}

.rp-app .rp-passos li.feito::before,
.rp-app .rp-passos li.atual::before {
    background: var(--rp-gradiente) !important;
}

.rp-app .rp-passo-bolinha {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 800;
    color: #94a3b8;
    background: #fff;
    border: 2px solid #e2e8f0;
    transition: all .2s ease;
}

.rp-app .rp-passos li.feito .rp-passo-bolinha {
    color: #fff;
    background: var(--rp-turquesa);
    border-color: var(--rp-turquesa);
}

.rp-app .rp-passos li.atual .rp-passo-bolinha {
    color: #fff;
    background: var(--rp-gradiente);
    border-color: transparent;
    box-shadow: 0 0 0 5px rgba(34, 201, 192, .2);
}

.rp-app .rp-passos li.atual,
.rp-app .rp-passos li.feito {
    color: #0f172a;
}

/* --- Foto do pet --- */
.rp-app .rp-foto-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 15rem;
    padding: 1.5rem;
    border-radius: 1.5rem;
    border: 2px dashed rgba(11, 158, 217, .35);
    background: linear-gradient(135deg, rgba(11, 158, 217, .05), rgba(34, 201, 192, .08));
    cursor: pointer;
    text-align: center;
    transition: border-color .15s ease, background-color .15s ease;
    overflow: hidden;
}

.rp-app .rp-foto-area:hover {
    border-color: var(--rp-turquesa);
}

.rp-app .rp-foto-area img {
    width: 100%;
    max-height: 18rem;
    object-fit: cover;
    border-radius: 1.1rem;
}

/* --- Selo de status --- */
.rp-app .rp-status {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .2rem .6rem;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.rp-app .rp-status::before {
    content: "";
    width: .45rem;
    height: .45rem;
    border-radius: 999px;
    background: currentColor;
}

.rp-app .rp-status-pago { color: #059669; background: #d1fae5; }
.rp-app .rp-status-pendente { color: #d97706; background: #fef3c7; }
.rp-app .rp-status-cancelado { color: #64748b; background: #f1f5f9; }

/* --- Abas do pagamento --- */
.rp-app .rp-abas {
    display: flex;
    gap: .35rem;
    padding: .35rem;
    border-radius: 1.2rem;
    background: #e2e8f0;
}

.rp-app .rp-abas button {
    flex: 1;
    padding: .8rem;
    border-radius: .9rem;
    font-size: .85rem;
    font-weight: 700;
    color: #64748b;
    transition: all .15s ease;
}

.rp-app .rp-abas button.rp-aba-ativa {
    color: #0f172a;
    background: #fff;
    box-shadow: 0 4px 12px -6px rgba(15, 23, 42, .3);
}

/* --- Avisos --- */
.rp-app .rp-aviso {
    padding: .85rem 1rem;
    border-radius: 1rem;
    font-size: .85rem;
    font-weight: 600;
}

.rp-app .rp-aviso-sucesso { color: #047857; background: #d1fae5; }
.rp-app .rp-aviso-erro { color: #be123c; background: #ffe4e6; }
.rp-app .rp-aviso-info { color: #0369a1; background: #e0f2fe; }

/* O JS das telas alterna a classe "hidden"; ela precisa vencer o display dos componentes acima. */
.rp-app .hidden { display: none !important; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
}
