/* dashboard-shell.css
   サイドバー付きダッシュボードレイアウト共通CSS
   使い方: <link rel="stylesheet" href="/css/dashboard-shell.css"> */

:root {
    --sidebar-w: 220px;
    --ds-bg: #18191d;
    --ds-bg-card: #1e1f24;
    --ds-border: #1e1e1e;
    --ds-text: #e5e5e5;
    --ds-text-muted: #888;
}

html, body { overflow-x: hidden; }
.app { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w);
    background: #13141a;
    border-right: 1px solid var(--ds-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 56px;
    bottom: 0;
    z-index: 40;
    overflow-y: auto;
}
.sidebar-brand {
    padding: 20px 20px 24px;
    border-bottom: 1px solid var(--ds-border);
}
.sidebar-brand-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--ds-text);
}
.sidebar-brand-sub {
    font-size: 11px;
    color: var(--ds-text-muted);
    margin-top: 2px;
}
.sidebar-nav {
    flex: 1;
    padding: 12px 8px;
}
.sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--ds-border);
}
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--ds-text-muted);
}

.main {
    margin-left: var(--sidebar-w);
    flex: 1;
    min-height: calc(100vh - 56px);
}
.main > .topbar {
    height: 52px;
    border-bottom: 1px solid var(--ds-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 56px;
    background: var(--ds-bg);
    z-index: 30;
}
.topbar-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--ds-text);
}

.mobile-toggle {
    display: none;
    position: fixed;
    top: 68px;
    left: 12px;
    z-index: 50;
    background: var(--ds-bg-card);
    border: 1px solid var(--ds-border);
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    color: var(--ds-text);
    font-size: 16px;
}

.content {
    padding: 32px 0;
    max-width: 90%;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main {
        margin-left: 0;
    }
    .mobile-toggle {
        display: block;
    }
    .main > .topbar {
        padding: 0 16px 0 56px;
    }
    .content {
        max-width: 100%;
    }
}
