/* Custom CSS for Login Page */
:root {
    --iara-blue: #0349D6;
    --iara-green: #4AC900;
    --iara-green-hover: #269168;
    --iara-dark: #06132a;
    --iara-deeper: #0A192F;
    --iara-yellow: #EFE300;
    --iara-dark-blue: #0A192F;
    --iara-light-bg: #F8FAFC;
    --muted: #6c757d;
    --ink: #dbe4ee;
    --divider: rgba(255, 255, 255, .15);
    --primary-color: #2eaf7d;
    --primary-hover: #269168;
    --primary-hover-color: #269168;
    --primary-light-bg: #eaf7f2;
    --bg: #f8f9fa;
    --border: #e9ecef;
    --border-color: #e9ecef;
    --light: #F8FAFC;
    --text: #212529;
    --text-color: #212529;
    --text-dark: #212529;
    --text-muted: #6c757d;
    --sidebar-w: 300px;
    --sidebar-width: 280px;
}

body {
    font-family: 'Montserrat', sans-serif;
    height: 100vh;
    overflow: hidden;
    color: var(--text-dark);
    background: url("/assets/images/backgroundIARA_gradiente.png") no-repeat center center fixed;
}

.link-clean {
    color: inherit;
    text-decoration: none;
}

.main-wrapper {
    display: flex;
    height: 100%;

}

/* ===== NAVBAR (mantido) ===== */
.app-header {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    padding: .75rem 1rem
}

.navbar-brand img {
    height: 60px;
    width: auto
}

.navbar-nav {
    gap: .85rem
}

.nav-link {
    padding: .5rem .9rem !important;
    border-radius: .5rem;
    color: #6c757d;
    font-weight: 500
}

.nav-link:hover,
.nav-link.active {
    background: #0349d6;
    color: var(--iara-light-bg) !important
}

/* ===== Sidebar (desktop) ===== */
.left-sidebar {
    width: var(--sidebar-width);
    background: #fff;
    border-right: 1px solid var(--border-color);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

/* desce um pouco no desktop */
@media (min-width: 992px) {
    .left-sidebar {
        padding-top: 1.5rem
    }
}

.content-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0
}

@media (max-width:991.98px) {
    .navbar-brand img {
        height: 40px
    }
}

/* ===== Área do Login ===== */
.login-area {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    overflow-y: auto;
    position: relative;
}

/* filtro escuro mais leve */
.login-area::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .15)
}

/* ===== Card (conteúdo branco) ===== */
.glass-card {
    background: rgba(255, 255, 255, .25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, .45);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .2);
    width: 400px;
    text-align: center;
    position: relative;
    z-index: 1;
    color: #fff;
}

.login-logo {
    width: 60%;
    max-width: 180px;
    height: auto;
    margin-bottom: 1.5rem
}

.input-box {
    position: relative;
    width: 100%;
    margin: 30px 0;
    text-align: left
}

.input-box i {
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    opacity: .95
}

.input-box .form-label {
    position: absolute;
    top: 50%;
    left: 35px;
    transform: translateY(-50%);
    color: #fff;
    opacity: .95;
    pointer-events: none;
    transition: .3s ease all;
    font-weight: 600
}

.input-box .form-control {
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, .6);
    border-radius: 0;
    padding: 0 5px 0 35px;
    color: #fff;
    font-weight: 600
}

.input-box .form-control:focus {
    background: transparent;
    box-shadow: none;
    border-bottom-color: #fff
}

.input-box .form-control:focus~.form-label,
.input-box .form-control:not(:placeholder-shown)~.form-label {
    top: -5px;
    font-size: .8rem;
    opacity: 1
}

.form-control::placeholder {
    color: transparent
}

.btn-custom {
    background: #EFE300;
    border: none;
    color: #0349d6;
    font-weight: bold;
    padding: 12px 0;
    border-radius: 25px;
    transition: .3s;
    margin-top: 1rem
}

.btn-custom:hover {
    background: #d6c700;
    color: #0349d6;
    box-shadow: 0 4px 15px rgba(239, 227, 0, .4);
    transform: translateY(-2px)
}

.links {
    margin-top: 15px
}

.links a {
    color: #fff;
    font-weight: 600;
    text-decoration: none
}

.links a:hover {
    text-decoration: underline
}

/* ===== Offcanvas (menu mobile à direita) ===== */
.offcanvas .navbar-brand img {
    height: 40px
}

.offcanvas .nav-link {
    display: block
}

/* ===== Responsivo ===== */
@media (max-width:991.98px) {
    .content-wrapper {
        width: 100%
    }
}

@media (max-width:768px) {
    .app-header {
        padding: .5rem 1rem
    }

    .login-area {
        align-items: flex-start;
        padding-top: 10vh
    }

    .glass-card {
        width: 90%;
        padding: 2rem 1.5rem
    }
}

/* Sidebar Desktop */
.left-sidebar {
    width: var(--sidebar-width);
    background: #fff;
    border-right: 1px solid var(--border-color);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-shrink: 0
}

.left-sidebar .sidebar-section+.sidebar-section {
    border-top: 1px solid var(--border-color);
    margin-top: 1rem;
    padding-top: 1rem
}

.sidebar-title {
    font-size: .75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .5px
}

.btn-new-chat {
    width: 100%;
    border-radius: 8px;
    font-weight: 600;
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: .75rem;
    margin-bottom: 1rem
}

.btn-new-chat:hover {
    background: var(--primary-hover-color)
}

.sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0
}

.sidebar-list-item a {
    display: block;
    padding: .65rem .85rem;
    border-radius: 8px;
    color: var(--text-color);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    line-height: 1.2
}

.sidebar-list-item a:hover {
    background: var(--body-bg)
}

.sidebar-list-item a.active {
    background: var(--primary-light-bg);
    color: var(--primary-color);
    font-weight: 700
}

.chat-list {
    max-height: calc(100vh - 320px);
    overflow-y: auto;
    margin-right: -.5rem;
    padding-right: .5rem
}

.chat-list::-webkit-scrollbar,
.scrollable-actions::-webkit-scrollbar {
    width: 6px
}

.chat-list::-webkit-scrollbar-thumb,
.scrollable-actions::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px
}

.scrollable-actions {
    flex-grow: 1;
    overflow-y: auto;
    margin-right: -.5rem;
    padding-right: .5rem
}