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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #faf9f7;
    min-height: 100vh;
    color: #2d3748;
}

/* Keep serif font for headings and specific elements */
h1, h2, h3, h4, h5, h6,
.project-selector h1,
.project-title {
    font-family: 'Crimson Text', 'Charter', 'Georgia', 'Times New Roman', serif;
}

.editor-textarea,
#richEditor {
    font-family: 'Crimson Text', 'Charter', 'Georgia', 'Times New Roman', serif;
}

.header {
    background: #fffffe;
    border-bottom: 1px solid #e2e8f0;
    padding: 16px 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

kbd {
    background-color: #f1f3f4;
    border: 1px solid #c1c7cd;
    border-radius: 3px;
    box-shadow: 0 1px 1px rgba(0,0,0,.2), 0 2px 0 0 rgba(255,255,255,.7) inset;
    color: #202124;
    display: inline-block;
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
    padding: 2px 4px;
    white-space: nowrap;
    font-family: monospace;
}

.modal-content table {
    border-collapse: collapse;
}

.modal-content table td {
    padding: 4px 8px;
    border-bottom: 1px solid #f3f4f6;
}

.modal-content table td:first-child {
    font-family: monospace;
    font-weight: 500;
}

.project-selector {
    display: flex;
    align-items: center;
    gap: 16px;
}

.project-selector h1 {
    font-size: 20px;
    font-weight: 600;
    color: #171717;
}

.project-selector select {
    padding: 8px 20px 8px 12px;
    border: 1px solid #d4d4d4;
    border-radius: 2px;
    background: #ffffff;
    min-width: 200px;
    font-size: 14px;
}

.project-overview {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px 20px 20px;
    display: none;
}

.overview-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 20px;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.global-tasks-panel {
    background: #fffffe;
    border: 1px solid #e5e5e5;
    border-radius: 2px;
    padding: 20px;
    max-height: 80vh;
    overflow-y: auto;
    position: sticky;
    top: 20px;
}

.global-tasks-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e5e5;
}

.global-tasks-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #171717;
}

.top-three-section {
    margin-bottom: 24px;
    padding: 16px;
    background: #f9f8f6;
    border-radius: 2px;
    border-left: 3px solid #171717;
}

.top-three-header {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #171717;
}

.global-task-item {
    transition: all 0.2s ease;
}

.global-task-item:hover {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.global-task-item.dragging {
    opacity: 0.5;
    transform: rotate(2deg) scale(0.95);
    z-index: 1000;
}

.global-task-project {
    display: inline-block;
    background: #f5f5f5;
    color: #525252;
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 10px;
    font-weight: 500;
    margin-right: 8px;
}

/* Project theme colors for global task project indicators */
.global-task-project.project-theme-blue { background: #dbeafe; color: #1e40af; }
.global-task-project.project-theme-green { background: #dcfce7; color: #16a34a; }
.global-task-project.project-theme-purple { background: #f3e8ff; color: #7c3aed; }
.global-task-project.project-theme-pink { background: #fce7f3; color: #be185d; }
.global-task-project.project-theme-orange { background: #fed7aa; color: #c2410c; }
.global-task-project.project-theme-teal { background: #ccfbf1; color: #0f766e; }
.global-task-project.project-theme-indigo { background: #e0e7ff; color: #4338ca; }
.global-task-project.project-theme-red { background: #fee2e2; color: #dc2626; }

.task-drop-zone {
    min-height: 60px;
    border: 1px dashed #d4d4d4;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a3a3a3;
    font-size: 12px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.task-drop-zone.drag-over {
    border-color: #374151;
    background: #f8f8f8;
    color: #374151;
}

.other-tasks-section {
    border-top: 1px solid #e5e5e5;
    padding-top: 16px;
}

.other-tasks-header {
    font-size: 12px;
    font-weight: 600;
    color: #737373;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 2px;
    padding: 24px;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e0;
}

.project-title {
    font-size: 18px;
    font-weight: 600;
    color: #171717;
    margin-bottom: 8px;
}

.dashboard {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px 20px 20px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 20px;
    grid-template-areas: 
        "briefs notes copy"
        "tasks notes copy";
}

.panel {
    background: #fffffe;
    border: 1px solid #e2e8f0;
    border-radius: 2px;
    padding: 20px;
    transition: all 0.2s ease;
    min-height: 400px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Varied warm backgrounds for different panel types */
.panel[style*="briefs"] {
    background: #fffffe;
}

.panel[style*="notes"] {
    background: #fffffb;
}

.panel[style*="copy"] {
    background: #fefefe;
}

.panel[style*="tasks"] {
    background: #fffff9;
}

.panel:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e5e5;
}

.panel-header h2 {
    color: #171717;
    font-size: 16px;
    font-weight: 600;
}

.panel-header .icon {
    width: 16px;
    height: 16px;
    color: #737373;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

input, textarea, select {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #d4d4d4;
    border-radius: 2px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: #fffffe;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #374151;
    box-shadow: 0 0 0 1px #374151;
}

textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

button {
    padding: 8px 16px;
    background: #374151;
    color: white;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

button:hover {
    background: #1f2937;
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

.btn-secondary {
    background: #6b7280;
}

.btn-secondary:hover {
    background: #4b5563;
}

.item {
    background: #fffffe;
    border: 1px solid #e5e5e5;
    border-radius: 2px;
    padding: 16px 20px 16px 40px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
    position: relative;
    cursor: grab;
}

.item.task-item {
    padding: 16px 20px 16px 44px !important;
}

.grab-handle {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2px;
    cursor: grab;
    opacity: 0.4;
    transition: opacity 0.2s ease;
}

.grab-handle:hover {
    opacity: 0.8;
}

.grab-handle {
    background: 
        radial-gradient(circle, #a3a3a3 1px, transparent 1px),
        radial-gradient(circle, #a3a3a3 1px, transparent 1px),
        radial-gradient(circle, #a3a3a3 1px, transparent 1px);
    background-size: 4px 4px;
    background-position: 
        0 0,
        0 6px,
        0 12px;
    background-repeat: no-repeat;
    width: 4px;
    height: 16px;
}

.item:hover {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.item:active {
    cursor: grabbing;
}

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

.item-title {
    font-weight: 600;
    color: #171717;
    flex: 1;
}

.item-meta {
    font-size: 12px;
    color: #737373;
    margin-bottom: 8px;
}

.item-type {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    background: #f5f5f5;
    color: #525252;
}

.brief-item { border-left: 3px solid #3b82f6; }
.note-item { border-left: 3px solid #f59e0b; }
.copy-item { border-left: 3px solid #8b5cf6; }
.task-item { border-left: 3px solid #10b981; }

.brief-item.linked { background: #f9f8f6; }
.note-item.linked { background: #f9f8f6; }
.copy-item.linked { background: #f9f8f6; }

.drop-zone-mini {
    min-height: 40px;
    border: 1px dashed #d4d4d4;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a3a3a3;
    font-size: 12px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
    background: #faf9f7;
}

.drop-zone-mini.drag-over {
    border-color: #374151;
    background: #f8f8f8;
    color: #374151;
}

.item.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
}

.scrollable {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 8px;
}

.panel-notes,
.panel-copy {
    min-height: 820px;
}

.panel-notes .scrollable,
.panel-copy .scrollable {
    max-height: 720px;
}

.scrollable::-webkit-scrollbar {
    width: 6px;
}

.scrollable::-webkit-scrollbar-track {
    background: #f8f8f8;
    border-radius: 3px;
}

.scrollable::-webkit-scrollbar-thumb {
    background: #d4d4d4;
    border-radius: 3px;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    border-radius: 2px;
    padding: 28px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid #e2e8f0;
}

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

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.modal-actions button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    background: #3b82f6;
    color: white;
}

.modal-actions button:hover {
    background: #2563eb;
}

.close-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #737373;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #374151;
}

/* Rich text editor styles */
.rich-text-editor {
    min-height: 200px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 12px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    background: white;
    resize: vertical;
    overflow-y: auto;
}

.rich-text-editor:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.rich-text-editor:empty:before {
    content: attr(placeholder);
    color: #9ca3af;
    font-style: italic;
}

/* Rich text content styling */
.rich-text-editor h1, .rich-text-editor h2, .rich-text-editor h3 {
    margin: 16px 0 8px 0;
    font-weight: 600;
}

.rich-text-editor h1 { font-size: 1.5em; }
.rich-text-editor h2 { font-size: 1.3em; }
.rich-text-editor h3 { font-size: 1.1em; }

.rich-text-editor p {
    margin: 8px 0;
}

.rich-text-editor ul, .rich-text-editor ol {
    margin: 8px 0;
    padding-left: 24px;
}

.rich-text-editor li {
    margin: 4px 0;
}

.rich-text-editor strong {
    font-weight: 600;
}

.rich-text-editor em {
    font-style: italic;
}

.rich-text-editor blockquote {
    border-left: 4px solid #d1d5db;
    padding-left: 12px;
    margin: 12px 0;
    color: #6b7280;
    font-style: italic;
}

.rich-text-editor a {
    color: #3b82f6;
    text-decoration: underline;
}

/* Form group styling */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #374151;
}

.form-group input[type="text"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    background: white;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

/* Document upload zone styles */
.document-upload-zone {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 10px;
    text-align: center;
    color: #6b7280;
    background: #f9fafb;
    cursor: pointer;
    transition: all 0.2s ease;
}

.document-upload-zone:hover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.project-import-zone {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 30px;
    margin: 20px 0;
    text-align: center;
    color: #6b7280;
    background: #f9fafb;
    cursor: pointer;
    transition: all 0.2s ease;
}

.project-import-zone:hover {
    border-color: #3b82f6;
    background: #eff6ff;
}

/* Editor Modal Styles */
.editor-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1500;
}

.editor-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    border-radius: 2px;
    padding: 28px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    border: 1px solid #e2e8f0;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: -24px -24px 20px -24px;
    padding: 20px 24px 12px 24px;
    border-bottom: 1px solid #e5e5e5;
    flex-wrap: nowrap;
    gap: 12px;
    background: #ffffff;
    border-radius: 2px 2px 0 0;
}

.editor-header.pomodoro-active {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.editor-header.pomodoro-break {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.editor-header h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.editor-header.pomodoro-active h3,
.editor-header.pomodoro-break h3 {
    color: white;
}

.editor-header.pomodoro-active .close-btn,
.editor-header.pomodoro-break .close-btn {
    color: white;
}

.editor-header.pomodoro-active .close-btn:hover,
.editor-header.pomodoro-break .close-btn:hover {
    color: rgba(255, 255, 255, 0.8);
}

.editor-toolbar {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    padding: 8px;
    background: #f9f8f6;
    border-radius: 2px;
    flex-wrap: wrap;
}

.editor-toolbar button {
    padding: 4px 8px;
    font-size: 12px;
    background: #ffffff;
    color: #525252;
    border: 1px solid #e5e5e5;
    border-radius: 2px;
    min-width: auto;
}

.editor-toolbar button:hover {
    background: #f8f8f8;
    transform: none;
    box-shadow: none;
}

.editor-textarea {
    width: 100%;
    min-height: 300px;
    padding: 16px;
    border: 1px solid #d4d4d4;
    border-radius: 2px;
    font-family: 'Crimson Text', 'Charter', 'Georgia', 'Times New Roman', serif;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    background: #ffffff;
}

.editor-textarea,
#richEditor {
    width: 100%;
    min-height: 300px;
    max-height: 500px;
    padding: 16px;
    border: 1px solid #d4d4d4;
    border-radius: 2px;
    font-family: 'Crimson Text', 'Charter', 'Georgia', 'Times New Roman', serif;
    font-size: 14px;
    line-height: 1.6;
    background: #ffffff;
    overflow-y: auto;
}

#richEditor::-webkit-scrollbar {
    width: 8px;
}

#richEditor::-webkit-scrollbar-track {
    background: #f8f8f8;
    border-radius: 4px;
}

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

#richEditor::-webkit-scrollbar-thumb:hover {
    background: #a3a3a3;
}

#richEditor:focus {
    outline: none;
    border-color: #374151;
}

.delete-btn {
    background: #dc2626;
    padding: 4px 8px;
    font-size: 11px;
    margin-left: 8px;
    min-width: auto;
    border-radius: 2px;
    transition: all 0.2s ease;
}

.delete-btn:hover {
    background: #b91c1c;
    transform: translateY(-1px);
}

.item-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    align-items: center;
}

.project-task-item {
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 2px;
    margin-bottom: 12px;
    padding: 0px;
    position: relative;
    cursor: grab;
    transition: all 0.2s ease;
}

/* Add extra space above the checkbox and title row in tasks */
.project-task-item > div:nth-child(2) {
    margin-top: 8px;
}

.task-completed {
    opacity: 0.6;
    text-decoration: line-through;
}

.task-item {
    border-left: 3px solid #10b981;
    padding: 16px 16px 16px 8px;
}

.task-item .item-header {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
    margin-left: 0;
    margin-top: 4px;
}

.task-item .task-checkbox {
    margin: 0;
    padding: 0;
    cursor: pointer;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-top: 2px;
    margin-left: 0;
}

.task-item .item-title {
    font-weight: 600;
    color: #171717;
    flex: 1;
    margin: 0;
    line-height: 1.4;
    padding: 0;
    word-wrap: break-word;
    font-size: 14px;
}

.task-source-link {
    font-size: 11px;
    color: #171717;
    cursor: pointer;
    text-decoration: underline;
    margin-left: auto;
    flex-shrink: 0;
    padding: 2px 4px;
    border-radius: 2px;
    transition: background-color 0.2s;
}

.task-source-link:hover {
    background-color: #f5f5f5;
}

.archive-btn {
    background: #6b7280;
    padding: 6px 12px;
    font-size: 11px;
    margin-left: 8px;
    border-radius: 2px;
}

.archive-btn:hover {
    background: #4b5563;
}

/* Pomodoro Timer Styles */
.pomodoro-timer {
    background: #374151;
    border-radius: 2px;
    padding: 10px 14px;
    color: white;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    font-size: 12px;
    border: 1px solid #4b5563;
    transition: all 0.2s ease;
}

/* Override when in colored header modes */
.editor-header.pomodoro-active .pomodoro-timer,
.editor-header.pomodoro-break .pomodoro-timer {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.pomodoro-display {
    font-size: 14px;
    font-weight: 600;
    font-family: 'Monaco', 'Menlo', monospace;
    min-width: 50px;
}

.pomodoro-status {
    font-size: 10px;
    opacity: 0.9;
    font-weight: 500;
    min-width: 100px;
    white-space: nowrap;
}

.pomodoro-controls {
    display: flex;
    gap: 4px;
    align-items: center;
}

.pomodoro-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #374151;
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 9px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.pomodoro-btn:hover {
    background: rgba(255, 255, 255, 1);
}

/* Override when in colored header modes */
.editor-header.pomodoro-active .pomodoro-btn,
.editor-header.pomodoro-break .pomodoro-btn {
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
}

.editor-header.pomodoro-active .pomodoro-btn:hover,
.editor-header.pomodoro-break .pomodoro-btn:hover {
    background: rgba(255, 255, 255, 0.4);
}

.pomodoro-stats {
    display: flex;
    gap: 8px;
    font-size: 8px;
    opacity: 0.9;
}

/* True fullscreen mode for focus sessions */
.editor-modal.true-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 9999 !important;
    background: rgba(0, 0, 0, 0.98) !important;
}

.editor-modal.true-fullscreen .editor-content {
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    transform: none !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 40px !important;
    border-radius: 0 !important;
    background: #1a1a1a !important;
    color: #e5e5e5 !important;
    overflow-y: auto !important;
}

.editor-modal.true-fullscreen .editor-textarea,
.editor-modal.true-fullscreen #richEditor {
    background: #262626 !important;
    color: #e5e5e5 !important;
    border: 1px solid #404040 !important;
    min-height: 60vh !important;
    font-size: 18px !important;
    line-height: 1.8 !important;
    padding: 24px !important;
}

.editor-modal.true-fullscreen .editor-header h3,
.editor-modal.true-fullscreen label {
    color: #e5e5e5 !important;
}

.editor-modal.true-fullscreen #editorItemTitle {
    background: #262626 !important;
    color: #e5e5e5 !important;
    border: 1px solid #404040 !important;
    font-size: 16px !important;
    padding: 8px 20px 8px 12px !important;
}

.editor-modal.true-fullscreen .close-btn {
    color: #e5e5e5 !important;
    font-size: 24px !important;
}

.fullscreen-overlay {
    position: fixed;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 12px;
    border-radius: 2px;
    font-size: 12px;
    z-index: 10000;
}

/* Enhanced Drag and Drop Styles */
.draggable-item {
    cursor: grab;
}

.draggable-item:active {
    cursor: grabbing;
}

.dragging {
    opacity: 0.5;
    transform: rotate(2deg) scale(0.95);
    z-index: 1000;
}

.drop-zone {
    position: relative;
    min-height: 100px;
    transition: all 0.2s ease;
}

.drop-zone.drag-over {
    background: #f8f8f8;
    border: 1px dashed #374151;
    border-radius: 2px;
}

.drop-zone.drag-over::after {
    content: attr(data-drop-message);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #374151;
    color: white;
    padding: 8px 16px;
    border-radius: 2px;
    font-size: 14px;
    font-weight: 500;
    pointer-events: none;
    z-index: 10;
    white-space: nowrap;
}

/* Notification styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #374151;
    color: white;
    padding: 14px 18px;
    border-radius: 2px;
    font-size: 14px;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transform: translateX(400px);
    transition: all 0.4s ease;
    border: 1px solid #4b5563;
}

.notification.show {
    transform: translateX(0);
}

/* Remove link color indicators - use border instead */
.linked-item {
    position: relative;
}

/* Sortable drag and drop styles */
.sortable-item {
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.sortable-item.dragging {
    opacity: 0.5;
    transform: rotate(2deg) scale(0.95);
    z-index: 1000;
}

.sortable-item.drag-over {
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.sort-placeholder {
    height: 4px;
    background: #374151;
    border-radius: 2px;
    margin: 4px 0;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.sort-placeholder.active {
    opacity: 1;
}

/* Project Color Themes - only essential colors */
.project-theme-blue { 
    --primary: #3b82f6; 
    --secondary: #f8fafc; 
    --accent: #2563eb;
}
.project-theme-green { 
    --primary: #10b981; 
    --secondary: #f8fafc; 
    --accent: #059669;
}
.project-theme-purple { 
    --primary: #8b5cf6; 
    --secondary: #f8fafc; 
    --accent: #7c3aed;
}
.project-theme-pink { 
    --primary: #ec4899; 
    --secondary: #f8fafc; 
    --accent: #db2777;
}
.project-theme-orange { 
    --primary: #f97316; 
    --secondary: #f8fafc; 
    --accent: #ea580c;
}
.project-theme-teal { 
    --primary: #14b8a6; 
    --secondary: #f8fafc; 
    --accent: #0d9488;
}
.project-theme-indigo { 
    --primary: #6366f1; 
    --secondary: #f8fafc; 
    --accent: #4f46e5;
}
.project-theme-red { 
    --primary: #ef4444; 
    --secondary: #f8fafc; 
    --accent: #dc2626;
}

.project-themed {
    border-left: 4px solid var(--primary);
    background: var(--secondary);
}

.project-themed .panel-header .icon {
    color: var(--accent);
}

.project-themed .project-title {
    color: var(--accent);
}

.archived-project {
    opacity: 0.6;
    filter: grayscale(50%);
}

.archived-project .project-title::after {
    content: " (Archived)";
    font-size: 0.8em;
    color: #737373;
    font-weight: normal;
}

/* Breadcrumb Trail Styles - Narrowed and darker */
.breadcrumb-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px 8px;
    margin-bottom: 0px;
    border-bottom: 1px solid #e2e8f0;
    background: #f7f6f4;
}

.breadcrumb-trail {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    font-size: 12px;
    color: #737373;
    overflow-x: auto;
    white-space: nowrap;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 2px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.breadcrumb-item:hover {
    background: #e5e5e5;
    color: #374151;
}

.breadcrumb-item.current {
    color: #374151;
    font-weight: 600;
    background: #e5e5e5;
}

.breadcrumb-separator {
    color: #d4d4d4;
    font-size: 10px;
    flex-shrink: 0;
}

.breadcrumb-clear {
    margin-left: auto;
    background: #e5e5e5;
    border: none;
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 10px;
    cursor: pointer;
    color: #737373;
    flex-shrink: 0;
}

.breadcrumb-clear:hover {
    background: #d4d4d4;
    color: #374151;
}

/* Context restoration indicator */
.context-indicator {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: #374151;
    color: white;
    padding: 6px 12px;
    border-radius: 2px;
    font-size: 12px;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.context-indicator.show {
    opacity: 1;
}

.context-indicator.success {
    background: #16a34a;
}

/* Resume work panel */
.resume-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 2px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 300px;
    z-index: 1000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
}

.resume-panel.show {
    transform: translateY(0);
    opacity: 1;
}

.resume-panel h4 {
    margin: 0 0 8px 0;
    color: #171717;
    font-size: 14px;
}

.resume-panel p {
    margin: 0 0 12px 0;
    color: #737373;
    font-size: 12px;
    line-height: 1.4;
}

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

.resume-panel button {
    flex: 1;
    padding: 6px 12px;
    font-size: 12px;
}

/* Default panel borders - used when not in project context */
.panel[style*="briefs"] {
    background: #fffffe;
    border-left: 2px solid #3b82f6;
}

.panel[style*="notes"] {
    background: #fffffb;
    border-left: 2px solid #f59e0b;
}

.panel[style*="copy"] {
    background: #fefefe;
    border-left: 2px solid #8b5cf6;
}

.panel[style*="tasks"] {
    background: #fffff9;
    border-left: 2px solid #10b981;
}

/* Project-themed panel borders - override default colors when in project context */
.project-themed .panel[style*="briefs"],
.project-themed .panel[style*="notes"],
.project-themed .panel[style*="copy"],
.project-themed .panel[style*="tasks"] {
    border-left: 2px solid var(--primary);
}

/* Alternative approach - add project context class to dashboard */
.dashboard.project-context .panel[style*="briefs"],
.dashboard.project-context .panel[style*="notes"],
.dashboard.project-context .panel[style*="copy"],
.dashboard.project-context .panel[style*="tasks"] {
    border-left: 2px solid var(--primary);
}

/* Top Tasks Horizontal Row */
.top-tasks-row {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    gap: 16px;
    background: #faf9f7;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 20px;
}

.top-task-item {
    flex: 1;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-left: 3px solid #10b981;
    border-radius: 2px;
    padding: 8px 32px 8px 12px;
    min-height: 45px;
    cursor: grab;
    transition: all 0.2s ease;
    position: relative;
}

.top-task-item:hover {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.top-task-item .task-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    color: #171717;
    margin-bottom: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.top-task-item .task-meta {
    font-size: 10px;
    color: #737373;
    margin-bottom: 0;
    line-height: 1.2;
}

.top-task-item .task-checkbox {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 14px;
    height: 14px;
    cursor: pointer;
}

.top-tasks-drop-zone {
    min-height: 45px;
    border: 1px dashed #d4d4d4;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a3a3a3;
    font-size: 11px;
    background: #faf9f7;
    transition: all 0.2s ease;
    flex: 1;
    text-align: center;
    padding: 8px;
}

.top-tasks-drop-zone::before {
    content: "Drop task here";
    font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 1400px) {
    .dashboard {
        grid-template-columns: 1fr 1fr;
        grid-template-areas: 
            "briefs notes"
            "tasks copy";
    }
    
    .panel-notes,
    .panel-copy {
        min-height: 400px;
    }
    
    .panel-notes .scrollable,
    .panel-copy .scrollable {
        max-height: 300px;
    }

    .overview-layout {
        grid-template-columns: 1fr 350px;
    }
}

@media (max-width: 1000px) {
    .dashboard {
        grid-template-columns: 1fr 1fr;
        grid-template-areas: 
            "briefs notes"
            "tasks copy";
    }
    
    .panel-notes,
    .panel-copy {
        min-height: 400px;
    }
    
    .panel-notes .scrollable,
    .panel-copy .scrollable {
        max-height: 300px;
    }

    .overview-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
    }

    .global-tasks-panel {
        position: static;
        max-height: 500px;
        order: -1;
    }
}

@media (max-width: 768px) {
    .dashboard {
        grid-template-columns: 1fr;
        grid-template-areas: 
            "briefs"
            "tasks"
            "notes"
            "copy";
        padding: 10px;
    }
    
    .panel-notes,
    .panel-copy {
        min-height: 400px;
    }
    
    .panel-notes .scrollable,
    .panel-copy .scrollable {
        max-height: 300px;
    }
    
    .header {
        margin: 0;
        margin-bottom: 20px;
        flex-direction: column;
        gap: 16px;
    }

    .overview-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
    }

    .global-tasks-panel {
        position: static;
        max-height: 400px;
        order: -1;
        margin-bottom: 20px;
    }

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