/* ======================================================================================
   Sync365 v3: gerak, logo hidup, lukisan, carta, memuat. Dimuatkan selepas v2.css.
   Prinsip gerak: keluar lebih pantas daripada masuk; tekan = skala 0.975; hanya transform dan opacity; tiada gerak pada tindakan papan kekunci.
   ====================================================================================== */
:root { --ease-out: cubic-bezier(.23, 1, .32, 1); --ease-in-out: cubic-bezier(.77, 0, .175, 1); --ease-drawer: cubic-bezier(.32, .72, 0, 1); }
html { scrollbar-width: thin; scrollbar-color: var(--rule2) transparent; }
::selection { background: var(--accent); color: var(--accent-ink); }
a:focus-visible, button:focus-visible, summary:focus-visible, [role="button"]:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- ikon duoton ---- */
svg.i { stroke-width: 1.75; }
svg.i .t { fill: currentColor; fill-opacity: .14; stroke: none; }
.v-tab[aria-current="page"] svg.i .t, .v-nav[aria-current="page"] svg.i .t { fill: var(--accent-text); fill-opacity: .3; }
.v-tab[aria-current="page"] svg.i, .v-nav[aria-current="page"] svg.i { animation: tabpop .36s var(--ease-out); }
@keyframes tabpop { 0% { transform: scale(.82); } 100% { transform: scale(1); } }

/* ---- logo: 12 petak masuk satu demi satu; berombak apabila Sync365 sedang bekerja ---- */
.logo .lg-cell { fill: var(--accent-text); fill-opacity: var(--o); transform-box: fill-box; transform-origin: center;
  animation: lgIn .5s var(--ease-out) calc(var(--i) * 34ms) both, lgGlow 4.4s ease-in-out calc(1.3s + var(--d) * 170ms) infinite; }
.logo .lg-cell.now { fill: var(--accent); fill-opacity: 1; animation: lgIn .5s var(--ease-out) calc(var(--i) * 34ms) both, lgNow 2.6s ease-in-out 1.5s infinite; }
@keyframes lgGlow { 0%, 48%, 100% { transform: scale(1); fill-opacity: var(--o); } 62% { transform: scale(1.16); fill-opacity: 1; } 80% { transform: scale(.88); fill-opacity: var(--o); } }
@keyframes lgNow { 0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0 transparent); } 50% { transform: scale(1.22); filter: drop-shadow(0 0 2.4px var(--accent)); } }
.logo.live .lg-cell, .logo.live .lg-cell.now { animation: lgWave 1.5s var(--ease-in-out) calc(var(--i) * 80ms) infinite; }
@keyframes lgIn { from { opacity: 0; transform: scale(.3); } }
@keyframes lgBreath { 0%, 100% { transform: scale(1); } 50% { transform: scale(.7); } }
@keyframes lgWave { 0%, 100% { transform: scale(1); opacity: 1; } 35% { transform: scale(.5); opacity: .4; } }
@keyframes lgPing { 40% { transform: scale(.6); } }
@media (hover: hover) and (pointer: fine) { .brand:hover .logo:not(.live) .lg-cell { animation: lgPing .7s var(--ease-out) calc(var(--i) * 30ms); } }
.brand { text-decoration: none; }

/* ---- tekan dan peralihan ---- */
.btn, .v-row, .v-chip, .v-addrow, .v-tab, .v-nav, .v-linkrow, .v-dim-h, .act-row, .v-asp, .v-acc summary, .v-att .btn { transition: transform .14s var(--ease-out), background-color .14s, border-color .14s, color .14s, box-shadow .14s, filter .14s; }
.btn:active, .v-row:active, .v-chip:active, .v-addrow:active, .v-linkrow:active, .act-row:active, .v-asp:active, .v-dim-h:active, .v-acc summary:active { transform: scale(.975); }
.v-tab svg { transition: transform .2s var(--ease-out); } .v-tab:active svg { transform: scale(.86); }
.v-fab { transition: transform .18s var(--ease-out), box-shadow .18s; } .v-fab:active { transform: scale(.9); }
.v-page.enter > * { animation: rise .42s var(--ease-out) both; }
.v-page.enter > *:nth-child(2) { animation-delay: 30ms; } .v-page.enter > *:nth-child(3) { animation-delay: 60ms; } .v-page.enter > *:nth-child(4) { animation-delay: 90ms; }
.v-page.enter > *:nth-child(5) { animation-delay: 120ms; } .v-page.enter > *:nth-child(n+6) { animation-delay: 150ms; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* ---- helaian: masuk dengan lengkung laci, keluar lebih pantas ---- */
.scrim { animation: fadein .2s var(--ease-out) both; } .scrim.out { animation: fadeout .17s var(--ease-out) forwards; pointer-events: none; }
@keyframes fadeout { to { opacity: 0; } }
.v-sheet.out, .modal.out, .peek.out { pointer-events: none; }
@media (max-width: 699px) {
  .v-sheet { left: 0; right: 0; width: auto; transform: none; animation: sheetrise .32s var(--ease-drawer) both; touch-action: pan-y; }
  .modal, .peek { animation: sheetrise .32s var(--ease-drawer) both; }
  .v-sheet.out, .modal.out, .peek.out { animation: sheetfall .18s var(--ease-out) forwards; }
  @keyframes sheetrise { from { transform: translateY(100%); } }
  @keyframes sheetfall { to { transform: translateY(100%); } }
  .modal .v-grab, .peek .v-grab { margin: 2px auto 8px; }
  .modal h2.ttl-grab { padding-top: 2px; }
}
@media (min-width: 700px) {
  .v-sheet.out { animation: sheetoutd .17s var(--ease-out) forwards; } @keyframes sheetoutd { to { transform: translate(-50%, -48%); opacity: 0; } }
  .modal { animation: modalin .24s var(--ease-out) both; } .modal.out { animation: modalout .17s var(--ease-out) forwards; }
  @keyframes modalin { from { opacity: 0; transform: translateX(-50%) translateY(10px) scale(.985); } } @keyframes modalout { to { opacity: 0; transform: translateX(-50%) translateY(6px); } }
  .peek { animation: peekin .3s var(--ease-drawer) both; } .peek.out { animation: peekout .2s var(--ease-out) forwards; }
  @keyframes peekin { from { transform: translateX(100%); } } @keyframes peekout { to { transform: translateX(100%); } }
  .modal .v-grab, .peek .v-grab { display: none; }
}

/* ---- memuat: pembuka dan rangka halaman Utama ---- */
.boot2 { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 22px; background: var(--bg); }
.b2-mark { display: flex; align-items: center; gap: 14px; } .b2-mark .wm { font-size: 28px; opacity: 0; animation: rise .5s var(--ease-out) .4s forwards; }
.b2-hint { color: var(--ink3); font-size: 14px; opacity: 0; animation: rise .5s var(--ease-out) 1.6s forwards; }
.sk { border-radius: 14px; background: linear-gradient(100deg, var(--hover) 20%, var(--press) 50%, var(--hover) 80%); background-size: 220% 100%; animation: shimmer 1.5s linear infinite; }
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.sk-nav { height: 48px; border-radius: var(--r-ctl); } .v-rail nav .sk-nav + .sk-nav { margin-top: 4px; }
.sk-hello { width: 96px; height: 14px; border-radius: 7px; margin: 6px 0 12px; } .sk-name { width: 170px; height: 42px; border-radius: 12px; }
.sk-hero { height: 236px; margin-top: 20px; border-radius: 28px; background: linear-gradient(100deg, color-mix(in srgb, var(--hero-bg) 94%, white) 20%, color-mix(in srgb, var(--hero-bg) 82%, white) 50%, color-mix(in srgb, var(--hero-bg) 94%, white) 80%); background-size: 220% 100%; }
.sk-card { height: 124px; margin-top: 16px; border-radius: 22px; } .sk-card.short { height: 84px; }
.sk-tabs { background: none; border: 0; }
.sk-tabs::before { content: ""; position: absolute; inset: 0; border-top: 1px solid var(--rule); background: color-mix(in srgb, var(--bg) 90%, transparent); }

/* ---- lukisan (gambar rajah) ---- */
.art { display: block; width: 100%; max-width: 132px; height: auto; }
.art .ln { stroke: var(--ink); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.art path:not(.pp):not(.tn):not(.ac) { fill: none; }
.art .pp { fill: var(--panel); } .art .tn { fill: var(--accent-tint); } .art .ac { fill: var(--accent); }
.art .mu { stroke: var(--ink3); } .art .ac-s { stroke: var(--accent-text); } .art .dk { stroke: var(--accent-ink); stroke-width: 2.2; } .art .ln-s { stroke: var(--rule2); stroke-width: 1.5; }
.art .scan, .art .scan + path { animation: scan 2.6s var(--ease-in-out) infinite; }
@keyframes scan { 0%, 100% { transform: translateY(-16px); opacity: 0; } 20%, 80% { opacity: 1; } 50% { transform: translateY(20px); } }
.v-how { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; counter-reset: step; }
.v-how li { position: relative; display: grid; justify-items: start; gap: 4px; padding: 14px 14px 16px; border-radius: 20px; background: var(--panel); border: 1px solid var(--rule); box-shadow: var(--sh-card); }
.v-how .n { position: absolute; top: 12px; right: 14px; font: 600 12px var(--f-mono); color: var(--ink3); }
.v-how .art { margin: 4px 0 8px; max-width: 108px; } .v-how b { font-size: 15px; } .v-how span:last-child { font-size: 13px; color: var(--ink3); line-height: 1.35; }
@media (min-width: 700px) { .v-how { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---- carta konsistensi ---- */
.v-pad { padding: 18px 16px 14px; }
.v-chart { display: block; width: 100%; height: auto; overflow: visible; }
.v-chart .bar-m { fill: var(--accent-text); transform-box: view-box; animation: barrise .7s var(--ease-out) var(--d) both; }
@keyframes barrise { from { transform: scaleY(0); } }
.v-chart .bar-0 { fill: var(--rule2); } .v-chart .bar-f { fill: var(--rule); } .v-chart .bar-base { stroke: var(--rule2); stroke-width: 1; fill: none; }
.v-chart .bar-l { font: 500 9.5px var(--f-mono); fill: var(--ink3); } .v-chart .bar-l.cur { fill: var(--ink); font-weight: 600; }
.v-chart .bar-v { font: 600 11px var(--f-ui); fill: var(--ink); }
.v-chart .bar-h { outline: none; cursor: default; } .v-chart .bar-h:hover { fill: var(--hover); } .v-chart .bar-h:focus-visible { fill: var(--hover); stroke: var(--accent-text); stroke-width: 1.5; }
.v-cap { margin-top: 12px; min-height: 20px; font-size: 13.5px; color: var(--ink2); }

/* ---- kemajuan muat naik: langkah bernama ---- */
.stp ol { display: flex; flex-wrap: wrap; gap: 6px 16px; list-style: none; margin: 6px 0 4px; padding: 0; }
.stp li { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink3); }
.stp li i { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--rule2); }
.stp li.done { color: var(--ink2); } .stp li.done i { background: var(--accent-text); border-color: var(--accent-text); }
.stp li.on { color: var(--ink); font-weight: 600; } .stp li.on i { border-color: var(--accent-text); animation: pulse 1.3s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent-text) 50%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } }

/* ---- kad "AI sedang menulis" ---- */
.gen { position: fixed; z-index: 36; left: 50%; bottom: calc(var(--tab-h) + 18px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(420px, calc(100vw - 32px)); display: flex; align-items: center; gap: 14px; padding: 15px 16px 17px; border-radius: 18px; background: var(--ink); color: var(--bg); box-shadow: var(--sh-pop); overflow: hidden; animation: genin .34s var(--ease-out) both; }
@keyframes genin { from { opacity: 0; transform: translateX(-50%) translateY(14px) scale(.97); } }
.gen b { display: block; font-size: 14.5px; } .gen span { display: block; margin-top: 1px; font-size: 12.5px; opacity: .68; } .gen .lg-cell { fill: var(--accent); }
.gen-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .14); }
.gen-bar::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 36%; background: var(--accent); animation: pbar 1.3s var(--ease-in-out) infinite; }
@media (min-width: 900px) { .gen { bottom: 26px; left: calc(50% + 126px); } }

/* ---- bingkai Utama: baris jenama (telefon) dan susun atur lebar ---- */
.v-brandrow { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.v-brand { display: inline-flex; align-items: center; gap: 9px; } .v-brand .wm { font-size: 18px; }
.v-brandrow .v-av.sm { text-decoration: none; }
@media (min-width: 900px) { .v-brandrow { display: none; } }
.v-page.wide { max-width: 780px; }
@media (min-width: 1100px) {
  .v-page.wide { max-width: 1140px; }
  .v-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; align-items: start; }
  .v-cols .v-col > .v-sec:first-child { margin-top: 30px; }
}
@media (max-width: 1099px) { .v-cols .v-col > .v-sec:first-child { margin-top: 30px; } }

/* gerakan dikurangkan (tetapan sistem, melainkan pengguna menghidupkan gerakan penuh) */
html[data-reduce] .logo .lg-cell, html[data-reduce] .stp li.on i, html[data-reduce] .gen-bar::after, html[data-reduce] .art .scan, html[data-reduce] .art .scan + path, html[data-reduce] .sk, html[data-reduce] .v-chart .bar-m { animation: none !important; }

.v-sec > .v-sub { margin: -4px 0 14px; }

.ulog .ul { border: 0; background: none; box-shadow: none; margin: 0; }
.ulog .ul.bad { background: var(--danger-tint); }

.v-grab, .v-sheet-h, .ttl-grab { touch-action: none; }

/* ---- tulisan jenama ditaip: kursor tebal semasa menaip/memadam, berkelip semasa berhenti ---- */
.wm { display: inline-flex; align-items: baseline; white-space: nowrap; }
.wm-x { display: inline-block; min-height: 1em; }
.wm-x::after { content: ""; display: inline-block; width: 2px; height: .82em; margin-left: 2px; border-radius: 1px; background: var(--accent-text); vertical-align: -.08em; animation: caret 1.05s steps(1) infinite; }
html[data-wm="type"] .wm-x::after { animation: none; }
@keyframes caret { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0; } }
/* gerakan dikurangkan (tetapan sistem, melainkan pengguna menghidupkan gerakan penuh) */
html[data-reduce] .wm-x::after { display: none; }
html[data-reduce] .logo .lg-cell, html[data-reduce] .logo .lg-cell.now { animation: none !important; }
