:root {
    --primary-color: #FF69B4;
    /* Rosa Pet Vida */
    --primary-dark: #D84394;
    --background-color: #FFF0F5;
    /* Rosa muito claro para fundo */
    --card-bg: #FFFFFF;
    --text-color: #333333;
    --text-white: #FFFFFF;
    --border-color: #FFB6C1;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --radius: 15px;
    --shadow: 0 4px 15px rgba(255, 105, 180, 0.2);
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 20px;
    background-color: var(--background-color);
    color: var(--text-color);
}

/* === HEADER PREMIUM PLUS ULTRA === */
.header {
    /* Gradiente Rico e Profundo */
    background: linear-gradient(135deg, #FF69B4 0%, #FF1493 50%, #C71585 100%);
    color: white;
    padding: 15px 30px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(255, 20, 147, 0.4);
    /* Sombra Colorida brilhante */
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
    /* Efeito de brilho interno */
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Partícula de brilho decorativo no fundo (Opcional, mas dá o "Plus") */
.header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    animation: shine 10s infinite linear;
    pointer-events: none;
}

@keyframes shine {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.brand-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 2;
}

.brand-name {
    font-size: 42px;
    /* Maior e mais imponente */
    font-weight: 900;
    letter-spacing: 3px;
    color: white;
    text-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background: -webkit-linear-gradient(#fff, #ffebf2);
    -webkit-background-clip: text;
    background-clip: text;
    /* Fix Lint */
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.brand-icon {
    font-size: 36px;
    transform: rotate(15deg);
    filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.2));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: rotate(15deg) translateY(0);
    }

    50% {
        transform: rotate(15deg) translateY(-5px);
    }
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 2;
}

/* BOTÃO NOVO PET - ESTILO GLOSSY */
.btn-new-pet {
    background: rgba(255, 255, 255, 0.95);
    color: #FF1493;
    border: none;
    padding: 10px 24px;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-new-pet:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    background: white;
}

.btn-new-pet .btn-icon {
    font-size: 18px;
}

/* DATA DISPLAY GLASS */
.date-container-glass {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-weight: 500;
}

.date-container-glass input {
    background: transparent;
    border: none;
    color: white;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 15px;
    width: 140px;
    text-align: center;
    outline: none;
}

/* Remove ícone de calendário nativo feio para usar o nosso */
.date-container-glass input::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.6;
    cursor: pointer;
}

/* === ANIMAÇÃO DOS PETS (Cachorro e Gato Cruzando) === */
.pet-walk-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30px;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.dog {
    position: absolute;
    bottom: 2px;
    font-size: 24px;
    left: -50px;
    animation: dog-walk 30s linear infinite;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.1));
}

.cat {
    position: absolute;
    bottom: 2px;
    font-size: 24px;
    right: -50px;
    /* Começa na direita */
    animation: cat-walk 35s linear infinite;
    /* Ritmo diferente */
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.1));
}

/* Cachorro: Vai pra Direita (ScaleX -1), Volta pra Esquerda (ScaleX 1) */
/* Emoji original olha pra esquerda. */
@keyframes dog-walk {
    0% {
        transform: translateX(0) scaleX(-1);
        /* Vira pra direita */
        left: -50px;
    }

    45% {
        transform: translateX(110vw) scaleX(-1);
        left: 0;
    }

    46% {
        transform: translateX(110vw) scaleX(1);
        /* Vira pra esquerda */
        left: 0;
    }

    50% {
        transform: translateX(110vw) scaleX(1);
        left: 0;
    }

    95% {
        transform: translateX(0) scaleX(1);
        /* Volta pra esquerda */
        left: -50px;
    }

    96% {
        transform: translateX(0) scaleX(-1);
        /* Vira pra direita */
        left: -50px;
    }

    100% {
        transform: translateX(0) scaleX(-1);
        left: -50px;
    }
}

/* Gato: Vai pra Esquerda (ScaleX 1), Volta pra Direita (ScaleX -1) */
@keyframes cat-walk {
    0% {
        transform: translateX(0) scaleX(1);
        /* Olha pra esquerda (natural) */
        right: -50px;
    }

    45% {
        transform: translateX(-110vw) scaleX(1);
        right: 0;
    }

    46% {
        transform: translateX(-110vw) scaleX(-1);
        /* Vira pra direita */
        right: 0;
    }

    50% {
        transform: translateX(-110vw) scaleX(-1);
        right: 0;
    }

    95% {
        transform: translateX(0) scaleX(-1);
        /* Volta pra direita */
        right: -50px;
    }

    96% {
        transform: translateX(0) scaleX(1);
        /* Vira pra esquerda */
        right: -50px;
    }

    100% {
        transform: translateX(0) scaleX(1);
        right: -50px;
    }
}

.logo-container {
    background: transparent;
    /* Remove fundo branco */
    padding: 0;
    box-shadow: none;
    z-index: 2;
    display: flex;
    align-items: center;
}

.logo {
    height: 70px;
    /* Um pouco maior */
    width: auto;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    /* Sombra leve para destacar no rosa */
}

/* === ABAS === */
.tab-menu {
    display: flex;
    justify-content: center;
    /* Centralizar abas também */
    gap: 20px;
    margin-bottom: 20px;
}

.tab-button {
    background-color: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 12px 40px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-button.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 5px 15px rgba(255, 105, 180, 0.4);
    transform: translateY(-2px);
}

/* === TABELA ESTILO PLANILHA/GRID === */
.tab-content {
    display: none;
    background: white;
    padding: 0;
    /* Remove padding para tabela encostar nas bordas se quiser, ou mantém pouco */
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.tab-content.active {
    display: block;
}

table {
    width: 100%;
    border-collapse: collapse;
    /* Crucial para bordas coladas estilo Excel */
    background-color: white;
}

thead th {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 8px;
    /* Mais compacto */
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    /* Separador sutil no header */
    white-space: nowrap;
    /* Evita quebra de linha no header */
}

thead th:last-child {
    border-right: none;
}

/* Linhas da Tabela */
tbody tr {
    border-bottom: 1px solid #E0E0E0;
    /* Linha horizontal suave */
}

/* === CORREÇÃO DEFINITIVA DA GRADE E INPUTS === */

/* Célula Container */
tbody td {
    padding: 0;
    border-right: 1px solid #F0F0F0;
    height: 40px;
    /* Altura Fixa */
    position: relative;
    /* Isso garante que nada saia da célula */
    overflow: hidden;
}

tbody td:last-child {
    border-right: none;
}

/* Destaque na CÉLULA quando o input dentro dela é focado 
   (Isso é mágico: pinta a célula inteira, perfeitamente alinhada) */
tbody td:focus-within {
    background-color: #FFF0F5;
    /* Rosa claro de foco */
    box-shadow: inset 0 0 0 1px #FF69B4;
    /* Borda interna fina rosa */
}

/* INPUTS: Reset Total para não ter tamanho próprio */
tbody input,
tbody select,
tbody textarea {
    display: block;
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    background: transparent;
    border-radius: 0;
    margin: 0;
    padding: 0 4px;
    /* Padding lateral mínimo */

    appearance: none;
    -webkit-appearance: none;

    /* Fonte Adaptável para caber melhor */
    font-family: 'Poppins', sans-serif;
    font-size: clamp(11px, 1vw, 13px);
    /* Reduz um pouco se apertar */
    color: #333;
    line-height: normal;
    /* Deixa o flex/alinhamento cuidar */

    /* Centralização Vertical (simulada ou real se mudar display) */
    align-self: center;
}

/* Remover focus do input, pois quem brilha é a Célula (td) agora */
tbody input:focus,
tbody select:focus,
tbody textarea:focus {
    background: transparent;
    outline: none;
    box-shadow: none;
}

/* Ajustes específicos para selects e textareas */
tbody select {
    cursor: pointer;
    background-image: none;
}

tbody textarea {
    padding-top: 4px;
    resize: none;
    line-height: 1.1;
    white-space: normal;
    font-size: 11px;
    /* Letra menor em obs */
}

/* Ajuste de alinhamento vertical */
tbody td {
    vertical-align: middle;
}

/* Flex na célula de status para centralizar perfeito */
td:nth-child(13),
td:nth-child(14) {
    /* Colunas de Status e Pagto */
    text-align: center;
}

/* === CORES DAS LINHAS POR STATUS (Linha Inteira) === */
/* Aguardando: Azul Suave */
tr.status-aguardando {
    background-color: #E3F2FD !important;
}

/* Em Andamento: Amarelo Suave */
tr.status-andamento {
    background-color: #FFF9C4 !important;
}

/* Pronto: Laranja Suave (Destaque que terminou) */
tr.status-pronto {
    background-color: #FFE0B2 !important;
}

/* Entregue: Verde Suave (Finalizado) */
tr.status-entregue {
    background-color: #C8E6C9 !important;
}

/* Ajustes para linha ENTREGUE (Bloqueada) */
tr.status-entregue input,
tr.status-entregue select,
tr.status-entregue textarea {
    color: #000000 !important;
    /* Letra PRETA exigida */
    font-weight: 500;
    -webkit-text-fill-color: #000000;
    /* Garante preto no Safari/Chrome mesmo disabled */
    opacity: 1 !important;
    /* Remove opacidade de disabled */
    background: transparent !important;
}

tr.status-entregue button {
    opacity: 0.3 !important;
    /* Só o botão de deletar fica apagado */
}

/* Reset do Select de Status para ser Quadrado e Preto */
select.status {
    width: 100%;
    height: 100%;
    border-radius: 0;
    padding: 0 4px;
    margin: 0;
    border: none;
    background: transparent;
    color: #000;
    /* Letra Preta */
    font-weight: normal;
    text-shadow: none;
    text-align: left;
}

/* Garante que o select não tenha cores de fundo conflitantes */
.status-aguardando,
.status-andamento,
.status-pronto,
.status-entregue {
    background-color: transparent !important;
    color: #000 !important;
    text-shadow: none !important;
}



/* Botões de Ação */
.btn-action {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

.btn-action:hover {
    background: var(--primary-dark);
}