/**
 * Dashboard motoboy — tema RappiDex (referência mobile dark + laranja).
 */
:root {
    --rd-navy: #1a2b3c;
    --rd-navy-deep: #121a24;
    --rd-navy-header: #1b212c;
    --rd-orange: #ff6600;
    --rd-orange-hover: #e85a00;
    --rd-text-muted: #9aa4b2;
    --rd-text: #e8ecf1;
    --rd-success: #2e7d4a;
    --rd-success-soft: rgba(46, 125, 74, 0.25);
    --rd-card-bg: #ffffff;
    --rd-radius-lg: 1.25rem;
    /* Altura útil do rodapé fixo (inclui ícones + rótulos) */
    --rd-bottom-nav-height: 84px;
}

body.modulo2-dashboard {
    background-color: var(--rd-navy-deep);
    color: var(--rd-text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Tela inicial (informar ID) */
.rd-tela-conexao {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: linear-gradient(165deg, var(--rd-navy) 0%, var(--rd-navy-deep) 55%, #0d1117 100%);
    overflow-y: auto;
}

.rd-tela-conexao .rd-logo-grande {
    max-width: min(220px, 65vw);
    max-height: 35vh;
    height: auto;
    margin-bottom: 1.25rem;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.35));
}

.rd-tela-conexao .rd-card-login {
    width: 100%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--rd-radius-lg);
    padding: 1.5rem;
    backdrop-filter: blur(8px);
}

.rd-tela-conexao .form-control {
    background: rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--rd-text);
}

.rd-tela-conexao .form-control:focus {
    border-color: var(--rd-orange);
    box-shadow: 0 0 0 0.2rem rgba(255, 102, 0, 0.25);
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
}

.rd-tela-conexao .form-label {
    color: var(--rd-text-muted);
}

.rd-btn-primary-orange {
    --bs-btn-bg: var(--rd-orange);
    --bs-btn-border-color: var(--rd-orange);
    --bs-btn-hover-bg: var(--rd-orange-hover);
    --bs-btn-hover-border-color: var(--rd-orange-hover);
    --bs-btn-active-bg: var(--rd-orange-hover);
    --bs-btn-active-border-color: var(--rd-orange-hover);
    font-weight: 600;
}

/* App shell */
#app-shell {
    min-height: 100vh;
}

/* Permite que a coluna Início reparta altura entre mapa e fila (flex) */
#view-inicio {
    min-height: 0;
    /* O conteúdo da aba Início termina acima do rodapé fixo */
    padding-bottom: calc(var(--rd-bottom-nav-height) + env(safe-area-inset-bottom, 0px));
}

.rd-header {
    background: var(--rd-navy-header);
    padding: 0.65rem 0.75rem 0.65rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: nowrap;
}

.rd-header-esquerda {
    min-width: 0;
    display: flex;
    align-items: center;
}

.rd-header-direita {
    display: flex;
    align-items: stretch;
    gap: 0.35rem;
    margin-left: 0.25rem;
}

.rd-header-direita .rd-badge-online {
    align-self: center;
}

/* Só privacidade no cabeçalho (44px), alinhada à coluna da seta na linha de baixo */
.rd-header-metricas-acoes {
    display: flex;
    flex-direction: column;
    flex: 0 0 44px;
    width: 44px;
    align-self: stretch;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.15);
}

.rd-header-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--rd-orange);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.rd-header-text .rd-header-saudacao {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.25;
}

.rd-header-motoboy-avaliacao {
    font-size: 0.8rem;
    line-height: 1.35;
    color: var(--rd-text-muted);
    margin-top: 0.15rem;
}

.rd-header-motoboy-avaliacao .rd-star-amarelo-header {
    color: #ffc107;
    font-size: 0.85rem;
    vertical-align: -0.05em;
}

.rd-header-motoboy-avaliacao .rd-header-avaliacao-detalhe {
    font-size: 0.72rem;
}

/* Avaliação do cliente (estrelas na conclusão + exibição na fila) */
.rd-star-amarelo {
    color: #ffc107;
    font-size: 0.95rem;
}

.rd-star-rating-btn {
    border: none;
    background: transparent;
    padding: 0.15rem 0.25rem;
    line-height: 1;
    color: rgba(33, 37, 41, 0.35);
    transition: color 0.12s ease, transform 0.12s ease;
}

.rd-star-rating-btn .bi-star-fill {
    font-size: 1.65rem;
}

.rd-star-rating-btn:hover {
    color: rgba(255, 193, 7, 0.55);
}

.rd-star-rating-btn.rd-star-ativa {
    color: #ffc107;
    transform: scale(1.05);
}

.rd-star-rating-btn.rd-star-alerta-piscar {
    animation: rdStarAvaliacaoObrigatoria 0.27s ease-in-out 3;
}

.rd-avaliacao-aviso-erro {
    color: #dc3545 !important;
}

.rd-avaliacao-aviso-piscar {
    animation: rdAvisoAvaliacaoObrigatoria 0.27s ease-in-out 3;
}

@keyframes rdAvisoAvaliacaoObrigatoria {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.2;
    }
}

@keyframes rdStarAvaliacaoObrigatoria {
    0%, 100% {
        transform: scale(1);
        color: #dc3545;
        opacity: 1;
    }
    50% {
        transform: scale(1.12);
        color: #dc3545;
        opacity: 0.35;
    }
}

.rd-badge-online {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.35rem 0.65rem;
    border-radius: 50rem;
    background: var(--rd-success-soft);
    color: #7fdc9e;
    border: 1px solid rgba(127, 220, 158, 0.35);
    white-space: nowrap;
}

.rd-badge-online.rd-badge-offline {
    background: rgba(180, 80, 60, 0.2);
    color: #ffb4a8;
    border-color: rgba(255, 180, 168, 0.35);
}

/* Ganhos + coluna da seta (mesma largura/alinhamento visual da privacidade no header) */
.rd-metrics-bar {
    display: flex;
    align-items: stretch;
    background: var(--rd-navy-header);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.rd-metric-bar-acoes {
    display: flex;
    flex-direction: column;
    flex: 0 0 44px;
    width: 44px;
    align-self: stretch;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.15);
}

.rd-header-metricas-acoes .rd-bar-acao,
.rd-metric-bar-acoes .rd-bar-acao {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    border: none;
    border-radius: 0;
    background: transparent;
    color: var(--rd-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    margin: 0;
}

.rd-metric-bar-acoes .rd-bar-acao-periodo {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--rd-orange);
    line-height: 1;
}

.rd-metric-bar-acoes .rd-bar-acao-periodo:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    color: var(--rd-text-muted);
}

/* Sem :hover (touch Android); feedback só no toque/clique (:active), depois volta ao normal */
.rd-metric-bar-acoes .rd-bar-acao-periodo:not(:disabled):active {
    background: rgba(255, 102, 0, 0.12) !important;
    color: #ff8533 !important;
}

.rd-metric-bar-acoes .rd-bar-acao-periodo:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.35);
    outline-offset: 2px;
}

.rd-header-metricas-acoes .rd-bar-acao-privacidade {
    font-size: 1.15rem;
}

.rd-header-metricas-acoes .rd-bar-acao-privacidade:active {
    background: rgba(255, 102, 0, 0.08);
    color: var(--rd-orange);
}

.rd-header-metricas-acoes .rd-bar-acao-privacidade:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.35);
    outline-offset: 2px;
}

.rd-header-metricas-acoes .rd-bar-acao-privacidade[aria-pressed="true"] {
    color: var(--rd-orange);
    background: rgba(255, 102, 0, 0.12);
}

/* Métricas */
.rd-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    flex: 1 1 auto;
    min-width: 0;
    background: transparent;
}

.rd-metrics .rd-metric {
    text-align: center;
    padding: 0.85rem 0.35rem;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.rd-metrics .rd-metric:last-child {
    border-right: 0;
}

.rd-metrics .rd-metric-valor {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--rd-orange);
    line-height: 1.2;
}

.rd-metrics .rd-metric-label {
    font-size: 0.7rem;
    color: var(--rd-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.rd-metrics-extra {
    font-size: 0.75rem;
    color: var(--rd-text-muted);
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
}

.rd-metrics-extra .text-danger {
    color: #ff8a80 !important;
}

.rd-metrics-extra .rd-aviso-credito-baixo {
    display: block;
    margin-top: 0.3rem;
    text-align: center;
    color: #ff8a80;
    font-weight: 700;
    line-height: 1.25;
}

/* Fila (status) */
#status-fila {
    font-size: 0.75rem;
    color: var(--rd-text-muted);
    padding: 0.35rem 1rem 0.5rem;
    text-align: center;
}

#status-fila.rd-status-fila-alerta {
    background: var(--rd-orange);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
    padding: 0.4rem 1rem;
    animation: rdPiscarAlertaFila 1s steps(1, end) infinite;
}

@keyframes rdPiscarAlertaFila {
    0%, 49% {
        opacity: 1;
    }
    50%, 100% {
        opacity: 0.42;
    }
}

/* Área do mapa (vazia até aceitar; mapa só com pedido ativo) */
#mapa-stack {
    position: relative;
    /* Ocupa o espaço vertical livre no Início para o mapa idle preencher 100% */
    flex: 1 1 auto;
    min-height: 0;
    background: #0d1218;
}

#mapa-stack.tem-mapa-ativo {
    min-height: 72vh;
    flex: 1 1 auto;
}

/* Área base do mapa: estica com o stack para o overlay absolute preencher */
#pedido-ativo.rd-pedido-ativo-root.flex-grow-1 {
    flex: 1 1 auto;
    min-height: 0;
}

/* Estado sem pedido ativo: mapa da localização atual em 100% da área disponível */
#mapa-idle-placeholder.rd-mapa-idle {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: auto;
    min-height: 0;
    background: #0d1218;
}

#mapa-idle-placeholder.rd-mapa-idle.d-none {
    display: none !important;
}

.rd-mapa-idle-iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #0d1218;
}

/* Pedido ativo: mapa em tela cheia na área central + card sobreposto */
#pedido-ativo.rd-pedido-ativo-com-mapa {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    min-height: 0;
    pointer-events: none;
}

#pedido-ativo.rd-pedido-ativo-com-mapa > * {
    pointer-events: auto;
}

/* Pedido ativo: mapa ocupa o máximo da coluna; card compacto embaixo */
#pedido-ativo.rd-pedido-ativo-com-mapa .rd-ativo-layout {
    height: 100%;
    min-height: 0;
    position: relative;
}

#pedido-ativo.rd-pedido-ativo-com-mapa .rd-mapa-iframe-wrap {
    flex: 1 1 auto;
    min-height: 0;
}

#pedido-ativo.rd-pedido-ativo-com-mapa .rd-sheet-flutuante.rd-sheet-ativo-compact {
    max-height: 30vh;
    overflow-y: auto;
    margin-bottom: 0.35rem;
}

#app-shell.rd-modo-corrida #pedido-ativo.rd-pedido-ativo-com-mapa .rd-sheet-flutuante.rd-sheet-ativo-compact.rd-sheet-modo-corrida {
    position: absolute;
    left: 0.5rem;
    right: 0.5rem;
    bottom: calc(var(--rd-bottom-nav-height) + 0.35rem + env(safe-area-inset-bottom, 0px));
    z-index: 7;
    max-height: none;
    margin: 0 !important;
    pointer-events: auto;
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

#app-shell.rd-modo-corrida #pedido-ativo.rd-pedido-ativo-com-mapa .rd-sheet-flutuante.rd-sheet-ativo-compact.rd-sheet-modo-corrida.rd-card-colapsado {
    max-height: 5.2rem;
    overflow: hidden;
}

#pedido-ativo.rd-pedido-ativo-com-mapa .rd-sheet-ativo-compact .rd-sheet-header {
    padding: 0.5rem 0.75rem 0.2rem;
}

#pedido-ativo.rd-pedido-ativo-com-mapa .rd-sheet-ativo-compact .rd-sheet-tag {
    font-size: 0.62rem;
}

#pedido-ativo.rd-pedido-ativo-com-mapa .rd-sheet-ativo-compact .rd-sheet-valor {
    font-size: 0.95rem;
}

#pedido-ativo.rd-pedido-ativo-com-mapa .rd-sheet-ativo-compact .rd-sheet-titulo {
    font-size: 1rem;
    padding: 0 0.75rem;
    margin-bottom: 0.1rem;
}

#pedido-ativo.rd-pedido-ativo-com-mapa .rd-sheet-ativo-compact .rd-rota-box {
    margin: 0.4rem 0.65rem;
    padding: 0.5rem;
    font-size: 0.78rem;
}

#pedido-ativo.rd-pedido-ativo-com-mapa .rd-sheet-ativo-compact .rd-sheet-meta {
    font-size: 0.75rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

#pedido-ativo.rd-pedido-ativo-com-mapa .rd-sheet-ativo-compact .rd-sheet-meta-contato a {
    font-weight: 600;
}

#pedido-ativo .rd-sheet-meta-contato a.link-dark:hover,
#pedido-ativo .rd-sheet-meta-contato a.link-dark:focus {
    color: #0d1117 !important;
    font-weight: 800;
    text-decoration-color: rgba(13, 17, 23, 0.4);
}

#pedido-ativo.rd-pedido-ativo-com-mapa .rd-sheet-ativo-compact .rd-sheet-actions {
    padding: 0.35rem 0.65rem 0.5rem;
}

#pedido-ativo.rd-pedido-ativo-com-mapa .rd-sheet-ativo-compact .rd-btn-iniciar,
#pedido-ativo.rd-pedido-ativo-com-mapa .rd-sheet-ativo-compact .rd-btn-concluir {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    font-size: 0.9rem;
}

#pedido-ativo.rd-pedido-ativo-com-mapa .rd-mapa-links {
    padding-top: 0.15rem;
    padding-bottom: 0.15rem;
}

.rd-mapa-info {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 0.2rem !important;
    padding-bottom: 0.2rem !important;
}

.rd-mapa-overlay-acoes {
    position: absolute;
    top: 0.45rem;
    right: 0.45rem;
    display: flex;
    gap: 0.35rem;
    z-index: 5;
}

.rd-mapa-mini-btn {
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.68);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.rd-mapa-mini-btn:hover,
.rd-mapa-mini-btn:focus {
    color: #fff;
    background: rgba(0, 0, 0, 0.82);
    border-color: rgba(255, 255, 255, 0.38);
}

.rd-mapa-mini-btn-voz {
    background: rgba(255, 152, 0, 0.88);
    border-color: rgba(255, 183, 77, 0.8);
    color: #1f1400;
}

.rd-mapa-mini-btn-voz:hover,
.rd-mapa-mini-btn-voz:focus {
    background: rgba(255, 152, 0, 1);
    color: #1f1400;
    border-color: rgba(255, 214, 102, 0.95);
}

.rd-min-h-0 {
    min-height: 0 !important;
}

/* Esconde fila “próximo” quando há pedido ativo (como app de corrida) */
#app-shell.dashboard--com-ativo #wrap-pedido-fila {
    display: none;
}

/* Card flutuante inferior (fila ou overlay ativo) */
#wrap-pedido-fila {
    position: relative;
    z-index: 5;
    flex-shrink: 0;
    margin-top: 0;
    padding: 0.35rem 0.75rem 0.25rem;
    pointer-events: none;
}

#wrap-pedido-fila > * {
    pointer-events: auto;
}

#pedido-da-vez .rd-sheet-card,
#pedido-ativo .rd-sheet-card {
    background: var(--rd-card-bg);
    border-radius: var(--rd-radius-lg);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.35);
    border-left: 4px solid var(--rd-orange);
    overflow: hidden;
}

#pedido-ativo .rd-sheet-card.rd-sheet-flutuante {
    border-left: 4px solid var(--rd-orange);
}

.rd-sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem 1rem 0.5rem;
    gap: 0.75rem;
}

.rd-sheet-head-left {
    min-width: 0;
    flex: 1;
}

.rd-sheet-criado {
    font-size: 0.8rem;
    font-weight: 500;
    color: #6c757d;
    line-height: 1.3;
}

.rd-sheet-tag {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--rd-orange);
    text-transform: uppercase;
    margin: 0;
}

.rd-sheet-tag-destaque {
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: 0.045em;
}

.rd-sheet-tag-piscando {
    animation: rdPiscarTagPedido 1s steps(1, end) infinite;
}

.rd-sheet-tag .rd-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--rd-orange);
    margin-right: 0.35rem;
    vertical-align: middle;
}

@keyframes rdPiscarTagPedido {
    0%, 49% {
        opacity: 1;
    }
    50%, 100% {
        opacity: 0.45;
    }
}

.rd-sheet-valor {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--rd-success);
    white-space: nowrap;
}

.rd-sheet-titulo {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a1a1a;
    padding: 0 1rem;
    margin: 0;
}

.rd-cliente-linha-titulo {
    margin: 0 1rem;
}

.rd-cliente-linha-titulo .rd-sheet-titulo {
    padding: 0;
}

.rd-cliente-avaliacao {
    flex-shrink: 0;
    white-space: nowrap;
    text-align: right;
}

.rd-rota-box {
    margin: 0.75rem 1rem;
    padding: 0.75rem;
    background: #f0f2f5;
    border-radius: 0.75rem;
    font-size: 0.85rem;
    color: #333;
}

.rd-rota-box .rd-rota-linha {
    margin-bottom: 0.35rem;
}

.rd-rota-box .rd-rota-linha:last-child {
    margin-bottom: 0;
}

.rd-rota-box strong {
    color: var(--rd-navy);
}

.rd-sheet-actions {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1rem 1rem;
    align-items: stretch;
}

.rd-sheet-actions-single {
    padding-top: 0.65rem;
}

.rd-btn-aceitar,
.rd-btn-iniciar,
.rd-btn-concluir {
    min-height: 46px;
    border-radius: 0.8rem;
    padding: 0.72rem 1rem;
    line-height: 1.15;
    letter-spacing: 0.01em;
    text-align: center;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14);
    transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.rd-btn-aceitar {
    flex: 1;
    --bs-btn-bg: var(--rd-orange);
    --bs-btn-border-color: var(--rd-orange);
    --bs-btn-hover-bg: var(--rd-orange);
    --bs-btn-hover-border-color: var(--rd-orange);
    --bs-btn-active-bg: var(--rd-orange);
    --bs-btn-active-border-color: var(--rd-orange);
    --bs-btn-focus-shadow-rgb: 255, 102, 0;
    background: var(--rd-orange);
    border: none;
    color: #fff;
    font-weight: 700;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
}

/* App touch: sem mudar cor de fundo no hover — só reforço no texto */
.btn.rd-btn-aceitar:hover,
.btn.rd-btn-aceitar:focus,
.btn.rd-btn-aceitar:active {
    background-color: var(--rd-orange) !important;
    border-color: var(--rd-orange) !important;
    color: #fff !important;
    transform: translateY(-1px);
    filter: brightness(1.02);
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.2) !important;
}

.btn.rd-btn-aceitar:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.55);
    outline-offset: 2px;
}

.rd-btn-aceitar:disabled,
.btn.rd-btn-aceitar:disabled:hover {
    opacity: 0.65;
    cursor: not-allowed;
    font-weight: 700;
}

.rd-btn-iniciar {
    flex: 1;
    --bs-btn-bg: var(--rd-navy);
    --bs-btn-border-color: var(--rd-navy);
    --bs-btn-hover-bg: var(--rd-navy);
    --bs-btn-hover-border-color: var(--rd-navy);
    --bs-btn-active-bg: var(--rd-navy);
    --bs-btn-active-border-color: var(--rd-navy);
    background: var(--rd-navy);
    border: none;
    color: #fff;
    font-weight: 700;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
}

.btn.rd-btn-iniciar:hover,
.btn.rd-btn-iniciar:focus,
.btn.rd-btn-iniciar:active {
    background-color: var(--rd-navy) !important;
    border-color: var(--rd-navy) !important;
    color: #fff !important;
    transform: translateY(-1px);
    filter: brightness(1.03);
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.2) !important;
}

.btn.rd-btn-iniciar:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.55);
    outline-offset: 2px;
}

.rd-btn-concluir {
    flex: 1;
    --bs-btn-bg: #c62828;
    --bs-btn-border-color: #c62828;
    --bs-btn-hover-bg: #c62828;
    --bs-btn-hover-border-color: #c62828;
    --bs-btn-active-bg: #c62828;
    --bs-btn-active-border-color: #c62828;
    background: #c62828;
    border: none;
    color: #fff;
    font-weight: 700;
    white-space: normal;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
}

.btn.rd-btn-concluir:hover,
.btn.rd-btn-concluir:focus,
.btn.rd-btn-concluir:active {
    background-color: #c62828 !important;
    border-color: #c62828 !important;
    color: #fff !important;
    transform: translateY(-1px);
    filter: brightness(1.03);
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.2) !important;
}

.btn.rd-btn-concluir:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.55);
    outline-offset: 2px;
}

/* Barra escura do mapa: botão claro não “some” no hover do Bootstrap */
#pedido-ativo .rd-mapa-links .btn.btn-light:hover,
#pedido-ativo .rd-mapa-links .btn.btn-light:focus,
#pedido-ativo .rd-mapa-links .btn.btn-light:active {
    background-color: #fff !important;
    border-color: #ced4da !important;
    color: #1a1a1a !important;
    box-shadow: none !important;
}

#pedido-ativo .rd-mapa-links .btn.btn-light:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.65);
    outline-offset: 1px;
}

#app-shell.rd-modo-corrida #pedido-ativo .rd-sheet-ativo-compact .rd-sheet-header {
    padding: 0.4rem 0.6rem 0.15rem;
}

#app-shell.rd-modo-corrida #pedido-ativo .rd-sheet-ativo-compact .rd-sheet-titulo {
    font-size: 0.92rem;
    padding: 0 0.6rem;
}

#app-shell.rd-modo-corrida #pedido-ativo .rd-sheet-ativo-compact .rd-rota-box {
    margin: 0.25rem 0.5rem;
    padding: 0.35rem 0.45rem;
    font-size: 0.72rem;
}

#app-shell.rd-modo-corrida #pedido-ativo .rd-sheet-ativo-compact .rd-sheet-actions {
    padding: 0.25rem 0.5rem 0.35rem;
}

.rd-toggle-card-corrida {
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 999px;
    border: 1px solid rgba(12, 20, 33, 0.25);
    background: #fff;
    color: #13233a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.rd-toggle-card-corrida:hover,
.rd-toggle-card-corrida:focus {
    background: #f2f5f9;
}

.rd-linha-resumo-corrida {
    font-size: 0.72rem;
    color: #4b5563;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rd-linha-instrucao-marquee {
    text-overflow: clip;
}

.rd-instrucao-marquee-track {
    display: inline-flex;
    align-items: center;
    width: max-content;
    animation: rdInstrucaoMarquee 11s linear infinite;
    will-change: transform;
}

.rd-instrucao-marquee-group {
    display: inline-block;
    white-space: nowrap;
    margin-right: 2rem;
}

@keyframes rdInstrucaoMarquee {
    0%,
    14% {
        transform: translateX(0);
    }
    88%,
    100% {
        transform: translateX(-50%);
    }
}

#app-shell.rd-modo-corrida .rd-sheet-modo-corrida.rd-card-colapsado .rd-cliente-linha-titulo,
#app-shell.rd-modo-corrida .rd-sheet-modo-corrida.rd-card-colapsado .rd-rota-box,
#app-shell.rd-modo-corrida .rd-sheet-modo-corrida.rd-card-colapsado .rd-sheet-meta,
#app-shell.rd-modo-corrida .rd-sheet-modo-corrida.rd-card-colapsado .rd-avaliacao-cliente,
#app-shell.rd-modo-corrida .rd-sheet-modo-corrida.rd-card-colapsado .rd-card-abas,
#app-shell.rd-modo-corrida .rd-sheet-modo-corrida.rd-card-colapsado .rd-card-aba-avaliacao,
#app-shell.rd-modo-corrida .rd-sheet-modo-corrida.rd-card-colapsado .rd-sheet-actions {
    display: none !important;
}

.rd-card-abas {
    display: flex;
    gap: 0.4rem;
}

.rd-card-aba-btn {
    border: 1px solid rgba(17, 24, 39, 0.15);
    background: #f5f7fa;
    color: #384252;
    border-radius: 999px;
    padding: 0.18rem 0.55rem;
    font-size: 0.7rem;
    font-weight: 700;
}

.rd-card-aba-btn-ativa {
    background: #0f172a;
    border-color: #0f172a;
    color: #fff;
}

.rd-card-aba-avaliacao {
    display: none;
}

#pedido-ativo .rd-sheet-modo-corrida.rd-card-aba-avaliacao-ativa .rd-card-aba-rota {
    display: none;
}

#pedido-ativo .rd-sheet-modo-corrida.rd-card-aba-avaliacao-ativa .rd-card-aba-avaliacao {
    display: block;
}

.rd-aviso-bloqueio {
    font-size: 0.75rem;
    color: #b45309;
    padding: 0 1rem 0.5rem;
}

.rd-sheet-meta {
    font-size: 0.75rem;
    color: #6c757d;
    padding: 0 1rem 0.25rem;
}

/* Bottom nav */
.rd-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--rd-navy-deep);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0.35rem 0 calc(0.5rem + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.25);
}

.rd-bottom-nav .rd-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 0.2rem;
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--rd-text-muted);
    text-decoration: none;
    padding: 0.35rem 0.45rem 0.25rem;
    min-width: 56px;
    border: none;
    background: transparent;
    cursor: pointer;
    line-height: 1.1;
}

.rd-bottom-nav .rd-nav-item i {
    font-size: 1.35rem;
    line-height: 1;
}

.rd-bottom-nav .rd-nav-item:hover,
.rd-bottom-nav .rd-nav-item:focus-visible {
    color: var(--rd-text);
    outline: none;
}

.rd-bottom-nav .rd-nav-item.rd-nav-active {
    color: var(--rd-orange);
}

.rd-bottom-nav .rd-nav-item.rd-nav-active i {
    color: var(--rd-orange);
}

/* Itens ainda sem tela: mesmo peso visual do exemplo, só não ativos */
.rd-bottom-nav .rd-nav-item.rd-nav-em-breve {
    color: var(--rd-text-muted);
}

.rd-nav-icon-wrap {
    min-height: 1.35rem;
}

.rd-nav-inicio-badge {
    position: absolute;
    top: -4px;
    right: -8px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 0.55rem;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    color: #fff;
    background: #c62828;
    border-radius: 999px;
    box-shadow: 0 0 0 2px var(--rd-navy-deep);
}

.rd-nav-item.rd-nav-inicio-pulse .rd-nav-icon-wrap i {
    color: var(--rd-orange);
    animation: rdNavInicioPulse 0.75s ease-in-out infinite;
}

@keyframes rdNavInicioPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(1.08);
    }
}

/* Finanças dentro do mesmo layout da dashboard */
.rd-fin-card {
    background: var(--rd-card-bg);
    color: #1f2937;
    border-radius: var(--rd-radius-lg);
    border-left: 4px solid var(--rd-orange);
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.25);
}

.rd-fin-table thead th {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #aeb8c7;
    white-space: nowrap;
}

.rd-fin-table tbody td {
    font-size: 0.82rem;
}

.rd-fin-qr-wrap {
    width: 236px;
    height: 236px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 0.75rem;
}

.rd-fin-qr-wrap img {
    width: 220px;
    height: 220px;
    object-fit: contain;
}

/* Finanças: alternância lateral PIX ↔ histórico */
.rd-fin-slide-shell {
    background: var(--rd-card-bg);
    color: #1f2937;
    border-radius: var(--rd-radius-lg);
    border-left: 4px solid var(--rd-orange);
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.rd-fin-slide-bar {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    background: #f6f7f9;
}

.rd-fin-slide-btn {
    flex: 0 0 44px;
    width: 44px;
    border: 0;
    background: transparent;
    color: #1a1a1a;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rd-fin-slide-btn:hover,
.rd-fin-slide-btn:focus-visible {
    background: rgba(255, 102, 0, 0.12);
    color: var(--rd-orange);
    outline: none;
}

.rd-fin-slide-titulo {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.rd-fin-slide-viewport {
    overflow: hidden;
}

.rd-fin-slide-track {
    display: flex;
    width: 200%;
    transition: transform 0.28s ease;
}

.rd-fin-slide-pane {
    width: 50%;
    flex: 0 0 50%;
}

.rd-fin-pane-inner {
    min-height: 280px;
}

.rd-fin-slide-track.rd-fin-slide-pos-1 {
    transform: translateX(-50%);
}

/* Alertas */
#alerta-fila {
    margin: 0 0.75rem 0.5rem;
    border-radius: 0.65rem;
    border: none;
    font-size: 0.85rem;
}

#alerta-fila.alert-success {
    background: rgba(46, 125, 74, 0.35);
    color: #c8f5d4;
}

#alerta-fila.alert-danger {
    background: rgba(198, 40, 40, 0.35);
    color: #ffcdd2;
}

#alerta-fila.alert-warning {
    background: rgba(255, 152, 0, 0.2);
    color: #ffe0b2;
}

#alerta-fila.alert-info {
    background: rgba(33, 150, 243, 0.2);
    color: #bbdefb;
}

/* Estados vazios */
.rd-empty-soft {
    color: var(--rd-text-muted);
    font-size: 0.85rem;
    text-align: center;
    padding: 1rem;
}

/* Desktop: limita largura tipo app */
@media (min-width: 576px) {
    body.modulo2-dashboard #app-shell {
        max-width: 480px;
        margin: 0 auto;
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.4);
    }

    body.modulo2-dashboard .rd-bottom-nav {
        max-width: 480px;
        left: 50%;
        transform: translateX(-50%);
    }
}

/* ============================================================
   Tela de IDLE no WebView Android (substitui o mapa idle)
   ============================================================ */
.rd-idle-screen {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a0e1a;
    pointer-events: none;
}

.rd-idle-headline {
    position: relative;
    width: 70%;
    max-width: 480px;
    text-align: center;
}

.rd-idle-ghost,
.rd-idle-main {
    display: block;
    font-weight: 800;
    text-transform: uppercase;
    text-align: center;
    line-height: 1.05;
    text-indent: 0.42em;
    will-change: opacity, letter-spacing, transform;
    font-size: clamp(20px, 5.6vw, 32px);
}

.rd-idle-ghost {
    position: absolute;
    inset: 0;
    color: #FF6B1A;
    letter-spacing: 0.56em;
    opacity: 0.05;
    text-indent: 0.56em;
    animation: rd-idle-breathe-ghost 2.6s ease-in-out infinite;
}

.rd-idle-main {
    position: relative;
    letter-spacing: 0.42em;
    opacity: 0.4;
    background: linear-gradient(180deg, #E6EAF2 0%, #8A9BB8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: rd-idle-breathe 2.6s ease-in-out infinite;
}

.rd-idle-shine {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.rd-idle-shine::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 30%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 138, 71, 0.35) 50%,
        transparent 100%
    );
    transform: translateX(-120%);
    animation: rd-idle-shine 4.2s ease-in-out infinite;
    will-change: transform;
}

@keyframes rd-idle-breathe {
    0%, 100% { opacity: 0.30; letter-spacing: 0.42em; }
    50%      { opacity: 0.62; letter-spacing: 0.50em; }
}

@keyframes rd-idle-breathe-ghost {
    0%, 100% { opacity: 0.05; letter-spacing: 0.56em; transform: scale(1.04); }
    50%      { opacity: 0.14; letter-spacing: 0.48em; transform: scale(1.00); }
}

@keyframes rd-idle-shine {
    0%   { transform: translateX(-120%); }
    60%  { transform: translateX(220%); }
    100% { transform: translateX(220%); }
}

@media (prefers-reduced-motion: reduce) {
    .rd-idle-main,
    .rd-idle-ghost,
    .rd-idle-shine::after {
        animation: none !important;
    }
    .rd-idle-main { opacity: 0.55; }
    .rd-idle-ghost { opacity: 0.08; }
}

/* ============================================================
   Modo Picture-in-Picture (rd-pip-ativo no body)
   Janela compacta — só exibição visual, sem interação
   ============================================================ */
body.rd-pip-ativo .rd-tela-conexao {
    min-height: 0 !important;
    height: 100vh !important;
    padding: 0.5rem !important;
    justify-content: center !important;
    align-items: center !important;
    overflow: hidden !important;
}
body.rd-pip-ativo .rd-tela-conexao .rd-logo-grande {
    max-width: min(120px, 80%) !important;
    max-height: 45% !important;
    margin-bottom: 0.5rem !important;
}
body.rd-pip-ativo .rd-tela-conexao .rd-card-login { display: none !important; }
body.rd-pip-ativo .rd-tela-conexao::after {
    content: "FAÇA O LOGIN PARA USAR";
    display: block;
    text-align: center;
    font-size: 0.55rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.06em;
    margin-top: 0.25rem;
}

body.rd-pip-ativo #app-shell:not(.d-none) {
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100vh !important;
    overflow: hidden !important;
}

/* Cabeçalho: avatar + nome + badge ONLINE abaixo do nome */
body.rd-pip-ativo .rd-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 0.3rem 0.4rem !important;
    gap: 0.15rem !important;
}
body.rd-pip-ativo .rd-header-avatar {
    width: 26px !important;
    height: 26px !important;
    font-size: 0.75rem !important;
    flex-shrink: 0 !important;
}
body.rd-pip-ativo .rd-header-esquerda {
    justify-content: flex-start !important;
    width: 100% !important;
}
body.rd-pip-ativo .rd-header-saudacao {
    font-size: 0.68rem !important;
    line-height: 1.2 !important;
}
body.rd-pip-ativo .rd-header-motoboy-avaliacao { display: none !important; }
body.rd-pip-ativo .rd-header-metricas-acoes { display: none !important; }
body.rd-pip-ativo .rd-header-direita {
    width: 100% !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
    padding-left: 34px !important;
}
body.rd-pip-ativo .rd-badge-online {
    font-size: 0.52rem !important;
    padding: 0.12rem 0.3rem !important;
    white-space: nowrap !important;
}

/* Oculta tudo exceto a área central */
body.rd-pip-ativo #rd-metrics-bar { display: none !important; }
body.rd-pip-ativo #status-fila { display: none !important; }
body.rd-pip-ativo #alerta-fila { display: none !important; }
body.rd-pip-ativo .rd-bottom-nav { display: none !important; }
body.rd-pip-ativo #view-financas { display: none !important; }
body.rd-pip-ativo #view-perfil { display: none !important; }
body.rd-pip-ativo #wrap-pedido-fila { display: none !important; }
body.rd-pip-ativo #resumo-motoboy-extra { display: none !important; }

/* Área central: fundo preto com mensagem */
body.rd-pip-ativo #view-inicio {
    padding-bottom: 0 !important;
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    background: #0a0e1a !important;
}
body.rd-pip-ativo #mapa-stack { display: none !important; }
body.rd-pip-ativo #pedido-ativo { display: none !important; }
body.rd-pip-ativo #mapa-idle-placeholder { display: none !important; }

/* Mensagem central no PiP */
body.rd-pip-ativo #view-inicio::after {
    content: attr(data-pip-msg);
    display: block;
    text-align: center;
    font-size: 0.62rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.04em;
    line-height: 1.5;
    padding: 0 0.5rem;
}

/* ============================================================
   Tela de Perfil (#view-perfil)
   ============================================================ */
.rd-perfil-header {
    background: var(--rd-orange);
    padding: 1.25rem 1rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}
.rd-perfil-avatar-wrap {
    position: relative;
    margin-bottom: 0.5rem;
}
.rd-perfil-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--rd-navy);
    border: 3px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.25rem;
    color: var(--rd-orange);
}
.rd-perfil-nome {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    text-align: center;
}
.rd-perfil-avaliacao {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.rd-perfil-qtd-aval {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.8rem;
}
.rd-perfil-veiculo {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.75);
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    padding: 0.2rem 0.75rem;
    margin: 0.25rem 0 0;
}
.rd-perfil-creditos-header {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.75);
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    padding: 0.2rem 0.75rem;
    margin: 0.15rem 0 0;
}
.rd-perfil-metricas {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: var(--rd-navy-header);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.rd-perfil-metrica {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.85rem 0.5rem;
    text-align: center;
}
.rd-perfil-metrica-mid {
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}
.rd-perfil-metrica-valor {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--rd-orange);
    line-height: 1.2;
}
.rd-perfil-metrica-label {
    font-size: 0.7rem;
    color: var(--rd-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.2rem;
}
.rd-perfil-secao-titulo {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--rd-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 0.6rem;
}
.rd-perfil-card {
    background: var(--rd-navy-header);
    border-radius: var(--rd-radius-lg);
    overflow: hidden;
}
.rd-perfil-item {
    display: flex;
    align-items: center;
    padding: 0.85rem 1rem;
    gap: 0.75rem;
}
.rd-perfil-item-border {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.rd-perfil-item-icone {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 102, 0, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--rd-orange);
    flex-shrink: 0;
}
.rd-perfil-item-texto {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    flex: 1;
    min-width: 0;
}
.rd-perfil-item-label {
    font-size: 0.7rem;
    color: var(--rd-text-muted);
}
.rd-perfil-item-valor {
    font-size: 0.88rem;
    color: var(--rd-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rd-perfil-check {
    color: #2e7d4a;
    font-size: 1rem;
    flex-shrink: 0;
}
.rd-perfil-acao {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.85rem 1rem;
    gap: 0.75rem;
    background: transparent;
    border: none;
    color: var(--rd-text);
    text-align: left;
    cursor: pointer;
}
.rd-perfil-acao-border {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.rd-perfil-acao-label {
    flex: 1;
    font-size: 0.88rem;
}
.rd-perfil-chevron {
    font-size: 0.85rem;
    color: var(--rd-text-muted);
}
.rd-perfil-acao-icone {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.rd-perfil-acao-icone-orange {
    background: rgba(255, 102, 0, 0.12);
    color: var(--rd-orange);
}
.rd-perfil-acao-icone-blue {
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
}
.rd-perfil-acao-icone-yellow {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}
.rd-perfil-btn-sair {
    padding: 0.85rem;
    background: rgba(198, 40, 40, 0.12);
    border: 1px solid rgba(198, 40, 40, 0.25);
    border-radius: var(--rd-radius-lg);
    color: #ffcdd2;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

/* ============================================================
   Seção Créditos — histórico de recargas (rd-cred-*)
   ============================================================ */
.rd-cred-shell {
    background: var(--rd-navy-header);
    border-radius: var(--rd-radius-lg);
    overflow: hidden;
    margin-bottom: 1rem;
}
.rd-cred-titulo {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--rd-text);
}
.rd-cred-badge {
    background: rgba(255, 102, 0, 0.15);
    color: var(--rd-orange);
    border-radius: 20px;
    padding: 0.15rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 600;
}
.rd-cred-lista {
    padding: 0 0.75rem 0.75rem;
}
.rd-cred-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    gap: 0.5rem;
}
.rd-cred-item:last-child { border-bottom: none; }
.rd-cred-item-esquerda {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}
.rd-cred-item-data {
    font-size: 0.8rem;
    color: var(--rd-text);
}
.rd-cred-item-metodo {
    font-size: 0.72rem;
    color: var(--rd-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.rd-cred-item-direita {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.15rem;
    flex-shrink: 0;
}
.rd-cred-item-creditos {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--rd-orange);
}
.rd-cred-item-valor {
    font-size: 0.78rem;
    color: var(--rd-text-muted);
}
.rd-cred-item-status {
    font-size: 0.68rem;
    border-radius: 20px;
    padding: 0.1rem 0.5rem;
    font-weight: 500;
}
.rd-cred-status-ok {
    background: rgba(46, 125, 74, 0.2);
    color: #7fdc9e;
}
.rd-cred-status-pendente {
    background: rgba(255, 152, 0, 0.15);
    color: #ffcc80;
}
.rd-cred-vazio {
    padding: 1.5rem 0;
}
/* Ícone verde para Meu PIX no Perfil */
.rd-perfil-acao-icone-green {
    background: rgba(46, 125, 74, 0.15);
    color: #7fdc9e;
}

/* ============================================================
   Seção Histórico (#view-historico)
   ============================================================ */
.rd-hist-shell {
    background: var(--rd-navy-header);
    border-radius: var(--rd-radius-lg);
    overflow: hidden;
    margin: 0 12px;
}
.rd-hist-titulo {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--rd-text);
}
.rd-hist-badge {
    background: rgba(255, 102, 0, 0.15);
    color: var(--rd-orange);
    border-radius: 20px;
    padding: 0.15rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 600;
}
.rd-hist-filtro {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--rd-text-muted);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.72rem;
    cursor: pointer;
}
.rd-hist-filtro-ativo {
    background: rgba(255, 102, 0, 0.15);
    border-color: rgba(255, 102, 0, 0.3);
    color: var(--rd-orange);
    font-weight: 600;
}
.rd-hist-lista { padding: 0 0 4px; }
.rd-hist-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.rd-hist-item-icone {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 2px;
}
.rd-hist-icone-orange {
    background: rgba(255, 102, 0, 0.12);
    color: var(--rd-orange);
}
.rd-hist-icone-blue {
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
}
.rd-hist-item-corpo {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.rd-hist-item-linha1,
.rd-hist-item-linha2 {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 6px;
}
.rd-hist-item-tipo {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--rd-text);
}
.rd-hist-item-valor {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--rd-orange);
    flex-shrink: 0;
}
.rd-hist-item-rota {
    font-size: 0.72rem;
    color: var(--rd-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.rd-hist-status {
    font-size: 0.68rem;
    border-radius: 20px;
    padding: 1px 7px;
    font-weight: 500;
    flex-shrink: 0;
}
.rd-hist-status-ok {
    background: rgba(46, 125, 74, 0.2);
    color: #7fdc9e;
}
.rd-hist-status-cancel {
    background: rgba(198, 40, 40, 0.2);
    color: #ffcdd2;
}
.rd-hist-item-data {
    font-size: 0.68rem;
    color: var(--rd-text-muted);
}
.rd-hist-vazio { padding: 1.5rem 0; }
.rd-hist-btn-mais {
    padding: 0.75rem;
    background: rgba(255, 102, 0, 0.08);
    border: 1px solid rgba(255, 102, 0, 0.2);
    border-radius: var(--rd-radius-lg);
    color: var(--rd-orange);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
body.rd-pip-ativo #view-historico { display: none !important; }

/* ============================================================
   Painéis PIX e Recarga
   ============================================================ */
.rd-pix-topbar {
    background: var(--rd-orange);
    padding: 0.5rem 0.75rem 0.5rem;
}
.rd-pix-corpo {
    background: var(--rd-navy-header);
    margin: 0 12px;
    border-radius: var(--rd-radius-lg);
    margin-top: 12px;
}
.rd-pix-titulo {
    font-size: 1rem;
    font-weight: 700;
    color: var(--rd-text);
}
.rd-pix-subtitulo {
    font-size: 0.8rem;
    color: var(--rd-text-muted);
}
.rd-pix-qr-wrap {
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    width: fit-content;
}
.rd-pix-qr-img {
    display: block;
    border-radius: 4px;
}
.rd-pix-chave-wrap {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 10px 14px;
    text-align: left;
}
.rd-pix-chave-label {
    font-size: 0.7rem;
    color: var(--rd-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: block;
    margin-bottom: 4px;
}
.rd-pix-chave-valor {
    font-size: 0.82rem;
    color: var(--rd-text);
    font-weight: 500;
    word-break: break-all;
}
.rd-pix-btn-copiar {
    padding: 0.75rem;
    background: var(--rd-orange);
    border: none;
    border-radius: var(--rd-radius-lg);
    color: #fff;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.rd-pix-aviso {
    font-size: 0.72rem;
    color: var(--rd-text-muted);
    line-height: 1.5;
}
/* Botão principal de recarga */
.rd-recarga-btn-principal {
    padding: 0.85rem;
    background: var(--rd-orange);
    border: none;
    border-radius: var(--rd-radius-lg);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* Grid de opções de valor */
.rd-recarga-opcoes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.rd-recarga-opcao {
    background: var(--rd-navy-header);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--rd-radius-lg);
    padding: 14px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}
.rd-recarga-opcao-ativa {
    border-color: var(--rd-orange);
    background: rgba(255, 102, 0, 0.1);
}
.rd-recarga-opcao-valor {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--rd-text);
}
.rd-recarga-opcao-creditos {
    font-size: 0.7rem;
    color: var(--rd-text-muted);
}
.rd-recarga-input {
    background: var(--rd-navy-header);
    border: 1px solid rgba(255,255,255,0.12);
    color: var(--rd-text);
    border-radius: 8px;
}
.rd-recarga-input:focus {
    background: var(--rd-navy-header);
    border-color: var(--rd-orange);
    color: var(--rd-text);
    box-shadow: 0 0 0 2px rgba(255,102,0,0.2);
}
.rd-recarga-btn-confirmar {
    background: var(--rd-orange);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-weight: 600;
    padding: 0 16px;
    cursor: pointer;
    white-space: nowrap;
}

/* Botão Voltar reutilizável (subpáginas) */
.rd-perfil-voltar {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.25rem 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.rd-perfil-voltar:active {
    color: #fff;
}

/* Confirmação de recarga */
.rd-recarga-confirmacao {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--rd-radius-lg);
    padding: 1rem;
    text-align: center;
}
.rd-recarga-confirmacao-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--rd-text);
}
.rd-recarga-btn-sim {
    padding: 0.75rem;
    background: var(--rd-orange);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}
.rd-recarga-btn-nao {
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: var(--rd-text-muted);
    font-weight: 500;
    cursor: pointer;
}
