/* =========================================
   RESET
========================================= */

* {
    box-sizing: border-box;
}


html,
body {
    margin: 0;
    padding: 0;
}


body {

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    background: #f5f7fb;

    color: #1e293b;

}


/* =========================================
   HEADER PRINCIPAL
========================================= */

.top-header {

    width: 100%;

    background: #0f172a;

    border-bottom:
        1px solid #e2e8f0;

}

.favicon
{
color: #FFFFFF;

}

.header-container {

    max-width: 1500px;

    height: 76px;

    margin: 0 auto;

    padding: 0 32px;

    display: flex;

    align-items: center;

    justify-content: space-between;

}


/* =========================================
   LOGO
========================================= */

.app-logo {

    display: flex;

    align-items: center;

    /*gap: 12px;*/

    text-decoration: none;

    color: inherit;

}


.app-logo-icon {

    width: 42px;

    height: 42px;

    border-radius: 12px;

    display: flex;

    align-items: center;

    justify-content: center;

    background: #2563eb;

    color: #ffffff;

    font-size: 18px;

}


.app-logo-text {

    display: flex;

    flex-direction: column;

}


.app-name {

    font-size: 18px;

    font-weight: 700;

    color: #FFFFFF;

}


.app-version {

    font-size: 12px;

    color: #64748b;

    margin-top: 2px;

}


/* =========================================
   MENU
========================================= */

.main-menu {

    display: flex;

    align-items: center;

    gap: 6px;

}


.menu-link {

    display: flex;

    align-items: center;

    gap: 8px;

    padding: 10px 14px;

    border-radius: 9px;

    text-decoration: none;

    font-size: 14px;

    font-weight: 500;

    color: #FFFFFF;

    transition:
        background 0.2s ease,
        color 0.2s ease;

}


.menu-link:hover {

    background: #f1f5f9;

    color: #2563eb;

}


/* =========================================
   HEADER ACTIONS
========================================= */

.header-actions {

    display: flex;

    align-items: center;

    gap: 12px;

}


.header-icon-btn {

    width: 42px;

    height: 42px;

    border: none;

    border-radius: 10px;

    background: transparent;

    color: #64748b;

    cursor: pointer;

    font-size: 17px;

}


.header-icon-btn:hover {

    background: #f1f5f9;

    color: #2563eb;

}


/* =========================================
   UTILIZADOR
========================================= */

.user-profile {

    border: none;

    background: transparent;

    padding: 0;

    cursor: pointer;

}


.user-avatar {

    width: 40px;

    height: 40px;

    border-radius: 50%;

    display: flex;

    align-items: center;

    justify-content: center;

    background: #0f172a;

    color: #ffffff;

    font-size: 13px;

    font-weight: 700;

}


/* =========================================
   COMPANY BAR
========================================= */

.company-bar {

    background: #ffffff;

    border-bottom:
        1px solid #e2e8f0;

}


.company-container {

    max-width: 1500px;

    margin: 0 auto;

    padding: 14px 32px;

    display: flex;

    align-items: center;

    gap: 12px;

}


/* =========================================
   COMPANY CARD
========================================= */

.company-card {

    position: relative;

    height: 80px;

    min-width: 110px;

    padding: 0 0px;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 9px;

    background: #ffffff;

    border:
        1px solid #e2e8f0;

    border-radius: 12px;

    cursor: pointer;

    color: #64748b;

    font-size: 14px;

    font-weight: 600;

    transition:
        all 0.2s ease;

}


.company-card:hover {

    border-color: #cbd5e1;

    background: #f8fafc;

}


/* =========================================
   COMPANY ACTIVE
========================================= */

.company-card.active {

    border-color: #2563eb;

    background: #eff6ff;

    color: #2563eb;

}


/* =========================================
   COMPANY CHECK
========================================= */

.company-check {

    position: absolute;

    top: -7px;

    right: -7px;

    width: 20px;

    height: 20px;

    border-radius: 50%;

    display: none;

    align-items: center;

    justify-content: center;

    background: #2563eb;

    color: white;

    font-size: 10px;

}


.company-card.active .company-check {

    display: flex;

}


/* =========================================
   LOGOS DAS EMPRESAS
========================================= */

.company-logo {

    width: 100px;

    height: 50px;

    background-repeat: no-repeat;

    background-position: center;

    background-size: contain;

}

.company-logo2 {

    width: 50px;

    height: 32px;

    background-repeat: no-repeat;

    background-position: center;

    background-size: contain;

}

.logo-egmosil {

    background-image:
        url("../images/logos/egmosil.svg");

}


.logo-pavimosil {

    background-image:
        url("../images/logos/pavimosil.svg");

}

.logo-favicon {

    background-image:
        url("../images/logos/favicon_white.svg");
}

/* =========================================
   CONTEÚDO
========================================= */

.main-content {

    max-width: 1500px;

    margin: 0 auto;

    padding: 35px 32px 60px;

}


/* =========================================
   PAGE HEADER
========================================= */

.page-header {

    display: flex;

    align-items: flex-start;

    justify-content: space-between;

    gap: 20px;

    margin-bottom: 32px;

}


.page-header-left {

    display: flex;

    flex-direction: column;

}


.page-title {

    margin: 0;

    font-size: 30px;

    font-weight: 700;

    color: #0f172a;

}


.page-subtitle {

    margin: 8px 0 0;

    font-size: 14px;

    color: #64748b;

}


/* =========================================
   BOTÃO NOVO
========================================= */

.btn-new {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 9px;

    padding: 12px 18px;

    border: none;

    border-radius: 10px;

    background: #2563eb;

    color: #ffffff;

    text-decoration: none;

    font-size: 14px;

    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease;

}


.btn-new:hover {

    background: #1d4ed8;

    transform: translateY(-1px);

}


/* =========================================
   RESPONSIVO
========================================= */

@media (max-width: 1000px) {

    .header-container {

        padding: 0 20px;

    }


    .company-container {

        padding: 14px 20px;

    }


    .main-content {

        padding: 30px 20px 50px;

    }


}


@media (max-width: 800px) {

    .main-menu {

        gap: 2px;

    }


    .menu-link {

        padding: 10px;

    }


    .menu-link i {

        margin: 0;

    }


}


@media (max-width: 650px) {

    .header-container {

        height: auto;

        padding: 15px 20px;

        flex-wrap: wrap;

        gap: 15px;

    }


    .main-menu {

        order: 3;

        width: 100%;

        justify-content: space-between;

    }


    .menu-link {

        flex-direction: column;

        gap: 4px;

        font-size: 11px;

    }


    .company-container {

        overflow-x: auto;

    }


    .company-card {

        flex-shrink: 0;

    }


    .page-header {

        flex-direction: column;

    }


    .btn-new {

        width: 100%;

    }

}

/* =========================================
   EMPTY STATE
========================================= */

.empty-state {
    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    text-align: center;

    min-height: 400px;

    padding: 50px 30px;

    background: #ffffff;

    border: 1px solid #e5e7eb;

    border-radius: 14px;

    box-shadow:
        0 2px 10px rgba(15, 23, 42, 0.04);
}


.empty-icon {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 68px;
    height: 68px;

    margin-bottom: 18px;

    border-radius: 18px;

    background: #eff6ff;

    color: #2563eb;

    font-size: 26px;
}


.empty-state h2 {
    margin: 0 0 8px;

    color: #1f2937;

    font-size: 20px;
}


.empty-state p {
    margin: 0 0 22px;

    color: #6b7280;

    font-size: 14px;
}

.status {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;

    font-size: 11px;
    font-weight: 700;

    white-space: nowrap;
}
/* =========================================
   UTILIZADOR
========================================= */

.user-actions {

    display: flex;

    align-items: center;

}


.user-menu {

    position: relative;

}


/* =========================================
   BOTÃO UTILIZADOR
========================================= */

.user-menu-button {

    display: flex;

    align-items: center;

    gap: 10px;

    padding: 5px 8px;

    border: none;

    border-radius: 10px;

    background: transparent;

    cursor: pointer;

    font-family: inherit;

    transition: background 0.2s ease;

}


.user-menu-button:hover {

    background: #f8fafc;

}


/* =========================================
   AVATAR
========================================= */

.user-avatar {

    display: flex;

    align-items: center;

    justify-content: center;

    flex-shrink: 0;

    width: 38px;

    height: 38px;

    border-radius: 50%;

    background: #2563eb;

    color: #ffffff;

    font-size: 14px;

    font-weight: 700;

}


.user-avatar.large {

    width: 42px;

    height: 42px;

}


/* =========================================
   INFORMAÇÃO
========================================= */

.user-details {

    display: flex;

    flex-direction: column;

    align-items: flex-start;

    gap: 2px;

}





.user-role {

    color: #94a3b8;

    font-size: 11px;

}


.user-chevron {

    color: #94a3b8;

    font-size: 11px;

    margin-left: 3px;

    transition: transform 0.2s ease;

}


.user-menu.active .user-chevron {

    transform: rotate(180deg);

}


/* =========================================
   DROPDOWN
========================================= */

.user-dropdown {

    position: absolute;

    top: calc(100% + 10px);

    right: 0;

    width: 200px;

    padding: 8px;

    background: #ffffff;

    border: 1px solid #e5e7eb;

    border-radius: 12px;

    box-shadow:
        0 12px 30px rgba(15, 23, 42, 0.12);

    opacity: 0;

    visibility: hidden;

    transform: translateY(-8px);

    transition:
        opacity 0.2s ease,
        transform 0.2s ease,
        visibility 0.2s ease;

    z-index: 1000;

}


.user-menu.active .user-dropdown {

    opacity: 1;

    visibility: visible;

    transform: translateY(0);

}


/* =========================================
   HEADER DO DROPDOWN
========================================= */

.user-dropdown-header {

    display: flex;

    align-items: center;

    gap: 12px;

    padding: 10px;

}


.user-dropdown-header strong {

    display: block;

    color: #1f2937;

    font-size: 13px;

}


.user-dropdown-header span {

    display: block;

    margin-top: 3px;

    color: #94a3b8;

    font-size: 11px;

}


.user-dropdown-divider {

    height: 1px;

    margin: 4px 0;

    background: #e5e7eb;

}


/* =========================================
   LOGOUT
========================================= */

.dropdown-logout {

    display: flex;

    align-items: center;

    gap: 10px;

    padding: 10px;

    border-radius: 8px;

    color: #64748b;

    text-decoration: none;

    font-size: 13px;

    font-weight: 600;

    transition:
        background 0.2s ease,
        color 0.2s ease;

}


.dropdown-logout:hover {

    background: #fef2f2;

    color: #dc2626;

}


/* =========================================
   LOGIN
========================================= */

.login-btn {

    display: inline-flex;

    align-items: center;

    gap: 8px;

    padding: 10px 16px;

    border-radius: 9px;

    background: #2563eb;

    color: #ffffff;

    text-decoration: none;

    font-size: 13px;

    font-weight: 600;

    transition: background 0.2s ease;

}


.login-btn:hover {

    background: #1d4ed8;

}

/* =========================================
   USER MENU
========================================= */

.user-menu {
    position: relative;
}


/* BOTÃO DO UTILIZADOR */

.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 14px;

    background: transparent;
    border: none;

    cursor: pointer;

    padding: 8px 12px;

    font-family: inherit;
}


/* AVATAR */

.nav-user-avatar {
    width: 36px;
    height: 36px;

    border-radius: 50%;

    background: linear-gradient(
        135deg,
        #5d7dde,
        #3453ad
    );

    color: #ffffff;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 14px;
    font-weight: 700;

    overflow: hidden;

    flex-shrink: 0;
}


.nav-user-avatar img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    display: block;
}


/* INFORMAÇÃO */

.user-details {
    display: flex;
    flex-direction: column;

    align-items: flex-start;

    text-align: left;

    line-height: 1.3;
}


.user-name {
    font-size: 15px;
    font-weight: 700;

    color: #FFFFFF;
}


.user-role {
    font-size: 13px;

    color: #7a8798;

    margin-top: 2px;
}


/* SETA */

.user-menu-arrow {
    margin-left: 8px;

    color: #7a8798;

    transition: transform 0.2s ease;
}


.user-menu.active .user-menu-arrow {
    transform: rotate(180deg);
}


/* =========================================
   DROPDOWN
========================================= */

.user-dropdown {
    position: absolute;

    top: calc(100% + 12px);
    right: 0;

    width: 200px;

    background: #ffffff;

    border: 1px solid #e2e7ef;

    border-radius: 18px;

    box-shadow:
        0 15px 40px rgba(31, 45, 61, 0.15);

    padding: 12px;

    z-index: 9999;

    display: none;
}


.user-menu.active .user-dropdown {
    display: block;
}


/* HEADER DO DROPDOWN */

.user-dropdown-header {
    display: flex;

    align-items: center;

    gap: 14px;

    padding: 12px;

    border-bottom: 1px solid #e8edf3;
}


.user-dropdown-avatar {
    width: 36px;
    height: 36px;

    border-radius: 50%;

    background: linear-gradient(
        135deg,
        #5d7dde,
        #3453ad
    );

    color: #ffffff;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 14px;
    font-weight: 700;

    overflow: hidden;

    flex-shrink: 0;
}


.user-dropdown-avatar img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}


.user-dropdown-info {
    display: flex;
    flex-direction: column;
}


.user-dropdown-name {
    font-size: 17px;
    font-weight: 700;

    color: #27364a;
}


.user-dropdown-username {
    font-size: 14px;

    color: #7a8798;

    margin-top: 3px;
}


/* LINKS */

.user-dropdown-links {
    padding: 8px 0;
}


.user-dropdown-links a {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px 0px;
    text-decoration: none !important;
    color: #44546a;
    font-size: 12px;
    transition: background 0.2s ease, color 0.2s ease;
}


.user-dropdown-links a:hover {
    background: #f2f5fb;

    color: #4565bd;
}


.user-dropdown-links a i {
    width: 20px;

    text-align: center;

    font-size: 16px;
}


/* DIVISOR */

.user-dropdown-divider {
    height: 1px;

    background: #e8edf3;

    margin: 6px 0;
}


/* LOGOUT */

.user-dropdown-links .logout-link {
    color: #c95a5a;
}


.user-dropdown-links .logout-link:hover {
    background: #fff3f3;

    color: #b94747;
}

/* =========================================
   APP FOOTER
========================================= */

.app-footer {

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 20px 32px;

    margin-top: 40px;

    border-top: 1px solid #e2e7ef;

    background: #ffffff;

    color: #7a8798;

    font-size: 13px;

}


.footer-left {

    display: flex;

    align-items: center;

    gap: 6px;

}


.footer-left strong {

    color: #44546a;

}


.footer-right {

    font-size: 13px;

    color: #8a96a8;

}

/* =========================================
   BOTÃO INICIAR SESSÃO
========================================= */

.login-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    padding: 11px 18px;

    background: #111827;
    color: #ffffff;

    border-radius: 8px;

    text-decoration: none;

    font-size: 14px;
    font-weight: 600;

    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


.login-button:hover {
    background: #1f2937;

    transform: translateY(-1px);

    box-shadow:
        0 6px 16px rgba(0, 0, 0, 0.12);
}


.login-button i {
    font-size: 14px;
}

/* =========================================================
   EGMOSIL BOX — APP SHELL
========================================================= */

:root {
    --app-sidebar-width: 224px;
    --app-bg: #f5f8fc;
    --app-surface: #ffffff;
    --app-sidebar: #102e52;
    --app-sidebar-2: #0d2745;
    --app-sidebar-text: #dbe7f5;
    --app-sidebar-muted: #8fa6c0;
    --app-sidebar-active: #1769d2;
    --app-text: #17233b;
    --app-muted: #64748b;
    --app-border: #e5eaf0;
    --app-blue: #2563eb;
}

html, body { min-height: 100%; }

body {
    background: var(--app-bg);
    color: var(--app-text);
}

.app-shell {
    min-height: 100vh;
    display: flex;
    width: 100%;
}

.app-sidebar {
    position: fixed;
    z-index: 1000;
    inset: 0 auto 0 0;
    width: var(--app-sidebar-width);
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, var(--app-sidebar) 0%, var(--app-sidebar-2) 100%);
    color: #fff;
    box-shadow: 3px 0 14px rgba(15,35,60,.12);
}

.sidebar-brand {
    height: 76px;
    padding: 0 19px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-decoration: none;
    color: #fff;
}

.sidebar-logo .company-logo2 {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
}

.sidebar-logo-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sidebar-app-name {
    color: #fff;
    font-size: 15px;
    line-height: 1.1;
    font-weight: 800;
}

.sidebar-app-version {
    margin-top: 4px;
    color: rgba(255,255,255,.58);
    font-size: 9px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 15px 10px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 39px;
    padding: 0 12px;
    border-radius: 7px;
    color: var(--app-sidebar-text);
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    transition: background .18s ease, color .18s ease;
}

.sidebar-link i {
    width: 18px;
    text-align: center;
    color: #c2d4e9;
    font-size: 13px;
}

.sidebar-link:hover {
    background: rgba(255,255,255,.075);
    color: #fff;
}

.sidebar-link.active {
    background: linear-gradient(90deg,#1769d2,#155db8);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.07),0 4px 10px rgba(0,0,0,.10);
}

.sidebar-link.active i { color:#fff; }

.sidebar-bottom {
    margin-top: auto;
    padding: 0 10px 12px;
}

.sidebar-section-label {
    margin: 0 5px 7px;
    color: var(--app-sidebar-muted);
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.sidebar-company-switcher {
    padding-bottom: 10px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.sidebar-company-buttons { display:flex; gap:4px; }

.sidebar-company-btn {
    min-width:0;
    flex:1;
    height:30px;
    padding:0 5px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:5px;
    border:1px solid rgba(255,255,255,.10);
    border-radius:6px;
    background:rgba(255,255,255,.045);
    color:#cbd8e8;
    cursor:pointer;
    font-family:inherit;
    font-size:8px;
    font-weight:700;
}

.sidebar-company-btn:hover { background:rgba(255,255,255,.10); color:#fff; }
.sidebar-company-btn.active { background:rgba(37,99,235,.75); border-color:rgba(255,255,255,.18); color:#fff; }

.sidebar-company-btn i { font-size:9px; }

.sidebar-company-mark {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:15px;
    height:15px;
    border-radius:4px;
    background:rgba(255,255,255,.12);
    color:#fff;
    font-size:8px;
}

.sidebar-company-mark.egmosil { background:#2563eb; }
.sidebar-company-mark.pavimosil { background:#db2777; }

.sidebar-user-area .user-menu { position:relative; width:100%; }

.sidebar-user-area .user-menu-trigger {
    width:100%;
    padding:9px 7px;
    gap:9px;
    border-radius:8px;
    justify-content:flex-start;
}

.sidebar-user-area .user-menu-trigger:hover { background:rgba(255,255,255,.07); }

.sidebar-user-area .nav-user-avatar {
    width:34px;
    height:34px;
    background:#f8fafc;
    color:#17365d;
    border:2px solid rgba(255,255,255,.25);
}

.sidebar-user-area .user-details { min-width:0; flex:1; }

.sidebar-user-area .user-name {
    max-width:120px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    color:#fff;
    font-size:10px;
}

.sidebar-user-area .user-role { color:#91a7bf; font-size:8px; }
.sidebar-user-area .user-menu-arrow { color:#91a7bf; font-size:9px; }

.sidebar-user-area .user-dropdown {
    left:calc(100% + 8px);
    right:auto;
    bottom:0;
    top:auto;
}

.sidebar-login {
    display:flex;
    align-items:center;
    gap:9px;
    min-height:38px;
    padding:0 10px;
    border-radius:7px;
    color:#fff;
    background:rgba(255,255,255,.07);
    text-decoration:none;
    font-size:11px;
    font-weight:600;
}

.app-main {
    width:calc(100% - var(--app-sidebar-width));
    min-width:0;
    min-height:100vh;
    margin-left:var(--app-sidebar-width);
    display:flex;
    flex-direction:column;
}

.app-topbar {
    position:sticky;
    top:0;
    z-index:900;
    height:58px;
    flex:0 0 58px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:0 25px;
    background:rgba(255,255,255,.96);
    border-bottom:1px solid var(--app-border);
    backdrop-filter:blur(10px);
}

.topbar-left,.topbar-right { display:flex; align-items:center; }
.topbar-left { gap:12px; }
.topbar-right { gap:5px; }

.sidebar-toggle {
    display:none;
    width:32px;
    height:32px;
    align-items:center;
    justify-content:center;
    border:0;
    border-radius:7px;
    background:#f1f5f9;
    color:#334155;
    cursor:pointer;
}

.topbar-context {
    display:flex;
    align-items:center;
    gap:7px;
    font-size:10px;
}

.topbar-app-name { color:#17233b; font-weight:750; }
.topbar-separator { color:#cbd5e1; }
.topbar-page-label { color:#94a3b8; }

.topbar-icon-btn {
    width:32px;
    height:32px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border:0;
    border-radius:7px;
    background:transparent;
    color:#64748b;
    cursor:pointer;
    font-size:12px;
}

.topbar-icon-btn:hover { background:#f1f5f9; color:#2563eb; }

.app-main .main-content {
    width:100%;
    max-width:none;
    flex:1;
    margin:0;
    padding:26px 28px 45px;
}

.app-footer { margin-left:var(--app-sidebar-width); }

/* =========================================================
   RESPONSIVO
========================================================= */

@media (max-width:900px) {
    .app-sidebar {
        transform:translateX(-100%);
        transition:transform .22s ease;
    }

    .app-sidebar.mobile-open { transform:translateX(0); }

    .app-main {
        width:100%;
        margin-left:0;
    }

    .sidebar-toggle { display:inline-flex; }

    .app-main .main-content { padding:22px 18px 40px; }

    .app-footer { margin-left:0; }
}

@media (max-width:600px) {
    .app-topbar { padding:0 15px; }
    .topbar-context { display:none; }
}

/* Desktop sidebar preference; mobile keeps its original full-width drawer. */
.sidebar-collapse-toggle { display: none; }
@media (min-width: 901px) {
    html.sidebar-collapsed { --app-sidebar-width: 68px; }
    .app-sidebar { transition: width .2s ease; }
    .app-main { transition: width .2s ease, margin-left .2s ease; }
    .app-footer { transition: margin-left .2s ease; }
    .sidebar-brand { position: static; flex-shrink: 0; }
    .sidebar-collapse-toggle {
        display: inline-flex; align-items: center; justify-content: center;
        position: absolute; right: -14px; top: 50%; transform: translateY(-50%);
        width: 26px; height: 26px; padding: 0; border: 0; border-radius: 6px; border-color: #0d2745;
        background: #dbe7f5; color: #0d2745; cursor: pointer; 
    }
    .sidebar-collapse-toggle:hover { background: #0d2745; color: #dbe7f5;}
    .sidebar-collapse-toggle:focus-visible { outline: 2px solid white; outline-offset: 1px; }
    .sidebar-collapsed .sidebar-brand { padding: 0 19px; }

    .sidebar-collapsed .sidebar-collapse-toggle i { transform: rotate(180deg); }
    .sidebar-collapsed .sidebar-logo-text,
    .sidebar-collapsed .sidebar-link > span,
    .sidebar-collapsed .sidebar-login > span,
    .sidebar-collapsed .sidebar-user-area .user-details,
    .sidebar-collapsed .sidebar-user-area .user-menu-arrow { display: none; }
    .sidebar-collapsed .sidebar-link,
    .sidebar-collapsed .sidebar-login { justify-content: center; gap: 0; padding: 0; }
    .sidebar-collapsed .sidebar-user-area .user-menu-trigger { justify-content: center; gap: 0; }
}
.main-content > .page-company-bar { padding: 0 0 24px; }
@media (prefers-reduced-motion: reduce) {
    .app-sidebar, .app-main, .app-footer { transition: none; }
}

.page-company-bar { padding: 12px 28px 0; }
.page-company-switcher { display: flex; gap: 8px; flex-wrap: wrap; }
.page-company-btn { height: 60px; min-width: 84px; padding: 8px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--app-border); border-radius: 10px; background: white; cursor: pointer; color: var(--app-text); }
.page-company-btn.active { border-color: #8db6ea; background: #f7fbff; }
.page-company-btn:hover { border-color: #8db6ea; }
.page-company-logo { display: block; width: 76px; height: 38px; background-position: center; background-repeat: no-repeat; background-size: contain; }
@media (max-width:900px) { .page-company-bar { padding: 12px 18px 0; } }


/* =========================================
   TOAST NOTIFICATIONS
========================================= */

.toast-container {
    position: fixed;

    top: 24px;
    right: 24px;

    width: min(380px, calc(100vw - 48px));

    display: flex;
    flex-direction: column;

    gap: 12px;

    z-index: 20000;

    pointer-events: none;
}


.app-toast {
    display: flex;
    align-items: flex-start;

    gap: 12px;

    padding: 16px;

    background: #ffffff;

    border: 1px solid #e5e7eb;
    border-radius: 12px;

    box-shadow:
        0 12px 35px rgba(15, 23, 42, 0.16);

    pointer-events: auto;

    animation: toastEntrada 0.3s ease;
}


.app-toast-icon {
    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 9px;

    font-size: 16px;
}


.app-toast-content {
    flex: 1;

    display: flex;
    flex-direction: column;

    gap: 3px;

    min-width: 0;
}


.app-toast-content strong {
    color: #1e293b;

    font-size: 13px;
    font-weight: 700;
}


.app-toast-content span {
    color: #64748b;

    font-size: 13px;
    line-height: 1.4;
}


.app-toast-close {
    width: 28px;
    height: 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    padding: 0;

    border: none;

    background: transparent;

    color: #94a3b8;

    cursor: pointer;

    border-radius: 7px;
}


.app-toast-close:hover {
    background: #f1f5f9;
    color: #475569;
}


/* SUCESSO */

.app-toast-success {
    border-left: 4px solid #16a34a;
}

.app-toast-success .app-toast-icon {
    background: #dcfce7;
    color: #16a34a;
}


/* ERRO */

.app-toast-error {
    border-left: 4px solid #dc2626;
}

.app-toast-error .app-toast-icon {
    background: #fee2e2;
    color: #dc2626;
}


/* AVISO */

.app-toast-warning {
    border-left: 4px solid #f59e0b;
}

.app-toast-warning .app-toast-icon {
    background: #fef3c7;
    color: #d97706;
}


/* INFORMAÇÃO */

.app-toast-info {
    border-left: 4px solid #2563eb;
}

.app-toast-info .app-toast-icon {
    background: #dbeafe;
    color: #2563eb;
}


/* SAÍDA */

.app-toast.toast-hide {
    opacity: 0;

    transform: translateX(30px);

    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}


@keyframes toastEntrada {

    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}


@media (max-width: 600px) {

    .toast-container {
        top: 16px;
        right: 16px;

        width: calc(100vw - 32px);
    }

}


/* =========================================================
   TOAST - FECHAR
========================================================= */

.app-toast {
    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}

.app-toast.is-closing {
    opacity: 0;
    transform: translateX(20px);
    pointer-events: none;
}

.app-toast-close {
    cursor: pointer;
}

.equipamento-menu-item-danger {
    color: #b42318;
}

.equipamento-menu-item-danger i {
    color: #b42318;
}

.equipamento-menu-item-danger:hover {
    background: #fff1f0;
}

.equipamentos-modal-confirm {
    width: min(500px, 100%);
}

.equipamentos-btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    min-height: 42px;
    padding: 0 18px;

    border: 0;
    border-radius: 8px;

    background: #b42318;
    color: #ffffff;

    font-family: inherit;
    font-size: 14px;
    font-weight: 600;

    cursor: pointer;
}

.equipamentos-btn-danger:hover {
    background: #912018;
}

.equipamento-menu-item-danger {
    color: #b42318;
}

.equipamento-menu-item-danger i {
    color: #b42318;
}

.equipamento-menu-item-danger:hover {
    background: #fff1f0;
}