/* =========================================================
   ORBIT TASK STUDIO
   The stylesheet is grouped from broad rules to small details.
   This makes it easier to find and change one part at a time.
   ========================================================= */

:root {
    --bg: #f5f6f2;
    --surface: #ffffff;
    --surface-soft: #f0f2ec;
    --surface-hover: #e9ece4;
    --ink: #20231f;
    --muted: #74796f;
    --line: #e2e5dc;
    --accent: #6d62e8;
    --accent-dark: #554acb;
    --accent-soft: #eeecff;
    --coral: #ee806f;
    --coral-soft: #fff0ec;
    --blue: #6494d8;
    --blue-soft: #edf5ff;
    --green: #57a881;
    --green-soft: #eaf7f0;
    --yellow: #e7ae4a;
    --yellow-soft: #fff7df;
    --danger: #d85f5f;
    --shadow: 0 16px 50px rgba(40, 45, 36, 0.08);
    --small-shadow: 0 6px 22px rgba(40, 45, 36, 0.07);
    --radius-xl: 18px;
    --radius-lg: 14px;
    --radius-md: 10px;
    --sidebar-width: 258px;
}

[data-theme="dark"] {
    --bg: #171a17;
    --surface: #20241f;
    --surface-soft: #292e28;
    --surface-hover: #31372f;
    --ink: #f2f3ef;
    --muted: #9ba297;
    --line: #343a32;
    --accent: #948af7;
    --accent-dark: #aca5ff;
    --accent-soft: #302d4d;
    --coral-soft: #402b28;
    --blue-soft: #26374b;
    --green-soft: #263c31;
    --yellow-soft: #443a20;
    --shadow: 0 16px 50px rgba(0, 0, 0, 0.24);
    --small-shadow: 0 6px 22px rgba(0, 0, 0, 0.18);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    overflow-x: hidden;
    color: var(--ink);
    background: var(--bg);
    font-family: Inter, "Segoe UI", Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input,
textarea,
select {
    font: inherit;
}

button,
select {
    cursor: pointer;
}

button {
    color: inherit;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 3px solid rgba(109, 98, 232, 0.22);
    outline-offset: 2px;
}

[hidden] {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.app-shell {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    min-height: 100vh;
}

/* Sidebar */

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    width: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    padding: 25px 18px 18px;
    background: var(--surface);
    border-right: 1px solid var(--line);
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 7px 24px;
}

.brand-mark {
    position: relative;
    width: 35px;
    height: 35px;
    border: 2px solid var(--accent);
    border-radius: 50%;
}

.brand-mark::before {
    content: "";
    position: absolute;
    width: 41px;
    height: 15px;
    top: 8px;
    left: -5px;
    border: 2px solid var(--accent);
    border-top-color: transparent;
    border-bottom-color: transparent;
    border-radius: 50%;
    transform: rotate(-22deg);
}

.brand-mark span {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--coral);
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    font-size: 19px;
    letter-spacing: -0.5px;
}

.brand small {
    margin-top: 1px;
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.sidebar-close {
    display: none;
    margin-left: auto;
}

.add-task-button {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    color: #fff;
    background: var(--accent);
    border: 0;
    border-radius: var(--radius-md);
    box-shadow: 0 9px 20px rgba(109, 98, 232, 0.22);
    font-weight: 700;
    transition: 160ms ease;
}

.add-task-button:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
}

.add-task-button > span {
    margin-right: 9px;
    font-size: 21px;
}

kbd {
    min-width: 24px;
    padding: 3px 6px;
    color: var(--muted);
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 6px;
    font-family: inherit;
    font-size: 11px;
    text-align: center;
}

.add-task-button kbd {
    margin-left: auto;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.13);
    border-color: rgba(255, 255, 255, 0.2);
}

.main-nav {
    margin-top: 22px;
}

.nav-label {
    margin: 0 10px 8px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.nav-label-spaced {
    margin-top: 25px;
}

.nav-item {
    display: grid;
    grid-template-columns: 25px minmax(0, 1fr) auto;
    align-items: center;
    width: 100%;
    min-height: 41px;
    margin: 2px 0;
    padding: 0 11px;
    color: var(--muted);
    background: transparent;
    border: 0;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    transition: 140ms ease;
}

.nav-item:hover {
    color: var(--ink);
    background: var(--surface-soft);
}

.nav-item.active {
    color: var(--accent);
    background: var(--accent-soft);
}

.nav-icon {
    font-size: 17px;
}

.nav-count {
    min-width: 22px;
    padding: 0;
    background: transparent;
    font-size: 10px;
    text-align: center;
}

.nav-item.active .nav-count {
    background: transparent;
}

.category-dot,
.column-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.category-dot.personal {
    background: var(--coral);
}

.category-dot.study {
    background: var(--blue);
}

.category-dot.work {
    background: var(--yellow);
}

.sidebar-footer {
    display: flex;
    gap: 8px;
    margin-top: auto;
    padding-top: 18px;
}

.theme-button,
.icon-button {
    border: 1px solid var(--line);
    background: var(--surface);
}

.theme-button {
    flex: 1;
    min-height: 39px;
    border-radius: 10px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.theme-button:hover,
.icon-button:hover {
    color: var(--ink);
    background: var(--surface-soft);
}

.theme-button span:first-child {
    margin-right: 5px;
    font-size: 15px;
}

.icon-button {
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 10px;
    font-weight: 700;
}

.sidebar-backdrop {
    display: none;
}

/* Main page and top bar */

.main-content {
    grid-column: 2;
    min-width: 0;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 clamp(22px, 4vw, 58px);
    background: color-mix(in srgb, var(--bg) 90%, transparent);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
}

.menu-button {
    display: none;
}

.search-box {
    width: min(370px, 42vw);
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 12px;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 11px;
}

.search-box:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(109, 98, 232, 0.1);
}

.search-box input {
    flex: 1;
    min-width: 0;
    height: 40px;
    padding: 0;
    color: var(--ink);
    background: transparent;
    border: 0;
    outline: 0;
    font-size: 12px;
}

.search-box input::placeholder {
    color: var(--muted);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.focus-pill {
    min-height: 38px;
    padding: 0 15px;
    color: var(--accent);
    background: var(--accent-soft);
    border: 0;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 750;
    transition: 160ms ease;
}

.focus-pill.timer-active {
    width: auto;
    min-width: 0;
    padding: 0 9px;
    border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
    border-radius: 12px;
}

.focus-pill.timer-running {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 10%, transparent);
}

.focus-pill.timer-complete {
    color: var(--green);
    background: var(--green-soft);
}

.focus-button-icon {
    margin-right: 5px;
}

.focus-pill.timer-active .focus-button-icon {
    display: none;
}

.focus-live {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.focus-live-value {
    display: grid;
    line-height: 1;
    text-align: left;
}

.focus-live-value strong {
    color: currentColor;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.focus-live-value small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 7px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.focus-live > i {
    width: 1px;
    height: 22px;
    background: color-mix(in srgb, var(--accent) 24%, var(--line));
}

.topbar-theme-button {
    width: 38px;
    height: 38px;
    padding: 0;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 50%;
    font-size: 15px;
}

.topbar-theme-button:hover {
    color: var(--accent);
    background: var(--accent-soft);
    border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}

.focus-pill:hover {
    transform: translateY(-1px);
}

.date-badge {
    width: 40px;
    height: 42px;
    display: grid;
    place-content: center;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 9px;
    text-align: center;
}

.date-badge span,
.date-badge strong {
    display: block;
    line-height: 1;
}

.date-badge span {
    margin-bottom: 3px;
    color: var(--coral);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.7px;
}

.date-badge strong {
    font-size: 15px;
}

.page-content {
    width: min(1240px, 100%);
    margin: 0 auto;
    padding: 43px clamp(22px, 4vw, 58px) 60px;
}

.welcome-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.date-line {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.welcome-row h1 {
    max-width: 740px;
    margin: 0;
    font-size: clamp(28px, 3vw, 38px);
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1.12;
}

.welcome-copy {
    margin: 11px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.mobile-add-button {
    display: none;
}

/* Completion progress */

.progress-summary {
    margin: 30px 0 34px;
    padding: 16px 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
}

.progress-summary-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 11px;
}

.progress-summary-heading h2 {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
}

.progress-summary-heading span {
    color: var(--muted);
    font-size: 11px;
}

.progress-track {
    height: 6px;
    overflow: hidden;
    background: var(--surface-soft);
    border-radius: 3px;
}

.progress-track > span {
    width: 0;
    height: 100%;
    display: block;
    background: var(--accent);
    border-radius: inherit;
    transition: width 180ms ease;
}

/* Task workspace */

.workspace-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 21px;
}

.workspace-heading h2 {
    margin: 0;
    font-size: 22px;
    letter-spacing: -0.4px;
}

.workspace-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-select select,
.form-field input,
.form-field textarea,
.form-field select {
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
}

.filter-select select {
    height: 38px;
    padding: 0 34px 0 12px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 650;
}

.view-switcher {
    display: flex;
    padding: 3px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 10px;
}

.view-switcher button {
    width: 31px;
    height: 30px;
    padding: 0;
    color: var(--muted);
    background: transparent;
    border: 0;
    border-radius: 7px;
}

.view-switcher button.active {
    color: var(--accent);
    background: var(--surface);
    box-shadow: 0 2px 7px rgba(20, 23, 19, 0.08);
}

.active-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: -8px 0 16px;
    padding: 8px 12px;
    color: var(--muted);
    background: var(--accent-soft);
    border-radius: 9px;
    font-size: 11px;
}

.active-filters button {
    color: var(--accent);
    background: transparent;
    border: 0;
    font-size: 11px;
    font-weight: 750;
}

.board-view {
    display: grid;
    grid-template-columns: repeat(3, minmax(230px, 1fr));
    gap: 15px;
    align-items: start;
}

.board-column {
    min-height: 255px;
    padding: 15px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    transition: 150ms ease;
}

.board-column.drag-over {
    background: var(--accent-soft);
    border-color: var(--accent);
}

.column-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.column-heading > div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.column-heading h3 {
    margin: 0;
    color: var(--ink);
    font-size: 13px;
}

.column-dot.coral {
    background: var(--coral);
}

.column-dot.blue {
    background: var(--blue);
}

.column-dot.green {
    background: var(--green);
}

.column-count {
    min-width: 20px;
    padding: 0;
    color: var(--muted);
    background: transparent;
    font-size: 9px;
    text-align: center;
}

.column-add {
    width: 27px;
    height: 27px;
    padding: 0;
    color: var(--muted);
    background: transparent;
    border: 0;
    border-radius: 7px;
    font-size: 18px;
}

.column-add:hover {
    color: var(--accent);
    background: var(--surface);
}

.column-note {
    margin: 4px 0 14px 16px;
    color: var(--muted);
    font-size: 9px;
}

.task-column {
    min-height: 160px;
}

.task-card {
    position: relative;
    margin: 10px 0;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: none;
    cursor: grab;
    transition: 160ms ease;
}

.task-card:hover {
    border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
    box-shadow: none;
}

.task-card.dragging {
    opacity: 0.45;
    transform: rotate(2deg);
}

.task-card.completed {
    opacity: 0.72;
}

.task-card.completed .task-card-title {
    color: var(--muted);
    text-decoration: line-through;
}

.task-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.category-tag,
.energy-tag,
.priority-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 9px;
    font-weight: 650;
}

.category-tag {
    padding: 0;
    color: var(--muted);
    background: transparent;
}

.category-tag.personal {
    --category-color: var(--coral);
}

.category-tag.study {
    --category-color: var(--blue);
}

.category-tag.work {
    --category-color: var(--yellow);
}

.category-tag::before {
    content: "";
    width: 6px;
    height: 6px;
    background: var(--category-color);
    border-radius: 50%;
}

.task-menu-button {
    width: 25px;
    height: 25px;
    padding: 0;
    color: var(--muted);
    background: transparent;
    border: 0;
    border-radius: 6px;
    letter-spacing: 1px;
}

.task-menu-button:hover {
    background: var(--surface-soft);
}

.task-menu {
    position: absolute;
    top: 42px;
    right: 10px;
    z-index: 5;
    min-width: 125px;
    padding: 5px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 9px;
    box-shadow: var(--shadow);
}

.task-menu button {
    width: 100%;
    padding: 7px 9px;
    color: var(--muted);
    background: transparent;
    border: 0;
    border-radius: 6px;
    font-size: 10px;
    text-align: left;
}

.task-menu button:hover {
    color: var(--ink);
    background: var(--surface-soft);
}

.task-menu button.danger {
    color: var(--danger);
}

.task-card-title {
    margin: 11px 0 0;
    color: var(--ink);
    font-size: 13px;
    font-weight: 750;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.task-card-notes {
    display: -webkit-box;
    margin: 6px 0 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.task-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 13px;
    padding-top: 11px;
    border-top: 1px solid var(--line);
}

.task-date {
    margin-right: auto;
    color: var(--muted);
    font-size: 9px;
}

.task-date.overdue {
    color: var(--danger);
    font-weight: 750;
}

.task-date.today {
    color: var(--coral);
    font-weight: 750;
}

.priority-badge {
    width: 8px;
    height: 8px;
    padding: 0;
    border-radius: 50%;
}

.priority-badge.low {
    background: var(--green);
}

.priority-badge.medium {
    background: var(--yellow);
}

.priority-badge.high {
    background: var(--coral);
}

.energy-tag {
    padding: 0;
    color: var(--muted);
    background: transparent;
}

.complete-button {
    width: 21px;
    height: 21px;
    display: grid;
    place-items: center;
    padding: 0;
    color: transparent;
    background: var(--surface);
    border: 1.5px solid var(--line);
    border-radius: 50%;
    font-size: 10px;
}

.complete-button:hover {
    border-color: var(--green);
}

.complete-button.checked {
    color: #fff;
    background: var(--green);
    border-color: var(--green);
}

.column-empty {
    min-height: 130px;
    display: grid;
    place-items: center;
    padding: 20px;
    color: var(--muted);
    border: 1px dashed var(--line);
    border-radius: var(--radius-md);
    font-size: 10px;
    text-align: center;
}

/* List view */

.list-view {
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
}

.list-header,
.list-task {
    display: grid;
    grid-template-columns: minmax(220px, 2fr) minmax(90px, 0.7fr) minmax(100px, 0.8fr) minmax(90px, 0.7fr) 36px;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
}

.list-header {
    color: var(--muted);
    background: var(--surface-soft);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.list-task {
    border-top: 1px solid var(--line);
    font-size: 11px;
}

.list-task:first-child {
    border-top: 0;
}

.list-task:hover {
    background: color-mix(in srgb, var(--surface-soft) 55%, transparent);
}

.list-title-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.list-title-cell strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.list-task.completed .list-title-cell strong {
    color: var(--muted);
    text-decoration: line-through;
}

.list-actions {
    position: relative;
}

/* Empty state */

.empty-state {
    min-height: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    text-align: center;
}

.empty-state h3 {
    margin: 0 0 6px;
    font-size: 17px;
}

.empty-state p {
    max-width: 350px;
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}

.empty-state button {
    margin-top: 18px;
    padding: 10px 15px;
    color: #fff;
    background: var(--accent);
    border: 0;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 750;
}

/* Modals and forms */

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 20px;
    overflow-y: auto;
    background: rgba(26, 29, 25, 0.52);
    backdrop-filter: blur(5px);
}

.modal-card,
.help-card,
.focus-card {
    width: min(570px, 100%);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    box-shadow: 0 30px 90px rgba(20, 23, 19, 0.28);
    animation: modal-in 180ms ease-out;
}

@keyframes modal-in {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 23px 26px 18px;
    border-bottom: 1px solid var(--line);
}

.modal-header h2 {
    margin: 0;
    font-size: 21px;
    font-weight: 700;
}

#task-form {
    padding: 21px 26px 25px;
}

.form-field {
    position: relative;
    display: block;
    margin-bottom: 16px;
}

.form-field > span,
.choice-field legend {
    display: block;
    margin-bottom: 7px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.3px;
}

.form-field em {
    color: var(--muted);
    font-style: normal;
    font-weight: 500;
}

.form-field input,
.form-field textarea,
.form-field select {
    width: 100%;
    padding: 10px 11px;
    border-radius: 9px;
    outline: 0;
    font-size: 11px;
    transition: 140ms ease;
}

.form-field input,
.form-field select {
    height: 41px;
}

.form-field textarea {
    min-height: 76px;
    resize: vertical;
    line-height: 1.5;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(109, 98, 232, 0.1);
}

.form-field > small {
    position: absolute;
    right: 8px;
    bottom: 8px;
    color: var(--muted);
    background: var(--surface);
    font-size: 8px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 13px;
}

.choice-field {
    margin: 0 0 16px;
    padding: 0;
    border: 0;
}

.segmented-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
}

.segmented-options input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.segmented-options label > span {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 9px;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
}

.segmented-options input:checked + span {
    color: var(--accent);
    background: var(--accent-soft);
    border-color: var(--accent);
}

.segmented-options i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.segmented-options i.low {
    background: var(--green);
}

.segmented-options i.medium {
    background: var(--yellow);
}

.segmented-options i.high {
    background: var(--coral);
}

.form-message {
    min-height: 15px;
    color: var(--danger);
    font-size: 10px;
}

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

.primary-button,
.secondary-button {
    min-height: 40px;
    padding: 0 16px;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 750;
}

.primary-button {
    color: #fff;
    background: var(--accent);
    border: 1px solid var(--accent);
}

.primary-button:hover {
    background: var(--accent-dark);
}

.secondary-button {
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--line);
}

.secondary-button:hover {
    color: var(--ink);
    background: var(--surface-soft);
}

.focus-card {
    position: relative;
    width: min(460px, 100%);
    padding: 28px 36px 30px;
    overflow-x: hidden;
    overflow-y: auto;
    text-align: center;
}

.focus-card .focus-close {
    position: absolute;
    z-index: 5;
    top: 16px;
    right: 16px;
}

.focus-card h2 {
    margin: 0;
    font-size: 21px;
    font-weight: 700;
}

.focus-card > #focus-task-name {
    max-width: 330px;
    margin: 8px auto 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.focus-duration-panel {
    width: min(360px, 100%);
    margin: 19px auto 0;
    padding: 13px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 13px;
    text-align: left;
}

.focus-duration-label {
    display: block;
    margin-bottom: 9px;
    color: var(--ink);
    font-size: 10px;
    font-weight: 800;
    text-align: center;
}

.focus-presets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.focus-preset {
    min-height: 34px;
    padding: 0 5px;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 9px;
    font-weight: 750;
}

.focus-preset:hover,
.focus-preset.active {
    color: var(--accent);
    background: var(--accent-soft);
    border-color: var(--accent);
}

.custom-focus-row {
    display: grid;
    grid-template-columns: auto 58px auto minmax(70px, 1fr);
    align-items: center;
    gap: 7px;
    margin-top: 9px;
}

.custom-focus-row label,
.custom-focus-row > span {
    color: var(--muted);
    font-size: 9px;
    font-weight: 650;
}

.custom-focus-row input {
    width: 58px;
    height: 34px;
    padding: 0 6px;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    outline: 0;
    font-size: 10px;
    text-align: center;
}

.custom-focus-row input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(109, 98, 232, 0.1);
}

.custom-focus-row button {
    height: 34px;
    padding: 0 10px;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 800;
}

.custom-focus-row button:hover {
    border-color: var(--accent);
}

.focus-duration-hint {
    display: block;
    min-height: 11px;
    margin-top: 7px;
    color: var(--muted);
    font-size: 8px;
    text-align: center;
}

.focus-duration-hint.error {
    color: var(--danger);
}

.focus-timer {
    margin: 18px 0;
    font-size: 48px;
    font-weight: 300;
    font-variant-numeric: tabular-nums;
    letter-spacing: -2px;
}

.focus-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.focus-card > small {
    display: block;
    margin-top: 18px;
    color: var(--muted);
    font-size: 9px;
}

.help-card {
    width: min(440px, 100%);
}

.shortcut-list {
    padding: 15px 26px 24px;
}

.shortcut-list > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    color: var(--muted);
    border-bottom: 1px solid var(--line);
    font-size: 11px;
}

.shortcut-list > div:last-child {
    border-bottom: 0;
}

/* Toast notification */

.toast {
    position: fixed;
    z-index: 200;
    right: 24px;
    bottom: 24px;
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 220px;
    padding: 12px 14px;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
    font-size: 11px;
    font-weight: 650;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: 180ms ease;
}

.toast.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.toast > span:first-child {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    color: var(--green);
    background: var(--green-soft);
    border-radius: 50%;
}

.toast button {
    margin-left: auto;
    padding: 0;
    color: var(--accent);
    background: transparent;
    border: 0;
    font-size: 10px;
    font-weight: 800;
}

/* Responsive layout */

@media (max-width: 820px) {
    .app-shell {
        display: block;
    }

    .sidebar {
        transform: translateX(-105%);
        box-shadow: var(--shadow);
        transition: transform 190ms ease;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-close,
    .menu-button {
        display: inline-grid;
        place-items: center;
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 25;
        width: 100%;
        height: 100%;
        padding: 0;
        background: rgba(20, 23, 19, 0.42);
        border: 0;
    }

    .sidebar-backdrop.visible {
        display: block;
    }

    .main-content {
        width: 100%;
    }

    .topbar {
        padding: 0 20px;
    }

    .search-box {
        width: min(390px, 100%);
    }

    .board-view {
        grid-template-columns: 1fr;
    }

    .board-column {
        min-height: auto;
    }

    .task-column {
        min-height: 80px;
    }
}

@media (max-width: 600px) {
    .topbar {
        gap: 10px;
        min-height: 64px;
    }

    .search-box kbd,
    .date-badge {
        display: none;
    }

    .search-box {
        flex: 1;
        width: auto;
        min-width: 0;
    }

    .topbar-actions {
        flex: 0 0 auto;
        display: flex;
        gap: 7px;
    }

    .topbar-theme-button,
    .focus-pill {
        width: 36px;
        min-width: 36px;
        height: 36px;
        min-height: 36px;
        display: grid;
        place-items: center;
        padding: 0;
        border-radius: 50%;
    }

    .focus-pill.timer-active {
        width: 76px;
        min-width: 76px;
        padding: 0 9px;
        border-radius: 18px;
    }

    .focus-pill.timer-active .focus-live {
        width: 100%;
        justify-content: center;
    }

    .focus-pill.timer-active .focus-live-value {
        text-align: center;
    }

    .focus-pill.timer-active .focus-live-value strong {
        font-size: 11px;
    }

    .focus-pill.timer-active .focus-live-value small {
        font-size: 6px;
    }

    .focus-pill.timer-active .focus-live > i,
    .focus-pill.timer-active .elapsed-value {
        display: none;
    }

    .focus-label {
        display: none;
    }

    .page-content {
        padding: 30px 16px 45px;
    }

    .welcome-row {
        align-items: center;
    }

    .welcome-row h1 {
        font-size: 28px;
    }

    .welcome-copy {
        line-height: 1.5;
    }

    .mobile-add-button {
        flex: 0 0 44px;
        width: 44px;
        height: 44px;
        display: block;
        color: #fff;
        background: var(--accent);
        border: 0;
        border-radius: 50%;
        font-size: 23px;
    }

    .progress-summary {
        margin: 25px 0 30px;
        padding: 14px;
    }

    .workspace-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .workspace-controls {
        width: 100%;
    }

    .filter-select {
        flex: 1;
        min-width: 0;
    }

    .filter-select select {
        width: 100%;
        min-width: 0;
    }

    .view-switcher {
        flex: 0 0 auto;
    }

    .list-header {
        display: none;
    }

    .list-task {
        grid-template-columns: minmax(0, 1fr) 30px;
        gap: 9px;
        padding: 14px;
    }

    .list-task > :not(.list-title-cell):not(.list-actions) {
        display: none;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .modal-backdrop {
        align-items: end;
        padding: 0;
    }

    .modal-card,
    .help-card,
    .focus-card {
        width: 100%;
        max-height: 94vh;
        border-radius: 22px 22px 0 0;
    }

    .modal-header,
    #task-form {
        padding-left: 19px;
        padding-right: 19px;
    }

    .segmented-options label > span {
        font-size: 9px;
    }

    .focus-card {
        padding-right: 20px;
        padding-left: 20px;
    }

    .custom-focus-row {
        grid-template-columns: auto 55px auto minmax(64px, 1fr);
        gap: 5px;
    }

    .toast {
        right: 14px;
        bottom: 14px;
        left: 14px;
    }

    body.focus-panel-open .toast {
        top: 74px;
        bottom: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* =========================================================
   ENERGY-AWARE ORBIT UPGRADE
   These rules extend the original design system and reuse its
   colors, spacing, task board, modal and responsive foundations.
   ========================================================= */

:root {
    --sidebar-collapsed-width: 76px;
}

.brand-mark {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 0;
}

.brand-mark::before {
    content: none;
}

.brand-copy {
    min-width: 0;
}

.sidebar-collapse {
    width: 32px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    margin-left: auto;
}

.sidebar-collapse span {
    font-size: 19px;
    transition: transform 180ms ease;
}

body.sidebar-collapsed .app-shell {
    grid-template-columns: var(--sidebar-collapsed-width) minmax(0, 1fr);
}

body.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed-width);
    padding-right: 12px;
    padding-left: 12px;
}

body.sidebar-collapsed .brand {
    justify-content: center;
    padding-right: 0;
    padding-left: 0;
}

body.sidebar-collapsed .brand-copy,
body.sidebar-collapsed .sidebar-button-label,
body.sidebar-collapsed .add-task-button kbd,
body.sidebar-collapsed .nav-label,
body.sidebar-collapsed .nav-item-label,
body.sidebar-collapsed .theme-button #theme-label {
    display: none;
}

body.sidebar-collapsed .brand-mark {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
}

body.sidebar-collapsed .sidebar-collapse {
    position: absolute;
    top: 61px;
    right: -14px;
    background: var(--surface);
    box-shadow: var(--small-shadow);
}

body.sidebar-collapsed .sidebar-collapse span {
    transform: rotate(180deg);
}

body.sidebar-collapsed .add-task-button {
    justify-content: center;
    min-height: 44px;
    padding: 0;
}

body.sidebar-collapsed .add-task-button > span {
    margin: 0;
}

body.sidebar-collapsed .main-nav {
    margin-top: 20px;
}

body.sidebar-collapsed .nav-label-spaced {
    margin-top: 18px;
}

body.sidebar-collapsed .nav-item {
    position: relative;
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 0;
}

body.sidebar-collapsed .nav-count {
    position: absolute;
    top: 3px;
    right: 3px;
    min-width: 16px;
    color: var(--muted);
    font-size: 8px;
}

body.sidebar-collapsed .sidebar-footer {
    flex-direction: column;
}

body.sidebar-collapsed .theme-button {
    flex: none;
    width: 38px;
    min-height: 38px;
}

body.sidebar-collapsed .theme-button span:first-child {
    margin: 0;
}

/* Search and quick capture */

.capture-area {
    position: relative;
    width: min(470px, 48vw);
}

.search-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-row .search-box {
    width: 100%;
}

.quick-add-toggle {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    padding: 0;
    color: var(--accent);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 18px;
}

.quick-add-toggle:hover,
.quick-add-toggle[aria-pressed="true"] {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
}

.capture-area.quick-mode .search-box {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.quick-capture-preview {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 60;
    width: min(430px, calc(100vw - 32px));
    padding: 15px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.quick-capture-preview > span,
.quick-capture-preview > strong,
.quick-capture-preview > small {
    display: block;
}

.quick-capture-mode {
    margin-bottom: 7px;
    color: var(--accent);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.quick-capture-preview > strong {
    font-size: 13px;
    line-height: 1.4;
}

.quick-capture-preview > small {
    margin-top: 5px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.45;
}

.quick-capture-preview > p {
    min-height: 12px;
    margin: 7px 0 0;
    color: var(--danger);
    font-size: 9px;
}

.quick-capture-preview > div {
    display: flex;
    justify-content: flex-end;
    gap: 7px;
    margin-top: 10px;
}

.quick-capture-preview button {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 750;
}

#quick-capture-cancel {
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--line);
}

#quick-capture-add {
    color: #fff;
    background: var(--accent);
    border: 1px solid var(--accent);
}

#quick-capture-add:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Compact daily header */

.page-content {
    padding-top: 27px;
}

.daily-header {
    padding: 18px 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
}

.daily-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.daily-header h1 {
    margin: 0;
    font-size: clamp(22px, 2.4vw, 30px);
    letter-spacing: -0.7px;
    line-height: 1.15;
}

.daily-header .date-line {
    margin: 4px 0 0;
    white-space: nowrap;
}

.daily-stat-line {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 10px;
}

.daily-stat-line strong {
    color: var(--ink);
}

.energy-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 15px;
    padding-top: 13px;
    border-top: 1px solid var(--line);
}

.energy-selector > span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 750;
}

.energy-selector > div {
    display: flex;
    padding: 3px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 9px;
}

.energy-selector button {
    min-width: 66px;
    min-height: 30px;
    padding: 0 10px;
    color: var(--muted);
    background: transparent;
    border: 0;
    border-radius: 7px;
    font-size: 9px;
    font-weight: 750;
}

.energy-selector button:hover {
    color: var(--ink);
}

.energy-selector button[aria-pressed="true"] {
    color: var(--accent);
    background: var(--surface);
    box-shadow: 0 2px 8px rgba(20, 23, 19, 0.08);
}

/* Recommendation and Daily Momentum */

.daily-insights {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(240px, 0.8fr);
    gap: 14px;
    margin: 14px 0 28px;
}

.recommendation-card,
.momentum-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
}

.recommendation-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 17px 18px;
    border-left: 3px solid var(--accent);
}

.recommendation-copy {
    min-width: 0;
}

.recommendation-copy > p,
.momentum-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 8px;
    font-weight: 850;
    letter-spacing: 0.9px;
    text-transform: uppercase;
}

.recommendation-copy h2 {
    margin: 6px 0 0;
    overflow-wrap: anywhere;
    font-size: 16px;
    line-height: 1.25;
}

.recommendation-copy > span,
.recommendation-copy > small {
    display: block;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.45;
}

.recommendation-copy > span {
    margin-top: 6px;
}

.recommendation-copy > small {
    margin-top: 3px;
}

.recommendation-card .primary-button {
    flex: 0 0 auto;
}

.recommendation-card .primary-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.momentum-card {
    padding: 15px 16px;
}

.momentum-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
}

.momentum-heading strong {
    display: block;
    margin-top: 3px;
    font-size: 23px;
}

.momentum-heading > span,
.momentum-card > small {
    color: var(--muted);
    font-size: 8px;
}

.momentum-track {
    height: 6px;
    margin: 12px 0 7px;
    overflow: hidden;
    background: var(--surface-soft);
    border-radius: 3px;
}

.momentum-track > span {
    width: 0;
    height: 100%;
    display: block;
    background: var(--accent);
    border-radius: inherit;
    transition: width 180ms ease;
}

/* Workspace and task cards */

.workspace-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.workspace-layout.focus-active {
    grid-template-columns: minmax(0, 1fr) 300px;
}

.task-workspace {
    min-width: 0;
}

.task-card {
    cursor: default;
}

.task-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--category-color, var(--line));
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.task-card.personal {
    --category-color: var(--coral);
}

.task-card.study {
    --category-color: var(--blue);
}

.task-card.work {
    --category-color: var(--yellow);
}

.task-card.dragging {
    opacity: 0.5;
    transform: rotate(0.6deg) scale(0.985);
}

.board-column.drag-over {
    transform: scale(1.01);
}

.board-column.drag-over .task-column::after {
    content: "Drop task here";
    min-height: 58px;
    display: grid;
    place-items: center;
    margin-top: 10px;
    color: var(--accent);
    border: 1px dashed var(--accent);
    border-radius: var(--radius-md);
    font-size: 9px;
    font-weight: 750;
}

.task-card-main {
    padding-right: 2px;
}

.task-card-title {
    margin-top: 9px;
}

.task-card-info {
    display: grid;
    gap: 5px;
    margin-top: 12px;
}

.task-info-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    color: var(--muted);
    font-size: 9px;
}

.task-info-line .separator {
    color: var(--line);
}

.task-priority-text.high,
.task-energy-text.high {
    color: var(--coral);
}

.task-priority-text.medium {
    color: color-mix(in srgb, var(--yellow) 80%, var(--ink));
}

.task-energy-text.low {
    color: var(--green);
}

.task-card-actions {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.focus-task-button {
    min-height: 31px;
    padding: 0 11px;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 800;
}

.focus-task-button:hover {
    border-color: var(--accent);
}

.task-card-actions .task-menu-button {
    width: auto;
    min-height: 31px;
    margin-left: auto;
    padding: 0 9px;
    border: 1px solid var(--line);
}

.task-card-actions .complete-button {
    width: 25px;
    height: 25px;
}

.task-menu {
    top: auto;
    right: 12px;
    bottom: 47px;
    min-width: 145px;
}

.task-menu button[disabled] {
    opacity: 0.45;
    cursor: default;
}

.list-task {
    cursor: pointer;
}

.list-task-due {
    display: grid;
    gap: 3px;
}

.list-task-due small {
    color: var(--muted);
    font-size: 8px;
}

/* Better empty state */

.empty-state {
    min-height: 0;
    padding: 30px 20px;
}

.empty-workflow {
    width: min(620px, 100%);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 9px;
    margin-top: 20px;
}

.empty-workflow > div {
    padding: 13px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 10px;
    text-align: left;
}

.empty-workflow strong,
.empty-workflow span {
    display: block;
}

.empty-workflow strong {
    color: var(--accent);
    font-size: 9px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.empty-workflow span {
    margin-top: 5px;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.45;
}

/* Focus Orbit panel */

.focus-panel {
    position: sticky;
    top: 90px;
    padding: 19px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--small-shadow);
    text-align: center;
}

.focus-close {
    position: absolute;
    top: 11px;
    right: 11px;
    width: 32px;
    height: 32px;
}

.focus-eyebrow {
    margin: 2px 0 0;
    color: var(--accent);
    font-size: 8px;
    font-weight: 850;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.focus-panel h2 {
    margin: 8px 34px 0;
    overflow-wrap: anywhere;
    font-size: 16px;
    line-height: 1.3;
}

.focus-panel > #focus-task-name {
    margin: 5px 20px 0;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.45;
}

.focus-ring {
    position: relative;
    width: 174px;
    height: 174px;
    display: grid;
    place-items: center;
    margin: 14px auto 10px;
}

.focus-ring svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.focus-ring circle {
    fill: none;
    stroke-width: 6;
}

.focus-ring-track {
    stroke: var(--surface-soft);
}

.focus-ring-progress {
    stroke: var(--accent);
    stroke-linecap: round;
    stroke-dasharray: 326.73;
    stroke-dashoffset: 326.73;
    transition: stroke-dashoffset 240ms linear;
}

.focus-ring .focus-timer {
    position: relative;
    margin: 0;
    font-size: 31px;
    font-weight: 400;
    letter-spacing: -1px;
}

.focus-task-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    min-height: 22px;
}

.focus-task-meta span {
    padding: 4px 7px;
    color: var(--muted);
    background: var(--surface-soft);
    border-radius: 7px;
    font-size: 8px;
}

.focus-panel .focus-duration-panel {
    width: 100%;
    margin: 12px 0 0;
    padding: 0;
    background: transparent;
    border: 0;
}

.focus-duration-panel summary {
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
    cursor: pointer;
}

.focus-duration-panel[open] summary {
    margin-bottom: 10px;
}

.focus-status {
    min-height: 14px;
    margin: 12px 0 8px;
    color: var(--muted);
    font-size: 9px;
}

.focus-panel .focus-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.complete-focus-button {
    width: 100%;
    min-height: 36px;
    margin-top: 8px;
    color: var(--green);
    background: var(--green-soft);
    border: 1px solid transparent;
    border-radius: 9px;
    font-size: 10px;
    font-weight: 800;
}

.complete-focus-button:hover {
    border-color: var(--green);
}

.complete-focus-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.focus-panel-backdrop {
    display: none;
}

.custom-duration-field[hidden] {
    display: none;
}

/* Menu and toast accessibility */

.task-menu-button[aria-expanded="true"] {
    color: var(--accent);
    background: var(--accent-soft);
}

.toast:focus-within {
    border-color: var(--accent);
}

@media (max-width: 1180px) {
    .workspace-layout.focus-active {
        grid-template-columns: 1fr;
    }

    .workspace-layout.focus-active .focus-panel {
        grid-row: 1;
        position: relative;
        top: auto;
    }

    .focus-panel .focus-ring {
        width: 150px;
        height: 150px;
    }
}

@media (max-width: 900px) {
    .daily-insights {
        grid-template-columns: 1fr;
    }

    .recommendation-card {
        align-items: flex-start;
    }
}

@media (max-width: 820px) {
    body.sidebar-collapsed .app-shell {
        display: block;
    }

    body.sidebar-collapsed .sidebar {
        width: var(--sidebar-width);
        padding: 25px 18px 18px;
    }

    body.sidebar-collapsed .brand {
        justify-content: flex-start;
        padding: 0 7px 24px;
    }

    body.sidebar-collapsed .brand-copy,
    body.sidebar-collapsed .sidebar-button-label,
    body.sidebar-collapsed .nav-item-label,
    body.sidebar-collapsed .theme-button #theme-label {
        display: block;
    }

    body.sidebar-collapsed .add-task-button kbd {
        display: inline-block;
    }

    body.sidebar-collapsed .sidebar-collapse {
        display: none;
    }

    body.sidebar-collapsed .add-task-button {
        justify-content: flex-start;
        min-height: 48px;
        padding: 0 14px;
    }

    body.sidebar-collapsed .add-task-button > span:first-child {
        margin-right: 9px;
    }

    body.sidebar-collapsed .nav-item {
        grid-template-columns: 25px minmax(0, 1fr) auto;
        justify-items: stretch;
        padding: 0 11px;
    }

    body.sidebar-collapsed .nav-count {
        position: static;
        min-width: 22px;
    }

    body.sidebar-collapsed .sidebar-footer {
        flex-direction: row;
    }

    body.sidebar-collapsed .theme-button {
        flex: 1;
        width: auto;
    }

    .sidebar-collapse {
        display: none;
    }

    .capture-area {
        width: min(430px, 100%);
    }
}

@media (max-width: 600px) {
    .topbar {
        padding: 0 12px;
    }

    .capture-area {
        flex: 1;
        min-width: 0;
    }

    .quick-add-toggle {
        flex-basis: 36px;
        width: 36px;
        height: 36px;
    }

    .quick-capture-preview {
        position: fixed;
        top: 70px;
        right: 12px;
        left: 12px;
        width: auto;
    }

    .daily-heading-row {
        gap: 10px;
        flex-direction: column-reverse;
    }

    .daily-header .date-line {
        margin: 0;
    }

    .energy-selector {
        align-items: flex-start;
        flex-direction: column;
    }

    .energy-selector > div {
        width: 100%;
    }

    .energy-selector button {
        flex: 1;
        min-width: 0;
    }

    .recommendation-card {
        flex-direction: column;
    }

    .recommendation-card .primary-button {
        width: 100%;
    }

    .empty-workflow {
        grid-template-columns: 1fr;
    }

    .focus-panel {
        position: fixed !important;
        z-index: 160;
        inset: auto 0 0;
        max-height: 92vh;
        padding: 20px;
        overflow-y: auto;
        border-radius: 20px 20px 0 0;
    }

    .focus-panel-backdrop {
        position: fixed;
        inset: 0;
        z-index: 150;
        display: block;
        width: 100%;
        height: 100%;
        padding: 0;
        background: rgba(20, 23, 19, 0.52);
        border: 0;
    }

    .workspace-layout.focus-active {
        display: block;
    }

    .focus-panel .focus-ring {
        width: 142px;
        height: 142px;
    }

    .duration-grid {
        gap: 0;
    }
}
