html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    background: #fff; /* Garante que o fundo seja consistente */
}

body {
    min-height: 100vh;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}

/* ===================================
   VARIÁVEIS CSS GLOBAIS - PIRES
   =================================== */
:root {
    /* Cor Principal PIRES */
    --primary-color: #854052;
    --primary-dark: #6b3341;
    --primary-light: #9f5564;
    
    /* Cores Secundárias */
    --secondary-color: #000000;
    --secondary-light: #2c2c2c;
    
    /* Texto */
    --text-dark: #1a1a1a;
    --text-light: #666666;
    --text-muted: #9197ae;
    
    /* Background */
    --background: #f5f5f5;
    --background-light: #f8f9fa;
    --white: #ffffff;
    
    /* Estados */
    --success: #2ecc71;
    --danger: #e74c3c;
    --warning: #f39c12;
    --info: #3498db;
    
    /* Sidebar */
    --sidebar-bg-start: #854052;
    --sidebar-bg-end: #6b3341;
    --sidebar-text: #ecf0f1;
    --sidebar-hover-bg: rgba(255, 255, 255, 0.1);
    --sidebar-active-bg: rgba(255, 255, 255, 0.2);
    
    /* Sombras */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.scrollLock {
    overflow: hidden;
    height: calc(100vh - 56px);
}

@keyframes loaderIconRotating {
    0%   {transform:rotateZ(0deg);}
    20%  {transform:rotateZ(360deg);}
    40%  {transform:rotateZ(720deg);}
    70%  {transform:rotateZ(900deg);}
    100% {transform:rotateZ(1080deg);}
}


md-prev-button md-icon {
    color: #fff;
}
md-next-button md-icon {
    color: #fff;
}

.slideout-menu {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 300px;
    min-height: 100vh;
    /*overflow-y: scroll;*/
    -webkit-overflow-scrolling: touch;
    z-index: 0;
    display: none;
}

.slideout-menu-left {
    left: 0;
}

.slideout-menu-right {
    right: 0;
}

.slideout-panel {
    position: relative;
    z-index: 1;
    will-change: transform;
    min-height: 100vh;
}

.slideout-open,
.slideout-open body,
.slideout-open .slideout-panel {
    overflow: hidden;
}

.slideout-open .slideout-menu {
    display: block;
}
.slideout-menu {
    z-index: 3;
    display: block;
    will-change: transform;
}
.slideout-menu-left {
    left: -300px;
}
.slideout-menu-right {
    right: -300px;
}
.slideout-dimmer {
    visibility: hidden;
    opacity: 0;
    z-index: -1;
    pointer-events: none;
    background-color: rgba(0,0,0,.5);
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}
.slideout-open .slideout-dimmer {
    visibility: visible;
    opacity: 1;
    z-index: 2;
}


@font-face {
    /*font-family: 'Montserrat', sans-serif;*/
    /*  font-family: "Dosis";
      src: url(../fonts/Dosis-Regular.ttf) format("truetype");*/
}

@font-face {
    font-family: 'Material Icons';
    font-style: normal;
    font-weight: 400;
    src: url(../fonts/MaterialIcons-Regular.eot); /* For IE6-8 */
    src: local('Material Icons'),
        local('MaterialIcons-Regular'),
        url(../fonts/MaterialIcons-Regular.woff2) format('woff2'),
        url(../fonts/MaterialIcons-Regular.woff) format('woff'),
        url(../fonts/MaterialIcons-Regular.ttf) format('truetype');
}
.material-icons {
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;  /* Preferred icon size */
    display: inline-block;
    line-height: 1;
    text-transform: none;
    letter-spacing: normal;
    word-wrap: normal;
    white-space: nowrap;
    direction: ltr;

    /* Support for all WebKit browsers. */
    -webkit-font-smoothing: antialiased;
    /* Support for Safari and Chrome. */
    text-rendering: optimizeLegibility;

    /* Support for Firefox. */
    -moz-osx-font-smoothing: grayscale;

    /* Support for IE. */
    font-feature-settings: 'liga';
}

body {
    font-family: 'Montserrat', sans-serif;
    /*font-family: 'Dosis', sans-serif;*/
    overflow: hidden;
}
.main_content {
    /* min-height: calc(100% - 48px); */
    padding: 8px 0;
    height: calc(100% - 48px);
}

/* MAIN MENU */
md-toolbar.main_menu_top_card {
    background-color: #000000;
}
.main_menu_top_card > md-card {
    /* background-image: url(../templates/minhafreguesia/images/ocorrencias_header-10_1.svg); */
    background: transparent;
    box-shadow: 0 0;
}
md-card-title-media > div {
    background-color: #fff;
    border-radius: 50%;
    -webkit-transition-duration: .5s;
    transition-duration: .5s;
    -webkit-transition-timing-function: cubic-bezier(.35,0,.25,1);
    transition-timing-function: cubic-bezier(.35,0,.25,1);
    -webkit-transition-property: background-color,fill,color;
    transition-property: background-color,fill,color;
}
md-card-title-media > div > md-icon {
    color: #000000 !important;
    fill: #000000 !important;
    font-size: 38px !important;
    height: 38px;
    width: 38px;
}
.main_menu_top_card md-card-title-text {
    height: 105px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center;
    background-image: url(../template/img/pires.svg);
}
md-card-title-text > span.md-headline {
    color: #fff;
    font-size: 30px;
    font-weight: 500;
    line-height: 18px;
    margin-top: 5px;
}
.menu_content_container {
    height: calc(100vh - 164px);
    overflow: auto;
    background-color: #854052;
    border-top: 3px solid #333;
}
.main_menu_links_container > a {
    padding: 8px 10px;
    margin: 0;
}
.main_menu_links_container > a > md-icon {
    color: #000000;
}
.main_menu_links_container > a > p {
    margin: 0 0 0 10px;
    color: #000000;
}


/* TOP BAR */
md-toolbar.main_topbar_container {
    background-color: #000000 !important;
}
md-toolbar.main_topbar_container {
    text-transform: uppercase;
}
/*span.top_bar_bold_title {
    font-weight: 700;
    font-size: 19px;
}*/
.top_bar_bold_title {
    width: 80%;
    height: 45px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}
.notification_count {
    position: absolute;
    top: 6px;
    right: 6px;
    background-color: #D32F2F;
    width: 18px;
    height: 18px;
    line-height: 18px;
    border-radius: 4px 4px 4px 0px;
    box-shadow: 0px 0px 5px -1px #333;
}
.notification_count_number {
    width: 100%;
    text-align: center;
}
.notifications_header {
    height: 40px;
    padding: 0 16px;
    background-color: #fff;
    border-bottom: 1px solid rgba(51, 51, 51, 0.25);
}
.notifications_header div {
    line-height: 40px;
    color: #000000;
}
.notifications_display_container md-list-item.created_occorr md-icon {
    color: #0072b0;
    font-size: 35px;
    height: 35px;
    width: 35px !important;
    margin-right: 12px !important;
    margin-top: 14px !important;
    margin-bottom: 14px !important;
}
.notifications_display_container md-list-item.updated_occorr md-icon {
    color: #03a9f4;
    font-size: 35px;
    height: 35px;
    width: 35px !important;
    margin-right: 12px !important;
    margin-top: 14px !important;
    margin-bottom: 14px !important;
}
.notifications_display_container md-list-item.studiyng_occorr md-icon {
    color: #2196F3;
    font-size: 35px;
    height: 35px;
    width: 35px !important;
    margin-right: 12px !important;
    margin-top: 14px !important;
    margin-bottom: 14px !important;
}
.notifications_display_container md-list-item.forward_occorr md-icon {
    color: #aeea00;
    font-size: 35px;
    height: 35px;
    width: 35px !important;
    margin-right: 12px !important;
    margin-top: 14px !important;
    margin-bottom: 14px !important;
}
.notifications_display_container md-list-item.completed_occorr md-icon {
    color: #00bfa5;
    font-size: 35px;
    height: 35px;
    width: 35px !important;
    margin-right: 12px !important;
    margin-top: 14px !important;
    margin-bottom: 14px !important;
}
.notifications_display_container md-list-item.invalid_occorr md-icon {
    color: #ff5252;
    font-size: 35px;
    height: 35px;
    width: 35px !important;
    margin-right: 12px !important;
    margin-top: 14px !important;
    margin-bottom: 14px !important;
}
.notifications_display_container {
    background-color: #fff;
}
.notifications_display_container .notifications_container {
    transition: .2s linear all;
}
.notifications_display_container .notifications_container.notification_not_read {
    background-color: rgba(0, 114, 174, 0.1);
}
.notifications_display_container .notifications_container button {
    margin: 16px 6px;
}
.notifications_display_container .notifications_container button md-icon {
    font-size: 24px;
    height: 24px;
    width: 24px !important;
    margin-right: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    color: #000000 !important;
}






/* No Internet and No Regists */
md-card.noInternet, md-card.noRegists {
    background-color: rgba(225, 108, 108, 0.75);
    text-align: center;
    margin: 8px 8px 8px;
    line-height: 40px;
}
md-card.noInternet md-icon, md-card.noRegists md-icon {
    font-size: 32px;
    height: 32px;
    width: 32px;
    padding: 12px;
}

/*ANGULAR OVERRIDES*/
md-select.md-default-theme:not([disabled]):focus .md-select-value, md-select:not([disabled]):focus .md-select-value {
    border-bottom-color: rgb(0, 114, 174);
    color: rgba(0,0,0,0.87);
}
md-input-container.md-default-theme:not(.md-input-invalid).md-input-focused label, md-input-container:not(.md-input-invalid).md-input-focused label, md-input-container.md-default-theme:not(.md-input-invalid).md-input-focused md-icon, md-input-container:not(.md-input-invalid).md-input-focused md-icon {
    color: rgb(0, 114, 174);
}
md-chips.md-default-theme .md-chips.md-focused, md-chips .md-chips.md-focused {
    box-shadow: 0 2px rgb(0, 114, 174);
}

/* #################################### AAUM ###################################### */


@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/Montserrat-Thin.ttf') format('truetype');
    font-weight: 100;
    font-style: normal;
}

@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/Montserrat-ExtraLight.ttf') format('truetype');
    font-weight: 200;
    font-style: normal;
}

@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/Montserrat-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/Montserrat-Regular.ttf') format('truetype');
    font-weight: 400; 
    font-style: normal;
}

@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/Montserrat-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/Montserrat-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/Montserrat-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/Montserrat-ExtraBold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
}

@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/Montserrat-Black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
}



@font-face {
    font-family: 'Dezen Stencil';
    src: url('../fonts/Dezen Stencil 02 Thin.ttf') format('truetype');
    font-weight: 100;
    font-style: normal;
}

@font-face {
    font-family: 'Dezen Stencil';
    src: url('../fonts/Dezen Stencil 02 ExtraLight.ttf') format('truetype');
    font-weight: 200;
    font-style: normal;
}

@font-face {
    font-family: 'Dezen Stencil';
    src: url('../fonts/Dezen Stencil 02 Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Dezen Stencil';
    src: url('../fonts/Dezen Stencil 02 Regular.ttf') format('truetype');
    font-weight: 400; 
    font-style: normal;
}

@font-face {
    font-family: 'Dezen Stencil';
    src: url('../fonts/Dezen Stencil 02 Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Dezen Stencil';
    src: url('../fonts/Dezen Stencil 02 SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'Dezen Stencil';
    src: url('../fonts/Dezen Stencil 02 Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Dezen Stencil';
    src: url('../fonts/Dezen Stencil 02 ExtraBold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
}

@font-face {
    font-family: 'Dezen Stencil';
    src: url('../fonts/Dezen Stencil 02 Black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
}











/* SIDEMENU */
@font-face {
    font-family: 'Century Gothic';
    src: url(fonts/GOTHIC.TTF);
    font-style: normal;
    font-weight: 400;
}
@font-face {
    font-family: 'Century Gothic';
    src: url(fonts/GOTHICI.TTF);
    font-style: italic;
    font-weight: 400;
}
@font-face {
    font-family: 'Century Gothic';
    src: url(fonts/GOTHICB.TTF);
    font-style: normal;
    font-weight: 700;
}
@font-face {
    font-family: 'Century Gothic';
    src: url(fonts/GOTHICBI.TTF);
    font-style: italic;
    font-weight: 700;
}

body {
    font-family: 'Century Gothic', sans-serif;
}




.sidemenu_container {
    background: #864153;
    padding: 0;
}
.sidemenu_container {
    background: #864153;
    padding: 0;
    height: 100%;
    width: 100%;
}
.sidemenu_header_container {
    padding: 0 12px;
}
.sidemenu_header_wrapper {
    border-bottom: 1px solid #fff;
}
img.header_logo {
    width: 100%;
    padding: 24px 40px;
    box-sizing: border-box;
}
ul.menu_list {
    margin: 0;
    padding: 0;
    list-style: none;
}
li.menu_list_item .md-button.md-ink-ripple {
    margin: 0;
    width: 100%;
    text-align: left;
    font-weight: 300;
    color: #fff;
    padding: 0 12px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: auto;
    height: 38px;
    line-height: unset;
    transition: all .15s linear;
    border-radius: 0;
    font-family: 'Century Gothic', sans-serif;
    overflow: hidden;
}
li.menu_list_item .md-button.md-ink-ripple span {
    transition: all .15s linear;
}
li.menu_list_item.active .md-button.md-ink-ripple span {
    transform: rotate(180deg);
}
li.menu_list_item.active .md-button.md-ink-ripple {
    background: rgb(43 61 65 / 10%);
    color: #E5D2AF;
}
li.menu_list_item.active > .md-button.md-ink-ripple {
    font-weight: 700;
}
ul.submenu_list_item {
    list-style: none;
    padding: 0 0;
    margin: 0;
}
li.submenu_list_item .md-button.md-ink-ripple {
    font-size: 0;
    height: 0;
    transition: font-size .15s 0s linear, height .15s 0s linear, color .15s .15s linear;
    color: rgb(229 210 175 / 0%);
}
li.menu_list_item.active ul.submenu_list_item li.submenu_list_item .md-button.md-ink-ripple {
    font-size: 12px;
    height: 38px;
    color: #E5D2AF;
    transition: font-size .15s 0s linear, height .15s 0s linear, color .15s .15s linear;
}













/*REPAIRS*/
.reparacao_container {
    height: calc(100vh - 93px);
    overflow: auto;
}
.reparacao_wrapper {
    padding: 8px;
}
.page_title {
    box-shadow: 0px 0px 6px -2px #000;
}
.page_title_button.md-button.md-ink-ripple {
    margin: 0;
    min-width: auto;
    min-height: auto;
    font-size: 10px;
    padding: 0;
    line-height: 36px;
}
.page_title_button.md-button.md-ink-ripple md-icon {
    color: #854052;
    min-width: auto;
}
.page_title_button.md-button.md-ink-ripple > div {
    padding: 0 6px 0 0;
    margin: 1px 0 0 -6px;
}
.page_title {
    width: 100%;
    text-align: center;
    background: #ececec;
    color: #854052;
}
.reparacao_title {
    font-size: 14px;
    font-weight: 300;
    color: #854052;
    text-align: justify;
}
.reparacao_text {
    font-size: 14px;
    color: #333;
    margin: 0 0 12px;
    min-height: 18px;
    font-weight: 400;
    text-align: justify;
}
    thead {
    background-color: #854052;
    height: 60px;
    color: white;
    font-weight: 100;
    font-size: 14px;
}
th{
    font-weight: 400;
    text-align: left;
    padding: 0 30px;
}
tbody tr:nth-child(even) {
    background-color: #85405230;
}
table thead tr {
    height: 60px;
    background: #854052;
}
td{
        padding: 0 30px;
        font-size: 11px;
}
md-tabs[escondidinha] md-tabs-wrapper {
    display: none;
}
md-tabs[escondidinha] md-tabs-content-wrapper {
    top: 0;
}



md-dialog#simpledialog .md-button.md-ink-ripple {
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    margin: 6px 0;
}
tbody tr.porver {
    background: rgb(134 65 83 / 10%);
}
tbody tr.porver td {
    color: #864153;
}


/* ===================================
   LAYOUT MODERNO - ESTILO DANKEBOI
   ADAPTADO PARA PIRES
   =================================== */

/* LAYOUT PRINCIPAL */
.backoffice-layout {
    display: flex;
    min-height: 100vh;
    background: var(--background);
}

/* ===================================
   SIDEBAR - VINHO COM BRANCOS
   =================================== */
.sidebar {
    width: 250px;
    background: linear-gradient(180deg, var(--sidebar-bg-start) 0%, var(--sidebar-bg-end) 100%);
    color: var(--white);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    transition: width 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
}

.sidebar.collapsed {
    width: 60px;
}

.sidebar-header {
    padding: 0px 15px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    /* min-height: 46px; */
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar.collapsed .sidebar-header {
    padding: 0 10px;
    height: 40px;
}

.sidebar-header .logo {
    height: 46px;
    width: auto;
    transition: height 0.3s ease;
    display: block;
    margin: 0 auto;
}

.sidebar-menu {
    flex: 1;
    padding: 10px 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-menu::-webkit-scrollbar {
    width: 5px;
}

.sidebar-menu::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 5px;
}

.menu-item-container {
    position: relative;
    transition: all 0.3s ease-in-out;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: all 0.3s ease-in-out;
    white-space: nowrap;
    position: relative;
    border-left: 3px solid transparent;
    cursor: pointer;
    min-height: 48px;
    box-sizing: border-box;
}

.sidebar.collapsed .menu-item {
    padding: 12px 15px;
    min-height: 48px;
    justify-content: center;
}

.menu-item:hover {
    background: var(--sidebar-hover-bg);
    border-left-color: var(--white);
    color: var(--white);
    transform: translateX(5px);
    padding-left: 18px;
}

.sidebar.collapsed .menu-item:hover {
    padding-left: 15px;
    transform: translateX(0);
}

.menu-item.active {
    background: var(--sidebar-active-bg);
    border-left-color: var(--white);
    color: var(--white);
    font-weight: 600;
}

.menu-item i:first-child,
.menu-item md-icon:first-child {
    min-width: 30px;
    width: 30px;
    font-size: 16px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar.collapsed .menu-item i:first-child,
.sidebar.collapsed .menu-item md-icon:first-child {
    min-width: 30px;
    width: 30px;
    font-size: 18px;
}

.menu-item span {
    margin-left: 8px;
    font-size: 14px;
    flex: 1;
}

.sidebar.collapsed .menu-item span {
    display: none;
}

.submenu-arrow {
    font-size: 10px;
    margin-left: auto !important;
    opacity: 0.7;
    transition: transform 0.2s;
}

.sidebar.collapsed .submenu-arrow {
    display: none;
}

.menu-item:hover .submenu-arrow {
    transform: translateX(3px);
    transition: transform 0.3s ease-in-out;
}

/* Submenus Verticais */
.submenu-vertical {
    background: rgba(0, 0, 0, 0.15);
    padding: 5px 0;
    animation: slideDown 0.3s ease;
    overflow: hidden;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

.submenu-item {
    display: flex;
    align-items: center;
    padding: 10px 15px 10px 35px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.submenu-item i {
    margin-right: 8px;
    font-size: 12px;
    min-width: 15px;
}

.submenu-item:hover {
    background: rgba(255, 255, 255, 0.15);
    border-left-color: var(--white);
    color: var(--white);
    padding-left: 40px;
}

.sidebar-footer {
    padding: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.1);
    margin-top: auto;
    transition: all 0.3s;
}

.user-info {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    transition: all 0.3s;
}

.user-info i {
    font-size: 20px;
    margin-right: 10px;
    color: var(--white);
}

.user-info span {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.sidebar.collapsed .user-info span {
    display: none;
}

.btn-logout {
    width: 100%;
    padding: 10px;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 500;
}

.btn-logout i {
    min-width: 14px;
    width: 14px;
    margin-right: 8px;
    font-size: 14px;
    flex-shrink: 0;
}

.sidebar.collapsed .btn-logout i {
    margin-right: 0;
}

.sidebar.collapsed .btn-logout span {
    display: none;
}

.btn-logout:hover {
    background: #c0392b;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* MAIN CONTENT */
.main-content {
    flex: 1;
    margin-left: 250px;
    overflow-y: auto;
    transition: margin-left 0.3s;
    background: var(--background-light);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content.sidebar-collapsed {
    margin-left: 60px;
}

/* ===================================
   TOPBAR - MINIMALISTA BRANCA
   =================================== */
.topbar-simple {
    padding: 6px 25px;
    background: var(--white);
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 15px;
    height: 45px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.menu-toggle-btn {
    display: none !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
}

/* Contexto da Página */
.page-context {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
    min-width: 200px;
    padding-right: 15px;
    border-right: 1px solid #e5e7eb;
    flex-shrink: 0;
    font-size: 18px;
    color: var(--primary-color);
}

.page-context i {
    color: var(--primary-color);
}

.page-context-title {  
    font-weight: 600;
    color: #2c3e50;
}

/* Pesquisa Global */
.search-container {
    position: relative;
    flex: 1;
    min-width: 250px;
    max-width: 100%;
}

.barra-pesquisa {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--background-light);
    border: 1px solid #ddd;
    border-radius: 25px;
    padding: 0 15px;
    min-height: 38px;
    width: 100%;
    max-width: 100%;
    position: relative;
    transition: all 0.2s ease;
}

.barra-pesquisa:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(133, 64, 82, 0.1);
}

.barra-pesquisa input {
    border: none;
    outline: none;
    background: transparent;
    padding: 8px;
    width: 100%;
    font-size: 14px;
    color: #333;
}

.barra-pesquisa input::placeholder {
    color: #999;
}

/* Loading bar da pesquisa */
.barra-pesquisa.pesquisando::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 100%;
    background: linear-gradient(to right, var(--primary-color), var(--primary-light));
    animation: loopBar 2s ease-in-out infinite;
    border-radius: 0 0 25px 25px;
}

@keyframes loopBar {
    0% { transform: translateX(-100%); width: 100% }
    50% { transform: translateX(0); width: 100% }
    100% { transform: translateX(100%); width: 100% }
}

/* Resultados da Pesquisa */
.search-results {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    max-height: 70vh;
    overflow-y: auto;
    z-index: 60;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
}

.search-results-list {
    flex: 1;
    overflow-y: auto;
}

.search-loading {
    padding: 30px;
    text-align: center;
    color: var(--primary-color);
}

.search-loading i {
    font-size: 24px;
    margin-bottom: 10px;
    display: block;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
}

.search-result-item:hover {
    background: #f9fafb;
}

.result-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    flex-shrink: 0;
}

.result-content {
    flex: 1;
    min-width: 0;
}

.result-title {
    font-weight: 600;
    font-size: 14px;
    color: #1f2937;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.result-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #6b7280;
}

.search-no-results {
    padding: 40px 20px;
    text-align: center;
    color: #9ca3af;
}

/* Botões de Ação da Página */
.page-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    align-items: center;
}

.page-actions button {
    white-space: nowrap;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    background: var(--primary-color);
    color: var(--white);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.page-actions button:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(133, 64, 82, 0.3);
}

.page-actions button i {
    margin-right: 6px;
}

/* ===================================
   BOTÕES MODERNOS
   =================================== */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    transition: all 0.3s;
    font-weight: 500;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
    font-weight: 600;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #27ae60;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #c0392b;
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-warning:hover:not(:disabled) {
    background: #e67e22;
}

.btn-default {
    background: #ecf0f1;
    color: #2c3e50;
}

.btn-default:hover:not(:disabled) {
    background: #bdc3c7;
}

.btn-block {
    width: 100%;
    display: block;
}

/* ===================================
   BADGES
   =================================== */
.badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

.badge-primary {
    background: rgba(133, 64, 82, 0.1);
    color: var(--primary-color);
}

/* ===================================
   CARDS
   =================================== */
.card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.card-header {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #2c3e50;
}

.card-body {
    color: #7f8c8d;
}

/* ===================================
   KPIs
   =================================== */
.kpi-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 15px;
}

.kpi-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(133, 64, 82, 0.1);
    color: var(--primary-color);
    font-size: 24px;
}

.kpi-content {
    flex: 1;
}

.kpi-label {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 5px;
}

.kpi-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

/* ===================================
   TABELAS MODERNAS
   =================================== */
.table-360 {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.filter-header-row {
    background: var(--background-light);
    border-bottom: 2px solid #dee2e6;
}

.filter-header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 15px;
    padding: 15px;
}

.filter-header-left {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    flex: 1;
}

.filter-header-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-header-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    min-width: 150px;
}

.filter-header-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(133, 64, 82, 0.1);
}

.filter-header-right {
    display: flex;
    gap: 8px;
}

.btn-filter {
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-filter:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-clear {
    padding: 8px 16px;
    background: #ecf0f1;
    color: #2c3e50;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-clear:hover {
    background: #bdc3c7;
}

.table-header-row th {
    background: var(--background-light);
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
    color: #2c3e50;
    cursor: default;
}

.table-header-row th.sortable {
    cursor: pointer;
    user-select: none;
}

.table-header-row th.sortable:hover {
    background: #e9ecef;
}

.table-360 tbody tr:nth-child(odd) {
    background: #ffffff;
}

.table-360 tbody tr:nth-child(even) {
    background: var(--background-light);
}

.table-360 tbody tr:hover {
    background: rgba(133, 64, 82, 0.05);
}

.table-360 td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
}

/* ===================================
   ALERTS
   =================================== */
.alert {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* ===================================
   UTILITIES
   =================================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.p-10 { padding: 10px; }
.p-20 { padding: 20px; }

.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-10 { gap: 10px; }

.page-container {
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

/* ===================================
   RESPONSIVIDADE MOBILE
   =================================== */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -260px;
        z-index: 30;
        width: 250px;
    }
    
    .sidebar.mobile-open {
        left: 0;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .main-content.sidebar-collapsed {
        margin-left: 0;
    }
    
    .menu-toggle-btn {
        display: flex !important;
    }
    
    .page-context {
        display: none;
    }
    
    .topbar-simple {
        padding: 10px 15px;
        gap: 10px;
    }
    
    .search-container {
        max-width: 100%;
        min-width: auto;
    }
    
    .search-results {
        max-height: 400px;
    }
    
    .page-actions button span {
        display: none;
    }
    
    .page-actions button i {
        margin: 0;
    }
    
    .filter-header-content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-header-left {
        flex-direction: column;
    }
    
    .filter-header-right {
        justify-content: stretch;
    }
    
    .btn-filter, .btn-clear {
        flex: 1;
    }
}

/* Overlay Mobile */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 29;
}

.mobile-overlay.show {
    display: block;
}

/* Botão Menu Mobile */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 31;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }
}
