/* ========== GLOBAL: impede cursor de texto em elementos não editáveis ========== */
h1, h2, h3, h4, h5, h6,
label, span, p, small, strong, em,
.header, .screen-header, .header-tokens,
.menu-card, .card, .badge, .tab, .btn,
[class*="title"], [class*="header"], [class*="label"] {
    user-select: none;
    cursor: default;
}
a, button, [onclick], .btn, .menu-card {
    cursor: pointer;
}
input, textarea, select {
    cursor: text;
    user-select: text;
}

/* TruckExpense Pro - Estilos ESTÁVEL */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f5f7fa;
    color: #1f2937;
    overflow-x: hidden;
}

/* ========== LOADING ========== */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.loading-overlay.show {
    display: flex;
}

.spinner {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: conic-gradient(
        #3b82f6 0deg,
        #8b5cf6 90deg,
        #ec4899 180deg,
        #3b82f6 360deg
    );
    animation: spin-gradient 2s linear infinite;
    position: relative;
}

.spinner::before {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: #1a1a2e;
}

#loading-text {
    color: #fff;
    margin-top: 20px;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.5px;
    animation: pulse-text 1.5s ease-in-out infinite;
}

/* ========== TOAST ========== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9998;
}

.toast {
    background: #1f2937;
    color: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 250px;
    opacity: 1;
    transition: opacity 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.toast-success { background: #10b981; }
.toast-error { background: #ef4444; }
.toast-warning { background: #f59e0b; }
.toast-info { background: #3b82f6; }

/* ========== TELAS ========== */
.screen {
    display: none;
    flex-direction: column;
    min-height: 100vh;
}

.screen.active {
    display: flex !important;
}

/* ========== HEADER ========== */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header h1 {
    flex: 1;
    font-size: 20px;
    font-weight: 600;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 14px;
}

/* ========== BOTÃO VOLTAR E SYNC ========== */
.btn-back, .btn-sync {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    padding: 10px 20px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-back:hover, .btn-sync:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-back i, .btn-sync i {
    font-size: 18px;
}

/* ========== CONTENT ========== */
.content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.footer-bar {
    padding: 15px;
    background: #fff;
    border-top: 1px solid #e5e7eb;
}

/* ========== LOGIN ========== */
.login-container {
    max-width: 500px;
    margin: 50px auto;
    padding: 20px;
}

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

.login-header i {
    font-size: 80px;
    color: #667eea;
    margin-bottom: 20px;
}

.login-header h1 {
    font-size: 32px;
    margin-bottom: 10px;
    color: #1f2937;
}

.login-header p {
    color: #6b7280;
    font-size: 16px;
}

.perfil-grid {
    display: grid;
    gap: 20px;
}

.perfil-card {
    background: #fff;
    border: 3px solid transparent;
    border-radius: 16px;
    padding: 30px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

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

.perfil-card i {
    font-size: 48px;
}

.perfil-card h3 {
    font-size: 20px;
    margin-bottom: 5px;
}

.perfil-card p {
    color: #6b7280;
    font-size: 14px;
}

.perfil-admin { border-color: #ef4444; }
.perfil-admin:hover { background: #fef2f2; }
.perfil-admin i { color: #ef4444; }

.perfil-embarcador { border-color: #3b82f6; }
.perfil-embarcador:hover { background: #eff6ff; }
.perfil-embarcador i { color: #3b82f6; }

.perfil-motorista { border-color: #10b981; }
.perfil-motorista:hover { background: #f0fdf4; }
.perfil-motorista i { color: #10b981; }

/* ========== MENU GRID ========== */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.menu-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

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

.menu-card i {
    font-size: 56px;
    color: #667eea;
    margin-bottom: 15px;
}

.menu-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.menu-card p {
    color: #6b7280;
    font-size: 14px;
}

/* ========== CARDS ========== */
.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2, .card-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.info-row:last-child {
    border-bottom: none;
}

.info-row .label {
    font-weight: 600;
    color: #6b7280;
}

.info-row .value {
    color: #1f2937;
}

/* ========== VIAGENS ========== */
.viagem-card, .item-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s;
}

.viagem-card:hover, .item-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.viagem-header, .item-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.viagem-header h3, .item-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.viagem-body, .item-body {
    padding: 15px 20px;
}

.viagem-body p, .item-body p {
    margin: 8px 0;
    color: #6b7280;
}

.viagem-body p i {
    width: 20px;
    color: #667eea;
}

/* ========== EMPTY STATE ========== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
}

.empty-state i {
    font-size: 80px;
    margin-bottom: 20px;
}

/* ========== BADGES ========== */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.badge-primary { background: #dbeafe; color: #1e40af; }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-error { background: #fee2e2; color: #991b1b; }

/* ========== BUTTONS ========== */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-primary { background: #667eea; color: #fff; }
.btn-primary:hover { background: #5568d3; }

.btn-success { background: #10b981; color: #fff; }
.btn-success:hover { background: #059669; }

.btn-secondary { background: #6b7280; color: #fff; }
.btn-secondary:hover { background: #4b5563; }

.btn-block { width: 100%; }

.btn-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ========== FORMS ========== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
}

.form-group-adm {
    display: flex;
    justify-content: start;
    align-items: center;
    padding-top: 1rem;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
}

/* ========== MODAL ========== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9997;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 28px;
    color: #6b7280;
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    padding: 20px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .perfil-card {
        flex-direction: column;
        text-align: center;
    }
}

/* INPUT COM ÍCONE DO LADO DIREITO (WhatsApp) */
.form-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

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

.input-with-icon-right input {
    width: 100%;
    padding-right: 35px;
    box-sizing: border-box;
}

.input-with-icon-right .icon {
    position: absolute;
    right: 10px;
    pointer-events: auto;
    font-size: 18px;
    color: #25D366;
    cursor: pointer;
}

/* ========== INPUT COM BOTÃO (CEP) ========== */
.input-with-btn {
    display: flex;
    align-items: center;
}

.input-with-btn input {
    flex: 1;
    margin-right: 5px;
}

.input-with-btn button {
    padding: 0.4em 0.8em;
    border-radius: 8px;
    border: none;
    background-color: #667eea;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
}

.input-with-btn button:hover {
    background-color: #5568d3;
}

/* ========== STATUS DE VALIDAÇÃO ========== */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.status-processando {
    background: #f59e0b;
}

.status-aprovado {
    background: #10b981;
}

.status-reprovado {
    background: #ef4444;
}

.status-processando i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes spin-gradient {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse-text {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* ========== LOGIN + RESET SENHA ========== */
#screen-login,
#screen-resetSenha {
    display: none !important;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    height: 100vh;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #f4f6fb 0%, #e5ecf7 100%);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    padding: 20px;
}

#screen-login.active,
#screen-resetSenha.active {
    display: flex !important;
}

#screen-login .login-container,
#screen-resetSenha > div {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    padding: 40px 35px;
    border-radius: 18px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.4s ease-out;
}

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

#screen-login .form-control,
#screen-resetSenha .form-control {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fafbfc;
}

#screen-login .form-control:focus,
#screen-resetSenha .form-control:focus {
    outline: none;
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#screen-login .btn,
#screen-resetSenha .btn {
    width: 100%;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#screen-login .btn-primary,
#screen-resetSenha .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

#screen-login .btn-primary:hover,
#screen-resetSenha .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

#screen-login label,
#screen-resetSenha label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

#reset-erro,
#reset-sucesso,
#login-erro {
    padding: 12px;
    border-radius: 6px;
    margin: 15px 0;
    font-size: 14px;
    font-weight: 500;
    display: none;
}

#reset-erro,
#login-erro {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #dc2626;
}

#reset-sucesso {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

#screen-login a,
#screen-resetSenha a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

#screen-login a:hover,
#screen-resetSenha a:hover {
    color: #5568d3;
    text-decoration: underline;
}

@media (max-width: 600px) {
    #screen-login,
    #screen-resetSenha {
        padding: 15px;
    }
    
    #screen-login .login-container,
    #screen-resetSenha > div {
        padding: 30px 20px;
        border-radius: 12px;
        max-width: 100%;
    }
    
    #screen-login .form-control,
    #screen-resetSenha .form-control {
        font-size: 16px;
    }
}

/* ========== MODAL OVERLAY SYSTEM ========== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
    animation: fadeIn 0.2s ease-in;
}

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

.modal-box {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
    position: relative;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ========== BUTTON STATES ========== */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed !important;
}

button.loading {
    position: relative;
    color: transparent !important;
}

button.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

/* ========== INPUT STATES ========== */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #4f46e5 !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

input.error,
select.error,
textarea.error {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

input.success,
select.success,
textarea.success {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* ========== FORM VALIDATION MESSAGES ========== */
.form-error {
    color: #dc2626;
    font-size: 12px;
    margin-top: 4px;
    display: none;
}

.form-error.show {
    display: block;
    animation: fadeIn 0.2s ease-in;
}

.form-success {
    color: #10b981;
    font-size: 12px;
    margin-top: 4px;
    display: none;
}

.form-success.show {
    display: block;
    animation: fadeIn 0.2s ease-in;
}

/* ========== LOADING SPINNER ========== */
.spinner-inline {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(79, 70, 229, 0.2);
    border-radius: 50%;
    border-top-color: #4f46e5;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

/* ========== TOAST NOTIFICATIONS ========== */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #1f2937;
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 9999;
    animation: slideInRight 0.3s ease-out;
    max-width: 400px;
}

.toast.success {
    background: #10b981;
}

.toast.error {
    background: #dc2626;
}

.toast.warning {
    background: #f59e0b;
}

.toast.info {
    background: #3b82f6;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ========== ACCESSIBILITY ========== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ========== RESPONSIVE IMPROVEMENTS ========== */
@media (max-width: 768px) {
    .modal-box {
        width: 95%;
        padding: 20px;
        max-width: none;
    }
    
    .toast {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* ========== PRINT STYLES ========== */
@media print {
    .modal-overlay,
    .toast,
    button,
    .btn-back,
    .btn-sync {
        display: none !important;
    }
}

/* ========== HIGH CONTRAST MODE ========== */
@media (prefers-contrast: high) {
    button,
    input,
    select,
    textarea {
        border-width: 2px !important;
    }
}

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===================================================================
   📋 MODAL DE DETALHES - PARCELAS A PAGAR
   =================================================================== */

.btn-acao-detalhes {
    background: #3b82f6 !important;
    color: white !important;
}

.btn-acao-detalhes:hover {
    background: #2563eb !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.modal-detalhes-box {
    background: #fff;
    border-radius: 12px;
    width: 95%;
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

.modal-header-detalhes {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 2px solid #e5e7eb;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

.modal-header-detalhes h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}

.btn-close-detalhes {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-close-detalhes:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.detalhes-section {
    padding: 20px 30px;
    border-bottom: 1px solid #e5e7eb;
}

.detalhes-section:last-of-type {
    border-bottom: none;
}

.detalhes-section h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #374151;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detalhes-section h3 i {
    color: #667eea;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-item label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
}

.info-item span {
    font-size: 14px;
    color: #111827;
}

.info-item-full {
    margin-top: 15px;
}

.obs-text {
    background: #f3f4f6;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    color: #374151;
    line-height: 1.5;
    margin: 8px 0 0 0;
}

.resumo-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.resumo-card {
    background: #f9fafb;
    padding: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 4px solid #667eea;
}

.resumo-card i {
    font-size: 24px;
    color: #667eea;
}

.resumo-card.ved-veiculo {
    border-left-color: #3b82f6;
}

.resumo-card.ved-veiculo i {
    color: #3b82f6;
}

.resumo-card.ved-estoque {
    border-left-color: #10b981;
}

.resumo-card.ved-estoque i {
    color: #10b981;
}

.resumo-card.ved-diversos {
    border-left-color: #f59e0b;
}

.resumo-card.ved-diversos i {
    color: #f59e0b;
}

.resumo-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.resumo-label {
    font-size: 11px;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
}

.resumo-valor {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
}

.tabela-itens-wrapper {
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.tabela-itens {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.tabela-itens thead {
    background: #f9fafb;
    position: sticky;
    top: 0;
    z-index: 10;
}

.tabela-itens th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
    font-size: 12px;
    text-transform: uppercase;
}

.tabela-itens td {
    padding: 12px;
    border-bottom: 1px solid #f3f4f6;
}

.tabela-itens tbody tr:hover {
    background: #f9fafb;
}

.tabela-itens tfoot {
    background: #f9fafb;
    position: sticky;
    bottom: 0;
}

.tabela-itens tfoot td {
    padding: 15px 12px;
    border-top: 2px solid #e5e7eb;
    font-size: 14px;
}

.text-right {
    text-align: right !important;
}

.ved-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.ved-badge.ved-veiculo {
    background: #dbeafe;
    color: #1e40af;
}

.ved-badge.ved-estoque {
    background: #d1fae5;
    color: #065f46;
}

.ved-badge.ved-diversos {
    background: #fef3c7;
    color: #92400e;
}

.descricao-col {
    max-width: 300px;
}

.item-descricao {
    font-weight: 500;
    color: #111827;
    margin-bottom: 4px;
}

.item-codigo,
.item-obs,
.km-info {
    display: block;
    color: #6b7280;
    font-size: 11px;
    margin-top: 2px;
}

.parcelas-lista {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.parcela-item {
    background: #f9fafb;
    padding: 12px;
    border-radius: 8px;
    border-left: 4px solid #9ca3af;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.parcela-numero {
    font-weight: 600;
    font-size: 14px;
    color: #111827;
}

.parcela-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: #6b7280;
}

.parcela-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.parcela-status.status-pago {
    background: #d1fae5;
    color: #065f46;
}

.parcela-status.status-liberado {
    background: #dbeafe;
    color: #1e40af;
}

.parcela-status.status-bloqueado {
    background: #fee2e2;
    color: #991b1b;
}

.parcela-status.status-pendente {
    background: #fef3c7;
    color: #92400e;
}

.modal-footer-detalhes {
    padding: 20px 30px;
    border-top: 2px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .modal-detalhes-box {
        width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .resumo-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tabela-itens {
        font-size: 11px;
    }
    
    .tabela-itens th,
    .tabela-itens td {
        padding: 8px 6px;
    }
}

/* PRINT STYLES */
@media print {
    .modal-overlay {
        background: white !important;
    }
    
    .modal-header-detalhes,
    .btn-close-detalhes,
    .modal-footer-detalhes {
        display: none !important;
    }
    
    .modal-detalhes-box {
        box-shadow: none !important;
        max-height: none !important;
    }
    
    .tabela-itens-wrapper {
        max-height: none !important;
        overflow: visible !important;
    }
    
    .tabela-itens thead {
        position: static !important;
    }
}
/* ===================================================================
   📱 MELHORIAS MOBILE - PARCELAS A PAGAR
   ADICIONE NO FINAL DO ARQUIVO styles.css
   =================================================================== */

/* Loading Spinner Animado */
.spinner-loading {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spinLoader 0.8s linear infinite;
}

@keyframes spinLoader {
    to { transform: rotate(360deg); }
}

/* Toast Animations */
@keyframes slideUpBounce {
    0% {
        transform: translateY(100px);
        opacity: 0;
    }
    70% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideDownFade {
    to {
        transform: translateY(50px);
        opacity: 0;
    }
}

/* ===================================================================
   📱 LAYOUT RESPONSIVO MOBILE - LISTAGEM
   =================================================================== */

@media (max-width: 768px) {
    /* Cards gerados pelo JS — suprimir estilos antigos de tabela-para-card */

    /* Esconder thead nas tabelas com cards JS */
    #parcelas-tbody ~ * thead,
    table:has(#parcelas-tbody) thead,
    table:has(#tokens-list) thead {
        display: none !important;
    }

    /* Parcelas */
    #parcelas-tbody tr {
        display: block !important;
        background: transparent !important;
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
        margin: 0 !important;
    }

    #parcelas-tbody td {
        display: block !important;
        padding: 0 !important;
        border: none !important;
        width: 100% !important;
    }

    /* Tokens */
    #tokens-list tr {
        display: block !important;
        background: transparent !important;
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
        margin: 0 !important;
    }

    #tokens-list td {
        display: block !important;
        padding: 0 !important;
        border: none !important;
        width: 100% !important;
    }

    /* Suprimir todos os ::before */
    #parcelas-tbody td::before,
    #parcelas-tbody td:nth-child(n)::before,
    #tokens-list td::before,
    #tokens-list td:nth-child(n)::before {
        content: none !important;
        display: none !important;
    }

    /* Toast mobile */
    .toast-parcelas-modern {
        left: 10px !important;
        right: 10px !important;
        bottom: 10px !important;
        max-width: none !important;
        font-size: 14px !important;
        padding: 16px 20px !important;
    }
}

/* ===================================================================
   📱 MODAL DE DETALHES MOBILE
   =================================================================== */

@media (max-width: 768px) {
    .modal-overlay {
        padding: 0 !important;
    }
    
    .modal-detalhes-box {
        width: 100% !important;
        max-width: 100% !important;
        height: 100vh !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        margin: 0 !important;
    }
    
    .modal-header-detalhes {
        position: sticky;
        top: 0;
        z-index: 100;
        padding: 16px 20px !important;
    }
    
    .modal-header-detalhes h2 {
        font-size: 18px !important;
    }
    
    .btn-close-detalhes {
        width: 32px !important;
        height: 32px !important;
        font-size: 16px !important;
    }
    
    .detalhes-section {
        padding: 16px 20px !important;
    }
    
    .detalhes-section h3 {
        font-size: 14px !important;
        margin-bottom: 12px !important;
    }
    
    .info-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    
    .info-item label {
        font-size: 11px !important;
    }
    
    .info-item span {
        font-size: 13px !important;
    }
    
    .resumo-cards {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    
    .resumo-card {
        padding: 12px !important;
        flex-direction: column;
        text-align: center;
        gap: 8px !important;
    }
    
    .resumo-card i {
        font-size: 20px !important;
    }
    
    .resumo-valor {
        font-size: 18px !important;
    }
    
    .resumo-label {
        font-size: 10px !important;
    }
    
    /* Tabela de itens mobile - scroll horizontal */
    .tabela-itens-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -20px;
        padding: 0 20px;
    }
    
    .tabela-itens {
        font-size: 11px !important;
        min-width: 650px;
    }
    
    .tabela-itens th,
    .tabela-itens td {
        padding: 8px 6px !important;
        font-size: 11px !important;
    }
    
    .ved-badge {
        font-size: 9px !important;
        padding: 3px 8px !important;
    }
    
    .item-descricao {
        font-size: 12px !important;
    }
    
    .item-codigo,
    .item-obs,
    .km-info {
        font-size: 10px !important;
    }
    
    /* Parcelas relacionadas */
    .parcelas-lista {
        grid-template-columns: 1fr !important;
    }
    
    .parcela-item {
        padding: 10px !important;
    }
    
    .parcela-numero {
        font-size: 13px !important;
    }
    
    .parcela-info {
        font-size: 11px !important;
    }
    
    .parcela-status {
        font-size: 10px !important;
        padding: 3px 8px !important;
    }
    
    /* Footer mobile - sticky */
    .modal-footer-detalhes {
        position: sticky;
        bottom: 0;
        background: white;
        padding: 12px 16px !important;
        flex-direction: column !important;
        gap: 8px !important;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        z-index: 100;
    }
    
    .modal-footer-detalhes button {
        width: 100% !important;
        padding: 12px !important;
        font-size: 14px !important;
        border-radius: 8px !important;
    }
}

/* ===================================================================
   📊 DASHBOARD E FILTROS MOBILE
   =================================================================== */

@media (max-width: 768px) {
    /* Header com botão voltar */
    .screen-header {
        padding: 12px 16px !important;
    }
    
    .screen-header h2 {
        font-size: 18px !important;
    }
    
    /* Dashboard de estatísticas */
    .content > div:first-child > div:first-child {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        margin-bottom: 16px !important;
    }
    
    /* Cards do dashboard menores */
    .content > div:first-child > div:first-child > div {
        padding: 12px !important;
        border-radius: 8px !important;
    }
    
    .content > div:first-child > div:first-child > div > div:first-child {
        font-size: 22px !important;
    }
    
    .content > div:first-child > div:first-child > div > div:last-child {
        font-size: 11px !important;
    }
    
    /* Filtros mobile em coluna */
    .content > div:first-child > div:nth-child(2) {
        flex-direction: column !important;
        gap: 10px !important;
        padding: 12px 16px !important;
    }
    
    .content > div:first-child > div:nth-child(2) select,
    .content > div:first-child > div:nth-child(2) input {
        width: 100% !important;
        font-size: 14px !important;
        padding: 10px !important;
    }
    
    /* Container da tabela */
    .content > div:first-child > div:nth-child(3) {
        padding: 0 16px !important;
    }
    
    /* Mensagem de lista vazia */
    #empty-state {
        padding: 40px 20px !important;
        font-size: 14px !important;
    }
    
    #empty-state i {
        font-size: 60px !important;
    }
}

/* ===================================================================
   ✨ ANIMAÇÕES E TRANSIÇÕES
   =================================================================== */

/* Fade in para cards */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading overlay fade */
#loading-overlay-parcelas {
    animation: fadeInOverlay 0.3s ease-in;
}

@keyframes fadeInOverlay {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Smooth scroll para mobile */
@media (max-width: 768px) {
    * {
        -webkit-overflow-scrolling: touch;
    }
    
    html {
        scroll-behavior: smooth;
    }
}

/* ===================================================================
   🎨 MELHORIAS VISUAIS EXTRAS
   =================================================================== */

/* Badges mais bonitos */
.badge-status,
.badge-liberado {
    font-weight: 700 !important;
    letter-spacing: 0.3px;
}

/* Botões com hover suave */
.btn-acao {
    transition: all 0.2s ease !important;
}

.btn-acao:hover {
    transform: translateY(-1px);
}

.btn-acao:active {
    transform: translateY(0);
}

/* Scroll suave na tabela de itens */
.tabela-itens-wrapper {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

.tabela-itens-wrapper::-webkit-scrollbar {
    height: 6px;
}

.tabela-itens-wrapper::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.tabela-itens-wrapper::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.tabela-itens-wrapper::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ===================================================================
   🔧 AJUSTES FINOS MOBILE
   =================================================================== */

@media (max-width: 768px) {
    /* Aumentar área de toque dos botões */
    button,
    .btn-acao {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Melhorar legibilidade */
    body {
        font-size: 14px;
        line-height: 1.5;
    }
    
    /* Padding da tela */
    .content {
        padding: 12px !important;
    }
    
    /* Remover sombras muito pesadas no mobile */
    .viagem-card,
    .item-card,
    .card {
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    }
}

/* ===================================================================
   🌙 MODO ESCURO (PREPARAÇÃO)
   =================================================================== */

@media (prefers-color-scheme: dark) {
    /* Futuramente: adicionar suporte a dark mode */
    /* #parcelas-tbody tr {
        background: #1f2937;
        border-color: #374151 !important;
    } */
}

/* ===================================================================
   🖨️ PRINT STYLES
   =================================================================== */

@media print {
    #loading-overlay-parcelas,
    .toast-parcelas-modern {
        display: none !important;
    }
}/* ================================================================
   📊 MOVIMENTAÇÃO FINANCEIRA - ESTILOS DO DASHBOARD
   ================================================================ */

/* FILTROS DO DASHBOARD */
.filtros-dashboard {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.select-filtro {
    width: 100%;
    padding: 10px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.select-filtro:focus {
    outline: none;
    border-color: #667eea;
}

.btn-aplicar-filtro {
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
    align-self: flex-end;
}

.btn-aplicar-filtro:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* CARDS DO DASHBOARD */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.dashboard-card {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s;
    border-left: 4px solid;
}

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

.card-total { border-color: #667eea; }
.card-pago { border-color: #10b981; }
.card-pendente { border-color: #f59e0b; }
.card-vencido { border-color: #ef4444; }

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

.card-total .card-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.card-pago .card-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.card-pendente .card-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

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

.card-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.card-label {
    font-size: 14px;
    color: #6b7280;
    font-weight: 600;
}

.card-value {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
}

.card-sub {
    font-size: 12px;
    color: #9ca3af;
}

/* GRÁFICOS */
.graficos-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.grafico-box {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.grafico-full {
    grid-column: 1 / -1;
}

.grafico-titulo {
    margin: 0 0 20px 0;
    color: #1f2937;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

#chart-linha {
    height: 300px !important;
}

/* TABELAS AGRUPADAS */
.tabela-agrupada {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.table-scroll {
    overflow-x: auto;
}

.table-dashboard {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table-dashboard thead {
    background: linear-gradient(135deg, #f5f7fa 0%, #eef2f9 100%);
}

.table-dashboard th {
    padding: 15px;
    text-align: left;
    font-weight: 700;
    color: #667eea;
    border-bottom: 2px solid #e5e7eb;
    white-space: nowrap;
}

.table-dashboard td {
    padding: 15px;
    border-bottom: 1px solid #e5e7eb;
}

.table-dashboard tbody tr:hover {
    background: #f9fafb;
}

/* RESPONSIVIDADE MOBILE */
@media (max-width: 768px) {
    .filtros-dashboard {
        flex-direction: column;
    }
    
    .filtros-dashboard > div {
        width: 100%;
    }
    
    .btn-aplicar-filtro {
        width: 100%;
    }
    
    .dashboard-cards {
        grid-template-columns: 1fr;
    }
    
    .graficos-container {
        grid-template-columns: 1fr;
    }
    
    .card-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .card-value {
        font-size: 20px;
    }
    
    .table-dashboard {
        font-size: 12px;
    }
    
    .table-dashboard th,
    .table-dashboard td {
        padding: 10px 8px;
    }
}

/* ANIMAÇÕES */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dashboard-card {
    animation: slideDown 0.3s ease-out;
}

.grafico-box {
    animation: slideDown 0.4s ease-out;
}

.tabela-agrupada {
    animation: slideDown 0.5s ease-out;
}

/* ========================================
   AUTOCOMPLETE - BUSCA DE PARCELAS
   ======================================== */

.autocomplete-sugestoes {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-top: -1px;
}

.sugestao-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
    transition: all 0.2s ease;
}

.sugestao-item:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.sugestao-item:last-child {
    border-bottom: none;
    border-radius: 0 0 8px 8px;
}

.sugestao-nome {
    font-weight: 600;
    font-size: 14px;
    color: #2c3e50;
    margin-bottom: 4px;
}

.sugestao-cnpj {
    font-size: 12px;
    color: #7f8c8d;
    font-family: 'Courier New', monospace;
}

/* Scroll personalizado para sugestões */
.autocomplete-sugestoes::-webkit-scrollbar {
    width: 6px;
}

.autocomplete-sugestoes::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 0 0 8px 0;
}

.autocomplete-sugestoes::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.autocomplete-sugestoes::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* ========================================
   TOKENS - GERENCIAMENTO DE API
   ======================================== */

.container-tokens {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.card-tokens {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 24px;
    margin-bottom: 20px;
}

.header-tokens {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e5e7eb;
}

.header-tokens h2 {
    margin: 0 0 8px 0;
    color: #1f2937;
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-tokens h2 i {
    color: #3b82f6;
}

.header-tokens p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

/* Formulário */
.form-tokens {
    background: #f9fafb;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 6px;
    color: #374151;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group select {
    background: white;
    cursor: pointer;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
    resize: vertical;
    font-family: inherit;
}

/* Botões */
.btn-gerar {
    width: 100%;
    padding: 12px 24px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-gerar:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-gerar:active {
    transform: translateY(0);
}

.btn-copiar {
    padding: 6px 12px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-copiar:hover {
    background: #059669;
}

.btn-desativar {
    padding: 6px 12px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-desativar:hover {
    background: #dc2626;
}

/* Tabela */
.tabela-tokens-wrapper h3 {
    margin: 0 0 16px 0;
    color: #1f2937;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tabela-tokens {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.tabela-tokens thead {
    background: #f3f4f6;
}

.tabela-tokens th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    font-size: 13px;
    border-bottom: 2px solid #e5e7eb;
}

.tabela-tokens td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 13px;
    color: #1f2937;
}

.tabela-tokens tbody tr:hover {
    background: #f9fafb;
}

/* Token Cell */
.token-cell {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: #3b82f6;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Status Badge */
.status-ativo {
    display: inline-block;
    padding: 4px 12px;
    background: #d1fae5;
    color: #065f46;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-inativo {
    display: inline-block;
    padding: 4px 12px;
    background: #fee2e2;
    color: #991b1b;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* Ações */
.tabela-tokens td:last-child {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Responsivo */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .container-tokens {
        padding: 12px;
    }
    
    .card-tokens {
        padding: 16px;
    }
    
    .tabela-tokens {
        font-size: 11px;
    }
    
    .tabela-tokens th,
    .tabela-tokens td {
        padding: 8px;
    }
    
    .token-cell {
        max-width: 80px;
    }
}