:root {
    font-family: system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;
    color-scheme: light;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #fff;
    color: #0f3d91;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
}

.topbar {
    background: #fff;
    border-bottom: 1px solid #dbe6ff;
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand {
    font-weight: 700;
    letter-spacing: .3px;
    color: #0f3d91;
    text-decoration: none;
    white-space: nowrap;
}

.nav a,
.auth a {
    color: #0f3d91;
    text-decoration: none;
    margin-right: 14px;
    font-weight: 600;
}

    .nav a:hover,
    .auth a:hover {
        text-decoration: underline;
    }

.nav-domains {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.nav-domains a,
.nav-domains button {
    font-size: 14px;
}

.nav-home {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
}

.nav-group {
    position: relative;
}

.nav-group-trigger {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #0f3d91;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.nav-group-trigger:hover,
.nav-group:focus-within .nav-group-trigger,
.nav-group:hover .nav-group-trigger {
    background: #edf4ff;
}

.nav-caret {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #49679b;
}

.nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 30;
    display: none;
    min-width: 220px;
    padding: 8px;
    border: 1px solid #dbe6ff;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 14px 32px rgba(15,61,145,.14);
}

.nav-group::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 10px;
}

.nav-group:hover .nav-menu,
.nav-group:focus-within .nav-menu {
    display: grid;
    gap: 2px;
}

.nav-menu a,
.nav-menu-disabled {
    display: block;
    margin: 0;
    padding: 9px 10px;
    border-radius: 8px;
    color: #0f3d91;
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu a:focus {
    background: #edf4ff;
    text-decoration: none;
}

.nav-menu-disabled {
    color: #7a8cae;
    cursor: not-allowed;
    background: #f7faff;
}
.auth {
    margin-left: auto;
    display: flex;
    gap: 12px;
    align-items: center;
}

.me {
    opacity: .85;
    font-size: 14px;
}

.topbar .container {
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: 1440px;
}

.main {
    padding-top: 18px;
}

.card {
    background: #fff;
    border: 1px solid #dbe6ff;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 6px 20px rgba(15,61,145,.06);
}

.h1 {
    font-size: 24px;
    margin: 0 0 10px 0;
    color: #0f3d91;
}

.row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.input,
.btn,
select,
textarea {
    border-radius: 10px;
    border: 1px solid #b7caf4;
    background: #fff;
    color: #0f3d91;
    padding: 10px 12px;
    font: inherit;
}

.input,
select,
textarea {
    min-width: 280px;
    max-width: 100%;
}

.btn {
    cursor: pointer;
    background: #0f3d91;
    color: #fff;
    border-color: #0f3d91;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .btn.secondary {
        background: #fff;
        color: #0f3d91;
    }

    .btn:hover {
        filter: brightness(1.05);
    }

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    background: #fff;
}

    .table th,
    .table td {
        padding: 10px;
        border-bottom: 1px solid #e4edff;
        text-align: left;
        font-size: 14px;
        vertical-align: top;
    }

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    background: #edf4ff;
    border: 1px solid #cfe0ff;
    font-size: 12px;
    color: #0f3d91;
}

.footer {
    opacity: .8;
    font-size: 12px;
    border-top: 1px solid #dbe6ff;
    margin-top: 28px;
    color: #335a9a;
}

.error {
    color: #b42318;
    margin-top: 8px;
}

.success {
    color: #05603a;
    margin-top: 8px;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(280px,1fr));
    gap: 12px;
}

.actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.small {
    font-size: 12px;
    color: #49679b;
}

/* =========================
   Header reutilizavel
   ========================= */

.page-header-block {
    margin-bottom: 16px;
}

.page-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.page-header-main {
    flex: 1 1 420px;
    min-width: 280px;
}

.page-title {
    margin: 0 0 6px 0;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.15;
    color: #0f3d91;
}

.page-subtitle {
    color: #49679b;
    font-size: 14px;
    line-height: 1.4;
}

.page-header-actions {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 10px;
    flex: 0 0 auto;
    white-space: nowrap;
}

.page-header-status {
    margin-top: 2px;
}

/* =========================
   Formularios padronizados
   ========================= */

.form-page-card {
    padding: 16px;
}

/* =========================
   Pagina: Pools/Edit
   ========================= */

.pool-workflow-page {
    display: grid;
    gap: 20px;
}

.pool-step-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.pool-step-summary__item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 16px;
    border: 1px solid #cbd9f4;
    border-radius: 12px;
    background: #fff;
    color: #0f3d91;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(15, 61, 145, .06);
}

.pool-step-summary__item:hover {
    border-color: #7ca4eb;
    color: #0f3d91;
}

.pool-step-summary__item.is-complete {
    border-color: #90d5b0;
    background: #f4fcf7;
}

.pool-step-summary__item.is-current {
    border-color: #5e8fe2;
    box-shadow: 0 0 0 2px rgba(47, 111, 219, .1);
}

.pool-step-summary__item.is-locked {
    background: #f5f7fb;
    border-color: #e0e5ee;
    color: #74839b;
    box-shadow: none;
}

.pool-step-summary__number,
.pool-step-card__number,
.pool-result-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e8f0ff;
    color: #0f3d91;
    font-weight: 800;
}

.pool-step-summary__item.is-complete .pool-step-summary__number,
.pool-result-card__icon {
    background: #dff5e8;
    color: #197044;
}

.pool-step-summary__item.is-locked .pool-step-summary__number {
    background: #e7eaf0;
    color: #74839b;
}

.pool-step-summary__item strong,
.pool-step-summary__item small {
    display: block;
}

.pool-step-summary__item small {
    margin-top: 2px;
    color: #687895;
}

.pool-step-card,
.pool-result-card,
.pool-admin-card {
    padding: 0;
    overflow: hidden;
    border-radius: 14px;
    scroll-margin-top: 92px;
}

.pool-step-card__header {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 76px;
    padding: 16px 20px;
    background: #f8faff;
    border-bottom: 1px solid #dbe6ff;
}

.pool-step-card.is-locked .card-body {
    background: #fafbfc;
}

.pool-step-card > .card-body,
.pool-result-card > .card-body,
.pool-admin-card > .card-body {
    padding: 20px;
}

.pool-result-card {
    border-left: 4px solid #62bd8a;
}

.pool-admin-card > .card-header {
    padding: 18px 20px;
    background: #f8faff;
    border-bottom: 1px solid #dbe6ff;
}

.pool-game-import__header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.pool-game-template-link {
    flex: 0 0 auto;
    white-space: nowrap;
}

.pool-game-import__form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 12px;
}

.pool-file-picker {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    min-width: 0;
    padding: 4px;
    border: 1px solid #b8cdf5;
    border-radius: 8px;
    background: #fff;
}

.pool-file-picker:focus-within {
    border-color: #5e8fe2;
    box-shadow: 0 0 0 2px rgba(47, 111, 219, .12);
}

.pool-file-picker__native {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.pool-file-picker__name {
    min-width: 0;
    overflow: hidden;
    color: #687895;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pool-file-picker > label {
    display: inline-flex;
    align-items: center;
    margin: 0;
}

.pool-game-import__button,
.pool-game-manual__button {
    width: auto;
    white-space: nowrap;
}

.pool-ticket-upload__form {
    display: grid;
    gap: 4px;
}

.pool-ticket-upload__controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 12px;
}

.pool-game-manual__form {
    display: grid;
    grid-template-columns: minmax(110px, .55fr) minmax(280px, 2.8fr) minmax(210px, 1.5fr) auto;
    align-items: end;
    gap: 12px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(12,minmax(0,1fr));
    gap: 12px;
    align-items: start;
}

.form-col-12 {
    grid-column: span 12;
}

.form-col-8 {
    grid-column: span 8;
}

.form-col-6 {
    grid-column: span 6;
}

.form-col-4 {
    grid-column: span 4;
}

.form-col-3 {
    grid-column: span 3;
}

.form-field {
    min-width: 0;
}

    .form-field label,
    .form-label {
        display: block;
        font-weight: 600;
        margin-bottom: 4px;
    }

    .form-field .input,
    .form-field .form-control,
    .form-field select,
    .form-field textarea {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

.form-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 16px;
}

    .form-actions .btn {
        min-width: 110px;
    }

/* =========================
   Pagina: Boloes/Edit
   ========================= */

.bolao-edit-page .bolao-edit-content {
    align-items: stretch;
}

.bolao-edit-page .bolao-main-card,
.bolao-edit-page .bolao-summary-card,
.bolao-edit-page .bolao-history-card,
.bolao-edit-page .bolao-workflow-card,
.bolao-edit-page .bolao-admin-card {
    border-radius: 14px;
}

.bolao-edit-page .bolao-side-column {
    min-height: 100%;
}

.bolao-edit-page .bolao-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.bolao-edit-page .bolao-action-form {
    min-width: 180px;
    margin: 0;
}

.bolao-edit-page .bolao-history-card {
    overflow: hidden;
}

    .bolao-edit-page .bolao-history-card .card-body {
        overflow-wrap: anywhere;
    }

.bolao-edit-page .list-group-item {
    background: transparent;
}

/* =========================
   Inputs genericos para paginas antigas
   ========================= */

input[type="text"],
input[type="number"],
input[type="datetime-local"],
input[type="file"],
select,
textarea {
    max-width: 100%;
}

/* =========================
   Responsividade
   ========================= */

@media (min-width:992px) {
    .bolao-edit-page .col-lg-8,
    .bolao-edit-page .col-lg-4 {
        display: flex;
        flex-direction: column;
    }

    .bolao-edit-page .bolao-history-card {
        margin-top: auto;
    }
}

@media (max-width:991.98px) {
    .pool-step-summary {
        grid-template-columns: 1fr;
    }

    .pool-step-card__header {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .pool-step-card__header .badge {
        margin-left: 48px !important;
    }

    .pool-game-import__form,
    .pool-game-manual__form,
    .pool-ticket-upload__controls {
        grid-template-columns: 1fr;
    }

    .pool-game-import__button,
    .pool-game-manual__button {
        justify-self: start;
    }

    .topbar .container {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 12px;
    }

    .nav-domains {
        order: 3;
        width: 100%;
        flex-wrap: wrap;
    }

    .nav-group {
        position: static;
    }

    .nav-menu {
        left: 16px;
        right: 16px;
        width: auto;
    }
    .page-header-row {
        flex-direction: column;
        align-items: stretch;
    }

    .page-header-actions {
        justify-content: flex-start;
        white-space: normal;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-col-12,
    .form-col-8,
    .form-col-6,
    .form-col-4,
    .form-col-3 {
        grid-column: span 1;
    }

    .bolao-edit-page .bolao-action-form {
        min-width: 100%;
    }

    .input,
    select,
    textarea {
        min-width: 0;
        width: 100%;
    }
}
/* =========================
   Compatibilidade com classes tipo Bootstrap
   ========================= */

.form-control,
.form-select {
    border-radius: 10px;
    border: 1px solid #b7caf4;
    background: #fff;
    color: #0f3d91;
    padding: 10px 12px;
    font: inherit;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.btn-primary {
    background: #0f3d91;
    color: #fff;
    border: 1px solid #0f3d91;
}

.btn-outline-primary {
    background: #fff;
    color: #0f3d91;
    border: 1px solid #0f3d91;
}

.btn-success {
    background: #0f3d91;
    color: #fff;
    border: 1px solid #0f3d91;
}

.btn-outline-secondary {
    background: #fff;
    color: #0f3d91;
    border: 1px solid #0f3d91;
}

.btn-outline-danger {
    background: #fff;
    color: #b42318;
    border: 1px solid #b42318;
}

.btn-outline-warning {
    background: #fff;
    color: #9a6700;
    border: 1px solid #e3b341;
}

.w-100 {
    width: 100%;
}

.text-end {
    text-align: right;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.alert {
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 12px;
    border: 1px solid transparent;
}

.alert-danger {
    color: #b42318;
    background: #fff5f5;
    border-color: #f1c0c0;
}

.alert-success {
    color: #05603a;
    background: #f1fff7;
    border-color: #b7ebcd;
}

.page-toolbar-right {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 24px;
}

.password-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

    .password-input-group .form-control {
        padding-right: 48px;
    }

.password-toggle-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    padding: 0;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #49679b;
    cursor: pointer;
}

    .password-toggle-btn:focus {
        outline: none;
        box-shadow: none;
    }

.password-icon {
    font-size: 16px;
    line-height: 1;
}

.login-form-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
}

.login-form-actions .btn {
    min-width: 120px;
}

.password-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.btn-sm {
    padding: 5px 8px;
    font-size: 12px;
    line-height: 1.2;
    border-radius: 8px;
}

.pool-table-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    flex-wrap: nowrap;
}

.pool-table-actions .btn {
    min-width: 0;
    white-space: nowrap;
}

/* =========================
   Feedback e ajuda contextual
   ========================= */

.toast-message {
    border-radius: 12px;
    padding: 12px 14px;
    margin: 0 0 14px 0;
    border: 1px solid;
    box-shadow: 0 10px 24px rgba(15,61,145,.10);
    font-weight: 600;
}

.toast-success {
    color: #05603a;
    background: #f1fff7;
    border-color: #b7ebcd;
}

.toast-error {
    color: #b42318;
    background: #fff5f5;
    border-color: #f1c0c0;
}

.help-tip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-left: 5px;
    border-radius: 999px;
    border: 1px solid #b7caf4;
    color: #0f3d91;
    background: #edf4ff;
    font-size: 12px;
    font-weight: 700;
    cursor: help;
    vertical-align: text-top;
}

.review-list {
    display: grid;
    gap: 8px;
}

.review-item {
    border: 1px solid #dbe6ff;
    border-radius: 10px;
    padding: 10px;
    background: #fbfdff;
}

.form-label,
.form-field label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.form-label + .help-tip,
.form-field label + .help-tip {
    margin-left: 0;
    margin-bottom: 4px;
}

/* Ajustes operacionais: ajuda contextual e data/hora compacta */
.help-tip {
    position: relative;
}

.help-tip:hover::after,
.help-tip:focus::after {
    content: attr(title);
    position: absolute;
    z-index: 50;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    width: max-content;
    max-width: 260px;
    white-space: normal;
    border: 1px solid #b7caf4;
    border-radius: 10px;
    background: #0f2544;
    color: #fff;
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.35;
    box-shadow: 0 10px 24px rgba(15,61,145,.18);
}

.datetime-compact {
    max-width: 220px;
}

/* =========================
   Pagina: LotteryResults
   ========================= */

.lottery-result-choice-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.lottery-result-choice,
.lottery-result-contest-choice {
    border: 1px solid #b9cdfd;
    background: #fff;
    color: #003c96;
    border-radius: 8px;
    font-weight: 700;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.lottery-result-choice {
    min-height: 42px;
    padding: 8px 14px;
}

.lottery-result-choice:hover,
.lottery-result-contest-choice:hover,
.lottery-result-choice.is-selected,
.lottery-result-contest-choice.is-selected {
    border-color: #0d47a1;
    background: #eef5ff;
    box-shadow: 0 0 0 3px rgba(13, 71, 161, .12);
}

.lottery-result-contest-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px;
    min-height: 48px;
}

.lottery-result-contest-choice {
    min-height: 58px;
    padding: 10px 12px;
    text-align: left;
}

.lottery-result-contest-title,
.lottery-result-contest-date {
    display: block;
}

.lottery-result-contest-date {
    color: #5f6f86;
    font-size: .88rem;
    font-weight: 500;
    margin-top: 2px;
}

.lottery-result-empty {
    border: 1px dashed #b9cdfd;
    border-radius: 8px;
    color: #5f6f86;
    padding: 12px;
}

.result-page-actions {
    margin: 18px 0 20px;
}

.result-page-alert {
    margin: 0 0 18px;
}

.result-flow {
    display: grid;
    gap: 18px;
}

.result-step {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.result-step-marker {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid #b9cdfd;
    border-radius: 999px;
    background: #fff;
    color: #003c96;
    font-weight: 800;
}

.result-step-complete .result-step-marker {
    border-color: #9fe4be;
    background: #ecfff4;
    color: #087a37;
}

.result-step-current .result-step-marker {
    border-color: #0d47a1;
    background: #0d47a1;
    color: #fff;
}

.result-step-content {
    border: 1px solid #d6e3ff;
    border-radius: 8px;
    padding: 20px;
    background: #fff;
}

.result-step-header,
.result-operation-header,
.result-pool-summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.result-step-header {
    margin-bottom: 18px;
}

.result-step-header h2,
.result-operation-header h3,
.result-publication-panel h3 {
    margin: 0;
    color: #003c96;
    font-size: 1.18rem;
}

.result-step-header p,
.result-operation-header p,
.result-publication-panel p {
    margin: 4px 0 0;
    color: #37557b;
}

.result-step-actions {
    align-items: center;
    margin-bottom: 16px;
}

.result-summary-grid,
.result-metric-row {
    display: grid;
    gap: 12px;
}

.result-summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.result-summary-grid > div,
.result-metric-row > div {
    min-width: 0;
}

.result-summary-grid span,
.result-metric-row span,
.result-note span,
.result-tier-row > span {
    display: block;
    color: #5f6f86;
    font-size: .82rem;
}

.result-summary-grid strong,
.result-metric-row strong {
    display: block;
    color: #003c96;
    font-size: .98rem;
    overflow-wrap: anywhere;
}

.result-note {
    border-top: 1px solid #e1e9fb;
    margin-top: 16px;
    padding-top: 14px;
}

.result-note p {
    margin: 2px 0 0;
}

.result-tier-row {
    display: grid;
    gap: 6px;
    margin: 12px 0 16px;
}

.result-tier-row > div {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.result-metric-row {
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    margin-bottom: 16px;
}

.result-metric-row > div {
    border: 1px solid #e1e9fb;
    border-radius: 8px;
    padding: 12px;
}

.result-pool-list,
.result-notification-list {
    display: grid;
    gap: 12px;
}

/* =========================
   Backoffice: listas operacionais
   ========================= */

.backoffice-list-card {
    overflow: hidden;
}

.search-row {
    margin-bottom: 12px;
}

.search-input-wide {
    width: min(520px, 100%);
}

/* Fluxo operacional de resgates */
.withdrawal-page {
    display: grid;
    gap: 20px;
}

.withdrawal-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.withdrawal-page-header h1 {
    margin-top: 8px;
    margin-bottom: 4px;
}

.withdrawal-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.withdrawal-steps li {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 72px;
    padding: 12px;
    border: 1px solid #cfdbf5;
    border-radius: 12px;
    background: #fff;
}

.withdrawal-steps li > span {
    display: grid;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 50%;
    background: #edf3ff;
    color: #0d47a1;
    font-weight: 700;
}

.withdrawal-steps li div {
    display: grid;
    gap: 3px;
}

.withdrawal-steps small {
    color: #667085;
}

.withdrawal-step-current {
    border-color: #175cd3 !important;
    box-shadow: 0 0 0 2px rgba(23, 92, 211, .1);
}

.withdrawal-step-complete {
    border-color: #75d3a6 !important;
    background: #f2fff8 !important;
}

.withdrawal-step-complete > span {
    color: #067647 !important;
    background: #d9f7e7 !important;
}

.withdrawal-step-pending,
.withdrawal-step-muted {
    opacity: .72;
}

.withdrawal-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.withdrawal-section {
    display: grid;
    gap: 16px;
    margin: 0;
}

.withdrawal-section h2 {
    margin: 0;
}

.withdrawal-data-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
}

.withdrawal-data-list > div {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.withdrawal-data-list dt {
    color: #667085;
    font-size: .82rem;
}

.withdrawal-data-list dd {
    margin: 0;
    font-weight: 600;
}

.withdrawal-alerts {
    display: grid;
    gap: 10px;
}

.withdrawal-alert {
    padding: 10px 12px;
    border: 1px solid #d0d5dd;
    border-radius: 9px;
}

.withdrawal-alert-success { color: #05603a; background: #f1fff7; border-color: #b7ebcd; }
.withdrawal-alert-warning { color: #93370d; background: #fffaeb; border-color: #fedf89; }
.withdrawal-alert-danger { color: #b42318; background: #fff5f5; border-color: #f1c0c0; }

.withdrawal-action-card {
    border-color: #9bb9f5;
    background: #fbfdff;
}

.withdrawal-form {
    display: grid;
    justify-items: start;
    gap: 16px;
}

.withdrawal-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(240px, 1fr));
    gap: 16px;
    width: 100%;
}

.withdrawal-form label,
.withdrawal-form-inline label {
    display: grid;
    gap: 7px;
    width: 100%;
    font-weight: 600;
}

.withdrawal-exception-action {
    width: 100%;
    padding-top: 12px;
    border-top: 1px solid #e4e7ec;
}

.withdrawal-exception-action summary {
    width: fit-content;
    color: #b42318;
    cursor: pointer;
}

.withdrawal-form-inline {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto;
    align-items: end;
    gap: 12px;
    margin-top: 14px;
}

.withdrawal-confirmation {
    display: flex !important;
    align-items: flex-start;
    gap: 9px !important;
    max-width: 720px;
    font-weight: 400 !important;
}

.withdrawal-confirmation input {
    margin-top: 3px;
}

.withdrawal-history {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.withdrawal-history li {
    display: grid;
    gap: 7px;
    padding: 14px 0;
    border-bottom: 1px solid #e4e7ec;
}

.withdrawal-history li:first-child { padding-top: 0; }
.withdrawal-history li:last-child { padding-bottom: 0; border-bottom: 0; }
.withdrawal-history li > div { display: flex; align-items: center; gap: 10px; }
.withdrawal-history p { margin: 0; }
.withdrawal-history small { color: #667085; }
.withdrawal-break-text { overflow-wrap: anywhere; }

@media (max-width: 900px) {
    .withdrawal-steps,
    .withdrawal-detail-grid,
    .withdrawal-form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .withdrawal-page-header {
        flex-direction: column;
    }

    .withdrawal-steps,
    .withdrawal-detail-grid,
    .withdrawal-form-grid,
    .withdrawal-data-list,
    .withdrawal-form-inline {
        grid-template-columns: 1fr;
    }
}

.wrap-cell,
.customer-cell,
.latest-orders-cell {
    overflow-wrap: anywhere;
    word-break: normal;
}

.amount-cell {
    white-space: nowrap;
}

.products-table {
    table-layout: fixed;
    width: 100%;
}

.products-table-title-col {
    width: auto;
}

.products-table-title,
.products-table-title .fw-semibold {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
}

.result-pool-panel {
    border: 1px solid #d6e3ff;
    border-radius: 8px;
    padding: 0;
    margin-top: 0;
    overflow: hidden;
}

.result-pool-panel[open] .result-pool-summary {
    border-bottom: 1px solid #e1e9fb;
}

.result-pool-summary {
    cursor: pointer;
    list-style: none;
    padding: 14px 16px;
}

.result-pool-summary::-webkit-details-marker {
    display: none;
}

.result-pool-summary small {
    display: block;
    color: #5f6f86;
    font-weight: 500;
    margin-top: 2px;
}

.result-pool-grid {
    padding: 16px;
}

.result-pool-panel .alert,
.result-pool-panel .table-responsive {
    margin-left: 16px;
    margin-right: 16px;
}

.result-operation-panel,
.result-publication-panel,
.result-notification-row,
.result-financial-prize {
    border: 1px solid #e1e9fb;
    border-radius: 8px;
    padding: 16px;
}

.result-operation-panel,
.result-publication-panel {
    display: grid;
    gap: 14px;
}

.result-operation-panel + .result-operation-panel,
.result-publication-panel + .result-publication-panel {
    margin-top: 14px;
}

.result-prize-form {
    display: grid;
    gap: 12px;
}

.result-financial-prize {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    background: #f8fbff;
}

.result-financial-prize span:not(.badge) {
    display: block;
    color: #5f6f86;
    margin-top: 2px;
}

.result-notification-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.result-notification-row span {
    display: block;
    color: #5f6f86;
    font-size: .9rem;
    margin-top: 2px;
}

@media (max-width: 720px) {
    .result-step {
        grid-template-columns: 1fr;
    }

    .result-step-marker {
        width: 34px;
        height: 34px;
    }

    .result-step-header,
    .result-operation-header,
    .result-pool-summary,
    .result-financial-prize,
    .result-notification-row {
        display: grid;
    }
}

.orders-table {
    table-layout: fixed;
    min-width: 980px;
}

.orders-table th:nth-child(1) { width: 24%; }
.orders-table th:nth-child(2) { width: 12%; }
.orders-table th:nth-child(3) { width: 10%; }
.orders-table th:nth-child(4) { width: 34%; }
.orders-table th:nth-child(5) { width: 10%; }
.orders-table th:nth-child(6) { width: 10%; }

.users-table {
    table-layout: fixed;
    min-width: 1050px;
}

.users-table th:nth-child(1) { width: 28%; }
.users-table th:nth-child(2) { width: 12%; }
.users-table th:nth-child(3) { width: 16%; }
.users-table th:nth-child(4) { width: 30%; }
.users-table th:nth-child(5) { width: 14%; }

.latest-orders-list,
.table-action-stack {
    display: grid;
    gap: 6px;
}

.latest-order-link {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
    align-items: center;
    padding: 6px 8px;
    border: 1px solid #dbe6ff;
    border-radius: 8px;
    color: #0f3d91;
    text-decoration: none;
    background: #fbfdff;
}

.latest-order-link span:first-child {
    overflow-wrap: anywhere;
}

.status-success {
    background: #f1fff7;
    border-color: #b7ebcd;
    color: #05603a;
}

.status-warning {
    background: #fffbeb;
    border-color: #fedf89;
    color: #9a6700;
}

.status-danger {
    background: #fff5f5;
    border-color: #f1c0c0;
    color: #b42318;
}

/* =========================
   Backoffice: geracao de boloes
   ========================= */

.generation-template-list {
    display: grid;
    gap: 12px;
}

.generation-template-row {
    display: grid;
    grid-template-columns:
        minmax(150px, 1fr)
        minmax(260px, 1.6fr)
        minmax(90px, .55fr)
        minmax(180px, 1fr)
        minmax(250px, 1.35fr)
        minmax(140px, .75fr)
        minmax(70px, .35fr)
        minmax(82px, .35fr);
    gap: 14px;
    align-items: start;
    padding: 16px;
    border: 1px solid #dbe6ff;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 6px 20px rgba(15,61,145,.06);
}

.generation-field,
.generation-template-type,
.generation-actions {
    min-width: 0;
}

.generation-field label,
.generation-field-label {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    font-weight: 700;
    color: #0f3d91;
}

.generation-money-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.generation-field-hint {
    margin-top: 4px;
    font-size: 12px;
    color: #49679b;
}

.generation-days-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(90px, 1fr));
    gap: 6px 10px;
}

.generation-day-option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    color: #335a9a;
}

.generation-active-field .form-check-input {
    margin-top: 8px;
}

.generation-actions {
    padding-top: 24px;
}

@media (max-width: 1300px) {
    .generation-template-row {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .generation-field-model,
    .generation-days {
        grid-column: span 2;
    }
}

@media (max-width: 760px) {
    .generation-template-row {
        grid-template-columns: 1fr;
    }

    .generation-field-model,
    .generation-days {
        grid-column: span 1;
    }

    .generation-actions {
        padding-top: 0;
    }
}
.backoffice-logout-form {
  display: inline;
  margin: 0;
}

.backoffice-logout-button {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.backoffice-logout-button:hover,
.backoffice-logout-button:focus-visible {
  text-decoration: underline;
}
