/* DMNT CRM: small motion + feedback layer (2026-10-17). Only transform/opacity/colour transitions, nothing runs while idle.
   Behaviour lives in assets/polish.js; everything here switches off under prefers-reduced-motion. */

html { scrollbar-color: #2b2338 transparent; }
::selection { background: rgba(124,58,237,.45); color: #fff; }

/* hover / press feel */
.btn, .btn-ghost, .btn-danger, .tab, .seg a, .sidelink, .stat, .kcard, .card.notif, .iconlink {
    transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .22s ease, transform .16s cubic-bezier(.2,.8,.2,1), filter .16s ease;
}
.btn:active, .btn-ghost:active, .btn-danger:active, .tab:active, .seg a:active, .iconlink:active { transform: scale(.97); transition-duration: .06s; }
.btn:hover { box-shadow: 0 4px 20px rgba(124,58,237,.5); }
.btn:focus-visible, .btn-ghost:focus-visible, .tab:focus-visible, .sidelink:focus-visible, .seg a:focus-visible { outline: 2px solid rgba(167,139,250,.75); outline-offset: 2px; }

/* phone chrome: bottom nav, the top-left menu button, the green booking FAB — same press feel as everything else */
.bottomnav a, .nav-burger, .book-fab, .sidebook, .tnew-fab {
    transition: background-color .16s ease, color .16s ease, box-shadow .16s ease, transform .16s cubic-bezier(.2,.8,.2,1); }
.bottomnav a:active, .nav-burger:active, .tnew-fab:active, .sidebook:active { transform: scale(.94); transition-duration: .06s; }
.book-fab:active { transform: translateX(-50%) scale(.97); transition-duration: .06s; } /* base .book-fab already centres itself with translateX(-50%) */

/* main button: a light sweep on hover */
:where(.btn) { position: relative; }
.btn::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,.22) 50%, transparent 65%) 160% 0 / 250% 100% no-repeat;
    transition: background-position .6s cubic-bezier(.2,.8,.2,1); }
.btn:hover::after { background-position: -60% 0; }

/* sidebar icons nudge */
.sidelink .si { transition: transform .2s cubic-bezier(.2,.8,.2,1); }
.sidelink:hover .si { transform: translateX(2px); }

/* table rows */
tbody tr { transition: background-color .12s ease; }

/* number tiles: lift + soft light that follows the cursor (--mx/--my from polish.js) */
.stat { isolation: isolate; }
:where(.stat) { position: relative; }
.stat::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; opacity: 0;
    background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 0%), rgba(124,58,237,.2), transparent 65%);
    transition: opacity .25s ease; }
a.stat:hover { transform: translateY(-2px); border-color: rgba(167,139,250,.32); box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.stat:hover::before { opacity: 1; }
.stat .snum { font-variant-numeric: tabular-nums; }

/* kanban cards */
.kcard:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(0,0,0,.35); border-color: var(--line-strong); }
.kcard.dragging { transform: scale(.97); }
.kcards.drop-hot { box-shadow: inset 0 0 0 1px rgba(124,58,237,.45); transition: background-color .15s, box-shadow .15s; }
.kcard.k-landed { animation: k-land .45s cubic-bezier(.2,1.3,.4,1); }
@keyframes k-land { 0% { transform: scale(1.04); box-shadow: 0 0 0 2px rgba(167,139,250,.7), 0 12px 30px rgba(124,58,237,.35); } 100% { transform: none; } }

/* pages ease in (skipped when the login greeting runs its own entrance) */
html:not(.welcome-on) .wrap > :is(.pagehead, .stats, .toolbar, .card, h2, table, .kanban, .tbl-wrap, .grid):nth-child(-n+6) {
    animation: pg-in .32s cubic-bezier(.2,.8,.2,1) backwards; }
html:not(.welcome-on) .wrap > :nth-child(2) { animation-delay: .03s; }
html:not(.welcome-on) .wrap > :nth-child(3) { animation-delay: .06s; }
html:not(.welcome-on) .wrap > :nth-child(4) { animation-delay: .09s; }
html:not(.welcome-on) .wrap > :nth-child(n+5) { animation-delay: .12s; }
@keyframes pg-in { from { opacity: 0; transform: translateY(6px); } }

/* pop-up window */
.pop-overlay { animation: pop-fade .18s ease-out; }
.pop-box { animation: pop-in .26s cubic-bezier(.2,1,.3,1); }
@keyframes pop-fade { from { opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(10px) scale(.985); } }

/* toasts: springier */
.toast { transition: opacity .22s ease, transform .38s cubic-bezier(.2,1.4,.4,1); }

/* rows that "Rodyti dar" brought in */
.row-in { animation: row-in .3s ease-out backwards; }
@keyframes row-in { from { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
    .btn, .btn-ghost, .btn-danger, .tab, .seg a, .sidelink, .stat, .kcard, .card.notif, .iconlink, .sidelink .si,
    .bottomnav a, .nav-burger, .book-fab, .sidebook, .tnew-fab { transition: none; }
    .btn::after, .stat::before { display: none; }
    a.stat:hover, .kcard:hover, .sidelink:hover .si { transform: none; }
    .wrap > *, .pop-overlay, .pop-box, .kcard.k-landed, .row-in { animation: none !important; }
    .book-fab:active { transform: translateX(-50%) !important; }
}
