.ck-editor__editable,
textarea {
    min-height: 150px;
}

.datatable {
    width: 100% !important;
}

table.dataTable tbody td.select-checkbox::before,
table.dataTable tbody td.select-checkbox::after,
table.dataTable tbody th.select-checkbox::before,
table.dataTable tbody th.select-checkbox::after {
    top: 50%;
}

.dataTables_length,
.dataTables_filter,
.dt-buttons {
    margin-bottom: 0.333em;
    margin-top: .2rem;
}

.dataTables_filter {
    margin-right: .2rem;
}

.dt-buttons .btn {
    margin-left: 0.333em;
    border-radius: 0;
}

.table.datatable {
    box-sizing: border-box;
    border-collapse: collapse;
}

table.dataTable thead th {
    border-bottom: 2px solid #c8ced3;
}

.dataTables_wrapper.no-footer .dataTables_scrollBody {
    border-bottom: 1px solid #c8ced3;
}

.select2 {
    max-width: 100%;
    width: 100% !important;
}

.select2-selection__rendered {
    padding-bottom: 5px !important;
}

.has-error .invalid-feedback {
    display: block !important;
}

.btn-info,
.badge-info {
    color: white;
}

table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc {
    background-image: none;
}

.sidebar .nav-item {
    cursor: pointer;
}

.btn-default {
    color: #23282c;
    background-color: #f0f3f5;
    border-color: #f0f3f5;
}

.btn-default.focus,
.btn-default:focus {
    box-shadow: 0 0 0 .2rem rgba(209, 213, 215, .5);
}

.btn-default:hover {
    color: #23282c;
    background-color: #d9e1e6;
    border-color: #d1dbe1;
}

.btn-group-xs > .btn,
.btn-xs {
    padding: 1px 5px;
    font-size: 12px;
    line-height: 1.5;
    border-radius: 3px;
}

/* Ajustes para botões xs com novos estilos */
.btn-xs.btn-primary {
    padding: 1px 5px !important;
    font-size: 12px;
    line-height: 1.5;
    border-radius: 3px !important;
}

.btn-xs.btn-info {
    padding: 1px 5px !important;
    font-size: 12px;
    line-height: 1.5;
    border-radius: 3px !important;
}

.btn-xs.btn-danger {
    padding: 1px 5px !important;
    font-size: 12px;
    line-height: 1.5;
    border-radius: 3px !important;
}

.searchable-title {
    font-weight: bold;
}
.searchable-fields {
    padding-left:5px;
}
.searchable-link {
    padding:0 5px 0 5px;
}
.searchable-link:hover   {
    cursor: pointer;
    background: #eaeaea;
}
.select2-results__option {
    padding-left: 0px;
    padding-right: 0px;
}

.form-group .required::after {
    content: " *";
    color: red;
}

.form-check.is-invalid ~ .invalid-feedback {
    display: block;
}

.c-sidebar-brand .c-sidebar-brand-full:hover {
    color: inherit;
}

.custom-select.form-control-sm {
    padding: 0.25rem 1.5rem;
}

/* Estilos para Login - Baseados no modelo */
.login-page {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #60a5fa 100%);
    min-height: 100vh;
    position: relative;
}

.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    z-index: 1;
}

.login-container {
    position: relative;
    z-index: 2;
    min-height: 100vh; 
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-radius: 15px;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    border: 2px solid rgba(59, 130, 246, 0.2);
    width: 100%;
    max-width: 400px;
    transition: all 0.3s ease;
}

.login-card:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 25px 70px rgba(0,0,0,0.4);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    width: 120px;
    height: auto;
    margin-bottom: 1rem;
    filter: brightness(1.2) contrast(1.1);
}

.login-title {
    color: #fff;
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.login-subtitle {
    color: #e0e7ff;
    font-size: 1rem;
    font-weight: 500;
}

.login-form .form-group {
    margin-bottom: 1.5rem;
}

.login-input-group {
    position: relative;
    margin-bottom: 1rem;
}

.login-input-group .input-group-text {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: #fff;
    border: none;
    border-radius: 8px 0 0 8px;
    padding: 0.8rem 1rem;
    border-right: none;
}

.login-input-group .form-control {
    border: 2px solid #e9ecef;
    border-left: none;
    border-radius: 0 8px 8px 0;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

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

.login-input-group .form-control.is-invalid {
    border-color: #dc3545;
}

.login-input-group .form-control.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.1);
}

.login-checkbox {
    margin-bottom: 1.5rem;
}

.login-checkbox .form-check-input {
    width: 1.2rem;
    height: 1.2rem;
    margin-top: 0.1rem;
}

.login-checkbox .form-check-label {
    margin-left: 0.5rem;
    color: #e0e7ff;
    font-weight: 500;
}

.login-btn {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: #fff;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    width: 100%;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.login-btn:hover {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3);
}

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

.login-links {
    text-align: center;
}

.login-links .btn-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    margin: 0 0.5rem;
    transition: color 0.3s ease;
}

.login-links .btn-link:hover {
    color: #1e40af;
    text-decoration: underline;
}

.invalid-feedback {
    display: block;
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.alert-info {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #e0e7ff;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

/* Responsividade */
@media (max-width: 576px) {
    .login-card {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .login-title {
        font-size: 1.5rem;
    }
    
    .login-logo {
        width: 100px;
    }
}

/* Estilos para Admin Dashboard - Baseados no modelo */
.c-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.c-header-brand {
    color: #fff !important;
    font-weight: 700;
    font-size: 1.3rem;
}

.c-header-nav-link {
    color: #fff !important;
    font-weight: 500;
    transition: color 0.3s ease;
}

.c-header-nav-link:hover {
    color: #60a5fa !important;
    background-color: rgba(96, 165, 250, 0.1);
    border-radius: 5px;
}

.c-header-toggler {
    color: #fff !important;
}

.c-header-toggler:hover {
    color: #60a5fa !important;
}

.c-sidebar {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%) !important;
    border-right: 1px solid rgba(59, 130, 246, 0.2);
}

.c-sidebar-nav-link {
    color: #e0e7ff !important;
    transition: all 0.3s ease;
}

.sidebar-nav > li > a {
    color: #e0e7ff !important;
    transition: all 0.3s ease;
}

.sidebar-nav > li > a:hover,
.sidebar-nav > li > a:focus {
    color: #fff !important;
    background-color: rgba(96, 165, 250, 0.1);
}

.sidebar-nav > li.active > a {
    color: #fff !important;
    background-color: rgba(59, 130, 246, 0.2);
}

/* Cards do Dashboard */
.card {
    background: #fff;
    border-radius: 15px !important;
    border: 2px solid transparent;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.card:hover {
    border-color: rgba(59, 130, 246, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.card-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 15px 15px 0 0 !important;
    padding: 1.5rem !important;
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 0;
}

.card-body {
    padding: 2rem !important;
    background: #fff;
    border-radius: 0 0 15px 15px;
}

.card-title {
    color: #333;
    font-weight: 600;
}

.content {
    padding: 2rem 0;
}

.container-fluid {
    padding: 0 2rem;
}

/* Botões do Dashboard */
.btn-primary {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%) !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 0.8rem 1.5rem !important;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
    background: #6c757d !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 0.8rem 1.5rem !important;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #5a6268 !important;
    transform: translateY(-2px);
}

.btn-success {
    background: #28a745 !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 0.8rem 1.5rem !important;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-success:hover {
    background: #218838 !important;
    transform: translateY(-2px);
}

.btn-danger {
    background: #dc3545 !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 0.8rem 1.5rem !important;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background: #c82333 !important;
    transform: translateY(-2px);
}

.btn-info {
    background: #17a2b8 !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 0.8rem 1.5rem !important;
    font-weight: 600;
    transition: all 0.3s ease;
    color: white !important;
}

.btn-info:hover {
    background: #138496 !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(23, 162, 184, 0.3);
}

/* Alerts do Dashboard */
.alert-success {
    background: rgba(40, 167, 69, 0.1) !important;
    border: 1px solid rgba(40, 167, 69, 0.2) !important;
    color: #155724 !important;
    border-radius: 8px !important;
    padding: 1rem !important;
    margin-bottom: 1rem !important;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1) !important;
    border: 1px solid rgba(220, 53, 69, 0.2) !important;
    color: #721c24 !important;
    border-radius: 8px !important;
    padding: 1rem !important;
    margin-bottom: 1rem !important;
}

.alert-warning {
    background: rgba(255, 193, 7, 0.1) !important;
    border: 1px solid rgba(255, 193, 7, 0.2) !important;
    color: #856404 !important;
    border-radius: 8px !important;
    padding: 1rem !important;
    margin-bottom: 1rem !important;
}

/* Notificações */
.notifications-menu .fa-bell {
    color: #fff !important;
}

.badge-warning {
    background: linear-gradient(135deg, #fd7e14 0%, #ffc107 100%) !important;
    color: #000 !important;
}

/* Sidebar Menu */
.c-sidebar-brand {
    background: rgba(255, 255, 255, 0.1) !important;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

.c-sidebar-brand-full {
    color: #fff !important;
    font-weight: 700;
}

/* Dropdowns */
.dropdown-menu {
    border-radius: 8px !important;
    border: 1px solid rgba(59, 130, 246, 0.2) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
    margin-top: 0.5rem !important;
}

.dropdown-item {
    color: #333 !important;
    padding: 0.75rem 1rem !important;
    transition: background-color 0.3s ease;
}

.dropdown-item:hover {
    background: rgba(59, 130, 246, 0.1) !important;
    color: #1e40af !important;
}

/* DataTables */
.dataTables_wrapper {
    background: #fff;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.dataTables_wrapper .dataTables_length select {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 0.5rem;
}

.dataTables_wrapper .dataTables_filter input {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 0.5rem 1rem;
}

.table {
    border-radius: 8px;
    overflow: hidden;
}

.table thead th {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%) !important;
    color: #fff !important;
    border: none !important;
    padding: 1rem !important;
    font-weight: 600;
}

.table tbody td {
    padding: 1rem !important;
    vertical-align: middle;
    border-top: 1px solid #e9ecef !important;
}

.table tbody tr:hover {
    background: rgba(59, 130, 246, 0.05) !important;
}

/* Formulários */
.form-control {
    border: 2px solid #e9ecef !important;
    border-radius: 8px !important;
    padding: 0.75rem 1rem !important;
    transition: border-color 0.3s ease;
    min-height: 48px !important;
    font-size: 1rem !important;
    line-height: 1.5 !important;
}

.form-control:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.1) !important;
}

/* Estilos específicos para selects */
select.form-control {
    background-color: #fff !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center !important;
    background-repeat: no-repeat !important;
    background-size: 1.5em 1.5em !important;
    padding-right: 2.5rem !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    cursor: pointer !important;
}

select.form-control:focus {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%233b82f6' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
}

/* Melhorar dropdown option */
select.form-control option {
    padding: 0.75rem 1rem !important;
    font-size: 1rem !important;
    line-height: 1.5 !important;
}

/* Select customizado para melhor visualização */
.select-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.select-wrapper::after {
    content: '';
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #6b7280;
    pointer-events: none;
    z-index: 2;
}

.select-wrapper select.form-control:focus + .select-wrapper::after {
    border-top-color: #3b82f6;
}

/* Select2 Customização */
.select2-container--default .select2-selection--single {
    height: 48px !important;
    border: 2px solid #e9ecef !important;
    border-radius: 8px !important;
    padding: 0.5rem 0.75rem !important;
    background: #fff !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 48px !important;
    padding: 0 !important;
    font-size: 1rem !important;
    color: #333 !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 44px !important;
    right: 8px !important;
}

.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.1) !important;
}

.select2-dropdown {
    border: 2px solid #e9ecef !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
}

.select2-results__options {
    max-height: 300px !important;
}

.select2-results__option {
    padding: 0.75rem 1rem !important;
    font-size: 1rem !important;
}

.select2-results__option--highlighted[aria-selected] {
    background-color: rgba(59, 130, 246, 0.1) !important;
    color: #1e40af !important;
}

.select2-results__option[aria-selected=true] {
    background-color: rgba(59, 130, 246, 0.2) !important;
    color: #1e40af !important;
}

/* Melhorias específicas para formulários */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group .form-control {
    margin-top: 0.5rem;
}

/* Select sem Select2 - melhorias */
select.form-control:not([multiple]) {
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    padding-right: 3rem !important;
}

/* Hover em selects */
select.form-control:hover {
    border-color: #3b82f6 !important;
}

/* Placeholder específico para select */
select.form-control option:first-child {
    color: #6c757d !important;
    font-style: italic;
}

/* Validação de select */
select.form-control.is-invalid {
    border-color: #dc3545 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23dc3545' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
}

select.form-control.is-valid {
    border-color: #28a745 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2328a745' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
}

/* Responsivo para select */
@media (max-width: 768px) {
    select.form-control {
        font-size: 16px !important; /* Evita zoom em mobile */
    }
    
    .select2-container--default .select2-selection--single {
        height: 44px !important;
    }
    
    .select2-container--default .select2-selection--single .select2-selection__rendered {
        line-height: 40px !important;
    }
}

.form-group label {
    color: #333;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Estilos para Cards de Empresas */
.empresa-card-custom {
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
}

.empresa-card-custom:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.empresa-card-custom .card-title {
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
}

.empresa-card-custom .card-footer {
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.empresa-card-custom .card-footer .btn {
    border-radius: 0;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.empresa-card-custom .card-footer .btn-group {
    box-shadow: none;
}

.empresa-card-custom .badge {
    font-size: 0.85rem;
    padding: 0.35rem 0.65rem;
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
}

.empresa-card-custom .text-muted.small {
    font-size: 0.875rem;
    line-height: 1.4;
}

/* Logo container responsivo */
.empresa-card-custom .text-center.p-3 {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid #dee2e6;
}

.empresa-card-custom img.img-fluid {
    border-radius: 8px;
    object-fit: contain;
}

/* Grid responsivo para cards */
@media (max-width: 768px) {
    .col-md-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media (min-width: 768px) and (max-width: 992px) {
    .col-md-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Responsividade */
@media (max-width: 768px) {
    .container-fluid {
        padding: 0 1rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .card-header {
        padding: 1rem !important;
        font-size: 1.1rem;
    }
    
    .card-body {
        padding: 1rem !important;
    }
    
    .empresa-card-custom .card-footer .btn {
        padding: 0.375rem 0.5rem;
        font-size: 0.75rem;
    }
}
