:root {
    --bg-color: #f4f6f8;
    --card-bg: #ffffff;
    --text-color: #333;
    --accent-color: #007bff;
    --border-radius: 12px;
}

/* GERAL E MOBILE */
* {
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

.container {
    width: 90%;
    max-width: 400px;
    text-align: center;
    padding-bottom: 20px;
}

.hidden { display: none !important; }
.fade-in { animation: fadeIn 0.5s ease-in; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* INPUTS MODERNOS */
input {
    width: 100%;
    padding: 16px 20px;
    margin-bottom: 16px;
    border: 2px solid #eef2f6;
    background-color: #f8fafc;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: #333;
    transition: all 0.3s ease;
    outline: none;
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    user-select: text !important;
}

input:focus {
    border-color: var(--accent-color);
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

input::placeholder { color: #a0aec0; }

/* BOTÕES */
button {
    padding: 15px 30px;
    border: none;
    background-color: var(--accent-color);
    color: white;
    font-weight: 600;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: 0.2s;
    font-size: 16px;
    width: 100%;
}
button:hover { opacity: 0.9; }
button:disabled { background-color: #ccc; cursor: not-allowed; }

.btn-link {
    background-color: transparent;
    color: #666;
    margin-top: 10px;
    font-weight: 400;
    font-size: 14px;
}
.btn-link:hover { color: var(--accent-color); text-decoration: underline; background: transparent; }

.error { color: #e63946; font-size: 0.9em; margin-top: 10px; min-height: 20px; }

/* HEADER DASHBOARD */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px 0;
}

.user-info {
    text-align: left;
    font-size: 1.5em;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.ola-text { font-size: 0.6em; color: #888; font-weight: 400; text-transform: uppercase; }
#user-display { cursor: pointer; transition: color 0.2s; }
#user-display:hover { color: var(--accent-color); }

.btn-logout {
    background-color: transparent;
    border: 1px solid #ffcccc;
    color: #e63946;
    padding: 8px 16px;
    font-size: 14px;
    width: auto;
    border-radius: 20px;
}
.btn-logout:hover { background-color: #e63946; color: white; }

/* SALDO E PRODUTOS */
.saldo-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}
.saldo-card .valor { font-size: 2.5em; font-weight: bold; color: var(--accent-color); }

.produtos-grid { display: flex; flex-direction: column; gap: 15px; }
.produto-card {
    background: var(--card-bg);
    padding: 15px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}
.produto-card:active { transform: scale(0.98); }
.produto-card .icon {
    background: #eef4ff; width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; margin-right: 15px;
}
.produto-card .icon img { width: 24px; height: 24px; display: block; }
.produto-card.disabled { cursor: not-allowed; background-color: #f9f9f9; opacity: 0.8; }

/* MODAL */
.modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 1000;
    display: flex; justify-content: center; align-items: center;
}
.modal-content {
    background: white; padding: 30px; border-radius: var(--border-radius);
    width: 85%; max-width: 320px; text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}
.actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 20px; }
.btn-cancelar { background-color: #e9ecef; color: #333; }

/* RESULTADOS (Inputs) */
.input-group { text-align: left; margin-bottom: 12px; }
.input-group label { font-size: 12px; font-weight: bold; color: #666; display: block; margin-bottom: 4px; }
.input-group input {
    margin-bottom: 0; padding: 10px; font-family: monospace; font-size: 14px;
}

/* HISTÓRICO LISTA */
.btn-voltar {
    background: none; color: #666; padding: 5px 0; font-size: 0.9em;
    border: none; cursor: pointer; width: auto; margin-bottom: 10px;
}
.historico-grid { display: flex; flex-direction: column; gap: 10px; }
.historico-item {
    background: white; padding: 15px; border-radius: 8px;
    display: flex; justify-content: space-between; align-items: center;
    cursor: pointer; border: 1px solid #eee;
}
.historico-item:active { background-color: #f0f4f8; }
.hist-info { display: flex; flex-direction: column; text-align: left; }
.hist-info span { font-size: 0.8em; color: #888; }
.hist-valor { font-weight: bold; color: var(--accent-color); }

/* =========================================
   BOTÃO WHATSAPP FLUTUANTE
   ========================================= */

.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 25px;
    right: 25px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2); /* Sombra suave */
    z-index: 1000; /* Garante que fique acima de tudo */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
    text-decoration: none; /* Remove sublinhado se houver */
}

/* Efeito ao passar o mouse ou tocar */
.whatsapp-float:hover,
.whatsapp-float:active {
    transform: scale(1.1); /* Aumenta levemente */
    background-color: #20bd5a; /* Verde um pouco mais escuro */
}

/* Garante que o ícone fique centralizado e branco */
.whatsapp-float svg {
    vertical-align: middle;
    width: 32px;
    height: 32px;
}