/* Dark night city base */
body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
    background: var(--bg-primary);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Faint skyline / neon glow */
.skyline-overlay {
    position: fixed;
    inset: 0;
    background:
        linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 40%, transparent 100%),
        radial-gradient(circle at 20% 80%, rgba(0, 255, 170, 0.16) 0, transparent 55%),
        radial-gradient(circle at 80% 20%, rgba(0, 200, 255, 0.16) 0, transparent 55%);
    pointer-events: none;
    z-index: 0;
}

/* Glassy container */
.container {
    position: relative;
    z-index: 1;
    width: min(900px, 90vw);
    padding: 32px 28px 40px;
    border-radius: 20px;
    background: var(--bg-panel);
    box-shadow:
        0 0 40px rgba(0, 255, 170, 0.18),
        0 0 80px rgba(0, 140, 255, 0.16);
    border: 1px solid rgba(0, 255, 170, 0.25);
    backdrop-filter: blur(18px);
}

/* Header */
header h1 {
    font-size: 2.2rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #e4f9ff;
    text-shadow: 0 0 12px rgba(0, 255, 170, 0.9);
    margin: 0 0 4px;
}

.tagline {
    margin-top: 4px;
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* Pillar cards */
.pillars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.pillar-card {
    background: rgba(10, 15, 35, 0.9);
    border-radius: 14px;
    padding: 14px 14px 16px;
    border: 1px solid rgba(159, 183, 255, 0.3);
    box-shadow: 0 0 16px rgba(0, 140, 255, 0.18);
}

.pillar-card h2 {
    font-size: 1rem;
    margin: 0 0 6px;
    color: #e0ecff;
}

.pillar-card p {
    font-size: 0.85rem;
    color: #aebbe9;
}

/* Buttons */
.cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
}

.primary-btn,
.secondary-btn {
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.primary-btn {
    background: linear-gradient(135deg, #00ffaa, #00b4ff);
    color: #020408;
    box-shadow:
        0 0 14px rgba(0, 255, 170, 0.7),
        0 0 24px rgba(0, 180, 255, 0.5);
}

.primary-btn:hover {
    transform: translateY(-1px);
    box-shadow:
        0 0 20px rgba(0, 255, 170, 0.9),
        0 0 30px rgba(0, 180, 255, 0.7);
}

.secondary-btn {
    background: rgba(4, 10, 24, 0.9);
    color: #d6e6ff;
    border: 1px solid rgba(0, 180, 255, 0.6);
    box-shadow: 0 0 14px rgba(0, 180, 255, 0.45);
}

.secondary-btn:hover {
    transform: translateY(-1px);
    background: rgba(7, 16, 34, 0.95);
}
.theme-toggle {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px 8px;
    margin-right: 6px;
    border-radius: 999px;
    transition: background 0.2s ease, opacity 0.2s ease;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
    opacity: 0.85;
}

/* Themes */
:root[data-theme="dark-neon"] {
    --bg-primary: #050814;
    --bg-panel: #0c1024;
    --text-main: #f4f6ff;
    --text-muted: #9aa4d4;
    --accent: #00ffaa;
}

:root[data-theme="soft-night"] {
    --bg-primary: #151827;
    --bg-panel: #20243a;
    --text-main: #edf1ff;
    --text-muted: #b4bedc;
    --accent: #32b8c6;
}
/* Panels that follow theme background */
.today-column,
.task-card,
.habit-row,
.ref-card,
.goal-card,
.coach-card,
.input-select,
.input-text,
.habit-day {
    background: var(--bg-panel);
}
.tagline,
.ref-placeholder,
.score-text {
    color: var(--text-muted);
}

.badge-vibe,
.score-number,
.goal-pillar-chip,
.tiny-btn {
    border-color: var(--accent);
    color: var(--accent);
}
/* Today view layout */
.today-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 20px;
}

.today-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    font-size: 0.8rem;
    color: #c0d4ff;
}

.today-date {
    opacity: 0.85;
}

.today-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.today-column {
    border-radius: 16px;
    padding: 14px 14px 16px;
    border: 1px solid rgba(159, 183, 255, 0.3);
    background: var(--bg-panel);
}

.section-title {
    margin: 0 0 8px;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #dbe6ff;
}

/* Badges & pills */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.badge-vibe {
    background: rgba(0, 255, 170, 0.16);
    border: 1px solid rgba(0, 255, 170, 0.6);
    color: #9fffe0;
}

.badge-habit {
    background: rgba(0, 180, 255, 0.12);
    border: 1px solid rgba(0, 180, 255, 0.6);
    color: #c2e6ff;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}

.pill-work {
    background: rgba(0, 255, 170, 0.15);
    border: 1px solid rgba(0, 255, 170, 0.7);
    color: #a6ffdd;
}

.pill-health {
    background: rgba(255, 0, 138, 0.15);
    border: 1px solid rgba(255, 0, 138, 0.7);
    color: #ffb4dd;
}

.pill-mind {
    background: rgba(140, 120, 255, 0.18);
    border: 1px solid rgba(140, 120, 255, 0.7);
    color: #e0d6ff;
}

.pill-money {
    background: rgba(255, 200, 0, 0.16);
    border: 1px solid rgba(255, 200, 0, 0.7);
    color: #ffeaa3;
}

.pill-mood {
    background: rgba(0, 180, 255, 0.14);
    border: 1px solid rgba(0, 180, 255, 0.7);
    color: #d0edff;
}

/* Cards & rows */
.card-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.task-card {
    border-radius: 12px;
    padding: 8px 10px;
    border: 1px solid rgba(74, 110, 220, 0.6);
    background: var(--bg-panel);
}

.task-text {
    margin: 4px 0 0;
    font-size: 0.85rem;
}

.habit-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 999px;
    border: 1px solid rgba(74, 110, 220, 0.6);
    background: var(--bg-panel);
}

/* Habit tracker mini stats */
.habit-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
    font-size: 0.75rem;
}

.habit-streak {
    color: #ffb347;
}

.habit-week {
    display: inline-flex;
    gap: 4px;
}

.habit-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
}

.habit-dot.done {
    background: #00ffaa;
    box-shadow: 0 0 6px rgba(0, 255, 170, 0.7);
}

.habit-main {
    display: flex;
    align-items: center;
    gap: 8px;
}

.habit-done {
    opacity: 0.6;
    background: rgba(2, 10, 25, 0.9);
}

.habit-done .habit-text {
    text-decoration: line-through;
}

.habit-text {
    flex: 1;
    font-size: 0.8rem;
}

.ref-card {
    border-radius: 12px;
    padding: 10px 10px 12px;
    border: 1px solid rgba(74, 110, 220, 0.6);
    background: var(--bg-panel);
}

.ref-label {
    font-size: 0.8rem;
}

.mood-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 6px 0 10px;
}

.ref-placeholder {
    margin: 4px 0 0;
    font-size: 0.8rem;
}

/* Link styled as button for Today */
.link-btn {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
/* Add task form */
.today-add {
    margin-top: 10px;
}

.add-task-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.input-select,
.input-text {
    background: rgba(3, 7, 20, 0.9);
    border-radius: 999px;
    border: 1px solid rgba(159, 183, 255, 0.6);
    color: #e4f0ff;
    padding: 8px 12px;
    font-size: 0.85rem;
    outline: none;
}

.input-select {
    min-width: 180px;
    background: var(--bg-panel);
}

.input-text {
    flex: 1;
    min-width: 220px;
    background: var(--bg-panel);
}

.input-select:focus,
.input-text:focus {
    border-color: rgba(0, 255, 170, 0.8);
    box-shadow: 0 0 10px rgba(0, 255, 170, 0.4);
}

.add-task-form .primary-btn {
    padding-inline: 16px;
}

.task-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

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

.task-done {
    opacity: 0.6;
    background: rgba(2, 20, 10, 0.9);
}

.task-done .task-text {
    text-decoration: line-through;
}

.tiny-btn {
    background: transparent;
    border-radius: 999px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 8px;
    cursor: pointer;
}

.tiny-btn:hover {
    background: rgba(0, 255, 170, 0.12);
}
.tiny-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
}

.check-square {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    border: 1px solid rgba(0, 255, 170, 0.8);
    box-shadow: 0 0 6px rgba(0, 255, 170, 0.5);
    background: rgba(1, 10, 6, 0.9);
}

.tiny-checkbox:hover .check-square {
    background: rgba(0, 255, 170, 0.3);
}

.check-label {
    font-size: 0.7rem;
}
.task-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.task-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
}

.tiny-icon-btn {
    background: transparent;
    border: none;
    color: rgba(255, 120, 140, 0.8);
    font-size: 1rem;
    line-height: 1;
    padding: 2px 4px;
    cursor: pointer;
}

.tiny-icon-btn:hover {
    color: rgba(255, 160, 180, 1);
}
.tiny-chip-link {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border: 1px solid rgba(0, 180, 255, 0.7);
    color: #c2e6ff;
    background: rgba(4, 12, 26, 0.9);
    text-decoration: none;
    cursor: pointer;
}

.tiny-chip-link:hover {
    background: rgba(8, 20, 40, 0.95);
    box-shadow: 0 0 10px rgba(0, 180, 255, 0.5);
}

/* Habit tracker grid */
.habit-grid-section {
    margin-top: 16px;
}

.habit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(36px, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.habit-day-form {
    margin: 0;
}

.habit-day {
    border-radius: 8px;
    border: 1px solid rgba(74, 110, 220, 0.6);
    min-height: 40px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #d6e3ff;
    cursor: pointer;
}

.habit-day:hover {
    border-color: rgba(0, 255, 170, 0.9);
    box-shadow: 0 0 10px rgba(0, 255, 170, 0.5);
}

.habit-day-number {
    font-weight: 600;
}

.habit-day-status {
    opacity: 0.8;
    font-size: 0.7rem;
}

.habit-day-done {
    background: rgba(0, 255, 170, 0.15);
    border-color: rgba(0, 255, 170, 0.9);
    color: #b9ffe6;
}
.goals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.goal-card {
    border-radius: 16px;
    padding: 14px 14px 16px;
    border: 1px solid rgba(159, 183, 255, 0.4);
    box-shadow: 0 0 18px rgba(0, 140, 255, 0.25);
    background: var(--bg-panel);
}

.goal-title {
    margin: 0 0 6px;
    font-size: 1rem;
}

.goal-desc {
    margin: 0 0 10px;
    font-size: 0.85rem;
}

.goal-pillars {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.goal-pillar-chip {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(1, 10, 6, 0.9);
}
.goal-align {
    margin: 0 0 8px;
    font-size: 0.8rem;
    color: #9fffe0;
}
.coach-section {
    margin-top: 16px;
}

.coach-card {
    background: rgba(8, 12, 30, 0.9);
    border-radius: 16px;
    padding: 14px 14px 16px;
    border: 1px solid rgba(0, 255, 170, 0.5);
    box-shadow: 0 0 18px rgba(0, 255, 170, 0.3);
    background: var(--bg-panel);
}

.coach-list {
    margin: 8px 0 0;
    padding-left: 18px;
    font-size: 0.85rem;
}
.time-message {
    margin: 12px 0 20px;
    padding: 12px 14px;
    background: rgba(0, 255, 170, 0.1);
    border-left: 3px solid #00ffaa;
    font-size: 0.85rem;
    color: #a8e6d6;
    border-radius: 4px;
}

.today-score-card {
    margin: 16px 0 20px;
    padding: 14px;
    background: rgba(50, 184, 198, 0.08);
    border: 1px solid rgba(50, 184, 198, 0.4);
    border-radius: 12px;
}

.score-display {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 8px;
}

.score-number {
    font-size: 1.5rem;
    font-weight: 600;
    color: #32b8c6;
}

.score-label {
    font-size: 0.75rem;
    color: #a8e6d6;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.score-bar {
    height: 6px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.score-fill {
    height: 100%;
    background: linear-gradient(90deg, #32b8c6, #00ffaa);
    transition: width 0.3s ease;
}

.score-text {
    font-size: 0.8rem;
    color: #9fffe0;
    margin: 0;
}
.reflection-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.reflection-label {
    font-size: 0.8rem;
    opacity: 0.8;
}

.reflection-input {
    background: transparent;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 8px 10px;
    color: inherit;
    font-size: 0.9rem;
}
.btn-reflection {
    margin-top: 6px;
    width: fit-content;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(0, 0, 0, 0.25);
    color: #f5f5f5;
    font-size: 0.8rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

.btn-reflection:hover {
    background: rgba(0, 255, 170, 0.12);
    box-shadow: 0 0 10px rgba(0, 255, 170, 0.25);
    transform: translateY(-1px);
}

.btn-reflection:active {
    transform: translateY(0);
    box-shadow: none;
}
.coach-memory {
    margin: 12px 0 18px;
    padding: 10px 12px;
    border-radius: 8px;
    border-left: 3px solid #00ffaa;
    background: rgba(0, 255, 170, 0.06);
    font-size: 0.85rem;
    color: #a8e6d6;
}

.coach-memory__text {
    font-weight: 500;
    color: #e6fff7;
}
/* Main text that should follow theme */
header h1,
.section-title,
.task-text,
.goal-title,
.coach-list {
    color: var(--text-main);
}

/* Muted text that should soften in soft-night */
.tagline,
.ref-placeholder,
.score-text,
.habit-text,
.goal-desc,
.ref-label {
    color: var(--text-muted);
}
.clear-tasks-form {
    margin-top: 8px;
}

.clear-tasks-btn {
    border-color: rgba(255, 120, 140, 0.8);
    color: rgba(255, 200, 210, 0.95);
}
.inline-btn {
    display: inline-block;
    margin-left: 1rem;
    vertical-align: middle;
}
.habit-week {
    display: inline-flex;
    gap: 4px;
    margin-top: 2px;
}

.habit-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
}

.habit-dot.done {
    background: #00ffaa;
    box-shadow: 0 0 6px rgba(0, 255, 170, 0.7);
}
.habit-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 14px;

    /* 🔑 FIX */
    flex-wrap: wrap;
    max-width: 100%;
    overflow: hidden;
}

.habit-main {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0; /* 🔑 allows text wrapping */
}

.habit-text {
    font-size: 0.8rem;
    white-space: normal;
    word-break: break-word;
}
