.app-topbar {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 1040;
    height: var(--topbar-height);
    min-height: var(--topbar-height);
    color: #fff;
    background: linear-gradient(90deg, var(--confixx-blue-dark), var(--confixx-blue));
    border-bottom: 1px solid rgba(255, 255, 255, .18);
    box-shadow: 0 4px 18px rgba(13, 37, 56, .18);
}

.app-topbar .container-fluid,
.app-topbar .topbar-inner {
    height: 100%;
}

.brand-mark {
    display: inline-grid;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    place-items: center;
    color: #fff;
    background: linear-gradient(145deg, #f4aa3b, #d98208);
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: 9px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 4px 10px rgba(0, 0, 0, .15);
}

.brand-title {
    display: block;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: .02em;
    line-height: 1.05;
}

.brand-subtitle {
    display: block;
    margin-top: 3px;
    color: rgba(255, 255, 255, .68);
    font-size: .68rem;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.topbar-icon-btn {
    display: inline-grid;
    width: 40px;
    height: 40px;
    padding: 0;
    place-items: center;
    color: #fff;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 8px;
}

.topbar-icon-btn:hover,
.topbar-icon-btn:focus {
    color: #fff;
    background: rgba(255, 255, 255, .16);
}

.topbar-status {
    display: none;
    align-items: center;
    gap: 18px;
    color: rgba(255, 255, 255, .78);
    font-size: .74rem;
}

.topbar-user-btn {
    color: #fff;
    border: 0;
    background: transparent;
}

.topbar-user-btn:hover,
.topbar-user-btn:focus {
    color: #fff;
    background: rgba(255, 255, 255, .08);
}

.topbar-avatar {
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: #fff;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 50%;
    font-size: .85rem;
    font-weight: 750;
}

.app-sidebar {
    position: fixed;
    top: var(--topbar-height);
    bottom: 0;
    left: 0;
    z-index: 1035;
    display: none;
    width: var(--sidebar-collapsed-width);
    overflow-x: hidden;
    overflow-y: auto;
    color: var(--sidebar-text);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    box-shadow: 5px 0 18px rgba(10, 30, 45, .12);
    transition: width .24s ease;
}

.sidebar-expanded .app-sidebar {
    width: var(--sidebar-expanded-width);
}

.sidebar-nav {
    padding: 14px 10px 28px;
}

.sidebar-section-label {
    height: 24px;
    margin: 13px 12px 5px;
    overflow: hidden;
    color: rgba(255, 255, 255, .45);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .12em;
    opacity: 0;
    text-transform: uppercase;
    white-space: nowrap;
    transition: opacity .15s ease;
}

.sidebar-expanded .sidebar-section-label {
    opacity: 1;
}

.sidebar-link {
    position: relative;
    display: flex;
    min-height: 48px;
    margin-bottom: 5px;
    padding: 8px 13px;
    align-items: center;
    gap: 14px;
    color: var(--sidebar-text);
    border: 1px solid transparent;
    border-radius: 8px;
    white-space: nowrap;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.sidebar-link:hover {
    color: #fff;
    background: var(--sidebar-hover);
    border-color: var(--sidebar-border);
}

.sidebar-link.active {
    color: #fff;
    background: linear-gradient(90deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .07));
    border-color: rgba(255, 255, 255, .16);
    box-shadow: inset 3px 0 0 var(--confixx-accent);
}

.sidebar-link .nav-icon {
    display: inline-grid;
    min-width: 36px;
    height: 34px;
    place-items: center;
    font-size: 1.14rem;
}

.sidebar-link .nav-label {
    overflow: hidden;
    opacity: 0;
    transform: translateX(-5px);
    transition: opacity .16s ease, transform .16s ease;
}

.sidebar-expanded .sidebar-link .nav-label {
    opacity: 1;
    transform: translateX(0);
}

.sidebar-version {
    position: absolute;
    right: 10px;
    bottom: 12px;
    left: 10px;
    overflow: hidden;
    color: rgba(255, 255, 255, .38);
    font-size: .66rem;
    opacity: 0;
    text-align: center;
    white-space: nowrap;
    transition: opacity .15s ease;
}

.sidebar-expanded .sidebar-version {
    opacity: 1;
}

.app-content {
    min-height: 100vh;
    padding-top: calc(var(--topbar-height) + 22px);
    transition: margin-left .24s ease;
}

.content-inner {
    width: min(1600px, 100%);
    margin-inline: auto;
    padding: 0 14px 32px;
}

.app-content .container-fluid {
    padding-right: 0 !important;
    padding-left: 0 !important;
}

.admin-page-header {
    display: flex;
    margin-bottom: 1.35rem;
    align-items: center;
    gap: 12px;
}

.admin-page-header-actions {
    margin-left: auto;
}

.main-footer {
    margin-top: auto;
    color: var(--text-muted);
    font-size: .78rem;
}

.main-footer-inner {
    width: min(1600px, 100%);
    margin-inline: auto;
    padding: 18px 14px 22px;
    border-top: 1px solid var(--confixx-border);
}

.offcanvas {
    --bs-offcanvas-width: 290px;
    color: var(--sidebar-text);
    background: var(--sidebar-bg);
}

.offcanvas .sidebar-section-label,
.offcanvas .sidebar-link .nav-label {
    height: auto;
    opacity: 1;
    transform: none;
}

.offcanvas .sidebar-link {
    color: var(--sidebar-text);
}

.admin-login-body {
    display: flex;
    min-height: 100vh;
    padding: 24px;
    align-items: center;
    justify-content: center;
}

.admin-login-panel {
    width: min(430px, 100%);
    overflow: hidden;
    background: var(--panel-bg);
    border: 1px solid var(--confixx-border);
    border-radius: 10px;
    box-shadow: var(--shadow-soft);
}

.admin-login-header {
    padding: 28px 24px 24px;
    color: #fff;
    background: linear-gradient(90deg, var(--confixx-blue-dark), var(--confixx-blue));
    text-align: center;
}

.admin-login-mark {
    display: inline-grid;
    width: 52px;
    height: 52px;
    margin-bottom: 12px;
    place-items: center;
    color: #fff;
    background: linear-gradient(145deg, #f4aa3b, #d98208);
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: 11px;
    font-size: 1.4rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 4px 10px rgba(0, 0, 0, .15);
}

.admin-login-body-content {
    padding: 24px;
}

.admin-login-footer {
    padding: 10px 18px;
    color: var(--text-muted);
    background: var(--panel-header-bg);
    border-top: 1px solid var(--confixx-border);
    font-size: .74rem;
    text-align: center;
}

.admin-login-alert {
    padding: 10px 12px;
    color: #842029;
    background: #f8d7da;
    border: 1px solid #f1aeb5;
    border-left-width: 4px;
    border-radius: 7px;
    font-size: .85rem;
}

[data-bs-theme="dark"] .admin-login-alert {
    color: #f1b7bc;
    background: rgba(220, 53, 69, .13);
    border-color: rgba(220, 53, 69, .35);
}

@media (min-width: 992px) {
    .app-sidebar {
        display: block;
    }

    .app-content,
    .main-footer {
        margin-left: var(--sidebar-collapsed-width);
    }

    .sidebar-expanded .app-content,
    .sidebar-expanded .main-footer {
        margin-left: var(--sidebar-expanded-width);
    }

    .content-inner,
    .main-footer-inner {
        padding-inline: 24px;
    }

    .topbar-status {
        display: flex;
    }
}

@media (max-width: 767.98px) {
    .desktop-user-label,
    .brand-subtitle {
        display: none;
    }

    .admin-page-header {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .admin-page-header-actions {
        width: 100%;
        margin-left: 0;
    }
}

@media (max-width: 575.98px) {
    .content-inner {
        padding-inline: 10px;
    }

    .main-footer-inner {
        padding-inline: 10px;
    }
}
