body {
    font-family: system-ui, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #eef7fc;
    color: #222;
}

.NavBar {
    background-color: #d0eaff;
    padding: 0.75em 1em;
    border-bottom: 2px solid #b0d4ec;
    text-align: center;
    position: relative;
}

.NavBar a {
    color: #0366a8;
    text-decoration: none;
    margin: 0 0.75em;
    font-weight: bold;
}

.NavBar a:hover {
    text-decoration: underline;
}

.timezone-display {
    position: absolute;
    right: 1em;
    top: 50%;
    transform: translateY(-50%);
    color: #555;
    font-size: 0.9em;
}

.PageWrapper {
    max-width: 900px;
    margin: 2em auto;
    padding: 1em;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.PagePanel {
    margin-bottom: 1.5em;
    padding: 1em;
    background-color: #f3faff;
    border: 1px solid #cde5f6;
    border-radius: 6px;
}

.fix {
    font-size: 0.85em;
    text-align: right;
    color: #555;
}

.alert {
    padding: 0.75em 1em;
    border-radius: 4px;
    margin-bottom: 1em;
}

.alert-error {
    background-color: #ffe6e6;
    border: 1px solid #ff9999;
    color: #cc0000;
}

.alert-success {
    background-color: #e6ffe6;
    border: 1px solid #99ff99;
    color: #006600;
}

/* Todo List Styles */
.todo-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.todo-list.saving {
    opacity: 0.5;
    pointer-events: none;
}

.todo-list.todo-error {
    background-color: #ffe6e6;
    border-radius: 4px;
    padding: 0.5em;
    animation: todo-error-flash 0.5s;
}

.todo-item {
    padding: 0.75em;
    margin-bottom: 0.5em;
    background-color: #ffffff;
    border: 1px solid #cde5f6;
    border-radius: 4px;
    display: flex;
    align-items: flex-start;
}

.todo-item.sortable-ghost {
    opacity: 0.4;
    background-color: #e8f4ff;
}

.drag-handle {
    cursor: grab;
    padding: 0 8px;
    font-size: 18px;
    line-height: 1;
    user-select: none;
    color: #666;
    display: flex;
    align-items: center;
    margin-right: 0.75em;
}

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

.todo-item.todo-complete {
    opacity: 0.7;
    background-color: #f8f8f8;
}

.todo-item.todo-old {
    background-color: #f0f0f0;
    color: #888;
}

.todo-item.todo-old .todo-description {
    color: #888;
}

.todo-item.todo-old .todo-date-create,
.todo-item.todo-old .todo-date-complete {
    color: #aaa;
}

.todo-item.todo-future {
    opacity: 0.5;
    background-color: #fafafa;
}

.todo-item.todo-future .todo-description {
    color: #888;
    font-style: italic;
}

.todo-item.todo-future .todo-date-create {
    color: #aaa;
}

.todo-item.todo-error {
    background-color: #ffe6e6;
    border-color: #ff9999;
    animation: todo-error-flash 0.5s;
}

@keyframes todo-error-flash {
    0%, 100% {
        background-color: #ffe6e6;
    }
    50% {
        background-color: #ffcccc;
    }
}

.todo-item.saving {
    opacity: 0.5;
    pointer-events: none;
}

.todo-item label {
    display: flex;
    align-items: center;
    flex: 1;
    cursor: pointer;
    margin: 0;
}

.todo-item.editing .todo-checkbox {
    pointer-events: none;
    opacity: 0.5;
}

.todo-item.editing .drag-handle {
    pointer-events: none;
    opacity: 0.5;
}

.todo-item.editing .todo-delete-btn {
    pointer-events: none;
    opacity: 0.5;
}

.todo-checkbox {
    margin-right: 0.75em;
    flex-shrink: 0;
}

.todo-description {
    flex: 1;
    display: flex;
    align-items: center;
}

.todo-description.todo-dropzone {
    border: 2px dashed #0366a8;
    border-radius: 4px;
    padding: 0.25em 0.5em;
    margin: 0 0.5em 0 0;
}

.todo-description.todo-dropzone.sortable-drag-over {
    background-color: #e6ffe6;
    border-color: #006600;
    border-style: solid;
}

.todo-link {
    color: #0366a8;
    text-decoration: none;
    font-weight: bold;
}

.todo-link:hover {
    text-decoration: underline;
}

.todo-editable {
    display: contents;
}

.todo-editing {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    width: 100%;
}

.todo-edit-field {
    padding: 0.5em;
    border: 1px solid #0366a8;
    border-radius: 4px;
    font-size: 1em;
}

.todo-edit-field:focus {
    outline: none;
    border-color: #025082;
    box-shadow: 0 0 0 2px rgba(3, 102, 168, 0.2);
}

.todo-edit-buttons {
    display: flex;
    gap: 0.5em;
    margin-top: 0.25em;
}

.todo-edit-btn {
    padding: 0.25em 0.75em;
    border: 1px solid #0366a8;
    border-radius: 4px;
    font-size: 0.9em;
    cursor: pointer;
    background-color: white;
    color: #0366a8;
}

.todo-edit-btn:hover {
    background-color: #f0f8ff;
}

.todo-edit-btn.save {
    background-color: #0366a8;
    color: white;
}

.todo-edit-btn.save:hover {
    background-color: #025082;
}

.todo-dates {
    margin-left: 1em;
    font-size: 0.85em;
    color: #666;
    display: flex;
    gap: 0.5em;
}

.todo-date-complete {
    color: #006600;
    font-weight: bold;
}

.no-todos,
.no-projects {
    color: #666;
    font-style: italic;
    text-align: center;
    padding: 2em;
}

.project-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.project-list li {
    padding: 0.75em;
    margin-bottom: 0.5em;
    background-color: #ffffff;
    border: 1px solid #cde5f6;
    border-radius: 4px;
}

.project-list a {
    color: #0366a8;
    text-decoration: none;
    display: block;
}

.project-list a:hover {
    text-decoration: underline;
}

.todo-actions {
    margin-top: 1.5em;
    padding-top: 1em;
    border-top: 1px solid #cde5f6;
}

.btn {
    padding: 0.5em 1.5em;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background-color: #0366a8;
    color: white;
}

.btn-primary:hover {
    background-color: #025082;
}

.btn-secondary {
    background-color: #5c8aaf;
    color: white;
}

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

.todo-new-form {
    margin-bottom: 2em;
    padding: 1em;
    background-color: #f0f8ff;
    border: 1px solid #cde5f6;
    border-radius: 6px;
}

.todo-new-form h2 {
    margin-top: 0;
    margin-bottom: 0.5em;
    font-size: 1.2em;
}

.form-group {
    margin-bottom: 0.75em;
}

.todo-input {
    padding: 0.5em;
    border: 1px solid #cde5f6;
    border-radius: 4px;
    font-size: 1em;
    width: 100%;
    max-width: 500px;
}

.todo-404-actions {
    margin-top: 2em;
    padding-top: 1.5em;
    border-top: 1px solid #cde5f6;
}

.todo-404-actions form {
    display: inline-block;
    margin-right: 1em;
}

.btn-link {
    color: #0366a8;
    text-decoration: none;
    font-weight: bold;
}

.btn-link:hover {
    text-decoration: underline;
}

.breadcrumb-link {
    color: #0366a8;
    text-decoration: none;
    font-weight: bold;
}

.breadcrumb-link:hover {
    text-decoration: underline;
}

/* Delete button styles */
.todo-delete-btn {
    margin-left: auto;
    padding: 0.25em 0.5em;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2em;
    opacity: 0.5;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

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

.todo-item:hover .todo-delete-btn {
    opacity: 0.7;
}
