:root {
    --bg-fundo: #F4F5F7;
    --bg-card: #FFFFFF;
    --primary: #172B4D;
    --accent: #E53935;
    --cor-hoje: #FF8B00;
    --cor-inbox: #6554C0;
    --cor-proximos: #0065FF;
    --cor-concluido: #36B37E;
    --border: #DFE1E6;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
body { background-color: var(--bg-fundo); font-family: 'Inter', sans-serif; color: var(--primary); height: 100vh; display: flex; flex-direction: column; overflow: hidden; }

/* HEADER */
.app-header { background: #FFFFFF; padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.header-top { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 18px; font-weight: 800; color: var(--primary); }
.btn-conta { background: #f4f5f7; border: 1px solid var(--border); padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 600; cursor: pointer; }
.btn-conta.logado { background: #e3fcef; color: #006644; border-color: #57d9a3; }

.header-search input { width: 100%; padding: 10px 14px; background: #EBECF0; border: none; border-radius: 8px; font-size: 14px; }

/* KANBAN HORIZONTAL */
.quadro-container {
    display: flex;
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 16px;
    gap: 16px;
    scroll-snap-type: x mandatory;
}
.coluna {
    background: #EBECF0;
    border-radius: 10px;
    width: 82vw;
    max-width: 320px;
    min-width: 82vw;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    max-height: 100%;
    scroll-snap-align: start;
    border-top: 4px solid #ccc;
    box-shadow: 0 4px 6px rgba(0,0,0,0.03);
}

@media(min-width: 768px) {
    .coluna { width: 290px; min-width: 290px; scroll-snap-align: none; }
}

.col-hoje { border-top-color: var(--cor-hoje); }
.col-inbox { border-top-color: var(--cor-inbox); }
.col-proximos { border-top-color: var(--cor-proximos); }
.col-concluido { border-top-color: var(--cor-concluido); }

.coluna-header { padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; }
.coluna-tag { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.col-hoje .coluna-tag { background: var(--cor-hoje); }
.col-inbox .coluna-tag { background: var(--cor-inbox); }
.col-proximos .coluna-tag { background: var(--cor-proximos); }
.col-concluido .coluna-tag { background: var(--cor-concluido); }

.coluna-header h3 { font-size: 14px; text-transform: uppercase; font-weight: 700; display: flex; align-items: center; }
.contador-badge { background: #DFE1E6; border-radius: 10px; padding: 2px 8px; font-size: 12px; font-weight: bold; }

.lista-cartoes { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 12px; }

/* FORMATO POST-IT */
.cartao {
    background: #FFFDF0; /* Amarelinho clássico de post-it */
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 2px 5px rgba(9,30,66,0.08);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 110px;
    border-top: 3px solid #FFE380;
    cursor: grab;
    transition: transform 0.1s;
}
.cartao.tipo-compra { background: #E3FCEF; border-top-color: #57D9A3; }
.cartao.tipo-compromisso { background: #DEEBFF; border-top-color: #4C9AFF; }

.cartao-topo { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.badge-tipo { font-size: 10px; font-weight: 700; text-transform: uppercase; padding: 2px 6px; border-radius: 3px; background: rgba(0,0,0,0.05); }
.cartao-titulo { font-size: 14px; font-weight: 600; line-height: 1.3; word-break: break-word; }
.cartao-corpo { font-size: 12px; color: #5E6C84; margin: 6px 0; max-height: 36px; overflow: hidden; }

.cartao-rodape { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 11px; }
.btn-icon { background: white; border: 1px solid #ccc; border-radius: 50%; width: 28px; height: 28px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }

/* BOTAO FLUTUANTE (FAB) */
#btn-fab-add {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    font-size: 32px;
    border: none;
    box-shadow: 0 6px 16px rgba(229, 57, 53, 0.4);
    cursor: pointer;
    z-index: 100;
}

/* MODAIS */
.modal-oculto { display: none !important; }
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; z-index: 999; }
.modal-conteudo { background: white; padding: 20px; border-radius: 12px; width: 92%; max-width: 440px; max-height: 90vh; overflow-y: auto; }
.modal-largo { max-width: 550px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; border-bottom: 1px solid #eee; padding-bottom: 8px; }
.btn-fechar { background: none; border: none; font-size: 26px; cursor: pointer; color: #8993a4; }

.carrinho-total { font-size: 13px; font-weight: bold; color: #00875A; }
.input-inline { display: flex; gap: 8px; margin-bottom: 14px; }
.input-inline input { flex: 1; padding: 10px; border: 1px solid #ccc; border-radius: 6px; }

/* FORM */
.form-padrao { display: flex; flex-direction: column; gap: 10px; }
.form-padrao input, .form-padrao select, .form-padrao textarea { padding: 10px; border: 1px solid #ccc; border-radius: 6px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dica-data { font-size: 11px; color: #6b778c; }
.modal-footer { display: flex; gap: 8px; justify-content: flex-end; margin-top: 15px; }

/* COMPRAS */
.categoria-bloco { margin-bottom: 12px; background: #fafbfc; padding: 8px; border-radius: 6px; border: 1px solid #eee; }
.categoria-titulo { font-size: 12px; font-weight: bold; margin-bottom: 6px; color: #42526e; }
.item-linha { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed #eee; }
.item-linha.comprado .item-nome { text-decoration: line-through; color: #8993a4; }
.item-controles { display: flex; align-items: center; gap: 6px; }
.item-controles button { padding: 2px 7px; border: 1px solid #ccc; background: white; border-radius: 4px; }
.input-preco { width: 55px; padding: 4px; border: 1px solid #ccc; border-radius: 4px; text-align: right; }
.btn-zap { background: #25D366; color: white; border: none; padding: 10px; border-radius: 6px; cursor: pointer; font-weight: bold; }
.btn-concluir { background: #0065FF; color: white; border: none; padding: 10px; border-radius: 6px; cursor: pointer; font-weight: bold; }
.btn-link { background: none; border: none; color: #0052cc; cursor: pointer; font-size: 12px; }
.btn-perigo-link { background: none; border: none; color: #de350b; cursor: pointer; font-size: 12px; }