*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    font-family: var(--font);
    font-size: var(--font-size-base);
    color: var(--text-primary);
    background: var(--bg-page);
    line-height: 1.5;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.cms-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    z-index: 100;
    transition: transform var(--transition);
}

.sidebar-logo {
    padding: 20px 16px 16px;
    border-bottom: 1px solid var(--sidebar-border);
}

.sidebar-logo img {
    height: 32px;
    width: auto;
}

.sidebar-logo-placeholder {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: -0.3px;
}

.sidebar-logo-placeholder span {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: var(--sidebar-text);
    margin-top: 2px;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 8px;
}

.nav-section-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--sidebar-text);
    opacity: 0.5;
    padding: 10px 8px 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: var(--radius);
    color: var(--sidebar-text);
    font-size: var(--font-size-sm);
    cursor: pointer;
    margin-bottom: 2px;
    transition: background var(--transition), color var(--transition);
    text-decoration: none;
}

.nav-item:hover {
    background: var(--sidebar-hover-bg);
    color: var(--sidebar-active);
    text-decoration: none;
}

.nav-item.active {
    background: var(--sidebar-active-bg);
    color: var(--sidebar-active);
}

.nav-item i {
    font-size: 17px;
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 14px 16px;
    border-top: 1px solid var(--sidebar-border);
    font-size: var(--font-size-xs);
    color: var(--sidebar-text);
    opacity: 0.6;
}

/* Main content */
.cms-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

/* Topbar */
.topbar {
    background: var(--bg-topbar);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 22px;
    padding: 4px;
}

.topbar-title {
    font-size: 15px;
    font-weight: 500;
}

.topbar-subtitle {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Page content */
.page-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* Overlay für Mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 99;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        transform: translateX(-100%);
        z-index: 100;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay.show {
        display: block;
    }

    .hamburger {
        display: block;
    }

    .page-content {
        padding: 16px;
    }
}
