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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.docs-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 600;
}

.logo-img {
    width: 32px; height: 32px; border-radius: 6px;
}

.logo {
    text-decoration: none; color: #fff;
}

.logo:hover { opacity: 0.85; }

.version {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 8px;
}

.nav-menu {
    padding: 16px 0;
}

.nav-menu ul {
    list-style: none;
}

.nav-group {
    margin-bottom: 4px;
}

.nav-group-title {
    display: block;
    padding: 8px 24px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.4);
    cursor: default;
}

.nav-group ul {
    margin-top: 4px;
}

.nav-group li {
    margin-bottom: 2px;
}

.nav-group a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 24px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.nav-group a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.nav-group a.active {
    background-color: #667eea;
    color: #fff;
}

.nav-group a i {
    width: 18px;
    font-size: 14px;
}

.content {
    margin-left: 280px;
    flex: 1;
    min-height: 100vh;
}

.content-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 40px 50px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.content-header h1 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 8px;
}

.content-header p {
    font-size: 16px;
    opacity: 0.9;
}

#content-area {
    padding: 40px 50px;
    max-width: 1000px;
}

.section {
    margin-bottom: 50px;
}

.section h2 {
    font-size: 24px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
}

.section h2 i {
    margin-right: 10px;
    color: #667eea;
}

.card {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
}

.card h3 {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 16px;
}

.card p {
    color: #4a5568;
    margin-bottom: 12px;
}

.card ul {
    margin-left: 24px;
    margin-bottom: 16px;
}

.card ul li {
    color: #4a5568;
    margin-bottom: 8px;
}

.card ol {
    margin-left: 24px;
    margin-bottom: 16px;
}

.card ol li {
    color: #4a5568;
    margin-bottom: 8px;
}

.card table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.card table th,
.card table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.card table th {
    background-color: #f7fafc;
    font-weight: 600;
    color: #2d3748;
}

.card table td {
    color: #4a5568;
}

.card pre {
    background-color: #2d3748;
    color: #e2e8f0;
    padding: 16px;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.6;
    margin-top: 12px;
}

.card pre code {
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
}

.card code {
    background-color: #f7fafc;
    color: #e53e3e;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 14px;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
}

.note {
    background-color: #fffbeb;
    border-left: 4px solid #f59e0b;
    padding: 12px 16px;
    border-radius: 0 4px 4px 0;
    margin-top: 12px;
    font-size: 14px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature-item {
    background-color: #f7fafc;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.feature-item i {
    font-size: 32px;
    color: #667eea;
    margin-bottom: 12px;
}

.feature-item h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-item p {
    font-size: 13px;
    color: #718096;
}

.architecture {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.arch-layer {
    background-color: #f7fafc;
    padding: 16px;
    border-radius: 8px;
}

.layer-title {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 12px;
    display: block;
}

.layer-items {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.layer-items span {
    background-color: #667eea;
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
}

.roles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.role-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.role-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.role-card.super {
    border-color: #e53e3e;
}

.role-card.tenant {
    border-color: #3182ce;
}

.role-card.agent {
    border-color: #38a169;
}

.role-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 28px;
    color: #fff;
}

.role-card.super .role-icon {
    background: linear-gradient(135deg, #e53e3e 0%, #fc8181 100%);
}

.role-card.tenant .role-icon {
    background: linear-gradient(135deg, #3182ce 0%, #63b3ed 100%);
}

.role-card.agent .role-icon {
    background: linear-gradient(135deg, #38a169 100%, #68d391 0%);
}

.role-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.role-desc {
    font-size: 13px;
    color: #718096;
    margin-bottom: 16px;
}

.role-permissions h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2d3748;
}

.role-permissions ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.role-permissions li {
    font-size: 13px;
    color: #4a5568;
    padding: 4px 0;
    border-bottom: 1px solid #e2e8f0;
}

.role-permissions li:last-child {
    border-bottom: none;
}

.role-path {
    margin-top: 16px;
    padding: 8px 16px;
    background-color: #f7fafc;
    border-radius: 4px;
    font-size: 13px;
    color: #667eea;
    font-family: monospace;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.stat-item {
    background-color: #f7fafc;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.stat-item i {
    font-size: 28px;
    color: #667eea;
    margin-bottom: 8px;
}

.stat-label {
    display: block;
    font-size: 13px;
    color: #718096;
    margin-bottom: 4px;
}

.stat-value {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
}

.actions-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.action-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background-color: #f7fafc;
    border-radius: 8px;
}

.action-item i {
    font-size: 20px;
    color: #667eea;
    flex-shrink: 0;
}

.action-item h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.action-item p {
    font-size: 13px;
    color: #718096;
    margin: 0;
}

.status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.status.active,
.status.online {
    background-color: #c6f6d5;
    color: #22543d;
}

.status.inactive {
    background-color: #fed7d7;
    color: #742a2a;
}

.status.pending {
    background-color: #feebc8;
    color: #744210;
}

.status.paid {
    background-color: #c6f6d5;
    color: #22543d;
}

.status.expired {
    background-color: #fed7d7;
    color: #742a2a;
}

.status.cancelled {
    background-color: #e2e8f0;
    color: #4a5568;
}

.status.closed {
    background-color: #e2e8f0;
    color: #4a5568;
}

.status.busy {
    background-color: #fbd38d;
    color: #744210;
}

.status.away {
    background-color: #feebc8;
    color: #744210;
}

.status.rest {
    background-color: #e6fffa;
    color: #234e52;
}

.status.offline {
    background-color: #e2e8f0;
    color: #4a5568;
}

.install-methods {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 20px;
}

.install-method {
    background-color: #f7fafc;
    padding: 20px;
    border-radius: 8px;
}

.install-method h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

.install-method p {
    font-size: 14px;
    color: #718096;
    margin-bottom: 12px;
}

.chat-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.chat-feature {
    background-color: #f7fafc;
    padding: 16px;
    border-radius: 8px;
    text-align: center;
}

.chat-feature i {
    font-size: 24px;
    color: #667eea;
    margin-bottom: 8px;
}

.chat-feature h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.chat-feature p {
    font-size: 12px;
    color: #718096;
    margin: 0;
}

.faq-list {
    margin-top: 12px;
}

.faq-item {
    margin-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 12px;
}

.faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.faq-item h4 {
    font-size: 15px;
    font-weight: 500;
    color: #2d3748;
    margin-bottom: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.faq-item h4 i {
    color: #667eea;
    font-size: 14px;
}

.faq-item p {
    font-size: 14px;
    color: #4a5568;
    margin-left: 22px;
}

.toc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.toc-section {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.toc-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #2d3748;
}

.toc-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-section li {
    margin-bottom: 10px;
}

.toc-section li:last-child {
    margin-bottom: 0;
}

.toc-section a {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.toc-section a:hover {
    color: #5a6fd6;
    text-decoration: underline;
}

.toc-section li::before {
    content: '→ ';
    color: #cbd5e0;
    font-size: 12px;
}

.content-footer {
    background-color: #fff;
    border-top: 1px solid #e2e8f0;
    padding: 24px 50px;
    text-align: center;
    color: #718096;
    font-size: 14px;
}

.content-footer p {
    margin: 4px 0;
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding-bottom: 16px;
    }

    .content {
        margin-left: 0;
    }

    .content-header {
        padding: 24px;
    }

    .content-header h1 {
        font-size: 24px;
    }

    #content-area {
        padding: 24px;
    }

    .features-grid {
        grid-template-columns: repeat(1, 1fr);
    }

    .roles-grid {
        grid-template-columns: repeat(1, 1fr);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .actions-list {
        grid-template-columns: repeat(1, 1fr);
    }

    .chat-features {
        grid-template-columns: repeat(2, 1fr);
    }
}