/* --- Login Page --- */
.login-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 85vh;
    position: relative;
    padding-bottom: 60px;
    box-sizing: border-box;
}

.login-card {
    background: var(--cor-fundo-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 40px 36px;
    width: 100%;
    max-width: 400px;
    border: 1px solid var(--cor-borda-leve);
    position: relative;
    margin-top: 40px;
}

.login-header {
    text-align: center;
    margin-bottom: 28px;
}

.login-brand {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--cor-primaria);
    margin: 0 0 6px 0;
    letter-spacing: -1px;
}

.login-subtitle {
    margin: 0;
    font-size: 0.85rem;
    color: var(--cor-texto-leve);
}

.login-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--cor-borda);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.login-input:focus {
    outline: none;
    border-color: var(--cor-primaria);
    box-shadow: 0 0 0 3px rgba(0, 83, 156, 0.1);
}

.login-submit {
    width: 100%;
    padding: 12px;
    background: var(--cor-primaria);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 8px;
}

.login-submit:hover {
    background: #003d73;
}

/* --- Login Footer --- */
.login-footer {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: #94a3b8;
    white-space: nowrap;
    z-index: 10;
}

.footer-link {
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s, text-shadow 0.2s;
}

.footer-link:hover {
    color: var(--cor-primaria);
    text-shadow: 0 0 10px rgba(0, 83, 156, 0.1);
}

.footer-dot {
    color: #cbd5e1;
    font-weight: bold;
}

/* --- Gardi Popup --- */
.gardi-popup-btn {
    position: absolute;
    top: -45px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 15px;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    padding: 10px 25px 10px 10px;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(14, 165, 233, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 9999;
    border: 3px solid #e0f2fe;
    animation: float-gardi 3s ease-in-out infinite, pulse-gardi 2s infinite;
    width: max-content;
}

.gardi-popup-btn:hover {
    transform: translateX(-50%) translateY(-5px) scale(1.05);
    box-shadow: 0 15px 35px rgba(14, 165, 233, 0.6);
    border-color: #fff;
    animation: float-gardi 3s ease-in-out infinite;
}

.gardi-popup-icon {
    width: 48px;
    height: 48px;
    background: #1e293b;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.5);
    border: 2px solid #38bdf8;
}

.gardi-popup-icon svg {
    width: 30px;
    height: 30px;
}

.gardi-popup-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.gardi-popup-badge {
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: 900;
    color: #e0f2fe;
    background: rgba(0,0,0,0.2);
    padding: 2px 8px;
    border-radius: 12px;
    width: max-content;
    margin-bottom: 2px;
    letter-spacing: 1px;
}

.gardi-popup-text {
    color: #fff;
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

@keyframes float-gardi {
    0%, 100% { top: -45px; }
    50% { top: -55px; }
}

@keyframes pulse-gardi {
    0% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(14, 165, 233, 0); }
    100% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0); }
}

/* --- Auditoria / Logs Page --- */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--cor-borda-leve);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--cor-texto-leve);
    font-weight: 600;
    text-transform: uppercase;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--cor-primaria);
}

.log-row-critical {
    background-color: #fff5f5 !important;
}

.log-row-critical:hover {
    background-color: #ffe8e8 !important;
}

.log-user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-danger {
    background-color: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.badge-success {
    background-color: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.badge-info {
    background-color: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.log-details {
    font-size: 0.9rem;
    color: var(--cor-texto);
    max-width: 400px;
}

/* --- Table Audit Extras --- */
.table-audit td {
    vertical-align: middle;
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
}

.log-user-role {
    font-size: 0.72rem;
    color: var(--cor-texto-leve);
    font-weight: 500;
    text-transform: uppercase;
    margin-top: 2px;
}

.log-ip {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.82rem;
    color: #555;
}

.text-info {
    color: #0288d1 !important;
}
