/* Paleta Dark Mode */
:root {
    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;
    --text-color: #e0e0e0;
    --text-muted: #a0a0a0;
    --header-bg: #1f2a38;
    --accent-color: #007bff;
    --accent-hover: #0056b3;
    --border-color: #333333;
    --input-bg: #2b2b2b;
    --shadow-color: rgba(0, 0, 0, 0.4);
    --margin-high-color: #4ade80; 
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

header {
    background-color: var(--header-bg);
    color: white;
    padding: 15px 40px; 
    box-shadow: 0 4px 8px var(--shadow-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-container {
    display: flex;
    align-items: center;
    gap: 15px; 
}

#app-logo {
    max-height: 45px; 
    width: auto;
    object-fit: contain;
}

header h1 {
    margin: 0;
    font-size: 1.5rem;
}

.user-info {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

main {
    padding: 20px;
    max-width: 1400px; 
    margin: 20px auto;
}

#auth-view {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 85vh;
}

#auth-container {
    background-color: var(--bg-secondary);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
    width: 100%;
    max-width: 450px;
    border: 1px solid var(--border-color);
}

.auth-header {
    text-align: center;
    margin-bottom: 25px;
}
.auth-header h2 {
    margin: 0 0 5px 0;
    font-size: 1.8rem;
    color: white;
}
.auth-header p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

#auth-tabs {
    display: flex;
    margin-bottom: 25px;
    background-color: var(--bg-primary);
    padding: 4px;
    border-radius: 8px;
}

.auth-tab {
    flex-grow: 1;
    padding: 10px;
    background: transparent;
    color: var(--text-muted);
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    border-radius: 6px;
}

.auth-tab.active {
    background: var(--bg-secondary);
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

#login-form, #register-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.input-group label {
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--text-muted);
    margin-left: 2px;
}

input[type="text"], 
input[type="email"], 
input[type="password"], 
input[type="date"],
input[type="number"],
select {
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--input-bg);
    color: white;
    font-size: 1rem;
    transition: all 0.2s;
    outline: none;
    width: 100%;
    box-sizing: border-box;
}

input:focus, select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
    background-color: #333;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.phone-container {
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--input-bg);
}

.phone-container:focus-within {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.phone-container select {
    width: auto;
    border: none;
    background-color: transparent;
    border-right: 1px solid var(--border-color);
    border-radius: 0;
    padding-right: 5px;
}

.phone-container input {
    border: none;
    background-color: transparent;
}

.form-section-title {
    margin: 10px 0 5px 0;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5px;
}

.terms-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 5px;
}
.terms-check input {
    width: auto;
    accent-color: var(--accent-color);
}

.btn-primary {
    background: var(--accent-color);
    color: white;
    font-weight: bold;
    cursor: pointer;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 1rem;
    margin-top: 10px;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-primary:disabled {
    background: #555;
    cursor: not-allowed;
}

.error-message {
    color: #ff4d4d;
    font-weight: bold;
    margin-top: 5px;
    text-align: center;
    font-size: 0.9rem;
}

.small-info {
    font-size: 0.8rem;
    color: #666;
    text-align: center;
    margin-top: 10px;
}

#btn-logout {
    margin-left: 15px;
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

#search-container {
    margin-bottom: 20px;
}

#search-input {
    width: 100%;
    padding: 15px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 1.1em;
    outline: none;
    transition: border-color 0.3s;
    box-shadow: 0 2px 4px var(--shadow-color);
    box-sizing: border-box; 
}

#search-input:focus {
    border-color: var(--accent-color);
}
#search-input::placeholder {
    color: #666;
}

#dashboard-filters {
    background-color: var(--bg-secondary);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    border-left: 5px solid var(--accent-color);
    box-shadow: 0 2px 4px var(--shadow-color);
}

#dash-period-select, #dash-date-start, #dash-date-end, #dash-odd-comparison { 
    padding: 10px;
    border-radius: 5px;
    background-color: var(--bg-primary);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    font-weight: bold;
}

#dash-custom-dates {
    display: flex;
    align-items: center;
    gap: 10px;
}

#btn-dash-filter {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}
#btn-dash-filter:hover {
    background-color: #0056b3;
}

#abas-container {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    padding: 10px;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    box-shadow: 0 2px 4px var(--shadow-color);
    flex-wrap: wrap; 
}

.tab-button {
    padding: 12px 20px;
    border: none;
    background-color: var(--bg-primary);
    color: var(--text-color);
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s;
    font-weight: bold;
    border: 1px solid var(--border-color);
    white-space: nowrap;
    flex-grow: 1; 
}

.tab-button:hover:not(.active) {
    background-color: #2a2a2a;
}

.tab-button.active {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

#lista-apostas {
    display: grid;
    grid-template-columns: 1fr 1fr; 
    gap: 20px;
}

.aposta-card {
    background-color: var(--bg-secondary);
    padding: 12px; 
    border-radius: 8px;
    box-shadow: 0 4px 6px var(--shadow-color);
    transition: transform 0.2s;
    border-left: 5px solid var(--accent-color); 
    height: auto; 
    min-height: 420px;
    overflow: hidden; 
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.aposta-card:hover {
    transform: translateY(-3px);
}

.header-aposta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 8px;
}

.campeonato-data-large {
    font-size: 1.15em;
    font-weight: 500;
    color: var(--text-color);
}
.campeonato-data-large strong {
    color: var(--accent-color);
    font-weight: bold;
}

.status-aposta {
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
}

.confronto-box {
    background-color: #1a232b; 
    padding: 10px;
    border-radius: 5px;
    margin: 8px 0;
    font-size: 1.1em;
    font-weight: bold;
    color: #f1f1f1;
    text-align: center;
    line-height: 1.4;
}

.detalhes-aposta p {
    margin: 5px 0;
    font-size: 0.95em;
}

.apostar-em-highlight {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #273747; 
    padding: 6px 10px; 
    border-radius: 5px;
    margin-bottom: 8px; 
}

.apostar-em-highlight p {
    margin: 0 !important;
    font-size: 1.1em;
    color: white;
}

.apostar-em-highlight strong {
    color: var(--margin-high-color);
}

.btn-copiar {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: bold;
    transition: background-color 0.2s;
}
.btn-copiar:hover {
    background-color: #0056b3;
}

.odds-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px 15px; 
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 10px;
}
.odds-grid p {
    margin: 0 !important;
    white-space: nowrap;
}
.odds-grid p:nth-child(3) {
    grid-column: 1 / -1; 
}

.botoes-gestao {
    margin-top: 5px;
    display: flex;
    gap: 10px;
}

.btn-marcar {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
    color: white;
}

.aposta-card.status-a-fazer { border-left-color: #007bff; }
.aposta-card.status-a-fazer .status-aposta { background-color: #007bff30; color: #007bff; }
.btn-green { background-color: #28a745; }
.btn-green:hover { background-color: #1e7e34; }
.btn-red { background-color: #dc3545; }
.btn-red:hover { background-color: #c82333; }
.aposta-card.status-em-aberto { border-left-color: #ffc107; }
.aposta-card.status-em-aberto .status-aposta { background-color: #ffc10730; color: #ffc107; }
.btn-grey { background-color: #6c757d; }
.btn-grey:hover { background-color: #5a6268; }
.aposta-card.status-em-andamento { border-left-color: #fd7e14; }
.aposta-card.status-em-andamento .status-aposta { background-color: #fd7e1430; color: #fd7e14; }
.aposta-card.status-revisao { border-left-color: #6f42c1; }
.aposta-card.status-revisao .status-aposta { background-color: #6f42c130; color: #6f42c1; }
.btn-push { background-color: #17a2b8; }
.btn-push:hover { background-color: #138496; }
.aposta-card.status-green { border-left-color: #28a745; }
.aposta-card.status-green .status-aposta { background-color: #28a74530; color: #28a745; }
.aposta-card.status-red { border-left-color: #dc3545; }
.aposta-card.status-red .status-aposta { background-color: #dc354530; color: #dc3545; }
.aposta-card.status-push { border-left-color: #17a2b8; }
.aposta-card.status-push .status-aposta { background-color: #17a2b830; color: #17a2b8; }

#dashboard-view {
    display: grid; 
}
#dashboard-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    gap: 20px;
    margin-bottom: 30px;
}
.metric-card {
    background-color: var(--bg-secondary);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px var(--shadow-color);
    text-align: center;
    border-top: 5px solid;
}
.metric-card h3 {
    color: var(--text-color);
    margin-top: 0;
    font-size: 1.1em;
}
.metric-card p {
    font-size: 2.5em;
    font-weight: bold;
    margin: 5px 0 0;
}
.metric-total { border-color: #007bff; }
.metric-green { border-color: #28a745; }
.metric-red { border-color: #dc3545; }
.metric-push { border-color: #ffc107; }
#chart-container {
    grid-column: 1 / -1; 
    background-color: var(--bg-secondary);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px var(--shadow-color);
    height: 450px; 
    position: relative; 
}

.casas-container {
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 10px; 
}

.casa-badge {
    padding: 6px 10px;
    border-radius: 5px;
    font-size: 0.9em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
}
.kp-badge {
    background-color: #1a2e22;
    color: #4ade80;
    border: 1px solid #4ade80;
}
.blaze-badge {
    background-color: #2e1a1a;
    color: #ff4d4d;
    border: 1px solid #ff4d4d;
}

.titulo-sugestao {
    margin: 0 0 5px 0;
    font-size: 0.85em;
    color: #888;
    font-weight: normal;
    grid-column: 1 / -1; 
    width: 100%;
    text-align: center; 
}

.admin-header {
    background-color: #2c0e40 !important;
}

main#app-view #lista-apostas {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.admin-card {
    padding: 12px; 
    max-width: none; 
    margin: 0; 
    border: 1px solid var(--border-color);
    border-left: 5px solid #6f42c1; 
}
.admin-card .apostar-em-highlight {
    background-color: #311e40;
}

.admin-card .confronto-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.btn-copy-admin {
    background: #6f42c1;
    color: white;
    border: none;
    padding: 8px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.2s;
    margin-left: 10px;
}
.btn-copy-admin:hover {
    background: #5a359e;
}

.admin-card .odds-grid {
    border-bottom: none;
}

.badge-odd-check {
    font-size: 0.75em;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 10px;
    white-space: nowrap;
}

.badge-ok {
    background-color: rgba(74, 222, 128, 0.15);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.4);
    box-shadow: 0 0 5px rgba(74, 222, 128, 0.1);
}

.badge-low {
    background-color: rgba(255, 77, 77, 0.15);
    color: #ff4d4d;
    border: 1px solid rgba(255, 77, 77, 0.4);
}

/* --- MODAL DE CONFIGURAÇÃO (NOVO ESTILO) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(3px);
}

.modal-box {
    background-color: var(--bg-secondary);
    width: 90%;
    max-width: 400px;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    border: 1px solid var(--border-color);
    position: relative;
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.modal-header h3 { margin: 0; color: var(--text-color); }

.btn-close-modal {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}
.btn-close-modal:hover { color: white; }

#btn-config {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s;
    margin-left: 10px;
}
#btn-config:hover {
    background: var(--bg-secondary);
    color: var(--accent-color);
    border-color: var(--accent-color);
}

/* ESTILOS NOVOS PARA O ALERTA E BOTÃO DE TESTE */
.steps-alert {
    background-color: rgba(0, 123, 255, 0.1); 
    border: 1px solid #007bff;
    border-radius: 8px;
    padding: 15px;
    font-size: 0.9rem;
    color: #e0e0e0;
    margin-bottom: 20px;
}

.steps-alert p {
    margin: 0 0 10px 0;
    color: #007bff; 
}

.steps-alert ol {
    margin: 0;
    padding-left: 20px;
}

.steps-alert li {
    margin-bottom: 8px;
}

.link-destaque {
    color: #4ade80; 
    font-weight: bold;
    text-decoration: none;
    border-bottom: 1px dotted #4ade80;
}

.link-destaque:hover {
    color: #fff;
    border-bottom-style: solid;
}

.input-with-btn {
    display: flex;
    gap: 8px;
}

.btn-test-telegram {
    background-color: #6f42c1; /* Roxo */
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0 15px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
    white-space: nowrap;
}

.btn-test-telegram:hover {
    background-color: #5a359e;
}
