/* Global shell styles: avoids stale CSS-isolation attributes after Hot Reload. */

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 272px minmax(0, 1fr);
}

.app-shell > .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    background: #101827;
    border-right: 1px solid rgba(255, 255, 255, .06);
}

.app-shell > main { min-width: 0; }

.app-shell .topbar {
    height: 76px;
    padding: 0 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(247, 248, 252, .88);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid #e4e8f0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.app-shell .environment {
    display: flex;
    align-items: center;
    gap: .6rem;
    color: #6c7484;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.app-shell .environment span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #38d996;
    box-shadow: 0 0 0 4px rgba(56, 217, 150, .13);
}

.app-shell .user-chip {
    display: flex;
    align-items: center;
    gap: .7rem;
    color: #172033;
    text-decoration: none;
}

.app-shell .user-chip > span {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    color: #fff;
    font-weight: 800;
    background: linear-gradient(135deg, #725cff, #a865ff);
}

.app-shell .user-chip div {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.app-shell .user-chip strong { font-size: .82rem; }
.app-shell .user-chip small { color: #8790a0; font-size: .7rem; }

.app-shell .content {
    max-width: 1380px;
    padding: 3rem;
    margin: 0 auto;
}

.sidebar .brand-row {
    height: 76px;
    padding: 0 1.4rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.sidebar .brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: #fff;
    text-decoration: none;
}

.sidebar .brand > span {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: linear-gradient(135deg, #7058ff, #9f65ff);
    font-size: .9rem;
    font-weight: 900;
}

.sidebar .brand div { display: flex; flex-direction: column; }
.sidebar .brand strong { font-size: .92rem; letter-spacing: .08em; }
.sidebar .brand small { color: #8792a7; font-size: .58rem; letter-spacing: .13em; }

.sidebar .nav-scrollable {
    height: calc(100vh - 76px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-y: auto;
    padding: 1.7rem 1rem 1.2rem;
}

.sidebar nav { display: flex; flex-direction: column; gap: .35rem; }

.sidebar .nav-section {
    padding: .45rem .75rem .75rem;
    color: #657086;
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .16em;
}

.sidebar .account-section { margin-top: 1.7rem; }

.sidebar .nav-link {
    min-height: 48px;
    display: grid;
    grid-template-columns: 30px 1fr auto;
    align-items: center;
    gap: .45rem;
    padding: 0 .8rem;
    border-radius: 11px;
    color: #a8b1c2;
    font-size: .86rem;
    font-weight: 650;
    text-decoration: none;
    transition: .18s ease;
}

.sidebar .nav-link:hover { color: #fff; background: rgba(255, 255, 255, .05); }

.sidebar .nav-link.active {
    color: #fff;
    background: linear-gradient(90deg, rgba(112, 88, 255, .28), rgba(112, 88, 255, .08));
    box-shadow: inset 3px 0 #846eff;
}

.sidebar .nav-icon { font-size: 1.05rem; text-align: center; }
.sidebar .sidebar-footer { display: grid; gap: 1rem; }

.sidebar .preview-card {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(133, 111, 255, .22);
    border-radius: 12px;
    background: rgba(112, 88, 255, .08);
}

.sidebar .preview-card span { color: #a896ff; font-size: .58rem; font-weight: 900; letter-spacing: .14em; }
.sidebar .preview-card strong { margin: .15rem 0; color: #fff; font-size: 1.1rem; }
.sidebar .preview-card small { color: #7f8a9f; font-size: .65rem; }

.sidebar .logout-button {
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: .7rem .85rem;
    border: 0;
    color: #8994a9;
    background: transparent;
    font-size: .78rem;
}

.sidebar .logout-button:hover { color: #fff; }
.sidebar .navbar-toggler { display: none; }

/* Operational header shown on the home page. */
.company-header {
    align-items: center;
    background: #20252a;
    border-radius: .65rem;
    color: #fff;
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: 1rem 1.25rem;
}

.company-header .company-name,
.company-header .company-user { align-items: center; display: flex; gap: .8rem; }

.company-header .company-name div,
.company-header .company-user { display: flex; flex-direction: column; }

.company-header .company-name small,
.company-header .company-user small { color: #aeb8c2; font-size: .68rem; letter-spacing: .06em; }

.company-header .company-name strong { font-size: 1.05rem; }
.company-header .company-mark { font-size: 1.8rem; line-height: 1; }
.company-header .company-user { align-items: flex-end; text-align: right; }
.company-header .company-user strong { font-size: .78rem; text-transform: uppercase; }

@media (max-width: 800px) {
    .app-shell { display: block; }
    .app-shell > .sidebar { position: relative; height: auto; }
    .app-shell .topbar { height: 62px; padding: 0 1.25rem; }
    .app-shell .user-chip div { display: none; }
    .app-shell .content { padding: 1.5rem 1.1rem 3rem; }
    .sidebar .brand-row { height: 62px; justify-content: space-between; }

    .sidebar .navbar-toggler {
        appearance: none;
        display: block;
        width: 36px;
        height: 32px;
        border: 1px solid rgba(255, 255, 255, .18);
        border-radius: 8px;
        background: linear-gradient(#fff, #fff) center 10px / 16px 1px no-repeat,
                    linear-gradient(#fff, #fff) center 15px / 16px 1px no-repeat,
                    linear-gradient(#fff, #fff) center 20px / 16px 1px no-repeat;
    }

    .sidebar .nav-scrollable { display: none; height: auto; max-height: 75vh; }
    .sidebar .brand-row:has(.navbar-toggler:checked) + .nav-scrollable { display: flex; }
    .sidebar .preview-card { display: none; }
}

@media (max-width: 575.98px) {
    .company-header { align-items: flex-start; flex-direction: column; gap: .9rem; }
    .company-header .company-user { align-items: flex-start; padding-left: 2.6rem; text-align: left; }
}
