/* 3-Column Layout */
.container.full-width {
    max-width: 100%;
    padding: 10px 20px;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.three-col-layout {
    display: flex;
    flex: 1;
    gap: 15px;
    overflow: hidden;
    margin-top: 10px;
}

/* Column 1: Sidebar - Narrower */
.col-sidebar {
    width: 220px; /* Reduced from 250px */
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    padding-right: 5px;
}

.panel-section {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #eaeaea;
}

.panel-section h3, .panel-section h5 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1rem;
    color: #444;
}

.form-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.btn-group {
    display: flex;
    gap: 5px;
    margin-bottom: 5px;
}
.btn-group button {
    flex: 1;
    padding: 8px;
    font-size: 0.9em;
}

/* Filter Tags (New Module) */
.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 400px;
    overflow-y: auto;
    padding: 2px;
}
.filter-tag {
    font-size: 0.85em;
    padding: 3px 8px;
    background: #fff;
    border: 1px solid #d1d5da;
    border-radius: 20px; /* Pill shape */
    cursor: pointer;
    user-select: none;
    transition: all 0.1s;
    color: #444;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 2px;
}
.filter-tag:hover {
    background: #f1f8ff;
    border-color: #0366d6;
    color: #0366d6;
}
.filter-tag.active {
    background: #0366d6;
    color: white;
    border-color: #0366d6;
}
.filter-tag.active span {
    color: rgba(255,255,255,0.8) !important;
}

/* New Task Form Improvements */
.monitor-form input {
    width: 100%;
    padding: 8px 10px;
    margin-bottom: 10px;
    box-sizing: border-box;
    border: 1px solid #d1d5da;
    border-radius: 4px;
    font-size: 14px;
}
.monitor-form input:focus {
    border-color: #0366d6;
    outline: none;
    box-shadow: 0 0 0 2px rgba(3,102,214,0.3);
}

.btn-group {
    display: flex;
    gap: 8px;
}
.btn-group button {
    flex: 1;
    padding: 8px 0;
    font-size: 13px;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.2s;
    font-weight: 500;
}
#btn-fetch-list {
    background-color: #f1f8ff;
    color: #0366d6;
    border: 1px solid #c8e1ff;
}
#btn-fetch-list:hover {
    background-color: #dbedff;
}

.structure-options {
    background: #f6f8fa;
    border: 1px solid #e1e4e8;
    border-radius: 4px;
    padding: 10px;
    margin-top: 10px;
}
.structure-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
}
.structure-row select {
    flex: 1;
    padding: 6px;
    border: 1px solid #d1d5da;
    border-radius: 4px;
    background: #fff;
    font-size: 13px;
}
.structure-row button {
    flex: 1;
    padding: 6px;
    background: #2ea44f;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
}
.structure-row button:hover {
    background-color: #2c974b;
}

/* Column 2: List - Narrower but Stylish */
.col-list {
    width: 300px; /* Slightly wider for readability */
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #eaeaea;
    overflow: hidden;
}

.list-header {
    padding: 10px 12px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fcfcfc;
    z-index: 10;
}

.compact-list {
    flex: 1;
    overflow-y: auto;
    padding: 0; /* Remove padding */
}

/* Simplified Timeline Item (List Style) */
.timeline-item {
    padding: 10px 15px; /* Clean padding */
    margin: 0;
    border-bottom: 1px solid #f0f0f0; /* Very light separator */
    background: #fff;
    position: relative;
    font-size: 0.9em;
    line-height: 1.5;
    cursor: pointer; /* Clickable feeling */
    display: flex; /* Use flex for alignment */
    align-items: flex-start;
    gap: 10px;
}
.timeline-item:last-child {
    border-bottom: none;
}
.timeline-item:hover {
    background: #f8f9fa;
}
.timeline-item input[type="checkbox"] {
    position: static; /* Reset absolute */
    margin-top: 4px; /* Align with text */
    transform: scale(1.1);
    cursor: pointer;
    flex-shrink: 0;
}
.timeline-content-wrapper {
    flex: 1;
    min-width: 0;
}
.timeline-date {
    font-size: 0.85em;
    color: #999;
    margin-bottom: 2px;
    display: block;
}
.timeline-title {
    display: block;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    word-wrap: break-word;
}
.timeline-title a {
    color: inherit;
    text-decoration: none;
}
.timeline-title a:hover {
    color: #0070f3;
    text-decoration: none;
}

/* Column 3: Preview - Flexible & Scrollable */
.col-preview {
    flex: 1; 
    min-width: 0; /* Prevent flex overflow */
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 8px;
    border: 1px solid #eaeaea;
    overflow: hidden;
    height: 100%; /* Ensure full height */
}

.preview-body {
    flex: 1;
    overflow-y: auto; /* Enable vertical scroll */
    padding: 20px;
    font-size: 0.95em;
    background: #fff;
}

/* Doc Content Styling */
.md-content {
    line-height: 1.8;
    color: #24292e;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}
.doc-title {
    font-size: 1.5em;
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 0.3em;
    margin-top: 0.5em;
    margin-bottom: 0.8em;
    color: #111;
    text-align: center;
}
.doc-subtitle {
    font-size: 1.2em;
    margin-top: 1.2em;
    margin-bottom: 0.6em;
    color: #333;
}
.doc-section {
    font-size: 1.1em;
    font-weight: 600;
    margin-top: 1.2em;
    margin-bottom: 0.5em;
    color: #444;
}
.doc-meta {
    background: #f6f8fa;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.9em;
    color: #586069;
    margin-bottom: 5px;
    display: inline-block;
    margin-right: 10px;
}
.meta-label {
    font-weight: 600;
    color: #24292e;
}
.doc-attachment {
    margin-top: 10px;
    background: #fff;
    border: 1px solid #e1e4e8;
    padding: 10px;
    border-radius: 4px;
    display: flex;
    align-items: center;
}
.doc-attachment a {
    color: #0366d6;
    font-weight: 500;
    text-decoration: none;
}
.doc-attachment a:hover {
    text-decoration: underline;
}

.preview-header {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fcfcfc;
}
.preview-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.preview-body {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    font-size: 0.9em;
    background: #fff;
}
.preview-body h4, .preview-body h5 { margin-top: 15px; margin-bottom: 8px; }
.preview-body p { margin-bottom: 10px; }
.preview-body pre { background: #f6f8fa; padding: 10px; overflow-x: auto; }

/* Helpers */
.hidden { display: none !important; }
.btn-primary { background: #0070f3; color: white; padding: 5px 12px; border-radius: 4px; border:none; cursor: pointer; }
.btn-success { background: #28a745; color: white; }
.status-msg { font-size: 0.8em; margin-top: 5px; color: #666; }
.placeholder-text { color: #999; text-align: center; margin-top: 50px; }

