/* Painel "Minhas coisas": lateral no PC, tela cheia no celular. */
#coisas {
  --acc: #ff4f9a;
  --acc-soft: rgba(255, 79, 154, 0.14);
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  width: 400px;
  max-width: 100vw;
  display: flex;
  flex-direction: column;
  background: rgba(12, 12, 17, 0.97);
  border-left: 1px solid rgba(255, 79, 154, 0.28);
  box-shadow: -24px 0 60px rgba(0, 0, 0, 0.6);
  color: var(--ink, #fff);
  font-size: 14px;
  line-height: 1.4;
  user-select: text;
  -webkit-user-select: text;
  padding-top: var(--safe-t, 0px);
  padding-bottom: var(--safe-b, 0px);
  transform: translateX(104%);
  visibility: hidden;
  transition: transform 0.28s ease, visibility 0s linear 0.28s;
}
#coisas.open { transform: none; visibility: visible; transition: transform 0.28s ease; }
#coisas * { box-sizing: border-box; }
#coisas button, #coisas input, #coisas textarea { font: inherit; color: inherit; }
#coisas button:focus-visible, #coisas input:focus-visible, #coisas textarea:focus-visible,
#coisas [role="tab"]:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }

.co-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 8px; }
.co-head h2 { margin: 0; font-size: 18px; font-weight: normal; letter-spacing: 0.02em; }
.co-head h2::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 9px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 10px var(--acc); }
.co-x { border: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--glass, rgba(255,255,255,.06)); cursor: pointer; font-size: 16px; }
.co-x:hover { background: rgba(255, 255, 255, 0.12); }

.co-tabs { display: flex; gap: 4px; padding: 4px 12px 0; flex-wrap: wrap; row-gap: 0; border-bottom: 1px solid var(--line, rgba(255,255,255,.1)); scrollbar-width: none; }
.co-tabs::-webkit-scrollbar { display: none; }
.co-tab {
  flex: none; display: flex; align-items: center; gap: 6px; padding: 8px 9px; border: 0; background: transparent; cursor: pointer;
  color: var(--muted, rgba(255,255,255,.56)); border-bottom: 2px solid transparent; font-size: 13.5px; white-space: nowrap;
}
.co-tab:hover { color: #fff; }
.co-tab[aria-selected="true"] { color: #fff; border-bottom-color: var(--acc); }
.co-badge { min-width: 18px; padding: 1px 6px; border-radius: 999px; background: var(--acc-soft); color: var(--acc); font-size: 11.5px; text-align: center; }

.co-body { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 14px 28px; display: grid; gap: 12px; align-content: start; overscroll-behavior: contain; }
.co-msg { padding: 9px 12px; border-radius: 12px; font-size: 13px; background: rgba(255, 99, 57, 0.12); border: 1px solid rgba(255, 99, 57, 0.35); }
.co-msg.ok { background: rgba(70, 249, 174, 0.1); border-color: rgba(70, 249, 174, 0.3); }
.co-dica { margin: 0; padding: 10px 12px; border-radius: 12px; font-size: 12.5px; color: var(--muted, rgba(255,255,255,.56)); background: var(--glass, rgba(255,255,255,.06)); border: 1px dashed rgba(255, 79, 154, 0.3); }
.co-vazio { padding: 28px 12px; text-align: center; color: var(--muted, rgba(255,255,255,.56)); }
.co-vazio b { display: block; margin-bottom: 4px; font-weight: normal; color: #fff; font-size: 15px; }

.co-card { padding: 12px; border-radius: 16px; background: var(--glass, rgba(255,255,255,.06)); border: 1px solid var(--line, rgba(255,255,255,.1)); display: grid; gap: 8px; min-width: 0; }
.co-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.co-card-head h3 { margin: 0; font-size: 15px; font-weight: normal; overflow-wrap: anywhere; }
.co-count { font-size: 12px; color: var(--acc); white-space: nowrap; }
.co-sub { font-size: 12px; color: var(--muted, rgba(255,255,255,.56)); }
.co-texto { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.co-texto.curto { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

.co-itens { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.co-item { display: flex; align-items: center; gap: 8px; padding: 4px 2px; }
.co-item label { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; cursor: pointer; overflow-wrap: anywhere; }
.co-item input[type="checkbox"] { accent-color: var(--acc); width: 18px; height: 18px; flex: none; }
.co-item.feito label span { text-decoration: line-through; color: var(--muted, rgba(255,255,255,.56)); }

.co-btn {
  border: 1px solid var(--line, rgba(255,255,255,.1)); background: var(--glass, rgba(255,255,255,.06)); border-radius: 999px;
  padding: 6px 12px; font-size: 12.5px; cursor: pointer; transition: background 0.15s ease;
}
.co-btn:hover { background: rgba(255, 255, 255, 0.12); }
.co-btn.acc { background: var(--acc); border-color: transparent; color: #12060b; }
.co-btn.acc:hover { background: #ff6aab; }
.co-btn.perigo:hover { background: rgba(255, 99, 57, 0.25); }
.co-btn[disabled] { opacity: 0.5; cursor: wait; }
.co-mini { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 0; background: transparent; cursor: pointer; color: var(--muted, rgba(255,255,255,.56)); }
.co-mini:hover { background: rgba(255, 99, 57, 0.2); color: #fff; }
.co-acoes { display: flex; flex-wrap: wrap; gap: 6px; }

.co-add { display: flex; gap: 6px; }
.co-add input, .co-nova textarea, .co-nova input {
  flex: 1; min-width: 0; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line, rgba(255,255,255,.1)); background: rgba(255, 255, 255, 0.05); outline: 0;
}
.co-add input:focus, .co-nova textarea:focus, .co-nova input:focus { border-color: var(--acc); }
.co-nova { display: grid; gap: 8px; }
.co-nova textarea { min-height: 70px; resize: vertical; width: 100%; }

.co-ico { font-size: 18px; flex: none; width: 26px; text-align: center; }
.co-row { display: flex; gap: 10px; align-items: flex-start; }
.co-row > div { flex: 1; min-width: 0; }
.co-quando { font-size: 12px; color: var(--muted, rgba(255,255,255,.56)); }
.co-cont { color: var(--acc); font-variant-numeric: tabular-nums; }

.co-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.co-chip { padding: 3px 10px; border-radius: 999px; font-size: 12px; background: var(--acc-soft); border: 1px solid rgba(255, 79, 154, 0.35); }
.co-selo { padding: 2px 9px; border-radius: 999px; font-size: 11.5px; white-space: nowrap; background: rgba(70, 249, 174, 0.14); color: #46f9ae; }
.co-selo.pend { background: rgba(255, 99, 57, 0.16); color: #ff9a7a; }
.co-email { all: unset; display: grid; gap: 4px; width: 100%; cursor: pointer; }
.co-email:focus-visible { outline: 2px solid var(--acc); outline-offset: 6px; border-radius: 10px; }
.co-frame { width: 100%; height: 55vh; border: 1px solid var(--line, rgba(255,255,255,.1)); border-radius: 12px; background: #fff; }

@media (max-width: 640px) {
  #coisas { width: 100vw; border-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  #coisas, #coisas.open { transition: none; }
}

.co-x, .co-mini { display: inline-grid; place-items: center; color: inherit; }
.co-x .ic, .co-mini .ic, button[aria-label="Fechar"] .ic { margin: 0; width: 16px; height: 16px; }
