/* Caro Tasks v5.0.0 - App Styles (uses tokens from tokens.css) */

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

body {
  padding: 0 0 env(safe-area-inset-bottom);
  -webkit-font-smoothing: antialiased;
}

/* === TOP BAR (header + categories) === */
.top-bar {
    position: sticky;
    top: 0;
    background: var(--paper-color);
    z-index: 50;
    padding-top: env(safe-area-inset-top);
}

/* === HEADER === */
header {
    padding: 16px 20px 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

h1 {
    font-size: 32px;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.header-btns {
    display: flex;
    gap: 8px;
}

.header-btn {
    width: 44px;
    height: 44px;
    border: 2px solid var(--ink-color);
    background: var(--card-surface);
    border-radius: 50%;
    color: var(--ink-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: url(#ink-wobble);
    transition: transform 0.2s ease;
}

.header-btn:active { transform: scale(0.9); }
.header-btn:hover { transform: scale(1.02); }

.header-btn.spinning svg {
    animation: spin 0.8s linear infinite;
}

.header-btn.feedback { color: #9775fa; }
.header-btn.notify { color: var(--ink-secondary); position: relative; }
.header-btn.notify.has-unread { color: var(--wash-red-start); }
.unread-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 10px;
    height: 10px;
    background: var(--wash-red-start);
    border-radius: 50%;
    border: 2px solid var(--paper-color);
}

/* Notification panel */
.notif-panel {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    background: var(--paper-color);
    overflow-y: auto;
    padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
    font-family: var(--font-family);
}

.notif-panel.open { display: block; }

.notif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1.5px solid var(--ink-soft);
    position: sticky;
    top: 0;
    background: var(--paper-color);
}

.notif-header h2 {
    font-size: 20px;
    font-weight: 700;
}

.notif-close {
    width: 44px;
    height: 44px;
    border: 2px solid var(--ink-color);
    background: var(--card-surface);
    border-radius: 50%;
    font-size: 18px;
    color: var(--ink-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notif-list { padding: 8px 20px 40px; }

.notif-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    margin-bottom: 10px;
}

.notif-delete {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 80px;
    background: var(--wash-red-start);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.notif-item {
    position: relative;
    padding: 14px 16px;
    border: 2px solid var(--ink-color);
    border-radius: var(--sketch-radius);
    background: var(--card-surface);
    cursor: pointer;
    transition: transform 0.2s;
    z-index: 1;
    box-shadow: 1px 2px 5px rgba(0,0,0,0.03);
}

.notif-item:active { transform: scale(0.98); }
.notif-item:hover { transform: scale(1.02); }

.notif-item.unread {
    background: rgba(179, 229, 252, 0.3);
    border-color: var(--ink-color);
}

.notif-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.notif-body {
    font-size: 14px;
    color: var(--ink-secondary);
}

.notif-time {
    font-size: 12px;
    color: #bbb;
    margin-top: 6px;
}

.notif-empty {
    text-align: center;
    color: var(--ink-secondary);
    padding: 40px 20px;
}

.notif-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1.5px solid var(--ink-soft);
}

.notif-toggle-label {
    font-size: 15px;
    color: var(--ink-color);
}

.toggle-switch {
    width: 48px;
    height: 28px;
    border-radius: 14px;
    background: #ddd;
    border: none;
    padding: 2px;
    cursor: pointer;
    transition: background 0.2s;
}

.toggle-switch.on { background: var(--wash-green-start); }

.toggle-switch .toggle-knob {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    display: block;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch.on .toggle-knob { transform: translateX(20px); }

/* Cat animations */
.cat-anim {
    position: fixed;
    z-index: 999;
    pointer-events: auto;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
}

@keyframes cat-peek {
    0% { transform: translateY(100%); }
    15% { transform: translateY(0); }
    25% { transform: translateY(0) rotate(-5deg); }
    35% { transform: translateY(0) rotate(5deg); }
    45% { transform: translateY(0) rotate(-3deg); }
    55% { transform: translateY(0); }
    85% { transform: translateY(0); }
    100% { transform: translateY(100%); }
}

@keyframes cat-walk {
    0% { transform: translateX(100vw) scaleX(-1); }
    45% { transform: translateX(-10vw) scaleX(-1); }
    50% { transform: translateX(-10vw) scaleX(1); }
    95% { transform: translateX(100vw) scaleX(1); }
    100% { transform: translateX(100vw) scaleX(1); }
}

@keyframes cat-paw {
    0% { transform: translateY(60px) rotate(0deg); opacity: 0; }
    20% { transform: translateY(0) rotate(-10deg); opacity: 1; }
    40% { transform: translateY(0) rotate(10deg); opacity: 1; }
    60% { transform: translateY(0) rotate(-5deg); opacity: 1; }
    80% { transform: translateY(20px) rotate(0deg); opacity: 0.5; }
    100% { transform: translateY(60px); opacity: 0; }
}

@keyframes cat-sleep {
    0% { opacity: 0; transform: scale(0.5); }
    15% { opacity: 1; transform: scale(1); }
    85% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(0.5); }
}

@keyframes zzz-float {
    0% { opacity: 0; transform: translate(0, 0) scale(0.5); }
    30% { opacity: 1; }
    100% { opacity: 0; transform: translate(15px, -30px) scale(1.2); }
}

@keyframes cat-chase {
    0% { transform: translateX(110vw); }
    100% { transform: translateX(-20vw); }
}

@keyframes butterfly-flutter {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-12px) rotate(5deg); }
    75% { transform: translateY(8px) rotate(-5deg); }
}

@keyframes paw-print {
    0% { opacity: 0; transform: scale(0); }
    30% { opacity: 0.6; transform: scale(1); }
    70% { opacity: 0.6; transform: scale(1); }
    100% { opacity: 0; transform: scale(0.8); }
}

@keyframes cat-stretch {
    0% { transform: scaleX(0.7) translateY(10px); opacity: 0; }
    10% { opacity: 1; }
    20% { transform: scaleX(0.7) translateY(0); }
    40% { transform: scaleX(1.3) translateY(-5px); }
    60% { transform: scaleX(1) translateY(0); }
    80% { transform: scaleX(1) translateY(0); opacity: 1; }
    100% { transform: scaleX(1) translateY(10px); opacity: 0; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* === CATEGORIES === */
.categories {
    display: flex;
    gap: 10px;
    padding: 8px 20px 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.categories::-webkit-scrollbar { display: none; }

.category {
    flex-shrink: 0;
    padding: 12px 20px;
    border-radius: var(--blob-radius);
    font-size: 16px;
    font-weight: 400;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    filter: url(#ink-wobble);
    font-family: var(--font-family);
}

.category:active { transform: scale(0.95); }
.category:hover { transform: scale(1.02); }

.category[data-cat="all"] { background: radial-gradient(circle, rgba(244,235,208,0.6) 0%, transparent 100%); color: var(--ink-color); }
.category[data-cat="groceries"] { background: radial-gradient(circle, rgba(165,214,167,0.5) 0%, transparent 100%); color: #2e7d32; }
.category[data-cat="household"] { background: radial-gradient(circle, rgba(215,204,200,0.6) 0%, transparent 100%); color: #5D4037; }
.category[data-cat="insurance"] { background: radial-gradient(circle, rgba(179,229,252,0.5) 0%, transparent 100%); color: #0277BD; }
.category[data-cat="caro"] { background: radial-gradient(circle, rgba(248,187,208,0.5) 0%, transparent 100%); color: #c2185b; }
.category[data-cat="trash"] { background: radial-gradient(circle, rgba(255,205,210,0.5) 0%, transparent 100%); color: #c62828; }

.category.active {
    box-shadow: 0 0 0 2px currentColor, inset 0 0 15px rgba(0,0,0,0.05);
}

/* === TASK LIST === */
.tasks {
    padding: 0 20px 120px;
}

.task {
    background: var(--card-surface);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1.8px solid var(--ink-color);
    border-radius: var(--sketch-radius);
    padding: 16px;
    margin-bottom: var(--card-gap);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    transition: transform 0.3s ease, box-shadow 0.2s ease, opacity 0.3s;
    box-shadow: 1px 2px 5px rgba(0,0,0,0.03);
    filter: url(#ink-bleed);
}

.task:hover {
    transform: scale(1.02);
    box-shadow: 2px 4px 10px rgba(0,0,0,0.08);
}

.task:active { transform: scale(0.98); }

.task.done {
    opacity: 0;
    transform: scale(0.9);
}

.task.collapsing {
    overflow: hidden;
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: 0;
    border-width: 0;
    height: 0 !important;
    opacity: 0;
    transition: height 0.3s ease, padding 0.3s ease, margin 0.3s ease, border-width 0.3s ease;
}

.checkbox {
    width: 24px;
    height: 24px;
    margin-top: 2px;
    border: 2.5px solid var(--ink-color);
    border-radius: 50%;
    flex-shrink: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    position: relative;
    background: transparent;
}

/* 44px tap target via pseudo-element */
.checkbox::before {
    content: '';
    position: absolute;
    inset: -11px;
}

.checkbox:hover { border-color: var(--wash-green-end); }

.checkbox.checked {
    background: var(--wash-green-start);
    border-color: var(--ink-color);
}

.checkbox svg {
    width: 14px;
    height: 14px;
    stroke: var(--ink-color);
    stroke-width: 3;
    opacity: 0;
}

.checkbox.checked svg { opacity: 1; }

.task-info { flex: 1; }

.task-text {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 6px;
}

.task-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    font-size: 14px;
}

.tag {
    font-size: 14px;
    font-weight: 400;
    padding: 4px 10px;
    border-radius: var(--blob-radius);
    border: none;
}

.tag.paint-dab {
    border-radius: 45% 55% 50% 50% / 50% 50% 45% 55%;
    box-shadow: inset -2px -2px 4px rgba(0,0,0,0.1);
    padding: 4px 16px;
    border: none;
}

.tag.groceries { background: radial-gradient(circle, rgba(165,214,167,0.5) 0%, transparent 100%); color: #2e7d32; }
.tag.household { background: radial-gradient(circle, rgba(215,204,200,0.6) 0%, transparent 100%); color: #5D4037; }
.tag.insurance { background: radial-gradient(circle, rgba(179,229,252,0.5) 0%, transparent 100%); color: #0277BD; }
.tag.caro { background: radial-gradient(circle, rgba(248,187,208,0.5) 0%, transparent 100%); color: #c2185b; }

.from-alex {
    font-size: 12px;
    color: var(--ink-secondary);
}

.new-comment-dot {
    font-size: 14px;
    font-weight: 400;
    padding: 4px 12px;
    border-radius: var(--blob-radius);
    background: radial-gradient(circle, rgba(179,229,252,0.7) 0%, rgba(129,212,250,0.4) 100%);
    color: #0277BD;
    box-shadow: inset 0 0 15px rgba(2,119,189,0.1);
    display: inline-block;
}

/* === EMPTY STATE === */
.empty {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.empty-text {
    font-size: 17px;
    color: var(--ink-secondary);
}

/* === PULL TO REFRESH === */
.pull-indicator {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    height: 0;
    overflow: visible;
    pointer-events: none;
    position: relative;
    z-index: 51;
}
.pull-cat {
    font-size: 28px;
    opacity: 0;
    transform: translateY(-20px) scale(0.3);
    transition: opacity 0.15s, transform 0.15s;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.1));
    line-height: 1;
}
.pull-indicator.pulling .pull-cat {
    opacity: 1;
}
.pull-indicator.triggered .pull-cat {
    opacity: 1;
    animation: pull-cat-spin 0.6s ease-in-out;
}
.pull-sparkles {
    position: absolute;
    pointer-events: none;
    width: 60px;
    height: 30px;
    bottom: -4px;
}
.pull-sparkle {
    position: absolute;
    font-size: 10px;
    opacity: 0;
}
.pull-indicator.triggered .pull-sparkle {
    animation: sparkle-burst 0.8s ease-out forwards;
}
.pull-sparkle:nth-child(1) { left: 0; animation-delay: 0s; }
.pull-sparkle:nth-child(2) { left: 20%; animation-delay: 0.1s; }
.pull-sparkle:nth-child(3) { left: 40%; animation-delay: 0.05s; }
.pull-sparkle:nth-child(4) { left: 60%; animation-delay: 0.15s; }
.pull-sparkle:nth-child(5) { left: 80%; animation-delay: 0.08s; }
@keyframes pull-cat-spin {
    0% { transform: scale(1) rotate(0deg); }
    30% { transform: scale(1.3) rotate(-15deg); }
    60% { transform: scale(1.1) rotate(10deg); }
    100% { transform: scale(1) rotate(0deg); }
}
@keyframes sparkle-burst {
    0% { opacity: 0; transform: translateY(0) scale(0.5); }
    40% { opacity: 1; transform: translateY(-12px) scale(1.2); }
    100% { opacity: 0; transform: translateY(-24px) scale(0.3); }
}

/* === ADD BUTTON === */
.add-btn {
    position: fixed;
    bottom: calc(24px + env(safe-area-inset-bottom));
    right: 20px;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle at center, var(--wash-red-start) 0%, var(--wash-red-end) 100%);
    opacity: 0.85;
    border: none;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    color: white;
    font-size: 32px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow:
        inset 0 0 10px rgba(0, 0, 0, 0.1),
        2px 4px 10px rgba(0, 0, 0, 0.1);
    filter: url(#ink-wobble);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 100;
    font-family: var(--font-family);
}

.add-btn:hover {
    transform: scale(1.02);
    box-shadow:
        inset 0 0 15px rgba(0, 0, 0, 0.1),
        2px 6px 12px rgba(0, 0, 0, 0.1);
}

.add-btn:active { transform: scale(0.9); }

/* === MODAL === */
.modal-bg {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: none;
    z-index: 200;
    transition: background 0.3s ease-out;
}

.modal-bg.show, .modal-bg.closing { display: block; }
.modal-bg.closing { background: rgba(0,0,0,0); }

.modal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--paper-color);
    border-radius: 20px 20px 0 0;
    padding: 12px 20px calc(24px + env(safe-area-inset-bottom));
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
    z-index: 201;
    filter: drop-shadow(4px 4px 10px rgba(0,0,0,0.1));
    border-top: 2px solid var(--ink-color);
}

.modal-bg.show .modal {
    transform: translateY(0);
}
.modal-bg.closing .modal {
    transform: translateY(100%);
}

.modal-handle {
    width: 40px;
    height: 4px;
    background: var(--ink-color);
    border-radius: 2px;
    margin: 0 auto 20px;
    padding: 0;
    cursor: pointer;
    position: relative;
    opacity: 0.3;
}
.modal-handle::before {
    content: '';
    position: absolute;
    top: -12px;
    left: -40px;
    right: -40px;
    bottom: -12px;
}

.modal h2 {
    font-size: 20px;
    margin-bottom: 20px;
}

/* === FORM === */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-secondary);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 17px;
    font-family: var(--font-family);
    border: 2px solid var(--ink-color);
    border-radius: var(--sketch-radius);
    background: var(--card-surface);
    color: var(--ink-color);
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--wash-red-start);
    background: rgba(255,245,157,0.2);
}

.form-input::placeholder { color: var(--ink-secondary); opacity: 0.6; }

/* Date input iOS fix */
input[type="date"].form-input {
    -webkit-appearance: none;
    appearance: none;
    min-height: 50px;
    position: relative;
}

input[type="date"].form-input::-webkit-date-and-time-value {
    text-align: left;
}

/* === CATEGORY PICKER === */
.cat-picker {
    display: flex;
    gap: 8px;
}

.cat-option {
    flex: 1;
    padding: 14px 8px;
    border: 2px solid var(--ink-color);
    border-radius: var(--sketch-radius);
    background: var(--card-surface);
    font-size: 14px;
    font-weight: 400;
    font-family: var(--font-family);
    text-align: center;
    cursor: pointer;
    transition: all 0.15s;
}

.cat-option:active { transform: scale(0.95); }
.cat-option:hover { transform: scale(1.02); }

.cat-option.selected {
    border-color: var(--cat-color);
    background: var(--cat-color);
    color: white !important;
}

.cat-option.selected .cat-emoji { filter: brightness(0) invert(1); }

.cat-option[data-val="groceries"] { --cat-color: #2e7d32; color: var(--cat-color); }
.cat-option[data-val="household"] { --cat-color: #1565c0; color: var(--cat-color); }
.cat-option[data-val="insurance"] { --cat-color: #e65100; color: var(--cat-color); }
.cat-option[data-val="caro"] { --cat-color: #c2185b; color: var(--cat-color); }

.cat-option .cat-emoji {
    display: block;
    font-size: 24px;
    margin-bottom: 4px;
}

/* === IMAGE UPLOAD === */
.photo-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    border: 2.5px dashed var(--ink-color);
    border-radius: var(--sketch-radius);
    background: rgba(255,255,255,0.2);
    color: var(--ink-secondary);
    font-size: 15px;
    font-weight: 400;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all 0.2s;
}

.photo-btn:active { transform: scale(0.98); }
.photo-btn:hover { transform: scale(1.02); }
.photo-btn.has-photo {
    border-color: var(--wash-green-end);
    border-style: solid;
    color: var(--wash-green-end);
}

.photo-btn svg {
    width: 20px;
    height: 20px;
}

.photo-preview {
    display: none;
    margin-top: 12px;
    gap: 8px;
    flex-wrap: wrap;
}

.photo-preview.show { display: flex; }

.photo-thumb {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
}

.photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    background: rgba(0,0,0,0.6);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 14px;
    line-height: 22px;
    text-align: center;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* === SUBMIT === */
.submit-btn {
    width: 100%;
    padding: 16px;
    font-size: 18px;
    font-weight: 400;
    font-family: var(--font-family);
    background: radial-gradient(circle at center, rgba(239,83,80,0.7) 0%, rgba(211,47,47,0.6) 100%);
    color: white;
    border: 2px solid var(--ink-color);
    border-radius: var(--sketch-radius);
    cursor: pointer;
    transition: opacity 0.15s, transform 0.2s ease;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.1), 1px 2px 5px rgba(0,0,0,0.03);
    filter: url(#ink-wobble);
}

.submit-btn:disabled { opacity: 0.5; }
.submit-btn:active { opacity: 0.8; }
.submit-btn:hover { transform: scale(1.02); }

/* === TOAST === */
.toast {
    position: fixed;
    bottom: calc(100px + env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--ink-color);
    color: var(--paper-color);
    padding: 12px 20px;
    border-radius: var(--sketch-radius);
    font-size: 16px;
    font-weight: 400;
    font-family: var(--font-family);
    opacity: 0;
    transition: all 0.3s;
    z-index: 300;
    border: 2px solid var(--ink-color);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* === LOADING === */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--ink-secondary);
}

/* === CONFIRM MODAL === */
.confirm-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    z-index: 300;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.confirm-modal.show { display: flex; }

.confirm-box {
    background: var(--paper-color);
    border: 2px solid var(--ink-color);
    border-radius: var(--sketch-radius);
    padding: 24px;
    max-width: 300px;
    width: 100%;
    text-align: center;
    box-shadow: 4px 4px 10px rgba(0,0,0,0.1);
}

.confirm-box h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.confirm-box p {
    font-size: 14px;
    color: var(--ink-secondary);
    margin-bottom: 20px;
}

.confirm-btns {
    display: flex;
    gap: 10px;
}

.confirm-btn {
    flex: 1;
    padding: 12px;
    font-size: 16px;
    font-weight: 400;
    font-family: var(--font-family);
    border: 2px solid var(--ink-color);
    border-radius: var(--sketch-radius);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.confirm-btn:hover { transform: scale(1.02); }

.confirm-btn.cancel {
    background: var(--card-surface);
    color: var(--ink-color);
}

.confirm-btn.done {
    background: var(--wash-green-start);
    color: var(--ink-color);
}

.confirm-btn:active { opacity: 0.8; }

/* === TRASH TASK STYLE === */
.task.completed {
    opacity: 0.7;
}

.task.completed .task-text {
    text-decoration: line-through;
    color: var(--ink-secondary);
}

.task.completed .checkbox {
    background: var(--wash-green-start);
    border-color: var(--ink-color);
}

.task.completed .checkbox svg { opacity: 1; }

/* === DUE DATE BADGE === */
.due-badge {
    font-size: 14px;
    padding: 4px 12px;
    border-radius: var(--blob-radius);
    background: radial-gradient(circle, rgba(179,229,252,0.7) 0%, rgba(129,212,250,0.4) 100%);
    color: #0277BD;
    box-shadow: inset 0 0 15px rgba(2,119,189,0.1);
}

.due-badge.overdue {
    background: radial-gradient(circle, rgba(239,83,80,0.6) 0%, rgba(211,47,47,0.3) 100%);
    color: #B71C1C;
    box-shadow: inset 0 0 15px rgba(183,28,28,0.1);
}

.due-badge.today {
    background: radial-gradient(circle, rgba(255,245,157,0.7) 0%, rgba(255,241,118,0.4) 100%);
    color: #E65100;
    box-shadow: inset 0 0 15px rgba(230,81,0,0.1);
}

/* === DRAG AND DROP === */
.task.dragging {
    opacity: 0.5;
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.task.drag-over {
    border: 2.5px dashed var(--wash-red-start);
    background: rgba(255,245,157,0.2);
}

/* === DETAIL MODAL === */
.detail-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: none;
    z-index: 200;
    transition: background 0.3s ease-out;
}

.detail-modal.show, .detail-modal.closing { display: block; }
.detail-modal.closing { background: rgba(0,0,0,0); }

.detail-content {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--paper-color);
    border-radius: 20px 20px 0 0;
    padding: 12px 20px calc(24px + env(safe-area-inset-bottom));
    max-height: 85vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
    filter: drop-shadow(4px 4px 10px rgba(0,0,0,0.1));
    border-top: 2px solid var(--ink-color);
}

.detail-modal.show .detail-content {
    transform: translateY(0);
}

.detail-task {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 16px;
    word-break: break-word;
}

/* Editable fields that look like text until focused */
.editable-field {
    width: 100%;
    padding: 8px 0;
    font-size: 17px;
    font-family: var(--font-family);
    border: none;
    border-bottom: 1.5px solid transparent;
    background: transparent;
    color: var(--ink-color);
    transition: border-color 0.2s, background 0.2s;
    resize: none;
}

.editable-field:focus {
    outline: none;
    border-bottom: 1.5px solid var(--wash-red-start);
    background: var(--paper-stain);
}

.editable-field.task-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    min-height: 50px;
}

.detail-inline-select,
.detail-inline-input {
    -webkit-appearance: none;
    appearance: none;
    border: none;
    background: transparent;
    font-size: 15px;
    font-weight: 400;
    color: var(--ink-color);
    text-align: right;
    padding: 0;
    cursor: pointer;
    font-family: var(--font-family);
}

.detail-inline-select:focus,
.detail-inline-input:focus { outline: none; }

.detail-inline-input::-webkit-calendar-picker-indicator {
    opacity: 0.4;
}

label.detail-row { cursor: pointer; }

.detail-photos {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
    margin-bottom: 16px;
}

.detail-photo {
    width: 100%;
    max-height: 250px;
    object-fit: cover;
    border-radius: 12px;
    cursor: pointer;
}

.detail-photos.multi .detail-photo {
    width: calc(50% - 4px);
    max-height: 160px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1.5px solid var(--ink-soft);
}

.detail-label {
    font-size: 14px;
    color: var(--ink-secondary);
}

.detail-value {
    font-size: 14px;
    font-weight: 500;
    text-align: right;
}

.detail-comments {
    margin-top: 16px;
}

.detail-comments-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-secondary);
    margin-bottom: 8px;
}

.comment-block {
    padding: 6px 10px;
    border-radius: 8px;
    margin-bottom: 4px;
    font-size: 13px;
    line-height: 1.4;
}

.comment-author {
    font-size: 11px;
    font-weight: 600;
    color: var(--ink-secondary);
}

.comment-block.alex { background: rgba(165,214,167,0.3); }
.comment-block.you { background: rgba(215,204,200,0.3); }

.comment-input-row {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.comment-input-row input {
    flex: 1;
    padding: 10px 12px;
    font-size: 14px;
    font-family: var(--font-family);
    border: 2px solid var(--ink-color);
    border-radius: var(--sketch-radius);
    background: var(--card-surface);
    color: var(--ink-color);
}

.comment-input-row input:focus {
    outline: none;
    border-color: var(--wash-red-start);
}

.comment-send-btn {
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 400;
    font-family: var(--font-family);
    background: radial-gradient(circle, rgba(179,229,252,0.7) 0%, rgba(129,212,250,0.4) 100%);
    color: var(--ink-color);
    border: 2px solid var(--ink-color);
    border-radius: var(--sketch-radius);
    cursor: pointer;
    box-shadow: inset 0 0 15px rgba(2,119,189,0.1);
    transition: transform 0.2s ease;
}

.comment-send-btn:hover { transform: scale(1.02); }
.comment-send-btn:disabled { opacity: 0.5; }

.detail-done-btn {
    width: 100%;
    margin-top: 20px;
    padding: 14px;
    font-size: 17px;
    font-weight: 400;
    font-family: var(--font-family);
    background: radial-gradient(circle, rgba(129,199,132,0.7) 0%, rgba(165,214,167,0.4) 100%);
    color: var(--ink-color);
    border: 2px solid var(--ink-color);
    border-radius: var(--sketch-radius);
    cursor: pointer;
    box-shadow: inset 0 0 15px rgba(46,125,50,0.1);
    filter: url(#ink-wobble);
    transition: transform 0.2s ease;
}

.detail-done-btn:active { opacity: 0.8; }
.detail-done-btn:hover { transform: scale(1.02); }

/* === CHARCOAL LINE DIVIDERS === */
.charcoal-line {
    height: 2px;
    background: #333;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    opacity: 0.3;
    margin: 16px 0;
}

/* === WATERCOLOR BLEED OVERLAYS === */
.watercolor-bleed {
    position: fixed;
    pointer-events: none;
    z-index: 0;
    filter: blur(40px);
}
.bleed-blue {
    top: -10%; left: -10%; width: 60%; height: 60%;
    background: radial-gradient(circle at 20% 30%, var(--bleed-blue) 0%, transparent 70%);
}
.bleed-terracotta {
    bottom: -10%; right: -10%; width: 50%; height: 50%;
    background: radial-gradient(circle at 80% 70%, var(--bleed-terracotta) 0%, transparent 60%);
}
