/**
 * SB Admin 2 - Estilos Customizados Modernos
 * Integrado com Bootstrap 5.3 e FontAwesome / Bootstrap Icons
 */

:root {
    --sb-primary: #4e73df;
    --sb-primary-dark: #224abe;
    --sb-secondary: #858796;
    --sb-success: #1cc88a;
    --sb-info: #36b9cc;
    --sb-warning: #f6c23e;
    --sb-danger: #e74a3b;
    --sb-light: #f8f9fc;
    --sb-dark: #5a5c69;
    --sb-sidebar-width: 250px;
    --sb-sidebar-collapsed-width: 104px;
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f8f9fc;
    color: #5a5c69;
    overflow-x: hidden;
}

/* Wrapper */
#wrapper {
    display: flex;
    min-height: 100vh;
}

#content-wrapper {
    background-color: #f8f9fc;
    width: 100%;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

#content {
    flex: 1 0 auto;
}

/* Sidebar */
.sidebar {
    width: var(--sb-sidebar-width);
    min-height: 100vh;
    background-color: #4e73df;
    background-image: linear-gradient(180deg, #4e73df 10%, #224abe 100%);
    background-size: cover;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 100;
}

.sidebar .sidebar-brand {
    height: 4.375rem;
    text-decoration: none;
    font-size: 1.15rem;
    font-weight: 800;
    padding: 1.5rem 1rem;
    text-align: center;
    letter-spacing: 0.05rem;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar .sidebar-brand .sidebar-brand-icon i {
    font-size: 1.8rem;
}

.sidebar hr.sidebar-divider {
    margin: 0 1rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.sidebar .sidebar-heading {
    text-align: left;
    padding: 0 1rem;
    font-weight: 800;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.13rem;
}

.sidebar .nav-item {
    position: relative;
}

.sidebar .nav-item .nav-link {
    display: flex;
    align-items: center;
    padding: 0.85rem 1rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 700;
    font-size: 0.875rem;
    text-decoration: none;
    border-radius: 0.35rem;
    margin: 0 0.5rem 0.25rem;
    transition: background 0.15s ease-in-out, color 0.15s ease-in-out;
}

.sidebar .nav-item .nav-link i {
    font-size: 1rem;
    margin-right: 0.75rem;
    width: 1.5rem;
    text-align: center;
}

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

.sidebar .sidebar-toggler-wrapper {
    display: flex;
    justify-content: center;
    padding: 1.5rem 0;
}

.sidebar #sidebarToggle {
    width: 2.5rem;
    height: 2.5rem;
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.sidebar #sidebarToggle:hover {
    background-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

/* Sidebar Collapsed State */
.sidebar.toggled {
    width: var(--sb-sidebar-collapsed-width);
}

.sidebar.toggled .sidebar-brand .sidebar-brand-text,
.sidebar.toggled .sidebar-heading,
.sidebar.toggled .nav-item .nav-link span {
    display: none;
}

.sidebar.toggled .nav-item .nav-link {
    text-align: center;
    padding: 0.75rem;
    margin: 0 0.25rem 0.25rem;
    justify-content: center;
}

.sidebar.toggled .nav-item .nav-link i {
    margin-right: 0;
    font-size: 1.25rem;
}

/* Topbar */
.topbar {
    height: 4.375rem;
    background-color: #fff;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    z-index: 10;
}

.topbar .nav-item .nav-link {
    height: 4.375rem;
    display: flex;
    align-items: center;
    padding: 0 0.75rem;
    color: #d1d3e2;
}

.topbar .nav-item .nav-link:hover {
    color: #b7b9cc;
}

.topbar .topbar-divider {
    width: 0;
    border-right: 1px solid #e3e6f0;
    height: calc(4.375rem - 2rem);
    margin: auto 1rem;
}

.img-profile {
    height: 2rem;
    width: 2rem;
}

/* Cards com Borda Esquerda - Assinatura SB Admin 2 */
.border-left-primary {
    border-left: 0.25rem solid var(--sb-primary) !important;
}

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

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

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

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

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: #fff;
    background-clip: border-box;
    border: 1px solid #e3e6f0;
    border-radius: 0.35rem;
}

.card .card-header {
    background-color: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
}

/* Auth / Login Styles */
.bg-login-image {
    background: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.card-login {
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

/* Scroll to Top */
#scrollToTop {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    display: none;
    width: 2.75rem;
    height: 2.75rem;
    text-align: center;
    color: #fff;
    background: rgba(90, 92, 105, 0.5);
    line-height: 46px;
    border-radius: 0.35rem;
    z-index: 1000;
    transition: background 0.2s ease;
}

#scrollToTop:hover {
    background: #5a5c69;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .sidebar {
        width: var(--sb-sidebar-collapsed-width);
    }
    
    .sidebar .sidebar-brand .sidebar-brand-text,
    .sidebar .sidebar-heading,
    .sidebar .nav-item .nav-link span {
        display: none;
    }

    .sidebar .nav-item .nav-link {
        text-align: center;
        padding: 0.75rem;
        margin: 0 0.25rem 0.25rem;
        justify-content: center;
    }

    .sidebar .nav-item .nav-link i {
        margin-right: 0;
        font-size: 1.25rem;
    }

    .sidebar.toggled {
        width: 0;
        overflow: hidden;
        margin-left: -100px;
    }
}
