.highlight-title {
    background-color: #e0e0e04f;
    padding: 0.5rem 1rem 0.5rem 1rem;
    border-radius: 5px;
}

.bg-body-navbar {
        border-bottom: solid #dee2e6 1px;
}

.btn-ajuda {
    min-width: 130px;
}

.load-waves {
    width: 35.75px;
}

tr.htmx-swapping td {
  opacity: 0;
  transition: opacity 1s ease-out;
}

.form-btn {
    height: 35.75px;
}

.no_border {
    border: unset !important;
}

.thresh {
    color: red;
    padding: 0;
}

.pr-50 {
    padding-right: 50px;
}

.highlight {
    padding: .75rem 1.25rem;
    background-color: #e0e0e04f;
    border-radius: 5px;
}

.card-table {
    padding: 0;
}

.table-card {
    margin-bottom: 0;
}

.scrollspy-body {
    position: relative;
    overflow-y: auto;
    overflow-x: clip;
}

/* .breadcrumb-item+.breadcrumb-item::before {
    content: var(--bs-breadcrumb-divider, ">");
} */

.breadcrumb-chevron {
    --bs-breadcrumb-divider: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236c757d'%3E%3Cpath fill-rule='evenodd' d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    gap: .5rem;
}

.breadcrumb-chevron .breadcrumb-item {
    display: inline;
    padding-left: 0;
    line-height: 1;
}


/* Formulário Fase do Projeto */

#fases {
    text-align: center;
}

#fases legend {
    font-size: calc(1.3rem + 0.6vw) !important;
    padding-bottom: 0.5rem !important;
}

#fases .form-label {
    font-size: calc(1.3rem + 0.6vw) !important;
    padding-bottom: 0.5rem !important;
}

#div_id_fase div:nth-child(1) {
    display: none;
}

#div_id_fase > fieldset > div {
    display: flex;
    flex-direction: row;
    justify-content: center;
    margin-top: 7rem;
}

#div_id_fase > div {
    display: flex;
    flex-direction: row;
    justify-content: center;
    margin-top: 7rem;
}

#div_id_fase .form-check-input {
    margin: 0 0 0.5rem 0 !important;

}

#div_id_fase > div > div {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#div_id_fase > fieldset > div > div {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* icons: https://www.svgrepo.com/collection/strategy-management-flat-vectors/ */

#div_id_fase #id_fase_1::before {
    content: url(../img/projetos/fases/start.svg);
    position: relative;
    top: -70px;
    left: -37px;    
}

#div_id_fase #id_fase_2::before {
    content: url(../img/projetos/fases/planeamento.svg);
    position: relative;
    top: -70px;
    left: -20px;
}

#div_id_fase #id_fase_3::before {
    content: url(../img/projetos/fases/exec.svg);
    position: relative;
    top: -70px;
    left: -20px;
}

#div_id_fase #id_fase_4::before {
    content: url(../img/projetos/fases/monitor.svg);
    position: relative;
    top: -70px;
    left: -28px;
}

#div_id_fase #id_fase_5::before {
    content: url(../img/projetos/fases/closing.svg);
    position: relative;
    top: -70px;
    left: -28px;
}

#div_id_fase .form-check-label {
    font-size: calc(0.7rem + 0.6vw) !important;
}

@media (max-width: 768px) {
    #div_id_fase > div > div {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 120px;
        padding: 20px;
        left: 45px;
    }
    
    #div_id_fase > fieldset > div > div {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 120px;
        padding: 20px;
        left: 45px;
    }

    #div_id_fase > div {
        flex-direction: column;
        margin-top: 0;
        align-items: normal;
    }
    #div_id_fase > fieldset > div {
        flex-direction: column;
        margin-top: 0;
        align-items: normal;
    }
    #div_id_fase #id_fase_1::before {
        top: -22px;
        left: 45px;
    }
    #div_id_fase #id_fase_2::before {
        top: -22px;
        left: 45px;
    }
    #div_id_fase #id_fase_3::before {
        top: -22px;
        left: 45px;
    }
    #div_id_fase #id_fase_4::before {
        top: -22px;
        left: 45px;
    }
    #div_id_fase #id_fase_5::before {
        top: -22px;
        left: 45px;
    }
}

/* ==================== Semáforos======================== */

.traffic-light > input:nth-child(1) {
    display: none;
}

.traffic-light-horizontal > input:nth-child(1) {
    display: none;
}

/* === Modern Traffic Light Wrapper === */
.traffic-light-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin: 1rem 0;
}

.traffic-light-wrapper .form-label {
    color: var(--bs-emphasis-color);
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 0;
}

.traffic-light-wrapper .form-text {
    text-align: center;
    font-size: 0.875rem;
    opacity: 0.8;
}

.traffic-light-wrapper .invalid-feedback {
    text-align: center;
    font-size: 0.875rem;
    background: rgba(var(--bs-danger-rgb), 0.1);
    border: 1px solid rgba(var(--bs-danger-rgb), 0.2);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    margin-top: 0.5rem;
}

[data-bs-theme="dark"] .traffic-light-wrapper .invalid-feedback {
    background: rgba(var(--bs-danger-rgb), 0.15);
    border-color: rgba(var(--bs-danger-rgb), 0.3);
}

/* === Modern Traffic Light Vertical === */
.traffic-light {
    background: linear-gradient(145deg, #f0f0f0, #d9d9d9);
    border: 2px solid rgba(0, 0, 0, 0.1);
    width: 60px;
    height: 170px;
    border-radius: 35px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    padding: 8px 0;
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    position: relative;
    transition: all 0.3s ease;
}

.traffic-light::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 6px;
    background: linear-gradient(145deg, #c0c0c0, #a0a0a0);
    border-radius: 3px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* === Modern Traffic Light Horizontal === */
.traffic-light-horizontal {
    background: linear-gradient(145deg, #f0f0f0, #d9d9d9);
    border: 2px solid rgba(0, 0, 0, 0.1);
    width: 200px;
    height: 70px;
    border-radius: 35px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-evenly;
    padding: 0 12px;
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    position: relative;
    transition: all 0.3s ease;
}

.traffic-light-horizontal::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    width: 6px;
    height: 12px;
    background: linear-gradient(145deg, #c0c0c0, #a0a0a0);
    border-radius: 3px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* === Modern Radio Button Styling === */
.traffic-light > input, 
.traffic-light-horizontal > input {
    appearance: none;
    user-select: none;
    outline: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 3px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 2px rgba(255, 255, 255, 0.3),
        inset 0 -1px 2px rgba(0, 0, 0, 0.1);
}

.traffic-light > input {
    margin: 0;
}

.traffic-light-horizontal > input {
    margin: 0;
}

/* === Focus States for Accessibility === */
.traffic-light > input:focus-visible,
.traffic-light-horizontal > input:focus-visible {
    outline: 3px solid var(--bs-primary);
    outline-offset: 2px;
    transform: scale(1.05);
}

/* === Red Light Styling === */
input.Vermelho {
    background: radial-gradient(circle at 30% 30%, #ff6b6b, #e63946);
    box-shadow: 
        0 3px 8px rgba(230, 57, 70, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.3),
        inset 0 -1px 2px rgba(0, 0, 0, 0.2);
    opacity: 0.2;
}

input.Vermelho:hover {
    opacity: 0.6;
    transform: scale(1.05);
    box-shadow: 
        0 6px 16px rgba(230, 57, 70, 0.5),
        inset 0 1px 2px rgba(255, 255, 255, 0.4),
        inset 0 -1px 2px rgba(0, 0, 0, 0.2);
}

input.Vermelho:checked {
    opacity: 1;
    background: radial-gradient(circle at 30% 30%, #ff8e8e, #ff6b6b);
    box-shadow: 
        0 0 25px rgba(255, 107, 107, 1),
        0 0 45px rgba(255, 107, 107, 0.6),
        inset 0 1px 2px rgba(255, 255, 255, 0.4),
        inset 0 -1px 2px rgba(0, 0, 0, 0.1);
    border-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.08);
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0%, 100% { 
        box-shadow: 
            0 0 25px rgba(255, 107, 107, 1),
            0 0 45px rgba(255, 107, 107, 0.6),
            inset 0 1px 2px rgba(255, 255, 255, 0.4),
            inset 0 -1px 2px rgba(0, 0, 0, 0.1);
    }
    50% { 
        box-shadow: 
            0 0 35px rgba(255, 107, 107, 1),
            0 0 65px rgba(255, 107, 107, 0.8),
            inset 0 1px 2px rgba(255, 255, 255, 0.4),
            inset 0 -1px 2px rgba(0, 0, 0, 0.1);
    }
}

/* === Yellow Light Styling === */
input.Amarelo {
    background: radial-gradient(circle at 30% 30%, #ffd93d, #ffb700);
    box-shadow: 
        0 3px 8px rgba(255, 183, 0, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.4),
        inset 0 -1px 2px rgba(0, 0, 0, 0.1);
    opacity: 0.2;
}

input.Amarelo:hover {
    opacity: 0.6;
    transform: scale(1.05);
    box-shadow: 
        0 6px 16px rgba(255, 183, 0, 0.5),
        inset 0 1px 2px rgba(255, 255, 255, 0.5),
        inset 0 -1px 2px rgba(0, 0, 0, 0.1);
}

input.Amarelo:checked {
    opacity: 1;
    background: radial-gradient(circle at 30% 30%, #ffed4e, #ffd93d);
    box-shadow: 
        0 0 25px rgba(255, 217, 61, 1),
        0 0 45px rgba(255, 217, 61, 0.7),
        inset 0 1px 2px rgba(255, 255, 255, 0.5),
        inset 0 -1px 2px rgba(0, 0, 0, 0.1);
    border-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.08);
    animation: pulse-yellow 2s infinite;
}

@keyframes pulse-yellow {
    0%, 100% { 
        box-shadow: 
            0 0 25px rgba(255, 217, 61, 1),
            0 0 45px rgba(255, 217, 61, 0.7),
            inset 0 1px 2px rgba(255, 255, 255, 0.5),
            inset 0 -1px 2px rgba(0, 0, 0, 0.1);
    }
    50% { 
        box-shadow: 
            0 0 35px rgba(255, 217, 61, 1),
            0 0 65px rgba(255, 217, 61, 0.9),
            inset 0 1px 2px rgba(255, 255, 255, 0.5),
            inset 0 -1px 2px rgba(0, 0, 0, 0.1);
    }
}

/* === Green Light Styling === */
input.Verde {
    background: radial-gradient(circle at 30% 30%, #51cf66, #37b24d);
    box-shadow: 
        0 3px 8px rgba(55, 178, 77, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.3),
        inset 0 -1px 2px rgba(0, 0, 0, 0.2);
    opacity: 0.2;
}

input.Verde:hover {
    opacity: 0.6;
    transform: scale(1.05);
    box-shadow: 
        0 6px 16px rgba(55, 178, 77, 0.5),
        inset 0 1px 2px rgba(255, 255, 255, 0.4),
        inset 0 -1px 2px rgba(0, 0, 0, 0.2);
}

input.Verde:checked {
    opacity: 1;
    background: radial-gradient(circle at 30% 30%, #69db7c, #51cf66);
    box-shadow: 
        0 0 25px rgba(81, 207, 102, 1),
        0 0 45px rgba(81, 207, 102, 0.6),
        inset 0 1px 2px rgba(255, 255, 255, 0.4),
        inset 0 -1px 2px rgba(0, 0, 0, 0.1);
    border-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.08);
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0%, 100% { 
        box-shadow: 
            0 0 25px rgba(81, 207, 102, 1),
            0 0 45px rgba(81, 207, 102, 0.6),
            inset 0 1px 2px rgba(255, 255, 255, 0.4),
            inset 0 -1px 2px rgba(0, 0, 0, 0.1);
    }
    50% { 
        box-shadow: 
            0 0 35px rgba(81, 207, 102, 1),
            0 0 65px rgba(81, 207, 102, 0.8),
            inset 0 1px 2px rgba(255, 255, 255, 0.4),
            inset 0 -1px 2px rgba(0, 0, 0, 0.1);
    }
}

/* === Dark Mode Support for Traffic Lights === */

[data-bs-theme="dark"] .traffic-light {
    background: linear-gradient(145deg, #3a3a3a, #2a2a2a);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .traffic-light::before {
    background: linear-gradient(145deg, #555, #444);
}

[data-bs-theme="dark"] .traffic-light-horizontal {
    background: linear-gradient(145deg, #3a3a3a, #2a2a2a);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .traffic-light-horizontal::before {
    background: linear-gradient(145deg, #555, #444);
}

/* Dark mode radio buttons have enhanced glow effects */
[data-bs-theme="dark"] .traffic-light > input,
[data-bs-theme="dark"] .traffic-light-horizontal > input {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 3px 8px rgba(0, 0, 0, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.15),
        inset 0 -1px 2px rgba(0, 0, 0, 0.3);
}

/* Enhanced dark mode pulse animations */
@keyframes pulse-red-dark {
    0%, 100% { 
        box-shadow: 
            0 0 25px rgba(255, 107, 107, 0.9),
            0 0 50px rgba(255, 107, 107, 0.5),
            inset 0 1px 2px rgba(255, 255, 255, 0.4),
            inset 0 -1px 2px rgba(0, 0, 0, 0.2);
    }
    50% { 
        box-shadow: 
            0 0 35px rgba(255, 107, 107, 1),
            0 0 70px rgba(255, 107, 107, 0.7),
            inset 0 1px 2px rgba(255, 255, 255, 0.4),
            inset 0 -1px 2px rgba(0, 0, 0, 0.2);
    }
}

@keyframes pulse-yellow-dark {
    0%, 100% { 
        box-shadow: 
            0 0 25px rgba(255, 217, 61, 1),
            0 0 50px rgba(255, 217, 61, 0.6),
            inset 0 1px 2px rgba(255, 255, 255, 0.5),
            inset 0 -1px 2px rgba(0, 0, 0, 0.2);
    }
    50% { 
        box-shadow: 
            0 0 35px rgba(255, 217, 61, 1),
            0 0 70px rgba(255, 217, 61, 0.8),
            inset 0 1px 2px rgba(255, 255, 255, 0.5),
            inset 0 -1px 2px rgba(0, 0, 0, 0.2);
    }
}

@keyframes pulse-green-dark {
    0%, 100% { 
        box-shadow: 
            0 0 25px rgba(81, 207, 102, 0.9),
            0 0 50px rgba(81, 207, 102, 0.5),
            inset 0 1px 2px rgba(255, 255, 255, 0.4),
            inset 0 -1px 2px rgba(0, 0, 0, 0.2);
    }
    50% { 
        box-shadow: 
            0 0 35px rgba(81, 207, 102, 1),
            0 0 70px rgba(81, 207, 102, 0.7),
            inset 0 1px 2px rgba(255, 255, 255, 0.4),
            inset 0 -1px 2px rgba(0, 0, 0, 0.2);
    }
}

[data-bs-theme="dark"] input.Vermelho:checked {
    animation: pulse-red-dark 2s infinite;
}

[data-bs-theme="dark"] input.Amarelo:checked {
    animation: pulse-yellow-dark 2s infinite;
}

[data-bs-theme="dark"] input.Verde:checked {
    animation: pulse-green-dark 2s infinite;
}

/* === Responsive Design for Traffic Lights === */

@media (max-width: 768px) {
    .traffic-light {
        width: 50px;
        height: 140px;
        border-radius: 25px;
    }
    
    .traffic-light > input {
        width: 30px;
        height: 30px;
    }
    
    .traffic-light-horizontal {
        width: 160px;
        height: 55px;
        border-radius: 27px;
    }
    
    .traffic-light-horizontal > input {
        width: 30px;
        height: 30px;
    }
}

@media (max-width: 480px) {
    .traffic-light {
        width: 45px;
        height: 120px;
        border-radius: 22px;
    }
    
    .traffic-light > input {
        width: 26px;
        height: 26px;
    }
    
    .traffic-light-horizontal {
        width: 140px;
        height: 50px;
        border-radius: 25px;
        padding: 0 8px;
    }
    
    .traffic-light-horizontal > input {
        width: 26px;
        height: 26px;
    }
}

/* === Accessibility Improvements === */

/* High contrast mode support */
@media (prefers-contrast: high) {
    .traffic-light, .traffic-light-horizontal {
        border-width: 3px;
        border-color: currentColor;
    }
    
    .traffic-light > input,
    .traffic-light-horizontal > input {
        border-width: 2px;
        border-color: currentColor;
    }
    
    input.Vermelho:checked {
        border-color: #000 !important;
    }
    
    input.Amarelo:checked {
        border-color: #000 !important;
    }
    
    input.Verde:checked {
        border-color: #000 !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .traffic-light > input,
    .traffic-light-horizontal > input {
        transition: opacity 0.1s ease;
    }
    
    input.Vermelho:checked,
    input.Amarelo:checked,
    input.Verde:checked {
        animation: none;
    }
    
    input.Vermelho:hover,
    input.Amarelo:hover,
    input.Verde:hover {
        transform: none;
    }
    
    .traffic-light > input:focus-visible,
    .traffic-light-horizontal > input:focus-visible {
        transform: none;
    }
}

/* Why? */
fieldset > legend {
    font-size: initial !important;
}

#id_tipo {
    flex-wrap: wrap !important;
}

/* Fix for Projeto form */

#id_tipo > label:nth-child(2) {
    border-radius: 0;
}

/* .rem_objetivo input {
    display: none;
} */

/* DSelect Formulário Projetos */

.dselect-wrapper {
    flex-grow: 1;
}

.dselect-wrapper button {
    border-radius: 0 var(--bs-border-radius) var(--bs-border-radius) 0;
}

/* Logo Sizes */

.logo-thumb-table-50 {
    max-width: 50px;
    min-width: 50px;
}

.logo-thumb-70 {
    max-width: 70px;
    max-height: 50px;
}

.logo-thumb-table-70 {
    max-width: 70px;
    min-width: 70px;
}

.logo-thumb-200 {
    max-width: 200px;
}

img.imgPreview {
    max-width: 250px;
    max-height: 250px;
}

/* Logo Image Preview */

.logo-thumb-50 {
    max-width: 50px;
    max-height: 50px;
}

/* === Animations === */

.check-marker {
    height: 36px;
}

.rotate-in-up-left {
  animation: rotate-in-up-left 2s ease;
  animation-iteration-count: 1
}
@keyframes rotate-in-up-left {
  0% {
    transform-origin: left bottom;
    transform: rotate(90deg);
    opacity: 0;
  }
  100% {
    transform-origin: left bottom;
    transform: rotate(0);
    opacity: 1;
  }
}

/* Custom HTMX Indicator */

.htmx-custom-indicator {
    opacity: 0;
    z-index: -1;
    transition: opacity 0.2s ease-in-out;
    pointer-events: none;
}
/* When a request is active, show any indicator inside the requesting element
   without changing layout (overlay variants set their own positioning). */
.htmx-request .htmx-custom-indicator,
.htmx-request.htmx-custom-indicator {
    opacity: 1;
    z-index: 99;
}

/* Utility: full overlay for containers that opt-in via position-relative */
.htmx-custom-indicator.position-absolute {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/* === Hero Section Styles === */

.hero-section {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
}

/* Compact hero for logged-in users */
.hero-section.hero-compact {
    min-height: auto;
    padding: 1.5rem 0;
}

.hero-section.hero-compact .hero-icon-wrapper {
    display: none; /* hide logo after login to save space */
}

.hero-section.hero-compact .hero-content {
    padding: 1rem 1.5rem !important;
    margin-top: 1rem !important;
    margin-bottom: 0 !important;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(var(--bs-primary-rgb), 0.05) 0%, 
        rgba(var(--bs-info-rgb), 0.03) 50%, 
        rgba(var(--bs-light-rgb), 0.8) 100%);
    z-index: -1;
}

.hero-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(var(--bs-primary-rgb), 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(var(--bs-info-rgb), 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(var(--bs-success-rgb), 0.05) 0%, transparent 50%);
}

.hero-content {
    z-index: 1;
}

.min-vh-50 {
    min-height: 50vh;
}

.hero-brand {
    animation: fadeInUp 0.8s ease-out;
}

.hero-icon-wrapper {
    padding: 1rem;
    background: linear-gradient(135deg, rgba(var(--bs-primary-rgb), 0.1), rgba(var(--bs-info-rgb), 0.05));
    border-radius: 20px;
    border: 2px solid rgba(var(--bs-primary-rgb), 0.1);
    transition: all 0.3s ease;
}

.hero-icon-wrapper:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--bs-primary-rgb), 0.15);
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0;
}

.hero-description {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-actions {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-actions .btn {
    transition: all 0.3s ease;
    font-weight: 600;
    border-width: 2px;
}

.hero-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* === Login Card Styles === */

.login-card {
    animation: fadeInRight 0.8s ease-out 0.3s both;
}

.login-card .card {
    border-radius: 20px;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.login-card .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.login-icon-wrapper {
    animation: pulse 2s infinite;
}

.login-card .form-floating > .form-control {
    border-width: 2px;
    padding-top: 1.875rem;
    transition: all 0.3s ease;
}

.login-card .form-floating > .form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.15);
    transform: translateY(-1px);
}

.login-card .form-floating > label {
    padding-top: 1.375rem;
    font-weight: 500;
}

.login-card .btn {
    font-weight: 600;
    transition: all 0.3s ease;
    border-width: 0;
}

.login-card .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--bs-primary-rgb), 0.3);
}

/* === Animations === */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* === Responsive Design === */

/* Compact hero styles for logged-in users */
.hero-section.hero-compact .hero-brand {
    margin-bottom: 1rem;
}

.hero-section.hero-compact .hero-icon-wrapper {
    padding: 0.5rem;
    border-radius: 12px;
}

.hero-section.hero-compact .hero-icon-wrapper svg {
    width: 60px !important;
    height: 60px !important;
}

.hero-section.hero-compact .hero-subtitle {
    font-size: 1.1rem;
}

.hero-section.hero-compact .hero-title {
    font-size: 1.75rem;
}

.hero-section.hero-compact .hero-description {
    margin-bottom: 1rem;
}

.hero-section.hero-compact .hero-description .lead {
    font-size: 1rem;
}

.hero-section.hero-compact .hero-actions .btn {
    font-size: 0.85rem;
    padding: 0.6rem 1.2rem !important;
}

@media (max-width: 991.98px) {
    .hero-section {
        min-height: auto;
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .hero-actions .btn {
        font-size: 0.9rem;
        padding: 0.75rem 1.5rem !important;
    }
    
    .login-card {
        margin-top: 3rem;
    }
}

@media (max-width: 767.98px) {
    .hero-brand {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-icon-wrapper {
        margin-bottom: 1rem !important;
        margin-right: 0 !important;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-actions .d-flex {
        flex-direction: column;
    }
    
    .hero-actions .btn {
        width: 100%;
        margin-bottom: 0.75rem;
    }
    
    /* Compact hero mobile adjustments */
    .hero-section.hero-compact {
        padding: 1rem 0;
    }
    
    .hero-section.hero-compact .hero-content {
        padding: 0.5rem 1rem !important;
        margin-top: 0.5rem !important;
    }
    
    .hero-section.hero-compact .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-section.hero-compact .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-section.hero-compact .hero-brand {
        margin-bottom: 0.75rem;
    }
    
    .hero-section.hero-compact .hero-description {
        margin-bottom: 0.75rem;
    }
}

/* === Extra-compact layout for very small screens (phones) === */
@media (max-width: 575.98px) {
    /* Hide tagline to avoid pushing login below the fold */
    .hero-description { display: none !important; }

    /* Tighter hero spacing and smaller typography */
    .hero-section { padding: .25rem 0 !important; }
    .hero-content { padding: .5rem 0.5rem !important; margin-top: 0 !important; margin-bottom: 50px !important; }
    .hero-brand { margin-bottom: .5rem !important; }
    .hero-title { font-size: 1.35rem !important; line-height: 1.15 !important; }
    .hero-subtitle { font-size: .95rem !important; }
    .hero-icon-wrapper { padding: .5rem !important; border-radius: 12px !important; }
    .hero-icon-wrapper svg { width: 48px !important; height: 48px !important; }

    /* Compact hero buttons */
    .hero-actions .btn { width: 100%; font-size: .9rem !important; padding: .5rem .9rem !important; }
    .hero-actions .d-flex { gap: .5rem !important; }

    /* Shrink login card paddings and controls */
    .login-card { margin-top: .25rem !important; }
    .login-card .card-body { padding: 1rem !important; }
    .login-card .form-floating { margin-bottom: .75rem !important; }
    .login-card .form-floating > .form-control { padding-top: 1.25rem !important; }
    .login-card .form-floating > label { padding-top: .9rem !important; }
    .login-card .btn.btn-lg { padding: .6rem .9rem !important; font-size: 1rem !important; }

    /* Avoid tall hero row forcing extra vertical space on unauthenticated */
    .min-vh-50 { min-height: auto !important; }
}

/* === Dark Mode Support === */

[data-bs-theme="dark"] .hero-background {
    background: linear-gradient(135deg, 
        rgba(var(--bs-primary-rgb), 0.1) 0%, 
        rgba(var(--bs-info-rgb), 0.05) 50%, 
        rgba(var(--bs-dark-rgb), 0.9) 100%);
}

[data-bs-theme="dark"] .login-card .card {
    background: rgba(var(--bs-dark-rgb), 0.95);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .hero-icon-wrapper {
    background: linear-gradient(135deg, rgba(var(--bs-primary-rgb), 0.15), rgba(var(--bs-info-rgb), 0.1));
    border-color: rgba(var(--bs-primary-rgb), 0.2);
}

/* === Special Filters Dark Mode Support === */

/* Special filters container dark mode styling */
[data-bs-theme="dark"] .special-filters-container {
    background: rgba(var(--bs-dark-rgb), 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px);
}

[data-bs-theme="dark"] .special-filters-container:hover {
    background: rgba(var(--bs-dark-rgb), 0.9) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

/* Special filter labels dark mode */
[data-bs-theme="dark"] .special-filters-container .form-check-label {
    color: var(--bs-body-color) !important;
}

/* Special filter icons dark mode adjustments */
[data-bs-theme="dark"] .special-filter-icon {
    filter: brightness(1.2) saturate(1.1);
}

/* Enhanced form switches for special filters in dark mode */
[data-bs-theme="dark"] .special-filters-container .form-check-input {
    background-color: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

[data-bs-theme="dark"] .special-filters-container .form-check-input:checked {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
}

[data-bs-theme="dark"] .special-filters-container .form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25) !important;
}

/* === Enhanced Dark Mode Readability Fixes === */

/* Hero section text fixes */
[data-bs-theme="dark"] .hero-title.text-dark {
    color: var(--bs-body-color) !important;
}

[data-bs-theme="dark"] .text-dark {
    color: var(--bs-body-color) !important;
}

/* Improve muted text readability in dark mode */
[data-bs-theme="dark"] .text-muted {
    color: var(--bs-secondary-color) !important;
    opacity: 0.85;
}

[data-bs-theme="dark"] .text-secondary {
    color: var(--bs-secondary-color) !important;
    opacity: 0.9;
}

/* Table and activity section improvements */
[data-bs-theme="dark"] .table {
    --bs-table-color: var(--bs-body-color);
    --bs-table-bg: transparent;
    --bs-table-border-color: rgba(255, 255, 255, 0.1);
    --bs-table-hover-bg: rgba(255, 255, 255, 0.05);
}

[data-bs-theme="dark"] .table-hover > tbody > tr:hover > td {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Badge improvements for dark mode */
[data-bs-theme="dark"] .badge.text-bg-light {
    background-color: rgba(255, 255, 255, 0.15) !important;
    color: var(--bs-body-color) !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-bs-theme="dark"] .badge.bg-success-subtle {
    background-color: rgba(var(--bs-success-rgb), 0.2) !important;
    color: var(--bs-success-text-emphasis) !important;
    border: 1px solid rgba(var(--bs-success-rgb), 0.3);
}

/* Highlight title and breadcrumb area */
[data-bs-theme="dark"] .highlight-title {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .highlight {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Link improvements */
[data-bs-theme="dark"] .link-body-emphasis {
    color: var(--bs-emphasis-color) !important;
}

[data-bs-theme="dark"] .link-body-emphasis:hover {
    color: var(--bs-primary) !important;
}

/* Form improvements */
[data-bs-theme="dark"] .form-floating > label {
    color: var(--bs-secondary-color);
}

[data-bs-theme="dark"] .form-control {
    background-color: var(--bs-dark);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--bs-body-color);
}

[data-bs-theme="dark"] .form-control:focus {
    background-color: var(--bs-dark);
    border-color: var(--bs-primary);
    color: var(--bs-body-color);
}

/* Button improvements */
[data-bs-theme="dark"] .btn-light {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--bs-body-color);
}

[data-bs-theme="dark"] .btn-light:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--bs-body-color);
}

/* Dropdown improvements */
[data-bs-theme="dark"] .dropdown-menu {
    background-color: var(--bs-dark);
    border-color: rgba(255, 255, 255, 0.15);
}

[data-bs-theme="dark"] .dropdown-item {
    color: var(--bs-body-color);
}

[data-bs-theme="dark"] .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--bs-body-color);
}

/* Navbar improvements */
[data-bs-theme="dark"] .navbar {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .nav-link {
    color: var(--bs-nav-link-color);
}

[data-bs-theme="dark"] .navbar-brand {
    color: var(--bs-primary) !important;
}

/* Footer improvements */
[data-bs-theme="dark"] .border-top {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-bs-theme="dark"] .text-body-secondary {
    color: var(--bs-secondary-color) !important;
    opacity: 0.8;
}

/* SVG icon improvements for dark mode */
[data-bs-theme="dark"] svg {
    filter: brightness(0.9) contrast(1.1);
}

[data-bs-theme="dark"] .navbar-brand svg,
[data-bs-theme="dark"] .hero-icon-wrapper svg {
    filter: brightness(1.2) saturate(1.1);
}

/* Alert improvements */
[data-bs-theme="dark"] .alert {
    border-color: rgba(255, 255, 255, 0.15);
}

[data-bs-theme="dark"] .alert-danger {
    background-color: rgba(var(--bs-danger-rgb), 0.15);
    border-color: rgba(var(--bs-danger-rgb), 0.3);
    color: var(--bs-danger-text-emphasis);
}

/* Pagination improvements */
[data-bs-theme="dark"] .pagination .page-link {
    background-color: var(--bs-dark);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--bs-body-color);
}

[data-bs-theme="dark"] .pagination .page-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--bs-body-color);
}

[data-bs-theme="dark"] .pagination .page-item.active .page-link {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

[data-bs-theme="dark"] .pagination .page-item.disabled .page-link {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
}

/* Accordion improvements */
[data-bs-theme="dark"] .accordion-item {
    background-color: var(--bs-dark);
    border-color: rgba(255, 255, 255, 0.125);
}

[data-bs-theme="dark"] .accordion-button {
    background-color: rgba(var(--bs-dark-rgb), 0.8);
    color: var(--bs-body-color);
    border-color: rgba(255, 255, 255, 0.125);
}

[data-bs-theme="dark"] .accordion-button:not(.collapsed) {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--bs-body-color);
}

[data-bs-theme="dark"] .accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}

[data-bs-theme="dark"] .accordion-body {
    background-color: var(--bs-dark);
    color: var(--bs-body-color);
}

/* Modal improvements */
[data-bs-theme="dark"] .modal-content {
    background-color: var(--bs-dark);
    border-color: rgba(255, 255, 255, 0.2);
}

[data-bs-theme="dark"] .modal-header {
    border-bottom-color: rgba(255, 255, 255, 0.125);
}

[data-bs-theme="dark"] .modal-footer {
    border-top-color: rgba(255, 255, 255, 0.125);
}

/* Card improvements */
[data-bs-theme="dark"] .card {
    background-color: var(--bs-dark);
    border-color: rgba(255, 255, 255, 0.125);
}

[data-bs-theme="dark"] .card-header {
    background-color: rgba(var(--bs-dark-rgb), 0.8);
    border-bottom-color: rgba(255, 255, 255, 0.125);
}

/* Loading indicator improvements */
[data-bs-theme="dark"] .htmx-custom-indicator {
    filter: brightness(1.2);
}

[data-bs-theme="dark"] .bg-body-secondary {
    background-color: rgba(var(--bs-dark-rgb), 0.6) !important;
}

/* Form switch improvements */
[data-bs-theme="dark"] .form-check-input {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

[data-bs-theme="dark"] .form-check-input:checked {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

[data-bs-theme="dark"] .form-check-label {
    color: var(--bs-body-color);
}

/* === Header badge contrast tweaks === */
.highlight-title .badge {
    border: 1px solid rgba(var(--bs-secondary-rgb), 0.25);
}

.highlight-title .badge.bg-success-subtle {
    border-color: rgba(var(--bs-success-rgb), 0.35);
}

.highlight-title .badge.text-bg-light {
    border-color: rgba(var(--bs-secondary-rgb), 0.3);
}

/* === Project Cards Modern Look === */

.project-card {
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(var(--bs-light-rgb), 0.7), rgba(var(--bs-light-rgb), 0.5));
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

[data-bs-theme="dark"] .project-card {
    background: linear-gradient(180deg, rgba(var(--bs-dark-rgb), 0.8), rgba(var(--bs-dark-rgb), 0.6));
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .project-card:hover {
    background: linear-gradient(180deg, rgba(var(--bs-dark-rgb), 0.9), rgba(var(--bs-dark-rgb), 0.7));
    border-color: rgba(255, 255, 255, 0.15);
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.project-card .card-body {
    padding: 1rem 1rem 1rem 1rem;
}

.project-card .logo-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    background: var(--bs-body-bg);
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05);
}

[data-bs-theme="dark"] .project-card .logo-wrapper {
    background: rgba(var(--bs-dark-rgb), 0.8);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
}

.project-card .logo-image {
    max-width: 54px;
    max-height: 36px;
}

.project-card h5 {
    font-size: 1rem;
}

.project-card .badge {
    font-weight: 500;
}

/* === Activity (Recent) Section === */

.activity-card {
    border-radius: 16px;
}

.activity-list .list-group-item {
    transition: background-color .2s ease, transform .15s ease;
}

.activity-item:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.03);
}

.activity-logo {
    box-shadow: 0 0 0 1px rgba(0,0,0,0.05);
}

.activity-state {
    max-height: 28px;
}

[data-bs-theme="dark"] .activity-item:hover {
    background-color: rgba(255,255,255,0.05);
}

[data-bs-theme="dark"] .activity-logo {
    box-shadow: 0 0 0 1px rgba(255,255,255,0.08);
}

/* Emphasis for type and status */
.activity-type {
    font-weight: 600;
    letter-spacing: .2px;
}

.activity-status-badge {
    font-weight: 500;
}

.activity-status-img {
    max-height: 30px;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,.05));
}

/* === Modern Filter Section === */

.filter-group .form-select {
    transition: all 0.3s ease;
}

.filter-group .form-select:hover {
    background-color: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    transform: translateY(-1px);
}

.filter-group .form-select:focus {
    background-color: rgba(255, 255, 255, 1) !important;
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.15), 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    border-color: var(--bs-primary) !important;
    transform: translateY(-1px);
}

.filter-group .form-label {
    transition: color 0.2s ease;
}

.filter-group:hover .form-label {
    color: var(--bs-primary) !important;
}

/* Dark mode support for filters */
[data-bs-theme="dark"] .filter-group .form-select {
    background-color: rgba(var(--bs-dark-rgb), 0.8) !important;
}

[data-bs-theme="dark"] .filter-group .form-select:hover {
    background-color: rgba(var(--bs-dark-rgb), 0.95) !important;
}

[data-bs-theme="dark"] .filter-group .form-select:focus {
    background-color: rgba(var(--bs-dark-rgb), 1) !important;
}

/* Modern filter card styling */
.card[style*="linear-gradient"] {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.card[style*="linear-gradient"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
}

[data-bs-theme="dark"] .card[style*="linear-gradient"] {
    background: linear-gradient(180deg, rgba(var(--bs-dark-rgb), 0.8), rgba(var(--bs-dark-rgb), 0.6)) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .card[style*="linear-gradient"]:hover {
    background: linear-gradient(180deg, rgba(var(--bs-dark-rgb), 0.9), rgba(var(--bs-dark-rgb), 0.7)) !important;
    border-color: rgba(255, 255, 255, 0.15);
}

/* Enhanced switch styling */
.form-check-input[type="checkbox"] {
    transition: all 0.2s ease;
}

.form-check-input[type="checkbox"]:hover {
    transform: scale(1.05);
}

/* === Navbar Responsive Improvements === */

/* Ensure toggler icon is visible without relying on .navbar-light/.navbar-dark */
.navbar {
    --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(33,37,41,0.75)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

[data-bs-theme="dark"] .navbar {
    --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,0.85)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Tighter vertical padding for header */
.navbar {
    --bs-navbar-padding-y: .5rem;
}

/* Nav link spacing */
.navbar-nav .nav-link {
    padding: .5rem .75rem;
}

/* Prevent oversized buttons from overflowing on small screens */
@media (max-width: 991.98px) {
    .btn-novo-rel { min-width: 160px; }
    .btn-ajuda { min-width: 120px; }
}

@media (max-width: 575.98px) {
    .btn-novo-rel, .btn-ajuda {
        min-width: auto;
        padding-left: .75rem;
        padding-right: .75rem;
    }
    .navbar .btn span.fs-6 {
        font-size: .9rem;
    }
    .navbar-brand {
        font-size: 1rem;
    }
    .navbar-brand svg {
        width: 24px;
        height: 24px;
    }
}

/* Utility: hide on medium (tablet) widths only */
@media (min-width: 768px) and (max-width: 991.98px) {
    .hide-md { display: none !important; }
}

/* === Modern Navbar Search Bar === */

.navbar-search-container {
    max-width: 320px;
    margin: 0 auto;
}

.navbar-search-form {
    position: relative;
    width: 100%;
}

.navbar-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 100%;
}

.navbar-search-input {
    width: 100%;
    padding: 0.5rem 2.75rem 0.5rem 2.5rem;
    border-radius: 5px;
    border: 1px solid rgba(0, 151, 103, 0.45);
    background-color: rgba(0, 151, 103, 0.18);
    backdrop-filter: blur(10px);
    font-size: 0.875rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0, 151, 103, 0.16);
    color: var(--bs-body-color);
}

.navbar-search-input::placeholder {
    color: rgba(0, 151, 103, 0.7);
}

.navbar-search-input:hover {
    background-color: rgba(0, 151, 103, 0.26);
    border-color: rgba(0, 151, 103, 0.55);
    box-shadow: 0 6px 14px rgba(0, 151, 103, 0.22);
}

.navbar-search-input:focus {
    background-color: rgba(0, 151, 103, 0.22);
    border-color: #009767;
    box-shadow: 0 0 0 0.25rem rgba(0, 151, 103, 0.2),
                0 6px 16px rgba(0, 151, 103, 0.25);
    outline: 0;
}

.navbar-search-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(0, 151, 103, 0.7);
    pointer-events: none;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    z-index: 1;
}

.navbar-search-input:focus ~ .navbar-search-icon,
.navbar-search-input:hover ~ .navbar-search-icon {
    color: #009767;
}

.navbar-search-kbd {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.25rem 0.5rem;
    background: rgba(0, 151, 103, 0.18);
    border: 1px solid rgba(0, 151, 103, 0.45);
    border-radius: 4px;
    font-size: 0.7rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
    color: rgba(0, 151, 103, 0.9);
    font-weight: 600;
    pointer-events: none;
    transition: opacity 0.2s ease;
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 0;
}

.navbar-search-input:focus ~ .navbar-search-kbd {
    opacity: 0;
}

.navbar-search-input:not(:placeholder-shown) ~ .navbar-search-kbd {
    opacity: 0;
}

/* === Dark Mode Support === */

[data-bs-theme="dark"] .navbar-search-input {
    background-color: rgba(0, 151, 103, 0.22);
    border-color: rgba(0, 151, 103, 0.45);
    color: var(--bs-body-color);
}

[data-bs-theme="dark"] .navbar-search-input::placeholder {
    color: rgba(0, 200, 130, 0.7);
}

[data-bs-theme="dark"] .navbar-search-input:hover {
    background-color: rgba(0, 151, 103, 0.3);
    border-color: rgba(0, 151, 103, 0.55);
}

[data-bs-theme="dark"] .navbar-search-input:focus {
    background-color: rgba(0, 151, 103, 0.28);
    border-color: #00b87c;
}

[data-bs-theme="dark"] .navbar-search-icon {
    color: rgba(0, 200, 130, 0.8);
}

[data-bs-theme="dark"] .navbar-search-input:focus ~ .navbar-search-icon,
[data-bs-theme="dark"] .navbar-search-input:hover ~ .navbar-search-icon {
    color: #00d68f;
}

[data-bs-theme="dark"] .navbar-search-kbd {
    background: rgba(0, 151, 103, 0.2);
    border-color: rgba(0, 151, 103, 0.35);
    color: rgba(0, 200, 130, 0.9);
}

/* === Responsive Adjustments === */

@media (max-width: 1399.98px) {
    .navbar-search-container {
        max-width: 320px;
    }
}

@media (max-width: 1199.98px) {
    .navbar-search-container {
        max-width: 280px;
    }
}

@media (max-width: 991.98px) {
    .navbar-search-container {
        max-width: 320px;
        width: 100%;
        padding: 0 1rem;
    }
}

@media (max-width: 575.98px) {
    .navbar-search-container {
        padding: 0 0.5rem;
    }
    
    .navbar-search-input {
        font-size: 0.85rem;
        padding: 0.45rem 2.5rem 0.45rem 2.25rem;
    }
    
    .navbar-search-icon {
        left: 0.75rem;
    }
}

/* === Animations === */

@keyframes searchPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(0, 151, 103, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(0, 151, 103, 0);
    }
}

.navbar-search-input:focus {
    animation: searchPulse 2s infinite;
}

/* === Accessibility === */

@media (prefers-reduced-motion: reduce) {
    .navbar-search-input,
    .navbar-search-icon,
    .navbar-search-kbd {
        transition: none;
    }
    
    .navbar-search-input:focus {
        animation: none;
    }
}

/* === Navbar Utility Buttons (Atalhos, User, Bug) - Glass style matching search === */

.navbar .navbar-utility-btn {
    --btn-rgb: var(--bs-primary-rgb);
    padding: 0.5rem 0.9rem;
    border-radius: 5px;
    border: 1px solid rgba(var(--btn-rgb), 0.45) !important;
    background-color: rgba(var(--btn-rgb), 0.18) !important;
    box-shadow: 0 2px 6px rgba(var(--btn-rgb), 0.16) !important;
    backdrop-filter: blur(10px);
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar .navbar-utility-btn:hover {
    background-color: rgba(var(--btn-rgb), 0.26) !important;
    border-color: rgba(var(--btn-rgb), 0.55) !important;
    box-shadow: 0 6px 14px rgba(var(--btn-rgb), 0.22) !important;
    transform: translateY(-1px);
}

.navbar .navbar-utility-btn:focus {
    background-color: rgba(var(--btn-rgb), 0.22) !important;
    border-color: rgba(var(--btn-rgb), 0.7) !important;
    box-shadow: 0 0 0 0.25rem rgba(var(--btn-rgb), 0.2), 0 6px 16px rgba(var(--btn-rgb), 0.25) !important;
    outline: 0;
}

/* Map variants to their RGB and text colors for readability */
.navbar .btn-success.navbar-utility-btn { 
    --btn-rgb: var(--bs-success-rgb);
    color: var(--bs-success-text-emphasis) !important;
}
.navbar .btn-primary.navbar-utility-btn { 
    --btn-rgb: var(--bs-primary-rgb);
    color: var(--bs-primary-text-emphasis) !important;
}
.navbar .btn-warning.navbar-utility-btn { 
    --btn-rgb: var(--bs-warning-rgb);
    color: var(--bs-warning-text-emphasis) !important;
}

/* Remove solid backgrounds from base .btn variants inside navbar when using utility style */
.navbar .navbar-utility-btn.btn-success,
.navbar .navbar-utility-btn.btn-primary,
.navbar .navbar-utility-btn.btn-warning {
    background-image: none !important;
}

/* Dark mode tuning */
[data-bs-theme="dark"] .navbar .navbar-utility-btn {
    background-color: rgba(var(--btn-rgb), 0.22) !important;
    border-color: rgba(var(--btn-rgb), 0.45) !important;
    box-shadow: 0 2px 8px rgba(var(--btn-rgb), 0.2) !important;
}
[data-bs-theme="dark"] .navbar .navbar-utility-btn:hover {
    background-color: rgba(var(--btn-rgb), 0.3) !important;
    border-color: rgba(var(--btn-rgb), 0.55) !important;
    box-shadow: 0 6px 16px rgba(var(--btn-rgb), 0.28) !important;
}
[data-bs-theme="dark"] .navbar .navbar-utility-btn:focus {
    background-color: rgba(var(--btn-rgb), 0.28) !important;
}

/* === Global Glass Button (applies to buttons outside navbar) === */

.btn-glass {
    --btn-rgb: var(--bs-primary-rgb);
    border: 1px solid rgba(var(--btn-rgb), 0.45) !important;
    background-color: rgba(var(--btn-rgb), 0.18) !important;
    box-shadow: 0 2px 6px rgba(var(--btn-rgb), 0.16) !important;
    backdrop-filter: blur(10px);
    font-weight: 600;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-glass:hover {
    background-color: rgba(var(--btn-rgb), 0.26) !important;
    border-color: rgba(var(--btn-rgb), 0.55) !important;
    box-shadow: 0 6px 14px rgba(var(--btn-rgb), 0.22) !important;
    transform: translateY(-1px);
}

.btn-glass:focus {
    background-color: rgba(var(--btn-rgb), 0.22) !important;
    border-color: rgba(var(--btn-rgb), 0.7) !important;
    box-shadow: 0 0 0 0.25rem rgba(var(--btn-rgb), 0.2), 0 6px 16px rgba(var(--btn-rgb), 0.25) !important;
    outline: 0;
}

/* Variant color mapping for glass buttons */
.btn-primary.btn-glass { --btn-rgb: var(--bs-primary-rgb); color: var(--bs-primary-text-emphasis) !important; }
.btn-success.btn-glass { --btn-rgb: var(--bs-success-rgb); color: var(--bs-success-text-emphasis) !important; }
.btn-warning.btn-glass { --btn-rgb: var(--bs-warning-rgb); color: var(--bs-warning-text-emphasis) !important; }
.btn-danger.btn-glass  { --btn-rgb: var(--bs-danger-rgb);  color: var(--bs-danger-text-emphasis) !important; }
.btn-info.btn-glass    { --btn-rgb: var(--bs-info-rgb);    color: var(--bs-info-text-emphasis) !important; }
.btn-secondary.btn-glass { --btn-rgb: var(--bs-secondary-rgb); color: var(--bs-secondary-text-emphasis) !important; }
.btn-light.btn-glass   { --btn-rgb: var(--bs-light-rgb);   color: var(--bs-body-color) !important; }
.btn-dark.btn-glass    { --btn-rgb: var(--bs-dark-rgb);    color: var(--bs-body-bg) !important; }

/* Outline variants mapping */
.btn-outline-primary.btn-glass { --btn-rgb: var(--bs-primary-rgb); color: var(--bs-primary) !important; }
.btn-outline-success.btn-glass { --btn-rgb: var(--bs-success-rgb); color: var(--bs-success) !important; }
.btn-outline-warning.btn-glass { --btn-rgb: var(--bs-warning-rgb); color: var(--bs-warning) !important; }
.btn-outline-danger.btn-glass  { --btn-rgb: var(--bs-danger-rgb);  color: var(--bs-danger) !important; }
.btn-outline-info.btn-glass    { --btn-rgb: var(--bs-info-rgb);    color: var(--bs-info) !important; }
.btn-outline-secondary.btn-glass { --btn-rgb: var(--bs-secondary-rgb); color: var(--bs-secondary) !important; }
.btn-outline-light.btn-glass   { --btn-rgb: var(--bs-light-rgb);   color: var(--bs-body-color) !important; }
.btn-outline-dark.btn-glass    { --btn-rgb: var(--bs-dark-rgb);    color: var(--bs-body-color) !important; }

/* Remove solid gradient background when glass is applied */
.btn-glass.btn { background-image: none !important; }

/* Disabled state */
.btn-glass:disabled, .btn-glass.disabled { opacity: .75; filter: saturate(.9); }

/* Dark mode tweaks */
[data-bs-theme="dark"] .btn-glass {
    background-color: rgba(var(--btn-rgb), 0.22) !important;
    border-color: rgba(var(--btn-rgb), 0.45) !important;
    box-shadow: 0 2px 8px rgba(var(--btn-rgb), 0.2) !important;
}
[data-bs-theme="dark"] .btn-glass:hover {
    background-color: rgba(var(--btn-rgb), 0.3) !important;
    border-color: rgba(var(--btn-rgb), 0.55) !important;
    box-shadow: 0 6px 16px rgba(var(--btn-rgb), 0.28) !important;
}
[data-bs-theme="dark"] .btn-glass:focus {
    background-color: rgba(var(--btn-rgb), 0.28) !important;
}