/* Estilos Principais - Banco do Povo PWA */

/* Reset e Estilos Básicos */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* Container Principal */
.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Cabeçalho */
.app-header {
    background-color: #006633; /* Verde institucional */
    color: white;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-header h1 {
    font-size: 1.5rem;
    margin-top: 5px;
}

.logo-header {
    height: 40px;
    margin-bottom: 5px;
}

/* Rodapé */
.app-footer {
    background-color: #f0f0f0;
    padding: 15px;
    text-align: center;
    font-size: 0.8rem;
    color: #666;
    margin-top: auto;
    border-top: 1px solid #ddd;
}

.small {
    font-size: 0.7rem;
    opacity: 0.7;
}

/* Conteúdo Principal */
main {
    flex: 1;
    padding: 20px;
}

/* Logo */
.logo {
    display: block;
    margin: 0 auto 20px;
    max-width: 200px;
    height: auto;
}

.logo-splash {
    width: 200px;
    height: auto;
    margin-bottom: 30px;
}

/* Splash Screen */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #006633;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-bar {
    width: 70%;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.loading-progress {
    width: 100%;
    height: 100%;
    background-color: white;
    position: absolute;
    left: -100%;
    animation: loading 2s linear forwards;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 0;
    }
}

/* Área de Boas-vindas */
.welcome-screen {
    text-align: center;
    padding: 20px;
}

.welcome-screen h1 {
    color: #006633;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.security-message {
    margin: 20px 0;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 10px;
    border: 1px solid #eee;
}

/* Botões */
.btn {
    display: block;
    width: 100%;
    padding: 15px;
    margin: 15px 0;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.primary-btn {
    background-color: #006633;
    color: white;
}

.primary-btn:hover, .primary-btn:focus {
    background-color: #004d26;
}

.secondary-btn {
    background-color: #e0e0e0;
    color: #333;
}

.secondary-btn:hover, .secondary-btn:focus {
    background-color: #d0d0d0;
}

/* Animação Pulse */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Ajuda de Localização */
.location-help {
    margin-top: 30px;
    padding: 15px;
    background-color: #f8f9fa;
    border: 1px dashed #ccc;
    border-radius: 10px;
    font-size: 0.9rem;
}

.browser-icon {
    font-size: 30px;
    margin: 10px;
}

/* Tela de Carregamento */
.loading-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px;
    min-height: 60vh;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #006633;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.status-message {
    margin: 15px 0;
    padding: 10px;
    border-radius: 5px;
    width: 100%;
    text-align: center;
}

.status-message.error {
    background-color: #f8d7da;
    color: #721c24;
}

.status-message.success {
    background-color: #d4edda;
    color: #155724;
}

.status-message.loading {
    background-color: #fff3cd;
    color: #856404;
}

/* Área de Login */
.login-area {
    padding: 15px;
}

.saved-account-info {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid #006633;
}

.saved-account-info h2 {
    color: #006633;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.account-details {
    font-size: 0.9rem;
}

.account-details p {
    margin: 5px 0;
}

/* Formulário */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 0.8rem;
}

.password-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 0.8rem;
}

.show-password {
    display: flex;
    align-items: center;
}

.show-password input {
    margin-right: 5px;
}

.forgot-password {
    color: #006633;
    text-decoration: none;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* Dicas de Segurança */
.security-tips {
    margin-top: 30px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.security-tips h3 {
    color: #006633;
    font-size: 1rem;
    margin-bottom: 10px;
}

.security-tips ul {
    padding-left: 20px;
    font-size: 0.9rem;
}

.security-tips li {
    margin-bottom: 5px;
}

/* Página de Bloqueio */
.blocked-area {
    padding: 15px;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
}

.alert.warning {
    background-color: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.alert.error {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert.success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert h2 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.options-box {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.options-box h3 {
    font-size: 1rem;
    margin-bottom: 15px;
    text-align: center;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 15px 0;
    color: #666;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #ddd;
}

.divider::before {
    margin-right: 10px;
}

.divider::after {
    margin-left: 10px;
}

.security-info {
    background-color: #f0f0f0;
    padding: 15px;
    border-radius: 5px;
    font-size: 0.9rem;
}

.security-info h4 {
    color: #dc3545;
    margin-bottom: 10px;
}

/* Contagem regressiva */
.countdown {
    text-align: center;
    margin: 20px 0;
}

.timer {
    font-size: 2rem;
    font-weight: bold;
    color: #006633;
    margin: 10px 0;
}

/* Responsividade */
@media (min-width: 768px) {
    .container {
        max-width: 768px;
        margin: 0 auto;
        border-left: 1px solid #eee;
        border-right: 1px solid #eee;
    }
    
    .btn {
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }
}
