/* Hottasker - Estilos Personalizados */

/* Cores do tema */
:root {
    --primary-color: #e55a2b;
    --primary-dark: #c44a23;
    --secondary-color: #2c3e50;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --info-color: #3498db;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
}

/* AdminLTE Layout */
.wrapper {
    min-height: 100vh;
    position: relative;
}

/* Sidebar */
.main-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1038;
    width: 250px;
    background: linear-gradient(135deg, var(--dark-color), #34495e);
    transition: transform 0.3s ease-in-out;
}

/* Sidebar colapsado */
.main-sidebar.sidebar-collapsed {
    width: 60px;
    transform: none;
}

.main-sidebar.sidebar-collapsed .brand-text,
.main-sidebar.sidebar-collapsed .nav-link p,
.main-sidebar.sidebar-collapsed .user-panel .info,
.main-sidebar.sidebar-collapsed .nav-header {
    display: none;
}

.main-sidebar.sidebar-collapsed .brand-link {
    text-align: center;
    padding: 0.8125rem 0;
}

.main-sidebar.sidebar-collapsed .brand-image {
    float: none;
    margin: 0;
}

.main-sidebar.sidebar-collapsed .nav-link {
    text-align: center;
    padding: 0.75rem 0.5rem;
}

.main-sidebar.sidebar-collapsed .nav-link i {
    margin-right: 0;
    font-size: 1.2rem;
}

.main-sidebar.sidebar-collapsed .user-panel {
    text-align: center;
    padding: 0.5rem;
}

.main-sidebar.sidebar-collapsed .user-panel .image {
    margin: 0 auto;
}

/* Content Wrapper */
.content-wrapper {
    margin-left: 250px;
    padding-top: 60px; /* Altura da navbar */
    min-height: 100vh;
    transition: margin-left 0.3s ease-in-out;
}

/* Conteúdo principal expandido */
.wrapper.sidebar-collapsed .content-wrapper {
    margin-left: 60px;
}

/* Navbar quando sidebar está colapsado */
.wrapper.sidebar-collapsed .main-header {
    left: 60px;
}

/* Footer quando sidebar está colapsado */
.wrapper.sidebar-collapsed .main-footer {
    margin-left: 60px;
}

/* Tooltip para itens do menu colapsado */
.main-sidebar.sidebar-collapsed .nav-link {
    position: relative;
}

.main-sidebar.sidebar-collapsed .nav-link:hover::after {
    content: attr(data-title);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    white-space: nowrap;
    z-index: 1050;
}

/* Transição suave para o ícone do toggle */
#sidebarToggleIcon {
    transition: transform 0.3s ease;
}

/* Efeito hover no botão do menu */
.nav-link[data-widget="pushmenu"]:hover #sidebarToggleIcon {
    transform: scale(1.1);
}
    font-size: 0.875rem;
    white-space: nowrap;
    z-index: 9999;
    margin-left: 10px;
}

.sidebar-dark-primary {
    background-color: var(--dark-color) !important;
}

.brand-link {
    display: block;
    font-size: 1.25rem;
    line-height: 1.5;
    padding: 0.8125rem 0.5rem;
    transition: width 0.3s ease-in-out;
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-link:hover {
    color: #fff !important;
    text-decoration: none;
}

.brand-image {
    float: left;
    line-height: 0.8;
    margin-left: 0.8rem;
    margin-right: 0.5rem;
    margin-top: -3px;
    max-height: 33px;
    width: auto;
}

.brand-text {
    font-weight: 300;
    font-size: 1.25rem;
}

.sidebar {
    padding: 0 0.5rem 0.5rem 0.5rem;
    overflow-y: auto;
}

.user-panel {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
}

.user-panel .info {
    margin-left: 0.5rem;
}

.user-panel .info a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.user-panel .info a:hover {
    color: #fff;
}

/* Sidebar Menu */
.nav-sidebar {
    flex-direction: column;
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
}

.nav-sidebar .nav-item {
    width: 100%;
}

.nav-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 1rem;
    position: relative;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.nav-sidebar .nav-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-sidebar .nav-link.active {
    color: #fff;
    background-color: var(--primary-color);
}

.nav-sidebar .nav-link .nav-icon {
    margin-right: 0.5rem;
    text-align: center;
    width: 1.6rem;
}

.nav-sidebar .nav-link p {
    margin: 0;
}

.nav-header {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    text-transform: uppercase;
    margin-top: 1rem;
}

/* Content Wrapper */
.content-wrapper {
    margin-left: 250px;
    min-height: 100vh;
    background-color: #f4f6f9;
    transition: margin-left 0.3s ease-in-out;
}

/* Navbar */
.main-header {
    background-color: #fff;
    border-bottom: 1px solid #dee2e6;
    position: fixed;
    top: 0;
    right: 0;
    left: 250px;
    height: 60px;
    z-index: 1034;
    transition: left 0.3s ease-in-out;
}

.main-header .navbar-nav .nav-link {
    padding: 0.5rem 1rem;
    color: #6c757d;
}

.main-header .navbar-nav .nav-link:hover {
    color: var(--primary-color);
}

.navbar-badge {
    font-size: 0.6rem;
    font-weight: 300;
    padding: 2px 4px;
    position: absolute;
    right: 5px;
    top: 9px;
}

/* Content Header */
.content-header {
    background-color: #fff;
    border-bottom: 1px solid #dee2e6;
    padding: 1rem;
}

.content-header h1 {
    font-size: 1.8rem;
    margin: 0;
    line-height: 1;
}

.breadcrumb {
    background-color: transparent;
    margin-bottom: 0;
    padding: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
}

/* Content */
.content {
    padding: 1rem;
}

/* Footer */
.main-footer {
    background-color: #fff;
    border-top: 1px solid #dee2e6;
    color: #869099;
    padding: 1rem;
    margin-left: 250px;
    transition: margin-left 0.3s ease-in-out;
    position: relative;
}

/* Navbar Notifications and User Menu */
.navbar-nav .nav-item.dropdown {
    position: relative;
}

.navbar-nav .nav-item.dropdown .dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    z-index: 1000 !important;
    right: 0 !important;
    left: auto !important;
}

/* Notifications specific styles */
.navbar-nav .nav-item.dropdown .dropdown-menu#notificationsMenu {
    min-width: 350px;
    max-width: 400px;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Mobile: Hide notifications dropdown completely */
@media (max-width: 768px) {
    .navbar-nav .nav-item.dropdown .dropdown-menu#notificationsMenu {
        display: none !important;
    }
    
    /* Improve mobile notifications icon */
    .navbar-nav .nav-item.dropdown #notificationsToggle {
        padding: 0.5rem 0.75rem !important;
        border-radius: 0.375rem !important;
        transition: background-color 0.2s ease !important;
    }
    
    .navbar-nav .nav-item.dropdown #notificationsToggle:hover {
        background-color: rgba(0, 0, 0, 0.05) !important;
    }
    
    .navbar-nav .nav-item.dropdown #notificationsToggle:active {
        background-color: rgba(0, 0, 0, 0.1) !important;
    }
}

/* Position navbar items to the right */
.navbar-nav.ml-auto {
    margin-left: auto !important;
}

/* Ensure proper spacing between notification and user menu */
.navbar-nav.ml-auto .nav-item:not(:last-child) {
    margin-right: 10px;
}

/* Darker Alert Background */
.alert {
    background-color: rgba(0, 0, 0, 0.9) !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(10px);
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.95) !important;
    border-color: rgba(40, 167, 69, 0.8) !important;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.95) !important;
    border-color: rgba(220, 53, 69, 0.8) !important;
}

.alert .btn-close {
    filter: invert(1);
}



.notifications-dropdown .btn-link {
    color: #6c757d;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.notifications-dropdown .btn-link:hover {
    color: var(--primary-color);
    background-color: rgba(0, 0, 0, 0.05);
}

.notifications-dropdown .dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    left: auto;
    min-width: 350px;
    max-width: 400px;
    max-height: 400px;
    margin-top: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.175);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 0.375rem;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Notifications List */
.notifications-dropdown .dropdown-menu #notificationsList {
    max-height: 250px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 10px;
}

/* Ensure footer button is always visible */
.notifications-dropdown .dropdown-menu .dropdown-footer {
    position: sticky;
    bottom: 0;
    background: white;
    border-top: 1px solid #dee2e6;
    margin: 0;
    padding: 0.75rem 1rem;
    z-index: 1;
}

/* Global styles for notifications menu footer */
.navbar-nav .nav-item.dropdown .dropdown-menu#notificationsMenu .dropdown-footer {
    position: sticky !important;
    bottom: 0 !important;
    background: white !important;
    border-top: 1px solid #dee2e6 !important;
    margin: 0 !important;
    padding: 0.75rem 1rem !important;
    z-index: 10 !important;
    border-radius: 0 0 0.375rem 0.375rem !important;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1) !important;
}

/* Ensure the footer button is always clickable */
.navbar-nav .nav-item.dropdown .dropdown-menu#notificationsMenu .dropdown-footer a {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    padding: 0.5rem !important;
    border-radius: 0.25rem !important;
    transition: background-color 0.2s ease !important;
}

.navbar-nav .nav-item.dropdown .dropdown-menu#notificationsMenu .dropdown-footer a:hover {
    background-color: #f8f9fa !important;
    text-decoration: none !important;
}

.notifications-dropdown .dropdown-menu #notificationsList::-webkit-scrollbar {
    width: 6px;
}

.notifications-dropdown .dropdown-menu #notificationsList::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.notifications-dropdown .dropdown-menu #notificationsList::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.notifications-dropdown .dropdown-menu #notificationsList::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.notifications-dropdown .dropdown-menu .notification-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.notifications-dropdown .dropdown-menu .notification-item:hover {
    background-color: #f8f9fa;
}

.notifications-dropdown .dropdown-menu .notification-item:last-child {
    border-bottom: none;
}



.user-menu-dropdown .btn-link {
    color: #6c757d;
    text-decoration: none;
}

.user-menu-dropdown .btn-link:hover {
    color: var(--primary-color);
}

/* Login Page */
.login-page {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-box {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

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

.login-logo h1 {
    margin-top: 1rem;
    font-weight: 300;
    font-size: 2rem;
}

.login-card-body {
    padding: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .main-sidebar {
        transform: translateX(-250px);
    }
    
    .content-wrapper {
        margin-left: 0;
        padding-top: 60px;
    }
    
    .main-header {
        left: 0;
        height: 60px;
    }
    
    .main-footer {
        margin-left: 0;
    }
    
    .sidebar-open .main-sidebar {
        transform: translateX(0);
    }
    
    .sidebar-open .content-wrapper {
        margin-left: 250px;
    }
    
    .sidebar-open .main-header {
        left: 250px;
    }
    
    .sidebar-open .main-footer {
        margin-left: 250px;
    }
    
    .login-box {
        margin: 0;
        height: 100vh;
    }
    
    .site-login .card {
        height: 100%;
        border-radius: 0;
    }
}

/* Estilos gerais */
body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Navbar personalizada */
.navbar-dark {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)) !important;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

/* Cards com sombra */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: 10px 10px 0 0 !important;
    border: none;
}

.card-header h6 {
    color: white !important;
    font-weight: bold !important;
}

.card-header .text-primary {
    color: white !important;
}

/* Botões personalizados */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-secondary {
    background: #6c757d;
    border: none;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Gap para botões */
.gap-2 {
    gap: 0.5rem;
}

/* Notificações */
.notification-item {
    padding: 1rem;
    border-bottom: 1px solid #f8f9fa;
    transition: background-color 0.2s ease;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.notification-item:hover {
    background-color: #f8f9fa;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item .d-flex {
    gap: 0.75rem;
}

.notification-item .flex-shrink-0 {
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.notification-item .flex-grow-1 {
    min-width: 0; /* Permite que o texto quebre */
}

.notification-item .text-sm {
    font-size: 0.875rem;
    line-height: 1.4;
    margin-top: 0.5rem;
    white-space: pre-line; /* Preserva quebras de linha */
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.notification-item .text-xs {
    font-size: 0.75rem;
    margin-top: 0.25rem;
    color: #6c757d;
}

.notification-title {
    font-weight: 500;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 250px; /* Limita largura do título */
}

.notification-message {
    font-size: 0.875rem;
    line-height: 1.4;
    margin-top: 0.5rem;
    white-space: pre-line; /* Preserva quebras de linha */
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.notification-time {
    font-size: 0.75rem;
    margin-top: 0.25rem;
    color: #6c757d;
    font-style: italic;
}

/* Página de todas as notificações */
.notification-index .card {
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

.notification-index .table {
    margin-bottom: 0;
}

.notification-index .table th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}

.notification-index .table td {
    vertical-align: middle;
}

.notification-index .badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
}

.notification-index .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.notification-index .summary {
    background-color: #f8f9fa;
    padding: 0.75rem;
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
}

.notification-index .pagination {
    margin-top: 1rem;
    margin-bottom: 0;
}

.dropdown-item-actions {
    opacity: 0;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.notification-item:hover .dropdown-item-actions {
    opacity: 1;
}

.dropdown-item-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    margin-left: 0.25rem;
}

.dropdown-item-actions .btn:hover {
    background-color: rgba(0,0,0,0.1);
    border-radius: 3px;
}

.navbar-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 0.6rem;
    font-weight: 300;
    padding: 2px 4px;
    border-radius: 10px;
}

.dropdown-menu-lg {
    min-width: 350px;
    max-width: 400px;
}

.dropdown-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

.dropdown-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    text-align: center;
    font-weight: 500;
}

.dropdown-footer:hover {
    background-color: #e9ecef;
}

/* Dropdown manual fallback */
.dropdown-menu.show {
    display: block !important;
}

.dropdown-menu {
    display: none;
    min-width: 10rem;
    padding: 0.5rem 0;
    margin: 0.125rem 0 0;
    font-size: 0.875rem;
    color: #212529;
    text-align: left;
    list-style: none;
    background-color: #fff;
    background-clip: padding-box;
}

.dropdown-menu-end {
    right: 0;
    left: auto;
}

/* Cards de estatísticas */
.border-left-primary {
    border-left: 0.25rem solid var(--primary-color) !important;
}

.border-left-success {
    border-left: 0.25rem solid var(--success-color) !important;
}

.border-left-info {
    border-left: 0.25rem solid var(--info-color) !important;
}

.border-left-warning {
    border-left: 0.25rem solid var(--warning-color) !important;
}

.border-left-danger {
    border-left: 0.25rem solid var(--danger-color) !important;
}

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

.table thead th {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    font-weight: 600;
}

.table thead th a {
    color: white !important;
    text-decoration: none;
}

.table thead th a:hover {
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: none;
}

.table thead th a.asc,
.table thead th a.desc {
    color: white !important;
    text-decoration: none;
}

/* Ícones de ordenação */
.table thead th a {
    position: relative;
    padding-right: 20px;
}

.table thead th a::after {
    content: '↕';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    opacity: 0.7;
}

.table thead th a.asc::after {
    content: '↑';
    opacity: 1;
}

.table thead th a.desc::after {
    content: '↓';
    opacity: 1;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(229, 90, 43, 0.05);
}

/* Badges personalizados */
.badge {
    border-radius: 20px;
    padding: 0.5em 1em;
    font-weight: 500;
    color: #000000 !important; /* Força cor preta para todos os badges */
}

.badge-success {
    background-color: var(--success-color);
}

.badge-warning {
    background-color: var(--warning-color);
}

.badge-danger {
    background-color: var(--danger-color);
}

.badge-info {
    background-color: var(--info-color);
}

.badge-secondary {
    background-color: #dc3545; /* Fundo vermelho */
    color: #ffffff !important; /* Fonte branca */
}

/* Formulários */
.form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(229, 90, 43, 0.25);
}

/* Login */
.site-login .card {
    width: 100%;
    max-width: none;
    margin: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.site-login .card-header {
    text-align: center;
    padding: 2rem 1rem 1rem;
    flex-shrink: 0;
}

.site-login .card-body {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Dashboard */
.dashboard-index .card {
    margin-bottom: 1.5rem;
}

.dashboard-index .card-body {
    padding: 1.5rem;
}

/* Responsividade */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
}

/* Animações */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 2rem 0 rgba(58, 59, 69, 0.2);
}

/* Loading spinner */
.spinner-border {
    color: var(--primary-color);
}

/* Alertas personalizados */
.alert {
    border-radius: 8px;
    border: none;
}

.alert-success {
    background-color: rgba(39, 174, 96, 0.1);
    color: var(--success-color);
}

.alert-warning {
    background-color: rgba(243, 156, 18, 0.1);
    color: var(--warning-color);
}

.alert-danger {
    background-color: rgba(231, 76, 60, 0.1);
    color: var(--danger-color);
}

.alert-info {
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--info-color);
}

/* Paginação */
.pagination .page-link {
    color: var(--primary-color);
    border-color: #e9ecef;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.pagination .page-link:hover {
    color: var(--primary-dark);
    background-color: rgba(255, 107, 53, 0.1);
}

/* Tooltips */
.tooltip-inner {
    background-color: var(--dark-color);
    border-radius: 5px;
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}
