:root {
    /* ===== CORES PRINCIPAIS (Brand) ===== */
    --primary-color: #001F45;
    /* Azul escuro institucional */
    --secondary-color: #0071A8;
    /* Azul intermediário */
    --accent-color: #00AEEF;
    /* Azul claro / cyan institucional */
    --alert-color: #EC1651;
    /* Rosa/vermelho institucional */
    --warning-color: #FFCA05;
    /* Amarelo institucional */
    --soft-red: #F05B5B;
    /* Vermelho suave */

    /* ===== ESCALA DE CINZA (Baseada em #6D6E71) ===== */
    --gray-700: #6D6E71;
    /* Cinza institucional */
    --gray-600: #8A8B8D;
    --gray-500: #A6A7A9;
    --gray-400: #C2C3C4;
    --gray-300: #D8D9DA;
    --gray-200: #E9EAEB;
    --gray-100: #F4F4F5;

    /* ===== FUNDO E TEXTO ===== */
    --background-color: #F4F4F5;
    --text-color: #001F45;
    /* Azul escuro para textos fortes */
    --text-light: #6D6E71;
    /* Cinza institucional para textos suaves */
    --white: #FFFFFF;

    /* ===== GRADIENTES (Institucionais) ===== */
    --gradient-primary: linear-gradient(135deg, #001F45, #0071A8);
    --gradient-accent: linear-gradient(135deg, #EC1651, #F05B5B);
    --gradient-cyber: linear-gradient(135deg, #001F45, #00AEEF);

    /* ===== EFEITOS ===== */
    --shadow-sm: 0 1px 2px rgba(0, 31, 69, 0.15);
    --shadow-md: 0 2px 6px rgba(0, 31, 69, 0.18);
    --shadow-lg: 0 4px 12px rgba(0, 31, 69, 0.22);

    --transition: all 0.25s ease-in-out;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: var(--background-color);
    margin: 0;
    padding: 0;
    background-size: cover;
    /* Preenche o espaço disponível, ajustando a imagem */
    background-repeat: no-repeat;
    /* Evita que a imagem se repita */
    background-position: center;
}

.login-container,
.register-container {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    width: 90%;
    margin: 2rem auto;
}

.logo-container {
    text-align: center;
    margin-bottom: 2rem;
}

.logo {
    max-width: 150px;
    height: auto;
}

/* Layout — navbar horizontal, conteúdo ocupa tela inteira */
.content-wrapper {
    transition: var(--transition);
    width: 100%;
    /*padding: 1rem;*/
}

.menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 1rem;
}

.menu-toggle:hover {
    background-color: var(--secondary-color);
}

.menu-toggle i {
    font-size: 24px;
    color: var(--white);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 1rem;
}

.user-profile:hover {
    background-color: var(--secondary-color);
}

.user-avatar {
    width: 32px;
    height: 32px;
    background-color: var(--secondary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

.user-name {
    font-size: 14px;
    color: var(--white);
    flex-grow: 1;
}

.user-dropdown {
    position: absolute;
    top: 80px;
    left: 1rem;
    right: 1rem;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    z-index: 1000;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.dropdown-item:hover {
    background-color: var(--gray-100);
}

.dropdown-item i {
    font-size: 16px;
}

.dropdown-divider {
    height: 1px;
    background-color: var(--gray-300);
    margin: 4px 0;
}

.sidebar-title {
    color: #fff;
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
    padding: 0 10px;
}

.nav-group {
    margin-bottom: 30px;
}

.nav-group-title {
    color: #a0aec0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 15px;
    margin-bottom: 10px;
}

.sidebar .logo-container {
    margin-bottom: 3rem;
}

.sidebar a {
    color: var(--white);
    padding: 0.8rem 1rem;
    text-decoration: none;
    display: block;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: var(--transition);
    font-weight: 500;
    opacity: 0.8;
}

.sidebar a:hover {
    background-color: var(--secondary-color);
    color: var(--white);
    opacity: 1;
}

.sidebar a.active {
    background-color: var(--secondary-color);
    color: var(--white);
    opacity: 1;
}

.content {
    /* margin-left: 250px; 
    margin-top: 64px; */
    padding: 14px;
    transition: var(--transition);
}

/* content-wrapper base já definido acima */

.container {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-top: 55px;
}

.search-container {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    max-width: 550px;
    margin: 0 auto 2rem;
    transition: var(--transition);
}

.search-container:hover {
    box-shadow: var(--shadow-md);
}

.search-form .mb-3 {
    margin-bottom: 0.75rem !important;
}

.search-form .form-label {
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.search-form .form-control {
    padding: 0.4rem 0.75rem;
    font-size: 0.95rem;
}

.search-form .btn {
    margin-top: 0.5rem;
    padding: 0.4rem 1.5rem;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: var(--transition);
    font-weight: 500;
    letter-spacing: 0.25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    background-color: #1557b0;
    border-color: #1557b0;
    box-shadow: var(--shadow-sm);
}

.btn-primary:active {
    background-color: #174ea6;
    border-color: #174ea6;
    box-shadow: none;
}

.form-control {
    border-radius: 8px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    background-color: var(--white);
    color: var(--text-color);
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
    outline: none;
}

.form-control::placeholder {
    color: var(--gray-500);
}

.alert {
    border-radius: 8px;
    margin-bottom: 1rem;
    border: none;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert i {
    font-size: 1.25rem;
}

.alert-success {
    background-color: #e6f4ea;
    color: #1e7b34;
}

.alert-danger {
    background-color: #fce8e6;
    color: #c5221f;
}

.alert-warning {
    background-color: #fef7e0;
    color: #b06000;
}

.alert-info {
    background-color: #e8f0fe;
    color: #1967d2;
}

.img-preview {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 1rem;
}

.table {
    width: 100%;
    margin-bottom: 1.5rem;
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table th {
    background-color: var(--gray-100);
    color: var(--text-color);
    font-weight: 500;
    padding: 1rem;
    border-bottom: 1px solid var(--gray-300);
}

.table td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--gray-300);
    color: var(--text-color);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr:hover {
    background-color: var(--gray-100);
}

.thumbnail-cell {
    width: 80px;
    text-align: center;
}

.plate-thumbnail {
    width: 70px;
    height: 50px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s;
}

.plate-thumbnail:hover {
    transform: scale(1.1);
}

.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    background-color: var(--white);
    color: var(--text-color);
    border-bottom: 1px solid var(--gray-300);
    border-radius: 12px 12px 0 0;
    padding: 1rem 1.5rem;
}

.modal-header .close {
    color: var(--text-color);
    opacity: 0.7;
    transition: var(--transition);
}

.modal-header .close:hover {
    opacity: 1;
}

.modal-title {
    font-weight: 500;
    font-size: 1.25rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-body img {
    max-height: 70vh;
    object-fit: contain;
}

.pagination {
    margin: 1.5rem 0;
    gap: 0.25rem;
}

.pagination .page-link {
    color: var(--text-color);
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: var(--transition);
}

.pagination .page-link:hover {
    background-color: var(--gray-100);
    color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    color: var(--white);
    font-weight: 500;
}

.pagination .page-item.disabled .page-link {
    color: var(--gray-400);
    background-color: transparent;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    margin: 0 0.2rem;
}

.bi {
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 1rem;
    }

    .content {
        margin-left: 0;
        padding: 1rem;
    }

    .login-container,
    .register-container {
        margin: 1rem auto;
        padding: 1.5rem;
    }
}


/* Estilos do dropdown (apenas dentro do sidebar legado) */
.sidebar .dropdown-menu {
    position: relative;
    margin-bottom: 1rem;
}

.dropdown-header {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

.dropdown-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: #fff;
}

.dropdown-header i {
    transition: transform 0.3s ease;
}

.dropdown-items {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.dropdown-items.show {
    max-height: 200px;
}

.dropdown-header:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.dropdown-items .nav-link {
    padding-left: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dropdown-items.show .nav-link {
    opacity: 1;
}

/* Animação do ícone */
.dropdown-header .bi-chevron-down {
    transition: transform 0.3s ease;
}

.dropdown-header .show+.bi-chevron-down {
    transform: rotate(180deg);
}

.badge-lpr {
    background-color: var(--accent-color);
    color: #000;
}

.badge-theeye {
    background-color: var(--secondary-color);
    color: #fff;
}