body,
select,
input,
textarea,
button {
    font-family: "Raleway" !important;
    font-size: 0.8rem;
}
body {
    margin: 0;
    display: flex;
    min-height: 100vh;
    background-color: #e4edf2;
    transition: margin-left 0.2s ease-in-out;
}

::-webkit-scrollbar {
    width: 5px;
    height: 5px;
    /* A altura s? ? vista quando a rolagem ? horizontal */
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: #356e8b;
    border-radius: 5px;
}

.menu-fixed {
    width: 63px;
    flex-direction: column;
    text-align: center;
    background-color: #e4edf2;
    padding: 10px 20px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: calc(100vh - 21px);
    position: sticky;
    top: 0px;
    left: 0;
    right: 0;
    gap: 8px;
    font-size: 0.8em;
    border-right: 1px solid #bdbde5;
}

.menu-fixed > div {
    width: initial;
    padding: 5px 1.8rem;
    margin: -10px 0 -2px 0;
}

.menu-fixed > div a {
    background-color: transparent;
    width: auto;
    padding: 2px;
    display: flex;
    border-radius: 0;
    cursor: pointer;
    box-shadow: none;
    transition: all 0.2s ease-in-out;
}

.menu-fixed > div a:hover {
    background-color: #a470b9;
    border-radius: 20px;
}

.menu-fixed > a {
    background-color: #fff;
    width: inherit;
    padding: 0.6rem 9.6px;
    display: flex;
    flex-direction: column;
    border-radius: 5px;
    cursor: pointer;
    gap: 6px;
    box-shadow: 4px 4px 4px 0px rgba(0, 0, 0, 0.1);
    color: #555;
    text-decoration: none;
    font-weight: 500;
}

.menu-fixed a > i {
    color: #a470b9;
}

.menu-fixed a:hover,
.menu-fixed a.active {
    background-color: #cde3eb;
    color: #356e8b;
    font-weight: 600;
    text-decoration: none;
}

.topbar {
    background-color: #fff;
    padding: 10px 20px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    height: 30px;
    position: fixed;
    top: 0;
    left: 104px;
    right: 0;
}

.topbar-left {
    display: flex;
    align-items: center;
}

.topbar-left h1 {
    font-size: 1.1em;
    color: #356e8b;
    margin: 15px;
    display: flex;
    align-items: center;
}

.topbar-left .grid-icon {
    color: #356e8b;
    font-size: 1.4em;
    margin-right: 8px;
}

.topbar-right {
    display: flex;
    align-items: center;
}

.topbar-right .user-info {
    display: flex;
    align-items: center;
    margin-left: 15px;
    color: #555;
    font-size: 0.85em;
}

.topbar-right .user-info img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    margin-right: 5px;
    object-fit: cover;
}

.topbar-right .language-selector {
    margin-left: 10px;
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 0.85em;
    color: #555;
    cursor: pointer;
}

.sidebar {
    background-color: #fff;
    width: 180px;
    box-shadow: 3px 2px 8px 0px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    transition: width 0.2s ease-in-out;
    position: fixed;
    top: 50px;
    left: 104px;
    bottom: 0;
    padding: 10px;
    overflow-x: inherit;
}

.sidebar-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    height: 40px;
}

.sidebar-header h2 {
    font-size: 1.2em;
    color: #333;
    margin: 0;
}

.sidebar-header button.collapse-btn {
    background: #ccc;
    border: none;
    cursor: pointer;
    color: #777;
    padding: 5px 8px;
    margin-left: 5px;
    font-size: 0.8em;
    border-radius: 50px;
    margin-right: -20px;
}

.sidebar .new-button {
    background-color: #356e8b;
    color: white;
    padding: 8px 12px;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex: 1;
}

.sidebar .new-button i {
    margin-right: 8px;
    font-size: 1em;
}

.sidebar-menu {
    margin-bottom: 15px;
    overflow-y: auto;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    color: #333;
    padding: 8px;
    text-decoration: none;
    margin-bottom: 3px;
    border-radius: 5px;
    transition: background-color 0.15s ease-in-out;
    font-size: 0.9em;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background-color: #e4edf2;
    color: #356e8b;
    font-weight: 600;
}

.sidebar-menu a i {
    margin: 5px 10px;
    color: #555;
    width: 20px;
    text-align: center;
    font-size: 1em;
}

.sidebar-menu a.active i {
    color: #356e8b;
}

.content {
    flex-grow: 1;
    padding: 15px;
    margin-top: 50px;
    background-color: #e4edf2;
    margin-left: 200px;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    padding: 10px 15px;
    border-radius: 5px;
}

.content-header h2 {
    font-size: 1.4em;
    color: #333;
    margin-bottom: 0;
    width: auto;
}

.content-header .right-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.content-header .right-actions select,
.content-header .right-actions button {
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    color: #555;
    cursor: pointer;
    font-size: 0.9em;
}

.content-header .right-actions button i {
    margin-right: 5px;
}

.report-section {
    background-color: #fff;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-bottom: 15px;
}

.report-section h3 {
    color: #555;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1em;
    font-weight: normal;
}

.report-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.report-card {
    background-color: #f9f9f9;
    padding: 12px;
    border-radius: 5px;
    text-align: center;
}

.report-card .value {
    font-size: 1.4em;
    color: #333;
    font-weight: bold;
    margin-bottom: 3px;
}

.report-card .label {
    color: #777;
    font-size: 0.8em;
}

.chart-section {
    background-color: #fff;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.chart-section h2 {
    color: #333;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.chart-legend {
    margin-top: 10px;
    font-size: 0.8em;
    color: #555;
}

.chart-legend span {
    display: inline-block;
    margin-right: 10px;
}

.chart-legend .legend-color {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 3px;
}

.div-label {
    color: #a1a1a1;
    font-size: 0.8rem;
    font-weight: 600;
    background-color: #f7f7f7;
    padding: 5px 10px;
    margin-bottom: 5px;
    border-radius: 5px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #dfdfdf;
}

.dsp-none {
    display: none !important;
}

.div-label-group {
    display: flex;
    flex-direction: column;
}

.cursor-p {
    cursor: pointer;
}

/* Collapsed Sidebar Styles */
body.collapsed .sidebar {
    width: 30px;
}

body.collapsed .sidebar .sidebar-header h2 {
    display: none;
}

body.collapsed .sidebar .sidebar-menu a span {
    display: none;
}

body.collapsed .sidebar .sidebar-menu a {
    justify-content: center;
    padding: 8px;
}

body.collapsed .sidebar .new-button span {
    display: none;
}

body.collapsed .sidebar .new-button i {
    margin-right: 0;
}

body.collapsed .sidebar .new-button {
    padding: 6px 7px;
    border-radius: 15px;
    width: auto;
    height: auto;
    justify-content: center;
    /* margin-bottom: 15px; */
}

body.collapsed .content {
    margin-left: 50px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    body {
        flex-direction: column;
    }

    .topbar {
        position: sticky;
        top: 0;
        left: 0;
        right: 0;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 8px 15px;
        height: auto;
    }

    .menu-fixed {
        width: auto;
        overflow-x: auto;
        flex-direction: row;
        height: 30px;
    }

    .menu-fixed a {
        flex-direction: row;
    }

    .topbar-left h1 {
        width: max-content;
    }

    .div-label-group {
        flex-direction: row;
    }
    .sidebar {
        width: auto !important;
    }

    .menu-fixed > div {
        padding: 0;
        margin: 0 0 0 -10px;
    }

    .topbar-left h1 {
        font-size: 1em;
        margin-right: 10px;
    }

    .topbar-left > i {
        color: #a470b9;
        margin-right: 0;
    }

    .topbar-left .grid-icon {
        font-size: 1.3em;
        margin-right: 5px;
    }

    .topbar-right {
        margin-top: 0;
    }

    .sidebar {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
        position: sticky;
        top: 50px;
        left: 0;
        right: 0;
        z-index: 99;
        padding: 5px;
        align-items: center;
        justify-content: space-between;
        box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
        height: auto;
    }

    .sidebar-header {
        margin-bottom: 0;
        padding: 0;
    }

    .sidebar-header h2 {
        font-size: 1em;
        display: none;
    }

    .sidebar-header button.collapse-btn {
        display: none;
    }

    .div-label {
        display: none;
    }

    .sidebar-menu {
        display: flex;
        margin-bottom: -5px !important;
        padding: 0;
    }

    .sidebar-menu a {
        padding: 6px 8px;
        margin-bottom: 0;
        margin-right: 5px;
        white-space: nowrap;
        font-size: 0.8em;
    }

    .sidebar-menu a i {
        margin: 5px 10px 5px 0px;
    }

    .sidebar-menu a span {
        /* display: none; */
    }

    .sidebar .new-button {
        font-size: 0.8em;
        padding: 6px 10px;
        width: auto;
        margin: 5px 10px 5px 5px;
    }

    .sidebar.collapsed {
        width: 100%;
    }

    .sidebar.collapsed .sidebar-menu a {
        padding: 6px;
    }

    .content {
        margin-top: 0;
        padding: 10px;
        margin-left: 0;
    }

    .content-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 8px 10px;
    }

    .content-header h2 {
        font-size: 1.2em;
        margin-bottom: 5px;
    }

    .content-header .right-actions {
        width: 100%;
        margin-top: 5px;
        justify-content: space-between;
    }

    .content-header .right-actions select,
    .content-header .right-actions button {
        font-size: 0.8em;
        padding: 5px 8px;
    }

    .report-grid {
        grid-template-columns: 1fr;
    }
}
