@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

:root {
    --roxo: #6f42c1;
    --roxo-claro: #8a65cc;
    --roxo-escuro: #5e3a9c;
    --branco: #ffffff;
    --cinza: #f8f9fa;
    --cinza-claro: #e9ecef;
    --cinza-escuro: #343a40;
    --texto-primario: #212529;
    --sombra-card: rgba(0, 0, 0, 0.1);
    --hover-select: #e0e0e0;
    --verde-success: #218c2b;
    --vermelho-fail: #ed3333;

    --sidebar-width: 250px;
}

body.dark-mode {
    --roxo: #6f42c1;
    --roxo-claro: #8a65cc;
    --roxo-escuro: #5e3a9c;
    --branco: #212529;
    --cinza: #343a40;
    --cinza-claro: #495057;
    --cinza-escuro: #ffffff;
    --texto-primario: #f8f9fa;
    --sombra-card: rgba(0, 0, 0, 0.5);
    --hover-select: #494e53;
    --verde-success: #1fa52c;
    --vermelho-fail: #a90a0a;
}

body, html {
    min-height: 100vh;
    margin: 0;
    font-family: -apple-system, 'Lato', BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--cinza);
    color: var(--texto-primario);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.text-purple {
    color: var(--roxo) !important;
}

.text-dark-purple {
    color: var(--roxo-escuro) !important;
}

.text-light-purple {
    color: var(--roxo-claro) !important;
}

.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.background-purple {
    background-color: var(--roxo) !important;
}

.background-dark-purple {
    background-color: var(--roxo-escuro) !important;
}

.background-light-purple {
    background-color: var(--roxo-claro) !important;
}

.btn-purple {
    background-color: var(--roxo) !important;
    border: none;
}

.spinner {
    width: 25px;
    height: 25px;
    border: 4px solid var(--cinza-claro);
    border-top: 4px solid var(--roxo);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-feedback {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 0;
    font-size: 1.1rem;
    color: var(--texto-secundario);
}

.menu-scrollable {
    overflow-y: auto;
    max-height: 100vh;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 28px;
    height: 28px;
    border: 2px solid var(--cinza-claro);
    border-radius: 4px;
    background-color: var(--branco);
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease-in-out;
    margin: 0;
}

input[type="checkbox"]:hover,
input[type="checkbox"]:focus {
    border-color: var(--roxo);
    box-shadow: 0 0 0 3px rgba(106, 64, 168, 0.25);
}

input[type="checkbox"]:checked::before {
    content: '\2713';
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    color: #fff;
}

input[type="checkbox"]:disabled {
    background-color: var(--cinza-claro);
}

input[type="checkbox"]:checked {
    background-color: var(--roxo);
    border-color: var(--roxo);
}

a.disabled {
    background-color: var(--cinza-claro) !important;
    color: #727171 !important;
    cursor: not-allowed;
}

body.dark-mode a.disabled{
    color: var(--texto-primario) !important;
}

.switch {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    border-radius: 50%;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
}

input:checked + .slider {
    background-color: var(--roxo-claro);
}

input:checked + .slider:before {
    transform: translateX(14px);
}

::-webkit-scrollbar {
    width: 8px;
    height: 5px;
}

::-webkit-scrollbar-thumb {
    background-color: var(--roxo);
    border-radius: 4px;
}

::-webkit-scrollbar-track {
    background-color: var(--cinza-claro);
    border-radius: 4px;
}

body.dark-mode ::-webkit-scrollbar-thumb {
    background-color: var(--roxo-claro);
}

body.dark-mode ::-webkit-scrollbar-track {
    background-color: var(--cinza);
}

.menu-scrollable {
    scrollbar-width: thin;
    scrollbar-color: var(--roxo-claro) var(--cinza-claro);
}

body.dark-mode .menu-scrollable {
    scrollbar-color: var(--roxo-claro) var(--cinza);
}

#wrapper {
    display: flex;
}

.sidebar-wrapper {
    min-height: 100vh;
    max-height: 100vh;
    margin-left: calc(-1 * var(--sidebar-width));
    font-family: -apple-system, 'Montserrat', BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    transition: margin-left 0.25s ease-in-out;
    background-color: var(--cinza);
    color: var(--texto-primario);
    width: var(--sidebar-width);
    flex-shrink: 0;
    z-index: 1030;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 5px var(--sombra-card);
}

.sidebar-heading {
    padding: 0.875rem 1.25rem;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--texto-primario);
}

.menu-logo {
    object-fit: cover;
    width: 200px;
    height: 54px;
    margin: 0;
    padding: 0;
}

.list-group {
    --bs-list-group-border-color: none;
    flex-grow: 1;
}

.sidebar-section-title {
    padding: 0.75rem 1.25rem 0.25rem 0.75rem;
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--cinza-escuro);
    text-transform: uppercase;
    opacity: 0.8;
}

.list-group hr {
    background-color: var(--cinza-claro);
    border: none;
    height: 1px;
    opacity: 0.5;
}

.list-group-item {
    background-color: var(--cinza);
    color: var(--texto-primario);
    border-color: none;
    transition: background-color 0.15s ease-in-out, color 0.15s ease-in-out;
}

.list-group-item:hover {
    background-color: var(--hover-select);
    color: var(--texto-primario);
}

.list-group-item.active {
    background-color: var(--roxo-claro);
    color: #FFFFFF;
}

.user-profile {
    background-color: var(--cinza);
    color: var(--texto-primario);
    padding: 1rem;
    margin-top: auto;
}

.page-content-wrapper {
    width: 100%;
    margin-left: 0;
    padding: 20px;
    transition: transform 0.25s ease-in-out, margin-left 0.25s ease-in-out, width 0.25s ease-in-out;
    overflow-x: hidden;   
}

#wrapper.toggled .sidebar-wrapper {
    margin-left: 0;
}

#wrapper.toggled .page-content-wrapper {
    transform: translateX(var(--sidebar-width));
}

#menu-toggle {
    position: fixed;
    top: 0.3rem;
    left: 0rem;
    background-color: var(--roxo);
    z-index: 1029;
    border: none;
    border-top-right-radius: 40%;
    border-bottom-right-radius: 40%;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    transition: left 0.25s ease-in-out;
    width: 42px;
    height: 42px;
}

#menu-toggle:hover {
    background-color: var(--roxo-escuro);
    border-color: var(--roxo-escuro);
}

#wrapper.toggled #menu-toggle {
    left: var(--sidebar-width);
}

.top-buttons-div button {
    width: 2rem;
    height: 2rem;
    color: var(--texto-primario) !important;
    background-color: var(--cinza-claro) !important;
}

.top-buttons-div button .fas {
    color: var(--texto-primario) !important;
}

#notifications-number {
    position: absolute;
    margin: 0;
    padding: 0;
    top: -7px;
    left: 1.2rem;
    width: 19px;
    height: 19px;
    font-size: 0.7rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--roxo);
    color: #fff;
    border-radius: 50%;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2 ease-in-out, visibility .2s ease-in-out;
}

#notifications-number.visible {
    visibility: visible;
    opacity: 1;
}

.notifications {
    position: absolute;
    top: 2.3rem;
    left: -310px;
    width: 340px;
    max-height: 500px;
    flex-direction: column;
    background-color: var(--cinza);
    border: 1px solid var(--roxo-escuro);
    border-radius: 7px;
    overflow: auto;
    overflow-x: hidden;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease-in-out, visibility .2s ease-in-out;
}

.notifications.open {
    opacity: 1;
    visibility: visible;
}

.no-notifications {
    margin: 0;
    padding: 5px 0;
    text-align: center;
}

.notifications .notification {
    padding: 0 15px;
    cursor: pointer;
}

.notifications .notification:hover {
    background-color: var(--hover-select);
}

.notifications .notification.read {
    opacity: 0.7;
}

.notifications .reads-title {
    text-align: center;
    margin: 10px 0 0 0;
    padding: 0;
}

.notifications hr {
    width: calc(100% + 30px);
    margin: 0 0 0 -15px;
    padding: 0;
}

.notifications .notification .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    font-size: 1rem;
}

.notifications .notification a:first-child {
    padding-top: 10px;
}

.notifications .notification a:last-of-type {
    padding-bottom: 10px;
}

.notifications .notification p {
    margin: 0;
    padding: 0;
    color: var(--texto-primario);
    width: 100%;
}

.notifications .notification .time {
    color: var(--texto-primario);
    margin-top: auto;
    font-size: 0.7rem;
}

.notifications .notification .open-icon {
    color: var(--roxo-claro);
    font-size: 14px;
}

.messages-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message-card {
    background-color: var(--branco);
    border: 1px solid var(--cinza-claro);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 8px var(--sombra-card);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.message-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px var(--sombra-card);
}

.message-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--texto-primario);
    margin-bottom: 0.5rem;
}

.message-content {
    font-size: 1rem;
    color: var(--cinza-escuro);
    white-space: pre-wrap;
}

body.dark-mode .message-card {
    background-color: var(--cinza);
    border-color: var(--cinza-claro);
}

body.dark-mode .message-title {
    color: var(--texto-primario);
}

body.dark-mode .message-content {
    color: var(--cinza-escuro);
}

.title-welcome {
    color: var(--roxo);
}

body.dark-mode .title-welcome {
    color: var(--roxo-claro);
}

footer {
    color: var(--texto-primario);
}

.homePageButton {
    padding: 0.85rem 1.8rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: bold;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
    display: inline-block;
    align-items: center;
    justify-content: center;
    background-color: var(--roxo);
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    margin: 0 auto;
}

.homePageButton:hover {
    background-color: var(--roxo-escuro);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

@media (max-width: 1440px) {
    input[type="checkbox"] {
        width: 18px;
        height: 18px;
        padding: 0.65rem;
    }
}

@media (max-width: 768px) {
    .user-profile {
        margin-top: 0;
    }

    .list-group {
        flex-grow: 0;
    }

    .page-content-wrapper {
        padding: 5px;
    }

    input[type="checkbox"] {
        width: 8px;
        height: 8px;
        padding: 0.6rem;
    }
}

@media (max-width: 600px) {
    .container-fluid {
        margin-top: 50px;
    }
}

@media (max-width: 460px) {
    .notifications {
        width: 90vw;
        left: calc(-95vw + 90px);
    }
}

@media (min-width: 768px) {
    .sidebar-wrapper {
        margin-left: 0;
    }

    .page-content-wrapper {
        margin-left: var(--sidebar-width);
        width: calc(100% - var(--sidebar-width));
        transform: none;
    }

    #wrapper.toggled .sidebar-wrapper {
        margin-left: calc(-1 * var(--sidebar-width));
    }

    #wrapper.toggled .page-content-wrapper {
        margin-left: calc(-1 * var(--sidebar-width));
        width: 100%;
    }

    #menu-toggle {
        left: var(--sidebar-width);
    }

    #wrapper.toggled #menu-toggle {
        left: 0rem;
    }
}