:root {
    --cream: #FAF7F2;
    --sand: #F0E6D3;
    --olive: #3D4F2F;
    --deep-olive: #2D3A2D;
    --ink: #26331F;
    --sage: #7A8B6F;
    --amber: #D4922A;
    --amber-light: #F5DEB3;
    --terracotta: #C4623A;
    --warm-gray: #A89B8C;
    --warm-gray-light: #D4C9BA;
    --dark-bg: #1E2A1E;
    --text-primary: #2C2C2A;
    --text-secondary: #6B6560;
    --radius: 18px;
    --radius-sm: 12px;
    --pill: 999px;
    --shadow: 0 2px 16px rgba(45, 58, 45, 0.07);
    --shadow-hover: 0 8px 28px rgba(45, 58, 45, 0.13);
    --hairline: 1px solid rgba(61, 79, 47, 0.16);
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Ranade', sans-serif;
    background:
        radial-gradient(900px 520px at 88% -8%, rgba(212, 146, 42, 0.09), transparent 60%),
        radial-gradient(820px 620px at -12% 24%, rgba(122, 139, 111, 0.13), transparent 55%),
        linear-gradient(180deg, #FAF7F2 0%, #F3EDE1 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* === NAVBAR (pill flutuante) === */
.navbar {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    background: rgba(250, 247, 242, 0.8);
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    border: 1px solid rgba(61, 79, 47, 0.09);
    border-radius: var(--pill);
    padding: 9px 12px 9px 22px;
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: 0 6px 24px rgba(45, 58, 45, 0.07);
    max-width: calc(100vw - 32px);
}

.navbar h1 {
    font-family: 'Fraunces', serif;
    font-weight: 500;
    font-size: 1.12rem;
    color: var(--olive);
    letter-spacing: -0.02em;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar h1 .logo-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--amber);
    flex-shrink: 0;
}

.navbar h1 em {
    font-style: italic;
    color: var(--amber);
}

.nav-tabs {
    display: flex;
    gap: 2px;
    background: rgba(61, 79, 47, 0.06);
    border-radius: var(--pill);
    padding: 3px;
}

.nav-tab {
    background: transparent;
    border: none;
    border-radius: var(--pill);
    padding: 7px 15px;
    font-family: 'Ranade', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.nav-tab .tab-icon { font-size: 0.9rem; }

.nav-tab:hover { color: var(--olive); }

.nav-tab.active {
    background: var(--ink);
    color: var(--cream);
    box-shadow: 0 2px 8px rgba(45, 58, 45, 0.2);
}

.navbar .total-points {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--deep-olive);
    background: rgba(212, 146, 42, 0.18);
    padding: 5px 13px;
    border-radius: var(--pill);
    white-space: nowrap;
}

.navbar-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* === BOTÕES === */
.btn-nav {
    background: var(--ink);
    color: var(--cream);
    border: none;
    border-radius: var(--pill);
    padding: 8px 18px;
    font-family: 'Ranade', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.btn-nav:hover {
    background: var(--deep-olive);
    transform: translateY(-1px);
}

.btn-nav.outline {
    background: transparent;
    color: var(--olive);
    border: 1.5px solid rgba(61, 79, 47, 0.35);
}

.btn-nav.outline:hover {
    border-color: var(--olive);
    background: rgba(61, 79, 47, 0.05);
    color: var(--olive);
}

/* CTA primário: pill ink com chip circular âmbar embutido */
.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--ink);
    color: var(--cream);
    border: none;
    border-radius: var(--pill);
    padding: 7px 7px 7px 20px;
    font-family: 'Ranade', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-cta:hover {
    background: var(--deep-olive);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(45, 58, 45, 0.22);
}

.btn-cta .chip-arrow {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--amber);
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
    transition: var(--transition);
}

.btn-cta:hover .chip-arrow { transform: translateX(2px); }

.btn-cta.full {
    width: 100%;
    justify-content: space-between;
}

.btn-confirm {
    background: var(--ink);
    color: var(--cream);
    border: none;
    border-radius: var(--pill);
    padding: 10px 22px;
    font-family: 'Ranade', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-confirm:hover {
    background: var(--deep-olive);
    transform: translateY(-1px);
}

.btn-cancel {
    background: transparent;
    color: var(--text-secondary);
    border: 1.5px solid rgba(61, 79, 47, 0.22);
    border-radius: var(--pill);
    padding: 10px 22px;
    font-family: 'Ranade', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-cancel:hover {
    border-color: var(--olive);
    color: var(--olive);
    background: rgba(61, 79, 47, 0.04);
}

.btn-ghost {
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Ranade', sans-serif;
    font-size: 0.75rem;
    color: var(--warm-gray);
    padding: 4px 10px;
    border-radius: var(--pill);
    transition: var(--transition);
}

.btn-ghost:hover {
    background: var(--sand);
    color: var(--terracotta);
}

/* === VIEWS === */
.view {
    display: none;
    padding: 100px 32px 56px;
    min-height: 100vh;
    max-width: 1200px;
    margin: 0 auto;
}

.view.active { display: block; }

.view-wide { max-width: 1400px; }

/* Header editorial: hairline + título à esquerda, descrição à direita */
.view-header {
    border-top: var(--hairline);
    padding-top: 20px;
    margin-bottom: 32px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 16px 48px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(61, 79, 47, 0.07);
    color: var(--olive);
    border-radius: var(--pill);
    padding: 5px 14px;
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.eyebrow .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--amber);
}

.view-header h2 {
    font-family: 'Fraunces', serif;
    font-weight: 500;
    font-size: 2.1rem;
    color: var(--olive);
    letter-spacing: -0.02em;
    line-height: 1.05;
}

.view-header h2 em {
    font-style: italic;
    color: var(--amber);
}

.vh-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    max-width: 400px;
}

.vh-desc {
    font-size: 0.85rem;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.65;
    text-align: right;
}

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

.week-label {
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 300;
}

/* === CARD GENÉRICO (sombra suave, sem borda) === */
.card {
    background: #FFFDF9;
    border: none;
    border-radius: var(--radius);
    padding: 26px;
    box-shadow: var(--shadow);
}

.card h3 {
    font-family: 'Fraunces', serif;
    font-weight: 500;
    font-size: 1.15rem;
    color: var(--olive);
    margin-bottom: 6px;
}

.card .card-sub {
    font-size: 0.78rem;
    font-weight: 300;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.55;
}

/* Card escuro de contraste (bento) */
.card.dark {
    background:
        radial-gradient(400px 300px at 80% 0%, rgba(212, 146, 42, 0.12), transparent 60%),
        linear-gradient(160deg, #26331F 0%, #1E2A1E 100%);
    color: var(--cream);
    position: relative;
    overflow: hidden;
}

.card.dark::after {
    content: '';
    position: absolute;
    top: 22px;
    right: 34px;
    width: 9px;
    height: 9px;
    background: var(--amber);
    box-shadow:
        13px 0 0 rgba(245, 222, 179, 0.55),
        0 13px 0 rgba(196, 98, 58, 0.55),
        13px 13px 0 rgba(212, 146, 42, 0.3);
}

.card.dark h3 { color: var(--amber-light); }

.card.dark .card-sub { color: rgba(250, 247, 242, 0.62); }

/* === SLIDERS === */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: rgba(61, 79, 47, 0.14);
    border-radius: 3px;
    outline: none;
    width: 100%;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--amber);
    cursor: pointer;
    border: 3px solid #FFFDF9;
    box-shadow: 0 1px 6px rgba(45, 58, 45, 0.3);
}

input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--amber);
    cursor: pointer;
    border: 3px solid #FFFDF9;
    box-shadow: 0 1px 6px rgba(45, 58, 45, 0.3);
}

/* === TEXTAREAS / INPUTS === */
textarea, .text-input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid rgba(61, 79, 47, 0.14);
    border-radius: var(--radius-sm);
    font-family: 'Ranade', sans-serif;
    font-size: 0.85rem;
    color: var(--text-primary);
    background: white;
    transition: var(--transition);
    outline: none;
    resize: vertical;
}

textarea:focus, .text-input:focus {
    border-color: var(--sage);
    box-shadow: 0 0 0 3px rgba(122, 139, 111, 0.12);
}

textarea { min-height: 76px; line-height: 1.5; }

/* === CHIPS === */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    background: white;
    border: 1.5px solid rgba(61, 79, 47, 0.14);
    border-radius: var(--pill);
    padding: 6px 15px;
    font-family: 'Ranade', sans-serif;
    font-size: 0.78rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.chip:hover {
    border-color: var(--sage);
    color: var(--olive);
}

.chip.selected {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--cream);
}

/* === EMOÇÕES EM NÍVEIS (registro de humor) === */
.label-hint {
    font-weight: 300;
    color: var(--warm-gray);
}

.chips-divider {
    border: none;
    border-top: 1px dashed rgba(61, 79, 47, 0.22);
    margin: 18px 0 0;
}

.chips-custom { margin-top: 8px; }
.chips-custom:empty { display: none; }

.chip .chip-x {
    display: inline-block;
    margin-left: 7px;
    font-weight: 700;
    opacity: 0.5;
}
.chip .chip-x:hover { opacity: 1; color: var(--terracotta, #C4623A); }

.emocao-outra-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}
.emocao-outra-row .text-input { flex: 1; }
.emocao-outra-row .btn-confirm { padding: 8px 16px; }

.coex-panel {
    margin-top: 16px;
    padding: 13px 16px;
    background: var(--sand, #F0E9DD);
    border-left: 3px solid var(--amber, #D4922A);
    border-radius: var(--radius-sm, 10px);
    animation: slideIn 0.2s ease-out;
}

.coex-title {
    display: block;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--warm-gray);
    margin-bottom: 5px;
}

.coex-pares {
    font-family: 'Fraunces', serif;
    font-size: 0.92rem;
    color: var(--olive);
    font-weight: 500;
}

.coex-simbolo { color: var(--amber, #D4922A); font-weight: 700; padding: 0 4px; }

.coex-texto {
    font-size: 0.76rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-top: 6px;
    font-weight: 300;
}

.entry-card .mini-chip.coex-mini {
    background: rgba(212, 146, 42, 0.16);
    color: var(--olive);
    font-weight: 700;
}

/* ============ KANBAN BOARD ============ */
.board {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 4px 4px 24px;
    scroll-behavior: smooth;
}

.board::-webkit-scrollbar { height: 6px; }
.board::-webkit-scrollbar-track { background: transparent; border-radius: 3px; }
.board::-webkit-scrollbar-thumb { background: var(--warm-gray-light); border-radius: 3px; }

.column {
    min-width: 280px;
    max-width: 320px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: #FFFDF9;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.column.col-today {
    box-shadow: 0 4px 24px rgba(212, 146, 42, 0.18), 0 0 0 1.5px rgba(212, 146, 42, 0.35);
}

.column-header {
    padding: 20px 20px 8px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.column-header .day-name {
    font-family: 'Fraunces', serif;
    font-weight: 500;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
    color: var(--olive);
    display: flex;
    align-items: center;
    gap: 8px;
}

.day-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--sage);
    flex-shrink: 0;
}

.col-mon .day-dot { background: var(--olive); }
.col-tue .day-dot { background: #5C6B4F; }
.col-wed .day-dot { background: var(--terracotta); }
.col-thu .day-dot { background: var(--amber); }
.col-fri .day-dot { background: var(--sage); }
.col-sat .day-dot { background: #8B6F5C; }
.col-sun .day-dot { background: var(--deep-olive); }

.today-chip {
    font-family: 'Ranade', sans-serif;
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: var(--amber);
    color: var(--ink);
    border-radius: var(--pill);
    padding: 3px 10px;
    font-style: normal;
}

.column-header .day-date {
    font-size: 0.74rem;
    font-weight: 300;
    color: var(--text-secondary);
    margin-top: 4px;
    padding-left: 17px;
}

.column-header .header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
}

.column-header .task-count {
    font-size: 0.68rem;
    font-weight: 700;
    background: var(--sand);
    color: var(--text-secondary);
    border-radius: var(--pill);
    padding: 3px 11px;
    letter-spacing: 0.04em;
}

.column-header .task-progress {
    font-size: 0.62rem;
    font-weight: 400;
    color: var(--warm-gray);
}

.column-body {
    padding: 8px 14px 14px;
    flex: 1;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-radius: 0 0 var(--radius) var(--radius);
    transition: var(--transition);
}

.column-body.drag-over {
    background: rgba(212, 146, 42, 0.07);
    box-shadow: inset 0 0 0 2px rgba(212, 146, 42, 0.25);
}

/* === TASK CARDS === */
.task-card {
    background: white;
    border-radius: var(--radius-sm);
    padding: 13px 15px;
    cursor: grab;
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: 0 1px 6px rgba(45, 58, 45, 0.07);
    animation: slideIn 0.2s ease-out;
}

.task-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.task-card:active { cursor: grabbing; opacity: 0.85; }

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

.task-card.done { opacity: 0.6; background: #f7f4ee; box-shadow: none; }

.task-card.done .task-text {
    text-decoration: line-through;
    color: var(--warm-gray);
}

.task-card .task-top {
    display: flex;
    align-items: center;
    gap: 6px;
}

.task-card .task-tag {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 3px 9px;
    border-radius: var(--pill);
    width: fit-content;
}

.task-card .task-points {
    font-size: 0.6rem;
    font-weight: 700;
    color: #8B6914;
    margin-left: auto;
    background: rgba(212, 146, 42, 0.13);
    padding: 3px 8px;
    border-radius: var(--pill);
}

.task-card .task-pd {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--olive);
    background: rgba(122, 139, 111, 0.14);
    padding: 3px 8px;
    border-radius: var(--pill);
    cursor: help;
}

/* botão de repetição semanal: discreto no card, âmbar quando ativo */
.task-card .task-repeat {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 21px;
    height: 21px;
    margin-left: auto;
    padding: 0;
    border: 1.5px solid rgba(61, 79, 47, 0.16);
    border-radius: 50%;
    background: transparent;
    color: var(--warm-gray);
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.task-card .task-repeat:hover {
    border-color: var(--amber);
    color: var(--amber);
    transform: rotate(90deg);
}

.task-card .task-repeat.active {
    background: var(--amber);
    border-color: var(--amber);
    color: #FFFDF9;
}

.task-card .task-repeat.active:hover { transform: rotate(90deg); }

/* com o botão de repetir, os pontos deixam de empurrar para a direita */
.task-card .task-repeat + .task-points { margin-left: 0; }

/* === TEMPO ESTIMADO (bolinhas) === */
.task-card .task-tempo {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-top: 2px;
}

.t-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid var(--warm-gray-light);
    flex-shrink: 0;
}

.t-dot.filled {
    background: var(--sage);
    border-color: var(--sage);
}

.task-tempo-label {
    font-size: 0.62rem;
    color: var(--warm-gray);
    margin-left: 4px;
    white-space: nowrap;
}

/* seletor de bolinhas nos formulários */
.tempo-picker {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.tempo-dot {
    width: 16px;
    height: 16px;
    padding: 0;
    border-radius: 50%;
    border: 1.5px solid rgba(61, 79, 47, 0.22);
    background: transparent;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.tempo-dot:hover { border-color: var(--sage); }

.tempo-dot.filled {
    background: var(--sage);
    border-color: var(--sage);
}

.tempo-picker .tempo-label {
    font-size: 0.68rem;
    color: var(--text-secondary);
    white-space: nowrap;
    min-width: 44px;
}

/* botão que ordena o dia pela atividade mais rápida */
.bora-btn {
    margin: 0 0 10px;
    padding: 7px 14px;
    width: 100%;
    border: none;
    border-radius: var(--pill);
    background: rgba(212, 146, 42, 0.16);
    color: #8B6914;
    font-family: 'Ranade', sans-serif;
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.bora-btn:hover {
    background: var(--amber);
    color: #FFFDF9;
    transform: translateY(-1px);
}

.tag-work { background: #E8F0E4; color: var(--olive); }
.tag-personal { background: #FFF0DB; color: #8B6914; }
.tag-health { background: #FFE8E0; color: var(--terracotta); }
.tag-study { background: #E0E8F0; color: #3A5A7C; }
.tag-other { background: var(--sand); color: var(--text-secondary); }

.task-card .task-text {
    font-family: 'Fraunces', serif;
    font-size: 0.85rem;
    font-weight: 400;
    font-style: italic;
    line-height: 1.4;
    color: var(--text-primary);
    word-break: break-word;
}

.task-card .task-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: var(--transition);
    margin-top: auto;
    flex-wrap: wrap;
}

.task-card:hover .task-actions { opacity: 1; }

.task-actions button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.72rem;
    color: var(--warm-gray);
    padding: 3px 8px;
    border-radius: var(--pill);
    transition: var(--transition);
    font-family: 'Ranade', sans-serif;
}

.task-actions button:hover {
    background: var(--sand);
    color: var(--terracotta);
}

.task-actions button.btn-done { color: var(--sage); }

.task-actions button.btn-done:hover {
    background: #E8F0E4;
    color: var(--olive);
}

.task-actions button.btn-move { color: #8B6914; }

.task-actions button.btn-move:hover {
    background: #FFF0DB;
    color: #8B6914;
}

/* === EDIT MODE === */
.task-card.editing { cursor: default; }

.task-card.editing .task-text,
.task-card.editing .task-top { display: none; }

.edit-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.edit-form input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    border: 1.5px solid var(--sage);
    border-radius: var(--radius-sm);
    font-family: 'Ranade', sans-serif;
    font-size: 0.85rem;
    color: var(--text-primary);
    background: white;
    outline: none;
}

.edit-form .edit-row { display: flex; gap: 6px; }

.edit-form select {
    flex: 1;
    padding: 6px 10px;
    border: 1.5px solid rgba(61, 79, 47, 0.14);
    border-radius: var(--radius-sm);
    font-family: 'Ranade', sans-serif;
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: white;
    cursor: pointer;
    outline: none;
}

.edit-form .edit-actions { display: flex; gap: 4px; }

.edit-form .edit-actions button {
    padding: 7px 14px;
    border: none;
    border-radius: var(--pill);
    font-family: 'Ranade', sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    cursor: pointer;
}

.edit-form .edit-actions .btn-save {
    background: var(--ink);
    color: var(--cream);
}

.edit-form .edit-actions .btn-cancel-edit {
    background: var(--sand);
    color: var(--text-secondary);
}

/* === ADD TASK FORM === */
.add-task-area {
    margin-top: auto;
    padding-top: 8px;
}

.add-task-btn {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1.5px dashed rgba(61, 79, 47, 0.25);
    border-radius: var(--pill);
    color: var(--warm-gray);
    font-family: 'Ranade', sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.add-task-btn:hover {
    border-color: var(--sage);
    color: var(--olive);
    background: rgba(122, 139, 111, 0.05);
}

.add-form {
    display: none;
    flex-direction: column;
    gap: 8px;
}

.add-form.active { display: flex; }

.add-form input[type="text"] {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid rgba(61, 79, 47, 0.14);
    border-radius: var(--radius-sm);
    font-family: 'Ranade', sans-serif;
    font-size: 0.85rem;
    color: var(--text-primary);
    background: white;
    transition: var(--transition);
    outline: none;
}

.add-form input[type="text"]:focus {
    border-color: var(--sage);
    box-shadow: 0 0 0 3px rgba(122, 139, 111, 0.12);
}

.add-form select {
    width: 100%;
    padding: 8px 14px;
    border: 1.5px solid rgba(61, 79, 47, 0.14);
    border-radius: var(--radius-sm);
    font-family: 'Ranade', sans-serif;
    font-size: 0.78rem;
    color: var(--text-secondary);
    background: white;
    cursor: pointer;
    outline: none;
    transition: var(--transition);
}

.add-form select:focus { border-color: var(--sage); }

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

.difficulty-row label {
    font-size: 0.72rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.difficulty-row input[type="range"] { flex: 1; }

.difficulty-row .diff-value {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--olive);
    min-width: 18px;
    text-align: center;
}

.form-actions {
    display: flex;
    gap: 6px;
}

.form-actions button { flex: 1; padding: 8px; font-size: 0.78rem; }

/* === EMPTY STATE === */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    color: var(--warm-gray);
    gap: 8px;
    flex: 1;
}

.empty-state .empty-icon { font-size: 1.8rem; opacity: 0.4; }

.empty-state p {
    font-size: 0.78rem;
    font-weight: 300;
    text-align: center;
    line-height: 1.5;
}

/* ============ HUMOR ============ */
.humor-grid {
    display: grid;
    grid-template-columns: minmax(320px, 420px) 1fr;
    gap: 22px;
    align-items: start;
    margin-bottom: 24px;
}

.mood-display {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 14px 0 16px;
}

.mood-display .mood-emoji {
    font-size: 2rem;
    line-height: 1;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--sand);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mood-display .mood-label {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-size: 1.2rem;
    color: var(--olive);
}

.mood-scale-hint {
    display: flex;
    justify-content: space-between;
    font-size: 0.68rem;
    color: var(--warm-gray);
    margin-top: 6px;
    margin-bottom: 16px;
}

.humor-form .form-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin: 16px 0 8px;
}

.humor-form .btn-cta { margin-top: 20px; }

/* chart */
.humor-chart-svg { width: 100%; height: auto; display: block; }

.chart-empty {
    padding: 48px 24px;
    text-align: center;
    color: var(--warm-gray);
    font-size: 0.82rem;
    font-weight: 300;
    line-height: 1.6;
}

/* history */
.entry-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.entry-card {
    background: #FFFDF9;
    border: none;
    border-radius: var(--radius-sm);
    padding: 15px 18px;
    box-shadow: var(--shadow);
    animation: slideIn 0.2s ease-out;
}

.entry-card .entry-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.entry-card .entry-date {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--warm-gray);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.entry-card .entry-mood {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--olive);
    display: flex;
    align-items: center;
    gap: 6px;
}

.entry-card .entry-emocoes {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.entry-card .mini-chip {
    font-size: 0.62rem;
    font-weight: 500;
    background: var(--sand);
    color: var(--text-secondary);
    border-radius: var(--pill);
    padding: 2px 9px;
}

.entry-card .entry-nota {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 8px;
    line-height: 1.5;
}

.entry-card .entry-del {
    margin-left: auto;
}

/* Títulos de seção internos (editorial: hairline + serif) */
.section-title {
    font-family: 'Fraunces', serif;
    font-weight: 500;
    font-size: 1.15rem;
    color: var(--olive);
    border-top: var(--hairline);
    padding-top: 16px;
    margin: 36px 0 14px;
}

/* ============ RPD (Pensamentos) ============ */
.rpd-intro-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    background-color: #FFFDF9;
    background-image: radial-gradient(rgba(61, 79, 47, 0.13) 1px, transparent 1px);
    background-size: 16px 16px;
}

.rpd-intro-card p {
    font-size: 0.85rem;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.65;
    max-width: 620px;
}

.rpd-wizard { margin-bottom: 24px; }

.rpd-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
}

.rpd-progress .step-dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--sand);
    color: var(--text-secondary);
    font-size: 0.68rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.rpd-progress .step-dot.current {
    background: var(--amber);
    color: var(--ink);
    transform: scale(1.18);
    box-shadow: 0 2px 10px rgba(212, 146, 42, 0.4);
}

.rpd-progress .step-dot.completed {
    background: var(--ink);
    color: var(--cream);
}

.rpd-progress .step-line {
    flex: 1;
    height: 0;
    border-top: 2px dashed rgba(61, 79, 47, 0.2);
    min-width: 8px;
}

.rpd-step-title {
    font-family: 'Fraunces', serif;
    font-weight: 500;
    font-size: 1.3rem;
    color: var(--olive);
    margin-bottom: 4px;
}

.rpd-step-hint {
    font-size: 0.8rem;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 18px;
    max-width: 640px;
}

.rpd-field { margin-bottom: 16px; }

.rpd-field .form-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.slider-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.slider-row input[type="range"] { flex: 1; }

.slider-row .slider-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--olive);
    min-width: 46px;
    text-align: right;
}

.rpd-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-top: 22px;
}

.rpd-warn {
    color: var(--terracotta);
    font-size: 0.75rem;
    margin-top: 8px;
    display: none;
}

.rpd-warn.visible { display: block; }

.distorcao-chip-desc {
    font-size: 0.72rem;
    color: var(--text-secondary);
    background: var(--sand);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    margin-top: 10px;
    line-height: 1.5;
}

.rpd-resumo {
    background: var(--sand);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    font-size: 0.8rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.rpd-resumo strong { color: var(--olive); }

/* registros RPD salvos */
.rpd-entry .entry-situacao {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.5;
    margin: 6px 0;
}

.rpd-entry .entry-detail {
    display: none;
    margin-top: 12px;
    border-top: 1px dashed rgba(61, 79, 47, 0.2);
    padding-top: 12px;
}

.rpd-entry.expanded .entry-detail { display: block; }

.rpd-entry .detail-row { margin-bottom: 10px; }

.rpd-entry .detail-label {
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--sage);
    margin-bottom: 2px;
}

.rpd-entry .detail-text {
    font-size: 0.82rem;
    color: var(--text-primary);
    line-height: 1.5;
    white-space: pre-wrap;
}

.rpd-entry .entry-toggle { color: var(--sage); }

.intensity-badge {
    font-size: 0.66rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--pill);
    background: rgba(196, 98, 58, 0.13);
    color: var(--terracotta);
}

.intensity-badge.after {
    background: rgba(122, 139, 111, 0.16);
    color: var(--olive);
}

/* ============ FERRAMENTAS ============ */
.tools-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    margin-bottom: 36px;
}

/* respiração (card escuro) */
.breath-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 24px 0 8px;
}

.breath-circle-wrap {
    width: 190px;
    height: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.breath-circle {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, var(--amber-light), var(--amber) 70%);
    box-shadow: 0 0 60px rgba(212, 146, 42, 0.45), 0 0 20px rgba(212, 146, 42, 0.3);
    transform: scale(0.7);
}

.breath-label {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-size: 1.15rem;
    color: var(--cream);
    min-height: 1.6em;
}

.breath-count {
    font-size: 0.75rem;
    color: rgba(250, 247, 242, 0.55);
}

.breath-actions { display: flex; gap: 8px; }

/* botão claro sobre card escuro */
.btn-light {
    background: var(--cream);
    color: var(--ink);
    border: none;
    border-radius: var(--pill);
    padding: 10px 26px;
    font-family: 'Ranade', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-light:hover {
    background: white;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

/* três coisas boas */
.boas-inputs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.boas-inputs .boa-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.boas-inputs .boa-num {
    font-family: 'Fraunces', serif;
    font-style: italic;
    color: var(--amber);
    font-weight: 700;
    min-width: 16px;
}

.boa-entry-item {
    font-size: 0.82rem;
    color: var(--text-primary);
    line-height: 1.6;
    padding-left: 4px;
}

.boa-entry-item .boa-marker { color: var(--amber); font-weight: 700; }

/* distorções */
.distorcoes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.distorcao-card {
    background: #FFFDF9;
    border: none;
    border-radius: var(--radius-sm);
    padding: 18px 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.distorcao-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.distorcao-card h4 {
    font-family: 'Fraunces', serif;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--olive);
    margin-bottom: 6px;
}

.distorcao-card .dist-desc {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 8px;
}

.distorcao-card .dist-ex {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-size: 0.78rem;
    color: var(--terracotta);
    line-height: 1.5;
}

.dist-intro {
    font-size: 0.85rem;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 18px;
    max-width: 640px;
}

/* ============ MODAL ============ */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(30, 42, 30, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active { display: flex; }

.modal {
    background: var(--cream);
    border-radius: var(--radius);
    padding: 30px;
    max-width: 430px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(30, 42, 30, 0.3);
    animation: popIn 0.25s ease-out;
}

.modal h3 {
    font-family: 'Fraunces', serif;
    font-weight: 500;
    font-size: 1.25rem;
    color: var(--olive);
    margin-bottom: 4px;
}

.modal .modal-sub {
    font-size: 0.78rem;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 16px;
}

.modal .modal-task {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-size: 0.9rem;
    color: var(--text-primary);
    background: var(--sand);
    border-radius: var(--radius-sm);
    padding: 11px 16px;
    margin-bottom: 18px;
}

.modal .form-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin: 14px 0 6px;
}

.modal .modal-actions {
    display: flex;
    gap: 8px;
    margin-top: 24px;
}

.modal .modal-actions button { flex: 1; }

/* === TOAST === */
.toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--ink);
    color: var(--cream);
    font-size: 0.82rem;
    padding: 12px 26px;
    border-radius: var(--pill);
    box-shadow: 0 8px 30px rgba(30, 42, 30, 0.35);
    z-index: 300;
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

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

/* === ANIMATIONS === */
@keyframes slideIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes popIn {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

/* ============ INSIGHT DE DISTORÇÕES ============ */
.insight-card { margin-bottom: 24px; }

.insight-row {
    display: grid;
    grid-template-columns: 220px 1fr 44px;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
}

.insight-nome {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
}

.insight-bar-track {
    height: 10px;
    background: rgba(61, 79, 47, 0.08);
    border-radius: var(--pill);
    overflow: hidden;
}

.insight-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--sage), var(--olive));
    border-radius: var(--pill);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.insight-row:first-child .insight-bar {
    background: linear-gradient(90deg, var(--amber), #B87B1E);
}

.insight-count {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--olive);
    text-align: right;
}

.rpd-intro-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* ============ GROUNDING 5-4-3-2-1 ============ */
.grounding-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 18px 0 6px;
    text-align: center;
    min-height: 150px;
    justify-content: center;
}

.grounding-num {
    font-family: 'Fraunces', serif;
    font-size: 3.2rem;
    font-weight: 500;
    color: var(--amber);
    line-height: 1;
}

.grounding-texto {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-size: 1.05rem;
    color: var(--olive);
    line-height: 1.5;
    max-width: 300px;
}

.grounding-hint {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 300;
    max-width: 300px;
    line-height: 1.5;
}

/* ============ RELAXAMENTO MUSCULAR ============ */
.relax-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 14px 0 6px;
    text-align: center;
    min-height: 150px;
    justify-content: center;
}

.relax-info {
    font-size: 0.72rem;
    color: var(--warm-gray);
}

.relax-grupo {
    font-family: 'Fraunces', serif;
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--olive);
    min-height: 1.4em;
}

.relax-fase {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-size: 0.95rem;
    color: var(--terracotta);
    min-height: 1.4em;
}

.relax-fase.soltando { color: var(--sage); }

/* ============ CARTÃO DE ENFRENTAMENTO ============ */
.frases-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 14px;
}

.frase-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: var(--sand);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    animation: slideIn 0.2s ease-out;
}

.frase-item .frase-texto {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.5;
    flex: 1;
}

.frase-item .frase-texto::before { content: '“'; color: var(--amber); }
.frase-item .frase-texto::after { content: '”'; color: var(--amber); }

/* ============ EXPERIMENTOS ============ */
.exp-label { margin: 12px 0 6px; }

#expForm textarea { min-height: 56px; }

.exp-status {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 3px 10px;
    border-radius: var(--pill);
}

.exp-status.pendente { background: rgba(212, 146, 42, 0.16); color: #8B6914; }
.exp-status.concluido { background: rgba(122, 139, 111, 0.18); color: var(--olive); }

.exp-resultado-form {
    margin-top: 12px;
    border-top: 1px dashed rgba(61, 79, 47, 0.2);
    padding-top: 12px;
}

/* ============ SINCRONIZAÇÃO (Google) ============ */
.sync-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: 'Ranade', sans-serif;
    transition: var(--transition);
    position: relative;
    padding: 0;
}

.sync-btn.login {
    border: 1.5px solid rgba(61, 79, 47, 0.22);
    border-radius: var(--pill);
    padding: 7px 14px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--olive);
}

.sync-btn.login:hover {
    border-color: var(--olive);
    background: rgba(61, 79, 47, 0.05);
}

.sync-btn.conta { padding: 2px; }

.sync-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 1.5px rgba(61, 79, 47, 0.2);
}

.sync-avatar-fallback {
    background: var(--sage);
    color: var(--cream);
    font-size: 0.8rem;
    font-weight: 700;
}

.sync-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--warm-gray-light);
    flex-shrink: 0;
}

.sync-btn .sync-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    border: 2px solid var(--cream);
    width: 11px;
    height: 11px;
}

.sync-dot.ok { background: var(--sage); }
.sync-dot.erro, .sync-dot.desconectado { background: var(--terracotta); }
.sync-dot.conectando, .sync-dot.sincronizando {
    background: var(--amber);
    animation: syncPulse 1.2s ease-in-out infinite;
}

@keyframes syncPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

.sync-section { margin-bottom: 10px; }

.sync-section .dados-btn-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.sync-info {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #FFFDF9;
    border: 1.5px solid rgba(61, 79, 47, 0.14);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
}

.sync-info-texto {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.sync-info-texto strong {
    font-size: 0.82rem;
    color: var(--olive);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sync-info-texto span {
    font-size: 0.7rem;
    font-weight: 300;
    color: var(--text-secondary);
}

/* ============ MODAL DE DADOS ============ */
.dados-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dados-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    background: #FFFDF9;
    border: 1.5px solid rgba(61, 79, 47, 0.14);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Ranade', sans-serif;
    text-align: left;
    width: 100%;
}

.dados-btn:hover {
    border-color: var(--sage);
    background: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.dados-btn-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--olive);
}

.dados-btn-sub {
    font-size: 0.72rem;
    font-weight: 300;
    color: var(--text-secondary);
}

/* ============ SEMANAS ANTERIORES ============ */
.semana-arquivada .entry-head { gap: 14px; }

.semana-arquivada .semana-periodo {
    font-family: 'Fraunces', serif;
    font-weight: 500;
    font-size: 0.92rem;
    color: var(--olive);
}

.semana-arquivada .semana-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* ============ IMPRESSÃO ============ */
#printArea { display: none; }

@media print {
    body > *:not(#printArea) { display: none !important; }
    body::before { display: none !important; }
    body { background: white !important; }
    #printArea { display: block; }

    #printArea {
        font-family: Georgia, 'Times New Roman', serif;
        color: #222;
        font-size: 11pt;
        line-height: 1.5;
    }

    #printArea h1 {
        font-size: 18pt;
        font-weight: 600;
        margin-bottom: 2pt;
    }

    #printArea .print-meta {
        font-size: 9pt;
        color: #666;
        margin-bottom: 16pt;
    }

    #printArea h2 {
        font-size: 13pt;
        font-weight: 600;
        margin: 16pt 0 6pt;
        padding-top: 8pt;
        border-top: 1pt solid #999;
    }

    #printArea h3 {
        font-size: 11pt;
        font-weight: 600;
        margin: 10pt 0 3pt;
    }

    #printArea ul { margin: 4pt 0 8pt 16pt; }
    #printArea li { margin-bottom: 3pt; }
    #printArea p { margin-bottom: 4pt; }

    #printArea .print-vazio { color: #888; font-style: italic; }

    #printArea .print-rpd {
        border: 0.5pt solid #bbb;
        border-radius: 4pt;
        padding: 8pt 10pt;
        margin-bottom: 8pt;
        page-break-inside: avoid;
    }

    #printArea .print-label {
        font-weight: 600;
        font-size: 9pt;
        text-transform: uppercase;
        letter-spacing: 0.5pt;
        color: #555;
    }
}

/* === GRAIN TEXTURE OVERLAY === */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 999;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
    .humor-grid { grid-template-columns: 1fr; }
    .tools-grid { grid-template-columns: 1fr; }
    .view-header { grid-template-columns: 1fr; align-items: start; }
    .vh-right { align-items: flex-start; max-width: none; }
    .vh-desc { text-align: left; }
}

@media (max-width: 768px) {
    .navbar {
        top: 10px;
        padding: 8px 10px 8px 16px;
        gap: 10px;
    }
    .navbar h1 { font-size: 1rem; }
    .navbar .total-points { display: none; }

    /* tabs viram barra fixa no rodapé */
    .nav-tabs {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        border-radius: 0;
        background: rgba(250, 247, 242, 0.94);
        backdrop-filter: blur(16px) saturate(1.4);
        -webkit-backdrop-filter: blur(16px) saturate(1.4);
        border-top: 1px solid rgba(61, 79, 47, 0.1);
        padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
        justify-content: space-around;
        z-index: 150;
    }

    .nav-tab {
        flex-direction: column;
        gap: 2px;
        font-size: 0.62rem;
        padding: 6px 12px;
    }

    .nav-tab .tab-icon { font-size: 1.1rem; }

    .view { padding: 84px 16px 100px; }
    .view-header h2 { font-size: 1.6rem; }

    /* semana empilhada na vertical: rola a página para baixo, sem arrastar de lado */
    .board {
        flex-direction: column;
        overflow-x: visible;
        gap: 14px;
    }
    .column {
        min-width: 0;
        max-width: none;
        width: 100%;
        scroll-margin-top: 76px;
    }

    .task-card .task-actions { opacity: 1; }
}

/* ============ TELA DE LOGIN (gate) ============ */
.login-gate {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(900px 520px at 88% -8%, rgba(212, 146, 42, 0.11), transparent 60%),
        radial-gradient(820px 620px at -12% 24%, rgba(122, 139, 111, 0.16), transparent 55%),
        linear-gradient(180deg, #FAF7F2 0%, #F3EDE1 100%);
    animation: gateFade 0.4s ease;
}
.login-gate.active { display: flex; }
body.gated { overflow: hidden; }

@keyframes gateFade { from { opacity: 0; } to { opacity: 1; } }

.login-card {
    width: 100%;
    max-width: 460px;
    text-align: center;
    background: rgba(250, 247, 242, 0.72);
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    border: 1px solid rgba(61, 79, 47, 0.1);
    border-radius: var(--radius);
    padding: 40px 34px 32px;
    box-shadow: var(--shadow-hover);
    animation: gateRise 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes gateRise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-logo {
    font-family: 'Fraunces', serif;
    font-weight: 500;
    font-size: 1.24rem;
    color: var(--olive);
    letter-spacing: -0.02em;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 26px;
}
.login-logo em { font-style: italic; color: var(--amber); }
.login-logo .logo-dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--amber); flex-shrink: 0;
}

.login-card .eyebrow { margin-bottom: 16px; }

.login-title {
    font-family: 'Fraunces', serif;
    font-weight: 500;
    font-size: 1.72rem;
    line-height: 1.18;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: 14px;
}
.login-title em { font-style: italic; color: var(--amber); }

.login-desc {
    font-size: 0.92rem;
    font-weight: 300;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 26px;
}
.login-desc strong { font-weight: 500; color: var(--olive); }

.login-google-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    width: 100%;
    background: var(--ink);
    color: var(--cream);
    border: none;
    border-radius: var(--pill);
    padding: 15px 24px;
    font-family: 'Ranade', sans-serif;
    font-size: 0.94rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(45, 58, 45, 0.16);
}
.login-google-btn:hover {
    background: var(--deep-olive);
    transform: translateY(-1px);
    box-shadow: var(--shadow-hover);
}
.login-google-btn:disabled {
    opacity: 0.7;
    cursor: default;
    transform: none;
}
.login-google-btn .g-icon {
    background: #fff;
    border-radius: 50%;
    width: 26px; height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.login-nota {
    font-size: 0.74rem;
    font-weight: 300;
    line-height: 1.55;
    color: var(--warm-gray);
    margin-top: 20px;
}

@media (max-width: 480px) {
    .login-card { padding: 32px 22px 26px; }
    .login-title { font-size: 1.44rem; }
}

.login-btn-content {
    display: inline-flex;
    align-items: center;
    gap: 11px;
}
.g-spinner {
    width: 18px; height: 18px;
    border: 2.5px solid rgba(250, 247, 242, 0.35);
    border-top-color: var(--cream);
    border-radius: 50%;
    animation: gSpin 0.7s linear infinite;
}
@keyframes gSpin { to { transform: rotate(360deg); } }
