/* DrogaVen Conecta — mesma identidade visual do site em PHP. */
:root {
    --conecta-azul: #010d2c;
    --conecta-dourado: #cda670;
    --conecta-dourado-escuro: #b8925c;
}

/* ── Telas de acesso (login, cadastro, senha) ─────────────── */
body.acesso {
    background: var(--conecta-azul);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    color: #fff;
}
.acesso-caixa { padding: 20px; max-width: 360px; width: 100%; text-align: center; }
.acesso-caixa img.logo { height: 100px; }
.acesso-caixa .form-control { border-radius: 50px; margin-bottom: 6px; }
.acesso-caixa .form-erro { color: #ffb4b4; font-size: 13px; text-align: left; margin: -2px 0 6px 14px; }
.acesso-caixa .alerta { background: rgba(255,255,255,.1); border-left: 4px solid #e74a3b; border-radius: 6px;
    padding: 10px 12px; font-size: 14px; text-align: left; margin-top: 16px; }
.acesso-caixa .alerta.ok { border-left-color: #16a34a; }
.acesso-caixa p.texto { font-size: 15px; opacity: .9; }
.btn-conecta { font-size: 18px; background: var(--conecta-dourado); border-radius: 50px; font-weight: bold;
    color: #fff; padding: 6px 28px; border: none; }
.btn-conecta:hover, .btn-conecta:focus { background: var(--conecta-dourado-escuro); color: #fff; }
.link-conecta { color: var(--conecta-dourado); text-decoration: none; display: inline-block; margin-top: 10px; }
.link-conecta:hover { color: var(--conecta-dourado-escuro); }

/* ── Tela de estoque do propagandista ─────────────────────── */
body.app { height: 100vh; height: 100dvh; margin: 0; overflow: hidden; background: #f0f2f5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; }
.app-wrapper { display: flex; flex-direction: column; height: 100%; }
.app-header, .app-footer { flex: 0 0 auto; background: var(--conecta-azul); display: flex; align-items: center;
    justify-content: space-between; padding: 10px 16px; gap: 10px; }
.app-footer { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
.app-header img { height: 36px; }
.app-header-user { color: #fff; font-size: 12px; opacity: .8; text-align: right; line-height: 1.3;
    overflow: hidden; text-overflow: ellipsis; max-width: 60%; }
.app-controls { flex: 0 0 auto; background: #fff; padding: 10px 12px 8px; box-shadow: 0 2px 6px rgba(0,0,0,.08);
    display: flex; flex-direction: column; gap: 8px; }
.search-box { position: relative; }
.search-box input { width: 100%; height: 42px; padding: 0 42px 0 14px; border-radius: 21px; border: 1.5px solid #d1d5db;
    background: #f9fafb; font-size: 14px; text-transform: uppercase; outline: none; }
.search-box input:focus { border-color: var(--conecta-azul); background: #fff; }
.search-box .btn-search { position: absolute; right: 0; top: 0; height: 42px; width: 42px; border: none;
    background: var(--conecta-azul); border-radius: 0 21px 21px 0; color: #fff; }
.selects-row { display: flex; gap: 8px; align-items: center; }
.selects-row select { flex: 1; height: 40px; padding: 0 10px; border-radius: 20px; border: 1.5px solid #d1d5db;
    background: #f9fafb; font-size: 13px; text-transform: uppercase; min-width: 0; }
.btn-maps { flex: 0 0 40px; height: 40px; width: 40px; border: none; border-radius: 50%; background: #f0f2f5;
    font-size: 18px; color: #d9534f; }
.app-info { font-size: 11px; color: #6b7280; display: flex; justify-content: space-between; gap: 8px; }
.app-table { flex: 1 1 0; min-height: 0; overflow: auto; background: #fff; }
.app-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.app-table thead th { position: sticky; top: 0; background: var(--conecta-azul); color: #fff; font-size: 12px;
    padding: 8px 10px; text-align: left; }
.app-table td { padding: 8px 10px; border-bottom: 1px solid #e5e7eb; }
.app-table tbody tr:nth-child(even) { background: #f9fafb; }
.app-table .num { text-align: right; white-space: nowrap; }
.app-table .ean { font-size: 11px; color: #4b5563; font-variant-numeric: tabular-nums; }
@media (max-width: 576px) { .app-table .ean { max-width: 110px; word-break: break-all; } }
.app-table tfoot td { position: sticky; bottom: 0; background: #f0f2f5; border-top: 2px solid var(--conecta-azul);
    font-weight: 700; }
.app-table .vazio { text-align: center; color: #6b7280; padding: 30px 10px; }
.btn-baixar, .btn-sair { flex: 1; height: 40px; border-radius: 20px; color: #fff; font-size: 14px; font-weight: 600;
    display: flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; }
.btn-baixar { border: none; background: #16a34a; }
.btn-baixar:hover { background: #15803d; color: #fff; }
.btn-sair { border: 1.5px solid rgba(255,255,255,.3); background: transparent; width: 100%; }
.app-footer form { flex: 1; margin: 0; }

/* ── Dashboard do médico ──────────────────────────────────── */
body.medico { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: #eef2f5; padding: 70px 0 30px; }
.medico header { background: var(--conecta-azul); height: 60px; position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    display: flex; justify-content: space-between; align-items: center; padding: 0 15px; box-shadow: 0 2px 5px rgba(0,0,0,.2); }
.medico header img { height: 40px; }
.medico header .quem { text-align: right; color: #fff; }
.medico header .quem strong { display: block; font-size: .95rem; }
.medico header .quem span { font-size: .75rem; opacity: .8; }
.medico main { max-width: 1000px; margin: 0 auto; background: #fff; box-shadow: 0 0 10px rgba(0,0,0,.05); }
.medico .bloco { border-bottom: 1px solid #e0e0e0; padding-bottom: 15px; margin-bottom: 15px;
    display: flex; flex-direction: column; align-items: center; }
.medico .titulo { width: 100%; background: #f8f9fa; color: #444; font-size: .85rem; text-transform: uppercase;
    letter-spacing: .5px; padding: 10px 15px; font-weight: 700; border-bottom: 1px solid #eee;
    border-left: 4px solid var(--conecta-azul); margin-bottom: 10px; }
.medico .bloco img { max-width: 100%; height: auto; max-height: 80vh; object-fit: contain; }
.medico .indisponivel { padding: 30px; text-align: center; color: #999; font-size: .9rem; background: #fafafa;
    border: 1px dashed #ccc; margin: 10px; border-radius: 4px; width: 90%; }
@media (max-width: 768px) {
    body.medico { background: #fff; }
    .medico .bloco { margin-bottom: 0; padding-bottom: 20px; border-bottom: 8px solid #f0f2f5; }
    .medico .bloco img { max-height: 70vh; }
}
