/* ============================================================
   Base reset & typography
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #37352f;
    background: #ffffff;
    -webkit-font-smoothing: antialiased;
}

/* ============================================================
   App shell layout
   ============================================================ */
.app-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    width: 240px;
    min-width: 240px;
    background: #f7f6f3;
    border-right: 1px solid #e9e9e7;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 32px 48px 48px;
}

/* ============================================================
   Sidebar
   ============================================================ */
.sidebar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 14px 12px;
    font-weight: 600;
    font-size: 15px;
    color: #37352f;
}

.sidebar-logo {
    font-size: 18px;
    color: #37352f;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 4px 6px;
    gap: 1px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    color: #37352f;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.1s;
    user-select: none;
}

.nav-item:hover { background: #ebebea; }
.nav-item.active { background: #e3e2df; font-weight: 500; }

.nav-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
    color: #9b9a97;
}

/* ============================================================
   Page header
   ============================================================ */
.page-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.page-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.page-icon {
    font-size: 24px;
}

.page-title {
    font-size: 30px;
    font-weight: 700;
    color: #37352f;
    letter-spacing: -0.3px;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn-add {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #37352f;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.1s;
    text-decoration: none;
}
.btn-add:hover { background: #1e1c1a; }

/* ============================================================
   Tree Grid
   ============================================================ */
.tree-grid {
    border: 1px solid #e9e9e7;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.grid-header {
    display: grid;
    grid-template-columns: 48px 56px 1fr 130px 220px 96px;
    background: #f7f6f3;
    border-bottom: 1px solid #e9e9e7;
    padding: 0;
}

.grid-header > div {
    padding: 8px 10px;
    font-size: 11px;
    font-weight: 600;
    color: #9b9a97;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Tree rows */
.tree-row {
    display: grid;
    grid-template-columns: 48px 56px 1fr 130px 220px 96px;
    align-items: center;
    min-height: 36px;
    border-bottom: 1px solid #f1f1ef;
    transition: background 0.08s;
}
.tree-row:hover { background: #f9f9f8; }
.tree-row:last-child { border-bottom: none; }
.tree-row.row-editing { background: #f9f9f8; }

.col-expander {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 4px;
}

.col-status { padding: 0 10px; display: flex; align-items: center; }
.col-title  { padding: 4px 10px; display: flex; align-items: center; min-width: 0; }
.col-due    { padding: 0 10px; }
.col-tags   { padding: 0 10px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.col-actions {
    padding: 0 6px;
    display: flex;
    align-items: center;
    gap: 2px;
    opacity: 0;
    transition: opacity 0.1s;
}
.tree-row:hover .col-actions { opacity: 1; }

.expander-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #9b9a97;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.1s, color 0.1s;
    flex-shrink: 0;
}
.expander-btn:hover { background: #e9e9e7; color: #37352f; }
.expander-btn .chevron {
    display: inline-block;
    font-size: 16px;
    line-height: 1;
    transition: transform 0.15s;
}
.expander-btn.expanded .chevron { transform: rotate(90deg); }
.expander-placeholder { width: 22px; }

.title-text {
    cursor: text;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}
.title-text.done { text-decoration: line-through; color: #9b9a97; }

.title-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: #37352f;
    font-family: inherit;
    padding: 2px 4px;
    border-radius: 4px;
    box-shadow: 0 0 0 2px #a8d8f5;
    min-width: 0;
    width: 100%;
}

.due-date {
    font-size: 12px;
    color: #9b9a97;
    white-space: nowrap;
}
.due-date.overdue { color: #eb5757; }
.due-time { font-size: 11px; opacity: 0.8; }

.tag-chip {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    white-space: nowrap;
    color: #37352f;
    font-weight: 500;
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #9b9a97;
    font-size: 16px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.1s, color 0.1s;
    line-height: 1;
}
.action-btn:hover { background: #ebebea; color: #37352f; }
.action-btn.danger:hover { background: #fde8e8; color: #eb5757; }

/* ============================================================
   Status badge
   ============================================================ */
.status-badge {
    background: none;
    border: 1.5px solid #d0d0cf;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.15s;
    flex-shrink: 0;
    padding: 0;
}
.status-badge.status-none    { border-color: #d0d0cf; color: #bdbdbd; }
.status-badge.status-started { border-color: #2383e2; color: #2383e2; background: #eef4fd; }
.status-badge.status-done    { border-color: #0f7849; color: #0f7849; background: #f0faf5; }
.status-badge:hover { transform: scale(1.12); }

/* ============================================================
   Empty state
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #9b9a97;
}
.empty-state h2 { font-size: 22px; margin-bottom: 8px; color: #37352f; }
.empty-state p { margin-bottom: 20px; }

/* ============================================================
   Calendar page header
   ============================================================ */
.view-switcher {
    display: flex;
    gap: 2px;
    background: #f1f1ef;
    border-radius: 7px;
    padding: 3px;
}

.view-btn {
    background: none;
    border: none;
    padding: 5px 14px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    color: #9b9a97;
    font-weight: 500;
    transition: all 0.12s;
    white-space: nowrap;
}
.view-btn:hover { color: #37352f; }
.view-btn.active {
    background: #fff;
    color: #37352f;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.cal-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cal-nav-btn {
    background: none;
    border: 1px solid #e9e9e7;
    border-radius: 5px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 14px;
    color: #37352f;
    transition: background 0.1s;
    line-height: 1;
}
.cal-nav-btn:hover { background: #f1f1ef; }
.today-btn { font-size: 12px; font-weight: 500; }

.cal-period {
    font-size: 14px;
    font-weight: 600;
    min-width: 190px;
    text-align: center;
    color: #37352f;
}

/* ============================================================
   Day View
   ============================================================ */
.day-view {
    display: grid;
    grid-template-rows: 1fr auto;
    gap: 16px;
    height: calc(100vh - 170px);
}

.day-schedule {
    overflow-y: auto;
    border: 1px solid #e9e9e7;
    border-radius: 8px;
    background: #fff;
}

.time-slot {
    display: grid;
    grid-template-columns: 64px 1fr;
    min-height: 52px;
    border-bottom: 1px solid #f1f1ef;
    transition: background 0.1s;
}
.time-slot:last-child { border-bottom: none; }
.time-slot:hover { background: #fafaf9; }
.time-slot.drag-over { background: #eef4fd !important; }

.time-label {
    padding: 6px 12px 0 12px;
    font-size: 11px;
    color: #9b9a97;
    text-align: right;
    border-right: 1px solid #e9e9e7;
    font-weight: 500;
    white-space: nowrap;
}

.slot-content {
    padding: 4px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.calendar-todo-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 13px;
    cursor: grab;
    border-left: 3px solid;
    user-select: none;
    transition: opacity 0.1s;
}
.calendar-todo-card:active { cursor: grabbing; opacity: 0.8; }
.calendar-todo-card.status-none    { background: #f7f6f3; border-color: #d0d0cf; }
.calendar-todo-card.status-started { background: #eef4fd; border-color: #2383e2; }
.calendar-todo-card.status-done    { background: #f0faf5; border-color: #0f7849; }

.card-time  { font-size: 11px; color: #9b9a97; white-space: nowrap; }
.card-title { flex: 1; font-weight: 500; }
.card-tag   { font-size: 10px; padding: 1px 6px; border-radius: 10px; color: #37352f; }

/* Day tray */
.day-tray {
    border: 1px solid #e9e9e7;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    max-height: 180px;
}

.tray-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    background: #f7f6f3;
    font-size: 12px;
    font-weight: 600;
    color: #9b9a97;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid #e9e9e7;
}

.tray-add-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #9b9a97;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    transition: all 0.1s;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}
.tray-add-btn:hover { background: #ebebea; color: #37352f; }

.tray-content {
    padding: 8px 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 56px;
    overflow-y: auto;
    transition: background 0.1s;
}

.tray-todo-card {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 10px;
    border-radius: 5px;
    background: #f7f6f3;
    font-size: 13px;
    cursor: grab;
    border: 1px solid #e9e9e7;
    user-select: none;
    transition: box-shadow 0.1s;
}
.tray-todo-card:active { cursor: grabbing; }
.tray-todo-card:hover { box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
.tray-title { font-weight: 500; }

.tray-empty {
    font-size: 12px;
    color: #c4c4c2;
    font-style: italic;
    display: flex;
    align-items: center;
}

/* ============================================================
   Week / Biweek View
   ============================================================ */
.week-section {
    border: 1px solid #e9e9e7;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
    background: #fff;
}

.week-header {
    display: grid;
    background: #f7f6f3;
    border-bottom: 1px solid #e9e9e7;
}

.week-day-label {
    padding: 10px 12px;
    text-align: center;
    border-right: 1px solid #e9e9e7;
}
.week-day-label:last-child { border-right: none; }
.week-day-label.today .wdl-name { color: #2383e2; }

.wdl-name {
    font-size: 11px;
    font-weight: 600;
    color: #9b9a97;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.wdl-num {
    font-size: 18px;
    font-weight: 600;
    color: #37352f;
    line-height: 1.2;
}
.today-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #37352f;
    color: #fff;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 16px;
}

.week-body {
    display: grid;
    min-height: 160px;
}

.week-day-col {
    border-right: 1px solid #e9e9e7;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.week-day-col:last-child { border-right: none; }
.week-day-col.today { background: #fffdf5; }

.week-todo-card {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    border-left: 2px solid;
    cursor: pointer;
    transition: opacity 0.1s;
    line-height: 1.4;
}
.week-todo-card:hover { opacity: 0.8; }
.week-todo-card.status-none    { background: #f7f6f3; border-color: #d0d0cf; }
.week-todo-card.status-started { background: #eef4fd; border-color: #2383e2; }
.week-todo-card.status-done    { background: #f0faf5; border-color: #0f7849; }

.wc-time  { font-size: 11px; color: #9b9a97; margin-right: 3px; }
.wc-title.done { text-decoration: line-through; color: #9b9a97; }

.week-add-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #c4c4c2;
    font-size: 18px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: auto;
    align-self: flex-start;
    transition: all 0.1s;
    line-height: 1;
}
.week-add-btn:hover { background: #f1f1ef; color: #37352f; }

/* ============================================================
   Month View
   ============================================================ */
.month-view {
    border: 1px solid #e9e9e7;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.month-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #f7f6f3;
    border-bottom: 1px solid #e9e9e7;
}

.month-header > div {
    padding: 10px 12px;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #9b9a97;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-right: 1px solid #e9e9e7;
}
.month-header > div:last-child { border-right: none; }

.month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.month-cell {
    min-height: 110px;
    padding: 8px;
    border-right: 1px solid #e9e9e7;
    border-bottom: 1px solid #e9e9e7;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.month-cell:nth-child(7n)  { border-right: none; }
.month-cell.other-month    { background: #fafafa; }
.month-cell.today-cell     { background: #fffdf5; }

.month-cell-date {
    font-size: 13px;
    font-weight: 500;
    color: #9b9a97;
    margin-bottom: 2px;
    min-height: 22px;
    display: flex;
    align-items: center;
}
.month-cell.other-month .month-cell-date { color: #d4d4d2; }

.today-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #37352f;
    color: #fff;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 12px;
    font-weight: 600;
}

.month-todo-chip {
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 3px;
    border-left: 2px solid;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    font-weight: 500;
    transition: opacity 0.1s;
}
.month-todo-chip:hover { opacity: 0.75; }
.month-todo-chip.status-none    { background: #f7f6f3; border-color: #d0d0cf; }
.month-todo-chip.status-started { background: #eef4fd; border-color: #2383e2; }
.month-todo-chip.status-done    { background: #f0faf5; border-color: #0f7849; }

.month-more {
    font-size: 11px;
    color: #9b9a97;
    padding: 1px 4px;
}

/* ============================================================
   Shared drag-over states for calendar views
   ============================================================ */
.week-day-col.drag-over { background: #eef4fd !important; }
.month-cell.drag-over   { background: #eef4fd !important; outline: 2px dashed #2383e2; outline-offset: -2px; }

/* ============================================================
   Tree grid drag-and-drop
   ============================================================ */
.tree-row {
    cursor: grab;
}
.tree-row:active {
    cursor: grabbing;
}
.tree-row.row-drag-over {
    background: #eef4fd !important;
    outline: 2px dashed #2383e2;
    outline-offset: -2px;
    border-radius: 4px;
}

/* Root-level drop zone at bottom of tree */
.root-drop-zone {
    margin-top: 12px;
    border: 2px dashed #d0d0cf;
    border-radius: 8px;
    padding: 14px;
    text-align: center;
    font-size: 12px;
    color: #c4c4c2;
    transition: all 0.15s;
    user-select: none;
}
.root-drop-zone-active {
    border-color: #2383e2;
    background: #eef4fd;
    color: #2383e2;
}

/* ============================================================
   Tags page
   ============================================================ */
.tags-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tag-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #e9e9e7;
    border-radius: 8px;
    transition: box-shadow 0.1s;
}
.tag-row:hover { box-shadow: 0 1px 4px rgba(0,0,0,0.08); }

.tag-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.tag-chip-large {
    font-size: 13px;
    padding: 4px 14px;
    border-radius: 14px;
    white-space: nowrap;
    color: #37352f;
    font-weight: 500;
    min-width: 80px;
    text-align: center;
}

.tag-name-input {
    border: 1px solid #e9e9e7;
    border-radius: 5px;
    padding: 5px 10px;
    font-size: 14px;
    font-family: inherit;
    color: #37352f;
    width: 160px;
    outline: none;
    transition: border-color 0.1s;
}
.tag-name-input:focus { border-color: #2383e2; box-shadow: 0 0 0 2px #eef4fd; }

.tag-swatches {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.swatch-btn {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.1s, border-color 0.1s;
    padding: 0;
}
.swatch-btn:hover { transform: scale(1.2); }
.swatch-btn.swatch-selected { border-color: #37352f; }

.tag-color-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #9b9a97;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 5px;
    border: 1px solid #e9e9e7;
    white-space: nowrap;
    transition: background 0.1s;
}
.tag-color-label:hover { background: #f1f1ef; }

.tag-color-picker {
    width: 20px;
    height: 20px;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
}

.tag-usage-count {
    font-size: 12px;
    color: #9b9a97;
    margin-left: auto;
    white-space: nowrap;
}

/* ============================================================
   Kanban board
   ============================================================ */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    align-items: start;
}

.kanban-column {
    background: #f7f6f3;
    border: 1px solid #e9e9e7;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    min-height: 200px;
    transition: background 0.15s, border-color 0.15s;
}
.kanban-column.kanban-drag-over {
    background: #eef4fd;
    border-color: #2383e2;
}

.kanban-col-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px 10px;
    border-bottom: 1px solid #e9e9e7;
}

.kanban-col-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.kanban-col-indicator.status-none    { background: #d0d0cf; }
.kanban-col-indicator.status-started { background: #2383e2; }
.kanban-col-indicator.status-done    { background: #0f7849; }

.kanban-col-title {
    font-size: 13px;
    font-weight: 600;
    color: #37352f;
    flex: 1;
}

.kanban-col-count {
    font-size: 12px;
    color: #9b9a97;
    background: #e9e9e7;
    border-radius: 10px;
    padding: 1px 7px;
    font-weight: 500;
}

.kanban-col-body {
    padding: 10px 10px 4px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.kanban-card {
    background: #fff;
    border: 1px solid #e9e9e7;
    border-radius: 7px;
    padding: 10px 12px;
    cursor: grab;
    transition: box-shadow 0.12s, opacity 0.12s;
    user-select: none;
}
.kanban-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.10); }
.kanban-card:active { cursor: grabbing; }
.kanban-card.kanban-card-dragging { opacity: 0.5; }

.kanban-card-header {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 6px;
}

.kanban-card-title {
    font-size: 13px;
    font-weight: 500;
    color: #37352f;
    line-height: 1.4;
    flex: 1;
}
.kanban-card-title.done { text-decoration: line-through; color: #9b9a97; }

.kanban-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 6px;
}

.kanban-card-due {
    font-size: 11px;
    color: #9b9a97;
    margin-top: 4px;
}
.kanban-card-due.overdue { color: #eb5757; }

.kanban-card-subtasks {
    font-size: 11px;
    color: #9b9a97;
    margin-top: 4px;
}

.kanban-add-btn {
    margin: 6px 10px 10px;
    background: none;
    border: none;
    cursor: pointer;
    color: #9b9a97;
    font-size: 13px;
    padding: 6px 8px;
    border-radius: 5px;
    text-align: left;
    transition: background 0.1s, color 0.1s;
    width: calc(100% - 20px);
}
.kanban-add-btn:hover { background: #ebebea; color: #37352f; }

/* ============================================================
   Detail Slide-Over Panel
   ============================================================ */
.slideover-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.18);
    z-index: 500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}
.slideover-backdrop.backdrop-visible {
    opacity: 1;
    pointer-events: auto;
}

.slideover-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    height: 100vh;
    background: #fff;
    box-shadow: -8px 0 32px rgba(0,0,0,0.14);
    z-index: 501;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
}
.slideover-panel.open {
    transform: translateX(0);
}

.slideover-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 14px;
    border-bottom: 1px solid #e9e9e7;
    background: #f7f6f3;
    flex-shrink: 0;
}

.slideover-heading {
    font-size: 15px;
    font-weight: 600;
    color: #37352f;
}

.slideover-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #9b9a97;
    font-size: 16px;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.1s, color 0.1s;
}
.slideover-close-btn:hover { background: #ebebea; color: #37352f; }

.slideover-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.detail-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.detail-label {
    font-size: 11px;
    font-weight: 600;
    color: #9b9a97;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.detail-input {
    border: 1px solid #e9e9e7;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    font-family: inherit;
    color: #37352f;
    outline: none;
    transition: border-color 0.1s, box-shadow 0.1s;
    width: 100%;
    background: #fff;
}
.detail-input:focus { border-color: #2383e2; box-shadow: 0 0 0 2px #eef4fd; }

.detail-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.detail-row .detail-input { flex: 1; }

.detail-clear-btn {
    background: none;
    border: 1px solid #e9e9e7;
    border-radius: 5px;
    padding: 7px 12px;
    font-size: 12px;
    color: #9b9a97;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.1s;
    flex-shrink: 0;
}
.detail-clear-btn:hover { background: #f1f1ef; color: #37352f; border-color: #d0d0cf; }

.detail-status-group {
    display: flex;
    gap: 6px;
}

.detail-status-btn {
    flex: 1;
    border: 1.5px solid #e9e9e7;
    border-radius: 6px;
    padding: 7px 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    background: #fff;
    color: #9b9a97;
    transition: all 0.12s;
    text-align: center;
    white-space: nowrap;
}
.detail-status-btn:hover { background: #f7f6f3; }
.detail-status-btn.active.status-none    { border-color: #d0d0cf; background: #f7f6f3; color: #37352f; }
.detail-status-btn.active.status-started { border-color: #2383e2; background: #eef4fd; color: #2383e2; }
.detail-status-btn.active.status-done    { border-color: #0f7849; background: #f0faf5; color: #0f7849; }

.detail-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.detail-tag-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: 1.5px solid transparent;
    background: #f7f6f3;
    color: #37352f;
    transition: all 0.12s;
    user-select: none;
}
.detail-tag-option input[type="checkbox"] { display: none; }
.detail-tag-option:hover { border-color: #d0d0cf; }
.detail-tag-option.selected { border-color: rgba(0,0,0,0.12); }

/* ============================================================
   Blazor loading / error UI (keep from original)
   ============================================================ */
#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0,0,0,0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}
#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}
.blazor-error-boundary::after { content: "An error has occurred." }

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto;
}
.loading-progress circle {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}
.loading-progress circle:last-child {
    stroke: #37352f;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}
.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}
.loading-progress-text::after { content: var(--blazor-load-percentage-text, "Loading"); }
