:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f7;
    --bg-tertiary: #e8e8ed;
    --bg-hover: #e8e8ed;
    --bg-table-header: #f5f5f7;
    --bg-table-row-alt: #fafafa;
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --text-tertiary: #86868b;
    --accent: #0071e3;
    --accent-hover: #0077ed;
    --accent-light: #e8f0fe;
    --green: #34c759;
    --green-light: #e8f8ed;
    --orange: #ff9500;
    --orange-light: #fff4e6;
    --red: #ff3b30;
    --red-light: #ffeae9;
    --yellow: #ffcc00;
    --yellow-light: #fff9e0;
    --blue: #007aff;
    --blue-light: #e8f0fe;
    --border: rgba(0, 0, 0, 0.06);
    --border-strong: rgba(0, 0, 0, 0.12);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.08);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --font-mono: 'SF Mono', SFMono-Regular, ui-monospace, Menlo, monospace;
    --sidebar-width: 240px;
    --header-height: 56px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display',
                 'SF Pro Text', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-primary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 10;
}

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

.sidebar-brand a {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    display: block;
}

.sidebar-nav {
    flex: 1;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    margin: 0 0;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 14px;
    transition: all 0.15s ease;
    cursor: pointer;
}

.nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-item.active { background: var(--accent-light); color: var(--accent); }
.nav-item.active svg { color: var(--accent); }
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }

.sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
}

.content-area {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    background: var(--bg-secondary);
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    height: var(--header-height);
}

.content-header h1 { font-size: 22px; font-weight: 700; }

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-controls { display: flex; gap: 6px; }
.header-pills { display: flex; gap: 8px; }

.header-meta { font-size: 12px; color: var(--text-tertiary); }

.content-body { padding: 32px; }

@media (max-width: 1024px) {
    .sidebar { width: 60px; }
    .sidebar .nav-item span, .sidebar-brand span, .sidebar-footer { display: none; }
    .nav-item { justify-content: center; padding: 12px; }
    .content-area { margin-left: 60px; }
    .content-body { padding: 20px; }
}

@media (max-width: 768px) {
    .sidebar { display: none; }
    .content-area { margin-left: 0; }
    .content-body { padding: 16px; }
}
