/* ===================================
   SISTEMA ABRH-PA - Estilos Customizados Laravel
   =================================== */

/* ----- Reset e Base ----- */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    /* Cores personalizadas serão sobrescritas pelo layout app.blade.php */
    --cor-primaria: #0d6efd;
    --cor-secundaria: #6c757d;
    --cor-sucesso: #198754;
    --cor-sidebar: #212529;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #212529;
    background-color: #f8f9fa;
}

/* ----- Content Wrapper (para sidebar) ----- */
.content-wrapper {
    margin-left: 280px;
    padding: 25px;
    padding-top: 90px;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    min-height: 100vh;
}

.content-wrapper.sidebar-collapsed {
    margin-left: 80px;
}


/* ----- Sidebar Moderna ----- */
.sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    height: 100vh !important;
    width: 280px;
    background: linear-gradient(180deg, var(--cor-sidebar, #212529) 0%, color-mix(in srgb, var(--cor-sidebar, #212529) 95%, black) 100%);
    color: white;
    padding: 0;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000 !important;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    display: block !important;
    visibility: visible !important;
    will-change: width;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar.collapsed {
    width: 80px;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
        top: 0 !important;
        height: 100vh !important;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .sidebar.collapsed {
        width: 280px;
    }

    .navbar-sticky {
        margin-left: 0 !important;
    }

    .content-wrapper {
        margin-left: 0 !important;
        padding: 15px;
        padding-top: 80px;
    }
}

.sidebar .nav-link {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 1rem;
    border-radius: 0.25rem;
    margin-bottom: 0.25rem;
    transition: all 0.2s;
}

.sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateX(3px);
}

.sidebar .nav-link.active {
    background-color: var(--cor-primaria, var(--primary-color));
    color: white;
}

.sidebar .nav-link i {
    margin-right: 0.5rem;
    width: 20px;
    text-align: center;
}

.sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 15px;
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    position: relative;
    padding-top: 80px;
}

.sidebar-toggle-btn-internal {
    position: absolute;
    top: 15px;
    right: 15px;
    border: none !important;
    padding: 0.5rem 0.75rem !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    background: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.sidebar-toggle-btn-internal:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    transform: scale(1.1);
}

.sidebar-toggle-btn-internal:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3) !important;
}

.sidebar-toggle-btn-internal i {
    transition: transform 0.3s ease;
}

.sidebar.collapsed .sidebar-toggle-btn-internal i {
    transform: rotate(180deg);
}

.sidebar-logo {
    max-width: 150px;
    height: auto;
    display: block;
    margin: 0 auto 15px;
    transition: opacity 0.3s, max-width 0.3s;
}

.sidebar.collapsed .sidebar-logo {
    max-width: 50px;
    opacity: 0.8;
}

.sidebar-title {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
    transition: opacity 0.3s;
}

.sidebar.collapsed .sidebar-title {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar-subtitle {
    display: block;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 5px;
}

.sidebar.collapsed .sidebar-subtitle {
    display: block !important;
    text-align: center;
    font-size: 0.6rem;
    margin-top: 0;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: block !important;
    visibility: visible !important;
}

.sidebar-menu li {
    display: block !important;
    visibility: visible !important;
}

.sidebar-menu li a {
    display: flex !important;
    align-items: center;
    padding: 14px 20px;
    color: rgba(255, 255, 255, 0.85) !important;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    visibility: visible !important;
    opacity: 1 !important;
    border-left: 3px solid transparent;
    margin: 2px 10px;
    border-radius: 8px;
    position: relative;
}

.sidebar-menu li a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--cor-primaria, #0d6efd);
    transform: scaleY(0);
    transition: transform 0.3s ease;
    border-radius: 0 3px 3px 0;
}

.sidebar-menu li a:hover {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.05) 100%);
    color: white !important;
    transform: translateX(5px);
    border-left-color: var(--cor-primaria, #0d6efd);
}

.sidebar-menu li a:hover::before {
    transform: scaleY(1);
}

.sidebar-menu li a.active {
    background: linear-gradient(90deg, rgba(13, 110, 253, 0.2) 0%, rgba(13, 110, 253, 0.1) 100%);
    color: white !important;
    border-left-color: var(--cor-primaria, #0d6efd);
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.2);
}

.sidebar-menu li a.active::before {
    transform: scaleY(1);
}

.sidebar-menu li a i {
    width: 24px;
    margin-right: 14px;
    text-align: center;
    flex-shrink: 0;
    display: inline-block !important;
    visibility: visible !important;
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.sidebar-menu li a:hover i {
    transform: scale(1.15);
}

.menu-text {
    transition: opacity 0.3s;
    display: inline-block !important;
    visibility: visible !important;
}

.sidebar.collapsed .menu-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar.collapsed .sidebar-menu li a {
    justify-content: center;
    padding: 12px 0;
}

.sidebar-heading {
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.4);
    padding: 1rem 1.5rem 0.5rem;
    margin-top: 15px;
    margin-bottom: 8px;
    white-space: nowrap;
    transition: opacity 0.3s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar.collapsed .sidebar-heading {
    opacity: 0;
    height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/* ----- Cards ----- */
.card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1.5rem;
    transition: box-shadow 0.3s;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: white;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
    padding: 1rem 1.5rem;
}

/* ----- Estatísticas (Dashboard) ----- */
.stat-card {
    border-left: 4px solid var(--cor-primaria, var(--primary-color));
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.stat-card.success {
    border-left-color: var(--cor-sucesso, var(--success-color));
}

.stat-card.danger {
    border-left-color: var(--danger-color);
}

.stat-card.warning {
    border-left-color: var(--warning-color);
}

.stat-card.info {
    border-left-color: var(--info-color);
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #212529;
}

.stat-label {
    font-size: 0.875rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-icon {
    font-size: 3rem;
    opacity: 0.3;
}

/* ----- Tabelas ----- */
.table {
    background-color: white;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    color: #495057;
}

.table-hover tbody tr:hover {
    background-color: #f8f9fa;
    cursor: pointer;
}

/* ----- Badges ----- */
.badge {
    padding: 0.35em 0.65em;
    font-weight: 500;
    font-size: 0.875em;
}

/* ----- Buttons ----- */
.btn {
    border-radius: 0.25rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.2s;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

/* ----- Forms ----- */
.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #495057;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.invalid-feedback {
    font-size: 0.875rem;
}

/* ----- Navbar Moderna ----- */
.navbar-modern {
    background: linear-gradient(135deg, var(--cor-primaria, #0d6efd) 0%, color-mix(in srgb, var(--cor-primaria, #0d6efd) 85%, black) 100%) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0.75rem 0;
    min-height: 64px;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-sticky {
    position: sticky !important;
    top: 0 !important;
    z-index: 1020 !important;
    margin-left: 280px;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.collapsed~nav.navbar-sticky,
body:has(.sidebar.collapsed) .navbar-sticky {
    margin-left: 80px;
}

.sidebar-toggle-btn {
    border: none !important;
    padding: 0.5rem 0.75rem !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    background: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
}

.sidebar-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    transform: scale(1.05);
}

.sidebar-toggle-btn:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3) !important;
}

.navbar-brand-modern {
    font-size: 1.4rem;
    font-weight: 700;
    color: white !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.navbar-brand-modern:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.navbar-brand-modern i {
    font-size: 1.5rem;
    margin-right: 0.5rem;
}

.brand-text {
    letter-spacing: 0.5px;
}

.custom-toggler {
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
}

.custom-toggler .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.nav-link-modern {
    color: white !important;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.nav-link-modern:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    transform: translateY(-2px);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.nav-link-modern:hover .user-avatar {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.user-info {
    text-align: left;
}

.user-name {
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.2;
}

.user-level {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-weight: 500;
}

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

.badge-analista {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.badge-secretaria {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.badge-associado {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
}

.badge-default {
    background: #6c757d;
    color: white;
}

.dropdown-modern {
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    min-width: 250px;
}

.user-dropdown-header {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 8px;
    margin: 0.5rem;
}

.user-avatar-large {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cor-primaria, #0d6efd) 0%, color-mix(in srgb, var(--cor-primaria, #0d6efd) 85%, black) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.dropdown-item-modern {
    padding: 0.75rem 1.5rem;
    transition: all 0.2s ease;
    color: #495057;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.dropdown-item-modern:hover {
    background: linear-gradient(90deg, rgba(13, 110, 253, 0.1) 0%, rgba(13, 110, 253, 0.05) 100%);
    color: var(--cor-primaria, #0d6efd);
    transform: translateX(5px);
}

.logout-btn {
    color: #dc3545 !important;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
}

.logout-btn:hover {
    background: linear-gradient(90deg, rgba(220, 53, 69, 0.1) 0%, rgba(220, 53, 69, 0.05) 100%) !important;
    color: #dc3545 !important;
}

@media (max-width: 768px) {
    .navbar-modern {
        padding: 0.5rem 0;
    }

    .navbar-brand-modern {
        font-size: 1.2rem;
    }

    .user-info {
        display: none !important;
    }
}

/* ----- Alerts ----- */
.alert {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* ----- Loading Spinner ----- */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* ----- Hover Effects ----- */
.hover-shadow {
    transition: box-shadow 0.3s;
}

.hover-shadow:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* ----- Responsividade ----- */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .content-wrapper {
        margin-left: 0;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .stat-icon {
        font-size: 2rem;
    }

    .table {
        font-size: 0.875rem;
    }
}

/* ----- Print ----- */
@media print {

    .navbar,
    .sidebar,
    .btn,
    .alert {
        display: none !important;
    }

    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }

    .content-wrapper {
        margin-left: 0 !important;
    }
}

/* ----- Utilidades ----- */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ----- Custom Scrollbar ----- */
.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.2) 100%);
    background-clip: padding-box;
}

/* ===================================
   DARK MODE
   =================================== */

/* Variáveis do Dark Mode */
[data-theme="dark"] {
    --bg-color: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-card: #1f2940;
    --text-color: #e4e4e7;
    --text-muted: #9ca3af;
    --border-color: #374151;
    --shadow-color: rgba(0, 0, 0, 0.3);
}

[data-theme="light"] {
    --bg-color: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --text-color: #212529;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    --shadow-color: rgba(0, 0, 0, 0.075);
}

/* Dark Mode - Body */
[data-theme="dark"] body {
    background-color: var(--bg-color);
    color: var(--text-color);
}

/* Dark Mode - Cards */
[data-theme="dark"] .card {
    background-color: var(--bg-card);
    border-color: var(--border-color);
    box-shadow: 0 0.125rem 0.25rem var(--shadow-color);
}

[data-theme="dark"] .card-header {
    background-color: var(--bg-secondary);
    border-bottom-color: var(--border-color);
    color: var(--text-color);
}

[data-theme="dark"] .card-body {
    color: var(--text-color);
}

/* Dark Mode - Tables */
[data-theme="dark"] .table {
    background-color: var(--bg-card);
    color: var(--text-color);
    --bs-table-bg: var(--bg-card);
    --bs-table-striped-bg: rgba(255, 255, 255, 0.02);
    --bs-table-hover-bg: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .table thead th {
    background-color: var(--bg-secondary);
    color: var(--text-color);
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .table td,
[data-theme="dark"] .table th {
    border-color: var(--border-color);
}

[data-theme="dark"] .table-hover tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Dark Mode - Forms */
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-color);
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
    background-color: var(--bg-card);
    border-color: var(--cor-primaria);
    color: var(--text-color);
}

[data-theme="dark"] .form-control::placeholder {
    color: var(--text-muted);
}

[data-theme="dark"] .form-label {
    color: var(--text-color);
}

/* Dark Mode - Modals */
[data-theme="dark"] .modal-content {
    background-color: var(--bg-card);
    border-color: var(--border-color);
}

[data-theme="dark"] .modal-header {
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .modal-footer {
    border-top-color: var(--border-color);
}

[data-theme="dark"] .modal-title {
    color: var(--text-color);
}

[data-theme="dark"] .btn-close {
    filter: invert(1);
}

/* Dark Mode - Dropdowns */
[data-theme="dark"] .dropdown-menu {
    background-color: var(--bg-card);
    border-color: var(--border-color);
}

[data-theme="dark"] .dropdown-item {
    color: var(--text-color);
}

[data-theme="dark"] .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

/* Dark Mode - Alerts */
[data-theme="dark"] .alert {
    border: 1px solid var(--border-color);
}

/* Dark Mode - List Groups */
[data-theme="dark"] .list-group-item {
    background-color: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-color);
}

[data-theme="dark"] .list-group-item-action:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
}

/* Dark Mode - Text Colors */
[data-theme="dark"] .text-muted {
    color: var(--text-muted) !important;
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
    color: var(--text-color);
}

/* Dark Mode - Pagination */
[data-theme="dark"] .page-link {
    background-color: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-color);
}

[data-theme="dark"] .page-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--border-color);
    color: var(--text-color);
}

[data-theme="dark"] .page-item.active .page-link {
    background-color: var(--cor-primaria);
    border-color: var(--cor-primaria);
}

/* Dark Mode - Breadcrumbs */
[data-theme="dark"] .breadcrumb {
    background-color: var(--bg-secondary);
}

[data-theme="dark"] .breadcrumb-item+.breadcrumb-item::before {
    color: var(--text-muted);
}

/* Dark Mode Toggle Button */
.theme-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(15deg);
}

.theme-toggle i {
    font-size: 1.2rem;
    color: white;
    transition: transform 0.3s ease;
}

.theme-toggle:hover i {
    transform: scale(1.1);
}

/* ===================================
   ENHANCED ANIMATIONS
   =================================== */

/* Fade In Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* Animation Classes */
.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease-out forwards;
}

.animate-slide-in-left {
    animation: slideInLeft 0.5s ease-out forwards;
}

.animate-slide-in-right {
    animation: slideInRight 0.5s ease-out forwards;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-bounce {
    animation: bounce 1s ease infinite;
}

/* Staggered Animations */
.stagger-1 {
    animation-delay: 0.1s;
}

.stagger-2 {
    animation-delay: 0.2s;
}

.stagger-3 {
    animation-delay: 0.3s;
}

.stagger-4 {
    animation-delay: 0.4s;
}

.stagger-5 {
    animation-delay: 0.5s;
}

.stagger-6 {
    animation-delay: 0.6s;
}

/* Page Transition */
.page-content {
    animation: fadeInUp 0.4s ease-out;
}

/* ===================================
   LOADING STATES
   =================================== */

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg,
            #f0f0f0 25%,
            #e0e0e0 50%,
            #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

[data-theme="dark"] .skeleton {
    background: linear-gradient(90deg,
            #2d3748 25%,
            #3d4a5c 50%,
            #2d3748 75%);
    background-size: 200% 100%;
}

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-text.medium {
    width: 80%;
}

.skeleton-text.full {
    width: 100%;
}

.skeleton-title {
    height: 24px;
    margin-bottom: 12px;
    width: 70%;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.skeleton-card {
    height: 120px;
    border-radius: 8px;
}

.skeleton-button {
    height: 38px;
    width: 100px;
    border-radius: 4px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--cor-primaria);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Button Loading State */
.btn.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

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

.btn.loading .btn-text {
    visibility: hidden;
}

/* ===================================
   ENHANCED UI COMPONENTS
   =================================== */

/* Enhanced Card Styles */
.card-hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.card-glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .card-glass {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Gradient Text */
.text-gradient {
    background: linear-gradient(135deg, var(--cor-primaria) 0%, #667eea 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Enhanced Badges */
.badge-glow {
    box-shadow: 0 0 10px currentColor;
}

.badge-animated {
    transition: all 0.3s ease;
}

.badge-animated:hover {
    transform: scale(1.1);
}

/* Floating Action Button */
.fab-custom-unused {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cor-primaria) 0%, color-mix(in srgb, var(--cor-primaria) 80%, black) 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1000;
}

.fab:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.fab i {
    font-size: 24px;
}

/* Tooltip Enhancement */
.tooltip-custom {
    position: relative;
}

.tooltip-custom::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: #1a1a2e;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.tooltip-custom:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-4px);
}

/* Progress Bar Enhanced */
.progress-animated .progress-bar {
    animation: progressAnimation 1.5s ease-out forwards;
    transform-origin: left;
}

@keyframes progressAnimation {
    from {
        transform: scaleX(0);
    }

    to {
        transform: scaleX(1);
    }
}

/* Enhanced Input Focus */
.form-control-modern {
    border: 2px solid #e4e4e7;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control-modern:focus {
    border-color: var(--cor-primaria);
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.1);
}

/* Status Indicators */
.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}

.status-dot.online {
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
    animation: pulse 2s infinite;
}

.status-dot.offline {
    background: #ef4444;
}

.status-dot.away {
    background: #f59e0b;
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    animation: bounce 0.5s ease;
}

/* ===================================
   RESPONSIVE ENHANCEMENTS
   =================================== */

/* Touch-friendly buttons on mobile */
@media (max-width: 768px) {
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 1rem;
    }

    .card {
        margin-bottom: 1rem;
    }

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

    /* Larger touch targets */
    .nav-link,
    .dropdown-item,
    .list-group-item-action {
        padding: 0.875rem 1rem;
    }

    /* FAB mobile position */
    .fab-custom-unused {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }

    .fab i {
        font-size: 20px;
    }
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid var(--cor-primaria);
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===================================
   TOAST NOTIFICATIONS
   =================================== */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast-notification {
    background: var(--bg-card, #ffffff);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 1rem 1.5rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 280px;
    max-width: 400px;
    animation: slideInRight 0.3s ease-out;
    border-left: 4px solid var(--cor-primaria);
}

.toast-notification.success {
    border-left-color: #10b981;
}

.toast-notification.error {
    border-left-color: #ef4444;
}

.toast-notification.warning {
    border-left-color: #f59e0b;
}

.toast-notification.info {
    border-left-color: #3b82f6;
}

.toast-notification .toast-icon {
    font-size: 1.5rem;
}

.toast-notification.success .toast-icon {
    color: #10b981;
}

.toast-notification.error .toast-icon {
    color: #ef4444;
}

.toast-notification.warning .toast-icon {
    color: #f59e0b;
}

.toast-notification.info .toast-icon {
    color: #3b82f6;
}

.toast-notification .toast-content {
    flex: 1;
}

.toast-notification .toast-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

.toast-notification .toast-message {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.toast-notification .toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.3s ease;
}

.toast-notification .toast-close:hover {
    color: var(--text-color);
}