/* =====================================================================
   ShopCloud247 Activate Portal — polish.css
   Lớp chỉnh sửa thị giác nhẹ nhàng, nạp SAU style.css + extra.css.
   Mục tiêu: bớt cảm giác "template", mềm và ấm hơn, chuyển động tự nhiên.
   Xoá file này (và dòng <link> tương ứng) là quay về giao diện cũ.
   ===================================================================== */

:root {
  --ease-soft: cubic-bezier(.22, .8, .3, 1);
  --ring: 0 0 0 3px color-mix(in srgb, var(--violet) 28%, transparent);
}

/* ---------- Chữ: dễ đọc, số thẳng hàng ---------- */
body { text-rendering: optimizeLegibility; font-feature-settings: "kern", "liga"; }
.num, .stat-num, .hw-balance, .od-seg b, .dev-countdown b, .ring-pct, .oc-code-text, code {
  font-variant-numeric: tabular-nums;
}
p, .es-sub, .page-head p { text-wrap: pretty; }
h1, h2, h3, .es-title, .card-title { text-wrap: balance; }

/* ---------- Focus rõ ràng, thống nhất ---------- */
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 10px; }
.btn:focus-visible, .nav-item:focus-visible, .icon-btn:focus-visible { box-shadow: var(--ring); }
.field input:focus, .field select:focus, .field textarea:focus { box-shadow: var(--ring); }

/* ---------- Chuyển cảnh nhẹ khi vào trang ---------- */
@keyframes pol-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.content > * { animation: pol-rise .5s var(--ease-soft) both; }
.content > *:nth-child(2) { animation-delay: .05s; }
.content > *:nth-child(3) { animation-delay: .1s; }
.content > *:nth-child(4) { animation-delay: .15s; }
.content > *:nth-child(5) { animation-delay: .2s; }
.content > *:nth-child(n+6) { animation-delay: .25s; }
.oc, .devcard, .mc, .step-card { animation: pol-rise .45s var(--ease-soft) both; }
.order-list > .oc:nth-child(2), .machine-grid > .mc:nth-child(2) { animation-delay: .05s; }
.order-list > .oc:nth-child(3), .machine-grid > .mc:nth-child(3) { animation-delay: .1s; }
.order-list > .oc:nth-child(n+4), .machine-grid > .mc:nth-child(n+4) { animation-delay: .14s; }

/* ---------- Thẻ & bề mặt: mềm hơn, có chiều sâu ---------- */
.card, .step-card, .oc, .mc, .devcard {
  transition: transform .25s var(--ease-soft), box-shadow .25s var(--ease-soft), border-color .2s ease;
}
.card { border-radius: 18px; }
.card:hover { border-color: var(--border); }
.oc:hover, .mc:hover, .step-card:hover, .devcard:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-pop);
}

/* ---------- Thanh bên: vạch nhấn bên trái cho mục đang mở ---------- */
.nav-item { position: relative; }
.nav-item.active::before {
  content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px;
  border-radius: 0 4px 4px 0; background: var(--gold-strong);
}
.nav-item .navdot { transition: transform .2s var(--ease-soft); }
.nav-item:hover .navdot, .nav-item.active .navdot { transform: scale(1.25); }

/* ---------- Thanh trên ---------- */
.topbar { background: color-mix(in srgb, var(--surface-solid) 82%, transparent); box-shadow: 0 1px 0 var(--border-soft); }
.topbar-title { letter-spacing: -.015em; }
.avatar-circle { transition: transform .2s var(--ease-soft), box-shadow .2s ease; }
.avatar-circle:hover { transform: scale(1.06); }

/* ---------- Nút bấm ---------- */
.btn { transition: transform .15s var(--ease-soft), box-shadow .2s ease, filter .15s ease, background .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn[disabled], .oc-cta[disabled] { opacity: .55; cursor: not-allowed; transform: none; filter: grayscale(.2); }

/* ---------- Trang tổng quan ---------- */
.hero-wallet { position: relative; border-radius: 22px; }
.hero-wallet .hw-greet { font-size: 13px; }
.hero-wallet .hw-name { font-size: 24px; letter-spacing: -.02em; }
.stat-tile { transition: transform .22s var(--ease-soft), box-shadow .22s ease; }
.stat-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-pop); }
.qa-btn { transition: transform .2s var(--ease-soft), box-shadow .2s ease, border-color .2s ease; }
.qa-btn:hover { transform: translateY(-2px); }
.todo-item:hover { transform: translateX(3px); }
.feed-item:last-child { border-bottom: 0; }

/* ---------- Đơn hàng ---------- */
.oc { border-radius: 20px; }
.oc-cta { transition: transform .15s var(--ease-soft), filter .15s ease, box-shadow .2s ease; }
.oc-cta:not([disabled]):hover { transform: translateY(-1px); filter: brightness(1.05); }
.oc-copy, .copy-btn { transition: transform .15s ease, background .15s ease; }
.oc-copy:hover, .copy-btn:hover { transform: scale(1.12); }

/* ---------- Trạng thái trống: ấm áp hơn ---------- */
.empty-state { padding: 38px 20px; }
.es-illust {
  animation: pol-float 5s ease-in-out infinite;
}
@keyframes pol-float { 50% { transform: translateY(-5px); } }
.es-title { font-size: 16.5px; }
.es-sub { max-width: 440px; margin-left: auto; margin-right: auto; line-height: 1.65; }

/* ---------- Bảng (admin) ---------- */
.dtable tbody tr { transition: background .15s ease; }
.dtable tbody tr:hover { background: color-mix(in srgb, var(--violet) 6%, transparent); }

/* ---------- Thông báo / dropdown: mở ra mượt ---------- */
@keyframes pol-pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
.dropdown-menu, .notif-panel { animation: pol-pop .18s var(--ease-soft) both; transform-origin: top right; border-radius: 14px; }
.modal-box { animation: pol-pop .22s var(--ease-soft) both; }
.alert { border-radius: 14px; animation: pol-rise .35s var(--ease-soft) both; }

/* ---------- Chip & badge ---------- */
.badge, .chip { letter-spacing: 0; }
.chip-tab, .bchip, .tab-btn { transition: background .15s ease, color .15s ease, transform .15s ease; }
.chip-tab:hover, .bchip:hover, .tab-btn:hover { transform: translateY(-1px); }

/* ---------- Đăng nhập: dịu hơn, bớt "bóng loáng" ---------- */
.login-form-box { border-radius: 24px; animation: pol-rise .6s var(--ease-soft) both; }
.login-form-box h2 { letter-spacing: -.02em; }
.login-shell .field label { font-weight: 600; font-size: 13px; color: #35506a; }
.login-shell .field input::placeholder { color: #9bb0c2; }
.login-hero h1 { letter-spacing: -.025em; }
.login-chips li { transition: transform .25s var(--ease-soft); }
.login-chips li:hover { transform: translateX(4px); }
.login-mascot-wrap .mascot { animation: pol-float 6s ease-in-out infinite; }

/* ---------- Thanh cuộn ---------- */
* { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }

/* ---------- Tôn trọng người dùng muốn ít chuyển động ---------- */
@media (prefers-reduced-motion: reduce) {
  .content > *, .oc, .devcard, .mc, .step-card, .dropdown-menu, .notif-panel, .modal-box,
  .alert, .login-form-box, .es-illust, .login-mascot-wrap .mascot { animation: none !important; }
  .oc:hover, .mc:hover, .step-card:hover, .devcard:hover, .stat-tile:hover, .qa-btn:hover, .btn:hover { transform: none; }
}

/* ---------- Điện thoại: nới khoảng cách cho dễ chạm ---------- */
@media (max-width: 640px) {
  .content { padding: 18px 14px 32px; }
  .card { padding: 18px; border-radius: 16px; }
  .hero-wallet .hw-name { font-size: 21px; }
}
