
:root{
  --bg:#0f1115;--panel:#151a22;--accent:#5da7ff;--text:#e8edf3;--muted:#9aa6b2;
  --danger:#ff5d73;--ok:#28c76f;--border:#242b36;
}
*{box-sizing:border-box}
body{margin:0;padding:24px;background:radial-gradient(1000px 1000px at 80% -10%,#162032 0%,#0f1115 60%);
  color:var(--text);font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Arial}
.card{background:linear-gradient(180deg,#151a22 0%,#11161e 100%);border:1px solid var(--border);
  border-radius:14px;padding:18px;margin:0 auto;max-width:980px;min-height:90%;
  box-shadow:0 10px 30px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.02)}
.header{display:flex;align-items:center;margin-bottom:12px}
.brand{display:flex;gap:12px;align-items:center}
.logo{width:56px;height:56px;border-radius:12px;border:1px solid var(--border)}
h1{font-size:1.35rem;margin:0;font-weight:650;letter-spacing:.2px}
.subtitle{color:var(--muted);margin-top:2px}
label{display:block;font-size:.85rem;color:var(--muted);margin-bottom:6px}
input[type="text"],input[type="number"]{width:100%;padding:12px 12px;border-radius:10px;border:1px solid var(--border);
  background:#0e141b;color:var(--text);outline:none;font-size:.95rem;transition:border-color .2s, box-shadow .2s}
input[type="text"]:focus,input[type="number"]:focus{border-color:var(--accent);box-shadow:0 0 0 3px rgba(93,167,255,.12)}
.btn{display:inline-block;background:#0d1a28;border:1px solid var(--border);color:var(--text);
  padding:8px 12px;border-radius:10px;font-weight:600;cursor:pointer}
.btn.small{margin-top:1px;font-size:.85rem}
.grid-3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:12px;margin-bottom:12px}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:12px}
.grid-4{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:12px}
@media (max-width: 900px){.grid-3,.grid-2,.grid-4{grid-template-columns:1fr}}
.help{font-size:.85rem;color:var(--muted);margin-top:4px}
.small{font-size:.84rem}
.slider-wrap{background:#0e141b;border:1px solid var(--border);border-radius:10px;padding:12px}
.slider-line{display:flex;align-items:center;gap:10px}
input[type="range"]{width:100%}
.pill{display:inline-block;min-width:74px;text-align:center;padding:6px 10px;border-radius:999px;background:#0d1a28;border:1px solid var(--border);
  color:var(--text);font-weight:600;font-size:.9rem}
.grid-2tbl{display:grid;grid-template-columns:1fr 1fr;gap:3px;margin-bottom:3px}
.stattbl{padding:3px;border:1px solid var(--border);border-radius:10px;background:#0e141b}
.stat{padding:12px;border:1px solid var(--border);border-radius:10px;background:#0e141b}
.stat .k{font-size:.78rem;color:var(--muted)}
.stat .v{font-size:1.02rem;font-weight:650;margin-top:4px}
.foot{margin-top:4px;font-size:.86rem}
.err{color:var(--danger);font-weight:600}
.tip .k{display:flex;align-items:center;gap:8px}
.disclaimer{font-size:.78rem;color:var(--muted)}
.link{color:inherit !important; text-decoration: none;}
.linkb{color:inherit !important; text-decoration: none; font-weight: bolder;}
.price-box {
  position: relative;
  display: flex;
  align-items: center;
}

.price-box input {
  flex: 1;
  padding-right: 90px; /* espaço para o botão */
}

.price-box .btn.inside {
  position: absolute;
  right: 6px;
  height: 70%;
  padding: 0 10px;
  font-size: 0.85rem;
  background: #1a2432;
  border: 1px solid #2a3345;
  color: #e8edf3;
  border-radius: 8px;
  cursor: pointer;
}
.price-box .btn.inside:hover {
  background: #24334a;
}
/* table visuals (keeps original palette) */
.table-apr { width:100%; border-collapse:collapse; margin-top:20px; text-align:center; }
.table-apr th, .table-apr td { border:1px solid #242b36; padding:8px; }
.table-apr th { background:#1b2230; color:#e8edf3; }
.table-apr td { background:#0e141b; }

/* combobox styled to look like button */
select#cmbperiod {
  width:120px;
  background-color: #0f141b;      /* mesma cor de fundo do input */
  color: #e8edf3;                 /* mesma cor do texto */
  border: 1px solid #242b36;      /* mesma borda */
  border-radius: 8px;             /* arredondamento igual */
  padding: 10px 12px;             /* mesmo espaçamento interno */
  font-weight: bold;              /* texto em negrito */
  font-size: 0.9rem;              /* mesmo tamanho de fonte */
  height: 40px;                   /* mesma altura do input */
  line-height: normal;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
}

/* add a little caret feel */
select#cmbperiod { background-image: linear-gradient(45deg, transparent 50%, #9aa6b2 50%), linear-gradient(135deg, #9aa6b2 50%, transparent 50%); background-position: calc(100% - 16px) 16px, calc(100% - 11px) 16px; background-size: 5px 5px, 5px 5px; background-repeat:no-repeat; }

/* push the Calculate button slightly to the right */
#btnCalc { margin-left: 10px; }
.link-active {
    font-weight:bolder;
}

.hrtbl {
    border:0 !important; border-top:2px solid #666666 !important; margin:1px;
}
.hrfoot {
    border: 0 !important;
    border-top: 2px solid #666666 !important;
    margin: 1px;
}
.linkfoot {
    color: inherit !important;
    text-decoration: none;
    margin-top:0.5em;
}
.btn-tooltip {
    position: relative;
    cursor: pointer;
}

    /* Tooltip (balão) */
    .btn-tooltip::after {
        content: attr(data-tip);
        position: absolute;
        bottom: 120%;
        left: 50%;
        transform: translateX(-50%);
        background: orange; /* <<< FUNDO LARANJA */
        color: black; /* <<< TEXTO PRETO   */
        padding: 6px 10px;
        border-radius: 6px;
        white-space: nowrap;
        font-size: 12px;
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease;
        z-index: 9999;
        border: 1px solid #a86b00; /* borda opcional */
    }

    /* Setinha do tooltip */
    .btn-tooltip::before {
        content: "";
        position: absolute;
        bottom: 110%;
        left: 50%;
        transform: translateX(-50%);
        border-width: 6px;
        border-style: solid;
        border-color: orange transparent transparent transparent; /* mesma cor do fundo */
        opacity: 0;
        transition: opacity .2s ease;
    }

    /* Mostra tudo no hover */
    .btn-tooltip:hover::after,
    .btn-tooltip:hover::before {
        opacity: 1;
    }

.mytooltip {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

    /* Balão */
    .mytooltip::after {
        content: attr(data-tip);
        position: absolute;
        bottom: 120%; /* acima da imagem */
        left: 50%;
        transform: translateX(-50%);
        background: lightblue;
        color: black; /* texto preto */
        padding: 6px 10px;
        border-radius: 6px;
        white-space: nowrap;
        font-size: 12px;
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease;
        border: 1px solid #000000; /* borda opcional */
        z-index: 9999;
    }

    /* Setinha */
    .mytooltip::before {
        content: "";
        position: absolute;
        bottom: 110%;
        left: 50%;
        transform: translateX(-50%);
        border-width: 6px;
        border-style: solid;
        border-color: orange transparent transparent transparent;
        opacity: 0;
        transition: opacity .2s ease;
        z-index: 9999;
    }

    /* Mostrar no hover */
    .mytooltip:hover::after,
    .mytooltip:hover::before {
        opacity: 1;
    }
/* Container para permitir estilização */
.custom-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 19px; /* padrão é 16px → +3px */
    height: 19px;
    border: 2px solid #555;
    border-radius: 4px;
    background-color: #1a1a1a;
    cursor: pointer;
    display: inline-block;
    transition: all 0.15s ease-in-out;
    position: relative;
    margin-bottom: -4px;
}

    /* Hover */
    .custom-checkbox:hover {
        border-color: #888;
    }

    /* Foco (acessibilidade) */
    .custom-checkbox:focus {
        outline: none;
        box-shadow: 0 0 4px #4e9eff40;
    }

    /* Quando marcado */
    .custom-checkbox:checked {
        background-color: #4e9eff;
        border-color: #4e9eff;
    }

        /* Ícone de check */
        .custom-checkbox:checked::after {
            content: "";
            position: absolute;
            left: 5px;
            top: 2px;
            width: 5px;
            height: 10px;
            border: solid #fff;
            border-width: 0 2.3px 2.3px 0;
            transform: rotate(45deg);
        }
.alert-cell {
    text-align: center;
}

/* container geral do toggle */
.alert-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* esconde o checkbox padrão */
.toggle-input {
    display: none;
}

/* trilho */
.toggle-label {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 24px;
    border-radius: 999px;
    background: #1a2735;
    border: 1px solid #233447;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

/* “botão” */
.toggle-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e5f2ff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.45);
    transition: transform 0.2s ease;
}

/* ON: quando o checkbox está marcado */
.toggle-input:checked + .toggle-label {
    background: #00e596;
    border-color: #00e596;
    box-shadow: 0 0 10px rgba(0,229,150,0.6);
}

    .toggle-input:checked + .toggle-label .toggle-knob {
        transform: translateX(26px);
    }

/* pequeno hover desktop */
.toggle-label:hover {
    box-shadow: 0 0 6px rgba(0,0,0,0.6);
}

.noempty:empty {
    visibility: hidden;
    display: none; /* continua ocupando espaço */
}

.modal {
    display: none; /* começa escondido */
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background: rgba(0,0,0,0.4);
}

/* Caixa central */
.modal-content {
    background: #fff;
    margin: 10% auto;
    padding: 15px 20px;
    border-radius: 4px;
    width: 90%;
    max-width: 700px;
    box-shadow: 0 0 10px rgba(0,0,0,0.25);
}

.close {
    float: right;
    font-size: 3em;
    cursor: pointer;
    margin-top: -0.5em;
}

    .close:hover {
        opacity: 0.7;
    }

/* Linhas do histórico (zebra) */
.history-row {
    padding: 4px 8px;
    font-family: monospace;
    white-space: pre-wrap;
}

#modalhistory-body {
    max-height: 400px; /* ajuste conforme o tamanho desejado */
    overflow-y: auto; /* scrollbar vertical */
    color: #000; /* texto sempre preto */
    font-weight: normal; /* sem negrito */
}

.history-row {
    padding: 4px 8px;
}

    .history-row.even {
        background: #ffffff;
    }

    .history-row.odd {
        background: #f2f2f2;
    }

.paybtn {
    background-color: limegreen;
    text-align: center;
    color: #000000;
    font-weight: bolder;
    border: 1px solid #999999;
    border-radius: 10px;
    padding: 5px;
    width: 70%;
    margin-bottom: 5px;
    margin-top: 5px;
}

.h1about {
    color: #ffbf00;
    font-weight: bolder;
    font-size: 1.5em;
}

.consolah1 {
    text-align: left;
    color: #00ff00;
    padding: 0.5em;
    font-size: 1.2em;
    font-weight: bold;
    font-family: Consolas;
    text-transform: uppercase;
    border: solid 2px #FFA03C;
    border-radius: 0.5em;
}

.blink {
    /* Apply the animation */
    animation: blinkMe 0.5s linear infinite;
    color: #00ff00;
    font-size: 1.5em;
    display: inline-block;
    vertical-align: middle;
}

@keyframes blinkMe {
    /* At 0% and 100%, opacity is 0 (invisible) */
    0%, 100% {
        opacity: 0;
    }
    /* At 50%, opacity is 1 (visible) */
    50% {
        opacity: 1;
    }
}

.faqtitle {
    font-weight: bolder;
    font-size: 1.1em;
    border-top: 5px;
    text-transform: uppercase;
    cursor:pointer
}

.faqtext {
    width: 100%;
    text-align: justify;
    margin-bottom: 5px;
    visibility: hidden;
    display: none;
}


.rr-modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 9999;
}

.rr-modal.is-open {
    display: block;
}

.rr-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.55);
}

.rr-modal__dialog {
    position: relative;
    width: min(560px, calc(100% - 24px));
    margin: 10vh auto 0;
    background: #111;
    color: #eee;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
    box-shadow: 0 18px 70px rgba(0,0,0,.6);
    overflow: hidden;
}

.rr-modal__header, .rr-modal__footer {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rr-modal__header {
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,.06);
}

.rr-modal__title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.rr-modal__x {
    background: transparent;
    color: #eee;
    border: 0;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
}

.rr-modal__body {
    padding: 16px;
    display: grid;
    gap: 10px;
}

.rr-modal__label {
    font-size: 12px;
    opacity: .9;
}

.rr-modal__input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.12);
    background: #0b0b0b;
    color: #eee;
    outline: none;
}

.rr-modal__msg {
    font-size: 12px;
    min-height: 16px;
    opacity: .9;
}

.rr-btn {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.14);
    cursor: pointer;
}

.rr-btn--ghost {
    background: transparent;
    color: #eee;
}

.rr-btn--primary {
    background: #2a64ff;
    color: #fff;
    border-color: rgba(255,255,255,.12);
}

