/* =========================================================
   MASTERIUS EDGE V3 — DARK UI
   ========================================================= */

:root {
    --bg: #090d12;
    --panel: #101720;
    --panel-2: #161f2a;
    --panel-3: #0c1219;
    --border: #26313d;

    --text: #edf2f7;
    --muted: #8b98a7;

    --green: #35d07f;
    --green-dark: #1da663;
    --red: #ff5c67;
    --yellow: #e4ae43;
    --blue: #5da9ff;

    --header: #0b1118;
    --radius: 14px;
    --shadow: 0 14px 40px rgba(0, 0, 0, .22);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, Arial, Helvetica, sans-serif;
    line-height: 1.55;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.container {
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;
}


/* HEADER */

header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(11, 17, 24, .94);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

.nav {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.logo {
    font-size: 21px;
    font-weight: 950;
    letter-spacing: 1px;
}

nav {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

nav a {
    padding: 9px 13px;
    color: var(--muted);
    border-radius: 9px;
    font-size: 14px;
    font-weight: 700;
}

nav a:hover,
nav a.active {
    color: var(--text);
    background: var(--panel-2);
}


/* HERO */

.hero {
    padding: 58px 0 34px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 30px;
}

.eyebrow {
    display: block;
    margin-bottom: 7px;
    color: var(--green);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.5px;
}

.hero h1,
.page-title h1 {
    margin-bottom: 9px;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.08;
    letter-spacing: -1px;
}

.hero p,
.page-title p {
    max-width: 680px;
    color: var(--muted);
}

.hero-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}


/* BUTTONS */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 43px;
    padding: 10px 17px;
    border: 1px solid var(--green-dark);
    border-radius: 10px;
    background: var(--green-dark);
    color: white;
    font-weight: 850;
    transition: .18s ease;
}

.button:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

.button.secondary {
    background: var(--panel-2);
    border-color: var(--border);
}

.button.submit {
    width: 100%;
    border: 0;
}

.delete,
.remove-leg {
    border: 0;
    background: transparent;
    color: var(--red);
    font-weight: 800;
}

.remove-leg {
    padding: 5px 8px;
    border: 1px solid rgba(255, 92, 103, .25);
    border-radius: 8px;
}


/* TITLES */

.page-title {
    padding: 50px 0 28px;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.section-head h2 {
    font-size: 20px;
}

.section-head > a {
    color: var(--green);
    font-size: 14px;
    font-weight: 800;
}

.hint {
    max-width: 560px;
    color: var(--muted);
    font-size: 13px;
}


/* PANELS */

.panel {
    margin-bottom: 22px;
    padding: 24px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}


/* SUMMARY CARDS */

.cards {
    display: grid;
    gap: 16px;
    margin-bottom: 22px;
}

.cards.four {
    grid-template-columns: repeat(4, 1fr);
}

.card,
.period {
    min-width: 0;
    padding: 21px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.card span,
.period span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}

.card strong,
.period strong {
    display: block;
    margin: 7px 0 3px;
    font-size: 27px;
    line-height: 1.1;
}

.card small,
.period small {
    color: var(--muted);
    font-size: 12px;
}

.card.featured {
    border-color: rgba(53, 208, 127, .35);
}


/* PERIODS */

.period-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}

.period {
    background: var(--panel-3);
}

.period strong {
    font-size: 24px;
}


/* FORMS */

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.form-grid.compact {
    margin-bottom: 20px;
}

label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

label.wide {
    grid-column: 1 / -1;
}

input,
select {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    background: var(--panel-3);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 9px;
    outline: none;
}

input:focus,
select:focus {
    border-color: var(--green-dark);
    box-shadow: 0 0 0 3px rgba(53, 208, 127, .08);
}

label small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
}

.preview {
    grid-column: 1 / -1;
    padding: 18px;
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.preview span {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.preview strong {
    display: block;
    margin: 4px 0;
    font-size: 25px;
}

.preview small {
    color: var(--muted);
}

.form-grid > .submit {
    grid-column: 1 / -1;
}


/* QUICK ENTRY */

.quick-form {
    display: grid;
    grid-template-columns: 180px 180px 180px minmax(220px, 1fr) 150px;
    align-items: end;
    gap: 14px;
}


/* BUILDER */

.builder-summary {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}

.builder-summary > div {
    padding: 17px;
    background: var(--panel-3);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.builder-summary span {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.builder-summary strong {
    display: block;
    margin-top: 5px;
    font-size: 21px;
}

.leg {
    margin-bottom: 14px;
    padding: 18px;
    background: var(--panel-3);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.leg-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.leg-number {
    color: var(--green);
    font-weight: 900;
}

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

.empty {
    padding: 30px;
    text-align: center;
    color: var(--muted);
}


/* FILTERS */

.filters {
    display: grid;
    grid-template-columns: 1fr 180px 180px 180px;
    gap: 12px;
    margin-bottom: 18px;
}


/* TABLES */

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

th,
td {
    padding: 13px 11px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

th {
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .7px;
}

tr:last-child td {
    border-bottom: 0;
}


/* RESULTS */

.profit {
    color: var(--green) !important;
}

.loss {
    color: var(--red) !important;
}

.cashout {
    color: var(--yellow) !important;
}

.void {
    color: #9aa8ba !important;
}


/* FOOTER */

footer {
    padding: 35px 20px 45px;
    text-align: center;
    color: var(--muted);
    font-size: 12px;
}


/* RESPONSIVE */

@media (max-width: 1100px) {
    .period-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .builder-summary {
        grid-template-columns: repeat(3, 1fr);
    }

    .quick-form {
        grid-template-columns: repeat(2, 1fr);
    }

    .quick-form .wide {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    .nav {
        align-items: flex-start;
        flex-direction: column;
        padding: 14px 0;
    }

    nav {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .cards.four {
        grid-template-columns: repeat(2, 1fr);
    }

    .period-grid,
    .builder-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .filters {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 650px) {
    .container {
        width: min(100% - 24px, 1200px);
    }

    .hero {
        padding-top: 35px;
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-actions {
        width: 100%;
    }

    .hero-actions .button {
        flex: 1;
    }

    .panel {
        padding: 17px;
    }

    .cards.four,
    .period-grid,
    .builder-summary,
    .form-grid,
    .leg-grid,
    .quick-form,
    .filters {
        grid-template-columns: 1fr;
    }

    label.wide,
    .preview,
    .form-grid > .submit,
    .quick-form .wide {
        grid-column: auto;
    }

    .page-title {
        padding-top: 35px;
    }
}

/* CLASSIC V2 DASHBOARD + MINIMAL QUICK ENTRY */
.quick-entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
    padding: 13px 16px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 11px;
}

.quick-label {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.2px;
    white-space: nowrap;
}

.quick-form {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.quick-form select,
.quick-amount,
.quick-submit {
    height: 36px;
}

.quick-form select {
    width: 105px;
    min-height: 36px;
    padding: 6px 9px;
    border-radius: 8px;
    font-size: 13px;
}

.quick-amount {
    display: flex;
    align-items: center;
    width: 125px;
    padding: 0 9px;
    background: var(--panel-3);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.quick-amount span {
    color: var(--muted);
    font-size: 13px;
    margin-right: 4px;
}

.quick-amount input {
    min-height: 34px;
    padding: 5px 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    font-size: 13px;
}

.quick-amount input:focus {
    border: 0;
    box-shadow: none;
}

.quick-submit {
    padding: 0 13px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--panel-2);
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
}

.quick-submit:hover {
    border-color: var(--green-dark);
    color: var(--green);
}

@media (max-width: 650px) {
    .quick-entry {
        align-items: stretch;
        flex-direction: column;
        gap: 9px;
    }

    .quick-form {
        width: 100%;
        margin-left: 0;
    }

    .quick-form select,
    .quick-amount,
    .quick-submit {
        flex: 1;
        width: auto;
    }
}


/* CLASSIC V2 DASHBOARD + MINIMAL QUICK ENTRY */
.quick-entry {
    display: flex; align-items: center; justify-content: space-between; gap: 18px;
    margin-bottom: 22px; padding: 13px 16px; background: var(--panel);
    border: 1px solid var(--border); border-radius: 11px;
}
.quick-label { color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: 1.2px; white-space: nowrap; }
.quick-entry .quick-form { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.quick-entry .quick-form select, .quick-amount, .quick-submit { height: 36px; }
.quick-entry .quick-form select { width: 105px; min-height: 36px; padding: 6px 9px; border-radius: 8px; font-size: 13px; }
.quick-amount { display: flex; align-items: center; width: 125px; padding: 0 9px; background: var(--panel-3); border: 1px solid var(--border); border-radius: 8px; }
.quick-amount span { color: var(--muted); font-size: 13px; margin-right: 4px; }
.quick-amount input { min-height: 34px; padding: 5px 0; border: 0; background: transparent; box-shadow: none; font-size: 13px; }
.quick-amount input:focus { border: 0; box-shadow: none; }
.quick-submit { padding: 0 13px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel-2); color: var(--text); font-size: 12px; font-weight: 800; }
.quick-submit:hover { border-color: var(--green-dark); color: var(--green); }
@media (max-width: 650px) {
  .quick-entry { align-items: stretch; flex-direction: column; gap: 9px; }
  .quick-entry .quick-form { width: 100%; margin-left: 0; }
  .quick-entry .quick-form select, .quick-amount, .quick-submit { flex: 1; width: auto; }
}


/* =========================================================
   MINIMALIST HANDMATIGE INVOER
   ========================================================= */

.quick-entry {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 14px 0 20px;
    padding: 10px 12px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.quick-label {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    white-space: nowrap;
}

.quick-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
}

.quick-form select,
.quick-count input,
.quick-stake input,
.quick-amount,
.quick-submit {
    height: 34px;
}

.quick-form select {
    width: 92px;
    min-height: 34px;
    padding: 5px 8px;
    border-radius: 7px;
    font-size: 12px;
}

.quick-loss-fields {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quick-count {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
}

.quick-count input {
    width: 52px;
    min-height: 34px;
    padding: 5px 7px;
    border-radius: 7px;
    font-size: 12px;
}

.quick-stakes {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.quick-stake {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--muted);
    font-size: 10px;
}

.quick-stake > div {
    display: flex;
    align-items: center;
    height: 34px;
    padding: 0 7px;
    background: var(--panel-3);
    border: 1px solid var(--border);
    border-radius: 7px;
}

.quick-stake > div > span {
    margin-right: 3px;
    color: var(--muted);
}

.quick-stake input {
    width: 52px;
    min-height: 32px;
    padding: 4px 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    font-size: 11px;
}

.quick-stake input:focus {
    border: 0;
    box-shadow: none;
}

.quick-amount {
    display: flex;
    align-items: center;
    width: 105px;
    padding: 0 8px;
    background: var(--panel-3);
    border: 1px solid var(--border);
    border-radius: 7px;
}

.quick-amount span {
    color: var(--muted);
    font-size: 12px;
    margin-right: 4px;
}

.quick-amount input {
    width: 100%;
    min-height: 32px;
    padding: 4px 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    font-size: 12px;
}

.quick-amount input:focus {
    border: 0;
    box-shadow: none;
}

.quick-submit {
    min-height: 34px;
    padding: 0 12px;
    border: 0;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 700;
}

.quick-form [hidden] {
    display: none !important;
}

@media (max-width: 900px) {
    .quick-entry {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .quick-form {
        width: 100%;
    }
}


/* =========================================================
   MSTR BETS — V2 GREEN HERO
   ========================================================= */

.hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 88% 20%, rgba(53, 208, 127, .16), transparent 34%),
        linear-gradient(135deg, #111b19 0%, #101821 55%, #0e1715 100%);
    border: 1px solid rgba(53, 208, 127, .24);
}

.hero::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    right: -80px;
    top: -100px;
    border-radius: 50%;
    background: rgba(53, 208, 127, .08);
    pointer-events: none;
}

.hero h1 {
    color: #35d07f;
    text-shadow: 0 0 24px rgba(53, 208, 127, .16);
}

.hero p {
    color: var(--muted);
}

.quick-stake-total {
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 9px;
    border: 1px solid rgba(53, 208, 127, .25);
    border-radius: 7px;
    background: rgba(53, 208, 127, .06);
    color: var(--green);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.quick-amount input[readonly] {
    cursor: default;
    color: var(--green);
    font-weight: 700;
}

.quick-amount input[readonly]::placeholder {
    color: var(--green);
    opacity: .75;
}

@media (max-width: 900px) {
    .quick-stake-total {
        margin-left: 0;
    }
}


/* =========================================================
   MSTR BETS — V2 TYPOGRAPHY + SMOOTH ALIGNMENT
   ========================================================= */

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.hero,
.hero h1,
.hero p,
.card,
.card h2,
.card .value,
.period-card,
.period-card strong,
.period-card span,
.quick-entry,
.quick-entry input,
.quick-entry select,
.quick-entry button,
table,
th,
td {
    font-family: inherit;
}

.hero {
    padding: 28px 30px;
    border-radius: 14px;
}

.hero h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.15;
    letter-spacing: -0.025em;
    font-weight: 700;
}

.hero p {
    margin: 8px 0 0;
    font-size: 14px;
    line-height: 1.5;
}

.cards.four {
    gap: 14px;
}

.card {
    border-radius: 12px;
    transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.card:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .14);
}

.card h2 {
    font-size: 12px;
    line-height: 1.3;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

.card .value {
    font-size: 27px;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.period-grid {
    gap: 10px;
}

.period-card {
    min-height: 74px;
    padding: 14px 15px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.period-card strong {
    font-size: 16px;
    line-height: 1.2;
    font-weight: 700;
}

.period-card span {
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.3;
}

.quick-entry {
    min-height: 48px;
    box-sizing: border-box;
    margin: 12px 0 18px;
    padding: 7px 10px;
    gap: 12px;
    border-radius: 9px;
    background: rgba(17, 24, 33, .62);
}

.quick-label {
    min-width: 58px;
    font-size: 10px;
    letter-spacing: .04em;
}

.quick-form {
    gap: 7px;
    align-items: center;
}

.quick-form select,
.quick-count input,
.quick-stake input,
.quick-amount,
.quick-submit {
    height: 32px;
}

.quick-form select,
.quick-count input {
    box-sizing: border-box;
    border-radius: 6px;
}

.quick-stakes {
    gap: 5px;
    max-width: 100%;
}

.quick-stake {
    gap: 3px;
    line-height: 1;
}

.quick-stake > div,
.quick-amount {
    height: 32px;
    box-sizing: border-box;
    border-radius: 6px;
}

.quick-stake > div {
    padding: 0 6px;
}

.quick-stake input {
    width: 48px;
    height: 30px;
}

.quick-amount {
    width: 98px;
}

.quick-submit {
    padding: 0 11px;
    border-radius: 6px;
    transition: transform .15s ease, filter .15s ease;
}

.quick-submit:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
}

.quick-stake-total {
    height: 32px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 10px;
}

table th {
    font-size: 11px;
    font-weight: 600;
}

table td {
    font-size: 13px;
}

@media (max-width: 1100px) {
    .quick-entry {
        align-items: flex-start;
    }

    .quick-form {
        row-gap: 7px;
    }
}

@media (max-width: 700px) {
    .hero {
        padding: 22px;
    }

    .hero h1 {
        font-size: 24px;
    }

    .quick-entry {
        padding: 9px;
    }

    .quick-form {
        width: 100%;
    }
}


/* Extra spacing between MSTR Bets header and KPI cards */
.hero {
    margin-bottom: 24px;
}

.cards.four {
    margin-top: 0;
}


/* Reference hero typography/spacing */
.hero .eyebrow {
    margin-bottom: 6px;
}

.hero h1 {
    letter-spacing: -0.035em;
}

.hero p {
    max-width: 620px;
}


/* Manual entry: typing only, no number spinner arrows */
#quickBetCount,
.quick-stake-input,
#quickAdjustmentAmount {
    -moz-appearance: textfield;
    appearance: textfield;
}

#quickBetCount::-webkit-outer-spin-button,
#quickBetCount::-webkit-inner-spin-button,
.quick-stake-input::-webkit-outer-spin-button,
.quick-stake-input::-webkit-inner-spin-button,
#quickAdjustmentAmount::-webkit-outer-spin-button,
#quickAdjustmentAmount::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#quickAdjustmentAmount[readonly] {
    color: var(--green);
    font-weight: 700;
    cursor: default;
}


/* FINAL OVERRIDE — dashboard title must stay white */
.hero h1,
.hero h1:first-child {
    color: #e8edf2 !important;
    text-shadow: none !important;
}


/* Bet count is a typing field, not a spinner */
#quickBetCount {
    -moz-appearance: textfield;
    appearance: textfield;
    width: 52px;
}


/* =========================================================
   HANDMATIG — UITGEBREIDE 3-REGEL LAYOUT
   ========================================================= */

.quick-entry {
    align-items: flex-start;
    padding: 12px 14px;
}

.quick-form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

.quick-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.quick-row-top {
    align-items: flex-end;
}

.quick-type,
.quick-count,
.quick-total {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.quick-type > span,
.quick-count > span,
.quick-total > span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
}

.quick-type select,
.quick-count input {
    height: 34px;
    box-sizing: border-box;
}

.quick-type select {
    width: 110px;
}

.quick-count input {
    width: 82px;
}

.quick-row-stakes {
    width: 100%;
    min-height: 42px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 2px;
}

.quick-stakes {
    display: flex;
    align-items: flex-end;
    flex-wrap: nowrap;
    gap: 8px;
}

.quick-stake {
    flex: 0 0 auto;
}

.quick-row-bottom {
    justify-content: flex-start;
    align-items: flex-end;
}

.quick-total .quick-amount {
    width: 125px;
}

.quick-submit {
    height: 34px;
    align-self: flex-end;
}

@media (max-width: 700px) {
    .quick-row {
        flex-wrap: wrap;
    }

    .quick-row-stakes {
        max-width: calc(100vw - 48px);
    }

    .quick-row-bottom {
        width: 100%;
    }
}


/* =========================================================
   FINAL — COMPACT MINIMALIST MANUAL ENTRY
   Extra bet fields only appear when "Inzet" is selected.
   ========================================================= */

.quick-entry {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    min-height: 48px;
}

.quick-form {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    flex: 1;
    gap: 7px;
}

.quick-form > select {
    flex: 0 0 auto;
}

.quick-loss-fields {
    display: flex;
    align-items: center;
    gap: 7px;
    flex: 0 1 auto;
}

.quick-count {
    display: flex;
    align-items: center;
    gap: 5px;
}

.quick-count > span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
}

.quick-count input {
    width: 52px;
    height: 34px;
    box-sizing: border-box;
}

.quick-stakes {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.quick-stake {
    display: flex;
    align-items: center;
    gap: 3px;
}

.quick-stake > span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
}

.quick-stake > div {
    height: 34px;
    box-sizing: border-box;
}

.quick-amount {
    flex: 0 0 auto;
    height: 34px;
    box-sizing: border-box;
}

@media (max-width: 900px) {
    .quick-entry {
        align-items: flex-start;
    }

    .quick-form {
        align-items: flex-start;
    }
}


/* =========================================================
   FINAL COMPACT V2-STYLE MANUAL ENTRY
   ========================================================= */

.quick-entry {
    display: block;
    margin: 12px 0 18px;
    padding: 8px 10px;
    border-radius: 9px;
}

.quick-form {
    display: block;
    width: 100%;
}

.quick-main-row {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
}

.quick-main-row > select {
    flex: 0 0 auto;
    width: 92px;
    height: 34px;
}

.quick-count {
    display: flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
}

.quick-count > span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
}

.quick-count input {
    width: 52px;
    height: 34px;
    box-sizing: border-box;
}

.quick-amount {
    width: 105px;
    height: 34px;
    box-sizing: border-box;
    flex: 0 0 auto;
}

.quick-submit {
    height: 34px;
    flex: 0 0 auto;
}

.quick-loss-fields {
    margin-top: 8px;
    width: 100%;
}

.quick-stakes {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.quick-stake {
    display: flex;
    align-items: center;
    gap: 3px;
}

.quick-stake > span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
}

.quick-stake > div {
    height: 32px;
    box-sizing: border-box;
    padding: 0 6px;
}

.quick-stake input {
    width: 48px;
    height: 30px;
}

.quick-stake-total {
    height: 32px;
}

.quick-entry [hidden] {
    display: none !important;
}

@media (max-width: 700px) {
    .quick-main-row {
        flex-wrap: wrap;
    }

    .quick-loss-fields {
        overflow-x: auto;
        overflow-y: hidden;
    }

    .quick-stakes {
        flex-wrap: nowrap;
        width: max-content;
    }
}


/* =========================================================
   FINAL MANUAL ENTRY — EXACT 3-ROW LAYOUT
   ========================================================= */

.quick-entry {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 10px;
}

.quick-form {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
    flex: 1;
}

.quick-top-row {
    display: flex;
    align-items: center;
    gap: 7px;
    height: 34px;
}

.quick-top-row > select {
    width: 92px;
    height: 34px;
}

.quick-count {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 34px;
}

.quick-count > span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
}

.quick-count input {
    width: 52px;
    height: 34px;
    box-sizing: border-box;
}

.quick-loss-fields {
    width: 100%;
    margin-top: 0;
}

.quick-stakes {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    flex-wrap: wrap;
}

.quick-stake {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.quick-stake > span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
}

.quick-stake > div {
    height: 32px;
    box-sizing: border-box;
}

.quick-stake input {
    width: 48px;
    height: 30px;
}

.quick-bottom-row {
    display: flex;
    align-items: center;
    gap: 7px;
    height: 34px;
}

.quick-amount {
    width: 105px;
    height: 34px;
    box-sizing: border-box;
}

.quick-submit {
    height: 34px;
}

.quick-entry [hidden] {
    display: none !important;
}

/* Winst blijft compact: bedrag en knop direct onder/naast elkaar. */
#quickLossFields[hidden] + .quick-bottom-row {
    margin-top: 0;
}

@media (max-width: 700px) {
    .quick-entry {
        align-items: flex-start;
    }

    .quick-stakes {
        flex-wrap: nowrap;
        overflow-x: auto;
        max-width: calc(100vw - 45px);
        padding-bottom: 2px;
    }
}


/* Final alignment: labels above controls on the first row */
.quick-top-row {
    align-items: flex-end;
    gap: 8px;
}

.quick-type,
.quick-count {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 4px;
    height: 50px;
    box-sizing: border-box;
}

.quick-type > span,
.quick-count > span {
    height: 10px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
    line-height: 10px;
}

.quick-type select {
    width: 92px;
    height: 34px;
    box-sizing: border-box;
}

.quick-count input {
    width: 52px;
    height: 34px;
    box-sizing: border-box;
}


/* FINAL FIX — keep the entire manual-entry block inside its border */
.quick-entry {
    box-sizing: border-box;
    align-items: flex-start;
    padding: 12px 10px;
    overflow: visible;
}

.quick-entry .quick-form {
    margin-left: 0 !important;
    width: auto;
    min-width: 0;
    align-items: flex-start;
}

.quick-top-row {
    margin-top: 0;
}

.quick-type,
.quick-count {
    height: 48px;
}

.quick-loss-fields {
    margin-top: 0;
}

.quick-bottom-row {
    margin-top: 0;
}


/* FINAL POLISH — centered bet count + contained manual block */
.quick-entry {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.quick-entry .quick-form {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.quick-top-row,
.quick-loss-fields,
.quick-bottom-row {
    max-width: 100%;
    box-sizing: border-box;
}

#quickBetCount {
    text-align: center;
    padding-left: 4px;
    padding-right: 4px;
}

.quick-stakes {
    max-width: 100%;
    box-sizing: border-box;
}

.quick-stake {
    flex: 0 0 auto;
}


/* FINAL CONTAINMENT — labels are fully INSIDE the manual-entry border */
.quick-entry {
    display: flex !important;
    align-items: flex-start !important;
    box-sizing: border-box !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 10px 10px 11px !important;
    overflow: hidden !important;
}

.quick-entry > .quick-label {
    flex: 0 0 auto;
    margin-top: 16px;
    line-height: 12px;
}

.quick-entry .quick-form {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    width: auto !important;
    max-width: calc(100% - 75px) !important;
    min-width: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.quick-top-row {
    display: flex !important;
    align-items: flex-end !important;
    height: auto !important;
    min-height: 46px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.quick-type,
.quick-count {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-end !important;
    gap: 3px !important;
    height: 46px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.quick-type > span,
.quick-count > span {
    display: block !important;
    height: 10px !important;
    line-height: 10px !important;
    white-space: nowrap !important;
    margin: 0 !important;
}

.quick-loss-fields {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.quick-bottom-row {
    display: flex !important;
    align-items: center !important;
    height: 34px !important;
    margin: 0 !important;
    padding: 0 !important;
}

@media (max-width: 700px) {
    .quick-entry .quick-form {
        max-width: calc(100% - 65px) !important;
    }
}


/* Inzet totaal = rood, want verliezen doen pijn */
#quickAdjustmentAmount[readonly] {
    color: var(--red) !important;
    font-weight: 700;
}

.quick-stake-total {
    color: var(--red) !important;
}


/* Datum terug in de compacte handmatige invoer */
.quick-date {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 34px;
}

.quick-date span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
}

.quick-date input {
    width: 125px;
    height: 34px;
    box-sizing: border-box;
    padding: 0 8px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--panel-3, var(--panel-2));
    color: var(--text);
    font: inherit;
    font-size: 11px;
}

.quick-date input:focus {
    outline: none;
    border-color: var(--green);
}

@media (max-width: 700px) {
    .quick-date {
        width: 100%;
    }

    .quick-date input {
        width: 140px;
    }
}


/* Datum compact uitlijnen: geen label boven het veld */
.quick-date {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 34px;
}

.quick-date span {
    display: none !important;
}

.quick-date input {
    width: 125px;
    height: 34px;
    margin: 0;
    box-sizing: border-box;
    padding: 0 8px;
    line-height: 32px;
    vertical-align: middle;
}


/* Final manual-entry date alignment */
.quick-bottom-row .quick-date,
.quick-bottom-row .quick-date input,
.quick-bottom-row .quick-amount,
.quick-bottom-row .quick-submit {
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    box-sizing: border-box !important;
}

.quick-bottom-row .quick-date input {
    width: 125px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: 32px !important;
    font-size: 13px !important;
    margin: 0 !important;
    vertical-align: middle !important;
}


/* =========================================================
   MSTR BETS V4 — FULL-WIDTH DASHBOARD
   ========================================================= */
.container {
    width: 100%;
    max-width: none;
    margin: 0;
}

.dashboard-shell {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    align-items: start;
    gap: 24px;
    padding: 0 40px 30px;
}

.dashboard-sidebar {
    position: sticky;
    top: 94px;
    padding-top: 32px;
}

.dashboard-sidebar .eyebrow {
    margin-bottom: 10px;
}

.sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-actions .button {
    width: 100%;
}

.dashboard-content {
    min-width: 0;
}

.dashboard-content .hero {
    padding-top: 40px;
}

@media (max-width: 820px) {
    .dashboard-shell {
        grid-template-columns: 1fr;
        gap: 0;
        padding-left: 20px;
        padding-right: 20px;
    }

    .dashboard-sidebar {
        position: static;
        padding-top: 22px;
    }

    .sidebar-actions {
        flex-direction: row;
    }

    .sidebar-actions .button {
        width: auto;
        flex: 1;
    }
}

@media (max-width: 560px) {
    .sidebar-actions {
        flex-direction: column;
    }
}

/* =========================================================
   V4 RESPONSIVE ALIGNMENT — KEEP ALL CONTENT INSIDE VIEWPORT
   ========================================================= */
html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.container,
.panel,
.dashboard-content,
.dashboard-sidebar,
.filters,
.table-wrap {
    min-width: 0;
}

.panel {
    width: 100%;
}

.filters > * {
    min-width: 0;
}

/* Normal pages: give the content a small, consistent side margin. */
body > main.container:not(.dashboard-shell) {
    padding-left: 24px;
    padding-right: 24px;
}

/* Dashboard remains full-width, with a small safe gutter. */
.dashboard-shell {
    width: 100%;
    max-width: none;
    padding-left: 32px;
    padding-right: 32px;
}

@media (max-width: 820px) {
    header .nav {
        padding-left: 16px;
        padding-right: 16px;
        gap: 10px;
    }

    header nav {
        gap: 2px;
    }

    header nav a {
        padding: 8px 8px;
        font-size: 12px;
    }

    body > main.container:not(.dashboard-shell) {
        padding-left: 16px;
        padding-right: 16px;
    }

    .dashboard-shell {
        display: block;
        width: 100%;
        padding-left: 16px;
        padding-right: 16px;
    }

    .dashboard-sidebar {
        width: 100%;
        padding-top: 22px;
    }

    .dashboard-content {
        width: 100%;
    }

    .dashboard-content .hero {
        width: 100%;
    }

    .cards.four,
    .period-grid {
        grid-template-columns: 1fr 1fr;
    }

    .filters {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    header .nav {
        min-height: 62px;
    }

    .logo {
        font-size: 18px;
        white-space: nowrap;
    }

    header nav a {
        padding: 7px 6px;
        font-size: 11px;
    }

    .page-title {
        padding-top: 32px;
        padding-bottom: 22px;
    }

    .page-title h1 {
        font-size: 32px;
    }

    .panel {
        padding: 16px;
    }

    .cards.four,
    .period-grid {
        grid-template-columns: 1fr;
    }
}


/* V4 MSTR Bets logo */
.logo {
    display: flex;
    align-items: center;
    margin-left: 14px;
    height: 52px;
    width: 180px;
    overflow: hidden;
}
.logo img {
    display: block;
    width: 176px;
    height: auto;
    max-height: 48px;
    object-fit: contain;
    object-position: left center;
}
@media (max-width: 700px) {
    .logo { width: 150px; margin-left: 8px; }
    .logo img { width: 148px; max-height: 44px; }
}


/* V4 dashboard visuals */
.dashboard-visuals {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(340px, .9fr);
    gap: 16px;
    margin-bottom: 16px;
}
.chart-panel { min-width: 0; }
.chart-value { color: var(--green); font-size: 15px; }
.chart-canvas-wrap { position: relative; width: 100%; }
.trend-chart-wrap { height: 260px; }
.trend-chart-wrap canvas { width: 100% !important; height: 100% !important; display:block; }
.results-visual { display:grid; grid-template-columns: 190px minmax(0,1fr); gap: 18px; align-items:center; min-height:260px; }
.donut-wrap { position:relative; width:190px; height:190px; }
.donut-wrap canvas { width:190px !important; height:190px !important; display:block; }
.donut-center { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; pointer-events:none; }
.donut-center strong { font-size:28px; line-height:1; }
.donut-center span { color:var(--muted); font-size:12px; margin-top:4px; }
.result-legend { display:flex; flex-direction:column; gap:18px; }
.result-legend > div { display:grid; grid-template-columns:14px 1fr auto auto; gap:8px; align-items:center; font-size:13px; }
.result-legend .dot { width:10px; height:10px; border-radius:50%; display:block; }
.result-legend .dot.win { background:var(--green); }
.result-legend .dot.loss { background:var(--red); }
.result-legend .dot.cashout { background:var(--yellow); }
.result-legend .dot.void { background:#9aa8ba; }
.result-legend strong { font-size:14px; }
.result-legend small { color:var(--muted); min-width:38px; text-align:right; }
@media (max-width: 1000px) {
    .dashboard-visuals { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .trend-chart-wrap { height:220px; }
    .results-visual { grid-template-columns:1fr; justify-items:center; padding:10px 0; }
    .result-legend { width:100%; }
}

/* V4 polished KPI row + tall bets sidebar */
.dashboard-shell {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 24px;
    padding-left: 44px;
    padding-right: 44px;
}
.dashboard-sidebar {
    min-height: 560px;
    box-sizing: border-box;
    padding: 22px 12px;
    border: 1px solid #223142;
    border-radius: 10px;
    background: linear-gradient(180deg, #101923 0%, #09111a 100%);
}
.dashboard-sidebar .eyebrow {
    display: block;
    margin: 0 0 12px;
    padding-left: 2px;
}
.dashboard-content .hero { margin-bottom: 20px; }
.dashboard-kpis {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.dashboard-kpi {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    padding: 18px;
}
.dashboard-kpi > div:last-child { min-width: 0; }
.dashboard-kpi span, .dashboard-kpi strong, .dashboard-kpi small { display:block; }
.dashboard-kpi strong { margin: 3px 0 2px; }
.dashboard-kpi small b { color: var(--green); font-weight: 600; }
.kpi-icon {
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius: 10px;
    background: rgba(19, 184, 111, .10);
    color: var(--green);
    font-size: 31px;
    font-weight: 700;
}
.dashboard-kpi:nth-child(4) .kpi-icon { background: rgba(94, 123, 160, .14); color: #c7d4e4; }
.active-dot {
    display:inline-block !important;
    width:7px; height:7px; border-radius:50%;
    background: var(--green);
    margin-right:5px;
    vertical-align:1px;
}
@media (max-width: 1050px) {
    .dashboard-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
    .dashboard-shell { padding-left:16px; padding-right:16px; }
    .dashboard-sidebar { min-height:0; }
    .dashboard-kpis { grid-template-columns: 1fr; }
}

/* V4 navigation icons */
header .nav > .logo img {
    display: block;
    width: 170px;
    height: auto;
    object-fit: contain;
}
header nav a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
header nav .nav-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    display: inline-block;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: .95;
}
header nav a.active .nav-icon { color: var(--green); }
@media (max-width: 560px) {
    header .nav > .logo img { width: 135px; }
    header nav a { gap: 5px; padding: 7px 6px; }
    header nav .nav-icon { width: 14px; height: 14px; flex-basis: 14px; }
}

/* Final V4 spacing: keep the hero clearly separated from the navigation bar */
.dashboard-content .hero {
    margin-top: 18px !important;
}

/* Restore the compact, wide MSTR Bets logo proportions */
header .nav > .logo {
    width: 150px !important;
    height: 50px !important;
    margin-left: 8px !important;
    display: flex !important;
    align-items: center !important;
}

header .nav > .logo img {
    width: 148px !important;
    height: auto !important;
    max-height: 44px !important;
    object-fit: contain !important;
}

@media (max-width: 560px) {
    header .nav > .logo {
        width: 135px !important;
        margin-left: 8px !important;
    }
    header .nav > .logo img {
        width: 132px !important;
        max-height: 40px !important;
    }
}

/* V4 manual pending bets */
.quick-stakes { width: 100%; display: flex; flex-direction: column; gap: 5px; }
.quick-stake-row { display: grid; grid-template-columns: 58px minmax(105px, 1fr) minmax(130px, 1fr); align-items: end; gap: 7px; }
.quick-stake-row > label { display:flex; flex-direction:column; gap:2px; min-width:0; }
.quick-stake-row label > span { font-size:10px; color:var(--muted); white-space:nowrap; }
.quick-stake-name { font-size:10px; color:var(--muted); padding-bottom:8px; }
.quick-money { display:flex; align-items:center; height:30px; border:1px solid var(--border); border-radius:7px; background:var(--input); overflow:hidden; }
.quick-money b { padding-left:8px; color:var(--muted); font-size:11px; font-weight:600; }
.quick-money input { width:100%; border:0 !important; background:transparent !important; height:28px !important; padding:0 7px !important; outline:none; }
.quick-top-row { justify-content:flex-start !important; gap:10px !important; }
.quick-date { margin-left:auto !important; }
.quick-hint { font-size:10px; color:var(--muted); }
.quick-bottom-row { width:100% !important; justify-content:space-between !important; }
.my-bets-table .my-bet-status { min-width:105px; height:30px; padding:0 8px; }
.my-bets-table td, .my-bets-table th { white-space:nowrap; }
@media (max-width: 760px) {
  .quick-stake-row { grid-template-columns: 52px 1fr 1fr; }
  .quick-date { margin-left:0 !important; }
  .quick-hint { display:none; }
}


/* Coupon ID search */
.coupon-search {
    display:flex;
    align-items:center;
    gap:10px;
    margin:0 0 12px;
}
.coupon-search label {
    font-size:11px;
    color:var(--muted);
    white-space:nowrap;
}
.coupon-search input {
    width:260px;
    height:34px;
    padding:0 11px;
    border:1px solid var(--border);
    border-radius:8px;
    background:var(--input);
    color:var(--text);
    outline:none;
    box-sizing:border-box;
}
.coupon-search input:focus {
    border-color:var(--green);
}
.quick-stake-row {
    grid-template-columns:58px minmax(105px, 1fr) minmax(130px, 1fr) minmax(130px, 1fr) !important;
}
.quick-coupon-input {
    width:100%;
    border:0 !important;
    background:transparent !important;
    height:28px !important;
    padding:0 7px !important;
    outline:none;
    color:var(--text);
    box-sizing:border-box;
}
.quick-stake-row label em {
    font-style:normal;
    opacity:.65;
}
@media (max-width:760px) {
    .coupon-search { align-items:flex-start; flex-direction:column; gap:5px; }
    .coupon-search input { width:100%; }
    .quick-stake-row { grid-template-columns:52px 1fr 1fr !important; }
}

/* Bookmaker search in Mijn bets */
.my-bets-search.bookmaker-search {
    margin-top: 8px;
}
.my-bets-search.bookmaker-search label {
    display: block;
    margin-bottom: 5px;
}
.my-bets-search.bookmaker-search input {
    width: 100%;
    box-sizing: border-box;
}

/* Final V4 manual bookmaker + aligned bet searches */
.quick-stake-row {
    grid-template-columns: 58px minmax(105px, 1fr) minmax(130px, 1fr) minmax(130px, 1fr) minmax(120px, 1fr) !important;
}
.quick-bookmaker-input {
    width: 100%;
    height: 30px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--input);
    color: var(--text);
    padding: 0 7px;
    box-sizing: border-box;
    outline: none;
    font-size: 11px;
}
.quick-bookmaker-input:focus { border-color: var(--green); }
.bets-search-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
    margin: 0 0 12px;
}
.bets-search-row .coupon-search {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
}
.bets-search-row .coupon-search label {
    display: block;
    line-height: 14px;
}
.bets-search-row .coupon-search input {
    width: 100%;
    height: 34px;
}
@media (max-width: 760px) {
    .bets-search-row { grid-template-columns: 1fr; gap: 8px; }
    .quick-stake-row { grid-template-columns: 52px 1fr 1fr !important; }
    .quick-stake-row label:nth-of-type(n+3) { grid-column: span 1; }
}

/* Status filter in Mijn bets */
.bets-search-row .status-filter select {
    width: 100%;
    height: 34px;
    padding: 0 34px 0 11px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--input);
    color: var(--text);
    outline: none;
    box-sizing: border-box;
    font: inherit;
    font-size: 11px;
    cursor: pointer;
    color-scheme: dark;
}
.bets-search-row .status-filter select:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 2px rgba(53,208,127,.08);
}
.bets-search-row .status-filter select option {
    background: var(--panel-2);
    color: var(--text);
}

/* FINAL MANUAL BOOKMAKER DROPDOWN — custom dark menu */
.quick-stake-row {
    grid-template-columns: 58px minmax(150px, 1.05fr) minmax(150px, 1.05fr) minmax(145px, .9fr) minmax(175px, 1.05fr) !important;
    gap: 8px !important;
}

.quick-custom-select {
    position: relative;
    width: 100%;
    min-width: 0;
}

.quick-custom-select-btn {
    width: 100%;
    height: 30px;
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 9px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--input, var(--panel-3));
    color: var(--text);
    font-size: 11px;
    font-weight: 700;
    text-align: left;
    outline: none;
}

.quick-custom-select-btn:hover,
.quick-custom-select.open .quick-custom-select-btn {
    border-color: var(--green);
    box-shadow: 0 0 0 2px rgba(53,208,127,.08);
}

.quick-custom-select-value {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quick-custom-select-chevron {
    color: var(--muted);
    font-size: 14px;
    line-height: 1;
    transition: transform .15s ease;
}

.quick-custom-select.open .quick-custom-select-chevron {
    transform: rotate(180deg);
    color: var(--green);
}

.quick-custom-options {
    position: absolute;
    z-index: 100;
    left: 0;
    right: 0;
    top: calc(100% + 5px);
    display: none;
    padding: 5px;
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: 9px;
    box-shadow: 0 14px 30px rgba(0,0,0,.38);
}

.quick-custom-select.open .quick-custom-options {
    display: block;
}

.quick-custom-options button {
    display: block;
    width: 100%;
    min-height: 30px;
    padding: 6px 9px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text);
    font-size: 11px;
    font-weight: 650;
    text-align: left;
}

.quick-custom-options button:hover,
.quick-custom-options button.selected {
    background: var(--panel-3);
    color: var(--green);
}

@media (max-width: 760px) {
    .quick-stake-row {
        grid-template-columns: 52px 1fr 1fr !important;
    }
}

/* Keep the custom menu fully visible outside the manual-entry card. */
.quick-entry {
    position: relative;
    z-index: 30;
    overflow: visible !important;
}


/* Mijn bets: compacte dashboardlijst met link naar volledige geschiedenis */
.my-bets-full-list-wrap {
    display:flex;
    justify-content:flex-end;
    margin-top:12px;
}
.my-bets-full-list {
    display:inline-flex;
    align-items:center;
    gap:7px;
    min-height:34px;
    padding:0 13px;
    border:1px solid var(--border);
    border-radius:8px;
    background:var(--panel-2);
    color:var(--text);
    text-decoration:none;
    font-size:12px;
    font-weight:600;
    transition:border-color .15s ease, background .15s ease, transform .15s ease;
}
.my-bets-full-list:hover {
    border-color:var(--green);
    background:var(--panel-3);
    transform:translateY(-1px);
}
.my-bets-full-list span { color:var(--green); font-size:15px; line-height:1; }
@media (max-width:560px) {
    .my-bets-full-list-wrap { justify-content:stretch; }
    .my-bets-full-list { width:100%; justify-content:center; box-sizing:border-box; }
}


/* Dashboard sidebar — disabled feature placeholders */
.sidebar-coming-soon {
    position: relative;
    cursor: default !important;
    pointer-events: none;
    opacity: 1;
    background: var(--panel-2) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.sidebar-coming-soon small {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .12em;
    color: var(--muted);
    white-space: nowrap;
}
.history-filters-row {
    grid-template-columns: minmax(0,1fr) minmax(0,1fr) minmax(170px,.55fr);
}
@media (max-width: 900px) {
    .history-filters-row { grid-template-columns: 1fr; }
}

/* MSTR custom date picker */
.mstr-date-picker { position: relative; width: 100%; }
.mstr-date-input { width: 100%; cursor: pointer; }
.mstr-calendar {
    position: absolute; z-index: 1000; top: calc(100% + 8px); left: 0;
    width: 290px; padding: 14px; background: var(--panel-2);
    border: 1px solid var(--border); border-radius: 12px;
    box-shadow: 0 18px 45px rgba(0,0,0,.38);
}
.mstr-cal-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
.mstr-cal-title { font-weight:700; color:var(--text); text-transform:capitalize; }
.mstr-cal-nav { width:30px; height:30px; padding:0; border:1px solid var(--border); border-radius:8px; background:var(--panel); color:var(--text); cursor:pointer; }
.mstr-cal-nav:hover { border-color:var(--green); color:var(--green); }
.mstr-cal-week, .mstr-cal-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:4px; }
.mstr-cal-week span { text-align:center; color:var(--muted); font-size:11px; padding-bottom:4px; }
.mstr-cal-day { height:32px; border:0; border-radius:7px; background:transparent; color:var(--text); cursor:pointer; font-size:13px; }
.mstr-cal-day:hover { background:rgba(53,208,127,.12); color:var(--green); }
.mstr-cal-day.is-today { border:1px solid var(--border); }
.mstr-cal-day.is-selected { background:var(--green); color:#07100b; font-weight:700; }
.mstr-cal-day.is-other { color:#536170; }
.mstr-cal-clear { width:100%; margin-top:10px; height:30px; border:1px solid var(--border); border-radius:7px; background:var(--panel); color:var(--muted); cursor:pointer; font-size:12px; }
.mstr-cal-clear:hover { color:var(--text); border-color:var(--green); }
@media (max-width:560px) { .mstr-calendar { width:270px; } }


/* Handmatige bet datumprikker in dezelfde MSTR stijl */
.quick-date-picker { position: relative; width: 125px; }
.quick-date-picker .mstr-date-input {
    width: 125px !important;
    height: 34px;
    box-sizing: border-box;
    padding: 0 8px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--panel-3, var(--panel-2));
    color: var(--text);
    font: inherit;
    font-size: 11px;
    cursor: pointer;
}
.quick-date-picker .mstr-date-input:focus { outline: none; border-color: var(--green); }
.quick-date-picker .mstr-calendar { top: calc(100% + 8px); left: 0; width: 290px; }
@media (max-width:560px) { .quick-date-picker .mstr-calendar { width:270px; } }


/* Handmatig bets toevoegen — nette sectiekop en gelijke invoerhoogte */
.quick-entry {
    display: block !important;
    padding: 16px 16px 14px !important;
}
.quick-section-head {
    margin: 0 0 14px !important;
}
.quick-section-head .eyebrow {
    display: block;
    margin-bottom: 5px;
}
.quick-section-head h2 {
    margin: 0;
    font-size: 20px;
    line-height: 1.15;
}
.quick-entry .quick-form {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
}
.quick-entry .quick-top-row {
    display: flex !important;
    align-items: flex-end !important;
    gap: 12px !important;
}
.quick-entry .quick-count,
.quick-entry .quick-date {
    height: auto !important;
    align-items: center !important;
}
.quick-entry .quick-count > span,
.quick-entry .quick-date > span {
    width: 100%;
    text-align: center;
    margin-bottom: 5px !important;
}
.quick-entry #quickBetCount,
.quick-entry .quick-date-picker .mstr-date-input {
    height: 48px !important;
    box-sizing: border-box !important;
}
.quick-entry #quickBetCount {
    width: 125px !important;
}
.quick-entry .quick-date-picker,
.quick-entry .quick-date-picker .mstr-date-input {
    width: 125px !important;
}
.quick-entry > .quick-label {
    display: none !important;
}


/* Final manual-entry header/input sizing */
.quick-section-head .eyebrow {
    display:block;
    margin:0 !important;
}
.quick-entry .quick-count,
.quick-entry .quick-date {
    height:48px !important;
    align-items:center !important;
}
.quick-entry .quick-count > span,
.quick-entry .quick-date > span {
    width:100%;
    text-align:center;
    margin-bottom:5px !important;
}
.quick-entry #quickBetCount {
    width:52px !important;
    height:48px !important;
}
.quick-entry .quick-date-picker,
.quick-entry .quick-date-picker .mstr-date-input {
    width:125px !important;
}
.quick-entry .quick-date-picker .mstr-date-input {
    height:48px !important;
}
.quick-entry .quick-top-row {
    gap:12px !important;
}

/* Final manual-entry alignment: Bets input matches calendar height */
.quick-entry .quick-count,
.quick-entry .quick-date {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    height: auto !important;
}
.quick-entry .quick-count > span,
.quick-entry .quick-date > span {
    display: block !important;
    width: 100% !important;
    height: 16px !important;
    line-height: 16px !important;
    margin: 0 0 5px !important;
    text-align: center !important;
}
.quick-entry #quickBetCount {
    width: 52px !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    box-sizing: border-box !important;
    flex: 0 0 48px !important;
}
.quick-entry .quick-date-picker,
.quick-entry .quick-date-picker .mstr-date-input {
    width: 125px !important;
}
.quick-entry .quick-date-picker .mstr-date-input {
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    box-sizing: border-box !important;
}

/* Handmatige invoer: Bets en Datum dezelfde filter-layout */
.quick-entry .quick-top-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    align-items: end !important;
    gap: 12px !important;
    width: 100% !important;
}
.quick-entry .quick-count,
.quick-entry .quick-date {
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    align-items: stretch !important;
}
.quick-entry .quick-count > span,
.quick-entry .quick-date > span {
    width: 100% !important;
    text-align: left !important;
    margin-bottom: 5px !important;
}
.quick-entry #quickBetCount,
.quick-entry .quick-date-picker,
.quick-entry .quick-date-picker .mstr-date-input {
    width: 100% !important;
}
.quick-entry #quickBetCount {
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    box-sizing: border-box !important;
    text-align: left !important;
    padding: 0 12px !important;
}
.quick-entry .quick-date-picker .mstr-date-input {
    height: 48px !important;
}
@media (max-width: 560px) {
    .quick-entry .quick-top-row {
        grid-template-columns: 1fr 1fr !important;
    }
}


/* CASHOUT POPUP */
.cashout-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(4,8,12,.72);
    backdrop-filter: blur(5px);
}
.cashout-modal {
    width: min(430px, 100%);
    padding: 22px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 24px 70px rgba(0,0,0,.48);
}
.cashout-modal-head {
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:16px;
}
.cashout-modal-head .eyebrow { display:block; margin:0 0 5px; }
.cashout-modal-head h3 { margin:0; font-size:20px; line-height:1.15; color:var(--text); }
.cashout-modal-close {
    width:32px;
    height:32px;
    flex:0 0 32px;
    border:1px solid var(--border);
    border-radius:8px;
    background:var(--panel-2);
    color:var(--muted);
    font-size:20px;
    line-height:1;
    cursor:pointer;
}
.cashout-modal-close:hover { color:var(--text); border-color:var(--green); }
.cashout-modal-text { margin:14px 0 18px; color:var(--muted); font-size:12px; line-height:1.55; }
.cashout-field { display:flex; flex-direction:column; gap:6px; }
.cashout-field > span { font-size:11px; font-weight:700; color:var(--muted); }
.cashout-money {
    display:flex;
    align-items:center;
    height:40px;
    border:1px solid var(--border);
    border-radius:8px;
    background:var(--input);
    overflow:hidden;
}
.cashout-money:focus-within { border-color:var(--green); box-shadow:0 0 0 2px rgba(53,208,127,.08); }
.cashout-money b { padding-left:11px; color:var(--muted); font-size:12px; }
.cashout-money input { width:100%; height:38px; border:0 !important; outline:0 !important; background:transparent !important; color:var(--text); padding:0 10px !important; font:inherit; }
.cashout-money input.input-error { color:var(--red); }
.cashout-modal-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:18px; }
.cashout-cancel, .cashout-confirm {
    height:34px; padding:0 13px; border-radius:8px; font:inherit; font-size:11px; font-weight:700; cursor:pointer;
}
.cashout-cancel { border:1px solid var(--border); background:var(--panel-2); color:var(--muted); }
.cashout-cancel:hover { color:var(--text); }
.cashout-confirm { border:1px solid var(--green-dark); background:var(--green); color:#07100b; }
.cashout-confirm:hover { filter:brightness(1.05); }
@media (max-width:560px) {
    .cashout-modal-backdrop { align-items:flex-end; }
    .cashout-modal { padding:18px; }
    .cashout-modal-actions > button { flex:1; }
}

/* Center navigation: leaves the right side open for a future account area. */
@media (min-width: 821px) {
    header .nav {
        position: relative;
        justify-content: space-between;
    }

    header .nav > nav {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        white-space: nowrap;
    }
}

@media (max-width: 820px) {
    header .nav {
        justify-content: space-between;
    }
}


/* Hub navigation inside the Sportbets environment */
.hub-back-button {
    position: relative;
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    min-height: 44px;
    box-sizing: border-box;
    margin: 0 0 20px;
    padding: 0 12px;
    border: 1px solid rgba(53, 208, 127, .22);
    border-radius: 9px;
    background: linear-gradient(135deg, rgba(53,208,127,.12), rgba(53,208,127,.045));
    color: var(--text);
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .01em;
    overflow: hidden;
    transition: border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
}
.hub-back-button::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.055), transparent);
    transform: translateX(-120%);
    transition: transform .45s ease;
}
.hub-back-button:hover {
    border-color: rgba(53, 208, 127, .48);
    background: linear-gradient(135deg, rgba(53,208,127,.17), rgba(53,208,127,.065));
    transform: translateY(-1px);
    box-shadow: 0 7px 18px rgba(0,0,0,.18), 0 0 18px rgba(53,208,127,.06);
}
.hub-back-button:hover::after {
    transform: translateX(120%);
}
.hub-back-button svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    fill: none;
    stroke: var(--green);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.hub-back-button span {
    position: relative;
    z-index: 1;
}


/* Hub back button sits above the Sportbets sidebar column */
.dashboard-shell { position: relative; }
.dashboard-sidebar { padding-top: 82px; }
.hub-back-button {
    position: absolute;
    top: 0;
    left: 0;
    width: 220px;
    margin: 0;
}
@media (max-width: 820px) {
    .dashboard-sidebar { padding-top: 22px; }
    .hub-back-button {
        position: relative;
        top: auto;
        left: auto;
        width: 100%;
        margin: 0 0 20px;
    }
}


/* Modern disabled sidebar feature buttons */
.sidebar-coming-soon {
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    gap: 5px !important;
    min-height: 62px;
    padding: 12px 14px !important;
    box-sizing: border-box;
    border-radius: 11px !important;
    background: linear-gradient(135deg, rgba(22,31,42,.96), rgba(12,18,25,.96)) !important;
    transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.sidebar-coming-soon span {
    font-size: 13px;
    line-height: 1.2;
    font-weight: 700;
    color: var(--text);
}
.sidebar-coming-soon small {
    font-size: 8px !important;
    line-height: 1.2;
    letter-spacing: .14em !important;
    color: var(--muted) !important;
}

/* Final sidebar proportions: keep the Bets column compact and clearly below the hub button */
.dashboard-sidebar {
    min-height: 0 !important;
}
.dashboard-sidebar-wrap {
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: sticky;
    top: 94px;
    align-self: start;
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
}

/* Hub button and Bets panel are deliberately separate visual blocks. */
.dashboard-sidebar-wrap .hub-back-button {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    margin: 0 !important;
    flex: 0 0 auto;
}
.dashboard-sidebar-wrap .dashboard-sidebar {
    position: relative;
    top: auto;
    margin: 0 !important;
    padding: 22px 12px !important;
    min-height: 0 !important;
    box-sizing: border-box;
}
@media (max-width: 820px) {
    .dashboard-sidebar-wrap {
        position: static;
    }
    .dashboard-sidebar-wrap .hub-back-button {
        width: 100%;
        margin: 0;
    }
    .dashboard-sidebar-wrap .dashboard-sidebar {
        padding-top: 22px;
    }
}


/* FINAL: hub button and Bets panel are physically separate blocks */
.dashboard-sidebar-wrap {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 18px !important;
    position: sticky !important;
    top: 94px !important;
    align-self: start !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
}
.dashboard-sidebar-wrap .hub-button-slot {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    height: 44px !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}
.dashboard-sidebar-wrap .hub-back-button {
    position: relative !important;
    inset: auto !important;
    display: flex !important;
    width: 100% !important;
    height: 44px !important;
    min-height: 44px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}
.dashboard-sidebar-wrap .dashboard-sidebar {
    position: relative !important;
    inset: auto !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 22px 12px !important;
    box-sizing: border-box !important;
    border: 1px solid #223142 !important;
    border-radius: 10px !important;
    background: linear-gradient(180deg, #101923 0%, #09111a 100%) !important;
}
@media (max-width: 820px) {
    .dashboard-sidebar-wrap { position: static !important; gap: 18px !important; }
    .dashboard-sidebar-wrap .hub-button-slot { height: 44px !important; min-height: 44px !important; }
    .dashboard-sidebar-wrap .dashboard-sidebar { padding-top: 22px !important; }
}

/* Definitive hub/sidebar separation */
.dashboard-shell .dashboard-sidebar-wrap {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 24px !important;
    position: sticky !important;
    top: 94px !important;
    width: 100% !important;
    height: max-content !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-sizing: border-box !important;
}
.dashboard-shell .dashboard-sidebar-wrap .hub-button-slot {
    display: block !important;
    position: static !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-sizing: border-box !important;
}
.dashboard-shell .dashboard-sidebar-wrap .hub-back-button {
    position: static !important;
    display: flex !important;
    width: 100% !important;
    height: 48px !important;
    min-height: 48px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}
.dashboard-shell .dashboard-sidebar-wrap .dashboard-sidebar {
    position: static !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 22px 12px !important;
    box-sizing: border-box !important;
    border: 1px solid #223142 !important;
    border-radius: 10px !important;
    background: linear-gradient(180deg, #101923 0%, #09111a 100%) !important;
}
.dashboard-shell .dashboard-sidebar-wrap .dashboard-sidebar .eyebrow {
    margin: 0 0 12px !important;
    padding: 0 2px !important;
}
@media (max-width: 820px) {
    .dashboard-shell .dashboard-sidebar-wrap {
        position: static !important;
        gap: 24px !important;
    }
}


/* STRUCTURAL FIX: hub is outside the dashboard grid, so it can never overlap the BETS panel. */
.sportbets-page {
    width: 100%;
    max-width: none;
    padding: 0 44px 30px;
    box-sizing: border-box;
}
.sportbets-hub-row {
    width: 220px;
    margin: 22px 0 14px;
}
.sportbets-hub-row .hub-back-button {
    position: static !important;
    display: flex !important;
    width: 100% !important;
    height: 48px !important;
    min-height: 48px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}
.sportbets-page > .dashboard-shell {
    padding: 0 !important;
    margin: 0 !important;
    width: 100%;
}
.sportbets-page .dashboard-sidebar-wrap {
    position: sticky !important;
    top: 94px !important;
}
.sportbets-page .dashboard-sidebar {
    min-height: 0 !important;
    padding-top: 22px !important;
}
@media (max-width: 820px) {
    .sportbets-page { padding: 0 16px 30px; }
    .sportbets-hub-row { width: 100%; margin: 16px 0 14px; }
    .sportbets-page > .dashboard-shell { display: block !important; }
    .sportbets-page .dashboard-sidebar-wrap { position: static !important; }
}

/* SPORTBETS FINAL LAYOUT: hub button belongs to the sidebar column,
   but is absolutely positioned so it does NOT push the dashboard content down. */
.sportbets-page {
    padding: 0 32px 30px !important;
}
.sportbets-page > .dashboard-shell {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    grid-template-columns: 210px minmax(0, 1fr) !important;
    gap: 24px !important;
    align-items: start !important;
}
.sportbets-page > .dashboard-shell > .dashboard-sidebar-wrap {
    position: relative !important;
    top: auto !important;
    width: 100% !important;
    padding-top: 72px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    align-self: start !important;
}
.sportbets-page > .dashboard-shell > .dashboard-sidebar-wrap > .hub-back-button {
    position: absolute !important;
    top: 17px !important;
    left: 0 !important;
    width: 100% !important;
    height: 48px !important;
    min-height: 48px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}
.sportbets-page > .dashboard-shell > .dashboard-sidebar-wrap > .dashboard-sidebar {
    position: static !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 22px 12px !important;
    box-sizing: border-box !important;
    min-height: 0 !important;
}
.sportbets-page > .dashboard-shell > .dashboard-content {
    margin: 0 !important;
    padding: 0 !important;
}

@media (max-width: 820px) {
    .sportbets-page {
        padding: 0 16px 30px !important;
    }
    .sportbets-page > .dashboard-shell {
        display: block !important;
        padding: 0 !important;
    }
    .sportbets-page > .dashboard-shell > .dashboard-sidebar-wrap {
        position: relative !important;
        padding-top: 72px !important;
        margin: 0 !important;
    }
    .sportbets-page > .dashboard-shell > .dashboard-content {
        margin-top: 0 !important;
    }
}


/* Dashboard return fix: keep the hub button physically above the BETS panel
   without positioning it inside the panel or changing dashboard content height. */
.dashboard-shell > .dashboard-sidebar-wrap-index {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 18px !important;
    position: static !important;
    align-self: start !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-sizing: border-box !important;
}
.dashboard-shell > .dashboard-sidebar-wrap-index > .hub-back-button {
    position: static !important;
    display: flex !important;
    width: 100% !important;
    height: 48px !important;
    min-height: 48px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}
.dashboard-shell > .dashboard-sidebar-wrap-index > .dashboard-sidebar {
    position: static !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 22px 12px !important;
    box-sizing: border-box !important;
}
@media (max-width: 820px) {
    .dashboard-shell > .dashboard-sidebar-wrap-index {
        position: static !important;
        gap: 18px !important;
    }
}

/* FINAL DASHBOARD RETURN ALIGNMENT
   The hub button stays in the left column but is absolutely positioned,
   so returning from History/Statistics never pushes the dashboard content down. */
.dashboard-shell > .dashboard-sidebar-wrap-index {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 88px 0 0 !important;
    box-sizing: border-box !important;
    align-self: start !important;
}
.dashboard-shell > .dashboard-sidebar-wrap-index > .hub-back-button {
    position: absolute !important;
    top: 40px !important;
    left: 0 !important;
    width: 100% !important;
    height: 48px !important;
    min-height: 48px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}
.dashboard-shell > .dashboard-sidebar-wrap-index > .dashboard-sidebar {
    position: static !important;
    top: auto !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 22px 12px !important;
    box-sizing: border-box !important;
}

@media (max-width: 820px) {
    .dashboard-shell > .dashboard-sidebar-wrap-index {
        position: relative !important;
        padding-top: 72px !important;
    }
    .dashboard-shell > .dashboard-sidebar-wrap-index > .hub-back-button {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
    }
}

/* FINAL HUB ALIGNMENT — keep the hub button in normal document flow.
   This prevents sticky positioning from putting it inside/against the BETS block
   after returning from History or Statistics. The button aligns with the hero top. */
.dashboard-shell > .dashboard-sidebar-wrap-index,
.sportbets-page > .dashboard-shell > .dashboard-sidebar-wrap {
    position: static !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 18px !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 40px 0 0 !important;
    box-sizing: border-box !important;
    align-self: start !important;
    background: transparent !important;
    border: 0 !important;
}

.dashboard-shell > .dashboard-sidebar-wrap-index > .hub-back-button,
.sportbets-page > .dashboard-shell > .dashboard-sidebar-wrap > .hub-back-button {
    position: static !important;
    display: flex !important;
    flex: 0 0 48px !important;
    width: 100% !important;
    height: 48px !important;
    min-height: 48px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.dashboard-shell > .dashboard-sidebar-wrap-index > .dashboard-sidebar,
.sportbets-page > .dashboard-shell > .dashboard-sidebar-wrap > .dashboard-sidebar {
    position: static !important;
    top: auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 22px 12px !important;
    box-sizing: border-box !important;
}

@media (max-width: 820px) {
    .dashboard-shell > .dashboard-sidebar-wrap-index,
    .sportbets-page > .dashboard-shell > .dashboard-sidebar-wrap {
        position: static !important;
        gap: 18px !important;
        padding-top: 22px !important;
    }
}

/* FINAL PIXEL ALIGNMENT: hub button top matches the Sportbets Tracker hero. */
.dashboard-shell > .dashboard-sidebar-wrap-index {
    padding-top: 18px !important;
}

@media (max-width: 820px) {
    .dashboard-shell > .dashboard-sidebar-wrap-index {
        padding-top: 18px !important;
    }
}

/* FINAL HUB HOVER FIX — no full-screen sweep/flash on hover. */
.hub-back-button::after {
    display: none !important;
}
.hub-back-button {
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease !important;
}
.hub-back-button:hover {
    transform: none !important;
}

/* Profile / account area */
.profile-nav {
    display: inline-flex !important;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 5px 8px 5px 6px !important;
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--text) !important;
    text-decoration: none;
    background: transparent;
    transition: background .16s ease, border-color .16s ease;
}
.profile-nav:hover {
    background: var(--panel-2) !important;
    border-color: var(--border);
}
.profile-nav-avatar, .profile-avatar {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    overflow: hidden;
    box-sizing: border-box;
    border: 1px solid rgba(53,208,127,.45);
    background: linear-gradient(145deg, rgba(53,208,127,.2), rgba(22,31,42,.95));
    color: var(--green);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .04em;
}
.profile-nav-avatar img, .profile-avatar img { width:100%; height:100%; object-fit:cover; display:block; }
.profile-nav-name { max-width: 110px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; font-weight:800; }

.profile-page { padding-top: 34px; padding-bottom: 50px; }
.profile-layout { display:grid; grid-template-columns: 290px minmax(0,1fr); gap:20px; align-items:start; }
.profile-card, .profile-form-card { background:var(--panel); border:1px solid var(--border); border-radius:16px; box-shadow:var(--shadow); }
.profile-card { padding:26px; text-align:center; }
.profile-big-avatar { width:128px; height:128px; margin:0 auto 18px; border-radius:50%; font-size:34px; }
.profile-card h2 { margin:0; font-size:21px; letter-spacing:-.02em; }
.profile-card p { margin:7px 0 0; color:var(--muted); font-size:13px; }
.profile-form-card { padding:28px; }
.profile-form-card h2 { margin:0 0 6px; font-size:22px; }
.profile-form-card > p { margin:0 0 24px; color:var(--muted); font-size:13px; }
.profile-fields { display:grid; gap:18px; }
.profile-field { display:grid; gap:7px; }
.profile-field label { font-size:12px; font-weight:800; color:var(--muted); }
.profile-field input { width:100%; box-sizing:border-box; }
.profile-photo-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:10px; }
.profile-upload { position:relative; display:inline-flex; align-items:center; justify-content:center; min-height:42px; padding:0 15px; border-radius:10px; border:1px solid rgba(53,208,127,.28); background:rgba(53,208,127,.08); color:var(--text); font-size:12px; font-weight:800; cursor:pointer; }
.profile-upload:hover { background:rgba(53,208,127,.14); border-color:rgba(53,208,127,.48); }
.profile-upload input { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
.profile-remove { min-height:42px; padding:0 15px; border-radius:10px; border:1px solid var(--border); background:var(--panel-2); color:var(--muted); font-size:12px; font-weight:800; cursor:pointer; }
.profile-remove:hover { color:var(--text); border-color:#354250; }
.profile-save-row { display:flex; align-items:center; justify-content:flex-end; gap:14px; margin-top:26px; }
.profile-save { min-height:44px; padding:0 20px; border:0; border-radius:10px; background:linear-gradient(135deg,var(--green),var(--green-dark)); color:#06110b; font-weight:900; cursor:pointer; box-shadow:0 8px 22px rgba(53,208,127,.16); }
.profile-saved { color:var(--green); font-size:12px; font-weight:800; }
.profile-back { display:inline-flex; align-items:center; gap:7px; color:var(--muted); font-size:12px; font-weight:800; margin-bottom:18px; }
.profile-back:hover { color:var(--text); }

@media (min-width:821px) {
    header .nav { padding-right: 8px; }
    header .nav > .profile-nav { margin-left:auto; }
}
@media (max-width:820px) {
    .profile-nav-name { display:none; }
    .profile-nav { padding:4px !important; }
    .profile-nav-avatar { width:34px; height:34px; flex-basis:34px; }
    .profile-layout { grid-template-columns:1fr; }
    .profile-card { order:0; }
    .profile-form-card { order:1; }
}

/* Profile typography refinement */
.profile-field label {
    color: var(--text) !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    letter-spacing: .01em;
}
.profile-upload,
.profile-remove {
    font-size: 13px !important;
    font-weight: 900 !important;
    color: var(--text) !important;
}
.profile-form-card > p { font-size: 13px; }
.profile-card h2 { font-weight: 900; }

/* PROFILE -> DASHBOARD POSITION LOCK
   Keep the hub button anchored to the dashboard shell itself so its position
   is identical regardless of which page the dashboard was entered from. */
.dashboard-shell {
    position: relative !important;
}
.dashboard-shell > .dashboard-sidebar-wrap-index {
    position: static !important;
    display: block !important;
    padding: 66px 0 0 !important;
    margin: 0 !important;
    width: 100% !important;
    min-height: 0 !important;
    box-sizing: border-box !important;
}
.dashboard-shell > .dashboard-sidebar-wrap-index > .hub-back-button {
    position: absolute !important;
    top: 18px !important;
    left: 0 !important;
    width: 100% !important;
    height: 48px !important;
    min-height: 48px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}
.dashboard-shell > .dashboard-sidebar-wrap-index > .dashboard-sidebar {
    position: static !important;
    margin: 0 !important;
    width: 100% !important;
    min-height: 0 !important;
}
@media (max-width: 820px) {
    .dashboard-shell > .dashboard-sidebar-wrap-index {
        padding-top: 66px !important;
    }
    .dashboard-shell > .dashboard-sidebar-wrap-index > .hub-back-button {
        top: 18px !important;
    }
}

/* FINAL: dashboard hub/sidebar use the grid column's normal flow.
   This keeps the hub button aligned and prevents route-dependent absolute positioning. */
.dashboard-shell > .dashboard-sidebar-wrap-index {
    position: static !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 18px !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 18px 0 0 !important;
    box-sizing: border-box !important;
    align-self: start !important;
}
.dashboard-shell > .dashboard-sidebar-wrap-index > .hub-back-button {
    position: static !important;
    inset: auto !important;
    display: flex !important;
    flex: 0 0 48px !important;
    width: 100% !important;
    height: 48px !important;
    min-height: 48px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}
.dashboard-shell > .dashboard-sidebar-wrap-index > .dashboard-sidebar {
    position: static !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 22px 12px !important;
    box-sizing: border-box !important;
}
@media (max-width: 820px) {
    .dashboard-shell > .dashboard-sidebar-wrap-index {
        position: static !important;
        gap: 18px !important;
        padding-top: 18px !important;
    }
}

/* V6 account / authentication */
.profile-nav { display:inline-flex; align-items:center; gap:9px; text-decoration:none; color:var(--text); font-weight:700; font-size:12px; }
.profile-nav-avatar { width:34px; height:34px; border-radius:50%; display:grid; place-items:center; overflow:hidden; background:linear-gradient(145deg,rgba(53,208,127,.16),rgba(22,31,42,.95)); border:1px solid rgba(53,208,127,.42); color:var(--green); font-weight:800; }
.profile-nav-avatar img { width:100%; height:100%; object-fit:cover; display:block; }
.profile-nav-name { max-width:120px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.portal-account-area { display:flex; align-items:center; }
.portal-auth-actions { display:flex; gap:8px; align-items:center; }
.portal-auth-button { display:inline-flex; align-items:center; justify-content:center; min-height:38px; padding:0 14px; border:1px solid var(--border); border-radius:10px; background:var(--panel-2); color:var(--text); text-decoration:none; font-size:11px; font-weight:800; transition:background .18s,border-color .18s,transform .18s; }
.portal-auth-button:hover { border-color:rgba(53,208,127,.45); background:rgba(53,208,127,.08); transform:translateY(-1px); }
.portal-auth-button.primary { background:linear-gradient(135deg,#1da663,#35d07f); color:#07110b; border-color:rgba(53,208,127,.6); }
.auth-page { min-height:calc(100vh - 72px); display:grid; place-items:center; padding:48px 20px 70px; box-sizing:border-box; }
.auth-card { width:min(440px,100%); padding:30px; background:linear-gradient(145deg,rgba(22,31,42,.98),rgba(12,18,25,.98)); border:1px solid var(--border); border-radius:18px; box-shadow:var(--shadow); }
.auth-card .eyebrow { color:var(--green); }
.auth-card h1 { margin:8px 0 8px; font-size:30px; letter-spacing:-.035em; }
.auth-card > p { margin:0 0 24px; color:var(--muted); font-size:13px; line-height:1.5; }
.auth-field { margin-bottom:16px; }
.auth-field label { display:block; margin-bottom:7px; font-size:12px; font-weight:800; color:var(--text); }
.auth-field input { width:100%; box-sizing:border-box; min-height:46px; padding:0 13px; border:1px solid var(--border); border-radius:10px; background:var(--panel-3); color:var(--text); outline:none; }
.auth-field input:focus { border-color:rgba(53,208,127,.55); box-shadow:0 0 0 3px rgba(53,208,127,.08); }
.auth-submit { width:100%; min-height:46px; border:0; border-radius:10px; background:linear-gradient(135deg,#1da663,#35d07f); color:#07110b; font-weight:900; cursor:pointer; }
.auth-error { margin:0 0 14px; padding:10px 12px; border-radius:9px; background:rgba(255,92,103,.08); border:1px solid rgba(255,92,103,.2); color:#ff9ca4; font-size:12px; }
.auth-switch { margin:38px 0 0; text-align:center; color:var(--muted); font-size:12px; }
.auth-switch a { color:var(--green); font-weight:800; text-decoration:none; }
.auth-back { display:inline-block; margin-bottom:20px; color:var(--muted); text-decoration:none; font-size:12px; font-weight:700; }
.profile-logout { margin-top:10px; min-height:40px; padding:0 14px; border:1px solid rgba(255,92,103,.25); border-radius:10px; background:rgba(255,92,103,.06); color:#ff8c95; font-weight:800; cursor:pointer; }
@media (max-width:820px){ .profile-nav-name{max-width:86px}.portal-auth-button{padding:0 10px}.auth-card{padding:24px}.auth-page{padding:32px 16px 54px} }
