
/* ── SETAS DE TENDÊNCIA ── */
.avg-wrap {
    display: flex; align-items: baseline;
    gap: 8px; justify-content: center;
}
.avg-arrow {
    font-size: 28px; font-weight: 300;
    line-height: 1; transition: all 0.4s;
    opacity: 0;
}
.avg-arrow.up     { color: #2d6a4f; opacity: 1; animation: fadeArrow 0.4s ease; }
.avg-arrow.down   { color: #9b2226; opacity: 1; animation: fadeArrow 0.4s ease; }
.avg-arrow.neutral{ color: #bbb;    opacity: 1; }

.meter-right {
    display: flex; align-items: center; gap: 3px;
}
.meter-arrow {
    font-size: 10px; font-weight: 500;
    line-height: 1; transition: all 0.3s;
    opacity: 0; min-width: 10px;
}
.meter-arrow.up     { color: #2d6a4f; opacity: 1; animation: fadeArrow 0.3s ease; }
.meter-arrow.down   { color: #9b2226; opacity: 1; animation: fadeArrow 0.3s ease; }
.meter-arrow.neutral{ color: #bbb;    opacity: 0.5; }

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


/* ── ABAS DE ROTINA ── */
.rotina-abas {
    display: flex; gap: 4px;
    margin-bottom: 14px;
    background: var(--soft);
    border-radius: 10px;
    padding: 3px;
}
.rotina-aba {
    flex: 1; padding: 6px 4px;
    border-radius: 8px; border: none;
    background: transparent; cursor: pointer;
    font-family: 'Jost', sans-serif;
    font-size: 11px; color: var(--muted);
    transition: all 0.15s; text-align: center;
    display: flex; flex-direction: column;
    align-items: center; gap: 2px;
}
.rotina-aba:hover { color: var(--black); }
.rotina-aba.active {
    background: var(--white);
    color: var(--black); font-weight: 500;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.aba-badge {
    font-size: 9px; color: var(--muted);
    font-weight: 400;
}
.rotina-aba.active .aba-badge { color: var(--green); font-weight: 500; }

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

:root {
    --black: #111;
    --white: #fff;
    --muted: #bbb;
    --soft: #f5f5f5;
    --soft2: #efefef;
    --green: #2d6a4f;
    --green-bg: #eaf4ee;
    --green-mid: #52b788;
    --red: #9b2226;
    --red-bg: #fdeaea;
    --orange: #f97316;
    --radius: 10px;
}

body {
    font-family: 'Jost', sans-serif;
    background: var(--white);
    color: var(--black);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── FONTS ── */
.serif { font-family: 'Cormorant Garamond', serif; }

/* ── DATE BAR ── */
.date-bar {
    padding: 18px 24px 0;
    text-align: center;
}
.date-display {
    font-size: 11px; color: var(--muted);
    letter-spacing: 0.8px; text-transform: uppercase;
}

/* ── AREA PILLS ── */
.area-selector {
    padding: 14px 24px 18px;
    display: flex; gap: 6px; flex-wrap: wrap;
    justify-content: center;
}
.area-pill {
    padding: 5px 14px; border-radius: 100px;
    font-size: 12px; font-family: 'Jost', sans-serif;
    cursor: pointer; background: var(--soft);
    color: var(--muted); border: none;
    transition: all 0.16s; font-weight: 400;
    white-space: nowrap;
}
.area-pill:hover { color: var(--black); background: #eaeaea; }
.area-pill.active { background: var(--black); color: var(--white); }

/* ── HERO ── */
.hero {
    display: grid;
    grid-template-columns: 1fr 300px 1fr;
    padding: 0 32px;
    gap: 0;
    align-items: start;
    min-height: 460px;
}

/* COLUNAS */
.col { padding-right: 28px; }
.col.right { padding-right: 0; padding-left: 28px; }

.col-label {
    font-size: 10px; letter-spacing: 2px;
    text-transform: uppercase; font-weight: 500;
    margin-bottom: 12px;
}
.col.left  .col-label { color: var(--green); }
.col.right .col-label { color: var(--red); }

.habit-btn {
    width: 100%; padding: 10px 12px;
    border-radius: var(--radius); background: var(--soft);
    border: none; cursor: pointer;
    display: flex; justify-content: space-between;
    align-items: center; margin-bottom: 6px;
    font-family: 'Jost', sans-serif;
    font-size: 13px; color: var(--black);
    transition: background 0.15s; text-align: left;
    gap: 8px;
}
.col.left  .habit-btn:hover { background: var(--green-bg); }
.col.right .habit-btn:hover { background: var(--red-bg); }
.habit-btn:active { transform: scale(0.98); }

.habit-left { display: flex; align-items: center; gap: 7px; flex: 1; min-width: 0; }
.habit-icon { flex-shrink: 0; font-size: 14px; line-height: 1; }
.habit-name { font-size: 12px; line-height: 1.3; }

.habit-pts {
    font-size: 11px; font-weight: 500;
    padding: 2px 7px; border-radius: 100px;
    flex-shrink: 0; white-space: nowrap;
}
.col.left  .habit-pts { color: var(--green); background: var(--green-bg); }
.col.right .habit-pts { color: var(--red);   background: var(--red-bg); }

/* CENTRO */
.col-center {
    display: flex; flex-direction: column;
    align-items: center; gap: 0;
    position: relative;
}

.avg-number {
    font-family: 'Cormorant Garamond', serif;
    font-size: 56px; font-weight: 300; line-height: 1;
    transition: color 0.4s; text-align: center;
}
.avg-label {
    font-size: 9px; letter-spacing: 2px;
    text-transform: uppercase; color: var(--muted);
    margin-top: 2px; text-align: center;
}

/* EMOJI */
.emoji-state-wrap {
    position: relative;
    width: 90px; height: 90px;
    margin: 10px 0 4px;
    display: flex; align-items: center; justify-content: center;
}
.emoji-state {
    font-size: 68px; line-height: 1;
    user-select: none; display: block; text-align: center;
}
.emoji-reaction {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 68px; line-height: 1;
    user-select: none; pointer-events: none;
    opacity: 0; z-index: 10;
}
.emoji-reaction.show { animation: reactionPop 2s ease forwards; }
@keyframes reactionPop {
    0%   { opacity:0; transform:translate(-50%,-50%) scale(0.2); }
    15%  { opacity:1; transform:translate(-50%,-80%) scale(1.2); }
    30%  { opacity:1; transform:translate(-50%,-90%) scale(1.0); }
    70%  { opacity:1; transform:translate(-50%,-90%) scale(1.0); }
    100% { opacity:0; transform:translate(-50%,-120%) scale(0.8); }
}

.char-status {
    font-size: 10px; letter-spacing: 2px;
    text-transform: uppercase; color: var(--muted);
    margin-bottom: 16px; text-align: center;
}

/* MEDIDORES */
.meters-grid {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 16px;
}
.meter-item { display: flex; flex-direction: column; gap: 4px; }
.meter-header { display: flex; justify-content: space-between; align-items: baseline; }
.meter-name { font-size: 9px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.meter-val { font-size: 10px; font-weight: 500; color: var(--black); transition: color 0.4s; }
.meter-track { height: 4px; background: #ebebeb; border-radius: 100px; overflow: hidden; }
.meter-fill { height: 100%; border-radius: 100px; background: var(--black); transition: width 0.5s ease, background 0.4s; }

/* ── BOTTOM 3 COLUNAS ── */
.bottom {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    padding: 32px 32px 48px;
    gap: 32px;
    border-top: 1px solid #f0f0f0;
    margin-top: 24px;
}

.panel-header {
    display: flex; justify-content: space-between;
    align-items: baseline; margin-bottom: 14px;
}
.panel-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 20px; font-weight: 400;
}
.btn-add {
    padding: 5px 12px; border-radius: 100px;
    background: var(--soft); border: none;
    font-family: 'Jost', sans-serif; font-size: 11px;
    cursor: pointer; color: var(--black); transition: all 0.15s;
    white-space: nowrap;
}
.btn-add:hover { background: var(--black); color: var(--white); }

/* ROTINA */
.rotina-item {
    display: flex; align-items: center;
    gap: 10px; padding: 9px 0;
    cursor: pointer; border-bottom: 1px solid #f8f8f8;
    transition: opacity 0.2s;
}
.rotina-item:last-child { border-bottom: none; }
.rotina-item.cumprida { opacity: 0.5; }

.rotina-check {
    width: 18px; height: 18px; border-radius: 5px;
    border: 1.5px solid #ddd; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s;
}
.rotina-check.done { background: var(--black); border-color: var(--black); }

.rotina-info { flex: 1; min-width: 0; }
.rotina-nome { font-size: 13px; line-height: 1.3; }
.rotina-nome.done { text-decoration: line-through; color: var(--muted); }

.rotina-meta {
    display: flex; align-items: center; gap: 4px;
    margin-top: 2px;
}
.streak-dots { display: flex; gap: 2px; }
.streak-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: #ddd;
}
.streak-dot.verde  { background: var(--green-mid); }
.streak-dot.vermelho { background: var(--red); }

.streak-count { font-size: 10px; color: var(--muted); }
.badge-estrela { font-size: 11px; }
.badge-caveira { font-size: 11px; }

.rotina-pts {
    font-size: 10px; font-weight: 500;
    padding: 1px 6px; border-radius: 100px;
    flex-shrink: 0;
}
.rotina-pts.pos { color: var(--green); background: var(--green-bg); }
.rotina-pts.neg { color: var(--red);   background: var(--red-bg); }

/* TAREFAS */
.tarefa-item {
    display: flex; align-items: center;
    gap: 10px; padding: 9px 0;
    border-bottom: 1px solid #f8f8f8;
}
.tarefa-item:last-child { border-bottom: none; }

.tarefa-check {
    width: 18px; height: 18px; border-radius: 5px;
    border: 1.5px solid #ddd; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s; cursor: pointer;
}
.tarefa-check:hover { border-color: var(--black); }

.tarefa-info { flex: 1; min-width: 0; }
.tarefa-nome { font-size: 13px; line-height: 1.3; }
.tarefa-dias { font-size: 10px; color: var(--muted); margin-top: 1px; }

.tarefa-pts {
    font-size: 10px; font-weight: 500;
    padding: 1px 6px; border-radius: 100px;
    color: var(--green); background: var(--green-bg);
    flex-shrink: 0;
}

.item-del {
    font-size: 16px; color: #ddd; background: none;
    border: none; cursor: pointer; transition: color 0.15s; padding: 0 2px;
    flex-shrink: 0; line-height: 1;
}
.item-del:hover { color: var(--red); }

/* EVENTOS */
.evento-item {
    display: flex; gap: 12px; align-items: flex-start; padding: 9px 0;
    border-bottom: 1px solid #f8f8f8;
}
.evento-item:last-child { border-bottom: none; }

.evento-data {
    display: flex; flex-direction: column; align-items: center;
    min-width: 36px; flex-shrink: 0;
}
.evento-dia { font-family: 'Cormorant Garamond', serif; font-size: 22px; font-weight: 300; line-height: 1; }
.evento-mes { font-size: 9px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.evento-hora { font-size: 10px; color: var(--muted); margin-top: 1px; }

.evento-nome { font-size: 13px; flex: 1; line-height: 1.4; padding-top: 3px; }

.empty {
    font-size: 13px; color: var(--muted);
    font-style: italic; padding: 10px 0;
}

/* PESO WIDGET */
.peso-widget {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px; background: var(--soft);
    border-radius: var(--radius); margin-bottom: 14px;
    cursor: pointer;
}
.peso-valor { font-family: 'Cormorant Garamond', serif; font-size: 22px; font-weight: 300; }
.peso-label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.peso-status { font-size: 18px; margin-left: auto; }

/* ── MODAL ── */
.modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.22); z-index: 100;
    align-items: center; justify-content: center;
    backdrop-filter: blur(3px); padding: 16px;
}
.modal-overlay.active { display: flex; }
.modal {
    background: white; border-radius: 16px;
    padding: 28px; width: 100%; max-width: 360px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.12);
    animation: mi 0.2s ease;
}
@keyframes mi {
    from { opacity:0; transform:translateY(10px) scale(0.97); }
    to   { opacity:1; transform:translateY(0) scale(1); }
}
.modal-title {
    font-family:'Cormorant Garamond',serif;
    font-size:22px; font-weight:400; margin-bottom:16px;
}
.modal input, .modal select {
    width:100%; padding:10px 12px;
    border:1.5px solid #eee; border-radius:var(--radius);
    font-family:'Jost',sans-serif; font-size:14px;
    margin-bottom:10px; outline:none; transition:border-color 0.15s;
    background: white;
}
.modal input:focus, .modal select:focus { border-color:var(--black); }
.modal-actions { display:flex; gap:8px; margin-top:6px; }
.btn-primary {
    flex:1; padding:11px; background:var(--black); color:white;
    border:none; border-radius:var(--radius);
    font-family:'Jost',sans-serif; font-size:14px; cursor:pointer;
    transition: opacity 0.15s;
}
.btn-primary:hover { opacity: 0.85; }
.btn-secondary {
    flex:1; padding:11px; background:var(--soft); color:var(--black);
    border:none; border-radius:var(--radius);
    font-family:'Jost',sans-serif; font-size:14px; cursor:pointer;
}

/* PONTOS SELECTOR */
.pontos-selector { display: flex; gap: 8px; margin-bottom: 10px; }
.pontos-opt {
    flex: 1; padding: 10px; border-radius: var(--radius);
    background: var(--soft); border: 2px solid transparent;
    font-family: 'Jost', sans-serif; font-size: 13px;
    cursor: pointer; text-align: center; transition: all 0.15s;
}
.pontos-opt.selected { border-color: var(--black); background: var(--black); color: white; }

/* ── TOAST ── */
.toast {
    position: fixed; bottom: 28px; left: 50%;
    transform: translateX(-50%) translateY(6px);
    padding: 9px 20px; border-radius: 100px;
    font-size: 13px; font-family: 'Jost', sans-serif;
    color: white; opacity: 0; pointer-events: none;
    z-index: 200; transition: opacity 0.2s, transform 0.2s;
    white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── FLASH ── */
@keyframes fg { 0%,100%{background:white} 45%{background:#eaf4ee} }
@keyframes fr { 0%,100%{background:white} 45%{background:#fdeaea} }
.flash-g { animation: fg 0.5s ease; }
.flash-r { animation: fr 0.5s ease; }

/* ── COL LABEL WRAP ── */
.col-label-wrap {
    display: flex; align-items: center;
    justify-content: space-between; margin-bottom: 12px;
}
.col-label-wrap .col-label { margin-bottom: 0; }

.btn-col-add {
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--soft); border: none; cursor: pointer;
    font-size: 16px; line-height: 1; color: var(--muted);
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s; flex-shrink: 0;
}
.btn-col-add:hover { background: var(--black); color: var(--white); }

/* HABIT ROW COM DELETE */
.habit-row {
    display: flex; align-items: center; gap: 4px; margin-bottom: 6px;
}
.habit-row .habit-btn { margin-bottom: 0; flex: 1; }
.habit-del {
    width: 22px; height: 22px; flex-shrink: 0;
    background: none; border: none; cursor: pointer;
    color: #ddd; font-size: 16px; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    transition: color 0.15s; border-radius: 4px;
}
.habit-del:hover { color: var(--red); }

/* PESO CENTER */
.peso-center-widget {
    width: 100%; margin-top: 16px;
    background: var(--soft); border-radius: var(--radius);
    padding: 10px 14px; cursor: pointer; transition: background 0.15s;
}
.peso-center-widget:hover { background: #ebebeb; }
.peso-cw-top {
    display: flex; align-items: center; gap: 8px; margin-bottom: 3px;
}
.peso-cw-emoji { font-size: 18px; }
.peso-cw-valor {
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px; font-weight: 300;
}
.peso-cw-add {
    font-size: 10px; color: var(--muted);
    letter-spacing: 0.5px; margin-left: auto;
    text-transform: uppercase;
}
.peso-cw-sub { font-size: 12px; margin-bottom: 2px; }
.peso-cw-meta { font-size: 10px; color: var(--muted); }


/* IMPACT LABELS NO MODAL */
.impact-label {
    font-size: 10px; letter-spacing: 1px; text-transform: uppercase;
    color: var(--muted); margin-bottom: 4px; margin-top: 6px;
    display: flex; align-items: center; gap: 6px;
}
.impact-opt {
    font-size: 9px; color: #ccc; text-transform: lowercase; letter-spacing: 0;
}

/* ── LOADING ── */
.loading {
    display: flex; align-items: center; justify-content: center;
    height: 100vh; font-size: 14px; color: var(--muted);
    font-family: 'Cormorant Garamond', serif; font-style: italic;
    font-size: 20px;
}

/* ── RESPONSIVO MOBILE ── */
@media (max-width: 768px) {
    .hero {
        grid-template-columns: 1fr;
        padding: 0 16px;
        gap: 24px;
    }

    .col { padding-right: 0; }
    .col.right { padding-left: 0; }

    /* Reordena: centro primeiro no mobile */
    .col-center { order: -1; }

    .avg-number { font-size: 48px; }
    .emoji-state { font-size: 56px; }

    .meters-grid { grid-template-columns: 1fr 1fr; gap: 8px 12px; }

    .bottom {
        grid-template-columns: 1fr;
        padding: 24px 16px 40px;
        gap: 28px;
    }

    .area-selector { padding: 12px 16px 16px; gap: 5px; }
    .area-pill { font-size: 11px; padding: 4px 11px; }

    .date-bar { padding: 16px 16px 0; }
}

@media (max-width: 480px) {
    .habit-name { font-size: 11px; }
    .habit-btn { padding: 8px 10px; }
    .panel-title { font-size: 18px; }
}
