
/* ======================================================
   VARIAVEIS
====================================================== */

:root {

    --bg: #070b14;

    --sidebar: #0c1322;

    --card: #101827;

    --card2: #141e30;

    --border: #202c43;

    --text: #f5f7fb;

    --secondary: #9ba8bd;

    --muted: #7a879e;

    --input-bg: #0c1424;

    --accent: #f5a900;

    --accent-hover: #ffb71b;

    --green: #26d99a;

    --red: #ff5b72;

    --blue: #508cff;

    --purple: #936cff;

    --yellow: #ffb931;

    /* Versões de TEXTO das cores (garantem contraste nos dois temas) */
    --accent-fg: #f5a900;
    --green-fg: #26d99a;
    --red-fg: #ff5b72;

    --surface-soft: rgba(255, 255, 255, .02);
    --surface-line: rgba(255, 255, 255, .03);

    /* Escala de fonte (B2): mude aqui para aumentar o texto do site todo */
    --fs-xs: 11px;
    --fs-sm: 12px;
    --fs-md: 13.5px;

    color-scheme: dark;

}

[data-theme="light"] {

    --bg: #f2f4f9;

    --sidebar: #ffffff;

    --card: #ffffff;

    --card2: #eef1f7;

    --border: #dde3ee;

    --text: #12172a;

    --secondary: #4d5871;

    --muted: #5f6a82;

    --input-bg: #f4f6fb;

    --accent-fg: #9a6200;

    --green-fg: #0a7350;

    --red-fg: #c0203a;

    --surface-soft: rgba(15, 23, 42, .03);

    --surface-line: rgba(15, 23, 42, .08);

    color-scheme: light;

}

/* ======================================================
   RESET
====================================================== */

* {

    margin: 0;

    padding: 0;

    box-sizing: border-box;

}

html {

    scroll-behavior: smooth;

}

body {

    font-family: "Inter", sans-serif;

    background: var(--bg);

    color: var(--text);

    min-height: 100vh;

}

button,
input,
select {

    font-family: inherit;

}

button {

    cursor: pointer;

}

/* ======================================================
   APP
====================================================== */

.app {

    display: flex;

    min-height: 100vh;

}

/* ======================================================
   SIDEBAR
====================================================== */

.sidebar {

    position: fixed;

    left: 0;

    top: 0;

    bottom: 0;

    width: 250px;

    background: var(--sidebar);

    border-right: 1px solid var(--border);

    padding: 22px 16px;

    display: flex;

    flex-direction: column;

    overflow-y: auto;

    z-index: 100;

}

/* MARCA */

.brand {

    display: flex;

    align-items: center;

    gap: 12px;

    padding: 0 5px 22px;

    border-bottom: 1px solid var(--border);

}

.logo {

    width: 42px;

    height: 42px;

    min-width: 42px;

    min-height: 42px;

    flex-shrink: 0;

    border-radius: 11px;

    display: flex;

    align-items: center;

    justify-content: center;

    background: rgba(245, 169, 0, .12);

    border: 1px solid rgba(245, 169, 0, .22);

    color: var(--accent-fg);

    font-size: 18px;

    overflow: hidden;

    padding: 4px;

    box-sizing: border-box;

}

.logo img {

    display: block;

    width: 100% !important;

    height: 100% !important;

    max-width: 100%;

    max-height: 100%;

    object-fit: contain;

    border-radius: 6px;

}

.brand h2 {

    font-size: 17px;

    font-weight: 800;

}

.brand small {

    display: block;

    margin-top: 3px;

    font-size: 11.5px;

    color: var(--muted);

}

/* PERFIL */

.profile {

    margin-top: 18px;

    padding: 11px;

    border-radius: 11px;

    border: 1px solid var(--border);

    background: var(--card);

    display: flex;

    align-items: center;

    gap: 10px;

}

.avatar {

    width: 36px;

    height: 36px;

    border-radius: 9px;

    background: var(--accent);

    color: #151515;

    display: flex;

    align-items: center;

    justify-content: center;

    font-weight: 800;

}

.avatar-dado, .avatar-foguete, .avatar-coroa,
.avatar-raio, .avatar-gema, .avatar-alvo {
    color: #171717;
}

.avatar-dado { background: linear-gradient(135deg, #ffb931, #f5a900); }
.avatar-foguete { background: linear-gradient(135deg, #508cff, #3a63c9); color: #fff; }
.avatar-coroa { background: linear-gradient(135deg, #ffd76a, #f5a900); }
.avatar-raio { background: linear-gradient(135deg, #26d99a, #16a37a); color: #08281c; }
.avatar-gema { background: linear-gradient(135deg, #936cff, #6f47db); color: #fff; }
.avatar-alvo { background: linear-gradient(135deg, #ff5b72, #d43c52); color: #fff; }

.profile-text {

    flex: 1;

}

.profile-text strong {

    display: block;

    font-size: 12px;

}

.profile-text span {

    display: block;

    margin-top: 3px;

    font-size: 11px;

    color: var(--muted);

}

.profile-arrow {

    color: var(--muted);

    font-size: 11px;

}

/* MENU */

.menu {

    margin-top: 10px;

}

.menu-title {

    margin:

        22px
        9px
        8px;

    font-size: 10px;

    letter-spacing: 1.4px;

    font-weight: 800;

    color: var(--muted);

}

.menu-item {

    width: 100%;

    display: flex;

    align-items: center;

    gap: 11px;

    color: var(--secondary);

    text-decoration: none;

    border-radius: 8px;

    padding: 10px 11px;

    margin-bottom: 3px;

    font-size: 12px;

    transition: .2s;

}

.menu-item i {

    width: 16px;

    text-align: center;

}

.menu-item:hover {

    background: var(--card);

    color: var(--text);

}

.menu-item.active {

    background: rgba(245, 169, 0, .11);

    color: var(--accent-fg);

}

/* FOOTER */

.sidebar-footer {

    margin-top: auto;

    padding: 16px 9px 0;

    border-top: 1px solid var(--border);

    font-size: 11px;

    color: var(--muted);

}

/* ======================================================
   MAIN
====================================================== */

.main {

    margin-left: 250px;

    width: calc(100% - 250px);

    padding: 30px;

}

/* ======================================================
   HEADER
====================================================== */

.header {

    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 24px;

}

.page-type {

    color: var(--accent-fg);

    font-size: 10px;

    font-weight: 800;

    letter-spacing: 1.6px;

}

.header h1 {

    margin-top: 6px;

    font-size: 27px;

}

.header p {

    margin-top: 5px;

    font-size: 12px;

    color: var(--secondary);

}

.header-actions {

    display: flex;

    align-items: center;

    gap: 10px;

}

.notification {

    width: 42px;

    height: 42px;

    border: 1px solid var(--border);

    border-radius: 9px;

    color: var(--secondary);

    background: var(--card);

}

.btn-primary {

    border: 0;

    height: 42px;

    padding: 0 17px;

    border-radius: 9px;

    background: var(--accent);

    color: #171717;

    font-size: 12px;

    font-weight: 800;

    display: flex;

    align-items: center;

    gap: 8px;

    transition: .2s;

}

.btn-primary:hover {

    background: var(--accent-hover);

    transform: translateY(-1px);

}

/* ======================================================
   FILTER
====================================================== */

.filter-box {

    border: 1px solid var(--border);

    border-radius: 13px;

    padding: 16px;

    background: var(--card);

    margin-bottom: 16px;

}

.filter-top {

    display: flex;

    justify-content: space-between;

    margin-bottom: 13px;

}

.filter-title {

    font-size: 12px;

    font-weight: 700;

}

.filter-title i {

    color: var(--accent-fg);

    margin-right: 6px;

}

.clear-filter {

    border: 0;

    background: transparent;

    color: var(--muted);

    font-size: 11px;

}

.filters {

    display: grid;

    grid-template-columns:

        repeat(3, 1fr);

    gap: 10px;

}

.field {

    display: flex;

    flex-direction: column;

    gap: 6px;

}

.field label {

    font-size: 10px;

    font-weight: 800;

    letter-spacing: .7px;

    color: var(--muted);

}

.field input,
.field select {

    width: 100%;

    height: 41px;

    border-radius: 8px;

    border: 1px solid var(--border);

    background: var(--input-bg);

    color: var(--text);

    padding: 0 11px;

    outline: none;

}

.field input:focus,
.field select:focus {

    border-color: var(--accent);

}

/* ======================================================
   KPIS
====================================================== */

.kpis {

    display: grid;

    grid-template-columns:

        repeat(4, 1fr);

    gap: 13px;

    margin-bottom: 16px;

}

.kpi {

    min-height: 118px;

    padding: 18px;

    border: 1px solid var(--border);

    background: var(--card);

    border-radius: 13px;

    display: flex;

    align-items: center;

    gap: 14px;

}

.kpi-icon {

    width: 43px;

    height: 43px;

    border-radius: 11px;

    flex-shrink: 0;

    display: flex;

    justify-content: center;

    align-items: center;

}

.green-bg {

    color: var(--green-fg);

    background: rgba(38, 217, 154, .11);

}

.blue-bg {

    color: var(--blue);

    background: rgba(80, 140, 255, .11);

}

.purple-bg {

    color: var(--purple);

    background: rgba(147, 108, 255, .11);

}

.yellow-bg {

    color: var(--yellow);

    background: rgba(255, 185, 49, .11);

}

.kpi-label {

    color: var(--muted);

    font-size: 10px;

    font-weight: 800;

    letter-spacing: .8px;

}

.kpi h2 {

    margin-top: 6px;

    font-size: 20px;

}

.kpi small {

    display: block;

    margin-top: 5px;

    color: var(--secondary);

    font-size: 11px;

}

/* ======================================================
   KPIS V2 (Capital Total, Capital Disponível, etc)
====================================================== */

.kpis-v2 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

@media (max-width: 1150px) {
    .kpis-v2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

.kpi2 {
    position: relative;
    min-height: 128px;
    padding: 18px;
    border: 1px solid var(--border);
    background: var(--card);
    border-radius: 13px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
}

.kpi2-top {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.kpi2-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--muted);
}

.kpi2-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .8px;
}

.kpi2 h2 {
    font-size: 20px;
    line-height: 1.2;
}

.kpi2 small {
    display: block;
    color: var(--secondary);
    font-size: 11px;
    line-height: 1.5;
}

.kpi2 small strong {
    color: var(--text);
}

.kpi2-sparkline {
    width: 100%;
    height: 30px;
    flex-shrink: 0;
}

.kpi2-progress {
    height: 5px;
    border-radius: 4px;
    background: var(--border);
    overflow: hidden;
    flex-shrink: 0;
}

.kpi2-progress-fill {
    height: 100%;
    background: var(--green);
    width: 0%;
    transition: width .3s;
}

.kpi2-progress-fill.cheia {
    background: linear-gradient(90deg, var(--green), var(--yellow));
}

/* ======================================================
   LUCRO POR TIPO DE OPERAÇÃO
====================================================== */

.tipo-operacao-card {
    margin-bottom: 20px;
}

.tipo-operacao-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

@media (max-width: 720px) {
    .tipo-operacao-grid {
        grid-template-columns: 1fr;
    }
}

.tipo-operacao-item {
    border: 1px solid var(--border);
    background: var(--card2);
    border-radius: 12px;
    padding: 16px;
}

.tipo-operacao-item span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    color: var(--secondary);
    font-weight: 700;
    margin-bottom: 8px;
}

.tipo-operacao-item strong {
    display: block;
    font-size: 19px;
}

.tipo-operacao-item small {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: var(--muted);
}

.green {

    color: var(--green-fg) !important;

}

.red {

    color: var(--red-fg) !important;

}

/* ======================================================
   GRID
====================================================== */

.dashboard-grid {

    display: grid;

    grid-template-columns:

        minmax(0, 2fr)
        minmax(320px, .75fr);

    gap: 20px;

    /* respiro entre uma faixa de gráficos e a seguinte (antes era zero) */
    margin-bottom: 20px;

}

.second-grid {

    margin-top: 20px;

}

/* ======================================================
   CARD
====================================================== */

.card {

    padding: 22px;

    border-radius: 13px;

    border: 1px solid var(--border);

    background: var(--card);

}

.card-header {

    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 20px;

}

.card-header h3 {

    font-size: 13px;

}

.card-header p {

    margin-top: 4px;

    color: var(--muted);

    font-size: 11px;

}

.chart-area {

    height: 320px;

}

/* ======================================================
   CALENDAR
====================================================== */

.calendar-card {

    min-height: 385px;

}

.calendar-header {

    display: flex;

    flex-wrap: wrap;

    gap: 8px 12px;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 14px;

}

.calendar-title {

    display: flex;

    align-items: center;

    gap: 8px;

    font-size: 12px;

    font-weight: 700;

}

.calendar-title i {

    color: var(--accent-fg);

}

.calendar-nav {

    display: flex;

    align-items: center;

    gap: 8px;

}

.calendar-nav button {

    border: 0;

    background: transparent;

    color: var(--muted);

    width: 24px;

    height: 24px;

    border-radius: 5px;

    font-size: 11px;

}

.calendar-nav button:hover {

    background: var(--card2);

    color: var(--text);

}

.calendar-nav strong {

    min-width: 104px;

    text-align: center;

    font-size: 11.5px;

    color: var(--secondary);

    font-weight: 600;

}

.calendar-nav .today-link {

    width: auto;

    padding: 0 6px;

    margin-left: 4px;

    color: var(--accent-fg);

    font-size: 11px;

    font-weight: 800;

}

.calendar-weekdays,
.calendar-grid {

    display: grid;

    grid-template-columns: repeat(7, 1fr);

    gap: 3px;

}

.calendar-weekdays {

    margin-bottom: 4px;

}

.calendar-weekdays span {

    padding: 3px 0 4px;

    text-align: center;

    color: var(--muted);

    font-size: 10px;

    font-weight: 700;

}

.calendar-day {

    min-height: 38px;

    padding: 5px 4px 4px;

    border: 1px solid var(--surface-line);

    border-radius: 6px;

    background: var(--surface-soft);

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: flex-start;

    gap: 3px;

    color: var(--secondary);

    font-size: 11px;

}

.calendar-day.muted {

    color: var(--muted);

    background: transparent;

}

.calendar-day.today {

    border-color: rgba(245, 169, 0, .65);

    color: var(--text);

}

.calendar-day.has-bet {

    background: var(--card2);

    cursor: pointer;

}

.day-marker {

    width: 4px;

    height: 4px;

    border-radius: 50%;

    background: var(--muted);

}

.day-marker.green-dot {

    background: var(--green);

}

.day-marker.red-dot {

    background: var(--red);

}

.day-marker.yellow-dot {

    background: var(--yellow);

}

.day-dash {

    color: var(--muted);

    font-size: 10px;

    line-height: 1;

}

.calendar-summary {

    margin-top: 12px;

    padding-top: 12px;

    border-top: 1px solid var(--border);

    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 12px 6px;

    text-align: center;

}

.calendar-summary span {

    display: block;

    font-size: 9.5px;

    color: var(--muted);

    letter-spacing: .5px;

}

.calendar-summary strong {

    display: block;

    margin-top: 5px;

    font-size: 11.5px;

    color: var(--text);

}

/* ======================================================
   SUMMARY
====================================================== */

.summary-row {

    display: flex;

    justify-content: space-between;

    align-items: center;

    padding: 14px 0;

    border-bottom: 1px solid var(--border);

}

.summary-row:last-child {

    border-bottom: 0;

}

.summary-row span {

    font-size: 11.5px;

    color: var(--secondary);

}

.summary-row i {

    margin-right: 7px;

}

.summary-row strong {

    font-size: 12px;

}

.summary-full .card {

    display: grid;

    grid-template-columns: repeat(5, 1fr);

    gap: 10px;

}

.summary-full .card-header {

    grid-column: 1 / -1;

}

.summary-full .summary-row {

    flex-direction: column;

    align-items: flex-start;

    gap: 6px;

    padding: 12px;

    border-bottom: 0;

    border: 1px solid var(--border);

    border-radius: 10px;

    background: var(--card2);

}

.summary-full .summary-row strong {

    font-size: 15px;

}

@media (max-width: 980px) {

    .summary-full .card {

        grid-template-columns: repeat(2, 1fr);

    }

}

/* ======================================================
   TABLE
====================================================== */

.table-wrap {

    overflow-x: auto;

}

table {

    width: 100%;

    border-collapse: collapse;

}

th {

    text-align: left;

    padding: 9px;

    border-bottom: 1px solid var(--border);

    color: var(--muted);

    font-size: 10px;

    letter-spacing: .7px;

}

td {

    padding: 13px 9px;

    border-bottom: 1px solid var(--border);

    color: var(--secondary);

    font-size: 11.5px;

}

.bet-title {

    color: var(--text);

    font-weight: 600;

}

.bet-market {

    display: block;

    margin-top: 3px;

    color: var(--muted);

    font-size: 10px;

}

.status {

    padding: 5px 8px;

    border-radius: 20px;

    font-size: 10px;

    font-weight: 700;

}

.status-green {

    color: var(--green-fg);

    background: rgba(38, 217, 154, .12);

}

.status-red {

    color: var(--red-fg);

    background: rgba(255, 91, 114, .12);

}

.status-open {

    color: var(--yellow);

    background: rgba(255, 185, 49, .12);

}

.status-void {

    color: var(--secondary);

    background: rgba(155, 168, 189, .12);

}

.status-cashout {

    color: var(--blue);

    background: rgba(80, 140, 255, .12);

}

.cashout-nota {

    font-size: 11px;

    color: var(--secondary);

    margin: -6px 0 14px;

}

.delete-btn {

    border: 0;

    background: transparent;

    color: var(--muted);

}

.delete-btn:hover {

    color: var(--red-fg);

}

.status-actions {

    display: flex;

    gap: 6px;

    justify-content: flex-end;

}

.status-actions button {

    border: 0;

    width: 26px;

    height: 26px;

    border-radius: 6px;

    font-size: 11.5px;

    background: var(--card2);

    color: var(--muted);

}

.status-actions button:hover {

    color: var(--text);

}

.status-actions .btn-green:hover {

    color: var(--green-fg);

}

.status-actions .btn-red:hover {

    color: var(--red-fg);

}

.status-actions .btn-cashout:hover {

    color: var(--blue);

}

.status-actions .btn-edit:hover {

    color: var(--accent-fg);

}

.status-actions .delete-btn:hover {

    color: var(--red-fg);

}

/* ======================================================
   PERFORMANCE
====================================================== */

.sport-row {

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 13px 0;

    border-bottom: 1px solid var(--border);

}

.sport-left {

    display: flex;

    align-items: center;

    gap: 9px;

}

.sport-icon {

    width: 33px;

    height: 33px;

    background: var(--card2);

    color: var(--accent-fg);

    border-radius: 8px;

    display: flex;

    align-items: center;

    justify-content: center;

}

.sport-left strong {

    font-size: 11.5px;

}

.sport-left span {

    display: block;

    margin-top: 3px;

    color: var(--muted);

    font-size: 10px;

}

.sport-right {

    text-align: right;

}

.sport-right strong {

    font-size: 11.5px;

}

.sport-right span {

    display: block;

    margin-top: 3px;

    color: var(--muted);

    font-size: 10px;

}

/* ======================================================
   EMPTY
====================================================== */

.empty {

    padding: 45px;

    text-align: center;

    color: var(--muted);

}

.empty i {

    font-size: 25px;

}

.empty h4 {

    margin-top: 10px;

    color: var(--text);

    font-size: 12px;

}

.empty p {

    margin-top: 5px;

    font-size: 11px;

}

/* ======================================================
   MODAL
====================================================== */

.modal-overlay {

    position: fixed;

    inset: 0;

    z-index: 1000;

    display: none;

    align-items: center;

    justify-content: center;

    padding: 20px;

    background: rgba(0, 0, 0, .75);

    backdrop-filter: blur(7px);

}

.modal-overlay.active {

    display: flex;

}

.modal {

    width: 100%;

    max-width: 620px;

    border-radius: 14px;

    background: var(--card);

    border: 1px solid var(--border);

    box-shadow:

        0 30px 80px
        rgba(0, 0, 0, .5);

}

.modal-header {

    padding: 19px 21px;

    display: flex;

    justify-content: space-between;

    align-items: center;

    border-bottom: 1px solid var(--border);

}

.modal-header h2 {

    font-size: 15px;

}

.modal-header p {

    margin-top: 4px;

    color: var(--muted);

    font-size: 11px;

}

.close {

    width: 35px;

    height: 35px;

    border: 0;

    border-radius: 8px;

    background: var(--card2);

    color: var(--secondary);

}

.modal-body {

    padding: 21px;

}

.form-grid {

    display: grid;

    grid-template-columns:

        1fr 1fr;

    gap: 13px;

}

.full {

    grid-column:

        1 / -1;

}

/* PREVIEW */

.preview {

    margin-top: 17px;

    padding: 14px;

    border-radius: 9px;

    border: 1px solid var(--border);

    background: var(--card2);

    display: grid;

    grid-template-columns:

        1fr 1fr;

    gap: 15px;

}

.preview span {

    color: var(--muted);

    font-size: 10px;

}

.preview strong {

    display: block;

    margin-top: 5px;

    font-size: 12px;

    color: var(--green-fg);

}

/* ACTIONS */

.modal-actions {

    display: flex;

    justify-content: flex-end;

    gap: 8px;

    margin-top: 18px;

}

.btn-secondary {

    height: 40px;

    padding: 0 16px;

    border-radius: 8px;

    border: 1px solid var(--border);

    background: var(--card2);

    color: var(--secondary);

}

/* ======================================================
   TOAST
====================================================== */

.toast {

    position: fixed;

    right: 25px;

    bottom: 25px;

    z-index: 5000;

    display: none;

    padding: 13px 17px;

    background: var(--green);

    color: #04100c;

    border-radius: 9px;

    font-size: 11.5px;

    font-weight: 800;

    box-shadow:

        0 15px 40px
        rgba(0, 0, 0, .4);

}

.toast.show {

    display: block;

}

/* ======================================================
   RESPONSIVE
====================================================== */

@media(max-width: 1150px) {

    .kpis {

        grid-template-columns:
            repeat(2, 1fr);

    }

    .dashboard-grid {

        grid-template-columns:
            1fr;

    }

}

@media(max-width: 760px) {
    .filters {
        grid-template-columns:
            1fr;
    }
    .calendar-nav strong {
        min-width: 88px;
    }
    .summary-full .card {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media(max-width: 540px) {

    .kpis {

        grid-template-columns:
            1fr;

    }

    .header {

        align-items: flex-start;

        flex-direction: column;

        gap: 15px;

    }

    .form-grid {

        grid-template-columns:
            1fr;

    }

    .full {

        grid-column: auto;

    }

}



/* ======================================================
   BOTÃO SAIR / FOCO / MENU CELULAR (gaveta)
====================================================== */

.btn-sair {
    background: transparent;
    border: 0;
    cursor: pointer;
    color: var(--muted);
    padding: 8px;
    border-radius: 8px;
    font-size: 14px;
    flex-shrink: 0;
}
.btn-sair:hover { color: var(--red-fg); background: var(--card2); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--accent-fg);
    outline-offset: 2px;
}

.mobile-topbar,
.sidebar-backdrop { display: none; }

.table-wrap, .tabela-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

@media (max-width: 900px) {
    .mobile-topbar {
        display: flex;
        align-items: center;
        gap: 12px;
        position: fixed;
        top: 0; left: 0; right: 0;
        height: 54px;
        padding: 0 14px;
        background: var(--sidebar);
        border-bottom: 1px solid var(--border);
        z-index: 90;
    }
    .mobile-menu-btn {
        width: 40px; height: 40px;
        border-radius: 10px;
        border: 1px solid var(--border);
        background: var(--card);
        color: var(--text);
        font-size: 16px;
    }
    .mobile-topbar-title { font-weight: 800; letter-spacing: .3px; }

    .sidebar {
        width: 270px;
        max-width: 85vw;
        transform: translateX(-100%);
        transition: transform .22s ease;
        z-index: 120;
        box-shadow: none;
    }
    body.menu-aberto .sidebar {
        transform: translateX(0);
        box-shadow: 8px 0 30px rgba(0, 0, 0, .35);
    }
    .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, .5);
        z-index: 110;
    }
    .sidebar-backdrop[hidden] { display: none; }
    body.menu-aberto { overflow: hidden; }

    .main {
        margin-left: 0;
        width: 100%;
        padding: 74px 16px 24px;
    }
    .dashboard-grid,
    .second-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .dashboard-grid > *,
    .second-grid > * { min-width: 0; }
}

@media (max-width: 540px) {
    .main { padding: 70px 12px 20px; }
    table { font-size: 12.5px; }
}

@media (prefers-reduced-motion: reduce) {
    .sidebar { transition: none; }
    html { scroll-behavior: auto; }
}

/* ======================================================
   SENHA: botão "olho" e checklist de requisitos
====================================================== */

.senha-campo { position: relative; }

.senha-campo input { padding-right: 44px !important; }

.senha-olho {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 42px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 14px;
    border-radius: 0 8px 8px 0;
}

.senha-olho:hover { color: var(--text); }

.senha-requisitos {
    margin: 4px 0 16px;
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--card2);
    font-size: 12.5px;
}

.senha-requisitos strong { display: block; margin-bottom: 8px; font-size: 12.5px; }

.senha-requisitos ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 6px 14px;
}

.senha-requisitos li { color: var(--secondary); display: flex; align-items: center; gap: 8px; }

.senha-requisitos li::before {
    content: "\2715";
    font-size: 11px;
    width: 14px;
    text-align: center;
    color: var(--muted);
}

.senha-requisitos li.ok { color: var(--green-fg); }
.senha-requisitos li.ok::before { content: "\2713"; color: var(--green-fg); font-weight: 800; }


/* ======================================================
   CALENDÁRIO v2 (dias clicáveis) + faixa do dia escolhido
====================================================== */

button.calendar-day {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    min-height: 54px;
    font: inherit;
    font-size: 11px;
    cursor: pointer;
    justify-content: center;
    gap: 4px;
    padding: 6px 2px;
    position: relative;
    transition: border-color .12s ease, transform .12s ease;
}

button.calendar-day:hover {
    border-color: var(--accent);
}

button.calendar-day:active {
    transform: scale(.97);
}

.calendar-day .day-num {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}

.calendar-day.muted:not(.has-bet) .day-num {
    color: var(--muted);
    font-weight: 600;
}

/* dia de outro mês, mas com aposta: texto normal (legível) e borda tracejada para diferenciar */
.calendar-day.muted.has-bet { border-style: dashed; }

.calendar-day .day-valor {
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    color: var(--text);
    letter-spacing: -.2px;
}

.calendar-day .day-valor.aberta { color: var(--accent-fg); font-weight: 700; }

.calendar-day.pos {
    background: color-mix(in srgb, var(--green) calc(var(--tint, .15) * 100%), var(--card2));
    border-color: color-mix(in srgb, var(--green) 45%, transparent);
}

.calendar-day.neg {
    background: color-mix(in srgb, var(--red) calc(var(--tint, .15) * 100%), var(--card2));
    border-color: color-mix(in srgb, var(--red) 45%, transparent);
}

.calendar-day.zero { background: var(--card2); }

.calendar-day.today {
    box-shadow: inset 0 0 0 1px var(--accent);
}

.calendar-day.today .day-num::after {
    content: "";
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent-fg);
}

.calendar-day.selected {
    outline: 2px solid var(--accent-fg);
    outline-offset: 1px;
    z-index: 1;
}

.calendar-day.selected .day-num { text-decoration: underline; text-underline-offset: 3px; }

.calendar-legenda {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    margin-top: 12px;
    font-size: 10.5px;
    color: var(--muted);
}

.calendar-legenda li { display: inline-flex; align-items: center; gap: 5px; }

.calendar-legenda .dica { margin-left: auto; color: var(--secondary); }

.calendar-legenda .lg { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.calendar-legenda .lg.pos { background: var(--green); }
.calendar-legenda .lg.neg { background: var(--red); }
.calendar-legenda .lg.ab { background: var(--yellow); }

.dia-banner {
    position: sticky;
    top: 10px;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 20px;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--accent);
    background: color-mix(in srgb, var(--accent) 14%, var(--card));
    color: var(--text);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
}

.dia-banner[hidden] { display: none; }

.dia-banner-texto {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 10px;
    align-items: center;
    font-size: 13px;
    min-width: 0;
}

.dia-banner-texto > i { color: var(--accent-fg); font-size: 16px; grid-row: 1 / span 2; }

.dia-banner-texto small { color: var(--secondary); font-size: 11.5px; margin-top: 2px; }

.dia-banner-fechar {
    flex-shrink: 0;
    min-height: 38px;
    padding: 0 16px;
    border-radius: 9px;
    border: 1px solid var(--accent);
    background: transparent;
    color: var(--accent-fg);
    font-weight: 800;
    font-size: 12.5px;
    cursor: pointer;
}

.dia-banner-fechar:hover { background: var(--accent); color: #1a1300; }

@media (max-width: 900px) {
    .dia-banner { top: 62px; }
}

@media (max-width: 540px) {
    .dia-banner { flex-direction: column; align-items: stretch; }
    .dia-banner-fechar { width: 100%; }
    .calendar-legenda .dica { margin-left: 0; flex-basis: 100%; }
    button.calendar-day { min-height: 48px; padding: 5px 1px; }
    .calendar-day .day-valor { font-size: 9px; }
    .card { padding: 18px; }
}

/* card de gráfico que acompanha a altura do card ao lado (ex.: Evolução da banca x Calendário) */
.card-flex {
    display: flex;
    flex-direction: column;
}

.card-flex .chart-area {
    flex: 1 1 auto;
    height: auto;
    min-height: 320px;
    position: relative;
}

.card-flex .chart-area canvas {
    position: absolute;
    top: 0;
    left: 0;
}

/* Gráfico com mensagem de "sem dados" por cima */
.chart-com-vazio { position: relative; }
.chart-vazio {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    text-align: center; padding: 0 16px;
    color: var(--text-muted, #8a93a6); font-size: 13px;
    pointer-events: none;
}
.chart-vazio[hidden] { display: none; }
#mesFilter[hidden] { display: none; }

/* Tabela de apostas: a coluna do evento não pode ficar espremida pelos botões de ação (a tabela rola na horizontal se faltar espaço) */
#betTable td:first-child { min-width: 175px; }
#betTable .status-actions { display: flex; flex-wrap: wrap; gap: 4px; width: 140px; justify-content: flex-end; }
