/* ═════════════════════════════════════════════════════════════════════════
   Teach Cloud — Word Document Rich Text Editor Stylesheet (doc_editor.css)
   ═════════════════════════════════════════════════════════════════════════ */

/* ── Container & Document Shell ── */
.doc-editor-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 1.75rem;
    border-radius: var(--radius-md, 10px);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.12));
    background: var(--bg-secondary, #0b0f17);
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.doc-editor-container:focus-within {
    border-color: var(--accent-cyan, #00d4ff);
    box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.2), 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* ── Word Document Ribbon Toolbar ── */
.doc-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.65rem 0.9rem;
    background: var(--bg-tertiary, #0d111a);
    border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    user-select: none;
}

.doc-toolbar-left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.doc-toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.doc-toolbar-group {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: rgba(0, 0, 0, 0.25);
    padding: 2px 4px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Headings Selector Dropdown */
.doc-heading-select {
    background: var(--bg-secondary, #161b26);
    color: var(--text-primary, #ffffff);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.15));
    border-radius: 6px;
    padding: 0.35rem 0.65rem;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.doc-heading-select:hover {
    border-color: var(--accent-cyan, #00d4ff);
}

/* Toolbar Buttons */
.doc-tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    padding: 0 6px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 5px;
    color: var(--text-secondary, #94a3b8);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
    position: relative;
}

.doc-tool-btn svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    stroke-width: 2.2;
    fill: none;
}

.doc-tool-btn:hover {
    background: rgba(56, 189, 248, 0.15);
    color: var(--accent-cyan, #00d4ff);
    border-color: rgba(56, 189, 248, 0.3);
}

.doc-tool-btn:active {
    transform: scale(0.96);
}

.doc-tool-btn.active {
    background: var(--accent-blue, #0284c7);
    color: #ffffff;
    border-color: var(--accent-blue, #0284c7);
}

/* Typography styles inside toolbar buttons */
.doc-btn-bold { font-weight: 800; font-size: 0.95rem; }
.doc-btn-italic { font-style: italic; font-family: serif; font-size: 1rem; }
.doc-btn-underline { text-decoration: underline; text-underline-offset: 2.5px; }
.doc-btn-strike { text-decoration: line-through; }

/* View Mode Tabs Switcher */
.doc-view-tabs {
    display: inline-flex;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px;
    border-radius: 6px;
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
}

.doc-view-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.32rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 4px;
    color: var(--text-secondary, #94a3b8);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.doc-view-tab:hover {
    color: var(--text-primary, #ffffff);
}

.doc-view-tab.active {
    background: var(--accent-cyan, #00d4ff);
    color: #000000;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 212, 255, 0.35);
}

/* ── Body Work Area & Multiple Viewports ── */
.doc-body-area {
    display: flex;
    width: 100%;
    position: relative;
    min-height: 520px;
    background: var(--bg-primary, #050811);
}

/* 1. Visual Mode (Default): Sheet visible, textarea hidden */
.doc-body-area.view-visual .doc-sheet-wrapper {
    display: flex;
    width: 100%;
}
.doc-body-area.view-visual .doc-textarea {
    display: none;
}

/* 2. Split Mode: Side-by-side */
.doc-body-area.view-split .doc-sheet-wrapper {
    display: flex;
    width: 50%;
    border-left: 1px solid var(--border-color, rgba(255, 255, 255, 0.12));
}
.doc-body-area.view-split .doc-textarea {
    display: block;
    width: 50%;
}

/* 3. Source Markdown Mode: Textarea only */
.doc-body-area.view-source .doc-sheet-wrapper {
    display: none;
}
.doc-body-area.view-source .doc-textarea {
    display: block;
    width: 100%;
}

/* 4. Preview Mode: Sheet visible without editing cursor */
.doc-body-area.view-preview .doc-sheet-wrapper {
    display: flex;
    width: 100%;
}
.doc-body-area.view-preview .doc-textarea {
    display: none;
}
.doc-body-area.view-preview .doc-editable-sheet {
    cursor: default;
}

/* ── Raw Markdown Textarea ── */
.doc-textarea {
    width: 100%;
    min-height: 520px;
    padding: 2rem 2.25rem;
    font-family: var(--font-mono, Consolas, Monaco, "Courier New", Courier, monospace);
    font-size: 1rem;
    line-height: 1.85;
    color: var(--text-primary, #ffffff);
    background: #000000;
    border: none;
    outline: none;
    resize: vertical;
    tab-size: 4;
    box-sizing: border-box;
    white-space: pre-wrap;
    word-break: break-word;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ── Word Document Paper Canvas Wrapper ── */
.doc-sheet-wrapper {
    width: 100%;
    min-height: 520px;
    padding: 2rem 1.5rem;
    overflow-y: auto;
    background: #000000;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.doc-page-canvas {
    width: 100%;
    max-width: 880px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.doc-page-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 0.8rem;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    user-select: none;
}

.doc-page-title-pill {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--accent-cyan, #00d4ff);
}

.doc-page-ruler-marks {
    display: flex;
    gap: 12px;
}

.doc-page-ruler-marks span {
    width: 8px;
    height: 3px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

/* ── The Realistic Word Document Sheet ── */
.doc-sheet {
    width: 100%;
    min-height: 480px;
    background: #000000;
    color: #ffffff;
    padding: 3rem 3.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6);
    font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
    font-size: 1.08rem;
    line-height: 1.85;
    word-break: break-word;
    outline: none;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.doc-sheet[contenteditable="true"]:empty:before {
    content: attr(data-placeholder);
    color: #64748b;
    pointer-events: none;
    display: block;
    font-style: italic;
}

/* ═════════════════════════════════════════════════════════════════════════
   DOCUMENT FORMATTING & DISTINCT LINE SEPARATION STANDARDS
   ═════════════════════════════════════════════════════════════════════════ */

/* 1. Paragraphs: distinct separation between lines & blocks */
.doc-sheet p,
.post-body p {
    margin: 0 0 1.5rem 0;
    line-height: 1.85;
    color: inherit;
}

.doc-sheet p:last-child,
.post-body p:last-child {
    margin-bottom: 0;
}

/* 2. Titles and Subtitles */
.doc-sheet h1,
.post-body h1 {
    font-size: 2.15rem;
    font-weight: 800;
    line-height: 1.28;
    letter-spacing: -0.025em;
    margin: 2.75rem 0 1.35rem 0;
    color: inherit;
    border-bottom: 2px solid var(--border-color, rgba(255, 255, 255, 0.14));
    padding-bottom: 0.65rem;
}

.doc-sheet h1:first-child,
.post-body h1:first-child {
    margin-top: 0;
}

.doc-sheet h2,
.post-body h2 {
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1.32;
    letter-spacing: -0.015em;
    margin: 2.25rem 0 1.15rem 0;
    color: inherit;
    border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    padding-bottom: 0.45rem;
}

.doc-sheet h3,
.post-body h3 {
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.38;
    margin: 1.85rem 0 0.9rem 0;
    color: inherit;
}

.doc-sheet h4,
.post-body h4 {
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.45;
    margin: 1.5rem 0 0.75rem 0;
    color: inherit;
}

/* 3. Lists: Distinct Line Spacing and Indentation for ul, ol, and numbered items */
.doc-sheet ul,
.doc-sheet ol,
.post-body ul,
.post-body ol {
    margin: 1.25rem 0 1.6rem 0;
    padding-left: 2.25rem;
    color: inherit;
}

.doc-sheet li,
.post-body li {
    margin-bottom: 0.75rem;
    line-height: 1.8;
    color: inherit;
    position: relative;
}

.doc-sheet li:last-child,
.post-body li:last-child {
    margin-bottom: 0;
}

/* Bullet list hierarchy */
.doc-sheet ul > li,
.post-body ul > li {
    list-style-type: disc;
}

.doc-sheet ul ul > li,
.post-body ul ul > li {
    list-style-type: circle;
}

.doc-sheet ul ul ul > li,
.post-body ul ul ul > li {
    list-style-type: square;
}

/* Numbered list hierarchy */
.doc-sheet ol > li,
.post-body ol > li {
    list-style-type: decimal;
}

.doc-sheet ol ol > li,
.post-body ol ol > li {
    list-style-type: lower-alpha;
}

.doc-sheet ol ol ol > li,
.post-body ol ol ol > li {
    list-style-type: lower-roman;
}

.doc-sheet li > ul,
.doc-sheet li > ol,
.post-body li > ul,
.post-body li > ol {
    margin: 0.5rem 0 0.5rem 0;
    padding-left: 1.75rem;
}

/* Checklists / Task lists */
.doc-sheet ul.task-list,
.post-body ul.task-list {
    list-style: none;
    padding-left: 0.5rem;
}

.doc-sheet li.task-list-item,
.post-body li.task-list-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
}

.doc-sheet li.task-list-item input[type="checkbox"],
.post-body li.task-list-item input[type="checkbox"] {
    margin: 0;
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--accent-cyan, #00d4ff);
}

/* 4. Bold & Underline Typography Standards */
.doc-sheet strong,
.doc-sheet b,
.post-body strong,
.post-body b {
    font-weight: 700 !important;
    color: inherit;
}

.doc-sheet u,
.doc-sheet ins,
.post-body u,
.post-body ins {
    text-decoration: underline !important;
    text-underline-offset: 3.5px !important;
    text-decoration-thickness: 1.5px !important;
    text-decoration-color: currentColor !important;
}

.doc-sheet em,
.doc-sheet i,
.post-body em,
.post-body i {
    font-style: italic;
    color: inherit;
}

.doc-sheet s,
.doc-sheet del,
.doc-sheet strike,
.post-body s,
.post-body del,
.post-body strike {
    text-decoration: line-through;
    opacity: 0.75;
}

/* 5. Highlight / Marker */
.doc-sheet mark,
.post-body mark {
    background-color: rgba(250, 204, 21, 0.3);
    color: #fde047;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-weight: 500;
}

/* 6. Blockquotes: Word Callout Formatting */
.doc-sheet blockquote,
.post-body blockquote {
    border-left: 4px solid var(--accent-cyan, #00d4ff);
    background: #0b0f17;
    padding: 1.1rem 1.6rem;
    margin: 1.75rem 0;
    border-radius: 0 var(--radius-sm, 6px) var(--radius-sm, 6px) 0;
    font-style: italic;
    color: inherit;
    box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.3);
}

.doc-sheet blockquote p,
.post-body blockquote p {
    margin-bottom: 0;
    color: inherit;
}

/* 7. Horizontal Rule / Divider */
.doc-sheet hr,
.post-body hr {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border-color, rgba(255, 255, 255, 0.2)), transparent);
    margin: 2.75rem 0;
}

/* 8. Word Document Tables */
.doc-sheet table,
.post-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.98rem;
    color: inherit;
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.15));
    border-radius: 6px;
    overflow: hidden;
}

.doc-sheet th,
.doc-sheet td,
.post-body th,
.post-body td {
    padding: 0.85rem 1.15rem;
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.15));
    text-align: left;
    color: inherit;
}

.doc-sheet th,
.post-body th {
    background-color: var(--bg-tertiary, #0f172a);
    font-weight: 700;
    letter-spacing: 0.01em;
}

.doc-sheet tr:nth-child(even),
.post-body tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.025);
}

/* 9. Code Formatting */
.doc-sheet code,
.post-body code {
    font-family: var(--font-mono, Consolas, Monaco, "Courier New", Courier, monospace);
    font-size: 0.88em;
    background-color: #161b22;
    padding: 0.2rem 0.45rem;
    border-radius: 4px;
    color: #38bdf8;
}

.doc-sheet pre,
.post-body pre {
    background-color: #0d1117 !important;
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.15));
    border-radius: var(--radius-md, 8px);
    margin: 1.75rem 0;
    padding: 1.35rem;
    overflow-x: auto;
}

.doc-sheet pre code,
.post-body pre code {
    background-color: transparent;
    padding: 0;
    font-size: 0.92rem;
    color: #e2e8f0;
    display: block;
}

/* ── Status Bar & Live Spellcheck Indicator ── */
.doc-statusbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 0.45rem 1rem;
    background: var(--bg-tertiary, #0d111a);
    border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    font-size: 0.78rem;
    color: var(--text-muted, #94a3b8);
    user-select: none;
    gap: 0.5rem;
}

.doc-statusbar-stats {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.doc-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.doc-stat-val {
    font-weight: 700;
    color: var(--text-primary, #ffffff);
}

.doc-statusbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.doc-mode-indicator {
    font-size: 0.75rem;
    color: var(--accent-cyan, #00d4ff);
    font-weight: 600;
}

.doc-spellcheck-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #10b981;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid rgba(16, 185, 129, 0.25);
    background: rgba(16, 185, 129, 0.1);
    transition: all 0.2s ease;
}

.doc-spellcheck-indicator.disabled {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.25);
    background: rgba(239, 68, 68, 0.1);
}

/* ═════════════════════════════════════════════════════════════════════════
   Day Light Mode Overrides (Pure White Background & Pure Black Text)
   ═════════════════════════════════════════════════════════════════════════ */
[data-theme="light"] .doc-editor-container,
[data-time-phase="day"]:not([data-theme="dark"]):not([data-theme="midnight"]) .doc-editor-container {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .doc-toolbar,
[data-theme="light"] .doc-statusbar,
[data-time-phase="day"]:not([data-theme="dark"]):not([data-theme="midnight"]) .doc-toolbar,
[data-time-phase="day"]:not([data-theme="dark"]):not([data-theme="midnight"]) .doc-statusbar {
    background: #f8fafc !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
    color: #475569 !important;
}

[data-theme="light"] .doc-heading-select,
[data-time-phase="day"]:not([data-theme="dark"]):not([data-theme="midnight"]) .doc-heading-select {
    background: #ffffff !important;
    color: #0f172a !important;
    border-color: rgba(0, 0, 0, 0.18) !important;
}

[data-theme="light"] .doc-tool-btn,
[data-time-phase="day"]:not([data-theme="dark"]):not([data-theme="midnight"]) .doc-tool-btn {
    color: #334155 !important;
}

[data-theme="light"] .doc-tool-btn:hover,
[data-time-phase="day"]:not([data-theme="dark"]):not([data-theme="midnight"]) .doc-tool-btn:hover {
    background: rgba(2, 132, 199, 0.12) !important;
    color: #0284c7 !important;
    border-color: rgba(2, 132, 199, 0.25) !important;
}

[data-theme="light"] .doc-toolbar-group,
[data-time-phase="day"]:not([data-theme="dark"]):not([data-theme="midnight"]) .doc-toolbar-group {
    background: #f1f5f9 !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .doc-view-tabs,
[data-time-phase="day"]:not([data-theme="dark"]):not([data-theme="midnight"]) .doc-view-tabs {
    background: #e2e8f0 !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] .doc-view-tab,
[data-time-phase="day"]:not([data-theme="dark"]):not([data-theme="midnight"]) .doc-view-tab {
    color: #475569 !important;
}

[data-theme="light"] .doc-view-tab.active,
[data-time-phase="day"]:not([data-theme="dark"]):not([data-theme="midnight"]) .doc-view-tab.active {
    background: #0284c7 !important;
    color: #ffffff !important;
}

/* Day Light Mode Textarea & Paper Sheet */
[data-theme="light"] .doc-textarea,
[data-time-phase="day"]:not([data-theme="dark"]):not([data-theme="midnight"]) .doc-textarea {
    background-color: #ffffff !important;
    color: #000000 !important;
    caret-color: #000000 !important;
}

[data-theme="light"] .doc-sheet-wrapper,
[data-time-phase="day"]:not([data-theme="dark"]):not([data-theme="midnight"]) .doc-sheet-wrapper {
    background: #f1f5f9 !important;
}

[data-theme="light"] .doc-page-header-bar,
[data-time-phase="day"]:not([data-theme="dark"]):not([data-theme="midnight"]) .doc-page-header-bar {
    background: #e2e8f0 !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .doc-page-title-pill,
[data-time-phase="day"]:not([data-theme="dark"]):not([data-theme="midnight"]) .doc-page-title-pill {
    color: #0284c7 !important;
}

[data-theme="light"] .doc-sheet,
[data-time-phase="day"]:not([data-theme="dark"]):not([data-theme="midnight"]) .doc-sheet {
    background: #ffffff !important;
    color: #000000 !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .doc-sheet p,
[data-theme="light"] .doc-sheet li,
[data-theme="light"] .doc-sheet h1,
[data-theme="light"] .doc-sheet h2,
[data-theme="light"] .doc-sheet h3,
[data-theme="light"] .doc-sheet h4,
[data-theme="light"] .doc-sheet table,
[data-theme="light"] .doc-sheet td,
[data-theme="light"] .doc-sheet th,
[data-time-phase="day"]:not([data-theme="dark"]):not([data-theme="midnight"]) .doc-sheet p,
[data-time-phase="day"]:not([data-theme="dark"]):not([data-theme="midnight"]) .doc-sheet li,
[data-time-phase="day"]:not([data-theme="dark"]):not([data-theme="midnight"]) .doc-sheet h1,
[data-time-phase="day"]:not([data-theme="dark"]):not([data-theme="midnight"]) .doc-sheet h2,
[data-time-phase="day"]:not([data-theme="dark"]):not([data-theme="midnight"]) .doc-sheet h3,
[data-time-phase="day"]:not([data-theme="dark"]):not([data-theme="midnight"]) .doc-sheet h4,
[data-time-phase="day"]:not([data-theme="dark"]):not([data-theme="midnight"]) .doc-sheet table,
[data-time-phase="day"]:not([data-theme="dark"]):not([data-theme="midnight"]) .doc-sheet td,
[data-time-phase="day"]:not([data-theme="dark"]):not([data-theme="midnight"]) .doc-sheet th {
    color: #000000 !important;
}

[data-theme="light"] .doc-sheet h1,
[data-theme="light"] .doc-sheet h2,
[data-time-phase="day"]:not([data-theme="dark"]):not([data-theme="midnight"]) .doc-sheet h1,
[data-time-phase="day"]:not([data-theme="dark"]):not([data-theme="midnight"]) .doc-sheet h2 {
    border-color: rgba(0, 0, 0, 0.12) !important;
}

[data-theme="light"] .doc-sheet blockquote,
[data-time-phase="day"]:not([data-theme="dark"]):not([data-theme="midnight"]) .doc-sheet blockquote {
    background-color: #f8fafc !important;
    border-left-color: #0284c7 !important;
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.03) !important;
}

[data-theme="light"] .doc-sheet table,
[data-theme="light"] .doc-sheet th,
[data-theme="light"] .doc-sheet td,
[data-time-phase="day"]:not([data-theme="dark"]):not([data-theme="midnight"]) .doc-sheet table,
[data-time-phase="day"]:not([data-theme="dark"]):not([data-theme="midnight"]) .doc-sheet th,
[data-time-phase="day"]:not([data-theme="dark"]):not([data-theme="midnight"]) .doc-sheet td {
    border-color: rgba(0, 0, 0, 0.15) !important;
}

[data-theme="light"] .doc-sheet th,
[data-time-phase="day"]:not([data-theme="dark"]):not([data-theme="midnight"]) .doc-sheet th {
    background-color: #f1f5f9 !important;
}

[data-theme="light"] .doc-sheet tr:nth-child(even),
[data-time-phase="day"]:not([data-theme="dark"]):not([data-theme="midnight"]) .doc-sheet tr:nth-child(even) {
    background-color: #f8fafc !important;
}

[data-theme="light"] .doc-sheet mark,
[data-time-phase="day"]:not([data-theme="dark"]):not([data-theme="midnight"]) .doc-sheet mark {
    background-color: #fef08a !important;
    color: #713f12 !important;
}

[data-theme="light"] .doc-stat-val,
[data-time-phase="day"]:not([data-theme="dark"]):not([data-theme="midnight"]) .doc-stat-val {
    color: #0f172a !important;
}

[data-theme="light"] .doc-mode-indicator,
[data-time-phase="day"]:not([data-theme="dark"]):not([data-theme="midnight"]) .doc-mode-indicator {
    color: #0284c7 !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .doc-sheet {
        padding: 1.75rem 1.25rem;
    }
    .doc-body-area.view-split {
        flex-direction: column;
    }
    .doc-body-area.view-split .doc-textarea,
    .doc-body-area.view-split .doc-sheet-wrapper {
        width: 100%;
        min-height: 280px;
    }
}
