/* Arquivo: base_layout.css (Corrigido - Sem estilos de Sidebar) */

/* ▼▼▼ MELHORIA 2: FUNDO DINÂMICO E NAVBAR "GLASS" ▼▼▼ */
html, body {
    height: 100%;
    font-family: 'Inter', sans-serif;
    /* Fundo de gradiente dinâmico */
    background: radial-gradient(circle at top center, #ffffff 0%, #f4f7f9 100%);
    background-attachment: fixed; /* Mantém o fundo fixo durante a rolagem */
}

.navbar {
    /* Efeito "Glass" */
    background: rgba(255, 255, 255, 0.8) !important; /* Fundo semitransparente */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* Para compatibilidade com Safari */
    
    border-bottom: 1px solid #edf0f2;
    box-shadow: 0 2px 8px rgba(80,110,180,0.06);
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
}
/* ▲▲▲ FIM DA MELHORIA 2 ▲▲▲ */


body { min-height: 100vh; display: flex; flex-direction: column; }

.navbar .navbar-brand img {
    height: 28px;
    width: auto;
    margin-right: 0.8rem;
    vertical-align: middle;
}
.navbar .navbar-brand {
    display: flex;
    align-items: center;
    padding-top: 0.1rem;
    padding-bottom: 0.1rem;
}

/* ▼▼▼ ESTILOS RESTAURADOS PARA O MENU SUPERIOR HORIZONTAL ▼▼▼ */
.navbar .navbar-nav {
    align-items: center;
    gap: 0.2rem;
    /* Remove 'flex-direction: row' para permitir que o menu principal seja vertical em modo mobile */
}

/* Estilos gerais para links em AMBOS os menus (principal e usuário) */
.navbar .nav-link, 
.navbar .dropdown-toggle {
    color: #5a5a5a !important;
    font-weight: 500;
    border-radius: 0.45rem;
    padding: 0.46rem 0.8rem;
    font-size: 1.06rem;
    background: none;
    border: none;
    transition: background 0.15s, color 0.15s, box-shadow 0.12s;
    box-shadow: none;
    display: flex;
    align-items: center;
    gap: 0.4em;
}
.navbar .nav-link i, 
.navbar .dropdown-toggle i {
    margin-right: 0.26em;
    font-size: 1.16em;
    vertical-align: middle;
    transition: color 0.15s;
    color: #b1b1b1;
    flex-shrink: 0;
}
.navbar .nav-link.active, .navbar .nav-link:focus,
.navbar .dropdown-toggle.active, .navbar .dropdown-toggle:focus {
    background: #f1f3f7;
    color: #d51224 !important;
    box-shadow: 0 2px 6px #f0e2e5;
}
.navbar .nav-link:hover, 
.navbar .dropdown-toggle:hover {
    background: #f6f7fa;
    color: #d51224 !important;
    box-shadow: 0 1px 4px #f0e2e5;
}
/* ▲▲▲ FIM DOS ESTILOS RESTAURADOS ▲▲▲ */


.navbar .dropdown-menu {
    font-size: 1rem;
    border-radius: 0.7rem;
    margin-top: 0.35rem;
    min-width: 190px;
    box-shadow: 0 4px 18px rgba(80,110,180,0.08);
    background: #fff;
    animation: fadeInDown .32s;
}
.navbar .dropdown-item {
    color: #4a4a4a;
    transition: background 0.13s, color 0.13s;
    border-radius: 0.45rem;
    display: flex;
    align-items: center;
    gap: 0.45em;
    font-size: 1rem;
}
.navbar .dropdown-item i {
    color: #d51224;
    font-size: 1.08em;
    flex-shrink: 0;
}
.navbar .dropdown-item:hover, .navbar .dropdown-item:focus {
    background: #f7e5e8;
    color: #d51224 !important;
    font-weight: 500;
    box-shadow: 0 1px 7px #ffd7e1;
    outline: none;
}
.navbar .dropdown-divider { margin: .32rem 0;}


/* --- Estilos do Sino de Notificação (Já externalizados) --- */
.nav-user { display: flex; align-items: center; gap: 0.5em; }
.nav-notify { position: relative; margin-left: 0.18em; display: flex; align-items: center; }
.nav-notify i { font-size: 1.28em; color: #d51224; transition: color .15s, filter .15s; cursor: pointer; }
.nav-notify i:hover { color: #a90b1a; filter: drop-shadow(0 0 3px #d51224); }
.nav-notify .badge { position: absolute; top: -4px; right: -12px; font-size: 0.68em; background: #d51224; color: #fff; border-radius: 7px; padding: 2px 5px; font-weight: 600; box-shadow: 0 2px 9px #ffd7e1; display: inline-block; }
.nav-notify .badge.hidden { display: none; }
.notify-btn-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.22em;
    margin-left: auto;
    width: auto;
    flex-wrap: nowrap;
}
.notify-btn-group .notify-action-btn, .notify-btn-group .notify-viewall-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.22em;
    padding: 0.08em 0.42em;
    font-size: 0.97em;
    border-radius: 0.28em;
    border: 1px solid #ffd7e1;
    font-weight: 500;
    min-width: 0;
    height: 2.1em;
    line-height: 1.1;
    white-space: nowrap;
    background: #fff;
    color: #d51224;
    box-sizing: border-box;
    transition: background 0.12s, color 0.12s, border 0.12s;
}
.notify-btn-group .notify-action-btn i,
.notify-btn-group .notify-viewall-btn i {
    color: #d51224 !important;
    font-size: 1.15em;
    vertical-align: middle;
}
.notify-btn-group .notify-action-btn span,
.notify-btn-group .notify-viewall-btn span {
    display: inline-flex;
    align-items: center;
}
.notify-btn-group .notify-viewall-btn:hover,
.notify-btn-group .notify-action-btn:hover,
.notify-btn-group .notify-viewall-btn:focus,
.notify-btn-group .notify-action-btn:focus {
    background: #f7e5e8;
    color: #a90b1a;
    border: 1px solid #d51224;
}
.notify-action-btn-ind {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #d51224;
    font-size: 1.08em;
    cursor: pointer;
    z-index: 2;
    transition: color 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 2em;
}
.notify-action-btn-ind i {
    color: #d51224 !important;
    font-size: 1.08em;
}
.notify-action-btn-ind:hover i {
    color: #a90b1a !important;
}
.notify-mark-read-btn {
    position: absolute;
    top: 10px;
    right: 36px;
    font-size: 1.08em;
    padding: 1px;
    min-width: unset;
    max-width: 2em;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 2;
    transition: color 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 2em;
    color: #bbb;
}
.notify-mark-read-btn:hover { color: #2e9f3c; }
.shine-bounce {
    animation: bell-shine-bounce 1.2s cubic-bezier(.36,.07,.19,.97) both;
}
@keyframes bell-shine-bounce {
    0%   { box-shadow: 0 0 0px #ffd7e1; color: #d51224; transform: rotate(0);}
    10%  { box-shadow: 0 0 8px #ffd7e1; color: #ff6094; transform: rotate(-22deg);}
    20%  { box-shadow: 0 0 12px #ffd7e1; color: #d51224; transform: rotate(15deg);}
    30%  { box-shadow: 0 0 18px #ffd7e1; color: #ff6094; transform: rotate(-9deg);}
    40%  { box-shadow: 0 0 16px #ffd7e1; color: #d51224; transform: rotate(8deg);}
    50%  { box-shadow: 0 0 10px #ffd7e1; color: #ff6094; transform: rotate(0);}
    100% { box-shadow: 0 0 0px #ffd7e1; color: #d51224; transform: rotate(0);}
}
.notify-dropdown-list {
    min-width: 340px;
    max-width: 420px;
    max-height: 70vh;
    overflow-y: auto;
    border-radius: 0.8em;
    box-shadow: 0 6px 32px #ffd7e177;
    transition: max-width .2s;
    background: #fff;
}
.notify-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6em;
  background: #fff;
  border-radius: 0.7em 0.7em 0 0;
  padding: 0.6em 1em 0.3em 1em;
  box-shadow: none;
  border-bottom: 1px solid #ececec;
}
.notify-header-title {
  display: flex;
  align-items: center;
  font-size: 1.1em;
  font-weight: 600;
  color: #d51224;
}
.notify-actions-bar > span {
    font-size: 1.09em;
    font-weight: bold;
    display: flex;
    align-items: center;
}
.notify-actions-bar .d-flex.flex-row {
    gap: 0.6em;
}
.notify-action-btn.loading { pointer-events: none; opacity: 0.6; position: relative;}
.notify-action-btn.loading:after { content: ''; display: inline-block; width: 18px; height: 18px; border: 3px solid #ffd7e1; border-top: 3px solid #d51224; border-radius: 50%; animation: spin 1s linear infinite; margin-left: 8px; vertical-align: middle;}
@keyframes spin { 100%{transform:rotate(360deg);} }
.notify-viewmore-btn {
    display: block;
    width: 100%;
    background: #f7e5e8;
    color: #d51224;
    border: none;
    border-radius: 0.4em;
    padding: 0.45em 0;
    font-size: 0.97em;
    font-weight: 500;
    margin: 0.45em 0 0 0;
    text-align: center;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}
.notify-viewmore-btn:hover {
    background: #ffd7e1;
    color: #a90b1a;
}
.notify-item {
    position: relative; /* Para os botões absolutos funcionarem */
    box-shadow: 0 1px 3px #f7e5e8;
    padding: 0.65em 0.42em 0.5em 0.7em;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}
.notify-modal-list{
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}
.notify-title, .notify-message, .notify-link, .notify-time {
    white-space: normal;
    word-break: break-word;
}
    .notify-item.unread {
        background: #fffbe6;
        border-left: 4px solid #ffce45;
}
.notify-item.read {
    background: #f7f7f7;
    border-left: 4px solid #cfcfcf;
    opacity: 0.6;
}
.notify-item .notify-type-icon {
    font-size: 1.2em;
    margin-right:5px;
    vertical-align:middle;
}
.notify-discard-btn:hover {
    color: #a90b1a;
}
.notify-message {margin: 0.2em 0 0.3em 0;}
.notify-title {font-weight: bold; color: #d51224;}
.notify-time {font-size: 0.85em; color: #6a6a6a;}
.notify-link {font-size: 0.95em; color: #d51224; text-decoration: underline;}
.notify-action-quickbar {
    display:flex;
    gap:8px;
    margin-top:10px;
}
.notify-mark-read-btn {
    position: absolute;
    top: 10px;
    font-size: 1.08em;
    padding: 1px;
    min-width: unset;
    max-width: 2em;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 2;
    transition: color 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 2em;
}
.notify-mark-read-btn { right: 36px; color: #bbb; }
.notify-mark-read-btn:hover { color: #2e9f3c; }
.notify-modal-empty {
    padding: 2em 0;
    text-align: center;
    color: #b1b1b1;
}
.notify-modal-empty .bi {
    font-size:2.4em;
    color:#ffd7e1;
    margin-bottom:0.2em;
}
.notify-viewmore-btn {
    display: block;
    width: 100%;
    background: #f7e5e8;
    color: #d51224;
    border: none;
    border-radius: 0.4em;
    padding: 0.45em 0;
    font-size: 0.97em;
    font-weight: 500;
    margin: 0.45em 0 0 0;
    text-align: center;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}
.notify-viewmore-btn:hover {
    background: #ffd7e1;
    color: #a90b1a;
}
.notify-modal-list::-webkit-scrollbar {width: 6px;}
.notify-modal-list::-webkit-scrollbar-thumb {background: #ffd7e1; border-radius: 2px;}
.notify-modal-list::-webkit-scrollbar-track {background: #f7e5e8;}
@keyframes fadeIn {from{opacity:0;transform:translateY(12px);} to{opacity:1;transform:translateY(0);}}
@media (max-width:600px){
    .notify-dropdown-list {max-width: 97vw;}
    .notify-modal-list {max-height:40vh;}
}
.user-dropdown img {
    box-shadow: 0 2px 9px #e7e8ea;
    border: 2px solid #ececec;
    transition: box-shadow .12s, border .12s;
    background: #fff;
    width: 29px;
    height: 29px;
    object-fit: cover;
    border-radius: 50%;
    margin-right: 0.38em;
}
.user-dropdown i.bi-person-circle {
    font-size: 1.3em;
    color: #d51224;
    background: #fff;
    border-radius: 50%;
    margin-right: 0.38em;
}
.user-name-block {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    margin-left: 0.05em;
}
.user-cargo {
    font-size: 0.75rem;
    color: #aaa;
    margin-top: 2px;
    font-weight: 400;
    letter-spacing: 0.1px;
}
.user-dropdown .dropdown-menu {
    animation: fadeInDown .32s;
}
.user-dropdown .dropdown-item {
    padding-left: 1em;
}
.go-top-btn {
    position: fixed;
    bottom: 32px;
    right: 24px;
    z-index: 1999;
    background: linear-gradient(135deg,#fff 80%,#f9ecef 100%);
    color: #d51224;
    border-radius: 50%;
    box-shadow: 0 2px 14px rgba(213,18,36,0.13);
    border: 2px solid #ffd7e1;
    width: 48px; height: 48px;
    font-size: 1.7rem;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .17s, box-shadow .17s, border .17s;
}
.go-top-btn.show { display: flex; }
.go-top-btn:focus { outline: 2px solid #d51224;}
.go-top-btn:hover { background: #f7e5e8; box-shadow: 0 4px 18px #ffd7e1; color: #a90b1a; border:2px solid #d51224;}
.footer {
    background: #191d20;
    color: #f4f4f4;
    border-top-left-radius: 0.7rem;
    border-top-right-radius: 0.7rem;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.04);
    padding-top: 2rem;
    padding-bottom: 1.2rem;
    font-family: 'Inter', sans-serif;
    margin-top: auto;
}
.footer a { color: #f4f4f4; transition: color 0.2s;}
.footer a:hover { color: #d51224 !important; text-decoration: underline;}
.footer .list-inline-item i {
    font-size: 1.15rem;
    vertical-align: middle;
}
@media (max-width: 991px) {
    .navbar .navbar-brand img { height: 24px; }
    /* Estilos do menu principal em modo mobile (agora vertical) */
    .navbar .navbar-nav { 
        flex-direction: column; 
        gap: 0; 
        align-items: flex-start; /* Alinha links à esquerda */
    }
    .nav-user { gap: 0.32em; }
}
@media (max-width: 768px) {
    .navbar { padding: 0.3rem 0.7rem; }
    .navbar .navbar-brand img { height: 18px; margin-right: 0.4rem;}
    .navbar .nav-link, .navbar .dropdown-toggle { font-size: 1rem; padding: 0.35rem 0.7rem;}
    .nav-user { gap: 0.2em;}
    .user-dropdown span { display: none; }
    .navbar .dropdown-menu { font-size: 0.98rem;}
    .nav-notify .badge { top: -2px; right: -6px;}
    .footer .row { flex-direction: column; text-align: center; }
    .footer .col-md-6 { margin-bottom: 1rem; }
}
@keyframes fadeInDown {
    0% {transform: translateY(-18px); opacity: 0;}
    70% {opacity:1;}
    100% {transform: translateY(0); opacity: 1;}
}
