:root {
    --primary-bg: #3b6bb5;
    --primary-text: #ffffff;
    --box-text: #000023;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--primary-bg);
    background-attachment: fixed;
    color: var(--box-text);
    line-height: 1.6;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 0, 35, 0.15) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.site-footer {
    margin-top: 60px;
    padding: 30px 20px;
    text-align: center;
    color: var(--primary-text);
    font-size: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.site-footer p {
    margin: 0;
    opacity: 0.9;
    letter-spacing: 0.3px;
}

.site-footer a {
    color: var(--primary-text);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.site-footer a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.site-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 30px;
    text-align: center;
}

.site-logo {
    width: 240px;
    height: auto;
}

.site-header h1 {
    margin: 0;
    text-align: center;
}

h1 {
    color: var(--primary-text);
    margin-bottom: 30px;
    font-size: 2.5em;
    font-weight: 700;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

h2 {
    color: var(--box-text);
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

h2 {
    color: var(--primary-text);
    margin-bottom: 20px;
    font-weight: 600;
    position: relative;
}


/* Filtros */
.filters {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 35, 0.15);
    margin-bottom: 30px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    color: var(--box-text);
}

.filters form {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr auto auto;
    gap: 10px;
    align-items: end;
}

.filters input,
.filters select {
    padding: 12px 15px;
    border: 2px solid rgba(59, 107, 181, 0.4);
    border-radius: 8px;
    font-size: 14px;
    background: white;
    color: var(--box-text);
    transition: all 0.3s ease;
}

.filters input::placeholder {
    color: rgba(0, 0, 35, 0.6);
}

.filters input:focus,
.filters select:focus {
    outline: none;
    border-color: var(--primary-bg);
    box-shadow: 0 0 0 3px rgba(59, 107, 181, 0.25);
}

.filters button {
    padding: 10px 20px;
}

/* Botões */
button, .btn-primary, .btn-secondary, .btn-edit, .btn-delete {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    transition: background 0.3s, transform 0.2s, box-shadow 0.2s;
    background: var(--primary-bg);
    color: var(--primary-text);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 35, 0.2);
}

.btn-secondary {
    background: #3B82F6;
    color: #ffffff;
}

button:hover,
.btn-primary:hover,
.btn-edit:hover {
    background: rgba(59, 107, 181, 0.85);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 35, 0.25);
}

.btn-secondary:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.btn-admin {
    padding: 0;
    border: none;
    background: transparent;
    color: var(--primary-text);
    font-weight: 500;
    font-size: 13px;
    border-radius: 0;
    box-shadow: none;
    text-decoration: none;
}

.btn-admin:hover {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: underline;
    transform: none;
    box-shadow: none;
}

.btn-edit {
    padding: 8px 14px;
    font-size: 12px;
    border-radius: 6px;
}

.btn-delete,
.btn-logout,
.btn-archive {
    background: var(--box-text);
    color: var(--primary-text);
}

.btn-delete:hover,
.btn-logout:hover,
.btn-archive:hover {
    background: rgba(0, 0, 35, 0.85);
}

/* Grid de cachorros */
.dogs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.dog-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 35, 0.15);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 2px solid rgba(59, 107, 181, 0.25);
    overflow: hidden;
    position: relative;
    color: #000023;
}

.dog-card::before {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
    opacity: 0.3;
    z-index: 1;
}

.dog-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 35, 0.25);
    border-color: rgba(59, 107, 181, 0.4);
}

.dog-card img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    object-position: center;
    background: rgba(255, 255, 255, 0.6);
    display: block;
    transition: transform 0.3s ease;
}

.dog-card:hover img {
    transform: scale(1.05);
}

.no-photo {
    width: 100%;
    height: 200px;
    background: rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    opacity: 0.6;
}

.dog-card h3 {
    padding: 18px 15px;
    color: #3B82F6;
    border-bottom: 2px solid rgba(59, 107, 181, 0.25);
    font-size: 1.3em;
    font-weight: 600;
    background: rgba(255, 245, 230, 0.5);
    position: relative;
}

.dog-card h3::before {
    content: '';
    margin-right: 8px;
    font-size: 0.9em;
}

.dog-info {
    padding: 18px 15px;
    background: white;
    color: #000023;
}

.dog-info p {
    margin-bottom: 10px;
    font-size: 14px;
    color: #000023;
    line-height: 1.8;
}

.dog-info p strong {
    color: #000023;
    font-weight: 600;
}

.dog-info .description {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 2px dashed rgba(59, 107, 181, 0.3);
    color: #000023;
    font-style: italic;
    font-size: 13px;
    line-height: 1.6;
}

.no-results {
    text-align: center;
    padding: 60px 40px;
    color: #000023;
    font-size: 20px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    border: 2px dashed rgba(59, 107, 181, 0.3);
}

.no-results::before {
    content: '🐕';
    display: block;
    font-size: 60px;
    margin-bottom: 20px;
    opacity: 0.5;
}

/* Admin */
.admin-nav {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.admin-nav .btn-logout {
    margin-left: auto;
}

/* Login */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    background: rgba(255, 255, 255, 0.95);
    padding: 50px 40px;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 35, 0.2);
    border: 2px solid rgba(59, 107, 181, 0.3);
    backdrop-filter: blur(10px);
}

.login-container h1 {
    text-align: center;
    margin-bottom: 30px;
}

.login-container h1::after {
    content: '🔐';
    display: block;
    font-size: 0.4em;
    margin-top: 10px;
    opacity: 0.6;
}

.admin-table {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 35, 0.15);
    border: 2px solid rgba(59, 107, 181, 0.3);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--primary-bg);
    color: var(--primary-text);
}

th, td {
    padding: 12px;
    text-align: left;
}

tbody tr {
    border-bottom: 1px solid rgba(59, 107, 181, 0.15);
    transition: background 0.2s ease;
}

tbody tr:hover {
    background: rgba(59, 107, 181, 0.08);
}

.actions {
    display: flex;
    gap: 8px;
}

/* Formulário */
.form-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 35, 0.2);
    max-width: 800px;
    margin: 0 auto;
    border: 2px solid rgba(59, 107, 181, 0.3);
    backdrop-filter: blur(10px);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--box-text);
    font-weight: 600;
    font-size: 15px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid rgba(59, 107, 181, 0.3);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: white;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-bg);
    box-shadow: 0 0 0 3px rgba(59, 107, 181, 0.25);
}

.form-group textarea {
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px dashed rgba(59, 107, 181, 0.3);
}

.message {
    padding: 12px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.message.success {
    background: rgba(59, 107, 181, 0.15);
    color: var(--box-text);
    border: 2px solid rgba(59, 107, 181, 0.4);
    border-radius: 8px;
    font-weight: 500;
}

.message.error {
    background: rgba(0, 0, 35, 0.1);
    color: var(--box-text);
    border: 2px solid rgba(0, 0, 35, 0.2);
    border-radius: 8px;
    font-weight: 500;
}

/* Upload de foto */
.current-photo {
    margin-bottom: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    text-align: center;
    border: 2px dashed rgba(59, 107, 181, 0.3);
}

.current-photo img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.current-photo p {
    margin: 0;
    color: rgba(0, 0, 35, 0.7);
    font-size: 14px;
}

.form-group small {
    display: block;
    color: rgba(0, 0, 35, 0.7);
    font-size: 12px;
    margin-top: 5px;
    margin-bottom: 10px;
}

.photo-url-option {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px dashed rgba(59, 107, 181, 0.3);
}

.photo-url-option small {
    display: block;
    margin-bottom: 8px;
    color: var(--box-text);
    font-weight: 500;
}

.form-group input[type="file"] {
    padding: 12px;
    border: 2px dashed rgba(59, 107, 181, 0.3);
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.form-group input[type="file"]:hover {
    border-color: var(--primary-bg);
    background: rgba(59, 107, 181, 0.08);
}

/* Link do card do cachorro */
.dog-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.dog-card-link:hover .dog-card {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 35, 0.25);
    border-color: rgba(59, 107, 181, 0.4);
}

.dog-info .view-more {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 2px dashed rgba(59, 107, 181, 0.3);
    color: #000023;
    font-weight: 600;
    font-size: 13px;
    text-align: center;
}

/* Página individual do cachorro */
.dog-detail-header {
    margin-bottom: 20px;
}

.dog-detail-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 35, 0.2);
    border: 2px solid rgba(59, 107, 181, 0.3);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.dog-detail-photo {
    background: #7597cb;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.dog-detail-photo img {
    max-width: 100%;
    max-height: 600px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 35, 0.2);
    object-fit: contain;
}

.no-photo-large {
    width: 100%;
    height: 400px;
    background: rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 150px;
    opacity: 0.6;
    border-radius: 12px;
}

.dog-detail-info {
    padding: 40px;
}

.dog-detail-info h1 {
    color: #3B82F6;
    margin-bottom: 25px;
    font-size: 2.5em;
    padding-bottom: 15px;
    border-bottom: 3px solid rgba(59, 107, 181, 0.3);
}

.dog-detail-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 0;
    padding: 20px;
    background: rgba(59, 107, 181, 0.08);
    border-radius: 12px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stat-item strong {
    color: var(--box-text);
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-item span {
    color: rgba(0, 0, 35, 0.8);
    font-size: 24px;
    font-weight: 600;
}

.dog-detail-section {
    margin-top: 0;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 2px dashed rgba(59, 107, 181, 0.3);
}

.dog-detail-section:last-of-type {
    border-bottom: none;
}

.dog-detail-section h2 {
    color: var(--box-text);
    margin-bottom: 12px;
    font-size: 1.4em;
}

.dog-detail-section p {
    color: rgba(0, 0, 35, 0.8);
    line-height: 1.8;
    font-size: 15px;
}

.dog-detail-contact {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 3px solid rgba(59, 107, 181, 0.3);
    text-align: center;
}

.btn-whatsapp {
    display: inline-block;
    padding: 18px 40px;
    background: var(--primary-bg);
    color: var(--primary-text);
    font-weight: 700;
    font-size: 18px;
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(0, 0, 35, 0.25);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-whatsapp:hover {
    background: rgba(59, 107, 181, 0.85);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 35, 0.3);
}

/* Status arquivado no admin */
.status-archived {
    color: #7f8c8d;
    font-weight: 600;
    font-size: 13px;
}

.status-active {
    color: #25D366;
    font-weight: 600;
    font-size: 13px;
}

tbody tr.archived {
    opacity: 0.6;
    background: rgba(127, 140, 141, 0.1);
}

.btn-archive {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    color: white;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-archive:hover {
    background: linear-gradient(135deg, #7f8c8d 0%, #6c7a7b 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(149, 165, 166, 0.3);
}

/* Responsivo */
@media (max-width: 768px) {
    h1 {
        font-size: 2em;
    }
    
    .filters form {
        grid-template-columns: 1fr;
    }
    
    .dogs-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    table {
        font-size: 14px;
    }
    
    th, td {
        padding: 8px;
    }
    
    .dog-card::before {
        font-size: 16px;
    }
    
    .dog-detail-container {
        grid-template-columns: 1fr;
    }
    
    .dog-detail-photo {
        padding: 20px;
    }
    
    .dog-detail-info {
        padding: 25px;
    }
    
    .dog-detail-info h1 {
        font-size: 2em;
    }
    
    .dog-detail-stats {
        grid-template-columns: 1fr;
    }
    
    .actions {
        flex-direction: column;
        gap: 5px;
    }
    
    .actions form {
        width: 100%;
    }
    
    .actions .btn-edit,
    .actions .btn-archive,
    .actions .btn-delete {
        width: 100%;
        text-align: center;
    }
}

.footer-instagram {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 35, 0.15);
    border: 2px solid rgba(59, 107, 181, 0.3);
    backdrop-filter: blur(10px);
    color: black;
    margin-top: 60px;
    margin-bottom: 60px;
    margin-left: 60px;
    margin-right: 60px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.3px;
    opacity: 0.9;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-instagram a {
    color: #000 !important;
}