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

.hidden {
    display: none !important;
}

:root {
    --bg: #ffffff;
    --fg: #0a0a0a;
    --border: #e5e5e5;
    --muted: #f5f5f5;
    --muted-fg: #737373;
    --primary: #0a0a0a;
    --primary-fg: #ffffff;
    --destructive: #ef4444;
    --status-done: #22c55e;
    --status-open: #ffe51c;
    --status-planned: #f4f4f4;
    --session-done-bg: #f0fdf4;
    --session-open-bg: #f3e8ff;
    --session-open-border: #c084fc;
    --session-planned-bg: #fff;
    --session-planned-border: #000;
    --status-done-bg: #dcfce7;
    --status-done-fg: #166534;
    --status-open-bg: #e9d5ff;
    --status-open-fg: #6b21a8;
    --status-planned-bg: #f4f4f4;
    --task-timer-bg: rgba(255, 255, 255, 0.8);
    --session-notes-bg: #f9fafb;
    --subtask-bg: rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] {
    --bg: #0a0a0a;
    --fg: #f5f5f5;
    --border: #2a2a2a;
    --muted: #1a1a1a;
    --muted-fg: #a3a3a3;
    --primary: #f5f5f5;
    --primary-fg: #0a0a0a;
    --destructive: #ef4444;
    --status-done: #22c55e;
    --status-open: #ffe51c;
    --status-planned: #2a2a2a;
    --session-done-bg: #0d2818;
    --session-open-bg: #2d1b4e;
    --session-open-border: #8b5cf6;
    --session-planned-bg: #1a1a1a;
    --session-planned-border: #2a2a2a;
    --status-done-bg: #1a3a2a;
    --status-done-fg: #86efac;
    --status-open-bg: #3b2c5f;
    --status-open-fg: #c4b5fd;
    --status-planned-bg: #2a2a2a;
    --task-timer-bg: rgba(26, 26, 26, 0.8);
    --session-notes-bg: #1a1a1a;
    --subtask-bg: rgba(26, 26, 26, 0.8);
}

/* Dark mode input text colors */
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
    color: var(--fg);
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: var(--muted-fg);
}

[data-theme="dark"] .session-date,
[data-theme="dark"] .task-timer,
[data-theme="dark"] .task-timer-focus {
    background: var(--task-timer-bg);
    color: var(--fg);
}

[data-theme="dark"] .session-notes-textarea:focus,
[data-theme="dark"] .planning-item-notes:focus,
[data-theme="dark"] .task-modal-notes:focus {
    background: var(--muted);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: var(--bg);
    color: var(--fg);
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

h1 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.025em;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.layout-toggle {
    display: flex;
    gap: 0.25rem;
    background: var(--muted);
    padding: 0.25rem;
    border-radius: 8px;
}

.layout-btn {
    padding: 0.5rem;
    min-width: unset;
    background: transparent;
    border: none;
    color: var(--muted-fg);
    border-radius: 6px;
    transition: all 0.2s;
}

.layout-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--fg);
    transform: none;
    box-shadow: none;
}

.layout-btn.active {
    background: var(--bg);
    color: var(--fg);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.theme-toggle {
    padding: 0.5rem;
    min-width: unset;
    background: var(--muted);
    border: none;
    color: var(--fg);
    border-radius: 8px;
    transition: all 0.2s;
    position: relative;
}

.theme-toggle:hover {
    background: var(--border);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.theme-toggle .sun-icon,
.theme-toggle .moon-icon {
    display: block;
}

[data-theme="dark"] .theme-toggle .sun-icon {
    display: none;
}

[data-theme="dark"] .theme-toggle .moon-icon {
    display: block;
}

.theme-toggle .moon-icon.hidden {
    display: none;
}

.view-tabs {
    display: flex;
    gap: 0.25rem;
    background: var(--muted);
    padding: 0.25rem;
    border-radius: 8px;
}

.tab-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    background: transparent;
    color: var(--muted-fg);
    border-radius: 6px;
    transition: all 0.2s;
}

.tab-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--fg);
    transform: none;
    box-shadow: none;
}

.tab-btn.active {
    background: var(--bg);
    color: var(--fg);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--fg);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

button:hover:not(:disabled) {
    background: var(--border);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary);
    color: var(--primary-fg);
    border-color: var(--primary);
    transition: all 0.1s ease-out;
}

.btn-primary:hover:not(:disabled) {
    background: #1a1a1a;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Grid view layout */
#contentArea.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 500px), 1fr));
    gap: 1rem;
}

#contentArea.grid-view .session,
#contentArea.grid-view .planning-item {
    margin-bottom: 0;
    min-width: 0;
}

#contentArea.grid-view .session-header,
#contentArea.grid-view .planning-item-header {
    flex-wrap: wrap;
}

#contentArea.grid-view .session-title-wrapper,
#contentArea.grid-view .planning-item-title-wrapper {
    min-width: 200px;
    flex: 1 1 100%;
}

#contentArea.grid-view .session-title,
#contentArea.grid-view .planning-item-title {
    min-width: 200px;
    flex: 1 1 auto;
}

.session {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    background: var(--bg);
    transition: all 0.2s;
}

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

.session-done {
    background: var(--session-done-bg);
    border-color: var(--status-done);
}

.session-open {
    background: var(--session-open-bg);
    border-color: var(--session-open-border);
}

.session-planned {
    background: var(--session-planned-bg);
    border-color: var(--session-planned-border);
}

.session-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.drag-handle {
    cursor: grab;
    padding: 0.375rem;
    color: var(--muted-fg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.2s;
}

.drag-handle:hover {
    color: var(--fg);
}

.drag-handle:active {
    cursor: grabbing;
}

.session.dragging,
.planning-item.dragging,
.todo-item-container.dragging,
.focus-todo-container.dragging {
    opacity: 0.5;
}

.session.drag-over,
.planning-item.drag-over,
.todo-item-container.drag-over,
.focus-todo-container.drag-over {
    border-top: 3px solid var(--primary);
}

.btn-collapse {
    padding: 0.25rem 0.375rem;
    min-width: unset;
    flex-shrink: 0;
}

.session-title {
    width: 100%;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    font-family: inherit;
}

.session-title:focus {
    outline: none;
    border-color: var(--border);
    background: rgba(255, 255, 255, 0.8);
}

.session-timer-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.session-timer-display {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    min-width: 100px;
    text-align: center;
    flex-shrink: 0;
}

.btn-session-timer-start,
.btn-session-timer-stop {
    padding: 0.375rem;
    min-width: unset;
}

.session-date {
    width: 100px;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.8);
    font-family: inherit;
    color: var(--muted-fg);
    text-align: center;
    flex-shrink: 0;
}

.session-date:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-archive {
    flex-shrink: 0;
}

.btn-icon {
    padding: 0.5rem;
    min-width: unset;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon svg {
    width: 18px;
    height: 18px;
}

.btn-destructive {
    color: var(--destructive);
    border-color: var(--destructive);
}

.btn-destructive:hover {
    background: var(--destructive);
    color: white;
}

.status-select {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 6px;
    font-family: inherit;
    font-weight: 500;
}

.status-select option {
    font-family: inherit;
}

.status-done {
    background: var(--status-done-bg);
    color: var(--status-done-fg);
    border-color: var(--status-done);
}

.status-open {
    background: var(--status-open-bg);
    color: var(--status-open-fg);
    border-color: var(--session-open-border);
}

.status-planned {
    background: var(--status-planned-bg);
    border-color: var(--status-planned);
}

/* Category select */
.category-select {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 6px;
    font-family: inherit;
    font-weight: 500;
    flex-shrink: 0;
}

.category-select:focus {
    outline: none;
}

/* Category styling - colored select dropdowns */
.category-select.category-client-work {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #3b82f6;
}

.category-select.category-experiment {
    background: #e9d5ff;
    color: #6b21a8;
    border: 1px solid #a855f7;
}

.category-select.category-saas {
    background: #fce7f3;
    color: #9f1239;
    border: 1px solid #ec4899;
}

.category-select.category-ecom {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fbbf24;
}

.category-select.category-internal-admin {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.category-select.category-other {
    background: #e5e7eb;
    color: #374151;
    border: 1px solid #9ca3af;
}

.category-select.category-none {
    background: var(--bg);
    color: var(--fg);
    border: 1px solid var(--border);
}

[data-theme="dark"] .category-select.category-client-work {
    background: #1e3a8a;
    color: #93c5fd;
    border: 1px solid #3b82f6;
}

[data-theme="dark"] .category-select.category-experiment {
    background: #581c87;
    color: #d8b4fe;
    border: 1px solid #a855f7;
}

[data-theme="dark"] .category-select.category-saas {
    background: #831843;
    color: #f9a8d4;
    border: 1px solid #ec4899;
}

[data-theme="dark"] .category-select.category-ecom {
    background: #78350f;
    color: #fcd34d;
    border: 1px solid #fbbf24;
}

[data-theme="dark"] .category-select.category-internal-admin {
    background: #064e3b;
    color: #6ee7b7;
    border: 1px solid #10b981;
}

[data-theme="dark"] .category-select.category-other {
    background: #374151;
    color: #d1d5db;
    border: 1px solid #9ca3af;
}

[data-theme="dark"] .category-select.category-none {
    background: var(--bg);
    color: var(--fg);
    border: 1px solid var(--border);
}

/* Priority select */
.priority-select {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 6px;
    font-family: inherit;
    font-weight: 500;
    flex-shrink: 0;
}

.priority-select:focus {
    outline: none;
}

/* Priority styling - colored select dropdowns */
.priority-select.priority-high {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.priority-select.priority-medium {
    background: #fed7aa;
    color: #92400e;
    border: 1px solid #f59e0b;
}

.priority-select.priority-low {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

[data-theme="dark"] .priority-select.priority-high {
    background: #7f1d1d;
    color: #fca5a5;
    border: 1px solid #ef4444;
}

[data-theme="dark"] .priority-select.priority-medium {
    background: #78350f;
    color: #fcd34d;
    border: 1px solid #f59e0b;
}

[data-theme="dark"] .priority-select.priority-low {
    background: #064e3b;
    color: #6ee7b7;
    border: 1px solid #10b981;
}

/* Session title wrapper with category and notes preview */
.session-title-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 200px;
}

/* Category indicator */
.category-indicator {
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted-fg);
    padding: 0.125rem 0.5rem;
    background: var(--muted);
    border-radius: 4px;
    width: fit-content;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Session notes preview */
.session-notes-preview {
    font-size: 0.75rem;
    color: var(--muted-fg);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-top: 0.125rem;
}

/* Planning view */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--muted-fg);
}

.planning-item {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    background: var(--bg);
    transition: all 0.2s;
}

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

.planning-item-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.planning-item-title-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.planning-item-title {
    width: 100%;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    font-family: inherit;
}

.planning-item-title:focus {
    outline: none;
    border-color: var(--border);
    background: var(--muted);
}

.planning-item-notes {
    width: 100%;
    min-height: 60px;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.875rem;
    line-height: 1.5;
    resize: vertical;
    background: var(--bg);
}

.planning-item-notes:focus {
    outline: none;
    border-color: var(--primary);
    background: #fafafa;
}

.btn-convert-to-session {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    background: var(--primary);
    color: var(--primary-fg);
    border: 1px solid var(--primary);
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    transition: all 0.2s;
}

.btn-convert-to-session:hover {
    background: #1a1a1a;
    transform: translateY(-1px);
}

.planning-todos-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.btn-add-planning-todo {
    margin-bottom: 0.75rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

.planning-todo-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    margin-bottom: 0.5rem;
}

.planning-todo-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.planning-todo-text {
    flex: 1;
    font-size: 0.9rem;
    padding: 0.25rem 0.5rem;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    font-family: inherit;
}

.planning-todo-text:focus {
    outline: none;
    border-color: var(--border);
    background: var(--muted);
}

.planning-todo-item .btn-destructive {
    padding: 0.25rem;
    min-width: unset;
    opacity: 0.5;
    flex-shrink: 0;
}

.planning-todo-item .btn-destructive:hover {
    opacity: 1;
}

/* Session notes section */
.session-notes-section {
    margin-top: 1rem;
    padding: 0.75rem 0;
    border-top: 1px solid var(--border);
}

.btn-toggle-notes {
    width: 100%;
    justify-content: flex-start;
    padding: 0.5rem 0.75rem;
    font-weight: 500;
    background: transparent;
    border: none;
    color: var(--fg);
}

.btn-toggle-notes:hover {
    background: var(--muted);
}

.session-notes-textarea {
    width: 100%;
    min-height: 80px;
    margin-top: 0.5rem;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.5;
    resize: vertical;
    background: var(--session-notes-bg);
}

.session-notes-textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg);
}

/* Session todos section */
.session-todos {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.btn-add-session-todo {
    margin-bottom: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

.btn-toggle-archived-tasks {
    margin-bottom: 0.75rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    width: auto;
    justify-content: flex-start;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted-fg);
}

.btn-toggle-archived-tasks:hover {
    background: var(--muted);
    color: var(--fg);
}

.archived-tasks-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.archived-task-item {
    opacity: 0.6;
}

.archived-task-item .todo-item {
    background: var(--muted);
}

/* Task drag handle */
.task-drag-handle {
    padding: 0.25rem;
    margin-right: 0.25rem;
}

.task-drag-handle svg {
    width: 14px;
    height: 14px;
}

/* Todo items with task timers */
.todo-item-container {
    margin-bottom: 0.5rem;
}

.todo-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
}

.todo-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: var(--status-done);
}

.planning-todo-checkbox,
.subtask-checkbox {
    accent-color: var(--status-done);
}

.todo-text-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
    overflow: hidden;
}

.todo-text {
    width: 100%;
    font-size: 1rem;
    padding: 0.25rem 0.5rem;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    font-family: inherit;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.todo-text:focus {
    outline: none;
    border-color: var(--border);
    background: var(--muted);
    white-space: normal;
}

.task-notes-preview {
    font-size: 11px;
    color: var(--muted-fg);
    padding-left: 0.5rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
}

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

.task-timer,
.task-timer-focus {
    width: 80px;
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--task-timer-bg);
    font-family: inherit;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.task-timer:focus,
.task-timer-focus:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-task-start,
.btn-task-stop,
.btn-add-subtask {
    padding: 0.375rem;
    min-width: unset;
    flex-shrink: 0;
}

.btn-task-start svg,
.btn-task-stop svg,
.btn-add-subtask svg {
    width: 16px;
    height: 16px;
}

.btn-delete-todo {
    padding: 0.25rem;
    min-width: unset;
    opacity: 0.5;
    flex-shrink: 0;
}

.btn-delete-todo:hover {
    opacity: 1;
}

/* Subtasks */
.subtask-item,
.focus-subtask-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem 0.5rem 3rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    margin-top: 0.25rem;
    margin-left: 2rem;
    position: relative;
}

.subtask-indent {
    position: absolute;
    left: 1rem;
    width: 3px;
    height: calc(100% - 0.5rem);
    background: var(--border);
    top: 0.25rem;
}

.subtask-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
}

.subtask-text {
    flex: 1;
    font-size: 0.8125rem;
    padding: 0.25rem 0.5rem;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    font-family: inherit;
}

.subtask-text:focus {
    outline: none;
    border-color: var(--border);
    background: var(--subtask-bg);
}

.subtask-item.completed .subtask-text,
.focus-subtask-item.completed .subtask-text {
    text-decoration: line-through;
    opacity: 0.6;
}

.btn-delete-subtask {
    padding: 0.25rem;
    min-width: unset;
    opacity: 0.5;
    flex-shrink: 0;
}

.btn-delete-subtask svg {
    width: 14px;
    height: 14px;
}

.btn-delete-subtask:hover {
    opacity: 1;
}

/* Focus view */
.focus-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: 1000;
    overflow-y: auto;
    padding: 2rem 0;
}

.focus-view.hidden {
    display: none;
}

.focus-content {
    text-align: center;
    max-width: 1100px;
    width: 100%;
    padding: 2rem;
}

.exit-focus {
    position: fixed;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem;
    min-width: unset;
    z-index: 1001;
}

.focus-content h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    letter-spacing: -0.025em;
}

.focus-timer {
    font-size: 5rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1;
    margin-bottom: 3rem;
}

.focus-notes {
    margin-top: 2rem;
    margin-bottom: 2rem;
    text-align: left;
}

.focus-notes h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.focus-notes-textarea {
    width: 100%;
    min-height: 100px;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.5;
    resize: vertical;
    background: var(--session-notes-bg);
}

.focus-notes-textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg);
}

.focus-todos {
    margin-top: 3rem;
    text-align: left;
}

.todos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.todos-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.btn-add-todo {
    padding: 0.375rem;
    min-width: unset;
}

.focus-todo-container {
    margin-bottom: 0.75rem;
}

.focus-archived-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border);
}

.focus-archived-header {
    margin-bottom: 1rem;
}

.focus-archived-header h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--muted-fg);
    text-align: left;
}

.focus-controls {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.btn-focus-start,
.btn-focus-stop {
    padding: 0.75rem 1.5rem;
}

@media (max-width: 640px) {
    .session-header {
        flex-wrap: wrap;
    }
    
    .session-title {
        width: 100%;
    }
    
    .focus-timer {
        font-size: 3rem;
    }
    
    .focus-content h2 {
        font-size: 1.5rem;
    }
    
    .todo-item {
        flex-wrap: wrap;
        gap: 0.375rem;
    }
    
    .task-timer,
    .task-timer-focus {
        width: 70px;
        font-size: 0.7rem;
    }
}

/* Task Modal */
.task-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    overflow-y: auto;
}

.task-modal.hidden {
    display: none;
}

.task-modal-content {
    background: var(--bg);
    border-radius: 12px;
    padding: 2rem;
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.task-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.task-modal-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.task-modal-timer-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.task-modal-timer {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-align: center;
    border: none;
    background: transparent;
    font-family: inherit;
    color: var(--fg);
    padding: 0.5rem;
    min-width: 200px;
}

.task-modal-timer:focus {
    outline: none;
}

.task-modal-controls {
    display: flex;
    gap: 0.5rem;
}

.task-modal-section {
    margin-bottom: 2rem;
}

.task-modal-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.btn-add-modal-subtask {
    margin-bottom: 0.75rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

.modal-subtask-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0.75rem 0.75rem 3rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    margin-bottom: 0.5rem;
    margin-left: 1rem;
    position: relative;
}

.modal-subtask-item .subtask-indent {
    position: absolute;
    left: 1rem;
    width: 3px;
    height: calc(100% - 0.5rem);
    background: var(--border);
    top: 0.25rem;
}

.modal-subtask-checkbox {
    accent-color: var(--status-done);
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
}

.modal-subtask-text {
    flex: 1;
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    font-family: inherit;
}

.modal-subtask-text:focus {
    outline: none;
    border-color: var(--border);
    background: rgba(255, 255, 255, 0.8);
}

.modal-subtask-item.completed .modal-subtask-text {
    text-decoration: line-through;
    opacity: 0.6;
}

.modal-btn-delete-subtask {
    padding: 0.25rem;
    min-width: unset;
    opacity: 0.5;
    flex-shrink: 0;
}

.modal-btn-delete-subtask svg {
    width: 14px;
    height: 14px;
}

.modal-btn-delete-subtask:hover {
    opacity: 1;
}

.task-modal-notes {
    width: 100%;
    min-height: 120px;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.875rem;
    line-height: 1.6;
    resize: vertical;
    background: var(--bg);
}

.task-modal-notes:focus {
    outline: none;
    border-color: var(--primary);
}

@media (max-width: 640px) {
    .task-modal-content {
        padding: 1.5rem;
        width: 95%;
    }

    .task-modal-timer {
        font-size: 2rem;
        min-width: 150px;
    }
}

/* Settings Modal */
.settings-option {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
}

.settings-option label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.settings-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

.settings-option span {
    flex: 1;
}

/* Hidden elements based on settings */
.session-header .session-timer-controls.hidden,
.session-header .session-date.hidden,
.session-header .status-select.hidden,
.session-header .priority-select.hidden,
.session-header .category-select.hidden {
    display: none !important;
}
