/* ========================================
   LAYOUT RESPONSIVO COMPLETO E LIMPO
   ======================================== */

/* Reset para garantir consistência */
* {
    box-sizing: border-box;
}

/* ========================================
   CONTAINERS E LAYOUT GERAL
   ======================================== */

/* Container principal sempre responsivo */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

@media (min-width: 640px) {
    .container {
        padding: 0 24px;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 32px;
    }
}

/* ========================================
   GRID SYSTEM RESPONSIVO
   ======================================== */

/* Grid base sempre 1 coluna em mobile */
.grid {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr;
}

/* Grid 2 colunas a partir de 640px */
@media (min-width: 640px) {
    .grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid {
        gap: 20px;
    }
}

/* Grid 3 colunas a partir de 768px */
@media (min-width: 768px) {
    .grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .grid {
        gap: 24px;
    }
}

/* Grid 4 colunas a partir de 1024px */
@media (min-width: 1024px) {
    .grid-cols-4 {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .grid {
        gap: 32px;
    }
}

/* EXCEÇÃO: Cards de criptomoedas mantêm scroll horizontal */
.crypto-scroll-container {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 16px;
    padding-bottom: 16px;
}

.crypto-scroll-container::-webkit-scrollbar {
    display: none;
}

.crypto-scroll-container .stat-card {
    flex-shrink: 0 !important;
    width: 256px !important;
    min-width: 256px !important;
    max-width: 256px !important;
}

@media (max-width: 480px) {
    .crypto-scroll-container .stat-card {
        width: 240px !important;
        min-width: 240px !important;
        max-width: 240px !important;
    }
}

/* ========================================
   CARDS E COMPONENTES
   ======================================== */

.dark-card {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

@media (max-width: 640px) {
    .dark-card {
        padding: 16px;
        margin: 8px 0;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .dark-card {
        padding: 18px;
    }
}

/* Cards de estatísticas */
.stat-card {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 215, 0, 0.6);
}

@media (max-width: 640px) {
    .stat-card {
        padding: 16px;
    }
}

/* ========================================
   BOTÕES RESPONSIVOS
   ======================================== */

.btn-primary,
.btn-secondary,
.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    min-height: 48px;
    min-width: 48px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.btn-primary {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1f2937;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: #d1d5db;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.5);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

/* Botões em mobile */
@media (max-width: 640px) {
    .btn-primary,
    .btn-secondary,
    .btn-danger {
        width: 100%;
        margin-bottom: 12px;
        padding: 14px 20px;
        font-size: 16px;
    }
    
    .btn-primary:last-child,
    .btn-secondary:last-child,
    .btn-danger:last-child {
        margin-bottom: 0;
    }
}

/* Botões em grupos */
.btn-group {
    display: flex;
    gap: 12px;
    align-items: center;
}

@media (max-width: 640px) {
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn-primary,
    .btn-group .btn-secondary,
    .btn-group .btn-danger {
        width: 100%;
        margin-bottom: 8px;
    }
}

/* ========================================
   FORMULÁRIOS RESPONSIVOS
   ======================================== */

.dark-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    color: #d1d5db;
    transition: all 0.3s ease;
    min-height: 48px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.dark-input:focus {
    outline: none;
    border-color: rgba(255, 215, 0, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

.dark-input::placeholder {
    color: #9ca3af;
}

/* Labels */
label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #d1d5db;
    margin-bottom: 8px;
}

/* Grupos de formulário */
.form-group {
    margin-bottom: 20px;
}

@media (max-width: 640px) {
    .form-group {
        margin-bottom: 16px;
    }
}

/* ========================================
   HEADERS E TÍTULOS
   ======================================== */

.header-primary,
.header-admin {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
    padding: 20px 0;
    margin-bottom: 32px;
}

@media (max-width: 640px) {
    .header-primary,
    .header-admin {
        padding: 16px 0;
        margin-bottom: 24px;
    }
}

.header-primary h1,
.header-admin h1 {
    font-size: 28px;
    font-weight: 700;
    color: #fbbf24;
    margin: 0;
    text-align: center;
}

@media (max-width: 640px) {
    .header-primary h1,
    .header-admin h1 {
        font-size: 24px;
    }
}

.title-primary {
    font-size: 24px;
    font-weight: 700;
    color: #fbbf24;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
}

@media (max-width: 640px) {
    .title-primary {
        font-size: 20px;
        margin-bottom: 20px;
    }
}

.title-secondary {
    font-size: 18px;
    font-weight: 600;
    color: #d1d5db;
    margin-bottom: 16px;
}

@media (max-width: 640px) {
    .title-secondary {
        font-size: 16px;
        margin-bottom: 12px;
    }
}

/* ========================================
   NAVEGAÇÃO E TABS
   ======================================== */

.tab-navigation {
    display: flex;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tab-button {
    flex: 1;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: #9ca3af;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
}

.tab-button:hover {
    background: rgba(255, 215, 0, 0.1);
    color: #d1d5db;
}

.tab-button.active {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1f2937;
    font-weight: 600;
}

@media (max-width: 640px) {
    .tab-navigation {
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .tab-button {
        flex: 1;
        min-width: calc(50% - 2px);
        padding: 10px 8px;
        font-size: 12px;
    }
    
    .tab-button i {
        font-size: 14px;
    }
}

/* ========================================
   TABELAS RESPONSIVAS
   ======================================== */

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    border: 1px solid rgba(255, 215, 0, 0.1);
}

.dark-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(0, 0, 0, 0.5);
}

.dark-table th,
.dark-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
    color: #d1d5db;
}

.dark-table th {
    background: rgba(0, 0, 0, 0.8);
    font-weight: 600;
    color: #fbbf24;
}

.dark-table tr:hover {
    background: rgba(255, 215, 0, 0.05);
}

@media (max-width: 640px) {
    .dark-table th,
    .dark-table td {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .table-responsive {
        font-size: 14px;
    }
}

/* ========================================
   MODAIS RESPONSIVOS
   ======================================== */

/* Modal de depósito centralizado */
#depositModal .flex.items-center.justify-center {
    align-items: center !important;
    justify-content: center !important;
    min-height: 100vh !important;
    padding: 20px !important;
}

#depositModal .dark-card {
    max-width: 90% !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 24px !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
}

/* Otimização específica do QR Code no modal */
#depositModal #pix-qr-container {
    margin-bottom: 1rem !important;
}

#depositModal #pix-qr-container .dark-card {
    padding: 1rem !important;
    margin-bottom: 0.75rem !important;
}

#depositModal #pix-qr-container #qr-code-image {
    margin-bottom: 0.75rem !important;
}

@media (max-width: 640px) {
    #depositModal .flex.items-center.justify-center {
        padding: 16px !important;
        align-items: center !important;
        justify-content: center !important;
        min-height: 100vh !important;
    }
    
    #depositModal .dark-card {
        max-width: 95% !important;
        padding: 20px !important;
        max-height: 90vh !important;
    }
    
    /* Evitar zoom automático em inputs no mobile */
    input[type="number"], input[type="text"], input[type="email"], input[type="tel"] {
        font-size: 16px !important;
    }
    
    /* Espaçamentos compactos para mobile no QR Code */
    #depositModal #pix-qr-container {
        margin-bottom: 8px !important;
    }
    
    #depositModal #pix-qr-container .dark-card {
        padding: 12px !important;
        margin-bottom: 8px !important;
    }
    
    #depositModal #pix-qr-container #qr-code-image {
        margin-bottom: 8px !important;
    }
    
    #depositModal #pix-qr-container .text-sm {
        margin-bottom: 4px !important;
        line-height: 1.2 !important;
    }
    
    #depositModal #pix-qr-container .text-xs {
        margin-bottom: 4px !important;
        line-height: 1.2 !important;
    }
    
    #depositModal #pix-qr-container .bg-gray-800 {
        margin-top: 4px !important;
        padding: 8px !important;
    }
    
    #depositModal #pix-qr-container .flex.justify-center.space-x-4 {
        margin-top: 8px !important;
    }
    
    /* Modal Simples de PIX - Espaçamentos compactos */
    #simplePixModal .flex.items-center.justify-center.space-x-2 {
        gap: 4px !important;
        margin-top: 4px !important;
    }
    
    #simplePixModal .dark-input {
        padding: 6px 8px !important;
        font-size: 11px !important;
    }
    
    #simplePixModal .btn-primary {
        padding: 6px 8px !important;
        font-size: 11px !important;
    }
    
    #simplePixModal .bg-white {
        padding: 8px !important;
        margin-bottom: 8px !important;
    }
    
    #simplePixModal .text-center p {
        margin-bottom: 4px !important;
        font-size: 11px !important;
    }
}

/* Modal de saque centralizado */
#withdrawalModal .flex.items-center.justify-center {
    align-items: center !important;
    justify-content: center !important;
    min-height: 100vh !important;
    padding: 20px !important;
}

#withdrawalModal .dark-card {
    max-width: 90% !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 24px !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
}

@media (max-width: 640px) {
    #withdrawalModal .flex.items-center.justify-center {
        padding: 16px !important;
        align-items: center !important;
        justify-content: center !important;
        min-height: 100vh !important;
    }
    
    #withdrawalModal .dark-card {
        max-width: 95% !important;
        padding: 20px !important;
        max-height: 90vh !important;
    }
}

/* Modal PIX responsivo */
#simplePixModal .dark-card {
    max-width: 90% !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 20px !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
}

#simplePixModal .flex.items-center.justify-center {
    padding: 16px !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 100vh !important;
}

#simplePixModal .dark-card {
    margin: 0 !important;
    padding: 20px !important;
}

#simplePixModal .dark-card > * {
    margin: 0 !important;
}

#simplePixModal .dark-card > * + * {
    margin-top: 12px !important;
}

/* Espaçamentos equilibrados do modal PIX */
#simplePixModal .dark-card .space-y-4 > * + * {
    margin-top: 8px !important;
}

#simplePixModal .dark-card .space-y-6 > * + * {
    margin-top: 12px !important;
}

#simplePixModal .dark-card .mb-4 {
    margin-bottom: 8px !important;
}

#simplePixModal .dark-card .mb-6 {
    margin-bottom: 12px !important;
}

#simplePixModal .dark-card .mt-4 {
    margin-top: 8px !important;
}

#simplePixModal .dark-card .mt-6 {
    margin-top: 12px !important;
}

#simplePixModal .dark-card p {
    margin: 8px 0 !important;
}

#simplePixModal .dark-card .text-center {
    margin: 8px 0 !important;
}

/* Container do QR Code com espaçamentos normais */
#simplePixQrContainer {
    margin: 8px 0 !important;
    padding: 0 !important;
}

/* Modal Simples de PIX - Espaçamentos compactos para todos os tamanhos */
#simplePixModal .flex.items-center.justify-center.space-x-2 {
    gap: 6px !important;
    margin-top: 6px !important;
}

#simplePixModal .dark-input {
    padding: 8px 10px !important;
    font-size: 12px !important;
}

#simplePixModal .btn-primary {
    padding: 8px 10px !important;
    font-size: 12px !important;
}

#simplePixModal .bg-white {
    padding: 10px !important;
    margin-bottom: 10px !important;
}

#simplePixModal .text-center p {
    margin-bottom: 6px !important;
    font-size: 12px !important;
}

/* QR Code responsivo */
#simplePixQrContainer {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

#simplePixQrContainer > * {
    margin: 0 !important;
    padding: 0 !important;
}

#simplePixQrContainer .bg-white {
    padding: 4px !important;
    border-radius: 8px !important;
    max-width: 100% !important;
}

#simplePixQrContainer #simplePixQrCode {
    max-width: 100% !important;
    height: auto !important;
}

#simplePixQrContainer #simplePixQrCode canvas,
#simplePixQrContainer #simplePixQrCode img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px !important;
}

/* Caixa do código PIX para copiar */
#simplePixCode {
    background: rgba(0, 0, 0, 0.8) !important;
    border: 1px solid rgba(255, 215, 0, 0.3) !important;
    border-radius: 6px !important;
    color: #d1d5db !important;
    font-family: 'Courier New', monospace !important;
    font-size: 12px !important;
    padding: 8px 12px !important;
    width: 100% !important;
    height: 40px !important;
    max-height: 40px !important;
    word-break: break-all !important;
    resize: none !important;
    outline: none !important;
    overflow: hidden !important;
}

#simplePixCode:focus {
    border-color: rgba(255, 215, 0, 0.5) !important;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1) !important;
}

/* Container do código PIX */
#simplePixQrContainer .flex.items-center.justify-center {
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
}

#simplePixQrContainer .flex.items-center.justify-center .flex-1 {
    width: 100% !important;
    margin-bottom: 4px !important;
}

#simplePixQrContainer .flex.items-center.justify-center button {
    width: 100% !important;
    padding: 8px 12px !important;
    font-size: 14px !important;
    height: 40px !important;
    min-height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
}

@media (min-width: 640px) {
    #simplePixQrContainer .flex.items-center.justify-center {
        flex-direction: row !important;
        gap: 8px !important;
    }
    
    #simplePixQrContainer .flex.items-center.justify-center .flex-1 {
        margin-bottom: 0 !important;
    }
    
    #simplePixQrContainer .flex.items-center.justify-center button {
        width: auto !important;
        min-width: 120px !important;
        padding: 8px 16px !important;
        height: 40px !important;
    }
    
    #simplePixCode {
        font-size: 11px !important;
        padding: 8px 12px !important;
        height: 40px !important;
    }
}

@media (min-width: 640px) {
    #simplePixModal .dark-card {
        max-width: 500px !important;
        padding: 24px !important;
    }
}

/* Garantir que popups e modais fiquem escondidos quando têm classe hidden */
.hidden {
    display: none !important;
}

#notification-popup.hidden {
    display: none !important;
}

.modal-content {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 16px;
    padding: 24px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    margin: 20px auto;
}

@media (max-width: 640px) {
    .modal-content {
        width: 95%;
        margin: 16px auto;
        padding: 20px;
        max-height: 95vh;
    }
}

.modal-header {
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #fbbf24;
    margin: 0;
}

@media (max-width: 640px) {
    .modal-header h3 {
        font-size: 18px;
    }
}

.modal-body {
    margin-bottom: 20px;
}

.modal-footer {
    border-top: 1px solid rgba(255, 215, 0, 0.1);
    padding-top: 16px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Botões do modal PIX com mesmo tamanho */
#simplePixModal .flex.justify-end.space-x-4 {
    display: flex !important;
    gap: 12px !important;
    justify-content: space-between !important;
}

#simplePixModal .flex.justify-end.space-x-4 button {
    flex: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 12px 16px !important;
    font-size: 16px !important;
    text-align: center !important;
}

@media (min-width: 640px) {
    #simplePixModal .flex.justify-end.space-x-4 {
        justify-content: flex-end !important;
        gap: 16px !important;
    }
    
    #simplePixModal .flex.justify-end.space-x-4 button {
        flex: none !important;
        width: auto !important;
        min-width: 120px !important;
        padding: 12px 24px !important;
    }
}

@media (max-width: 640px) {
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer .btn-primary,
    .modal-footer .btn-secondary {
        width: 100%;
    }
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 215, 0, 0.1);
    color: #fbbf24;
    font-size: 20px;
}

@media (max-width: 640px) {
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

.icon-primary {
    color: #fbbf24;
}

.p-responsive {
    padding: clamp(8px, 3vw, 24px);
}

.m-responsive {
    margin: clamp(8px, 3vw, 24px);
}

/* Safe area para dispositivos com notch */
.safe-area-top {
    padding-top: env(safe-area-inset-top);
}

.safe-area-bottom {
    padding-bottom: env(safe-area-inset-bottom);
}

.safe-area-left {
    padding-left: env(safe-area-inset-left);
}

.safe-area-right {
    padding-right: env(safe-area-inset-right);
}

/* Classes de visibilidade */
.mobile-only {
    display: block;
}

.desktop-only {
    display: none;
}

@media (min-width: 769px) {
    .mobile-only {
        display: none;
    }
    
    .desktop-only {
        display: block;
    }
}

/* ========================================
   ANIMAÇÕES E TRANSITIONS
   ======================================== */

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

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Hover effects */
.hover-scale:hover {
    transform: scale(1.05);
}

.hover-lift:hover {
    transform: translateY(-2px);
}

/* ========================================
   CORREÇÕES ESPECÍFICAS
   ======================================== */

/* Botões de navegação (tabs) em linha */
nav.flex.flex-wrap {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
}

nav.flex.flex-wrap .tab-button {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    min-width: auto !important;
}

@media (max-width: 640px) {
    nav.flex.flex-wrap {
        gap: 4px !important;
        padding: 0 8px !important;
    }
    
    nav.flex.flex-wrap .tab-button {
        padding: 8px 12px !important;
        font-size: 12px !important;
        min-width: 80px !important;
    }
    
    nav.flex.flex-wrap .tab-button i {
        font-size: 14px !important;
    }
}

/* Botões de compartilhamento em linha */
.flex.flex-wrap.gap-3 {
    flex-wrap: nowrap !important;
    gap: 12px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
}

.flex.flex-wrap.gap-3 button {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    min-width: auto !important;
}

@media (max-width: 640px) {
    .flex.flex-wrap.gap-3 {
        gap: 8px !important;
    }
    
    .flex.flex-wrap.gap-3 button {
        padding: 8px 12px !important;
        font-size: 14px !important;
    }
    
    .flex.flex-wrap.gap-3 button i {
        font-size: 16px !important;
    }
}

/* Link de indicação horizontal */
#referralLink {
    white-space: nowrap !important;
    overflow-x: auto !important;
    display: block !important;
    word-break: normal !important;
    break-all: none !important;
}

/* Container do link de indicação */
.flex.items-center.space-x-4 {
    flex-direction: row !important;
    align-items: center !important;
    gap: 16px !important;
}

@media (max-width: 640px) {
    .flex.items-center.space-x-4 {
        flex-direction: column !important;
        gap: 12px !important;
    }
    
    .flex.items-center.space-x-4 .flex-1 {
        width: 100% !important;
    }
    
    .flex.items-center.space-x-4 button {
        width: 100% !important;
    }
}

/* Garantir que flex containers não quebrem */
.flex {
    display: flex;
}

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

.flex-wrap {
    flex-wrap: wrap;
}

.flex-nowrap {
    flex-wrap: nowrap;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-end {
    justify-content: flex-end;
}

/* Espaçamentos responsivos */
.space-y-4 > * + * {
    margin-top: 16px;
}

.space-y-6 > * + * {
    margin-top: 24px;
}

@media (max-width: 640px) {
    .space-y-4 > * + * {
        margin-top: 12px;
    }
    
    .space-y-6 > * + * {
        margin-top: 16px;
    }
}

/* Gap responsivo */
.gap-4 {
    gap: 16px;
}

.gap-6 {
    gap: 24px;
}

@media (max-width: 640px) {
    .gap-4 {
        gap: 12px;
    }
    
    .gap-6 {
        gap: 16px;
    }
}

/* Padding responsivo */
.p-4 {
    padding: 16px;
}

.p-6 {
    padding: 24px;
}

@media (max-width: 640px) {
    .p-4 {
        padding: 12px;
    }
    
    .p-6 {
        padding: 16px;
    }
}

/* Margin responsivo */
.mb-4 {
    margin-bottom: 16px;
}

.mb-6 {
    margin-bottom: 24px;
}

.mb-8 {
    margin-bottom: 32px;
}

@media (max-width: 640px) {
    .mb-4 {
        margin-bottom: 12px;
    }
    
    .mb-6 {
        margin-bottom: 16px;
    }
    
    .mb-8 {
        margin-bottom: 24px;
    }
}