﻿/* Shell base */
.weverb-shell {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    height: 100dvh;
    min-height: 100dvh;
    width: 100%;
    max-width: 100%;
}

.weverb-body {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    overflow: hidden;
}

.organization-shell {
    position: relative;
    display: grid;
    grid-template-rows: 3.5rem minmax(0, 1fr);
    height: 100dvh;
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

.organization-shell > .weverb-body {
    grid-row: 2;
    flex: 1 1 auto;
}

/* Sidebar */
.weverb-body > .sidebar {
    width: 280px;
    flex: 0 0 280px;
    position: sticky;
    top: 0;
    height: calc(100dvh - 3.5rem);
}

/* Main */
.weverb-main {
    flex: 1 1 0;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    min-width: 0;
    width: 0;
    overflow: auto;
}

/* Top row (alinhado com sidebars) */
.weverb-toprow {
    height: 3.5rem;
    flex: 0 0 3.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    width: 100%;
    padding: 0 .9rem;
    border-bottom: 1px solid var(--weverb-border);
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(11,18,32,.92);
    backdrop-filter: blur(10px);
}

.weverb-toprow-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: .75rem;
    margin-left: auto;
}

.weverb-toprow-brand {
    display: inline-flex;
    align-items: center;
    margin: 0px;
    min-width: 0;
    text-decoration: none;
    transition: opacity .15s ease, visibility .15s ease;
}

.organization-shell > .weverb-toprow {
    grid-row: 1;
    min-width: 0;
    z-index: 20;
}

.weverb-toprow-brand-icon {
    height: 34px;
    width: auto;
}

.weverb-toprow-brand-text {
    height: 50px;
    width: auto;
    opacity: .94;
}

.weverb-toprow-brand-logo {
    height: 32px;
    width: auto;
    opacity: .94;
}

.notification-bell {
    position: relative;
}

.notification-bell-button {
    position: relative;
    width: var(--weverb-control-h);
    min-width: var(--weverb-control-h);
    height: var(--weverb-control-h);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--weverb-primary);
}

    .notification-bell-button .bi {
        font-size: 1.1rem;
        line-height: 1;
    }

.notification-bell-badge {
    position: absolute;
    top: -5px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--weverb-danger);
    color: #fff;
    border: 2px solid #fff;
    font-size: .68rem;
    font-weight: 800;
    line-height: 1;
}

.notification-bell-menu {
    width: min(360px, calc(100vw - 24px));
    padding: 0;
    overflow: hidden;
}

.notification-bell-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .8rem .9rem;
    border-bottom: 1px solid var(--weverb-border);
    color: var(--weverb-text);
}

    .notification-bell-header .btn-link {
        min-height: auto;
        padding: 0;
        color: var(--weverb-primary);
        font-weight: 700;
        text-decoration: none;
    }

.notification-bell-empty {
    padding: 1rem;
    color: var(--weverb-text-muted);
    font-weight: 600;
    text-align: center;
}

.notification-bell-item {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: .65rem;
    width: 100%;
    padding: .75rem .9rem;
    border-bottom: 1px solid rgba(15, 23, 42, .08);
    white-space: normal;
}

    .notification-bell-item:last-child {
        border-bottom: 0;
    }

    .notification-bell-item.is-unread {
        background: rgba(23, 199, 216, .08) !important;
    }

.notification-bell-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--weverb-primary);
}

    .notification-bell-icon.is-warning {
        background: var(--weverb-warning);
    }

    .notification-bell-icon.is-info {
        background: var(--weverb-info);
    }

    .notification-bell-icon.is-system {
        background: var(--weverb-brand-600);
    }

    .notification-bell-icon.is-manual {
        background: var(--weverb-success);
    }

.notification-bell-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: .15rem;
    text-align: left;
}

.notification-bell-title {
    color: var(--weverb-text);
    font-weight: 750;
    line-height: 1.25;
}

.notification-bell-message,
.notification-bell-time {
    color: var(--weverb-text-muted);
    font-size: .78rem;
    line-height: 1.25;
}

/* Conteúdo */
.weverb-content {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
    padding: 1rem;
    width: 100%;
}

/* Mobile */
@media (max-width: 640.98px) {
    .weverb-shell {
        flex-direction: column;
    }

    .organization-shell {
        display: flex;
        height: auto;
        min-height: 100dvh;
        left: auto;
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

        .weverb-body {
            flex-direction: column;
            overflow: visible;
        }

        .weverb-body > .sidebar {
            width: 100%;
            flex: 0 0 auto;
            height: auto;
            position: relative;
            top: auto;
        }

    .weverb-main {
        overflow: visible;
        width: 100%;
    }

    .weverb-toprow {
        position: relative;
        top: auto;
    }

    .weverb-toprow-brand-text {
        display: none;
    }
}

/* Sidebar mini usada em áreas operacionais compactas */
@media (min-width: 641px) {
    .weverb-body > .sidebar.auto-mini {
        width: 64px;
        flex: 0 0 64px;
        transition: width .2s ease, flex-basis .2s ease;
        overflow: hidden;
        border-right: 0;
    }

        .weverb-body > .sidebar.auto-mini:hover {
            width: 280px;
            flex-basis: 280px;
        }
}
