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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    color: #2c3e50;
    margin: 0;
    padding: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== TOP AREA (HEADER) ===== */
.header {
    background: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    flex-shrink: 0;
    height: 71px;
    box-sizing: border-box;
}

.header-left {
    display: flex;
    align-items: center;
}

.logo {
    height: 40px;
    margin-right: 20px;
}

.header-title {
    font-size: 18px;
    font-weight: 500;
    color: #2c3e50;
}

.header-right {
    text-align: right;
}

.header-greeting {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 2px;
}

.header-datetime {
    font-size: 13px;
    color: #7f8c8d;
}

/* ===== LEFT + MAIN CONTAINER ===== */
.container {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

/* ===== LEFT SIDEBAR ===== */
.sidebar {
    width: 280px;
    background: #ffffff;
    border-right: 1px solid #e0e0e0;
    overflow-y: auto;
    padding: 20px 0;
    flex-shrink: 0;
    transition: width 0.3s, margin-left 0.3s;
    position: relative;
}

.sidebar.collapsed {
    width: 0;
    margin-left: -280px;
    overflow: hidden;
}

.sidebar.collapsed .sidebar-toggle {
    right: -305px;
}

.sidebar-toggle {
    position: absolute;
    right: -15px;
    top: 20px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.sidebar-toggle:hover {
    background: #f8f9fa;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transform: scale(1.1);
}

.sidebar-toggle i {
    color: #3498db;
    font-size: 16px;
}

.folder {
    padding: 8px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background 0.2s;
    user-select: none;
}

.folder:hover {
    background: #f8f9fa;
}

.folder.active {
    background: #e8f4f8;
    border-left: 3px solid #3498db;
    padding-left: 17px;
}

.folder.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.folder.disabled:hover {
    background: transparent;
}

.document.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.folder-icon {
    margin-right: 10px;
    font-size: 18px;
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

.folder-name {
    font-size: 14px;
    color: #2c3e50;
}

.folder.expanded .folder-icon::before {
    content: '\f07c';
    color: #f39c12;
}

.folder:not(.expanded) .folder-icon::before {
    content: '\f07b';
    color: #f39c12;
}

.subfolder {
    padding-left: 45px;
}

.subsubfolder {
    padding-left: 70px;
}

.document {
    padding: 8px 20px 8px 95px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background 0.2s;
    font-size: 13px;
}

.document:hover {
    background: #f8f9fa;
}

.document.selected {
    background: #3498db;
    color: #ffffff;
}

.document::before {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-right: 10px;
    font-size: 16px;
}

.document.pdf::before {
    content: '\f1c1';
    color: #e74c3c;
}

.document.docx::before {
    content: '\f1c2';
    color: #2b579a;
}

.document.audio::before {
    content: '\f1c7';
    color: #9b59b6;
}

/* ===== MAIN CONTENT AREA ===== */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    background: #f5f5f5;
}

.document-header {
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 20px;
    margin-bottom: 25px;
}

.document-title {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
}

.document-meta {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: #7f8c8d;
}

.meta-item {
    display: flex;
    align-items: center;
}

.meta-item::before {
    content: '•';
    margin-right: 8px;
}

/* Summary Section */
.section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.section-title i {
    margin-right: 10px;
    font-size: 18px;
    color: #3498db;
}

.section-content {
    font-size: 14px;
    line-height: 1.7;
    color: #34495e;
}

/* Deadlines */
.deadline-item {
    background: #fff8e1;
    border-left: 3px solid #f39c12;
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: 4px;
}

.deadline-date {
    font-weight: 600;
    color: #e67e22;
    margin-bottom: 5px;
}

.deadline-desc {
    font-size: 13px;
    color: #7f8c8d;
}

/* Chat Input Area (reusable) */
.chat-input-area {
    padding: 15px 0;
    display: flex;
    gap: 10px;
}

.chat-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #dfe6e9;
    border-radius: 4px;
    font-size: 13px;
    outline: none;
}

.chat-input:focus {
    border-color: #3498db;
}

.chat-send {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s;
}

.chat-send:hover {
    background: #2980b9;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #bdc3c7;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #95a5a6;
}

.tag {
    display: inline-block;
    background: #ecf0f1;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 12px;
    margin-right: 8px;
    color: #7f8c8d;
}

/* ===== TABS HEADER ===== */
.tabs-container {
    background: #ffffff;
    margin: 20px 20px 0 20px;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    flex-shrink: 0;
}

.tabs {
    display: flex;
    border-bottom: 2px solid #e0e0e0;
    padding: 0 20px;
    gap: 5px;
}

.tab {
    padding: 18px 30px;
    cursor: pointer;
    border-bottom: 4px solid transparent;
    color: #7f8c8d;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s;
    user-select: none;
    position: relative;
    border-radius: 6px 6px 0 0;
}

.tab i {
    font-size: 17px;
    margin-right: 8px;
}

.tab:hover {
    color: #2c3e50;
    background: #f8f9fa;
}

.tab.active {
    color: #2c3e50;
    background: #f8f9fa;
    border-bottom-color: #3498db;
}

/* ===== SCROLLABLE CONTENT CONTAINER ===== */
.content-wrapper {
    background: #ffffff;
    margin: 0 20px 0 20px;
    margin-bottom: 20px;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

/* ===== TAB CONTENT VISIBILITY ===== */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ===== TAB PANE (CONTENT WRAPPER) ===== */
.tab-pane {
    padding: 30px;
}

/* ===== SPECIFIC TAB STYLES ===== */
#dokument-tab {
    background: #e0e0e0;
}

#dokument-tab .tab-pane {
    padding: 0;
    background: #e0e0e0;
}

#case-dashboard-tab {
    background: #f5f5f5;
}

#case-dashboard-tab .welcome-container {
    background: #f5f5f5;
}

#arbeide-tab .tab-pane,
#audio-arbeide-tab .tab-pane {
    padding: 0;
}

.arbeide-container {
    display: flex;
    gap: 20px;
    padding: 0;
    min-height: 100%;
}

.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e0e0e0;
    padding: 20px;
}

.saved-area {
    width: 350px;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.area-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ecf0f1;
}

.area-title i {
    margin-right: 8px;
    color: #3498db;
}

.chat-log {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

.chat-message {
    margin-bottom: 15px;
    padding: 10px;
    background: #ffffff;
    border-radius: 4px;
    border-left: 3px solid #3498db;
    position: relative;
}

.chat-message.user {
    border-left-color: #95a5a6;
}

.chat-message.ai {
    border-left-color: #3498db;
}

.message-header {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 5px;
    color: #2c3e50;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.message-text {
    font-size: 13px;
    color: #34495e;
    line-height: 1.5;
}

.save-btn {
    background: transparent;
    border: none;
    color: #7f8c8d;
    cursor: pointer;
    padding: 2px 6px;
    font-size: 11px;
    border-radius: 3px;
    transition: all 0.2s;
}

.save-btn:hover {
    background: #ecf0f1;
    color: #3498db;
}

.saved-items {
    overflow-y: auto;
    flex: 1;
}

.saved-item {
    background: #f8f9fa;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 4px;
    border-left: 3px solid #27ae60;
    font-size: 13px;
    position: relative;
}

.saved-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.saved-item-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 12px;
}

.delete-btn {
    background: transparent;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
}

.delete-btn:hover {
    background: #fdecea;
}

.saved-item-text {
    color: #34495e;
    line-height: 1.5;
}

.no-saved-items {
    text-align: center;
    color: #95a5a6;
    font-size: 13px;
    padding: 20px;
}

/* Word Document Style - A4 Page */
.contract-document {
    max-width: 210mm;
    margin: 30px auto;
    background: white;
    padding: 25mm 20mm;
    line-height: 1.8;
    font-family: 'Times New Roman', Times, serif;
    font-size: 12pt;
    color: #000;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    min-height: 297mm;
    position: relative;
}

.contract-document::after {
    content: '';
    position: absolute;
    bottom: 15mm;
    left: 20mm;
    right: 20mm;
    height: 1px;
    background: #e0e0e0;
}

.page-number {
    position: absolute;
    bottom: 10mm;
    right: 20mm;
    font-size: 10pt;
    color: #7f8c8d;
}

.contract-title {
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 30px;
    text-transform: uppercase;
}

.contract-section {
    margin-bottom: 25px;
}

.contract-section-title {
    font-weight: bold;
    font-size: 15px;
    margin-bottom: 10px;
    margin-top: 20px;
}

.contract-paragraph {
    text-align: justify;
    margin-bottom: 12px;
}

.contract-list {
    margin-left: 40px;
    margin-bottom: 12px;
}

.contract-list li {
    margin-bottom: 8px;
}

.signature-section {
    margin-top: 50px;
    display: flex;
    justify-content: space-between;
}

.signature-block {
    width: 45%;
}

.signature-line {
    border-top: 1px solid #000;
    margin-top: 40px;
    padding-top: 5px;
    font-size: 12px;
}

/* Notater Tab */
#notater-tab .tab-pane {
    padding: 0;
}

.notes-container {
    padding: 30px;
}

.add-note-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 25px;
}

.note-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #dfe6e9;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 10px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    outline: none;
}

.note-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #dfe6e9;
    border-radius: 4px;
    font-size: 14px;
    min-height: 100px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    resize: vertical;
    outline: none;
}

.note-input:focus,
.note-textarea:focus {
    border-color: #3498db;
}

.add-note-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

.add-note-btn:hover {
    background: #2980b9;
}

.notes-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.note-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.note-title {
    font-weight: 600;
    font-size: 16px;
    color: #2c3e50;
}

.note-date {
    font-size: 12px;
    color: #7f8c8d;
}

.note-content {
    font-size: 14px;
    line-height: 1.6;
    color: #34495e;
}

.note-actions {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #ecf0f1;
    display: flex;
    gap: 10px;
}

.note-delete {
    background: transparent;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 13px;
    padding: 5px 10px;
    border-radius: 3px;
    transition: background 0.2s;
}

.note-delete:hover {
    background: #fdecea;
}

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

/* Dashboard Welcome Page */
.welcome-container {
    padding: 30px;
}

/* Simple Welcome */
.simple-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: calc(100vh - 250px);
    text-align: center;
}

.welcome-icon {
    font-size: 80px;
    color: #3498db;
    margin-bottom: 30px;
    opacity: 0.3;
}

.simple-welcome h2 {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
}

.simple-welcome p {
    font-size: 14px;
    color: #7f8c8d;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.activity-panel, .deadlines-panel {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
}

/* Case Summary Section */
.case-summary {
    border-bottom: 1px solid #ecf0f1;
}

.summary-content {
    padding: 20px;
    background: #f8f9fa;
}

.summary-content p {
    font-size: 14px;
    line-height: 1.7;
    color: #34495e;
    margin: 0;
}

/* Documents Overview Section */
.documents-overview {
    margin-top: 0;
}

.documents-list {
    max-height: 600px;
    overflow-y: auto;
}

.document-item {
    padding: 20px;
    border-bottom: 1px solid #f8f9fa;
    display: flex;
    gap: 15px;
    transition: background 0.2s;
}

.document-item:hover {
    background: #f8f9fa;
}

.document-item:last-child {
    border-bottom: none;
}

.document-icon {
    width: 45px;
    height: 45px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.document-icon.pdf {
    background: #fee;
    color: #e74c3c;
}

.document-icon.audio {
    background: #f3e5f5;
    color: #9b59b6;
}

.document-icon.docx {
    background: #e3f2fd;
    color: #2196f3;
}

.document-details {
    flex: 1;
}

.document-name {
    font-size: 15px;
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 8px;
}

.document-summary {
    font-size: 13px;
    color: #34495e;
    line-height: 1.6;
    margin-top: 8px;
}

.panel-header {
    padding: 20px;
    border-bottom: 1px solid #ecf0f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.view-all {
    font-size: 13px;
    color: #3498db;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.activity-list {
    max-height: 450px;
    overflow-y: auto;
}

.activity-item {
    padding: 18px 20px;
    border-bottom: 1px solid #f8f9fa;
    display: flex;
    gap: 15px;
    transition: background 0.2s;
}

.activity-item:hover {
    background: #f8f9fa;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.activity-icon.pdf {
    background: #fee;
    color: #e74c3c;
}

.activity-icon.audio {
    background: #f3e5f5;
    color: #9b59b6;
}

.activity-icon.doc {
    background: #e3f2fd;
    color: #2196f3;
}

.activity-icon.ai {
    background: #e8f5e9;
    color: #4caf50;
}

.activity-details {
    flex: 1;
}

.activity-action {
    font-size: 14px;
    color: #2c3e50;
    font-weight: 500;
    margin-bottom: 4px;
}

.activity-meta {
    font-size: 12px;
    color: #7f8c8d;
    display: flex;
    align-items: center;
    gap: 12px;
}

.activity-time {
    font-size: 12px;
    color: #95a5a6;
    white-space: nowrap;
}

.deadline-list {
    padding: 15px 20px;
}

.deadline-row {
    padding: 12px 15px;
    background: #fff8e1;
    border-left: 3px solid #f39c12;
    border-radius: 4px;
    margin-bottom: 10px;
}

.deadline-row.urgent {
    background: #fdecea;
    border-left-color: #e74c3c;
}

.deadline-row.normal {
    background: #e8f4f8;
    border-left-color: #3498db;
}

.deadline-date-text {
    font-size: 12px;
    font-weight: 600;
    color: #e67e22;
    margin-bottom: 4px;
}

.deadline-row.urgent .deadline-date-text {
    color: #c0392b;
}

.deadline-row.normal .deadline-date-text {
    color: #2980b9;
}

.deadline-task {
    font-size: 13px;
    color: #2c3e50;
}

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

.quick-action-btn {
    background: white;
    border: 2px solid #ecf0f1;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-action-btn:hover {
    border-color: #3498db;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.1);
}

.quick-action-icon {
    width: 45px;
    height: 45px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #3498db;
}

.quick-action-text {
    flex: 1;
}

.quick-action-title {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 3px;
}

.quick-action-desc {
    font-size: 11px;
    color: #7f8c8d;
}

.insights-panel {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 25px;
    border-radius: 8px;
    color: white;
}

.insights-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.insight-item {
    background: rgba(255,255,255,0.15);
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 13px;
    line-height: 1.6;
}

.insight-item i {
    margin-right: 8px;
}

/* Audio Transkripsjon */
#audio-transkripsjon-tab .tab-pane,
#audio-analyse-tab .tab-pane {
    padding: 0;
}

.transkripsjon-container {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.audio-player {
    background: #2c3e50;
    padding: 20px 30px;
    border-bottom: 1px solid #e0e0e0;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
}

.player-btn {
    background: #3498db;
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s;
}

.player-btn:hover {
    background: #2980b9;
    transform: scale(1.05);
}

.player-btn:last-child {
    width: auto;
    border-radius: 20px;
    padding: 0 15px;
    gap: 5px;
}

.player-time {
    font-size: 13px;
    font-weight: 500;
    min-width: 45px;
}

.player-progress {
    flex: 1;
    position: relative;
}

.progress-bar {
    height: 6px;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #3498db;
    border-radius: 3px;
    transition: width 0.1s;
}

.progress-slider {
    position: absolute;
    top: -5px;
    left: 0;
    width: 100%;
    height: 16px;
    opacity: 0;
    cursor: pointer;
}

.transkripsjon-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.transcript-area {
    flex: 0 0 70%;
    overflow-y: auto;
    padding: 30px;
    background: white;
}

.transcript-text {
    max-width: 800px;
}

.transcript-paragraph {
    margin-bottom: 20px;
    padding: 10px;
    border-radius: 4px;
    transition: background 0.2s;
    cursor: text;
    user-select: text;
}

.transcript-paragraph:hover {
    background: #f8f9fa;
}

.transcript-paragraph.highlighted {
    background: #fff9c4;
    border-left: 3px solid #ffc107;
    padding-left: 12px;
    position: relative;
}

.transcript-paragraph.highlighted::after {
    content: attr(data-comment);
    position: absolute;
    left: 0;
    top: 100%;
    background: #2c3e50;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: normal;
    max-width: 300px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 100;
    margin-top: 5px;
}

.transcript-paragraph.highlighted:hover::after {
    opacity: 1;
}

.timestamp {
    color: #95a5a6;
    font-size: 11px;
    margin-right: 10px;
    font-family: monospace;
}

.chapters-sidebar {
    flex: 0 0 30%;
    background: #f8f9fa;
    border-left: 1px solid #e0e0e0;
    overflow-y: auto;
    padding: 20px;
}

.chapters-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.chapter-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chapter-item {
    background: white;
    padding: 12px 15px;
    border-radius: 6px;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.chapter-item:hover {
    border-left-color: #3498db;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transform: translateX(3px);
}

.chapter-item.active {
    border-left-color: #3498db;
    background: #e8f4f8;
}

.chapter-time {
    font-size: 11px;
    color: #7f8c8d;
    font-family: monospace;
    margin-bottom: 4px;
}

.chapter-name {
    font-size: 13px;
    color: #2c3e50;
    font-weight: 500;
}

/* Document Configuration Screen */
.config-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px;
}

.config-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #ecf0f1;
}

.config-header i {
    font-size: 48px;
    color: #3498db;
}

.config-header h2 {
    font-size: 26px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.config-header p {
    font-size: 14px;
    color: #7f8c8d;
}

.config-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.config-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.config-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.config-label {
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.config-label i {
    color: #3498db;
}

.ai-suggested {
    margin-left: auto;
    font-size: 11px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 500;
}

.document-types {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.type-option input[type="radio"] {
    display: none;
}

.type-card {
    background: white;
    border: 2px solid #e0e0e0;
    padding: 20px 15px;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.type-card:hover {
    border-color: #3498db;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.15);
}

.type-option input[type="radio"]:checked + .type-card {
    border-color: #3498db;
    background: #e8f4f8;
}

.type-card.suggested {
    border-color: #9b59b6;
    background: #f3e5f5;
}

.type-card i {
    font-size: 28px;
    color: #3498db;
    display: block;
    margin-bottom: 10px;
}

.type-card span {
    font-size: 13px;
    color: #2c3e50;
    font-weight: 500;
    display: block;
}

.ai-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 9px;
    padding: 3px 8px;
    border-radius: 8px;
    font-weight: 600;
}

.config-select {
    width: 100%;
    padding: 12px;
    border: 1px solid #dfe6e9;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    color: #2c3e50;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}

.config-select:focus {
    border-color: #3498db;
}

.config-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.checkbox-option:hover {
    background: #ecf0f1;
}

.checkbox-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-option span {
    font-size: 14px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-option i {
    color: #7f8c8d;
    font-size: 14px;
}

.config-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #dfe6e9;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.config-input:focus {
    border-color: #3498db;
}

.config-hint {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 8px;
}

.config-hint i {
    margin-right: 5px;
    color: #3498db;
}

.related-docs-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px;
    background: white;
    border: 1px solid #dfe6e9;
    border-radius: 6px;
    min-height: 50px;
    align-items: center;
}

.related-docs-container:focus-within {
    border-color: #3498db;
}

.doc-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.doc-tag i {
    font-size: 14px;
}

.remove-tag {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    padding: 0;
}

.remove-tag:hover {
    background: rgba(255, 255, 255, 0.3);
}

.remove-tag i {
    font-size: 10px;
}

.related-docs-input {
    border: none;
    outline: none;
    flex: 1;
    min-width: 200px;
    font-size: 14px;
    padding: 4px;
}

.config-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    padding-top: 20px;
}

.config-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.config-btn.primary {
    background: #3498db;
    color: white;
}

.config-btn.primary:hover {
    background: #2980b9;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.config-btn.secondary {
    background: #ecf0f1;
    color: #7f8c8d;
}

.config-btn.secondary:hover {
    background: #bdc3c7;
}

.config-info {
    background: #e8f4f8;
    border-left: 4px solid #3498db;
    padding: 15px 20px;
    border-radius: 6px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.config-info i {
    color: #3498db;
    font-size: 16px;
    margin-top: 2px;
}

.config-info p {
    font-size: 13px;
    color: #2c3e50;
    line-height: 1.6;
    margin: 0;
}

@keyframes progress {
    0% {
        width: 0%;
    }
    50% {
        width: 75%;
    }
    100% {
        width: 100%;
    }
}

/* Sidebar Footer */
.sidebar-footer {
    margin-top: 40px;
    padding: 20px;
    border-top: 1px solid #e0e0e0;
}

.implementation-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.implementation-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.implementation-link i {
    font-size: 18px;
}

.workflow-link {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    margin-top: 10px;
}

/* Implementation Page */
.implementation-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px;
}

.implementation-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 50px;
    text-align: left;
}

.implementation-header i {
    font-size: 64px;
    color: #3498db;
}

.implementation-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
}

.implementation-header p {
    font-size: 16px;
    color: #7f8c8d;
}

.steps-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 40px;
}

.step-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    display: flex;
    gap: 25px;
}

.step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.step-content h3 i {
    color: #3498db;
    margin-right: 8px;
}

.step-desc {
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 25px;
}

.integration-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.integration-card {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.2s;
}

.integration-card:hover {
    border-color: #3498db;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.15);
}

.integration-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.integration-icon.onedrive {
    background: #0078d4;
}

.integration-icon.gdrive {
    background: #4285f4;
}

.integration-icon.sharepoint {
    background: #0078d4;
}

.integration-info {
    flex: 1;
}

.integration-name {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 3px;
}

.integration-status {
    font-size: 12px;
    color: #7f8c8d;
}

.connect-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.connect-btn:hover {
    background: #2980b9;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.tech-note {
    background: #e8f4f8;
    border-left: 4px solid #3498db;
    padding: 15px;
    border-radius: 6px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.tech-note i {
    color: #3498db;
    font-size: 18px;
    margin-top: 2px;
}

.tech-note strong {
    color: #2c3e50;
}

.tech-note div {
    font-size: 13px;
    color: #34495e;
    line-height: 1.6;
}

.sync-preview {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.sync-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: white;
    border-radius: 6px;
    margin-bottom: 15px;
}

.sync-item i {
    font-size: 20px;
    color: #3498db;
}

.sync-item span {
    flex: 1;
    font-size: 14px;
    color: #2c3e50;
    font-weight: 500;
}

.sync-status {
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.sync-status.success {
    background: #d4edda;
    color: #155724;
}

.sync-structure {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sync-folder {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: white;
    border-radius: 6px;
    font-size: 14px;
    color: #2c3e50;
}

.sync-folder.indent {
    margin-left: 30px;
}

.sync-folder i {
    color: #f39c12;
    font-size: 16px;
}

.sync-count {
    margin-left: auto;
    font-size: 12px;
    color: #7f8c8d;
    background: #ecf0f1;
    padding: 4px 10px;
    border-radius: 10px;
}

.ready-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.feature-item {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.feature-item i {
    font-size: 28px;
    color: #3498db;
}

.feature-item strong {
    font-size: 15px;
    color: #2c3e50;
    display: block;
    margin-bottom: 5px;
}

.feature-item p {
    font-size: 13px;
    color: #7f8c8d;
    line-height: 1.5;
    margin: 0;
}

.cta-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    color: white;
}

.cta-box h4 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 10px;
}

.cta-box p {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 25px;
}

.cta-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.cta-btn {
    padding: 12px 28px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.cta-btn.primary {
    background: white;
    color: #667eea;
}

.cta-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.cta-btn.secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.cta-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

.tech-specs {
    background: #2c3e50;
    color: white;
    padding: 30px;
    border-radius: 12px;
}

.tech-spec-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.tech-item {
    display: flex;
    gap: 15px;
}

.tech-item i {
    font-size: 24px;
    color: #3498db;
}

.tech-item strong {
    font-size: 14px;
    display: block;
    margin-bottom: 5px;
}

.tech-item p {
    font-size: 13px;
    opacity: 0.8;
    line-height: 1.5;
    margin: 0;
}

/* Workflow Section */
.workflow-section {
    background: #f8f9fa;
    padding: 40px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.workflow-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.workflow-header i {
    font-size: 36px;
    color: #3498db;
}

.workflow-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
}

.workflow-highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 25px;
    border-radius: 8px;
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.workflow-highlight i {
    font-size: 24px;
    flex-shrink: 0;
}

.workflow-highlight strong {
    font-size: 16px;
}

.workflow-steps {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 25px;
}

.workflow-step {
    background: white;
    padding: 25px;
    border-radius: 8px;
    display: flex;
    gap: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.workflow-icon {
    width: 50px;
    height: 50px;
    background: #e8f4f8;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #3498db;
    flex-shrink: 0;
}

.workflow-content h4 {
    font-size: 17px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
}

.workflow-content p {
    font-size: 14px;
    color: #7f8c8d;
    line-height: 1.7;
    margin-bottom: 15px;
}

.workflow-visual {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.folder-example {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}

.folder-example.disabled-example {
    background: #ecf0f1;
    color: #95a5a6;
    opacity: 0.6;
}

.folder-example.active-example {
    background: #e8f4f8;
    color: #2c3e50;
}

.folder-example i {
    font-size: 18px;
}

.folder-example.disabled-example i {
    color: #95a5a6;
}

.folder-example.active-example i {
    color: #f39c12;
}

.example-badge {
    margin-left: auto;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.example-badge.gray {
    background: #bdc3c7;
    color: white;
}

.example-badge.blue {
    background: #3498db;
    color: white;
}

.workflow-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.workflow-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: #e8f4f8;
    border-radius: 6px;
    font-size: 14px;
    color: #2c3e50;
}

.workflow-list i {
    color: #3498db;
    font-size: 16px;
}

.workflow-example {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 15px;
}

.workflow-scenario {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.scenario-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.step-num {
    width: 30px;
    height: 30px;
    background: #3498db;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.scenario-step span:last-child {
    font-size: 12px;
    color: #2c3e50;
    text-align: center;
    font-weight: 500;
}

.workflow-scenario > i {
    color: #3498db;
    font-size: 16px;
}

.saas-benefits {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 15px;
}

.saas-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: #e8f5e9;
    border-radius: 6px;
    font-size: 13px;
    color: #2c3e50;
    font-weight: 500;
}

.saas-item i {
    color: #27ae60;
    font-size: 16px;
}

.workflow-summary {
    background: #fff9e6;
    border-left: 4px solid #f39c12;
    padding: 20px;
    border-radius: 8px;
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.workflow-summary i {
    font-size: 24px;
    color: #f39c12;
    flex-shrink: 0;
}

.workflow-summary strong {
    color: #2c3e50;
    font-size: 15px;
}

.workflow-summary div {
    font-size: 14px;
    color: #34495e;
    line-height: 1.7;
}

