:root {
    --primary-blue: #1E3A8A;
    --secondary-blue: #2563EB;
    --light-blue: #BFDBFE;
    --white: #FFFFFF;
    --gray-light: #F3F4F6;
    --border-radius: 16px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    min-height: 100vh;
}

/* Páginas de Login e Cadastro */
.login-page, .register-page {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
}

.login-container, .register-container {
    max-width: 400px;
    width: 100%;
    padding: 20px;
}

.login-card, .register-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.logo-container {
    margin-bottom: 1rem;
}

.logo-text {
    color: var(--primary-blue);
    font-weight: 700;
    font-size: 1.8rem;
}

/* Dashboard e Painéis */
.app-container {
    max-width: 420px;
    margin: 0 auto;
    background: var(--white);
    min-height: 100vh;
    position: relative;
}

.navbar-app {
    background: var(--primary-blue);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.navbar-brand {
    color: var(--white) !important;
    font-weight: 600;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid #e9ecef;
    padding: 0.5rem 0;
    max-width: 420px;
    margin: 0 auto;
    z-index: 1000;
}

.bottom-nav-item {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
    color: #6c757d;
    text-decoration: none;
    font-size: 0.8rem;
}

.bottom-nav-item.active {
    color: var(--primary-blue);
}

.bottom-nav-icon {
    font-size: 1.5rem;
    margin-bottom: 0.2rem;
}

/* Cards */
.card-app {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
}

.card-header-app {
    background: var(--white);
    border-bottom: 1px solid var(--gray-light);
    font-weight: 600;
    color: var(--primary-blue);
}

/* Botões */
.btn-primary {
    background: var(--secondary-blue);
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--primary-blue);
    transform: translateY(-2px);
}

.btn-floating {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--secondary-blue);
    color: white;
    border: none;
    font-size: 1.5rem;
    box-shadow: var(--shadow);
    z-index: 100;
}

/* Status badges */
.badge-status {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
}

.badge-pendente {
    background: #FEF3C7;
    color: #92400E;
}

.badge-aprovado {
    background: #D1FAE5;
    color: #065F46;
}

.badge-bloqueado {
    background: #FEE2E2;
    color: #991B1B;
}

/* Veículos */
.veiculo-card {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
}

.veiculo-image {
    height: 120px;
    background: var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

.veiculo-icon {
    font-size: 2rem;
}

/* Formulários */
.form-control {
    border-radius: 12px;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
}

.form-control:focus {
    border-color: var(--light-blue);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

/* QR Code */
.qr-code-container {
    text-align: center;
    padding: 2rem;
}

.qr-code {
    max-width: 200px;
    margin: 0 auto 1rem;
}

/* Animações */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsividade */
@media (max-width: 420px) {
    .app-container {
        border-radius: 0;
    }
    
    .login-container, .register-container {
        padding: 1rem;
    }
    
    .login-card, .register-card {
        padding: 1.5rem;
    }
}

/* Página Inicial */
.index-page {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
}

.welcome-container {
    max-width: 400px;
    width: 100%;
    padding: 20px;
}

.welcome-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.welcome-buttons {
    margin: 2rem 0;
}

/* Tabelas responsivas */
.table-responsive {
    border-radius: var(--border-radius);
    overflow: hidden;
}

.table {
    margin-bottom: 0;
}

.table th {
    background: var(--gray-light);
    border: none;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 1rem 0.75rem;
}

.table td {
    padding: 1rem 0.75rem;
    vertical-align: middle;
    border-color: var(--gray-light);
}

/* Modo Escuro (Opcional) */
.dark-mode {
    background: #1a1a1a;
    color: #ffffff;
}

.dark-mode .app-container {
    background: #2d2d2d;
}

.dark-mode .card-app {
    background: #3d3d3d;
    color: #ffffff;
}

.dark-mode .navbar-app {
    background: #1E3A8A;
}

.dark-mode .bottom-nav {
    background: #3d3d3d;
    border-color: #4d4d4d;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Badges adicionais */
.badge.bg-secondary {
    background: #6c757d !important;
}

.badge.bg-dark {
    background: #343a40 !important;
}

/* Modal personalizado */
.modal-content {
    border-radius: var(--border-radius);
    border: none;
}

.modal-header {
    background: var(--gray-light);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

/* Form validação visual */
.is-invalid {
    border-color: #dc3545 !important;
}

.is-valid {
    border-color: #198754 !important;
}

.invalid-feedback {
    display: block;
    font-size: 0.875rem;
    color: #dc3545;
}

/* Responsividade para tabelas */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem 0.25rem;
    }
    
    .btn-group-sm .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* Botões de ação */
.btn-group-sm .btn {
    border-radius: 6px;
    margin: 0 2px;
}

/* Estados hover para botões de ação */
.btn-success:hover {
    background: #198754;
    transform: scale(1.05);
}

.btn-danger:hover {
    background: #dc3545;
    transform: scale(1.05);
}

.btn-warning:hover {
    background: #ffc107;
    transform: scale(1.05);
}

/* Animações para feedback visual */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.btn:active {
    animation: pulse 0.2s ease-in-out;
}

/* Loading states */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin: -8px 0 0 -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-right-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}



/* Botões de ação */
.btn-group-sm .btn {
    border-radius: 6px;
    margin: 0 1px;
}

.btn-outline-warning {
    color: #ffc107;
    border-color: #ffc107;
}

.btn-outline-warning:hover {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #000;
}

.btn-outline-danger {
    color: #dc3545;
    border-color: #dc3545;
}

.btn-outline-danger:hover {
    background-color: #dc3545;
    border-color: #dc3545;
    color: #fff;
}

/* Current photo styles */
.current-photo {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 10px;
    background: #f8f9fa;
}

/* Flex wrap para botões em mobile */
.flex-wrap {
    flex-wrap: wrap;
}

/* Modal styles */
.modal-content {
    border-radius: var(--border-radius);
    border: none;
}

.modal-header {
    background: var(--gray-light);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}


/* Responsividade para tabelas */
@media (max-width: 767.98px) {
    .table-responsive {
        border: none;
    }
    
    .user-row {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #dee2e6;
        border-radius: var(--border-radius);
        padding: 1rem;
        background: var(--white);
    }
    
    .user-row td {
        display: block;
        border: none;
        padding: 0.25rem 0;
    }
    
    .user-info {
        flex: 1;
    }
    
    .actions-container {
        margin-top: 0.5rem;
        text-align: center;
    }
    
    .dropdown-menu {
        min-width: 200px;
    }
    
    /* Estatísticas em mobile */
    .row .col-6 {
        margin-bottom: 0.5rem;
    }
    
    .card-app.text-center .h5 {
        font-size: 1.1rem;
    }
}

/* Melhorias para tablets */
@media (max-width: 991.98px) and (min-width: 768px) {
    .btn-group-sm .btn {
        padding: 0.25rem 0.4rem;
        font-size: 0.75rem;
    }
    
    .table td, .table th {
        padding: 0.5rem;
    }
}

/* Ações dropdown mobile */
.dropdown-menu {
    border-radius: var(--border-radius);
    border: 1px solid #dee2e6;
    box-shadow: var(--shadow);
}

.dropdown-item {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.dropdown-item:hover {
    background-color: var(--light-blue);
    color: var(--primary-blue);
}

/* Melhorias gerais de usabilidade */
.btn-group-sm .btn {
    border-radius: 6px;
    margin: 0 1px;
}

.actions-container {
    display: flex;
    justify-content: center;
}

@media (min-width: 768px) {
    .actions-container {
        justify-content: flex-start;
    }
}

/* Estados hover para botões */
.btn:hover {
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

/* Loading states */
.btn:active {
    transform: translateY(0);
}

/* Melhorar legibilidade em mobile */
@media (max-width: 767.98px) {
    .app-container {
        font-size: 0.9rem;
    }
    
    .navbar-brand {
        font-size: 1rem;
    }
    
    .card-header-app {
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
    }
}

/* Tooltips para botões de ação */
.btn[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
}

.btn[title] {
    position: relative;
}

/* Ajustes para formulários em mobile */
@media (max-width: 767.98px) {
    .form-select, .form-control {
        font-size: 16px; /* Prevenir zoom no iOS */
    }
    
    .row.g-2 {
        margin-bottom: 0.5rem;
    }
}

/* Badges responsivas */
.badge {
    font-size: 0.7em;
}

@media (max-width: 767.98px) {
    .badge {
        font-size: 0.65em;
    }
}

/* Avatar placeholder */
.avatar-placeholder {
    flex-shrink: 0;
}

/* Estados de foco para acessibilidade */
.btn:focus, .form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
    border-color: var(--light-blue);
}





/* Estilos específicos para edição de usuários */
.form-text ul {
    padding-left: 1rem;
    margin-bottom: 0;
}

.form-text li {
    margin-bottom: 0.25rem;
}

/* Badges maiores para informações */
.badge.fs-6 {
    font-size: 0.9em !important;
    padding: 0.5em 0.75em;
}

/* Estados do formulário */
.is-invalid {
    border-color: #dc3545 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 3.6.4.4.4-.4'/%3e%3cpath d='M6 7v1'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.is-valid {
    border-color: #198754 !important;
}

/* Modal de confirmação */
.modal-content {
    border-radius: var(--border-radius);
    border: none;
}

.modal-header {
    background: var(--gray-light);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

/* Responsividade para formulários */
@media (max-width: 767.98px) {
    .card-body .row {
        margin-bottom: -0.5rem;
    }
    
    .card-body .mb-3 {
        margin-bottom: 1rem !important;
    }
    
    .d-grid.gap-2 {
        gap: 0.5rem !important;
    }
}

/* Melhorias para tablets */
@media (max-width: 991.98px) and (min-width: 768px) {
    .col-lg-8 {
        margin-bottom: 1rem;
    }
}

/* Estados de hover para cards */
.card-app:hover {
    transform: translateY(-2px);
    transition: transform 0.2s ease;
}

/* Loading states */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Tooltips informativos */
[data-bs-toggle="tooltip"] {
    cursor: help;
}


/* veiculos */

/* Cards mobile melhorados para veículos */
.veiculo-card-mobile {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    margin: 0.75rem;
    padding: 1rem;
    background: var(--white);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.veiculo-card-mobile:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

.veiculo-header {
    margin-bottom: 0.5rem;
}

.veiculo-details {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 0.75rem;
    margin: 0.5rem 0;
}

.veiculo-actions {
    border-top: 1px solid #e9ecef;
    padding-top: 0.75rem;
}

/* Dropdown compacto para mobile */
.dropdown .btn-sm {
    padding: 0.2rem 0.4rem;
    font-size: 0.8rem;
    min-width: 32px;
}

.dropdown-menu {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.dropdown-item {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dropdown-item:hover {
    background-color: var(--light-blue);
    color: var(--primary-blue);
}

/* Botões de ação principais */
.veiculo-actions .btn {
    border-radius: 8px;
    padding: 0.4rem 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
}

.veiculo-actions .btn-sm {
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Melhorias para informações */
.veiculo-header .badge {
    font-size: 0.65em;
    padding: 0.3em 0.6em;
}

.veiculo-details .row {
    margin: 0 -0.25rem;
}

.veiculo-details .col-6 {
    padding: 0 0.25rem;
}

/* Estados ativos */
.btn:active {
    transform: scale(0.95);
}

/* Ajustes para telas muito pequenas */
@media (max-width: 375px) {
    .veiculo-card-mobile {
        margin: 0.5rem;
        padding: 0.75rem;
    }
    
    .veiculo-actions .btn {
        font-size: 0.75rem;
        padding: 0.35rem 0.4rem;
    }
    
    .veiculo-header .flex-fill {
        min-width: 0;
    }
}

/* Melhorias para tablets pequenos */
@media (max-width: 991.98px) and (min-width: 768px) {
    .veiculo-card-mobile {
        margin: 1rem;
        padding: 1.25rem;
    }
}

/* Garantir que as imagens não quebrem o layout */
.veiculo-header img {
    flex-shrink: 0;
}

/* Text overflow handling */
.veiculo-header strong {
    word-break: break-word;
    line-height: 1.2;
    font-size: 0.95rem;
}

.veiculo-header .text-muted {
    font-size: 0.8rem;
    line-height: 1.3;
}

/* Espaçamento consistente */
.veiculo-header .d-flex.gap-1 {
    gap: 0.25rem !important;
}

.veiculo-actions .d-flex.gap-1 {
    gap: 0.5rem !important;
}

/* Melhorias para a tabela em desktop */
@media (min-width: 768px) {
    .table-responsive {
        border-radius: var(--border-radius);
        overflow: hidden;
    }
    
    .table th {
        background: var(--gray-light);
        border: none;
        font-weight: 600;
        padding: 1rem 0.75rem;
    }
    
    .table td {
        padding: 1rem 0.75rem;
        vertical-align: middle;
    }
}

/* Ajustes para filtros em mobile */
@media (max-width: 767.98px) {
    .card-body .row.g-2 {
        margin-bottom: -0.5rem;
    }
    
    .card-body .mb-2 {
        margin-bottom: 0.5rem !important;
    }
    
    .d-flex.gap-1 {
        gap: 0.5rem !important;
    }
}

/* Estatísticas em mobile */
@media (max-width: 767.98px) {
    .row.mb-4 .col-4 {
        margin-bottom: 0.5rem;
    }
    
    .card-app.text-center .h5 {
        font-size: 1.1rem;
    }
}



