:root {
    --primary: #1a73e8;
    --primary-dark: #1557b0;
    --secondary: #34a853;
    --accent: #f9ab00;
    --danger: #d93025;
    --bg-main: #f8f9fa;
    --bg-card: #ffffff;
    --text-main: #202124;
    --text-muted: #5f6368;
    --border: #dadce0;
    --shadow: 0 4px 12px rgba(0,0,0,0.08);
    --radius: 12px;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Layout */
.app-container {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
    background-color: #ffffff;
    border-right: 1px solid var(--border);
    padding: 2rem 1rem;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 2rem;
    padding-left: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-group {
    margin-bottom: 2rem;
}

.nav-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    padding-left: 1rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-main);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    font-weight: 500;
}

.nav-item:hover {
    background-color: #f1f3f4;
}

.nav-item.active {
    background-color: #e8f0fe;
    color: var(--primary);
}

/* Header */
.header {
    height: 70px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Main Content Area */
.main-content {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Components */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.feature-list .bullet {
    color: var(--primary);
    font-weight: bold;
    margin-top: 2px;
}

.state-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    background: #f1f3f4;
    color: var(--text-main);
    border: 1px solid var(--border);
    font-family: monospace;
}

.rule-box {
    background: #fff8e1;
    border-left: 4px solid var(--accent);
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 0 4px 4px 0;
}

.rule-box h5 {
    margin-bottom: 0.5rem;
    color: #856404;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.toc-mini {
    background: #f8f9fa;
    border: 1px solid var(--border);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.toc-mini ul {
    list-style: none;
}

.toc-mini a {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
}

.toc-mini a:hover {
    text-decoration: underline;
}

.hero-section {
    margin-bottom: 3rem;
}

.hero-section h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.hero-meta {
    display: flex;
    gap: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--primary);
    border-bottom: 2px solid #e8f0fe;
    padding-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

/* User Class Styling */
.user-type-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    background: #fff;
    transition: transform 0.2s;
}

.user-type-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
}

.user-icon {
    width: 40px;
    height: 40px;
    background: #e8f0fe;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 1rem;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.data-table th {
    text-align: left;
    padding: 1rem;
    background: #f1f3f4;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
}

/* Status Badges */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-success { background: #e6f4ea; color: #1e8e3e; }
.badge-info { background: #e8f0fe; color: #1a73e8; }
.badge-warning { background: #fef7e0; color: #f9ab00; }

/* Placeholder Graphics */
.placeholder-icon {
    width: 24px;
    height: 24px;
    display: inline-block;
    vertical-align: middle;
}

/* RTM Matrix specific */
.rtm-table td:first-child {
    font-weight: 700;
    color: var(--primary);
}

/* Responsive */
@media (max-width: 1024px) {
    .app-container {
        grid-template-columns: 1fr;
    }
    .sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
}
