/* Merek CuanLog */
.logo { background: none; border-radius: 0; }
.logo img { display: block; width: 100%; height: 100%; }
.brand .bn { font-weight: 700; letter-spacing: -.02em; font-size: 17px; }
.brand .bn b { color: var(--accent-2); font-weight: 700; }

/* Tampilan HP: target sentuh minimal 40px, judul halaman boleh 2 baris, kolom tanggal penuh. */
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .main, .view, .view > *, .picker { min-width: 0; max-width: 100%; }
  .chip, .seg button, .btn, .icon-btn { min-height: 40px; }
  .btn.small, .demo-bar .btn, input.act { min-height: 40px; }
  .icon-btn { min-width: 40px; }
  .topbar h1 { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.25; }
}
@media (max-width: 560px) {
  .fgrid .field:has(input[type="datetime-local"]) { grid-column: 1 / -1; }
}

/* Dashboard HP: rincian dilipat. */
details.more { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
details.more > summary { cursor: pointer; padding: 12px 14px; min-height: 44px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: "\25BE"; color: var(--muted); }
details.more[open] > summary::after { content: "\25B4"; }
details.more > .grid { padding: 0 12px 12px; }

/* Halaman analis/chart di HP: baris chip satu baris yang bisa digeser, supaya chart naik ke atas. */
@media (max-width: 560px) {
  .picker .row, .picker .chips, .ch-layers { min-width: 0; max-width: 100%; }
  .picker .chips, .ch-layers { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -2px; padding-bottom: 2px; }
  .picker .chips::-webkit-scrollbar, .ch-layers::-webkit-scrollbar { display: none; }
  .picker .chips .chip, .ch-layers .chip { flex: 0 0 auto; white-space: nowrap; }
  .picker .row.between { flex-direction: column; align-items: stretch; gap: 10px; }
  #symForm { width: 100%; }
  #symIn { flex: 1; width: auto !important; min-width: 0; }
}

/* ---------- Ruang tenang: kartu pesan, peringatan, animasi ---------- */
.calm { position: relative; overflow: hidden; border-radius: 18px; padding: 18px; border: 1px solid var(--line); background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 12%, var(--surface)), color-mix(in srgb, var(--accent-2) 10%, var(--surface)), color-mix(in srgb, var(--accent) 12%, var(--surface))); background-size: 220% 100%; animation: calmShift 14s ease-in-out infinite; display: grid; gap: 12px; }
.calm.calm-p { background-image: linear-gradient(120deg, color-mix(in srgb, var(--pos) 16%, var(--surface)), color-mix(in srgb, var(--accent-2) 8%, var(--surface)), color-mix(in srgb, var(--pos) 16%, var(--surface))); }
.calm.calm-l { background-image: linear-gradient(120deg, color-mix(in srgb, var(--warn) 14%, var(--surface)), color-mix(in srgb, var(--accent) 8%, var(--surface)), color-mix(in srgb, var(--warn) 14%, var(--surface))); }
.calm-main { display: flex; gap: 14px; align-items: flex-start; }
.calm-ic { font-size: 30px; line-height: 1; animation: calmFloat 4.5s ease-in-out infinite; flex: none; }
.calm h2 { font-size: 18px; margin: 2px 0 6px; }
.calm p { margin: 0 0 10px; color: var(--ink-2); max-width: 70ch; }
.calm .eyebrow { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.calm-line { font-style: italic; color: var(--muted) !important; margin: 0 !important; padding-top: 10px; border-top: 1px dashed var(--line); transition: opacity .45s, transform .45s; }
.calm-line.out { opacity: 0; transform: translateY(4px); }
@keyframes calmShift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes calmFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

.risk-bar { position: sticky; top: 58px; z-index: 4; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; padding: 10px 16px; font-size: 13.5px; border-bottom: 1px solid var(--line); }
.risk-bar b { font-weight: 700; } .risk-bar span { flex: 1 1 240px; color: var(--ink-2); }
.risk-bar.warn { background: var(--warn-soft); color: var(--warn); }
.risk-bar.stop { background: var(--neg-soft); color: var(--neg); animation: riskPulse 2s ease-in-out infinite; }
.risk-bar.stop.done { background: var(--pos-soft); color: var(--pos); animation: none; }
@keyframes riskPulse { 0%, 100% { box-shadow: inset 0 0 0 0 transparent; } 50% { box-shadow: inset 0 -3px 0 0 var(--neg); } }
.risk-note { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: var(--neg-soft); color: var(--neg); font-size: 13.5px; }

@keyframes clRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes clGrow { from { transform: scaleX(0); } }
@keyframes clRing { from { stroke-dashoffset: 114; } }
.view.anim > * { animation: clRise .5s cubic-bezier(.2, .7, .2, 1) both; }
.view.anim > *:nth-child(2) { animation-delay: .06s; } .view.anim > *:nth-child(3) { animation-delay: .12s; } .view.anim > *:nth-child(4) { animation-delay: .18s; }
.view.anim > *:nth-child(5) { animation-delay: .24s; } .view.anim > *:nth-child(n+6) { animation-delay: .3s; }
.view.anim .progress i { transform-origin: left; animation: clGrow .9s .2s cubic-bezier(.2, .7, .2, 1) both; }
.view.anim .ring .fg { animation: clRing 1s .2s ease-out both; }
.card { transition: transform .18s, border-color .18s; }
@media (hover: hover) { .card:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); } }
.acc-chip i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
@media (prefers-reduced-motion: reduce) { .calm, .calm-ic, .risk-bar.stop, .view.anim > *, .view.anim .progress i, .view.anim .ring .fg { animation: none !important; } .calm-line { transition: none; } }
