/* ============================================
   app.css - Estilos adicionais do Sistema Bazani
   ============================================ */

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Better focus for accessibility */
*:focus-visible {
    outline: 3px solid var(--border-focus, #86b7fe) !important;
    outline-offset: 2px !important;
}

/* Loading spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Table row click */
.table-clickable tbody tr {
    cursor: pointer;
}
.table-clickable tbody tr:hover {
    background-color: var(--bg-hover, #f1f3f5);
}

/* Card hover effect */
.card-hover {
    transition: transform 0.2s, box-shadow 0.2s;
}
.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Responsive table */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.875rem;
    }
    .btn-group-sm .btn {
        padding: 0.25rem 0.5rem;
    }
}

/* Print adjustments */
@media print {
    .no-print {
        display: none !important;
    }
    .card {
        border: 1px solid #000 !important;
        box-shadow: none !important;
    }
}

/* ============================================
   GUEST / LOGIN LAYOUT
   ============================================ */
.guest-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 45%, #558b2f 100%);
}

.dark-theme.guest-body {
    background: linear-gradient(135deg, #0f1f12 0%, #143318 50%, #1b3a1f 100%);
}

.high-contrast-theme.guest-body {
    background: #000;
}

.guest-main {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5rem 1rem 2rem;
    position: relative;
    z-index: 2;
}

.guest-card-wrapper {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
}

.guest-card {
    border-radius: 1rem;
    border: none;
    animation: guestFadeIn 0.5s ease;
}

@keyframes guestFadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.guest-logo {
    width: 72px;
    height: 72px;
    margin: 0 auto;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #43a047, #66bb6a);
    color: #fff;
    font-size: 2rem;
    box-shadow: 0 6px 18px rgba(27, 94, 32, 0.4);
}

.guest-theme-bar {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
}

.guest-theme-btn {
    border-color: rgba(255, 255, 255, 0.7);
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(4px);
}

.guest-theme-btn:hover,
.guest-theme-btn:focus-visible {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    border-color: #fff;
}

.guest-footer {
    text-align: center;
    padding: 1rem;
    color: rgba(255, 255, 255, 0.85);
    position: relative;
    z-index: 2;
    font-size: 0.875rem;
}

.guest-error-toast {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-danger, #dc3545);
    color: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    z-index: 1080;
    animation: guestFadeIn 0.3s ease;
    max-width: 90vw;
}

/* Bolhas decorativas animadas no fundo */
.guest-bubbles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.guest-bubbles span {
    position: absolute;
    bottom: -120px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    animation: guestBubble 14s infinite ease-in;
}

.guest-bubbles span:nth-child(1) { left: 12%; animation-duration: 12s; }
.guest-bubbles span:nth-child(2) { left: 28%; width: 22px; height: 22px; animation-duration: 16s; animation-delay: 1s; }
.guest-bubbles span:nth-child(3) { left: 45%; width: 60px; height: 60px; animation-duration: 20s; animation-delay: 2s; }
.guest-bubbles span:nth-child(4) { left: 68%; width: 28px; height: 28px; animation-duration: 15s; animation-delay: 0s; }
.guest-bubbles span:nth-child(5) { left: 85%; width: 50px; height: 50px; animation-duration: 18s; animation-delay: 3s; }

@keyframes guestBubble {
    0% { bottom: -120px; transform: translateX(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { bottom: 120%; transform: translateX(40px); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .guest-card,
    .guest-bubbles span,
    .guest-error-toast {
        animation: none !important;
    }
}
