/* ============================================================
   PETDAY 2026 - Estilos Globais
   Variáveis, reset, header, footer, utilitários, toast, zoom
   ============================================================ */

/* === VARIÁVEIS CSS === */
:root {
    /* Cores Maple Bear adaptadas para PetDay */
    --pet-primary: #B31B1B;
    --pet-primary-dark: #8B0000;
    --pet-primary-darker: #6B0000;
    --pet-gold: #FFD700;
    --pet-gold-dark: #FFA500;
    --pet-white: #FFFFFF;
    --pet-black: #1e293b;

    /* Neutros */
    --pet-gray-50: #f8fafc;
    --pet-gray-100: #f1f5f9;
    --pet-gray-200: #e2e8f0;
    --pet-gray-300: #cbd5e1;
    --pet-gray-400: #94a3b8;
    --pet-gray-500: #64748b;
    --pet-gray-600: #475569;
    --pet-gray-700: #334155;
    --pet-gray-800: #1e293b;
    --pet-gray-900: #0f172a;

    /* Status */
    --pet-success: #10b981;
    --pet-success-dark: #059669;
    --pet-warning: #f59e0b;
    --pet-danger: #ef4444;
    --pet-info: #3b82f6;

    /* Sombras */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --shadow-xl: 0 16px 40px rgba(0,0,0,0.18);

    /* Transições */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;

    /* Tipografia */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Layout */
    --header-height: 70px;
    --max-width: 1200px;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
}

/* === RESET === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    font-size: 15px;
    line-height: 1.6;
    color: var(--pet-gray-800);
    background: var(--pet-gray-50);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }
ul, ol { list-style: none; }

/* === HEADER === */
.petday-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-height);
    background: linear-gradient(135deg, var(--pet-primary) 0%, var(--pet-primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    z-index: 999;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-logo i {
    font-size: 1.6rem;
    color: var(--pet-gold);
    filter: drop-shadow(0 2px 6px rgba(255, 215, 0, 0.4));
    animation: pawPulse 2.5s ease-in-out infinite;
}

.header-logo span {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.04em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.header-logo span small {
    font-size: 0.7em;
    font-weight: 400;
    color: var(--pet-gold);
    margin-left: 4px;
    vertical-align: middle;
    opacity: 0.9;
}

@keyframes pawPulse {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(-6deg); }
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-title h1 {
    color: var(--pet-gold);
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.header-title span {
    color: rgba(255,255,255,0.85);
    font-size: 0.72rem;
    font-weight: 400;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.header-nav form {
    display: flex;
}

.header-nav a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    color: rgba(255,255,255,0.75);
    font-size: 0.82rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.header-nav a:hover,
.header-nav .btn-logout:hover {
    background: rgba(255,255,255,0.12);
    color: #ff6b6b;
}

.header-nav .btn-logout {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    color: rgba(255,255,255,0.75);
    font-size: 0.82rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.header-nav a.active {
    background: rgba(255,215,0,0.15);
    color: var(--pet-gold);
}

/* === FOOTER === */
.petday-footer {
    background: var(--pet-gray-900);
    color: var(--pet-gray-400);
    text-align: center;
    padding: 24px 20px;
    font-size: 0.8rem;
}

.footer-pet-icon {
    display: inline-block;
    animation: pulseGlow 2s ease-in-out infinite;
}

/* === CONTAINER === */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    width: 100%;
}

/* === BOTÕES === */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--pet-primary) 0%, var(--pet-primary-dark) 100%);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    filter: brightness(1.1);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: white;
    color: var(--pet-gray-700);
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--pet-gray-200);
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--pet-gray-50);
    border-color: var(--pet-gray-300);
}

/* === STATUS BADGES === */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.status-completa {
    background: #d1fae5;
    color: #065f46;
}

.status-parcial {
    background: #fef3c7;
    color: #92400e;
}

.status-pendente {
    background: #fee2e2;
    color: #991b1b;
}

/* === TOAST === */
.toast-container {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--pet-gray-800);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.35s ease;
    min-width: 260px;
    max-width: 400px;
}

.toast.success { border-left: 4px solid var(--pet-success); }
.toast.error { border-left: 4px solid var(--pet-danger); }
.toast.warning { border-left: 4px solid var(--pet-warning); }
.toast.info { border-left: 4px solid var(--pet-info); }

.toast.hide { animation: slideOutRight 0.3s ease forwards; }

/* === IMAGE ZOOM === */
.image-zoom-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    cursor: zoom-out;
    backdrop-filter: blur(6px);
}

.image-zoom-overlay.active { display: flex; }

.image-zoom-overlay img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: var(--radius);
    box-shadow: var(--shadow-xl);
    object-fit: contain;
}

.zoomable { cursor: zoom-in; }

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--pet-gray-300);
    border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover { background: var(--pet-gray-400); }

/* === ANIMAÇÕES === */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(60px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideOutRight {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(60px); }
}

@keyframes pulseGlow {
    0%, 100% { filter: drop-shadow(0 0 0px transparent); }
    50% { filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.5)); }
}

@keyframes bounceIn {
    0% { opacity: 0; transform: scale(0.3); }
    50% { opacity: 1; transform: scale(1.05); }
    70% { transform: scale(0.96); }
    100% { transform: scale(1); }
}

/* === REQUIRED === */
.required { color: var(--pet-danger); }

/* === NO PRINT === */
@media print {
    .no-print { display: none !important; }
    body { background: white; color: black; font-size: 12pt; }
    .petday-header, .petday-footer, .toast-container { display: none !important; }
    @page { margin: 1.5cm; }
    a[href]::after { content: none; }
}

/* === ACESSIBILIDADE: Redução de movimento === */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* === VALIDAÇÃO DE CAMPOS === */
.input-error {
    border-color: var(--pet-danger) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

.input-error:focus {
    border-color: var(--pet-danger) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25) !important;
}

/* === RESPONSIVO GLOBAL === */
@media (max-width: 768px) {
    .petday-header {
        padding: 0 16px;
        height: 60px;
    }

    .header-title h1 { font-size: 1.1rem; }
    .header-title span { display: none; }

    .header-nav a span { display: none; }
    .header-nav a { padding: 8px 10px; font-size: 1rem; }

    .container { padding: 0 16px; }
}

@media (max-width: 480px) {
    .petday-header { padding: 0 12px; }
    .header-brand span:first-child { font-size: 1.4rem !important; }
    .header-title h1 { font-size: 0.95rem; }
}
