.toast-container{
    position:fixed;
    left:50%;
    bottom:28px;
    transform:translateX(-50%);
    z-index:10000;
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:12px;
    width:min(520px,calc(100vw - 32px));
    max-height:calc(100vh - 56px);
    pointer-events:none;
}

.toast{
    width:100%;
    display:grid;
    grid-template-columns:44px 1fr 34px;
    gap:14px;
    align-items:center;
    padding:16px;
    border-radius:18px;
    background:#fff;
    border:1px solid #e5e7eb;
    box-shadow:0 18px 45px rgba(16,24,40,.16);
    opacity:0;
    transform:translateY(16px) scale(.98);
    transition:.25s ease;
    overflow:hidden;
    position:relative;
    pointer-events:auto;
}

.toast.show{
    opacity:1;
    transform:translateY(0) scale(1);
}

.toast::before{
    content:"";
    position:absolute;
    left:0;
    top:0;
    bottom:0;
    width:5px;
}

.toast-success::before{
    background:#16a34a;
}

.toast-error::before{
    background:#dc2626;
}

.toast-warning::before{
    background:#f59e0b;
}

.toast-info::before{
    background:#2563eb;
}

.toast-icon{
    width:44px;
    height:44px;
    border-radius:14px;
    display:flex;
    align-items:center;
    justify-content:center;
}

.toast-icon svg{
    width:22px;
    height:22px;
}

.toast-success .toast-icon{
    background:#dcfce7;
    color:#16a34a;
}

.toast-error .toast-icon{
    background:#fee2e2;
    color:#dc2626;
}

.toast-warning .toast-icon{
    background:#fef3c7;
    color:#d97706;
}

.toast-info .toast-icon{
    background:#dbeafe;
    color:#2563eb;
}

.toast-content{
    font-size:14px;
    font-weight:650;
    color:#111827;
    line-height:1.45;
}

.toast-close{
    width:34px;
    height:34px;
    border:0;
    border-left:1px solid #e5e7eb;
    background:transparent;
    cursor:pointer;
    color:#6b7280;
    display:flex;
    align-items:center;
    justify-content:center;
}

.toast-close:hover{
    color:#111827;
}

.modal-overlay{
    position:fixed;
    inset:0;
    background:rgba(15,23,42,.58);
    backdrop-filter:blur(4px);
    display:flex;
    align-items:center;
    justify-content:center;
    padding:24px;
    z-index:9999;
}

.modal-window{
    width:100%;
    max-width:520px;
    background:#fff;
    border-radius:30px;
    position:relative;
    padding:32px;
    animation:modalIn .25s ease;
}

@keyframes modalIn{

    from{
        opacity:0;
        transform:translateY(20px);
    }

    to{
        opacity:1;
        transform:none;
    }
}

.modal-close{
    position:absolute;
    right:18px;
    top:18px;
    width:42px;
    height:42px;
    border:0;
    border-radius:14px;
    background:#f8fafc;
    cursor:pointer;
}

.confirm-modal{
    text-align:center;
}

.confirm-icon{
    width:84px;
    height:84px;
    border-radius:26px;
    background:#fef3c7;
    color:#d97706;
    display:flex;
    align-items:center;
    justify-content:center;
    margin:0 auto 20px;
}

.confirm-icon svg{
    width:34px;
    height:34px;
}

.confirm-modal h3{
    margin-bottom:12px;
    font-size:28px;
}

.confirm-modal p{
    color:#64748b;
    margin-bottom:24px;
}

.confirm-actions{
    display:flex;
    gap:14px;
}

.btn-secondary{
    flex:1;
    height:52px;
    border:1px solid #e5e7eb;
    background:#fff;
    border-radius:16px;
    font-weight:700;
    cursor:pointer;
}

.form-error{
    color:#dc2626;
    font-size:13px;
    margin-top:8px;
    font-weight:700;
}

.dropdown-menu{
    position:absolute;
    top:100%;
    right:0;
    width:360px;
    background:#fff;
    border-radius:22px;
    border:1px solid #e5e7eb;
    box-shadow:
        0 24px 60px rgba(15,23,42,.12);
    padding:10px;
    display:none;
    z-index:999;
}

.dropdown-menu.show{
    display:block;
}

.notification-item{
    display:block;
    padding:14px;
    border-radius:16px;
    transition:.2s;
    color:#0f172a;
}

.notification-item:hover{
    background:#f8fafc;
}

.notification-title{
    font-weight:800;
    margin-bottom:6px;
}

.notification-message{
    color:#64748b;
    font-size:14px;
    line-height:1.5;
}

.dropdown-loading,
.dropdown-empty{
    padding:24px;
    text-align:center;
    color:#64748b;
}

.is-loading{
    opacity:.7;
    pointer-events:none;
}

body.modal-open{
    overflow:hidden;
}

/* Topbar dropdowns */
.topbar-dropdown{
    position:relative;
}

.topbar-dropdown .dropdown-menu{
    top:calc(100% + 10px);
    right:0;
    width:320px;
    padding:8px;
    border-radius:16px;
    border:1px solid #e4e7ec;
    background:#fff;
    box-shadow:0 18px 45px rgba(16,24,40,.14);
    overflow:hidden;
}

.topbar-dropdown .dropdown-user-menu{
    width:260px;
}

.dropdown-user-menu .dropdown-item{
    width:100%;
    min-height:44px;
    padding:0 12px;
    display:flex;
    align-items:center;
    gap:10px;
    border:0;
    border-radius:10px;
    background:transparent;
    color:#344054;
    font-size:13px;
    font-weight:650;
    line-height:1.25;
    text-decoration:none;
    text-align:left;
    cursor:pointer;
}

.dropdown-user-menu .dropdown-item svg{
    width:17px;
    height:17px;
    flex:0 0 17px;
    color:#667085;
}

.dropdown-user-menu .dropdown-item:hover{
    background:#f8fafc;
    color:#101828;
}

.dropdown-user-menu .dropdown-item.danger{
    color:#b42318;
}

.dropdown-user-menu .dropdown-divider{
    height:1px;
    margin:7px 4px;
    background:#eaecf0;
}

.dropdown-logout-form{
    margin:0;
}

.topbar-user-btn:focus-visible,
.topbar-icon-btn:focus-visible{
    outline:2px solid var(--primary);
    outline-offset:2px;
}

.notification-badge{
    position:absolute;
    top:-5px;
    right:-5px;
    min-width:18px;
    height:18px;
    padding:0 5px;
    place-items:center;
    border:2px solid #fff;
    border-radius:999px;
    background:#e11d48;
    color:#fff;
    font-size:9px;
    font-weight:800;
}

.dropdown-notifications-menu{
    max-height:min(480px, calc(100vh - 90px));
}

.dropdown-notifications-head{
    padding:10px 10px 12px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    border-bottom:1px solid #eaecf0;
}

.dropdown-notifications-head strong{
    font-size:14px;
}

.dropdown-notifications-head a{
    color:var(--primary);
    font-size:11px;
    font-weight:750;
    text-decoration:none;
}

.dropdown-notifications-list{
    max-height:380px;
    overflow-y:auto;
    padding-top:6px;
}

.dropdown-notifications-menu .notification-item.unread{
    background:#f5f7ff;
}

.dropdown-notifications-menu .notification-date{
    margin-top:7px;
    color:#98a2b3;
    font-size:10px;
}

@media(max-width:560px){
    .topbar-dropdown .dropdown-menu{
        position:fixed;
        top:72px;
        right:12px;
        left:12px;
        width:auto;
    }
}

/* Pesquisa global */
.global-search-overlay[hidden]{display:none}

.global-search-overlay{
    position:fixed;
    inset:0;
    z-index:3000;
    padding:10vh 20px 30px;
    display:flex;
    justify-content:center;
    align-items:flex-start;
    background:rgba(15,23,42,.46);
    backdrop-filter:blur(5px);
}

.global-search-dialog{
    width:min(680px,100%);
    max-height:min(680px,80vh);
    display:flex;
    flex-direction:column;
    overflow:hidden;
    border:1px solid rgba(255,255,255,.8);
    border-radius:22px;
    background:#fff;
    box-shadow:0 30px 90px rgba(15,23,42,.25);
}

.global-search-input-wrap{
    min-height:72px;
    padding:0 20px;
    display:flex;
    align-items:center;
    gap:13px;
    border-bottom:1px solid #eaecf0;
}

.global-search-input-wrap>svg{
    width:21px;
    color:#667085;
}

.global-search-input-wrap input{
    flex:1;
    height:70px;
    border:0;
    box-shadow:none;
    font-size:17px;
}

.global-search-input-wrap input:focus{
    border:0;
    box-shadow:none;
}

.global-search-dialog kbd{
    padding:3px 6px;
    border:1px solid #d0d5dd;
    border-bottom-width:2px;
    border-radius:6px;
    background:#f9fafb;
    color:#667085;
    font-family:inherit;
    font-size:10px;
}

.global-search-results{
    min-height:170px;
    overflow-y:auto;
    padding:10px;
}

.global-search-hint,
.global-search-empty{
    min-height:150px;
    display:grid;
    place-items:center;
    color:#98a2b3;
    font-size:13px;
}

.global-search-group+.global-search-group{
    margin-top:10px;
}

.global-search-group-title{
    padding:9px 11px 6px;
    display:flex;
    align-items:center;
    gap:7px;
    color:#667085;
    font-size:10px;
    font-weight:800;
    letter-spacing:.08em;
    text-transform:uppercase;
}

.global-search-group-title svg{
    width:14px;
    height:14px;
}

.global-search-result{
    min-height:58px;
    padding:9px 12px;
    border-radius:12px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:15px;
    color:#101828;
    text-decoration:none;
}

.global-search-result:hover,
.global-search-result.active{
    background:#f2f4ff;
}

.global-search-result span{
    min-width:0;
    display:flex;
    flex-direction:column;
    gap:3px;
}

.global-search-result strong,
.global-search-result small{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.global-search-result strong{font-size:13px}
.global-search-result small{color:#667085;font-size:11px}
.global-search-result>svg{width:15px;color:#98a2b3;flex:0 0 15px}

.global-search-footer{
    min-height:44px;
    padding:0 16px;
    border-top:1px solid #eaecf0;
    display:flex;
    align-items:center;
    gap:18px;
    color:#98a2b3;
    font-size:10px;
}

.global-search-footer span{
    display:flex;
    align-items:center;
    gap:4px;
}

body.search-open{overflow:hidden}

@media(max-width:560px){
    .global-search-overlay{padding:12px}
    .global-search-dialog{max-height:calc(100vh - 24px);border-radius:17px}
    .global-search-footer{display:none}
}


.toast-container{
    position:fixed;
    left:50%;
    bottom:28px;
    transform:translateX(-50%);
    z-index:9999;
    display:flex;
    flex-direction:column;
    gap:12px;
    width:min(400px,calc(100% - 32px));
}

.toast{
    display:grid;
    grid-template-columns:44px 1fr 34px;
    gap:14px;
    align-items:center;
    padding:16px;
    border-radius:18px;
    background:#fff;
    border:1px solid #e5e7eb;
    box-shadow:0 18px 45px rgba(16,24,40,.16);
    opacity:0;
    transform:translateY(16px) scale(.98);
    transition:.25s ease;
    overflow:hidden;
    position:relative;
}

.toast.show{
    opacity:1;
    transform:translateY(0) scale(1);
}

.toast::before{
    content:"";
    position:absolute;
    left:0;
    top:0;
    bottom:0;
    width:5px;
}

.toast-success::before{ background:#16a34a; }
.toast-error::before{ background:#dc2626; }
.toast-warning::before{ background:#f59e0b; }
.toast-info::before{ background:#2563eb; }

.toast-icon{
    width:44px;
    height:44px;
    border-radius:14px;
    display:flex;
    align-items:center;
    justify-content:center;
}

.toast-success .toast-icon{
    background:#dcfce7;
    color:#16a34a;
}

.toast-error .toast-icon{
    background:#fee2e2;
    color:#dc2626;
}

.toast-warning .toast-icon{
    background:#fef3c7;
    color:#d97706;
}

.toast-info .toast-icon{
    background:#dbeafe;
    color:#2563eb;
}

.toast-content{
    font-size:14px;
    font-weight:650;
    color:#111827;
    line-height:1.45;
}

.toast-close{
    width:34px;
    height:34px;
    border:0;
    border-left:1px solid #e5e7eb;
    background:transparent;
    cursor:pointer;
    color:#6b7280;
    display:flex;
    align-items:center;
    justify-content:center;
}

.toast-close:hover{
    color:#111827;
}
