/* =======================================================
   DriftMuvi - Design System Baseado nas Cores da logo.png
   Paleta: Electric Cyan (#00D2FF) & Neon Magenta (#FF2E93)
   ======================================================= */

:root {
    --bg-page: #F8FAFC;
    --bg-card: #FFFFFF;
    --bg-surface: #F1F5F9;
    --bg-dark-card: #0F172B;

    /* Cores Oficiais extraídas de logo.png */
    --brand-cyan: #00D2FF;
    --brand-cyan-hover: #00B4DB;
    --brand-cyan-light: rgba(0, 210, 255, 0.10);
    --brand-cyan-border: rgba(0, 210, 255, 0.35);

    --brand-magenta: #FF2E93;
    --brand-magenta-light: rgba(255, 46, 147, 0.10);
    
    --brand-purple: #7C3AED;
    
    /* Gradiente Oficial DriftMuvi */
    --brand-gradient: linear-gradient(135deg, #00D2FF 0%, #7C3AED 55%, #FF2E93 100%);
    --brand-gradient-hover: linear-gradient(135deg, #00B8E6 0%, #6D28D9 55%, #E61E80 100%);
    --brand-gradient-cyan: linear-gradient(135deg, #00D2FF 0%, #0084FF 100%);

    --dark-text: #0F172A;
    --text-muted: #64748B;
    --text-light: #94A3B8;

    --accent-green: #10B981;
    --accent-red: #F43F5E;
    --accent-blue: #00D2FF;

    --border-subtle: #E2E8F0;
    --border-light: #F1F5F9;

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --radius-full: 9999px;

    --shadow-soft: 0 2px 10px rgba(0, 0, 0, 0.03);
    --shadow-card: 0 4px 18px rgba(0, 0, 0, 0.05);
    --shadow-brand: 0 4px 16px rgba(0, 210, 255, 0.35);
    --shadow-magenta: 0 4px 16px rgba(255, 46, 147, 0.35);

    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

input, textarea, select {
    user-select: auto;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-page);
    color: var(--dark-text);
    overflow-x: hidden;
    min-height: 100vh;
    padding-top: var(--safe-top);
    padding-bottom: calc(75px + var(--safe-bottom));
}

/* =======================================================
   APP HEADER COM A LOGO OFICIAL
   ======================================================= */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-light);
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-logo-img {
    height: 44px;
    width: auto;
    max-width: 170px;
    object-fit: contain;
    border-radius: 8px;
}

/* Header Icons (Somente Configurações) */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-header-circle {
    width: 40px;
    height: 40px;
    background: #FFFFFF;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-text);
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    transition: all 0.2s ease;
}

.btn-header-circle svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.2;
}

.btn-header-circle:active {
    transform: scale(0.92);
    border-color: var(--brand-cyan);
    background: var(--brand-cyan-light);
    color: var(--brand-cyan);
}

/* Subheader com Botão Voltar (<- Liberar carrinho / Relatórios) */
.view-sub-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.btn-back-arrow {
    background: transparent;
    border: none;
    color: var(--dark-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: var(--radius-full);
    transition: background 0.2s;
}

.btn-back-arrow svg {
    width: 24px;
    height: 24px;
    stroke-width: 2.5;
}

.btn-back-arrow:active {
    background: var(--bg-surface);
}

.view-page-title {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--dark-text);
}

/* Tab Views */
.tab-view {
    display: none;
    padding: 16px 18px;
    animation: fadeIn 0.2s ease-out;
}

.tab-view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =======================================================
   CARDS DE STATUS (TELA INICIAL)
   ======================================================= */
.quick-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 18px;
}

.stat-card {
    background: #FFFFFF;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 12px 10px;
    text-align: center;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-card.selected {
    border-color: var(--brand-cyan);
    background: var(--brand-cyan-light);
    box-shadow: 0 0 0 2px var(--brand-cyan);
}

.stat-card .stat-icon-wrapper {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
    background: var(--bg-surface);
    color: var(--dark-text);
}

.stat-card .stat-icon-wrapper svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.2;
}

.stat-card .stat-value {
    font-size: 1.45rem;
    font-weight: 900;
    color: var(--dark-text);
}

.stat-card.stat-ocupados .stat-value { color: var(--brand-magenta); }
.stat-card.stat-ocupados .stat-icon-wrapper { background: var(--brand-magenta-light); color: var(--brand-magenta); }

.stat-card.stat-livres .stat-value { color: var(--brand-cyan); }
.stat-card.stat-livres .stat-icon-wrapper { background: var(--brand-cyan-light); color: var(--brand-cyan); }

.stat-card .stat-label {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 2px;
}

/* =======================================================
   CARD DE CARRINHO (FROTA EM PISTA)
   ======================================================= */
.cart-header-card {
    background: #FFFFFF;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-soft);
    position: relative;
    cursor: pointer;
    transition: all 0.2s;
}

.cart-header-card:active {
    transform: scale(0.985);
}

.cart-thumb-box {
    width: 68px;
    height: 68px;
    border-radius: var(--radius-md);
    background: #0F172A;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cart-thumb-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.cart-info-col {
    flex: 1;
}

.cart-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.cart-title-bold {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--dark-text);
}

.badge-disponivel {
    background: var(--brand-cyan);
    color: #0F172A;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-em-uso {
    background: #0F172A;
    color: var(--brand-cyan);
    border: 1px solid var(--brand-cyan-border);
    font-size: 0.68rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-finalizado {
    background: var(--brand-magenta);
    color: #FFFFFF;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    animation: badgeBlink 0.7s infinite alternate;
}

@keyframes badgeBlink {
    from { opacity: 0.6; }
    to { opacity: 1; }
}

.cart-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Timer Bar no Card Ocupado */
.card-timer-row {
    margin-top: 8px;
    background: var(--bg-surface);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.timer-digits-clean {
    font-size: 1.25rem;
    font-weight: 900;
    font-family: 'Courier New', Courier, monospace;
    color: var(--dark-text);
}

.time-up-text {
    color: var(--brand-magenta) !important;
    animation: textBlink 0.5s infinite alternate;
}

@keyframes textBlink {
    from { opacity: 0.5; }
    to { opacity: 1; }
}

/* Efeito Pisca-Pisca do Card Quando Tempo Acaba */
@keyframes cardAlarmBlink {
    0% { border-color: #FF2E93; background: #FFF; box-shadow: 0 0 10px rgba(255, 46, 147, 0.3); }
    50% { border-color: #FF2E93; background: #FFF1F7; box-shadow: 0 0 25px rgba(255, 46, 147, 0.7); }
    100% { border-color: #FF2E93; background: #FFF; box-shadow: 0 0 10px rgba(255, 46, 147, 0.3); }
}

.card-alarm-flashing {
    animation: cardAlarmBlink 0.7s infinite !important;
}

/* =======================================================
   FORMULÁRIO "LIBERAR CARRINHO"
   ======================================================= */
.section-form-label {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--dark-text);
    margin-bottom: 10px;
    display: block;
}

/* 1. Seleção de Duração */
.duration-pills-row {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
}

.pill-duracao {
    flex: 1;
    min-width: 68px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 12px 6px;
    text-align: center;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.pill-duracao.active {
    background: var(--brand-cyan);
    border-color: var(--brand-cyan);
    color: #0F172A;
    font-weight: 900;
    box-shadow: var(--shadow-brand);
}

/* 2. Valor da Locação */
.valor-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.toggle-mode-pills {
    display: flex;
    background: var(--bg-surface);
    border-radius: var(--radius-full);
    padding: 3px;
}

.toggle-mode-pill {
    padding: 4px 12px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    border-radius: var(--radius-full);
    cursor: pointer;
    border: none;
    background: transparent;
}

.toggle-mode-pill.active {
    background: #0F172A;
    color: #FFFFFF;
}

.valor-big-box {
    background: #F8FAFC;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 20px;
}

.valor-currency {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--dark-text);
}

.valor-amount-text {
    font-size: 1.9rem;
    font-weight: 900;
    color: var(--dark-text);
    letter-spacing: -0.5px;
}

.valor-input-clean {
    border: none;
    background: transparent;
    font-size: 1.9rem;
    font-weight: 900;
    color: var(--dark-text);
    width: 100%;
    outline: none;
}

/* 3. Tempo Bônus (Gratuito) */
.bonus-control-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
}

.bonus-box-display {
    width: 100px;
    background: #F8FAFC;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 8px 10px;
    text-align: center;
}

.bonus-box-num {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--text-light);
    line-height: 1;
}

.bonus-box-lbl {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
}

.bonus-pills-group {
    display: flex;
    gap: 8px;
    flex: 1;
}

.pill-bonus {
    flex: 1;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px 8px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--dark-text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.pill-bonus.active {
    background: var(--brand-cyan);
    border-color: var(--brand-cyan);
    color: #0F172A;
    font-weight: 900;
    box-shadow: var(--shadow-brand);
}

/* 4. Meio de Pagamento */
.payment-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}

.pay-card {
    background: #F8FAFC;
    border: 1.5px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px 8px;
    text-align: center;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.pay-card .pay-icon-box {
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pay-card .pay-icon-box svg {
    width: 24px;
    height: 24px;
    stroke-width: 2.2;
}

.pay-card .pay-label {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--dark-text);
}

.pay-card.active {
    border-color: var(--brand-cyan);
    background: var(--brand-cyan-light);
    box-shadow: 0 0 0 2px var(--brand-cyan);
}

.pay-card.active .pay-icon-box {
    color: var(--brand-cyan);
}

/* Botão Principal com Gradiente DriftMuvi */
.btn-brand-full {
    width: 100%;
    background: var(--brand-gradient);
    border: none;
    border-radius: var(--radius-full);
    padding: 15px 20px;
    font-size: 1.05rem;
    font-weight: 800;
    color: #FFFFFF;
    cursor: pointer;
    box-shadow: var(--shadow-brand);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-brand-full svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
}

.btn-brand-full:active {
    transform: scale(0.98);
    opacity: 0.95;
}

/* =======================================================
   TELA DE DESPESAS (DARK HERO CARD COM CORES DA LOGO)
   ======================================================= */
.page-heading-large {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--dark-text);
    margin-bottom: 14px;
    letter-spacing: -0.5px;
}

/* Hero Card Escuro do Saldo */
.despesas-dark-hero {
    background: linear-gradient(135deg, #0B0F19 0%, #151D30 100%);
    border: 1px solid rgba(0, 210, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: 22px 20px;
    color: #FFFFFF;
    margin-bottom: 16px;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.despesas-dark-hero::after {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(0, 210, 255, 0.25) 0%, transparent 70%);
    pointer-events: none;
}

.hero-saldo-lbl {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-light);
}

.hero-saldo-val {
    font-size: 2.3rem;
    font-weight: 900;
    color: #FFFFFF;
    margin: 4px 0 16px 0;
    letter-spacing: -0.5px;
}

.hero-sub-stats {
    display: flex;
    align-items: center;
    gap: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 14px;
}

.hero-stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-circle-icon {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-circle-icon svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
}

.circle-green { background: rgba(0, 210, 255, 0.2); color: var(--brand-cyan); }
.circle-red { background: rgba(255, 46, 147, 0.2); color: var(--brand-magenta); }

.stat-item-text span {
    display: block;
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--text-light);
    text-transform: uppercase;
}

.stat-item-text strong {
    font-size: 0.95rem;
    font-weight: 800;
}

.text-val-green { color: var(--brand-cyan) !important; }
.text-val-red { color: var(--brand-magenta) !important; }

/* Filtros de Período Limpos */
.filter-pills-bar {
    display: flex;
    background: var(--bg-surface);
    border-radius: var(--radius-full);
    padding: 4px;
    margin: 14px 0 16px 0;
}

.filter-pill-item {
    flex: 1;
    text-align: center;
    padding: 8px 10px;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-pill-item.active {
    background: var(--brand-cyan);
    color: #0F172A;
    font-weight: 800;
    box-shadow: var(--shadow-brand);
}

/* Empty State Card */
.empty-state-white-card {
    background: #FFFFFF;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 40px 20px;
    text-align: center;
    box-shadow: var(--shadow-soft);
}

.empty-state-icon-box {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    background: var(--brand-cyan-light);
    color: var(--brand-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px auto;
}

.empty-state-icon-box svg {
    width: 26px;
    height: 26px;
    stroke-width: 2;
}

.empty-state-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--dark-text);
    margin-bottom: 6px;
}

.empty-state-sub {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* =======================================================
   TELA DE RELATÓRIOS (CORES DA LOGO)
   ======================================================= */
.relatorio-hero-box {
    margin-bottom: 8px;
}

.relatorio-big-faturamento {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--dark-text);
    letter-spacing: -0.8px;
    line-height: 1;
}

.relatorio-faturamento-sub {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Faixa Gradiente Oficial da Logo */
.relatorio-brand-strip {
    width: 100%;
    height: 38px;
    background: var(--brand-gradient);
    border-radius: var(--radius-sm);
    margin: 14px 0 16px 0;
    box-shadow: var(--shadow-brand);
}

/* Grid 2 Colunas de KPIs */
.kpi-two-col-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.kpi-clean-card {
    background: #FFFFFF;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px;
    box-shadow: var(--shadow-soft);
}

.kpi-top-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.kpi-circle-icon {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

.kpi-circle-icon svg {
    width: 15px;
    height: 15px;
    stroke-width: 2.2;
}

.kpi-label-text {
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.kpi-big-value {
    font-size: 1.35rem;
    font-weight: 900;
    color: var(--dark-text);
}

/* Card Vendas por Meio de Pagamento */
.payment-stats-card {
    background: #FFFFFF;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-soft);
    margin-bottom: 18px;
}

.payment-stats-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.payment-stats-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--dark-text);
}

.payment-stats-tag {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
}

.payment-stats-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.bar-chart-container {
    padding-top: 6px;
}

.bar-count-label {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--dark-text);
    margin-bottom: 4px;
    padding-left: 2px;
}

.bar-brand-fill {
    width: 100%;
    height: 18px;
    background: var(--brand-gradient);
    border-radius: 6px;
}

/* =======================================================
   BOTTOM NAVIGATION BAR COM ÍCONES LUCIDE
   ======================================================= */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(64px + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: #FFFFFF;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 100;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.03);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.68rem;
    font-weight: 700;
    gap: 4px;
    flex: 1;
    height: 100%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-item svg {
    width: 22px;
    height: 22px;
    stroke-width: 2.2;
    transition: transform 0.2s;
}

.nav-item.active {
    color: var(--dark-text);
}

.nav-item.active svg {
    color: var(--brand-cyan);
    filter: drop-shadow(0 2px 6px rgba(0, 210, 255, 0.4));
    transform: translateY(-2px);
}

/* =======================================================
   MODALS E BOTTOM SHEETS
   ======================================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 1000;
    display: none;
    align-items: flex-end;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-sheet {
    background: #FFFFFF;
    border-radius: 24px 24px 0 0;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 20px 20px calc(24px + var(--safe-bottom)) 20px;
    animation: sheetSlide 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.15);
}

@keyframes sheetSlide {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.sheet-handle {
    width: 40px;
    height: 4px;
    background: var(--border-subtle);
    border-radius: var(--radius-full);
    margin: -6px auto 16px auto;
}

.sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.sheet-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--dark-text);
}

.btn-close-sheet {
    background: var(--bg-surface);
    border: none;
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.btn-close-sheet svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.2;
}

/* Form Controls nos Modais */
.form-group {
    margin-bottom: 14px;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--dark-text);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    background: #F8FAFC;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    color: var(--dark-text);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s;
}

.form-control:focus {
    border-color: var(--brand-cyan);
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(0, 210, 255, 0.25);
}

/* Toast */
.toast-msg {
    position: fixed;
    top: calc(70px + var(--safe-top));
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: #0F172A;
    color: #FFFFFF;
    border-left: 4px solid var(--brand-cyan);
    padding: 10px 22px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 700;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.25s ease;
}

.toast-msg.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Floating Action Button (+) */
.fab-btn {
    position: fixed;
    bottom: calc(80px + var(--safe-bottom));
    right: 20px;
    width: 58px;
    height: 58px;
    border-radius: var(--radius-full);
    background: var(--brand-gradient);
    border: none;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-brand);
    cursor: pointer;
    z-index: 90;
    transition: all 0.2s ease;
}

.fab-btn svg {
    width: 28px;
    height: 28px;
    stroke-width: 2.5;
}

.fab-btn:active {
    transform: scale(0.92);
}

/* Modal de Confirmação Mobile Nativa */
.confirm-icon-box {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-full);
    background: rgba(255, 46, 147, 0.12);
    color: var(--brand-magenta);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 4px auto 14px auto;
}

.confirm-icon-box svg {
    width: 30px;
    height: 30px;
    stroke-width: 2.2;
}

.btn-cancel-modal {
    flex: 1;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    padding: 13px;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--dark-text);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel-modal:active {
    background: #E2E8F0;
}

.btn-confirm-modal {
    flex: 1;
    background: var(--brand-magenta);
    border: none;
    border-radius: var(--radius-full);
    padding: 13px;
    font-size: 0.95rem;
    font-weight: 800;
    color: #FFFFFF;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(255, 46, 147, 0.35);
    transition: all 0.2s;
}

.btn-confirm-modal:active {
    opacity: 0.9;
    transform: scale(0.98);
}

/* Marca DriftMovi no Header */
.brand-title-text {
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--brand-cyan) 0%, var(--brand-magenta) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    line-height: 1;
}

/* Contador de Locações nos Cards da Frota */
.cart-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 3px;
    margin-bottom: 2px;
}

.cart-counter-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(0, 210, 255, 0.08);
    border: 1px solid rgba(0, 210, 255, 0.25);
    color: var(--brand-cyan);
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.cart-counter-pill svg {
    width: 12px;
    height: 12px;
    stroke-width: 2.2;
}

.cart-rentals-stat-box {
    margin-left: auto;
    padding-left: 12px;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
}

.rentals-stat-number {
    font-size: 1.35rem;
    font-weight: 900;
    color: var(--brand-magenta);
    line-height: 1;
}

.rentals-stat-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.2px;
    margin-top: 2px;
}

@media (max-width: 480px) {
    .cart-rentals-stat-box {
        display: none;
    }
}

/* ============================================================== */
/* TELA DE LOGIN                                                  */
/* ============================================================== */
.login-view-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top, #1E293B 0%, #0F172B 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 9999;
    overflow-y: auto;
}

.login-card {
    background: #FFFFFF;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 420px;
    padding: 30px 24px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.login-brand-header {
    text-align: center;
    margin-bottom: 24px;
}

.login-logo-img {
    height: 64px;
    width: auto;
    object-fit: contain;
    border-radius: 12px;
    margin-bottom: 8px;
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.2);
}

.login-app-title {
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--brand-cyan) 0%, var(--brand-magenta) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
    margin-bottom: 4px;
}

.login-app-subtitle {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon .input-icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
}

.input-with-icon .form-control {
    padding-left: 42px;
    padding-right: 44px;
}

.btn-toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
}

.btn-toggle-password svg {
    width: 18px;
    height: 18px;
}

.login-options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 14px 0 18px 0;
    font-size: 0.82rem;
}

.remember-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--dark-text);
    font-weight: 600;
}

.remember-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--brand-cyan);
    cursor: pointer;
}

.link-forgot-password {
    color: var(--brand-magenta);
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.2s;
}

.link-forgot-password:hover {
    text-decoration: underline;
}

.btn-login-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1rem;
    padding: 14px;
    box-shadow: 0 4px 16px rgba(0, 210, 255, 0.35);
}

.social-login-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0 16px 0;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.social-login-divider::before,
.social-login-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-subtle);
}

.social-login-divider span {
    padding: 0 10px;
}

.social-login-buttons {
    display: flex;
    gap: 10px;
}

.btn-social {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px;
    background: #F8FAFC;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--dark-text);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-social:hover {
    background: #EDF2F7;
    border-color: #CBD5E1;
}

.btn-social:active {
    transform: scale(0.97);
}

.btn-logout-small {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
}

.btn-logout-small:active {
    background: #EF4444;
    color: #FFFFFF;
}

/* =======================================================
   PAYWALL / ASSINATURA ANUAL CAKTO (R$ 97,00)
   ======================================================= */
.paywall-view-wrapper {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at top, #1E293B 0%, #0F172B 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 99999;
    overflow-y: auto;
}

.paywall-card {
    background: #FFFFFF;
    border-radius: 24px;
    width: 100%;
    max-width: 440px;
    padding: 28px 22px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    text-align: center;
    position: relative;
    border: 2px solid rgba(0, 210, 255, 0.4);
}

.paywall-badge-trial {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(239, 68, 68, 0.12);
    color: #EF4444;
    font-size: 0.76rem;
    font-weight: 800;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
}

.paywall-price-box {
    background: linear-gradient(135deg, rgba(0, 210, 255, 0.08) 0%, rgba(255, 46, 147, 0.08) 100%);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 18px 14px;
    margin: 16px 0;
}

.paywall-price-val {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--dark-text);
    line-height: 1;
}

.paywall-price-period {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 700;
    margin-top: 4px;
}

.paywall-features-list {
    text-align: left;
    margin: 16px 0 22px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.paywall-feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: #334155;
    font-weight: 600;
}

.paywall-feature-item i {
    width: 18px;
    height: 18px;
    color: #10B981;
    flex-shrink: 0;
}

/* =======================================================
   PAINEL DO ADMINISTRADOR (MRR, ARR, CAKTO & USUÁRIOS)
   ======================================================= */
.admin-metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

@media (min-width: 600px) {
    .admin-metrics-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.admin-metric-card {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    padding: 14px 12px;
    border: 1px solid var(--border-subtle);
    text-align: left;
}

.admin-metric-card.highlight {
    background: linear-gradient(135deg, rgba(0, 210, 255, 0.12), rgba(255, 46, 147, 0.08));
    border-color: rgba(0, 210, 255, 0.4);
}

.admin-metric-title {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 4px;
}

.admin-metric-value {
    font-size: 1.35rem;
    font-weight: 900;
    color: var(--dark-text);
}

.admin-metric-sub {
    font-size: 0.7rem;
    color: var(--text-light);
    margin-top: 2px;
}

.admin-webhook-box {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    padding: 14px;
    border: 1px solid var(--border-subtle);
    margin-bottom: 16px;
}

.admin-copy-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #FFFFFF;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    margin-top: 6px;
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--dark-text);
}

.admin-users-table {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 4px;
}

.admin-user-card {
    background: #FFFFFF;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.2s;
}

.admin-user-card:hover {
    border-color: rgba(0, 210, 255, 0.4);
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.admin-user-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.admin-user-info {
    text-align: left;
}

.admin-user-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--dark-text);
}

.admin-user-email {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.admin-user-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.btn-admin-action {
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.72rem;
    font-weight: 700;
    border: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    color: var(--dark-text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s;
}

.btn-admin-action.activate {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
    border-color: rgba(16, 185, 129, 0.3);
}

.btn-admin-action.trial {
    background: rgba(0, 210, 255, 0.1);
    color: #00B4DB;
    border-color: rgba(0, 210, 255, 0.3);
}

.btn-admin-action.block {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
    border-color: rgba(239, 68, 68, 0.3);
}

.btn-admin-action:hover {
    filter: brightness(0.95);
}


