/* NeoTrak Knowledge Base Styles */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --background-color: #f8fafc;
    --card-background: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --border-color: #e2e8f0;
    --sidebar-width: 280px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Layout */
.container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--card-background);
    border-right: 1px solid var(--border-color);
    padding: 24px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 0 24px 24px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
}

.sidebar-logo svg {
    width: 32px;
    height: 32px;
    fill: var(--primary-color);
}

.sidebar-logo h1 {
    font-size: 1.25rem;
    font-weight: 700;
}

.sidebar-logo span {
    font-size: 0.75rem;
    color: var(--secondary-color);
    display: block;
}

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

.nav-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--secondary-color);
    padding: 8px 12px;
    letter-spacing: 0.5px;
}

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

.nav-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    text-decoration: none;
    color: var(--text-secondary);
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 0.925rem;
}

.nav-list a:hover {
    background-color: var(--background-color);
    color: var(--primary-color);
}

.nav-list a.active {
    background-color: #eff6ff;
    color: var(--primary-color);
    font-weight: 500;
}

.nav-list a svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 40px 60px;
    max-width: 1200px;
}

/* Header */
.page-header {
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.page-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--secondary-color);
    margin-bottom: 16px;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Content Sections */
.content-section {
    background: var(--card-background);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.content-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.content-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 24px 0 12px;
    color: var(--text-primary);
}

.content-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 20px 0 10px;
    color: var(--text-primary);
}

.content-section p {
    margin-bottom: 16px;
    color: var(--text-secondary);
}

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

.content-section li {
    margin-bottom: 8px;
    color: var(--text-secondary);
}

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

.feature-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.feature-card h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Login Buttons */
.login-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 320px;
    margin: 24px 0;
}

.login-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-background);
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.2s ease;
}

.login-btn:hover {
    background: var(--background-color);
    border-color: var(--primary-color);
}

.login-btn svg {
    width: 24px;
    height: 24px;
}

/* Steps */
.step-list {
    counter-reset: step-counter;
    list-style: none;
    padding: 0;
    margin: 24px 0;
}

.step-list li {
    counter-increment: step-counter;
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

.step-list li:last-child {
    border-bottom: none;
}

.step-list li::before {
    content: counter(step-counter);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.step-content p {
    margin: 0;
    font-size: 0.9rem;
}

/* Info Box */
.info-box {
    background: #eff6ff;
    border-left: 4px solid var(--primary-color);
    padding: 16px 20px;
    border-radius: 0 8px 8px 0;
    margin: 20px 0;
}

.info-box.warning {
    background: #fef3c7;
    border-left-color: var(--warning-color);
}

.info-box.danger {
    background: #fef2f2;
    border-left-color: var(--danger-color);
}

.info-box.success {
    background: #f0fdf4;
    border-left-color: var(--success-color);
}

.info-box p {
    margin: 0;
    font-size: 0.9rem;
}

.info-box strong {
    color: var(--text-primary);
}

/* Tables */
.table-wrapper {
    overflow-x: auto;
    margin: 20px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: var(--background-color);
    font-weight: 600;
    color: var(--text-primary);
}

td {
    color: var(--text-secondary);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-critical {
    background: #fef2f2;
    color: #dc2626;
}

.badge-high {
    background: #fff7ed;
    color: #ea580c;
}

.badge-medium {
    background: #fef3c7;
    color: #d97706;
}

.badge-low {
    background: #f0fdf4;
    color: #16a34a;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 24px;
}

.tab {
    padding: 12px 20px;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s ease;
}

.tab:hover {
    color: var(--primary-color);
}

.tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Code Block */
.code-block {
    background: #1e293b;
    color: #e2e8f0;
    padding: 20px;
    border-radius: 8px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.875rem;
    overflow-x: auto;
    margin: 16px 0;
}

/* Pricing Cards */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin: 24px 0;
}

.pricing-card {
    background: var(--card-background);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 32px;
    text-align: center;
}

.pricing-card.featured {
    border-color: var(--primary-color);
    position: relative;
}

.pricing-card.featured::before {
    content: 'Popular';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.pricing-card h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.pricing-card .price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.pricing-card .price span {
    font-size: 1rem;
    color: var(--text-secondary);
}

.pricing-card ul {
    list-style: none;
    padding: 0;
    margin: 24px 0;
    text-align: left;
}

.pricing-card li {
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pricing-card li::before {
    content: '✓';
    color: var(--success-color);
    font-weight: bold;
}

/* Index Page Cards */
.doc-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin: 32px 0;
}

.doc-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 28px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.doc-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.doc-card-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.doc-card-icon svg {
    width: 24px;
    height: 24px;
    color: var(--primary-color);
}

.doc-card h3 {
    font-size: 1.125rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.doc-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Method selector */
.method-tabs {
    display: flex;
    gap: 12px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.method-tab {
    padding: 12px 24px;
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.method-tab:hover,
.method-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        width: 240px;
    }
    
    .main-content {
        margin-left: 240px;
        padding: 32px 40px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        z-index: 1000;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 24px 20px;
    }
    
    .page-header h1 {
        font-size: 1.75rem;
    }
}

/* Print Styles */
@media print {
    .sidebar {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
    }
}
