/* ===== LUNOZ INSPIRED STYLES ===== */

:root {
    --lunoz-primary: #5e72e4;
    --lunoz-primary-dark: #4c63d2;
    --lunoz-secondary: #8392ab;
    --lunoz-success: #2dce89;
    --lunoz-danger: #f5365c;
    --lunoz-warning: #fb6340;
    --lunoz-info: #11cdef;
    --lunoz-dark: #212529;
    --lunoz-light: #f8f9fa;
    --lunoz-sidebar-bg: #1a1e2e;
    --lunoz-sidebar-width: 260px;
    --lunoz-sidebar-collapsed-width: 80px;
    --lunoz-header-height: 70px;
    --lunoz-border-radius: 8px;
    --lunoz-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --lunoz-shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --lunoz-transition: all 0.3s ease;
}

/* ===== BODY & WRAPPER ===== */
.lunoz-body {
    background-color: #f5f7fa;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow-x: hidden;
}

.lunoz-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.lunoz-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--lunoz-sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, var(--lunoz-sidebar-bg) 0%, #1e2238 100%);
    color: #fff;
    z-index: 1000;
    transition: var(--lunoz-transition);
    overflow-y: auto;
    overflow-x: hidden;
}

/* Sidebar Collapsed - Apenas ícones */
.lunoz-sidebar.collapsed {
    width: var(--lunoz-sidebar-collapsed-width) !important;
}

.lunoz-sidebar.collapsed .lunoz-sidebar-brand {
    padding: 1.5rem 0.5rem !important;
    justify-content: center !important;
}

.lunoz-sidebar.collapsed .lunoz-sidebar-brand a {
    justify-content: center !important;
    width: auto;
}

.lunoz-sidebar.collapsed .lunoz-brand-text {
    display: none !important;
}

.lunoz-sidebar.collapsed .lunoz-sidebar-nav {
    padding: 0 0.5rem !important;
}

.lunoz-sidebar.collapsed .lunoz-nav-link {
    justify-content: center !important;
    padding: 0.75rem !important;
    position: relative;
}

.lunoz-sidebar.collapsed .lunoz-nav-link span {
    display: none !important;
}

.lunoz-sidebar.collapsed .lunoz-nav-link i:last-child {
    display: none !important;
}

.lunoz-sidebar.collapsed .lunoz-nav-submenu {
    display: none !important;
}

/* Tooltip para links quando collapsed */
.lunoz-sidebar.collapsed .lunoz-nav-link {
    cursor: pointer;
}

/* Adicionar tooltips quando collapsed */
.lunoz-sidebar.collapsed .lunoz-nav-link[title] {
    position: relative;
}

.lunoz-sidebar::-webkit-scrollbar {
    width: 6px;
}

.lunoz-sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.lunoz-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.lunoz-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Sidebar Brand */
.lunoz-sidebar-brand {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
    display: flex;
}

.lunoz-sidebar-brand a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

.lunoz-brand-logo {
    width: 40px;
    height: 40px;
    border-radius: var(--lunoz-border-radius);
    object-fit: cover;
}

.lunoz-brand-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--lunoz-border-radius);
    font-size: 1.25rem;
}

.lunoz-brand-text {
    flex: 1;
}

.brand-title {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1;
}

/* Sidebar Navigation */
.lunoz-sidebar-nav {
    padding: 0 0.75rem;
}

.lunoz-nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lunoz-nav-item {
    margin-bottom: 0.25rem;
}

.lunoz-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: var(--lunoz-border-radius);
    transition: var(--lunoz-transition);
    font-size: 0.9375rem;
    font-weight: 500;
}

.lunoz-nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateX(4px);
}

.lunoz-nav-link.active {
    background: var(--lunoz-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(94, 114, 228, 0.4);
}

.lunoz-nav-link.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.lunoz-nav-link.locked:hover {
    transform: none;
}

.lunoz-nav-link i:first-child {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.lunoz-nav-link.has-submenu {
    position: relative;
}

.lunoz-nav-submenu {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0 0;
    padding-left: 2.5rem;
}

.lunoz-nav-submenu li a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    border-radius: var(--lunoz-border-radius);
    font-size: 0.875rem;
    transition: var(--lunoz-transition);
}

.lunoz-nav-submenu li a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* ===== MAIN CONTENT ===== */
.lunoz-main {
    flex: 1;
    margin-left: var(--lunoz-sidebar-width);
    transition: var(--lunoz-transition);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.lunoz-sidebar.collapsed ~ .lunoz-main {
    margin-left: var(--lunoz-sidebar-collapsed-width);
}

/* ===== HEADER ===== */
.lunoz-header {
    height: var(--lunoz-header-height);
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    box-shadow: var(--lunoz-shadow-sm);
    position: sticky;
    top: 0;
    z-index: 999;
}

.lunoz-header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.lunoz-sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--lunoz-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--lunoz-border-radius);
    transition: var(--lunoz-transition);
}

.lunoz-sidebar-toggle:hover {
    background: var(--lunoz-light);
    color: var(--lunoz-primary);
}

.lunoz-breadcrumb {
    font-size: 0.875rem;
    color: var(--lunoz-secondary);
    display: flex;
    align-items: center;
    margin-left: 1rem;
    min-height: 1.5rem;
}

.lunoz-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.lunoz-header-btn {
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--lunoz-secondary);
    cursor: pointer;
    transition: var(--lunoz-transition);
    position: relative;
}

.lunoz-header-btn:hover {
    background: var(--lunoz-light);
    color: var(--lunoz-primary);
}

.lunoz-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--lunoz-danger);
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

/* User Menu */
.lunoz-user-btn {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: var(--lunoz-border-radius);
    cursor: pointer;
    transition: var(--lunoz-transition);
}

.lunoz-user-btn:hover {
    background: var(--lunoz-light);
}

.lunoz-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--lunoz-primary), var(--lunoz-primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
}

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

.lunoz-user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--lunoz-dark);
    line-height: 1.2;
}

.lunoz-user-role {
    font-size: 0.75rem;
    color: var(--lunoz-secondary);
    line-height: 1;
}

/* ===== CONTENT ===== */
.lunoz-content {
    flex: 1;
    padding: 2rem;
}

.lunoz-messages {
    margin-bottom: 1.5rem;
}

/* ===== CARDS ===== */
.lunoz-content .card {
    border: none;
    border-radius: var(--lunoz-border-radius);
    box-shadow: var(--lunoz-shadow-sm);
    transition: var(--lunoz-transition);
    margin-bottom: 1.5rem;
    background: #fff;
}

.lunoz-content .card:hover {
    box-shadow: var(--lunoz-shadow);
    transform: translateY(-2px);
}

.lunoz-content .card-header {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    border-radius: var(--lunoz-border-radius) var(--lunoz-border-radius) 0 0;
}

.lunoz-content .card-body {
    padding: 1.5rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .lunoz-sidebar {
        transform: translateX(-100%);
        box-shadow: none;
    }

    .lunoz-sidebar.show {
        transform: translateX(0);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }

    .lunoz-main {
        margin-left: 0;
    }

    .lunoz-header {
        padding: 0 1rem;
    }

    .lunoz-content {
        padding: 1rem;
    }

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

    .lunoz-breadcrumb {
        display: none;
    }

    .lunoz-content .card {
        margin-bottom: 1rem;
    }

    .lunoz-content .card-header {
        padding: 1rem;
    }

    .lunoz-content .card-body {
        padding: 1rem;
    }

    .lunoz-notification-menu {
        min-width: 300px;
        max-width: 90vw;
    }
}

/* ===== UTILITIES ===== */
.lunoz-page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--lunoz-dark);
    margin-bottom: 0.5rem;
}

.lunoz-page-subtitle {
    font-size: 0.9375rem;
    color: var(--lunoz-secondary);
    margin-bottom: 2rem;
}

/* Notification Menu */
.lunoz-notification-menu {
    min-width: 350px;
    max-height: 500px;
    overflow-y: auto;
    border: none;
    box-shadow: var(--lunoz-shadow);
    border-radius: var(--lunoz-border-radius);
    padding: 0.5rem 0;
}

.lunoz-notification-menu .dropdown-header {
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    color: var(--lunoz-dark);
}

.lunoz-notification-menu .dropdown-item {
    padding: 0.75rem 1.25rem;
    transition: var(--lunoz-transition);
}

.lunoz-notification-menu .dropdown-item:hover {
    background: var(--lunoz-light);
}

/* ===== BOTÕES ===== */
.lunoz-content .btn {
    border-radius: var(--lunoz-border-radius);
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    transition: var(--lunoz-transition);
}

.lunoz-content .btn-primary {
    background: var(--lunoz-primary);
    border-color: var(--lunoz-primary);
}

.lunoz-content .btn-primary:hover {
    background: var(--lunoz-primary-dark);
    border-color: var(--lunoz-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(94, 114, 228, 0.4);
}

.lunoz-content .btn-success {
    background: var(--lunoz-success);
    border-color: var(--lunoz-success);
}

.lunoz-content .btn-success:hover {
    background: #26b87a;
    border-color: #26b87a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(45, 206, 137, 0.4);
}

.lunoz-content .btn-danger {
    background: var(--lunoz-danger);
    border-color: var(--lunoz-danger);
}

.lunoz-content .btn-danger:hover {
    background: #e02e52;
    border-color: #e02e52;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 54, 92, 0.4);
}

/* ===== BREADCRUMB ===== */
.lunoz-breadcrumb .breadcrumb {
    margin-bottom: 0;
    background: transparent;
    padding: 0;
}

.lunoz-breadcrumb .breadcrumb-item {
    color: var(--lunoz-secondary);
}

.lunoz-breadcrumb .breadcrumb-item.active {
    color: var(--lunoz-dark);
    font-weight: 500;
}

.lunoz-breadcrumb .breadcrumb-item+.breadcrumb-item::before {
    content: "›";
    color: var(--lunoz-secondary);
    padding: 0 0.5rem;
}

/* ===== OVERLAY PARA MOBILE ===== */
.lunoz-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    display: none;
    transition: opacity 0.3s ease;
}

.lunoz-sidebar-overlay.show {
    display: block;
    opacity: 1;
}

/* ===== TABELAS ===== */
.lunoz-content .table {
    background: #fff;
    border-radius: var(--lunoz-border-radius);
    overflow: hidden;
}

.lunoz-content .table thead {
    background: var(--lunoz-light);
}

.lunoz-content .table thead th {
    border-bottom: 2px solid #e9ecef;
    font-weight: 600;
    color: var(--lunoz-dark);
    padding: 1rem;
}

.lunoz-content .table tbody tr {
    transition: var(--lunoz-transition);
}

.lunoz-content .table tbody tr:hover {
    background: var(--lunoz-light);
}

/* ===== FORMULÁRIOS ===== */
.lunoz-content .form-control:focus,
.lunoz-content .form-select:focus {
    border-color: var(--lunoz-primary);
    box-shadow: 0 0 0 0.2rem rgba(94, 114, 228, 0.25);
}

.lunoz-content .form-label {
    font-weight: 500;
    color: var(--lunoz-dark);
    margin-bottom: 0.5rem;
}

/* ===== ALERTAS ===== */
.lunoz-content .alert {
    border-radius: var(--lunoz-border-radius);
    border: none;
    box-shadow: var(--lunoz-shadow-sm);
}

.lunoz-content .alert-success {
    background: rgba(45, 206, 137, 0.1);
    color: #1a8d5e;
    border-left: 4px solid var(--lunoz-success);
}

.lunoz-content .alert-danger {
    background: rgba(245, 54, 92, 0.1);
    color: #c41e3a;
    border-left: 4px solid var(--lunoz-danger);
}

.lunoz-content .alert-warning {
    background: rgba(251, 99, 64, 0.1);
    color: #c94d2e;
    border-left: 4px solid var(--lunoz-warning);
}

.lunoz-content .alert-info {
    background: rgba(17, 205, 239, 0.1);
    color: #0a9bb8;
    border-left: 4px solid var(--lunoz-info);
}

/* ===== BADGES ===== */
.lunoz-content .badge {
    padding: 0.35em 0.65em;
    font-weight: 500;
    border-radius: var(--lunoz-border-radius);
}

/* ===== LOADING STATES ===== */
.lunoz-content .spinner-border {
    width: 1.5rem;
    height: 1.5rem;
    border-width: 0.2em;
}

/* ===== UTILITY CLASSES ===== */
.lunoz-shadow-sm {
    box-shadow: var(--lunoz-shadow-sm) !important;
}

.lunoz-shadow {
    box-shadow: var(--lunoz-shadow) !important;
}

.lunoz-rounded {
    border-radius: var(--lunoz-border-radius) !important;
}

/* ===== ANIMAÇÕES ===== */
@keyframes lunoz-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.lunoz-fade-in {
    animation: lunoz-fade-in 0.3s ease-in;
}

/* ===== SCROLLBAR PERSONALIZADA ===== */
.lunoz-content::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.lunoz-content::-webkit-scrollbar-track {
    background: var(--lunoz-light);
    border-radius: 4px;
}

.lunoz-content::-webkit-scrollbar-thumb {
    background: var(--lunoz-secondary);
    border-radius: 4px;
}

.lunoz-content::-webkit-scrollbar-thumb:hover {
    background: var(--lunoz-primary);
}