/* Microsoft OneNote-inspired Design System */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f3f2f1;
    color: #323130;
    line-height: 1.5;
    overflow-x: hidden;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #7719AA 0%, #9C27B0 100%);
    color: white;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    max-width: 100%;
}

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

.logo-text {
    color: white;
}

.nav {
    display: flex;
    gap: 4px;
}

.nav-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-btn:hover {
    background: rgba(255,255,255,0.2);
}

.nav-btn.active {
    background: rgba(255,255,255,0.25);
}

/* Main Content Layout */
.main-content {
    padding: 0;
    min-height: calc(100vh - 120px);
}

.notebook-container {
    display: flex;
    height: calc(100vh - 120px);
    background: white;
}

/* Sidebar Styles */
.notebook-sidebar {
    width: 280px;
    background: #faf9f8;
    border-right: 1px solid #edebe9;
    padding: 24px 16px;
    overflow-y: auto;
}

.section {
    margin-bottom: 32px;
}

.section-title {
    font-size: 12px;
    font-weight: 600;
    color: #605e5c;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    padding: 0 12px;
}

.section-items {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.section-item {
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    color: #323130;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.section-item:hover {
    background: #f3f2f1;
}

.section-item.active {
    background: #e1dfdd;
    color: #323130;
    font-weight: 500;
}

/* Content Area */
.notebook-content {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
    background: white;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid #edebe9;
}

.page-title {
    font-size: 28px;
    font-weight: 600;
    color: #323130;
}

.page-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid #d2d0ce;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    color: #323130;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: #f3f2f1;
    border-color: #c8c6c4;
}

/* Document Preview Section */
.document-preview-section {
    margin-bottom: 32px;
}

.shared-document {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.shared-document:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.15);
}

.shared-doc-image {
    width: 100%;
    height: auto;
    display: block;
}

.document-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.7) 100%);
    display: flex;
    align-items: flex-end;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.shared-document:hover .document-overlay {
    opacity: 1;
}

.overlay-content {
    padding: 24px;
    color: white;
}

.overlay-content h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.overlay-content p {
    font-size: 14px;
    opacity: 0.9;
}

.document-card {
    background: white;
    border: 1px solid #d2d0ce;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

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

.document-preview {
    height: 200px;
    overflow: hidden;
    background: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdf-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.document-info {
    padding: 16px;
}

.document-title {
    font-size: 16px;
    font-weight: 600;
    color: #323130;
    margin-bottom: 8px;
}

.document-meta {
    font-size: 13px;
    color: #605e5c;
    line-height: 1.4;
}

/* Attachment Section */
.attachment-section {
    background: #f8f8f8;
    border: 1px solid #d2d0ce;
    border-radius: 8px;
    padding: 32px;
    margin-bottom: 32px;
    text-align: center;
}

.attachment-header {
    margin-bottom: 24px;
}

.attachment-title {
    font-size: 24px;
    font-weight: 600;
    color: #323130;
    margin-bottom: 12px;
}

.attachment-description {
    font-size: 16px;
    color: #605e5c;
    max-width: 600px;
    margin: 0 auto;
}

.attachment-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.download-btn, .view-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.download-btn {
    background: #0078d4;
    color: white;
}

.download-btn:hover {
    background: #106ebe;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,120,212,0.3);
}

.view-btn {
    background: #0078d4;
    color: white;
    border-color: #0078d4;
}

.view-btn:hover {
    background: #106ebe;
    border-color: #106ebe;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,120,212,0.3);
}

/* Document Images Section */
.document-images-section {
    margin-bottom: 32px;
}

.document-images-title {
    font-size: 20px;
    font-weight: 600;
    color: #323130;
    margin-bottom: 24px;
}

.document-images-grid {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

.doc-image-item {
    text-align: center;
    padding: 20px;
    background: #faf9f8;
    border-radius: 8px;
    border: 1px solid #edebe9;
    transition: all 0.2s ease;
    max-width: 300px;
}

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

.doc-format-image {
    width: 120px;
    height: auto;
    border-radius: 6px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.doc-image-item h4 {
    font-size: 16px;
    font-weight: 600;
    color: #323130;
    margin-bottom: 8px;
}

.doc-image-item p {
    font-size: 14px;
    color: #605e5c;
    margin: 0;
}

/* Footer */
.footer {
    background: #323130;
    color: white;
    padding: 24px;
    margin-top: auto;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    font-size: 14px;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.footer-links a:hover {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .notebook-container {
        flex-direction: column;
        height: auto;
    }
    
    .notebook-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #edebe9;
        padding: 16px;
    }
    
    .notebook-content {
        padding: 24px 16px;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .document-grid {
        grid-template-columns: 1fr;
    }
    
    .attachment-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .download-btn, .view-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .header-content {
        padding: 12px 16px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

/* Animation and Transitions */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.document-card {
    animation: fadeIn 0.6s ease-out;
}

.document-card:nth-child(2) {
    animation-delay: 0.1s;
}

.document-card:nth-child(3) {
    animation-delay: 0.2s;
}

/* Focus States for Accessibility */
.nav-btn:focus,
.action-btn:focus,
.download-btn:focus,
.view-btn:focus,
.section-item:focus {
    outline: 2px solid #0078d4;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .header,
    .notebook-sidebar,
    .page-actions,
    .footer {
        display: none;
    }
    
    .notebook-content {
        padding: 0;
    }
    
    .document-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}
