/**
 * Estilos Globais - Meu Castelo Legal
 * https://meucastelolegal.sophitware.com/
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

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

:root {
    --vermelho: #DC2626;
    --verde: #059669;
    --branco-gelo: #F8FAFC;
    --cinza-escuro: #1F2937;
    --cinza-medio: #6B7280;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--branco-gelo);
    color: var(--cinza-escuro);
    overflow-x: hidden;
}

/* Fundo com padrão sutil */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(220, 38, 38, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(5, 150, 105, 0.03) 0%, transparent 50%);
    z-index: -1;
    animation: breathe 8s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Header Vermelho */
.header {
    background: linear-gradient(135deg, var(--vermelho) 0%, #B91C1C 100%);
    padding: 1.5rem 0;
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 10px;
    background: linear-gradient(to bottom, rgba(220, 38, 38, 0.2), transparent);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    width: 55px;
    height: 55px;
    background: white;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    animation: float 3s ease-in-out infinite;
}

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

.header h1 {
    font-size: 1.6rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.header-subtitle {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 0.3rem;
}

/* Botões */
.btn {
    background: linear-gradient(135deg, var(--vermelho) 0%, #B91C1C 100%);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.4s;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(220, 38, 38, 0.4);
}

.btn-verde {
    background: linear-gradient(135deg, var(--verde) 0%, #047857 100%);
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3);
}

.btn-verde:hover {
    box-shadow: 0 10px 30px rgba(5, 150, 105, 0.4);
}

.btn-branco {
    background: white;
    color: var(--vermelho);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-branco:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* Cards */
.card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.card-header {
    border-bottom: 2px solid var(--branco-gelo);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

/* Formulários */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--cinza-escuro);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 0.9rem 1.2rem;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s;
    background: var(--branco-gelo);
}

.form-control:focus {
    outline: none;
    border-color: var(--verde);
    background: white;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* Tabelas */
.table-container {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    overflow-x: auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

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

thead tr {
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

th {
    padding: 1rem;
    text-align: left;
    font-weight: 700;
    color: var(--cinza-medio);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

tbody tr {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

tbody tr:hover {
    background: rgba(5, 150, 105, 0.05);
}

td {
    padding: 1.2rem 1rem;
    color: var(--cinza-escuro);
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
}

.badge-success {
    background: rgba(5, 150, 105, 0.1);
    color: var(--verde);
    border: 2px solid var(--verde);
}

.badge-danger {
    background: rgba(220, 38, 38, 0.1);
    color: var(--vermelho);
    border: 2px solid var(--vermelho);
}

/* Rodapé Verde */
.footer {
    background: linear-gradient(135deg, var(--verde) 0%, #047857 100%);
    color: white;
    padding: 3rem 2rem;
    margin-top: 4rem;
    box-shadow: 0 -4px 20px rgba(5, 150, 105, 0.3);
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    width: 100%;
    height: 10px;
    background: linear-gradient(to top, rgba(5, 150, 105, 0.2), transparent);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}

.footer-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.footer-content p {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* Alertas */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin: 1rem 0;
    font-weight: 500;
}

.alert-success {
    background: #D1FAE5;
    color: #059669;
    border-left: 4px solid #059669;
}

.alert-error {
    background: #FEE2E2;
    color: #DC2626;
    border-left: 4px solid #DC2626;
}

.alert-info {
    background: #DBEAFE;
    color: #3B82F6;
    border-left: 4px solid #3B82F6;
}

.alert-warning {
    background: #FEF3C7;
    color: #F59E0B;
    border-left: 4px solid #F59E0B;
}

/* Responsivo */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .table-container {
        overflow-x: scroll;
    }
}

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Botões de ação */
.action-btns {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-sm {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-view {
    background: rgba(59, 130, 246, 0.1);
    color: #3B82F6;
    border: 2px solid #3B82F6;
}

.btn-view:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: translateY(-2px);
}

.btn-report {
    background: rgba(5, 150, 105, 0.1);
    color: var(--verde);
    border: 2px solid var(--verde);
}

.btn-report:hover {
    background: rgba(5, 150, 105, 0.2);
    transform: translateY(-2px);
}