/* Digital Employee Documentation - Stylesheet */

/* CSS Variables for Light/Dark Mode */
:root {
    /* Light Mode Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --text-primary: #212529;
    --text-secondary: #495057;
    --text-muted: #6c757d;
    --accent-color: #0d6efd;
    --accent-hover: #0b5ed7;
    --border-color: #dee2e6;
    --code-bg: #f1f3f5;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --header-bg: #ffffff;
    --sidebar-bg: #f8f9fa;
    --card-bg: #ffffff;
    --table-stripe: #f8f9fa;
    --table-border: #dee2e6;
    --code-block-bg: #282c34;
    --code-text: #abb2bf;
    --success-color: #198754;
    --warning-color: #ffc107;
    --error-color: #dc3545;
    --info-color: #0dcaf0;
}

[data-theme="dark"] {
    --bg-primary: #1a1d21;
    --bg-secondary: #212529;
    --bg-tertiary: #2b3035;
    --text-primary: #e9ecef;
    --text-secondary: #adb5bd;
    --text-muted: #868e96;
    --accent-color: #4dabf7;
    --accent-hover: #74c0fc;
    --border-color: #495057;
    --code-bg: #2b3035;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.4);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.5);
    --header-bg: #212529;
    --sidebar-bg: #1a1d21;
    --card-bg: #212529;
    --table-stripe: #2b3035;
    --table-border: #495057;
    --code-block-bg: #282c34;
    --code-text: #abb2bf;
}

/* Reset and Base Styles */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 0.5em;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: var(--header-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent-color), #6610f2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

/* Navigation */
.nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    background-color: var(--bg-secondary);
    color: var(--accent-color);
    text-decoration: none;
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    background-color: var(--bg-secondary);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-primary);
}

.mobile-menu-toggle svg {
    width: 24px;
    height: 24px;
}

/* Main Layout */
.main-wrapper {
    display: flex;
    margin-top: 73px;
    min-height: calc(100vh - 73px);
}

/* Sidebar */
.sidebar {
    width: 280px;
    flex-shrink: 0;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    padding: 2rem 0;
    position: sticky;
    top: 73px;
    height: calc(100vh - 73px);
    overflow-y: auto;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.sidebar-section {
    padding: 0 1.5rem;
    margin-bottom: 1.5rem;
}

.sidebar-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

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

.sidebar-nav li {
    margin-bottom: 0.25rem;
}

.sidebar-nav a {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background-color: var(--bg-tertiary);
    color: var(--accent-color);
    text-decoration: none;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem 3rem;
    max-width: calc(100% - 280px);
}

/* Hero Section */
.hero {
    padding: 4rem 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 3rem;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--accent-color), #6610f2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.card-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent-color), #6610f2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.card-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

/* Content Sections */
.section {
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--accent-color);
}

/* Article Content */
.article {
    max-width: 900px;
}

.article-content {
    line-height: 1.8;
}

.article-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.article-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-content h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

/* Lists */
.article-content ul,
.article-content ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content ul li {
    list-style-type: disc;
}

.article-content ol li {
    list-style-type: decimal;
}

/* Tables */
.table-container {
    overflow-x: auto;
    margin: 1.5rem 0;
    border-radius: 8px;
    border: 1px solid var(--table-border);
}

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

thead {
    background-color: var(--bg-tertiary);
}

th,
td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--table-border);
}

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

tbody tr:nth-child(even) {
    background-color: var(--table-stripe);
}

tbody tr:hover {
    background-color: var(--bg-tertiary);
}

/* Code Blocks */
.code-container {
    position: relative;
    margin: 1.5rem 0;
    border-radius: 8px;
    overflow: hidden;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.code-lang {
    font-weight: 600;
    text-transform: uppercase;
}

.code-copy {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.code-copy:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

pre {
    margin: 0;
    padding: 1rem 1.25rem;
    overflow-x: auto;
    background-color: var(--code-block-bg);
}

code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--code-text);
}

/* Inline Code */
.article-content code:not(pre code) {
    background-color: var(--code-bg);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.875em;
    color: var(--accent-color);
}

[data-theme="dark"] .article-content code:not(pre code) {
    background-color: var(--bg-tertiary);
}

/* Blockquotes */
blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    border-left: 4px solid var(--accent-color);
    background-color: var(--bg-secondary);
    border-radius: 0 8px 8px 0;
}

blockquote p:last-child {
    margin-bottom: 0;
}

blockquote cite {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Diagrams */
.diagram {
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    overflow-x: auto;
}

.diagram pre {
    background-color: transparent;
    padding: 0;
}

.diagram code {
    color: var(--text-primary);
}

/* Info Boxes */
.info-box {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    border-left: 4px solid;
}

.info-box.tip {
    background-color: rgba(25, 135, 84, 0.1);
    border-color: var(--success-color);
}

.info-box.warning {
    background-color: rgba(255, 193, 7, 0.1);
    border-color: var(--warning-color);
}

.info-box.error {
    background-color: rgba(220, 53, 69, 0.1);
    border-color: var(--error-color);
}

.info-box.info {
    background-color: rgba(13, 202, 240, 0.1);
    border-color: var(--info-color);
}

.info-box-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.info-box.tip .info-box-title { color: var(--success-color); }
.info-box.warning .info-box-title { color: #b45309; }
.info-box.error .info-box-title { color: var(--error-color); }
.info-box.info .info-box-title { color: #0891b2; }

/* Tags and Badges */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--bg-tertiary);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Progress Bars */
.progress {
    height: 8px;
    background-color: var(--bg-tertiary);
    border-radius: 999px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), #6610f2);
    border-radius: 999px;
    transition: width 0.3s ease;
}

/* Footer */
.footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-links a:hover {
    color: var(--accent-color);
}

/* Table of Contents */
.toc {
    position: sticky;
    top: 100px;
    padding: 1rem;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 2rem;
}

.toc-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
}

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

.toc-list li {
    margin-bottom: 0.5rem;
}

.toc-list a {
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: block;
    padding: 0.25rem 0;
    transition: all 0.2s ease;
}

.toc-list a:hover,
.toc-list a.active {
    color: var(--accent-color);
    transform: translateX(4px);
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.breadcrumbs a {
    color: var(--text-secondary);
}

.breadcrumbs span {
    color: var(--text-muted);
}

/* Page Navigation */
.page-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.page-nav-link {
    display: flex;
    flex-direction: column;
    padding: 1rem 1.5rem;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    transition: all 0.2s ease;
    max-width: 45%;
}

.page-nav-link:hover {
    background-color: var(--bg-tertiary);
}

.page-nav-link.prev {
    align-items: flex-start;
}

.page-nav-link.next {
    align-items: flex-end;
    text-align: right;
}

.page-nav-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.page-nav-title {
    font-weight: 600;
    color: var(--text-primary);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease forwards;
}

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.slide-in {
    animation: slideIn 0.3s ease forwards;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-content {
        padding: 2rem;
        max-width: 100%;
    }

    .sidebar {
        display: none;
    }

    .main-wrapper {
        flex-direction: column;
    }

    .sidebar.show {
        display: block;
        position: fixed;
        left: 0;
        top: 73px;
        bottom: 0;
        width: 280px;
        z-index: 999;
        animation: slideIn 0.3s ease;
    }
}

@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
    }

    .nav {
        display: none;
        width: 100%;
        flex-direction: column;
        margin-top: 1rem;
    }

    .nav.show {
        display: flex;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .main-content {
        padding: 1.5rem;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .article-content h2 {
        font-size: 1.5rem;
    }

    .article-content h3 {
        font-size: 1.25rem;
    }

    .footer-inner {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .hero {
        padding: 2rem 0;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .card {
        padding: 1rem;
    }

    .table-container {
        font-size: 0.8rem;
    }

    th, td {
        padding: 0.5rem;
    }
}

/* Print Styles */
@media print {
    .header,
    .sidebar,
    .footer,
    .theme-toggle,
    .mobile-menu-toggle {
        display: none !important;
    }

    .main-wrapper {
        margin-top: 0;
    }

    .main-content {
        max-width: 100%;
        padding: 0;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    h1, h2, h3 {
        page-break-after: avoid;
    }

    code {
        border: 1px solid #ddd;
        background: #f5f5f5;
    }

    .code-container {
        page-break-inside: avoid;
    }
}
