/* components.css: Newer parts: button styles and ripple, quick actions, category grid, feature cards, FAQ, call-to-action band, save hearts, admin quick filters. */

/* =====================================================================
   v3: nicer buttons + new page elements (existing styles untouched)
   ===================================================================== */

/* ---------- Buttons ---------- */
.btn { position: relative; overflow: hidden; isolation: isolate; gap: .55rem; letter-spacing: .005em; }
.btn svg { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn .arrow { transition: transform .22s; }
.btn:hover:not(:disabled) .arrow { transform: translateX(4px); }
.btn-lg { min-height: 54px; padding: .85rem 1.7rem; font-size: 1.04rem; }
.btn-sm { min-height: 40px; padding: .45rem 1rem; font-size: .9rem; }
.btn-primary, .btn-dark { box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 8px 20px rgb(var(--accent-rgb) / .34); }
.btn-dark { background: linear-gradient(135deg, #1d2d52, #0e1830); box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 8px 20px rgba(14,24,48,.3); }
.btn-primary::after, .btn-dark::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, transparent 32%, rgba(255,255,255,.34) 50%, transparent 68%); transform: translateX(-130%); transition: transform .65s ease; }
.btn-primary:hover:not(:disabled)::after, .btn-dark:hover:not(:disabled)::after { transform: translateX(130%); }
.btn-primary:active:not(:disabled) { box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 3px 10px rgb(var(--accent-rgb) / .3); }
.btn-outline { background: color-mix(in srgb, var(--white) 55%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.btn-soft { background: rgb(var(--accent-rgb) / .12); color: var(--link); border: 1.5px solid transparent; }
.btn-soft:hover:not(:disabled) { background: rgb(var(--accent-rgb) / .2); }
.btn-light { background: #fff; color: var(--accent-deep); box-shadow: 0 8px 22px rgba(0,0,0,.18); }
.btn-light:hover:not(:disabled) { background: #fff; box-shadow: 0 12px 28px rgba(0,0,0,.24); }
.btn-ghost-light { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.7); }
.btn-ghost-light:hover:not(:disabled) { background: rgba(255,255,255,.16); border-color: #fff; }
.ripple { position: absolute; border-radius: 50%; background: currentColor; opacity: .28; transform: scale(0); animation: ripple .65s ease-out forwards; pointer-events: none; z-index: 0; }
@keyframes ripple { to { transform: scale(4); opacity: 0; } }
.chip { display: inline-flex; align-items: center; gap: .4rem; }
.chip svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chip:active { transform: scale(.96); }

/* ---------- Scroll progress + page fade ---------- */
.progress-bar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 120; pointer-events: none; }
.progress-bar i { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, var(--accent), var(--accent-hi)); }
main, .admin-main, .page { animation: page-in .5s ease both; }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Quick actions ---------- */
.qa-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.qa { position: relative; display: flex; flex-direction: column; gap: .35rem; padding: 1.25rem; background: var(--white); border: 1.5px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow); text-decoration: none; color: var(--ink); transition: transform .2s, box-shadow .2s, border-color .2s; }
.qa:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.qa-ico { width: 48px; height: 48px; border-radius: var(--r-sm); display: grid; place-items: center; margin-bottom: .5rem; background: rgb(var(--accent-rgb) / .12); color: var(--accent); transition: background .2s, color .2s; }
.qa:hover .qa-ico { background: var(--accent); color: #fff; }
.qa-ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.qa strong { font: 700 1.15rem var(--font-display); letter-spacing: -.01em; }
.qa .muted { font-size: .92rem; }
.qa .go { margin-top: .5rem; display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; font-size: .92rem; color: var(--link); }
.qa .go svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.qa:hover .go svg { transform: translateX(5px); }
.cat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: .8rem; margin-top: 1.2rem; }
.cat { display: flex; flex-direction: column; align-items: center; gap: .55rem; padding: 1.1rem .6rem; text-align: center; background: var(--white); border: 1.5px solid var(--line); border-radius: var(--r-md); text-decoration: none; color: var(--ink); font-weight: 600; font-size: .95rem; transition: transform .2s, border-color .2s, box-shadow .2s; }
.cat:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow-lg); }
.cat i { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: rgb(var(--accent-rgb) / .12); color: var(--accent); transition: background .2s, color .2s; }
.cat:hover i { background: var(--accent); color: #fff; }
.cat svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Bento features ---------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; margin-top: 1.4rem; }
.bento-item { grid-column: span 2; padding: 1.5rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.bento-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.bento-item.wide { grid-column: span 3; }
.bento-item.accent { background: linear-gradient(135deg, var(--accent-dark), var(--accent-hi)); color: #fff; border-color: transparent; }
.bento-item.accent p { color: rgba(255,255,255,.88); }
.bento-item svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; margin-bottom: .8rem; color: var(--accent); }
.bento-item.accent svg { color: #fff; }
.bento-item h3 { font: 700 1.2rem var(--font-display); letter-spacing: -.015em; margin-bottom: .35rem; }
.bento-item p { margin: 0; font-size: .95rem; color: var(--ink-soft); }

/* ---------- FAQ accordion ---------- */
.faq { max-width: 820px; margin-top: 1.2rem; display: grid; gap: .7rem; }
.faq-item { background: var(--white); border: 1.5px solid var(--line); border-radius: var(--r-md); transition: border-color .2s, box-shadow .2s; }
.faq-item[open] { border-color: var(--accent); box-shadow: var(--shadow); }
.faq-item summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; min-height: 56px; font: 600 1.02rem var(--font-body); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--link); }
.faq-item summary svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s; color: var(--accent); }
.faq-item[open] summary svg { transform: rotate(180deg); }
.faq-item p { margin: 0; padding: 0 1.25rem 1.2rem; color: var(--ink-soft); }

/* ---------- Call-to-action band ---------- */
.cta-band { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; padding: clamp(1.8rem, 4vw, 3.2rem); border-radius: var(--r-lg); color: #fff; background: linear-gradient(135deg, var(--accent-dark), var(--accent-hi)); box-shadow: 0 24px 60px rgb(var(--accent-rgb) / .35); }
.cta-band::before, .cta-band::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.1); pointer-events: none; }
.cta-band::before { width: 340px; height: 340px; right: -80px; top: -140px; }
.cta-band::after { width: 220px; height: 220px; left: 30%; bottom: -130px; }
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { color: #fff; margin: 0 0 .4rem; max-width: 18ch; }
.cta-band p { margin: 0; color: rgba(255,255,255,.88); max-width: 42ch; }

/* ---------- Principles (About), tips and quick-start (Complaint), share row (Track) ---------- */
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1rem 0 2rem; }
.principle { padding: 1.3rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow); }
.principle svg { width: 28px; height: 28px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; margin-bottom: .6rem; }
.principle h3 { font: 700 1.1rem var(--font-display); margin-bottom: .3rem; }
.principle p { margin: 0; font-size: .93rem; color: var(--ink-soft); }
.tips { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; margin: 1.2rem 0 0; }
.tip { display: flex; gap: .7rem; align-items: flex-start; padding: .9rem 1rem; background: color-mix(in srgb, var(--white) 72%, transparent); border: 1px solid var(--line); border-radius: var(--r-md); font-size: .9rem; }
.tip svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-top: .1rem; }
.tip b { display: block; font-size: .95rem; }
.quick { margin-top: 1.4rem; }
.quick p { margin: 0 0 .5rem; font-weight: 600; font-size: .9rem; color: var(--ink-soft); }
.quick .chips { gap: .5rem; }
.share-row { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0 0; }
.legend { margin-top: 1.2rem; }
.legend dl { margin: 0; padding: 0 1.25rem 1.1rem; display: grid; gap: .55rem; }
.legend dt { font-weight: 700; display: flex; align-items: center; gap: .5rem; }
.legend dd { margin: 0 0 0 0; color: var(--ink-soft); font-size: .93rem; }

/* ---------- Awareness: save, sort, modal toolbar ---------- */
.a-save { position: absolute; right: .75rem; top: .75rem; width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(255,255,255,.93); color: #14203a; box-shadow: 0 2px 10px rgba(0,0,0,.2); cursor: pointer; transition: transform .15s, color .15s; z-index: 2; }
.a-save:hover { transform: scale(1.12); }
.a-save svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: fill .15s; }
.a-save[aria-pressed="true"] { color: var(--accent); }
.a-save[aria-pressed="true"] svg { fill: currentColor; }
.a-save:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.viewbar .right-tools { display: flex; gap: .7rem; flex-wrap: wrap; align-items: center; }
.modal-tools { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: 0 0 1rem; }
.modal-nav { display: flex; justify-content: space-between; gap: .6rem; margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.modal-nav .btn svg { width: 1em; height: 1em; }

/* ---------- Admin quick filters + dashboard actions ---------- */
.qchips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 0; }
.qchips .chip b { background: rgb(var(--accent-rgb) / .14); color: var(--link); border-radius: var(--r-pill); padding: .02rem .5rem; font-size: .78rem; }
.qchips .chip.on b { background: rgba(255,255,255,.28); color: #fff; }
.actions-row { display: flex; flex-wrap: wrap; gap: .7rem; margin: 0 0 1.3rem; }

@media (max-width: 900px) {
  .qa-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .bento-item, .bento-item.wide { grid-column: span 3; }
  .principles, .tips { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .qa-grid, .bento { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .bento-item, .bento-item.wide { grid-column: auto; }
}
@media print { .progress-bar, .cta-band, .qa-grid, .bento, .faq { display: none !important; } }
.qa-grid { margin-top: 1.3rem; }
.qa .go { margin-top: auto; padding-top: .6rem; }
.faq { margin-bottom: .5rem; }
