/* Modern Styles for Personal Track System */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&display=swap');

:root {
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg-dark: #0f172a;
    --card-bg: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --sticky-paper: #fff7d6;
    --sticky-ink: #2f2a1e;
    --amber: #f59e0b;
    --teal: #14b8a6;
    --navy: #0f172a;
    --warm-gray: #374151;
    --pt-dynamic-bg: radial-gradient(120% 120% at 20% 10%, #2e1b68 0%, #512e7e 40%, #f97316 95%), #0f172a;
    --pt-orb-a: radial-gradient(circle at center, rgba(99, 102, 241, 0.8) 0%, rgba(99, 102, 241, 0) 70%);
    --pt-orb-b: radial-gradient(circle at center, rgba(20, 184, 166, 0.62) 0%, rgba(20, 184, 166, 0) 72%);
}

body {
    font-family: 'Manrope', system-ui, -apple-system, sans-serif;
    font-size: 14px;
    background: var(--pt-dynamic-bg);
    color: var(--text-main);
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    transition: background 700ms ease;
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

.login-galaxy-shell {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    isolation: isolate;
    background: #020617;
}

.login-content-layer {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-glass-card {
    background: rgba(255, 255, 255, 0.075);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.galaxy-hologram {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: auto;
    background:
        radial-gradient(circle at var(--x, 50%) var(--y, 50%),
            rgba(99, 102, 241, 0.45),
            rgba(168, 85, 247, 0.28) 18%,
            rgba(236, 72, 153, 0.18) 35%,
            transparent 58%
        ),
        radial-gradient(circle at 18% 28%, rgba(56, 189, 248, 0.22), transparent 34%),
        radial-gradient(circle at 78% 72%, rgba(217, 70, 239, 0.24), transparent 38%),
        radial-gradient(circle at 50% 100%, rgba(14, 165, 233, 0.16), transparent 44%),
        linear-gradient(135deg, #020617 0%, #08111f 38%, #17052f 70%, #020617 100%);
}

.galaxy-stars-canvas {
    position: absolute;
    inset: 0;
    z-index: 3;
    width: 100%;
    height: 100%;
}

.galaxy-nebula {
    position: absolute;
    inset: -30%;
    z-index: 1;
    background:
        radial-gradient(circle at 26% 32%, rgba(56, 189, 248, 0.42), transparent 24%),
        radial-gradient(circle at 70% 36%, rgba(168, 85, 247, 0.42), transparent 28%),
        radial-gradient(circle at 52% 70%, rgba(236, 72, 153, 0.34), transparent 30%),
        radial-gradient(circle at 40% 48%, rgba(34, 211, 238, 0.18), transparent 26%);
    filter: blur(85px);
    mix-blend-mode: screen;
    animation: galaxyNebulaMove 26s ease-in-out infinite alternate;
}

.galaxy-holo-core {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    width: 70vw;
    height: 70vw;
    min-width: 520px;
    min-height: 520px;
    border-radius: 50%;
    background: conic-gradient(
        from var(--angle, 0deg),
        rgba(56, 189, 248, 0.18),
        rgba(168, 85, 247, 0.34),
        rgba(236, 72, 153, 0.24),
        rgba(99, 102, 241, 0.30),
        rgba(34, 211, 238, 0.18)
    );
    transform: translate(-50%, -50%);
    filter: blur(60px);
    opacity: 0.8;
    mix-blend-mode: screen;
    animation: galaxyRotateCore 32s linear infinite;
}

.galaxy-cosmic-grid {
    position: absolute;
    inset: 0;
    z-index: 4;
    opacity: 0.13;
    background:
        linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(circle at var(--x, 50%) var(--y, 50%), black 0%, transparent 65%);
    -webkit-mask-image: radial-gradient(circle at var(--x, 50%) var(--y, 50%), black 0%, transparent 65%);
    transform: perspective(800px) rotateX(58deg) scale(1.45);
    transform-origin: center bottom;
    pointer-events: none;
}

@keyframes galaxyNebulaMove {
    from { transform: translate3d(-4%, -3%, 0) rotate(0deg) scale(1); }
    to { transform: translate3d(5%, 4%, 0) rotate(10deg) scale(1.16); }
}

@keyframes galaxyRotateCore {
    from { --angle: 0deg; }
    to { --angle: 360deg; }
}

.kanban-column {
    min-width: 320px;
    height: calc(100vh - 180px);
    background: rgba(15, 23, 42, 0.4);
    border-radius: 1rem;
    transition: transform 0.16s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.18s ease, box-shadow 0.2s ease;
    will-change: transform;
    border-width: 2px;
}

.task-card {
    transition: transform 0.16s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, opacity 0.16s ease;
    cursor: grab;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(145deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
    font-size: 13px;
    padding: 12px;
    transform: translate3d(0, 0, 0);
    will-change: transform, opacity;
}

.task-card:active {
    cursor: grabbing;
    transform: scale(0.99);
}

.task-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 30px -12px rgba(0, 0, 0, 0.4);
    background: linear-gradient(145deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
}

.btn-primary {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.1) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.stat-card {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.05) 0%, rgba(79, 70, 229, 0.1) 100%);
    border-radius: 20px;
    padding: 1.5rem;
    border: 1px solid rgba(79, 70, 229, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 12px 30px -18px rgba(0,0,0,0.5);
}

.stat-card.stat-card-compact {
    border-radius: 14px;
    padding: 0.7rem 0.8rem;
}

.stat-kicker {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #cbd5e1;
    margin-bottom: 4px;
}

.header-chip {
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 999px;
    padding: 2px 8px;
    background: rgba(15, 23, 42, 0.55);
    white-space: nowrap;
}

.motivation-strip {
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: linear-gradient(130deg, rgba(99, 102, 241, 0.18), rgba(16, 185, 129, 0.12));
}

.pt-overview-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.stats-overview-card {
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: linear-gradient(130deg, rgba(79, 70, 229, 0.14), rgba(20, 184, 166, 0.1));
}

.stats-overview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.overview-metric-card {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.36);
    padding: 0.5rem 0.55rem;
}

.motivation-quote {
    animation: quoteReveal 900ms cubic-bezier(0.22, 1, 0.36, 1);
}

.quote-word {
    cursor: help;
    border-bottom: 1px dashed rgba(125, 211, 252, 0.5);
    transition: color 0.15s ease, border-color 0.15s ease;
}

.quote-word:hover {
    color: #67e8f9;
    border-bottom-color: rgba(103, 232, 249, 0.9);
}

.quote-word-neutral {
    cursor: default;
}

.quote-word-meaning {
    border: 1px solid rgba(125, 211, 252, 0.25);
    border-radius: 8px;
    background: rgba(8, 47, 73, 0.28);
    color: #dbeafe;
    padding: 6px 8px;
    font-size: 11px;
}

.quote-anim-rise {
    animation: quoteReveal 920ms cubic-bezier(0.22, 1, 0.36, 1);
}

.quote-anim-float {
    animation: quoteFloatIn 860ms cubic-bezier(0.16, 1, 0.3, 1);
}

.quote-anim-spark {
    animation: quoteSparkIn 920ms cubic-bezier(0.2, 1, 0.3, 1);
}

.motivation-meta {
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.45);
    padding: 8px 10px;
}

.motivation-tomorrow {
    border: 1px solid rgba(125, 211, 252, 0.25);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.36);
    padding: 6px 8px;
}

.forecast-toggle-btn {
    border: 1px solid rgba(125, 211, 252, 0.3);
    background: rgba(15, 23, 42, 0.5);
    color: #dbeafe;
    border-radius: 8px;
    font-size: 11px;
    line-height: 1.1;
    padding: 5px 8px;
    transition: background 0.18s ease, border-color 0.18s ease;
}

.forecast-toggle-btn:hover {
    background: rgba(14, 165, 233, 0.22);
    border-color: rgba(125, 211, 252, 0.5);
}

.question-btn {
    border: 1px solid rgba(45, 212, 191, 0.4);
    background: rgba(15, 23, 42, 0.52);
    color: #ccfbf1;
    border-radius: 8px;
    font-size: 11px;
    line-height: 1.1;
    padding: 5px 10px;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.question-btn:hover {
    background: rgba(20, 184, 166, 0.2);
    border-color: rgba(94, 234, 212, 0.7);
    transform: translateY(-1px);
}

.motivation-forecast-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
}

.quiz-fast-wrap {
    display: grid;
    gap: 6px;
}

.quiz-fast-card {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.32);
    padding: 7px 8px;
}

.quiz-fast-title {
    margin: 0;
    font-size: 11px;
    color: #e2e8f0;
}

.quiz-options {
    margin-top: 4px;
}

.quiz-option-item {
    margin: 0;
    font-size: 10px;
    color: #cbd5e1;
    line-height: 1.45;
}

.quiz-fill-hint {
    margin: 4px 0 0;
    font-size: 10px;
    color: #bae6fd;
}

.quiz-answer {
    margin-top: 4px;
    font-size: 10px;
    color: #94a3b8;
}

.quiz-answer summary {
    cursor: pointer;
    color: #c7d2fe;
}

.pt-quick-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(2, 6, 23, 0.66);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s ease;
    z-index: 120;
}

.pt-quick-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}

.pt-quick-modal-panel {
    width: min(680px, calc(100vw - 24px));
    max-height: min(80vh, 720px);
    overflow: auto;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.9));
    box-shadow: 0 26px 70px -36px rgba(0, 0, 0, 0.72);
    transform: translateY(14px) scale(0.98);
    opacity: 0;
    transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.24s ease;
}

.pt-quick-modal.is-open .pt-quick-modal-panel {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.pt-quick-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.pt-quick-modal-head h4 {
    margin: 0;
    font-size: 15px;
    color: #f8fafc;
}

.pt-quick-modal-head button {
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(15, 23, 42, 0.65);
    color: #e2e8f0;
    border-radius: 8px;
    width: 28px;
    height: 28px;
    line-height: 1;
    font-size: 18px;
}

.pt-quick-modal-body {
    padding: 12px;
}

.weather-popup-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.weather-forecast-panel {
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: linear-gradient(120deg, rgba(14, 165, 233, 0.12), rgba(56, 189, 248, 0.08));
}

.forecast-tomorrow {
    border: 1px solid rgba(125, 211, 252, 0.28);
    background: rgba(15, 23, 42, 0.38);
}

.forecast-day-item {
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.34);
    text-align: center;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: rgba(79, 70, 229, 0.4);
    box-shadow: 0 10px 20px -5px rgba(79, 70, 229, 0.3);
}

.kanban-column {
    min-width: 280px;
    height: calc(100vh - 280px);
    min-height: 420px;
}

.kanban-column.drop-target {
    border-color: rgba(99, 102, 241, 0.75);
    box-shadow: 0 18px 36px -18px rgba(99, 102, 241, 0.6), inset 0 0 0 2px rgba(129, 140, 248, 0.45);
    transform: translateY(-6px) scale(1.01);
    animation: snapPulse 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

.task-card.flash {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.6), 0 14px 30px -12px rgba(0,0,0,0.55);
}

.task-card.dragging {
    opacity: 0.62;
    transform: scale(0.985);
    box-shadow: 0 10px 24px -16px rgba(0, 0, 0, 0.6);
}

.sticky-panel {
    background: var(--sticky-paper);
    color: var(--sticky-ink);
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 12px 30px -18px rgba(0,0,0,0.45);
    font-size: 13px;
}

.note-card {
    background: #fff2b3;
    color: var(--sticky-ink);
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 10px 18px -12px rgba(0,0,0,0.35);
    transition: transform 0.16s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    font-size: 13px;
}

.note-card:hover {
    transform: translateY(-3px);
    border-color: rgba(0,0,0,0.12);
    box-shadow: 0 18px 26px -16px rgba(0,0,0,0.35);
}

.note-card.dragging-note {
    opacity: 0.55;
    transform: scale(0.98);
}

.note-drag-handle {
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 0.55);
    color: #4b5563;
    border-radius: 6px;
    padding: 0 4px;
    font-size: 11px;
    line-height: 16px;
    cursor: grab;
}

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

.note-editor {
    min-height: 64px;
    outline: none;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0,0,0,0.06);
}

.search-bar {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03);
    padding: 10px 12px;
    font-size: 14px;
}

.search-dropdown {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.08);
}

.search-item:hover {
    background: rgba(255,255,255,0.06);
}

.drag-ghost {
    opacity: 0.82 !important;
    transform: rotate(-1deg);
}

@keyframes snapPulse {
    0% {
        transform: translateY(-2px) scale(0.995);
        box-shadow: 0 8px 20px -16px rgba(99, 102, 241, 0.35);
    }
    100% {
        transform: translateY(-6px) scale(1.01);
        box-shadow: 0 18px 36px -18px rgba(99, 102, 241, 0.6), inset 0 0 0 1px rgba(129, 140, 248, 0.35);
    }
}

.task-card[draggable="true"] {
    touch-action: manipulation;
}

.kanban-scroll {
    padding-bottom: 0.25rem;
}

.kanban-grid {
    align-items: stretch;
}

.kanban-grid .kanban-column {
    scroll-snap-align: start;
}

.mobile-note-actions,
.mobile-quick-move {
    display: none;
}

.search-dropdown {
    font-size: 13px;
}

.mini-icon-btn {
    width: 1.75rem;
    height: 1.75rem;
}

.mini-icon-btn svg {
    width: 0.9rem;
    height: 0.9rem;
}

.rich-btn {
    min-width: 28px;
    height: 28px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 8px;
    background: rgba(30, 41, 59, 0.7);
    color: #e2e8f0;
    font-size: 12px;
    line-height: 1;
}

.rich-btn:hover {
    border-color: rgba(99, 102, 241, 0.6);
    background: rgba(79, 70, 229, 0.2);
}

.rich-editor {
    line-height: 1.5;
}

.timeline-section,
.timeline-section .rich-editor,
.timeline-section .rich-render,
.timeline-section .rich-render * {
    color: #F8FAFC;
}

.rich-editor:empty:before {
    content: attr(data-placeholder);
    color: #64748b;
    pointer-events: none;
}

.rich-editor img,
.rich-render img {
    max-width: 220px;
    border-radius: 8px;
    margin: 4px 0;
}

.rich-editor ul,
.rich-render ul {
    list-style: disc;
    margin-left: 1.25rem;
    padding-left: 0.25rem;
}

.rich-editor b,
.rich-render b,
.rich-editor strong,
.rich-render strong {
    font-weight: 700;
}

.pt-bg-orb {
    position: fixed;
    width: 28rem;
    height: 28rem;
    border-radius: 9999px;
    filter: blur(70px);
    opacity: 0.24;
    pointer-events: none;
    z-index: 1;
}

.weather-scene {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.weather-glow {
    position: absolute;
    width: 45vmax;
    height: 45vmax;
    border-radius: 999px;
    filter: blur(70px);
    opacity: 0.22;
}

.weather-glow-a {
    top: -18vmax;
    right: -12vmax;
    background: radial-gradient(circle at center, rgba(125, 211, 252, 0.9), rgba(125, 211, 252, 0));
}

.weather-glow-b {
    bottom: -20vmax;
    left: -10vmax;
    background: radial-gradient(circle at center, rgba(45, 212, 191, 0.78), rgba(45, 212, 191, 0));
}

.weather-icon {
    position: absolute;
    opacity: 0.8;
}

.weather-sun {
    top: 10%;
    right: 8%;
    font-size: 3.2rem;
    color: rgba(253, 224, 71, 0.95);
    text-shadow: 0 0 30px rgba(253, 224, 71, 0.65);
}

.weather-moon {
    top: 10%;
    right: 8%;
    font-size: 2.8rem;
    color: rgba(226, 232, 240, 0.88);
    text-shadow: 0 0 24px rgba(148, 163, 184, 0.6);
}

.weather-cloud {
    position: absolute;
    height: 34px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.7), rgba(203, 213, 225, 0.45));
    filter: blur(0.4px);
    animation: cloudDrift linear infinite;
}

.weather-cloud::before,
.weather-cloud::after {
    content: '';
    position: absolute;
    border-radius: 999px;
    background: inherit;
}

.weather-cloud::before {
    width: 40%;
    height: 90%;
    left: 14%;
    top: -42%;
}

.weather-cloud::after {
    width: 30%;
    height: 80%;
    right: 12%;
    top: -30%;
}

.cloud-1 { top: 13%; width: 160px; left: -12%; animation-duration: 48s; opacity: 0.5; }
.cloud-2 { top: 19%; width: 120px; left: -20%; animation-duration: 58s; opacity: 0.42; }
.cloud-3 { top: 27%; width: 140px; left: -15%; animation-duration: 52s; opacity: 0.44; }
.cloud-4 { top: 16%; width: 180px; left: -24%; animation-duration: 63s; opacity: 0.36; }
.cloud-5 { top: 24%; width: 110px; left: -30%; animation-duration: 70s; opacity: 0.3; }
.cloud-6 { top: 31%; width: 130px; left: -16%; animation-duration: 54s; opacity: 0.36; }
.cloud-7 { top: 35%; width: 170px; left: -28%; animation-duration: 66s; opacity: 0.28; }

.storm-cloud {
    background: linear-gradient(180deg, rgba(148, 163, 184, 0.62), rgba(71, 85, 105, 0.5));
}

.weather-rain-drop {
    position: absolute;
    top: -6%;
    width: 1.8px;
    height: 22px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(191, 219, 254, 0.9), rgba(125, 211, 252, 0.3));
    animation: rainFall linear infinite;
    opacity: 0;
}

.weather-snow-flake {
    position: absolute;
    top: -6%;
    color: rgba(226, 232, 240, 0.9);
    font-size: 11px;
    line-height: 1;
    animation: snowFall 5.5s linear infinite;
    opacity: 0;
}

.rain-1 { animation-duration: 1.15s; }
.rain-2 { animation-duration: 1.35s; }
.rain-3 { animation-duration: 1.05s; }
.rain-4 { animation-duration: 1.28s; }
.rain-5 { animation-duration: 1.48s; }
.rain-6 { animation-duration: 1.22s; }

.weather-star {
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: 999px;
    background: rgba(248, 250, 252, 0.9);
    box-shadow: 0 0 8px rgba(248, 250, 252, 0.6);
    animation: starTwinkle 2.2s ease-in-out infinite;
}

.pt-bg-orb-a {
    background: var(--pt-orb-a);
    top: -8rem;
    right: -10rem;
}

.pt-bg-orb-b {
    background: var(--pt-orb-b);
    bottom: -8rem;
    left: -10rem;
}

.pt-anim-intro,
.pt-anim-card,
.pt-modal-shell {
    will-change: transform, opacity;
    transform: translateZ(0);
}

.pt-stats-grid .stat-card {
    background: linear-gradient(145deg, rgba(79, 70, 229, 0.1), rgba(20, 184, 166, 0.08));
    border-color: rgba(99, 102, 241, 0.32);
}

@keyframes quoteReveal {
    0% {
        opacity: 0;
        transform: translateY(8px);
        filter: blur(3px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@keyframes quoteFloatIn {
    0% {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
        filter: blur(2px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes quoteSparkIn {
    0% {
        opacity: 0;
        transform: translateY(6px);
        text-shadow: 0 0 0 rgba(34, 211, 238, 0);
    }
    70% {
        text-shadow: 0 0 14px rgba(34, 211, 238, 0.45);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        text-shadow: 0 0 0 rgba(34, 211, 238, 0);
    }
}

@keyframes cloudDrift {
    from { transform: translateX(-5vw); }
    to { transform: translateX(120vw); }
}

@keyframes rainFall {
    0% { transform: translateY(-10vh); opacity: 0; }
    10% { opacity: 0.65; }
    100% { transform: translateY(115vh); opacity: 0; }
}

@keyframes snowFall {
    0% { transform: translateY(-10vh) translateX(0); opacity: 0; }
    20% { opacity: 0.85; }
    100% { transform: translateY(112vh) translateX(16px); opacity: 0; }
}

@keyframes starTwinkle {
    0%, 100% { opacity: 0.25; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.4); }
}

.weather-scene.cond-storm .weather-glow-a { opacity: 0.12; }
.weather-scene.cond-storm .weather-glow-b { opacity: 0.1; }
.weather-scene.phase-night .weather-cloud { opacity: 0.28; }
.weather-scene.cond-blazing-sun .weather-sun { color: rgba(251, 191, 36, 1); text-shadow: 0 0 42px rgba(251, 191, 36, 0.8); }
.weather-scene.cond-drizzle .weather-rain-drop { height: 14px; opacity: 0.5; }
.weather-scene.cond-snow .weather-cloud { opacity: 0.45; }

.weather-blazing-rays {
    position: absolute;
    top: 7%;
    right: 4.6%;
    width: 132px;
    height: 132px;
    border-radius: 999px;
    background: radial-gradient(circle at center, rgba(251, 191, 36, 0.5), rgba(251, 191, 36, 0));
    animation: blazingPulse 1.4s ease-in-out infinite;
}

@keyframes blazingPulse {
    0%, 100% { transform: scale(0.94); opacity: 0.42; }
    50% { transform: scale(1.06); opacity: 0.68; }
}

body[data-sky-theme="sunrise"] {
    --pt-dynamic-bg: radial-gradient(120% 120% at 22% 8%, #fde68a 0%, #fb923c 35%, #1e293b 100%), #0f172a;
    --pt-orb-a: radial-gradient(circle at center, rgba(251, 146, 60, 0.7) 0%, rgba(251, 146, 60, 0) 70%);
    --pt-orb-b: radial-gradient(circle at center, rgba(253, 224, 71, 0.55) 0%, rgba(253, 224, 71, 0) 72%);
}

body[data-sky-theme="sunny-day"] {
    --pt-dynamic-bg: radial-gradient(120% 120% at 20% 10%, #38bdf8 0%, #0ea5e9 35%, #0f172a 100%), #0f172a;
    --pt-orb-a: radial-gradient(circle at center, rgba(56, 189, 248, 0.75) 0%, rgba(56, 189, 248, 0) 70%);
    --pt-orb-b: radial-gradient(circle at center, rgba(253, 224, 71, 0.5) 0%, rgba(253, 224, 71, 0) 72%);
}

body[data-sky-theme="blazing-day"] {
    --pt-dynamic-bg: radial-gradient(120% 120% at 20% 10%, #f59e0b 0%, #fb923c 35%, #0f172a 100%), #0f172a;
    --pt-orb-a: radial-gradient(circle at center, rgba(251, 191, 36, 0.82) 0%, rgba(251, 191, 36, 0) 70%);
    --pt-orb-b: radial-gradient(circle at center, rgba(249, 115, 22, 0.6) 0%, rgba(249, 115, 22, 0) 72%);
}

body[data-sky-theme="sunset"] {
    --pt-dynamic-bg: radial-gradient(120% 120% at 22% 8%, #fdba74 0%, #fb7185 38%, #1e1b4b 100%), #0f172a;
    --pt-orb-a: radial-gradient(circle at center, rgba(251, 113, 133, 0.75) 0%, rgba(251, 113, 133, 0) 70%);
    --pt-orb-b: radial-gradient(circle at center, rgba(251, 146, 60, 0.55) 0%, rgba(251, 146, 60, 0) 72%);
}

body[data-sky-theme="clear-night"] {
    --pt-dynamic-bg: radial-gradient(120% 120% at 22% 12%, #1e1b4b 0%, #0f172a 52%, #020617 100%), #020617;
    --pt-orb-a: radial-gradient(circle at center, rgba(129, 140, 248, 0.55) 0%, rgba(129, 140, 248, 0) 70%);
    --pt-orb-b: radial-gradient(circle at center, rgba(56, 189, 248, 0.4) 0%, rgba(56, 189, 248, 0) 72%);
}

body[data-sky-theme="cloudy-day"] {
    --pt-dynamic-bg: radial-gradient(120% 120% at 20% 10%, #94a3b8 0%, #64748b 35%, #0f172a 100%), #0f172a;
    --pt-orb-a: radial-gradient(circle at center, rgba(148, 163, 184, 0.62) 0%, rgba(148, 163, 184, 0) 70%);
    --pt-orb-b: radial-gradient(circle at center, rgba(100, 116, 139, 0.52) 0%, rgba(100, 116, 139, 0) 72%);
}

body[data-sky-theme="cloudy-sunset"] {
    --pt-dynamic-bg: radial-gradient(120% 120% at 20% 8%, #fca5a5 0%, #94a3b8 38%, #1e293b 100%), #0f172a;
    --pt-orb-a: radial-gradient(circle at center, rgba(252, 165, 165, 0.62) 0%, rgba(252, 165, 165, 0) 70%);
    --pt-orb-b: radial-gradient(circle at center, rgba(148, 163, 184, 0.48) 0%, rgba(148, 163, 184, 0) 72%);
}

body[data-sky-theme="cloudy-night"] {
    --pt-dynamic-bg: radial-gradient(120% 120% at 20% 8%, #334155 0%, #1e293b 42%, #020617 100%), #020617;
    --pt-orb-a: radial-gradient(circle at center, rgba(100, 116, 139, 0.55) 0%, rgba(100, 116, 139, 0) 70%);
    --pt-orb-b: radial-gradient(circle at center, rgba(71, 85, 105, 0.5) 0%, rgba(71, 85, 105, 0) 72%);
}

body[data-sky-theme="rain-day"] {
    --pt-dynamic-bg: radial-gradient(120% 120% at 20% 10%, #67e8f9 0%, #0f766e 36%, #0f172a 100%), #0f172a;
    --pt-orb-a: radial-gradient(circle at center, rgba(34, 211, 238, 0.6) 0%, rgba(34, 211, 238, 0) 70%);
    --pt-orb-b: radial-gradient(circle at center, rgba(20, 184, 166, 0.5) 0%, rgba(20, 184, 166, 0) 72%);
}

body[data-sky-theme="drizzle-day"] {
    --pt-dynamic-bg: radial-gradient(120% 120% at 20% 10%, #7dd3fc 0%, #0f766e 35%, #0f172a 100%), #0f172a;
    --pt-orb-a: radial-gradient(circle at center, rgba(125, 211, 252, 0.6) 0%, rgba(125, 211, 252, 0) 70%);
    --pt-orb-b: radial-gradient(circle at center, rgba(20, 184, 166, 0.42) 0%, rgba(20, 184, 166, 0) 72%);
}

body[data-sky-theme="rain-night"] {
    --pt-dynamic-bg: radial-gradient(120% 120% at 20% 10%, #164e63 0%, #0f172a 48%, #020617 100%), #020617;
    --pt-orb-a: radial-gradient(circle at center, rgba(6, 182, 212, 0.5) 0%, rgba(6, 182, 212, 0) 70%);
    --pt-orb-b: radial-gradient(circle at center, rgba(20, 184, 166, 0.38) 0%, rgba(20, 184, 166, 0) 72%);
}

body[data-sky-theme="drizzle-night"] {
    --pt-dynamic-bg: radial-gradient(120% 120% at 20% 10%, #0e7490 0%, #0f172a 48%, #020617 100%), #020617;
    --pt-orb-a: radial-gradient(circle at center, rgba(14, 165, 233, 0.42) 0%, rgba(14, 165, 233, 0) 70%);
    --pt-orb-b: radial-gradient(circle at center, rgba(56, 189, 248, 0.3) 0%, rgba(56, 189, 248, 0) 72%);
}

body[data-sky-theme="fog-day"] {
    --pt-dynamic-bg: radial-gradient(120% 120% at 20% 10%, #cbd5e1 0%, #94a3b8 38%, #1e293b 100%), #0f172a;
    --pt-orb-a: radial-gradient(circle at center, rgba(226, 232, 240, 0.48) 0%, rgba(226, 232, 240, 0) 70%);
    --pt-orb-b: radial-gradient(circle at center, rgba(148, 163, 184, 0.42) 0%, rgba(148, 163, 184, 0) 72%);
}

body[data-sky-theme="fog-night"] {
    --pt-dynamic-bg: radial-gradient(120% 120% at 20% 10%, #475569 0%, #1e293b 42%, #020617 100%), #020617;
    --pt-orb-a: radial-gradient(circle at center, rgba(148, 163, 184, 0.45) 0%, rgba(148, 163, 184, 0) 70%);
    --pt-orb-b: radial-gradient(circle at center, rgba(100, 116, 139, 0.35) 0%, rgba(100, 116, 139, 0) 72%);
}

body[data-sky-theme="storm"] {
    --pt-dynamic-bg: radial-gradient(120% 120% at 20% 10%, #1d4ed8 0%, #1e293b 45%, #020617 100%), #020617;
    --pt-orb-a: radial-gradient(circle at center, rgba(59, 130, 246, 0.55) 0%, rgba(59, 130, 246, 0) 70%);
    --pt-orb-b: radial-gradient(circle at center, rgba(14, 165, 233, 0.38) 0%, rgba(14, 165, 233, 0) 72%);
}

body[data-sky-theme="snow-day"] {
    --pt-dynamic-bg: radial-gradient(120% 120% at 20% 10%, #e2e8f0 0%, #94a3b8 38%, #1e293b 100%), #0f172a;
    --pt-orb-a: radial-gradient(circle at center, rgba(226, 232, 240, 0.66) 0%, rgba(226, 232, 240, 0) 70%);
    --pt-orb-b: radial-gradient(circle at center, rgba(186, 230, 253, 0.46) 0%, rgba(186, 230, 253, 0) 72%);
}

body[data-sky-theme="snow-night"] {
    --pt-dynamic-bg: radial-gradient(120% 120% at 20% 10%, #334155 0%, #1e293b 44%, #020617 100%), #020617;
    --pt-orb-a: radial-gradient(circle at center, rgba(148, 163, 184, 0.52) 0%, rgba(148, 163, 184, 0) 70%);
    --pt-orb-b: radial-gradient(circle at center, rgba(226, 232, 240, 0.28) 0%, rgba(226, 232, 240, 0) 72%);
}

@media (max-width: 768px) {
    .header-actions {
        width: 100%;
        gap: 0.4rem;
    }
    .header-actions .search-wrap {
        width: 100%;
        gap: 0.35rem;
    }
    .header-actions .search-wrap > :first-child {
        width: 100%;
        min-width: 0;
    }
    .branch-switcher {
        max-width: calc(100vw - 2.25rem);
        padding: 0.2rem;
    }
    .branch-switcher button {
        padding: 0.35rem 0.5rem;
    }
    .kanban-scroll {
        overflow-x: auto;
        scroll-snap-type: x proximity;
    }
    .kanban-grid {
        width: max-content;
        align-items: stretch;
    }
    .kanban-column {
        min-width: 82vw;
        max-width: 86vw;
        height: calc(100vh - 260px);
        min-height: 340px;
        margin-bottom: 0;
    }
    .mobile-note-actions,
    .mobile-quick-move {
        display: grid;
    }
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Transitions */
.fade-enter {
    opacity: 0;
}
.fade-enter-active {
    opacity: 1;
    transition: opacity 300ms ease-in;
}

.branch-tabs .active {
    background: var(--primary);
    color: white;
}

@media (prefers-reduced-motion: reduce) {
    .galaxy-nebula,
    .galaxy-holo-core {
        animation: none !important;
    }
    .pt-bg-orb {
        display: none;
    }
    .task-card,
    .stat-card,
    .note-card,
    .kanban-column {
        transition: none !important;
        animation: none !important;
    }
}

@media (max-width: 640px) {
    .login-content-layer {
        padding: 16px;
    }
    .login-glass-card {
        padding: 1.5rem;
    }
    .galaxy-holo-core {
        width: 95vw;
        height: 95vw;
        min-width: 340px;
        min-height: 340px;
        filter: blur(48px);
    }
    .galaxy-cosmic-grid {
        opacity: 0.08;
    }
    .header-actions .mini-icon-btn {
        width: 1.65rem;
        height: 1.65rem;
    }
    .header-actions > .mini-icon-btn svg {
        width: 0.82rem;
        height: 0.82rem;
    }
    .header-actions .search-wrap input[type="date"] {
        width: calc(50% - 0.2rem);
        min-width: 0;
    }
    .stat-card { padding: 0.65rem; border-radius: 12px; }
    .task-card { padding: 10px; }
    .glass { border-radius: 14px; }
    .kanban-column { padding: 0.75rem; }
    .search-bar { width: 100%; }
    .motivation-meta { width: 100%; }
    .pt-quick-modal-panel { width: calc(100vw - 16px); }
    .weather-popup-grid {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(88px, 1fr);
        overflow-x: auto;
    }
    .stats-overview-grid { grid-template-columns: 1fr; }
    .motivation-forecast-grid {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(72px, 1fr);
        overflow-x: auto;
        padding-bottom: 2px;
    }
    .header-chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
    .pt-bg-orb {
        width: 18rem;
        height: 18rem;
        filter: blur(56px);
        opacity: 0.2;
    }
}

@media (min-width: 1024px) {
    .pt-overview-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        align-items: stretch;
    }
}

/* Innook-inspired visual refresh: presentation-only overrides. */
:root {
    --innook-ink: #fff8ed;
    --innook-muted: #d7c5ad;
    --innook-soft: rgba(255, 248, 237, 0.08);
    --innook-panel: rgba(35, 29, 24, 0.68);
    --innook-panel-strong: rgba(47, 38, 30, 0.84);
    --innook-border: rgba(255, 232, 199, 0.16);
    --innook-border-strong: rgba(255, 221, 172, 0.28);
    --innook-accent: #d89b55;
    --innook-accent-soft: rgba(216, 155, 85, 0.2);
    --innook-forest: #2f5a46;
    --innook-mist: #8bb8a1;
    --innook-shadow: 0 24px 72px rgba(6, 10, 8, 0.42);
    --innook-radius: 18px;
    --pt-dynamic-bg:
        radial-gradient(90% 80% at 16% 10%, rgba(216, 155, 85, 0.24), transparent 52%),
        radial-gradient(70% 65% at 88% 8%, rgba(92, 134, 104, 0.34), transparent 54%),
        radial-gradient(90% 85% at 70% 100%, rgba(97, 54, 37, 0.32), transparent 58%),
        linear-gradient(140deg, #111814 0%, #18251f 36%, #2b241d 72%, #120f0c 100%);
    --pt-orb-a: radial-gradient(circle at center, rgba(216, 155, 85, 0.46), rgba(216, 155, 85, 0) 72%);
    --pt-orb-b: radial-gradient(circle at center, rgba(89, 137, 105, 0.5), rgba(89, 137, 105, 0) 74%);
}

body {
    background:
        linear-gradient(rgba(255, 248, 237, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 248, 237, 0.014) 1px, transparent 1px),
        var(--pt-dynamic-bg) !important;
    background-size: 42px 42px, 42px 42px, auto;
    color: var(--innook-ink);
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 245, 225, 0.09), transparent 38%),
        linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(8, 10, 8, 0.24));
}

#root {
    position: relative;
    z-index: 1;
}

.weather-scene {
    opacity: 0.42;
    mix-blend-mode: screen;
}

.glass,
.stat-card,
.stats-overview-card,
.motivation-strip,
.kanban-column,
.pt-quick-modal-panel,
.sticky-panel,
.note-card,
.search-dropdown,
.login-glass-card {
    background:
        linear-gradient(150deg, rgba(255, 248, 237, 0.12), rgba(255, 248, 237, 0.045)),
        var(--innook-panel);
    border-color: var(--innook-border);
    box-shadow: var(--innook-shadow);
    backdrop-filter: blur(22px) saturate(118%);
    -webkit-backdrop-filter: blur(22px) saturate(118%);
}

header.glass {
    border-radius: 24px;
    padding: 0.85rem !important;
    background:
        linear-gradient(135deg, rgba(255, 248, 237, 0.13), rgba(255, 248, 237, 0.045)),
        rgba(28, 25, 20, 0.76);
}

.glass:hover,
.task-card:hover,
.note-card:hover,
.stat-card:hover {
    border-color: var(--innook-border-strong);
}

.text-white,
.text-slate-50,
.text-slate-100,
.text-slate-200 {
    color: var(--innook-ink) !important;
}

.text-slate-300,
.text-slate-400,
.text-slate-500 {
    color: var(--innook-muted) !important;
}

.btn-primary,
button.bg-indigo-600,
button.hover\:bg-indigo-500:hover {
    background: linear-gradient(135deg, #e5ae6f, #af7042) !important;
    color: #1b130d !important;
    border: 1px solid rgba(255, 235, 201, 0.42) !important;
    box-shadow: 0 14px 34px rgba(116, 69, 35, 0.28);
}

.btn-primary:hover,
button.bg-indigo-600:hover {
    background: linear-gradient(135deg, #f0c082, #bc7a49) !important;
    transform: translateY(-1px);
}

.mini-icon-btn,
.branch-switcher,
.search-bar,
.rich-btn,
.forecast-toggle-btn,
.question-btn,
button.bg-slate-800,
button.bg-slate-900\/90,
button.bg-slate-900\/80 {
    background: rgba(255, 248, 237, 0.08) !important;
    border-color: var(--innook-border) !important;
    color: var(--innook-muted) !important;
}

.mini-icon-btn:hover,
.rich-btn:hover,
.forecast-toggle-btn:hover,
.question-btn:hover,
button.bg-slate-800:hover {
    background: rgba(216, 155, 85, 0.18) !important;
    color: var(--innook-ink) !important;
    border-color: var(--innook-border-strong) !important;
}

.branch-switcher {
    border-radius: 999px;
    padding: 0.25rem;
}

.branch-switcher button {
    border-radius: 999px;
}

.branch-switcher button.bg-indigo-600,
.branch-switcher button[class*="bg-indigo-600"] {
    background: rgba(216, 155, 85, 0.92) !important;
    color: #1b130d !important;
}

input,
select,
textarea,
.rich-editor,
.note-editor,
[contenteditable="true"] {
    background: rgba(18, 16, 13, 0.56) !important;
    border-color: rgba(255, 232, 199, 0.18) !important;
    color: var(--innook-ink) !important;
    box-shadow: inset 0 1px 0 rgba(255, 248, 237, 0.04);
}

input:focus,
select:focus,
textarea:focus,
.rich-editor:focus,
.note-editor:focus {
    border-color: rgba(229, 174, 111, 0.72) !important;
    box-shadow: 0 0 0 3px rgba(216, 155, 85, 0.16) !important;
}

input::placeholder,
textarea::placeholder {
    color: rgba(215, 197, 173, 0.58) !important;
}

.stat-card,
.overview-metric-card,
.quiz-fast-card,
.forecast-day-item,
.motivation-meta,
.motivation-tomorrow,
.forecast-tomorrow {
    border-radius: var(--innook-radius);
    background:
        linear-gradient(145deg, rgba(255, 248, 237, 0.1), rgba(255, 248, 237, 0.035)),
        rgba(28, 25, 20, 0.58);
    border-color: var(--innook-border);
}

.stat-kicker,
.overview-title-row p,
.timeline-section h3 {
    letter-spacing: 0.14em;
    color: rgba(237, 211, 176, 0.86) !important;
}

.kanban-column {
    border-radius: 22px;
    background:
        linear-gradient(180deg, rgba(255, 248, 237, 0.11), rgba(255, 248, 237, 0.04)),
        rgba(18, 21, 16, 0.62);
}

.kanban-column h3 {
    color: var(--innook-ink);
}

.task-card {
    border-radius: 16px;
    background:
        linear-gradient(145deg, rgba(255, 248, 237, 0.12), rgba(255, 248, 237, 0.035)),
        rgba(32, 29, 23, 0.84);
    border-color: rgba(255, 232, 199, 0.15);
    box-shadow: 0 14px 36px rgba(7, 10, 8, 0.28);
}

.task-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 46px rgba(7, 10, 8, 0.36);
}

.task-card.drop-target,
.kanban-column.drop-target {
    border-color: rgba(229, 174, 111, 0.82) !important;
    box-shadow: 0 0 0 2px rgba(229, 174, 111, 0.2), var(--innook-shadow);
}

.sticky-panel {
    background:
        linear-gradient(160deg, rgba(255, 244, 204, 0.96), rgba(237, 204, 142, 0.9));
    color: #2f2418;
    border-color: rgba(95, 64, 31, 0.18);
}

.note-card {
    background:
        linear-gradient(160deg, rgba(255, 248, 218, 0.96), rgba(243, 221, 157, 0.88));
    color: #30271c;
    border-color: rgba(95, 64, 31, 0.14);
}

.pt-quick-modal,
.pt-modal-shell {
    background: rgba(10, 11, 8, 0.68) !important;
}

.pt-quick-modal-panel,
.pt-modal-shell > div,
.fixed.inset-0 > .glass {
    border-radius: 24px !important;
    background:
        linear-gradient(150deg, rgba(255, 248, 237, 0.12), rgba(255, 248, 237, 0.045)),
        rgba(28, 25, 20, 0.94) !important;
    border-color: var(--innook-border) !important;
}

.custom-scrollbar::-webkit-scrollbar-thumb,
::-webkit-scrollbar-thumb {
    background: rgba(216, 155, 85, 0.34);
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover,
::-webkit-scrollbar-thumb:hover {
    background: rgba(216, 155, 85, 0.5);
}

.login-galaxy-shell .galaxy-hologram {
    background:
        radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(229, 174, 111, 0.28), transparent 42%),
        radial-gradient(circle at 18% 24%, rgba(86, 132, 96, 0.42), transparent 36%),
        radial-gradient(circle at 82% 72%, rgba(107, 68, 43, 0.38), transparent 42%),
        linear-gradient(135deg, #101611 0%, #1f3429 42%, #3a2b1f 78%, #120f0c 100%);
}

/* Task detail modal refresh. */
.task-detail-overlay {
    padding: 18px;
}

.task-detail-modal {
    max-width: min(920px, calc(100vw - 28px)) !important;
    background:
        linear-gradient(150deg, rgba(255, 248, 237, 0.13), rgba(255, 248, 237, 0.045)),
        rgba(26, 23, 18, 0.96) !important;
    border: 1px solid rgba(255, 232, 199, 0.18) !important;
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.58);
}

.task-detail-scroll {
    max-height: min(90vh, 840px);
    overflow-y: auto;
}

.task-detail-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 24px 26px 18px;
    background:
        linear-gradient(180deg, rgba(32, 29, 23, 0.98), rgba(32, 29, 23, 0.9));
    border-bottom: 1px solid rgba(255, 232, 199, 0.12);
}

.task-project-pill {
    display: inline-flex;
    max-width: 100%;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(216, 155, 85, 0.16);
    border: 1px solid rgba(216, 155, 85, 0.28);
    color: #f0cf9e;
    font-size: 11px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
}

.task-detail-title {
    margin: 0;
    max-width: 640px;
    color: var(--innook-ink);
    font-size: clamp(22px, 3vw, 32px);
    font-weight: 700;
    line-height: 1.14;
    letter-spacing: 0;
}

.task-title-input {
    min-width: min(560px, 60vw);
}

.task-detail-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.task-action-secondary,
.task-close-btn,
.task-close-footer {
    background: rgba(255, 248, 237, 0.08) !important;
    border: 1px solid rgba(255, 232, 199, 0.14) !important;
    color: var(--innook-ink) !important;
}

.task-close-btn {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
}

.task-detail-body {
    padding: 22px 26px 26px;
}

.task-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.task-meta-card {
    min-height: 96px;
    padding: 14px;
    border-radius: 18px;
    background:
        linear-gradient(145deg, rgba(255, 248, 237, 0.1), rgba(255, 248, 237, 0.035)),
        rgba(18, 16, 13, 0.44);
    border: 1px solid rgba(255, 232, 199, 0.14);
}

.task-meta-label,
.task-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    color: rgba(237, 211, 176, 0.78) !important;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.task-meta-value,
.task-stage-chip,
.task-money-value {
    color: var(--innook-ink);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.task-stage-chip {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(111, 137, 243, 0.15);
    border: 1px solid rgba(111, 137, 243, 0.28);
    color: #aebaff;
}

.task-money-card {
    border-color: rgba(58, 211, 159, 0.24);
}

.task-money-value {
    color: #4de0a8;
}

.task-section,
.task-share-section {
    margin-top: 14px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(18, 16, 13, 0.36);
    border: 1px solid rgba(255, 232, 199, 0.12);
}

.task-description {
    min-height: 56px;
    color: rgba(255, 248, 237, 0.9) !important;
    font-size: 14px;
    line-height: 1.7;
}

.task-share-toggle,
.task-share-btn {
    min-height: 42px;
    border-radius: 12px !important;
    background: rgba(255, 248, 237, 0.07) !important;
    border-color: rgba(255, 232, 199, 0.14) !important;
}

.task-share-toggle:hover,
.task-share-btn:hover {
    background: rgba(216, 155, 85, 0.16) !important;
}

.timeline-section {
    border-top: 0 !important;
}

.timeline-section .rich-toolbar {
    border-radius: 14px;
    border-color: rgba(255, 232, 199, 0.14);
    background: rgba(15, 14, 12, 0.52);
}

.rich-editor-wrap {
    border-radius: 16px !important;
    border-color: rgba(255, 232, 199, 0.14) !important;
    background: rgba(12, 11, 9, 0.45) !important;
    overflow: hidden;
}

.timeline-section .rich-editor {
    min-height: 112px;
    padding: 14px;
}

.timeline-section .space-y-4 > .flex {
    padding: 12px;
    border-radius: 14px;
    background: rgba(255, 248, 237, 0.045);
    border: 1px solid rgba(255, 232, 199, 0.08);
}

.task-detail-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 232, 199, 0.12);
}

.task-delete-btn,
.task-close-footer {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 12px !important;
}

.task-delete-btn {
    color: #ff9f9f !important;
    background: rgba(127, 29, 29, 0.18);
    border: 1px solid rgba(248, 113, 113, 0.18);
}

.task-delete-btn:hover {
    background: rgba(127, 29, 29, 0.28);
}

@media (max-width: 820px) {
    .task-detail-header {
        flex-direction: column;
        padding: 20px 18px 14px;
    }

    .task-detail-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .task-detail-body {
        padding: 18px;
    }

    .task-meta-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .task-detail-overlay {
        padding: 10px;
    }

    .task-meta-grid {
        grid-template-columns: 1fr;
    }

    .task-detail-footer {
        flex-direction: column-reverse;
    }

    .task-delete-btn,
    .task-close-footer {
        width: 100%;
    }
}
