/* ============================================
   To-Do App — Global Styles
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Handlee&family=Montserrat:wght@500;700&family=Roboto:wght@300;400;500;700&display=swap');

/* Brand Colors */
:root {
    --color-blue: #1e9acd;
    --color-orange: #d16423;
}

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

html, body {
    font-family: 'Roboto', sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: #333;
    background: #F8F8F8;
}

/* ============================================
   Login Page
   ============================================ */

.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}

.login-card {
    width: 100%;
    max-width: 360px;
    background: #f7f5ef;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 2rem;
}

.login-logo {
    display: block;
    margin: 0 auto 1rem;
    max-width: 140px;
    height: auto;
}

.login-card h1 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
    color: #222;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    font-size: 0.95rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.15s;
}

.form-group input:focus {
    border-color: var(--color-blue);
    box-shadow: 0 0 0 2px rgba(30, 154, 205, 0.15);
}

.login-btn {
    width: 100%;
    padding: 0.65rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: #fff;
    background: var(--color-blue);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: background 0.15s;
}

.login-btn:hover {
    background: #1a8ab8;
}

.login-btn:disabled {
    background: #7ec4e0;
    cursor: not-allowed;
}

.login-error {
    display: none;
    margin-top: 1rem;
    padding: 0.6rem 0.75rem;
    font-size: 0.85rem;
    color: #9B2C2C;
    background: #FFF5F5;
    border: 1px solid #FEB2B2;
    border-radius: 4px;
}

.login-error.visible {
    display: block;
}

/* ============================================
   App Layout (placeholder for daily view)
   ============================================ */

.app-container {
    display: none;
    min-height: 100vh;
    flex-direction: column;
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0.8rem 1.2rem;
    background: #f7f5ef;
    border-bottom: 1px solid #d9d2c0;
}

.app-logo {
    height: 26px;
    width: auto;
    cursor: pointer;
}

.app-header .user-info {
    position: absolute;
    right: max(1.2rem, calc((100vw - 1700px) / 2 + 1.2rem));
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: #666;
}

.header-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.5rem;
    font-size: 0.78rem;
    color: #888;
    background: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    line-height: 1.4;
}

.header-icon-btn:hover {
    color: var(--color-blue);
    border-color: var(--color-blue);
}

.header-icon-btn--admin {
    font-size: 0.72rem;
    letter-spacing: 0.02em;
}

.logout-btn {
    padding: 0.3rem 0.7rem;
    font-size: 0.8rem;
    color: #fff;
    background: var(--color-blue);
    border: 1px solid var(--color-blue);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
}

.logout-btn:hover {
    color: #fff;
    background: var(--color-orange);
    border-color: var(--color-orange);
}

/* ============================================
   Daily View
   ============================================ */

.daily-view {
    display: flex;
    flex-direction: column;
    background: #F8F8F8;
    max-width: 1700px;
    margin: 0 auto;
    width: 100%;
}

/* Navigation arrows */
.daily-nav {
    display: flex;
    justify-content: space-between;
    padding: 6px 12px;
}

.daily-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-size: 0.85rem;
    color: #999;
    background: none;
    border: 1px solid #CCC;
    border-radius: 4px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}

.daily-nav-btn:hover {
    color: var(--color-blue);
    border-color: var(--color-blue);
}

/* 5-column grid */
.daily-columns {
    display: flex;
    align-items: stretch;
    gap: 12px;
    padding: 0 12px;
}

.daily-columns .day-column {
    flex: 1;
}

/* Single day column */
.day-column {
    display: flex;
    flex-direction: column;
    background: #fff;
    padding: 0 7px;
    border-top: 3px solid var(--color-blue);
}

.day-column.is-today {
    background: #FFFFFF;
    border-top-color: var(--color-orange);
}

/* Date header */
.day-header {
    padding: 0.6rem 0.75rem 0.8rem;
    text-align: center;
    user-select: none;
}

.day-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.0rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-blue);
}

.day-column.is-today .day-label {
    color: var(--color-orange);
}

.day-date {
    font-size: 0.7rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-top: 0.1rem;
}

/* Task lines area */
.day-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0;
}

/* Individual ruled line */
.day-line {
    position: relative;
    display: flex;
    align-items: stretch;
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0 0.6rem;
    border-bottom: 1px solid #E8E8E8;
}

.day-line[data-task-id] {
    cursor: grab;
}

.day-line.dragging {
    opacity: 0.45;
}

.day-line.drop-target {
    border-top: 2px solid var(--color-blue);
}

/* Task on a line */
.task-item {
    flex: 1;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    min-height: 34px;
    cursor: pointer;
}

.task-title {
    flex: 1;
    display: block;
    font-family: 'Handlee', cursive;
    font-size: 1.0rem;
    color: #444;
    line-height: 1.35;
    padding: 3px 0 1px;
    overflow: visible;
}

/* Priority: orange star before title + darker text */
.task-item.is-priority .task-title::before {
    content: '\2605';
    color: var(--color-orange);
    margin-right: 6px;
}

.task-item.is-priority .task-title {
    color: #000000;
}

/* Completed: line-through + faded */
.task-item.is-completed .task-title {
    text-decoration: line-through;
    opacity: 0.6;
}

/* Hover actions */
.task-actions {
    display: flex;
    align-items: center;
    gap: 0;
    opacity: 0;
    transition: opacity 0.15s;
}

.task-item:hover .task-actions,
.day-line:hover .task-actions {
    opacity: 1;
}

.task-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    font-size: 0.65rem;
    color: #999;
    background: none;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.15s;
    padding: 0;
}

.task-action-btn:hover {
    color: #333;
    background: #eee;
}

.task-action-btn.priority-active {
    color: var(--color-orange);
}

.task-action-btn.delete-btn:hover {
    color: #C53030;
    background: #FFF5F5;
}

/* Inline task input */
.task-input {
    flex: 1;
    font-family: 'Handlee', cursive;
    font-size: 0.9rem;
    color: #333;
    padding: 4px 0;
    border: none;
    outline: none;
    background: transparent;
    line-height: 1.4;
}

/* Character counter */
.char-counter {
    font-size: 0.7rem;
    color: #999;
    margin-left: 0.5rem;
    white-space: nowrap;
}

/* Empty line (clickable to create) */
.day-line.empty-line {
    cursor: text;
}

.day-line.empty-line:last-child {
    flex: 1;
}

.day-column.is-past .day-line.empty-line {
    cursor: default;
}

/* ============================================
   App Main Layout (split pane)
   ============================================ */

.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.daily-pane {
    display: flex;
    padding-bottom: 40px;
}

.bottom-pane {
    display: flex;
    max-width: 1700px;
    margin: 0 auto;
    margin-bottom: 40px;
    width: 100%;
}

.projects-pane {
    flex: 2;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    margin-left: 12px;
    margin-right: 12px;
}

.biglist-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #F8F8F8;
    overflow-y: auto;
}

/* ============================================
   Project Pane — Tabs
   ============================================ */

.project-tabs {
    display: flex;
    align-items: stretch;
    background: transparent;
    border-bottom: 1px solid #ddd;
    overflow-x: hidden;
    min-height: 40px;
}

.tab-scroll-arrows {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 0 6px;
    margin-left: auto;
    flex-shrink: 0;
}

.tab-scroll-btn {
    background: none;
    border: 1px solid #CCC;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
    color: #999;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: border-color 0.15s, color 0.15s;
}

.tab-scroll-btn:hover {
    border-color: var(--color-blue);
    color: var(--color-blue);
}

.project-tab {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 12px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    color: var(--color-blue);
    background: none;
    border: none;
    border-right: 1px solid #DDD;
    border-top: 3px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
    opacity: 0.8;
}

.project-tab:hover {
    color: var(--color-blue);
    background: #EBEBEB;
    opacity: 1;
}

.project-tab.active {
    color: var(--color-orange);
    background: #fff;
    border-top-color: var(--color-orange);
    opacity: 1;
}

.project-tab.active:hover {
    color: var(--color-orange);
    background: #EBEBEB;
}


.project-tab .badge {
    font-size: 0.75rem;
    color: var(--color-blue);
    font-weight: 600;
}

/* Add project tab */
.project-tab-add {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    font-size: 1.1rem;
    color: #999;
    background: none;
    border: none;
    border-top: 3px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
}

.project-tab-add:hover {
    color: var(--color-blue);
    background: #EBEBEB;
}

/* Tab inline input (for creating/renaming) */
.project-tab-input {
    font-family: inherit;
    font-size: 0.85rem;
    padding: 4px 8px;
    border: 1px solid var(--color-blue);
    border-radius: 3px;
    outline: none;
    min-width: 100px;
    max-width: 200px;
}

/* ============================================
   Project Pane — Task List
   ============================================ */

.project-task-list {
    overflow-y: auto;
    background: #fff;
    /* Legacy: single flat task list replaced by list-task-area in list columns */
}

/* Reuse .day-line and .task-item styles from daily view */
.project-line {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 34px;
    padding: 0 0.75rem;
    border-bottom: 1px solid #E8E8E8;
    cursor: pointer;
}

.project-line:hover {
    background: #F8F9FA;
}

.project-line.empty-line {
    cursor: text;
}


.project-line.empty-line:hover {
    background: #F0F4F8;
}

/* Project task item */
.project-task {
    flex: 1;
    display: flex;
    align-items: center;
    min-height: 34px;
    cursor: pointer;
}

.project-task .task-title {
    flex: 1;
    font-size: 1.05rem;
    color: #333;
    line-height: 1.4;
    padding: 4px 0;
}

.project-task.is-priority .task-title::before {
    content: '\2605';
    color: var(--color-orange);
    margin-right: 6px;
}

.project-task.is-priority .task-title {
    font-weight: 600;
    color: #000;
}

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

/* Row icon area: priority btn + piped action cells */
.task-row-icons {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 4px;
}


/* Piped action cell container */
.task-icon-cells {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* Individual icon cell — fixed width so layout never shifts */
.task-icon-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 34px;
}

/* Vertical pipe between cells */
.task-icon-pipe {
    width: 1px;
    height: 12px;
    background: #DDD;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.15s;
}

.project-line:hover .task-icon-pipe {
    opacity: 1;
}

/* Action buttons inside cells — hover only */
.task-icon-cell .assign-btn,
.task-icon-cell .delete-btn {
    opacity: 0;
    transition: opacity 0.15s;
}

.project-line:hover .task-icon-cell .assign-btn,
.project-line:hover .task-icon-cell .delete-btn {
    opacity: 1;
}

/* Ownership cell: always shows assignee initials */
.task-icon-cell.ownership-cell {
    /* no opacity override — content always visible */
}

/* Assignee badge (square) */
.assignee-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 3px;
    background: #BDBDBD;
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    cursor: default;
    user-select: none;
}

/* Blue badge = assignee has added it to their daily view */
.assignee-circle.assignee-in-daily {
    background: var(--color-blue);
}

/* Another user's task: outline only, no fill */
.assignee-circle.assignee-other {
    background: transparent;
    border: 1.5px solid #BDBDBD;
    color: #BDBDBD;
}

.assignee-circle.assignee-other.assignee-in-daily {
    background: transparent;
    border-color: var(--color-blue);
    color: var(--color-blue);
}

/* ============================================
   List Columns Layout
   ============================================ */

.list-columns-area {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Empty state */
.list-empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 80px;
}

.list-create-first-btn {
    background: none;
    border: 1px dashed #CCC;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 0.9rem;
    color: #888;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.list-create-first-btn:hover {
    border-color: var(--color-blue);
    color: var(--color-blue);
}

/* Columns container — horizontal scroll */
.list-columns {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    height: 100%;
    gap: 12px;
    padding: 8px 8px 8px 0;
}

.list-columns::-webkit-scrollbar {
    height: 4px;
}

.list-columns::-webkit-scrollbar-thumb {
    background: #DDD;
    border-radius: 2px;
}

/* Individual list column */
.list-column {
    display: flex;
    flex-direction: column;
    min-width: 315px;
    flex-shrink: 0;
    background: #fff;
    overflow: hidden;
}

/* Add list column */
.list-add-column {
    min-width: 40px;
    align-items: flex-start;
    justify-content: flex-start;
    background: none;
}

.list-add-btn {
    background: none;
    border: 1px dashed #CCC;
    border-radius: 4px;
    padding: 8px 18px;
     display: flex;
  align-items: center;
    font-size: 0.8rem;
    line-height: 1;
    color: #BBB;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.15s, color 0.15s;
    flex-shrink: 0;
    align-self: flex-start;
}

.list-add-btn:hover {
    border-color: var(--color-blue);
    color: var(--color-blue);
}

/* Input column (during create) */
.list-input-column {
    min-width: 160px;
}

/* List header */
.list-header {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px 4px;
    border-bottom: 2px solid #E8E8E8;
    min-height: 32px;
    flex-shrink: 0;
}

.list-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #444;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    cursor: default;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-sharing-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    cursor: default;
}

.list-gear-btn {
    background: none;
    border: none;
    font-size: 0.85rem;
    color: #AAA;
    cursor: pointer;
    padding: 0 2px;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s;
    flex-shrink: 0;
    line-height: 1;
}

.list-header:hover .list-gear-btn {
    opacity: 1;
}

.list-gear-btn:hover {
    color: var(--color-blue);
}

.list-name-input {
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    color: #444;
    letter-spacing: 0.02em;
    border: 1px solid var(--color-blue);
    border-radius: 3px;
    padding: 2px 6px;
    outline: none;
    flex: 1;
    min-width: 0;
    text-transform: uppercase;
}

/* List task area */
.list-task-area {
    flex: 1;
    overflow-y: auto;
}

/* ============================================
   List Settings Modal
   ============================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    width: 340px;
    max-width: 90vw;
    display: flex;
    flex-direction: column;
    max-height: 80vh;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 10px;
    border-bottom: 1px solid #EEE;
    flex-shrink: 0;
}

.modal-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 1.1rem;
    color: #999;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.modal-close-btn:hover {
    color: #333;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.modal-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.modal-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.modal-body input[type="text"] {
    font-family: inherit;
    font-size: 0.9rem;
    padding: 6px 10px;
    border: 1px solid #DDD;
    border-radius: 4px;
    outline: none;
    width: 100%;
    box-sizing: border-box;
}

.modal-body input[type="text"]:focus {
    border-color: var(--color-blue);
}

.member-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 160px;
    overflow-y: auto;
}

.member-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 0.88rem;
    color: #333;
}

.member-name {
    flex: 1;
}

.member-owner-tag {
    font-size: 0.78rem;
    color: #888;
    font-style: italic;
}

.member-remove-btn {
    background: none;
    border: none;
    color: #CCC;
    cursor: pointer;
    font-size: 1rem;
    padding: 0 2px;
    line-height: 1;
    transition: color 0.15s;
}

.member-remove-btn:hover {
    color: #C53030;
}

.modal-add-member {
    display: flex;
    gap: 6px;
}

.modal-add-member input,
.modal-add-member select {
    flex: 1;
    font-family: inherit;
    font-size: 0.85rem;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
}

.modal-add-member button {
    font-family: inherit;
    font-size: 0.85rem;
    padding: 6px 12px;
    border: 1px solid var(--color-blue);
    border-radius: 4px;
    background: var(--color-blue);
    color: #fff;
    cursor: pointer;
    white-space: nowrap;
}

.modal-add-member button:hover {
    opacity: 0.9;
}

.modal-error {
    font-size: 0.82rem;
    color: #C53030;
    min-height: 16px;
}

.modal-footer {
    padding: 10px 16px 14px;
    border-top: 1px solid #EEE;
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
}

.modal-delete-btn {
    font-family: inherit;
    font-size: 0.85rem;
    padding: 6px 14px;
    border: 1px solid #C53030;
    border-radius: 4px;
    background: none;
    color: #C53030;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.modal-delete-btn:hover {
    background: #C53030;
    color: #fff;
}

/* ============================================
   Assignment Dropdown
   ============================================ */

.assign-dropdown {
    position: fixed;
    background: #fff;
    border: 1px solid #DDD;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    z-index: 1500;
    min-width: 150px;
    max-height: 200px;
    overflow-y: auto;
    padding: 4px 0;
}

.assign-option {
    padding: 7px 14px;
    font-size: 0.88rem;
    color: #333;
    cursor: pointer;
    white-space: nowrap;
}

.assign-option:hover {
    background: #F0F4F8;
}

.assign-option-active {
    font-weight: 600;
    color: var(--color-blue);
}

.assign-divider {
    height: 1px;
    background: #EEE;
    margin: 3px 0;
}

/* ============================================
   Drag & Drop
   ============================================ */

.day-column.drag-over {
    background: #EBF4FF;
    outline: 2px dashed var(--color-blue);
    outline-offset: -2px;
}

.project-task.dragging {
    opacity: 0.5;
}

.project-line.drop-target {
    border-top: 2px solid var(--color-blue);
}

/* Archived (completed > 3 days) section at bottom of a list */
.archive-section {
    margin-top: 8px;
    border-top: 1px solid #EEE;
}

.archive-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 6px 0.75rem;
    background: none;
    border: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    text-align: left;
}

.archive-toggle:hover {
    color: var(--color-blue);
}

.archive-chevron {
    font-size: 0.6rem;
    line-height: 1;
}

.archive-tasks {
    display: flex;
    flex-direction: column;
}

.archive-tasks[hidden] {
    display: none;
}

.archive-tasks .project-line {
    opacity: 0.75;
}

/* ============================================
   Context Menu
   ============================================ */

.context-menu {
    position: fixed;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 4px 0;
    z-index: 1000;
    min-width: 150px;
}

.context-menu-item {
    display: block;
    width: 100%;
    padding: 6px 14px;
    font-size: 0.85rem;
    color: #333;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
}

.context-menu-item:hover {
    background: #F0F4F8;
}

.context-menu-item.danger {
    color: #C53030;
}

.context-menu-item.danger:hover {
    background: #FFF5F5;
}

/* ============================================
   The Big List
   ============================================ */

.biglist-header {
    padding: 0.75rem 1rem 0.5rem;
    text-align: center;
}

.biglist-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-orange);
    margin: 0;
}

.biglist-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0 12px 12px;
}

.biglist-card {
    position: relative;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    padding: 12px;
    min-height: 60px;
}

.biglist-card .card-delete {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #999;
    background: none;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s;
}

.biglist-card:hover .card-delete {
    opacity: 1;
}

.biglist-card .card-delete:hover {
    color: #C53030;
    background: #FFF5F5;
}

.biglist-card .card-content {
    font-family: 'Handlee', cursive;
    font-size: 0.9rem;
    color: #333;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Add card */
.biglist-card.add-card {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #ddd;
    background: transparent;
    box-shadow: none;
    cursor: pointer;
    transition: all 0.15s;
}

.biglist-card.add-card:hover {
    border-color: var(--color-blue);
    background: #F0F8FF;
}

.add-card-icon {
    font-size: 1.5rem;
    color: #ccc;
    transition: color 0.15s;
}

.biglist-card.add-card:hover .add-card-icon {
    color: var(--color-blue);
}

/* Input card (creating new item) */
.biglist-card.input-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-textarea {
    width: 100%;
    min-height: 80px;
    font-family: inherit;
    font-size: 0.9rem;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px;
    resize: vertical;
    outline: none;
    line-height: 1.5;
}

.card-textarea:focus {
    border-color: var(--color-blue);
    box-shadow: 0 0 0 2px rgba(30, 154, 205, 0.15);
}

.card-input-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

.card-save-btn {
    padding: 4px 12px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #fff;
    background: var(--color-blue);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s;
}

.card-save-btn:hover {
    background: #1a8ab8;
}

.card-cancel-btn {
    padding: 4px 12px;
    font-size: 0.8rem;
    color: #666;
    background: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
}

.card-cancel-btn:hover {
    color: #333;
    border-color: #999;
}

/* ============================================
   Mobile Layout (≤ 768px)
   ============================================ */

/* Mobile project bar — hidden on desktop */
.mobile-project-bar {
    display: none;
}

/* Custom dropdown for mobile project/list switching */
.mobile-dropdown {
    position: fixed;
    background: #fff;
    border: 1px solid #DDD;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    z-index: 1500;
    min-width: 160px;
    max-height: 260px;
    overflow-y: auto;
    padding: 4px 0;
}

.mobile-dropdown-item {
    padding: 9px 16px;
    font-size: 0.9rem;
    color: #444;
    cursor: pointer;
    white-space: nowrap;
}

.mobile-dropdown-item:hover {
    background: #F0F4F8;
}

.mobile-dropdown-item--active {
    font-weight: 700;
    color: var(--color-orange);
}

@media (max-width: 768px) {

    /* --- Header --- */
    .app-header .user-info {
        position: static;
        margin-left: auto;
        gap: 0.5rem;
    }

    #user-display {
        display: none;
    }

    /* --- Main layout: stack everything --- */
    .bottom-pane {
        flex-direction: column;
        margin-bottom: 24px;
    }

    .projects-pane {
        flex: none;
        margin: 0;
    }

    .biglist-pane {
        flex: none;
        margin: 0 12px;
    }

    /* --- Daily view: single column --- */
    .daily-columns {
        gap: 0;
        padding: 0 12px;
    }

    .daily-columns .day-column {
        flex: 1;
    }

    /* --- Replace project tabs with mobile project bar --- */
    .project-tabs {
        display: none;
    }

    .mobile-project-bar {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 0 8px;
        min-height: 40px;
        border-bottom: 1px solid #ddd;
        background: transparent;
    }

    .mobile-picker-btn {
        display: flex;
        align-items: center;
        gap: 5px;
        flex: 1;
        padding: 0 8px;
        font-family: 'Montserrat', sans-serif;
        font-size: 0.85rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: var(--color-orange);
        background: none;
        border: none;
        cursor: pointer;
        text-align: left;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .mobile-picker-chevron {
        font-size: 0.65rem;
        flex-shrink: 0;
        color: #999;
    }

    /* --- List name + chevron button (grouped together in list header) --- */
    .mobile-list-picker-btn {
        display: flex;
        align-items: center;
        gap: 4px;
        flex: 1;
        min-width: 0;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
        text-align: left;
        overflow: hidden;
    }

    .mobile-list-picker-btn .list-name {
        flex: none;
    }

    /* --- Mobile list navigation arrows --- */
    .mobile-list-nav-btn {
        background: none;
        border: 1px solid #ddd;
        border-radius: 4px;
        width: 30px;
        height: 28px;
        font-size: 0.85rem;
        color: #666;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .mobile-list-nav-btn:active:not(:disabled) {
        background: #f0f0f0;
    }

    .mobile-list-nav-btn:disabled {
        opacity: 0.3;
        cursor: default;
    }

    .mobile-list-counter {
        font-size: 0.7rem;
        color: #999;
        flex-shrink: 0;
        letter-spacing: 0.02em;
    }

    /* --- List columns: single column, full width --- */
    .list-columns {
        overflow-x: hidden;
        padding: 4px 8px 8px;
    }

    .list-column {
        min-width: 100%;
    }

    /* --- Task action buttons: always visible on touch --- */
    .task-actions {
        opacity: 1;
    }

    .task-icon-pipe {
        opacity: 1;
    }

    .task-icon-cell .assign-btn,
    .task-icon-cell .delete-btn {
        opacity: 1;
    }

    /* Larger tap targets for action buttons */
    .task-action-btn {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }

    /* --- Remove drag cursor on mobile --- */
    .day-line[data-task-id] {
        cursor: default;
    }

    .project-line {
        cursor: default;
    }

    /* --- Big list: single column grid --- */
    .biglist-grid {
        grid-template-columns: 1fr;
    }

    /* --- Gear btn: always visible on mobile --- */
    .list-gear-btn {
        opacity: 1;
    }
}
