/* Classic shell chrome - header, sidebar, bottom nav (from PHP/ main). */

.app-header {
    background: var(--chrome-bg, var(--bg-chrome, var(--bg-card)));
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    border-radius: 24px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    padding: 12px 16px;
    margin-bottom: 20px;
    transition: box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: sticky;
    top: 15px;
    z-index: 1080;
    width: calc(100% - var(--sidebar-offset, 120px));
    max-width: calc(100% - var(--sidebar-offset, 120px));
    margin-right: var(--sidebar-offset, 120px);
    margin-left: auto;
    box-sizing: border-box;
    overflow: visible;
}

body.app-shell-entrance .app-header {
    animation: fadeInDownClassic 0.6s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

@keyframes fadeInDownClassic {
    from { opacity: 0; transform: translateY(-40px); }
    to { opacity: 1; transform: translateY(0); }
}

.app-header:hover {
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.app-sidebar {
    width: var(--sidebar-width);
    height: calc(100vh - 60px);
    position: fixed;
    right: 12px;
    top: 30px;
    background: var(--nav-bg);
    color: var(--nav-fg);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border: 1px solid var(--nav-border);
    z-index: 1030;
    border-radius: var(--island-radius);
    box-shadow: -8px 10px 30px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    overflow: hidden;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body.app-shell-entrance .app-sidebar {
    animation: slideInFromRight 0.5s ease forwards;
}

.app-sidebar .header {
    text-align: center;
    color: var(--nav-fg);
    padding: 18px 0 12px;
    border-bottom: 1px solid var(--nav-border);
}

.app-sidebar .header::after {
    content: none;
}

.app-sidebar .nav {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    list-style: none;
}

.app-sidebar .nav-link {
    color: var(--nav-fg) !important;
    text-align: center;
    padding: 18px 8px;
    font-size: 13px;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
    text-decoration: none;
    display: block;
}

.app-sidebar .nav-link i {
    display: block;
    font-size: 24px;
    margin-bottom: 6px;
    transition: transform 0.3s ease;
    color: inherit;
}

.app-sidebar .nav-link:hover i,
.app-sidebar .nav-link.active i {
    transform: scale(1.12);
}

.app-sidebar .nav-link:hover {
    background: var(--nav-hover);
    color: var(--nav-fg) !important;
}

.app-sidebar .nav-link.active {
    background: var(--nav-active);
    color: var(--nav-fg) !important;
}

.app-bottom-nav {
    position: fixed;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    height: 68px;
    background: var(--nav-bg);
    color: var(--nav-fg);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border: 1px solid var(--nav-border);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    display: none;
    z-index: 1050;
    border-radius: var(--island-radius);
    overflow: hidden;
    width: calc(100% - 32px);
    max-width: 380px;
    padding: 0;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.4s ease;
}

body.app-shell-entrance .app-bottom-nav {
    animation: slideUp 0.5s ease forwards;
}

.app-bottom-nav a {
    flex: 1;
    color: var(--nav-fg) !important;
    text-decoration: none;
    text-align: center;
    padding-top: 9px;
    font-size: 12px;
    transition: all 0.25s ease;
    overflow: hidden;
    position: relative;
    opacity: 1;
    background: transparent !important;
}

.app-bottom-nav a i {
    display: block;
    font-size: 23px;
    margin-bottom: 3px;
    transition: transform 0.3s ease;
    color: inherit;
}

.app-bottom-nav a.active i,
.app-bottom-nav a:hover i {
    transform: scale(1.18);
}

.app-bottom-nav a:hover {
    background: var(--nav-hover) !important;
    color: var(--nav-fg) !important;
}

.app-bottom-nav a.active {
    background: var(--nav-active) !important;
    color: var(--nav-fg) !important;
}

@media (max-width: 768px) {
    .app-sidebar { display: none; }
    .app-bottom-nav { display: flex; }
    .app-header {
        width: calc(100% - 28px);
        max-width: calc(100% - 28px);
        margin-right: 14px;
        margin-left: 14px;
    }
}

@media (min-width: 769px) {
    .app-sidebar { display: block; }
    .app-bottom-nav { display: none; }
}

html[dir="ltr"] .app-sidebar {
    right: auto;
    left: 12px;
    box-shadow: 8px 10px 30px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

html[dir="ltr"] body.app-shell-entrance .app-sidebar {
    animation-name: slideInFromLeft;
}

html[dir="ltr"] .app-header {
    margin-right: auto;
    margin-left: var(--sidebar-offset, 120px);
}

@media (max-width: 768px) {
    html[dir="ltr"] .app-header {
        margin-left: 14px;
        margin-right: 14px;
    }
}
