:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1e293b;
    --darker: #0f172a;
    --light: #f1f5f9;
    --white: #ffffff;
    --gradient: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
    --shadow: 0 10px 40px rgba(0,0,0,0.2);
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--darker);
    color: var(--light);
    min-height: 100vh;
}

.hidden { display: none !important; }

/* Login Modal */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.login-container {
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 24px;
    padding: 48px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-header .logo-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.login-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 8px;
}

.login-header p {
    color: #64748b;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #94a3b8;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    background: var(--darker);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    color: var(--white);
    font-size: 15px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.btn-login {
    width: 100%;
    padding: 16px;
    background: var(--gradient);
    border: none;
    border-radius: 12px;
    color: var(--white);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.error-msg {
    color: var(--danger);
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: 280px;
    background: var(--dark);
    border-right: 1px solid rgba(255,255,255,0.05);
    overflow-y: auto;
    z-index: 100;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

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

.logo .logo-icon { font-size: 32px; }
.logo h2 { font-size: 18px; color: var(--white); }
.logo .version { font-size: 12px; color: var(--secondary); }

.btn-logout {
    background: rgba(239, 68, 68, 0.1);
    border: none;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--danger);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-logout:hover { background: var(--danger); color: var(--white); }

.nav-menu { padding: 20px; }

.nav-section {
    margin-bottom: 24px;
}

.nav-section h3 {
    font-size: 12px;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    display: block;
    padding: 10px 16px;
    margin: 4px 0;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.nav-link:hover { background: rgba(99, 102, 241, 0.1); color: var(--white); }
.nav-link.active { background: var(--gradient); color: var(--white); }

/* Main Content */
.main-content {
    margin-left: 280px;
    min-height: 100vh;
    padding: 40px;
}

.content-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

/* Documentation Styles */
.doc-section {
    background: var(--dark);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    border: 1px solid rgba(255,255,255,0.05);
}

.doc-section h1 {
    font-size: 32px;
    margin-bottom: 16px;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 12px;
}

.doc-section h2 {
    font-size: 24px;
    margin: 24px 0 16px;
    color: var(--white);
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.doc-section h3 {
    font-size: 18px;
    margin: 20px 0 12px;
    color: var(--secondary);
}

.doc-section p {
    line-height: 1.8;
    margin-bottom: 16px;
    color: #cbd5e1;
}

.doc-section ul, .doc-section ol {
    margin: 16px 0;
    padding-left: 24px;
}

.doc-section li {
    margin: 8px 0;
    line-height: 1.6;
    color: #cbd5e1;
}

/* Code blocks */
.code-block {
    background: var(--darker);
    border-radius: 12px;
    padding: 20px;
    margin: 16px 0;
    overflow-x: auto;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 14px;
    line-height: 1.6;
    border: 1px solid rgba(255,255,255,0.1);
}

.code-block code {
    color: #e2e8f0;
}

/* Info boxes */
.info-box {
    padding: 16px 20px;
    border-radius: 12px;
    margin: 16px 0;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.info-box.tip { background: rgba(16, 185, 129, 0.1); border-left: 4px solid var(--success); }
.info-box.warning { background: rgba(245, 158, 11, 0.1); border-left: 4px solid var(--warning); }
.info-box.danger { background: rgba(239, 68, 68, 0.1); border-left: 4px solid var(--danger); }
.info-box.info { background: rgba(6, 182, 212, 0.1); border-left: 4px solid var(--secondary); }

/* Tables */
.doc-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    background: var(--darker);
    border-radius: 12px;
    overflow: hidden;
}

.doc-table th, .doc-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.doc-table th {
    background: rgba(99, 102, 241, 0.1);
    font-weight: 600;
    color: var(--white);
}

.doc-table td { color: #cbd5e1; }

/* Architecture diagram */
.architecture-box {
    background: var(--darker);
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
    font-family: 'Monaco', monospace;
    font-size: 13px;
    line-height: 1.4;
    overflow-x: auto;
    white-space: pre;
    color: var(--secondary);
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.card {
    background: var(--darker);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s ease;
}

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

.card-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.card h4 {
    font-size: 16px;
    color: var(--white);
    margin-bottom: 8px;
}

.card p {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar { width: 100%; height: auto; position: relative; }
    .main-content { margin-left: 0; }
}
