/* ==========================================================================
   軟糖代購 - components.css (shared component library)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border-radius: var(--r-ctl);
  font-size: var(--fs-15); font-weight: 600; letter-spacing: .02em;
  white-space: nowrap; user-select: none; text-decoration: none;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease), color var(--dur) var(--ease), transform .12s var(--ease);
}
.btn:active:not(:disabled):not([aria-disabled="true"]) { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn .icon { flex: none; }

.btn-primary { background: var(--blue-strong); color: #fff; box-shadow: 0 2px 8px -4px rgba(79,106,155,.55); }
@media (hover: hover) { .btn-primary:hover { background: var(--blue-deep); } }
.btn-primary:active:not(:disabled) { background: var(--blue-deep); }

.btn-secondary { background: #fff; color: var(--ink); border: 1px solid var(--line-2); }
@media (hover: hover) { .btn-secondary:hover { background: var(--surface-2); border-color: var(--line-2); } }

.btn-tonal { background: var(--lavender-soft); color: var(--blue-deep); }
@media (hover: hover) { .btn-tonal:hover { background: #E0E0EF; } }

.btn-ghost { background: transparent; color: #45608E; }
@media (hover: hover) { .btn-ghost:hover { background: var(--blue-soft); } }

.btn-line { background: var(--green-soft); color: var(--green); border: 1px solid #CBEAD8; }
@media (hover: hover) { .btn-line:hover { background: #DAF2E3; } }
.btn-line .icon { color: var(--line-green); }

.btn-danger { background: var(--red); color: #fff; }
@media (hover: hover) { .btn-danger:hover { background: #A83A27; } }

.btn-danger-ghost { background: transparent; color: var(--red); border: 1px solid rgba(192,68,46,.35); }
@media (hover: hover) { .btn-danger-ghost:hover { background: var(--red-soft); } }

.btn-sm { min-height: 36px; padding: 0 14px; font-size: var(--fs-14); border-radius: 10px; gap: 6px; }
.btn-xs { min-height: 30px; padding: 0 10px; font-size: var(--fs-13); border-radius: 9px; gap: 5px; }
.btn-block { width: 100%; }
.btn-lg { min-height: 52px; font-size: var(--fs-17); border-radius: 14px; }

.btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: var(--r-ctl); color: var(--ink);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), transform .12s var(--ease);
}
.btn-icon:active { transform: translateY(1px); }
@media (hover: hover) { .btn-icon:hover { background: rgba(60,60,67,.07); } }
.btn-icon.is-active, .btn-icon[aria-expanded="true"] { background: var(--lavender-soft); color: var(--blue-deep); }
.btn-icon--sm { width: 36px; height: 36px; border-radius: 10px; }

.btn.is-loading { pointer-events: none; opacity: .8; }
.btn.is-loading .icon { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------------------
   Tags / chips / badges / status
   -------------------------------------------------------------------------- */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px; border-radius: var(--r-pill);
  font-size: var(--fs-12); font-weight: 500; line-height: 1.7;
  white-space: nowrap;
}
.tag-pink { background: var(--pink-soft); color: #8A5B63; }
.tag-lavender { background: var(--lavender-soft); color: var(--blue-deep); }
.tag-blue { background: var(--blue-soft); color: var(--blue-deep); }
.tag-green { background: var(--green-soft); color: var(--green); }
.tag-amber { background: var(--amber-soft); color: var(--amber); }
.tag-red { background: var(--red-soft); color: var(--red); }
.tag-grey { background: var(--surface-3); color: var(--ink-2); }

.stock-note { color: var(--red); font-size: var(--fs-12); font-weight: 600; }
.stock-note .icon { color: var(--red); }
.soldout-note { color: var(--ink-2); font-size: var(--fs-12); font-weight: 600; }

.status-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 11px; border-radius: var(--r-pill);
  font-size: var(--fs-12); font-weight: 600; white-space: nowrap;
}
.status-received { background: var(--amber-soft); color: var(--amber); }
.status-processing { background: var(--blue-soft); color: var(--blue-deep); }
.status-purchased { background: var(--lavender-soft); color: var(--lavender-deep); }
.status-consolidating_jp { background: rgba(247, 223, 211, 0.7); color: #8A4B38; }
.status-arrived_tw { background: rgba(220, 237, 248, 0.85); color: #1B5E8A; }
.status-shipped { background: var(--green-soft); color: var(--green); }
.status-void { background: var(--surface-3); color: var(--ink-2); }

.badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--red); color: #fff; font-size: 11px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.badge:empty, .badge[hidden] { display: none; }

/* --------------------------------------------------------------------------
   Cards & panels
   -------------------------------------------------------------------------- */
.card { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--shadow-card); }
.card-pad { padding: var(--sp-4); }
.card-flat { box-shadow: none; border: 1px solid var(--line); }
.panel { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--shadow-card); padding: var(--sp-4); }
.panel-title { font-size: var(--fs-15); font-weight: 600; display: flex; align-items: center; gap: 8px; }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.field { display: grid; gap: 6px; }
.field + .field { margin-top: var(--sp-4); }
.label { font-size: var(--fs-13); font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 4px; }
.req { color: var(--red); font-size: var(--fs-12); }

.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 10px 14px;
  background: #fff; color: var(--ink);
  border: 1.5px solid var(--field-border); border-radius: var(--r-input);
  font-size: var(--fs-15); line-height: 1.4;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.textarea { min-height: 96px; resize: vertical; }
.select {
  appearance: none; -webkit-appearance: none;
  background-image: none; padding-right: 40px; cursor: pointer;
}
.select-wrap { position: relative; }
.select-wrap .select-chevron {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  pointer-events: none; color: var(--ink-2);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-2); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--blue-strong);
  box-shadow: 0 0 0 3px var(--blue-soft);
}
.input[aria-invalid="true"], .textarea[aria-invalid="true"], .select[aria-invalid="true"] {
  border-color: var(--red); box-shadow: none;
}
.input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px var(--red-soft); }
.input[disabled], .select[disabled] { background: var(--surface-2); color: var(--ink-2); cursor: not-allowed; }
.hint { font-size: var(--fs-12); color: var(--ink-2); }
.error-text { font-size: var(--fs-13); color: var(--red); font-weight: 500; display: flex; align-items: center; gap: 5px; }
.field.invalid .label { color: var(--red); }

.input-affix { position: relative; }
.input-affix .input { padding-right: 84px; }
.input-affix .affix {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center;
}

/* checkbox */
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.check input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; flex: none;
  width: 22px; height: 22px; margin: 0; margin-top: 1px;
  border: 1.5px solid var(--field-border); border-radius: 7px; background: #fff;
  cursor: pointer; position: relative;
  transition: background-color .15s var(--ease), border-color .15s var(--ease);
}
.check input[type="checkbox"]:checked { background: var(--blue-strong); border-color: var(--blue-strong); }
.check input[type="checkbox"]:checked::after {
  content: ""; position: absolute; left: 7px; top: 3px;
  width: 6px; height: 11px;
  border: solid #fff; border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}
.check input[type="checkbox"]:indeterminate { background: var(--blue-strong); border-color: var(--blue-strong); }
.check input[type="checkbox"]:indeterminate::after {
  content: ""; position: absolute; left: 4.5px; top: 9px; width: 11px; height: 2.5px; background: #fff; border-radius: 2px;
}
.check input[type="checkbox"]:disabled { opacity: .45; cursor: not-allowed; }
.check .check-text { font-size: var(--fs-14); line-height: 1.5; }
.check .check-text small { display: block; color: var(--ink-2); font-size: var(--fs-12); margin-top: 2px; }

/* radio group (variants fallback) */
.radio-pills { display: flex; flex-wrap: wrap; gap: 8px; }

/* switch */
.switch {
  position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
}
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .switch-track {
  width: 48px; height: 28px; border-radius: 999px; background: var(--line-2);
  transition: background-color .18s var(--ease); position: relative; flex: none;
}
.switch .switch-track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px;
  background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.2);
  transition: transform .18s var(--ease);
}
.switch input:checked + .switch-track { background: var(--blue-strong); }
.switch input:checked + .switch-track::after { transform: translateX(20px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--focus); outline-offset: 2px; }
.switch .switch-label { font-size: var(--fs-14); }

/* segmented control */
.seg { display: inline-flex; background: var(--surface-3); border-radius: var(--r-pill); padding: 4px; gap: 4px; }
.seg button {
  min-height: 38px; padding: 0 16px; border-radius: var(--r-pill);
  font-size: var(--fs-14); font-weight: 600; color: var(--ink-2);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.seg button[aria-pressed="true"] { background: #fff; color: var(--blue-deep); box-shadow: 0 1px 3px rgba(96,63,52,.14); }

/* chips (filters) */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 38px; padding: 0 14px;
  background: #fff; border: 1px solid var(--line-2); border-radius: var(--r-pill);
  font-size: var(--fs-13); font-weight: 600; color: var(--ink-2);
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
@media (hover: hover) { .chip:hover { background: var(--surface-2); } }
.chip[aria-pressed="true"] {
  background: var(--lavender-soft); border-color: var(--lavender); color: var(--blue-deep);
}
.chip .chip-count { font-variant-numeric: tabular-nums; color: var(--ink-3); font-weight: 500; }
.chip[aria-pressed="true"] .chip-count { color: var(--blue-deep); }

/* --------------------------------------------------------------------------
   Quantity stepper
   -------------------------------------------------------------------------- */
.stepper {
  display: inline-flex; align-items: center;
  border: 1.5px solid var(--line-2); border-radius: var(--r-ctl);
  background: #fff; overflow: hidden;
}
.stepper button {
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink); transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
@media (hover: hover) { .stepper button:hover:not(:disabled) { background: var(--surface-2); } }
.stepper button:disabled { color: var(--ink-3); cursor: not-allowed; }
.stepper .qty {
  min-width: 46px; text-align: center; font-size: var(--fs-15); font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.stepper--sm button { width: 36px; height: 36px; }
.stepper--sm .qty { min-width: 38px; font-size: var(--fs-14); }

/* --------------------------------------------------------------------------
   6-stage continuous S-curve progress timeline
   Top row (L -> R): 收到訂單 -> 處理中 -> 已買齊
   Bottom row (L -> R): 日本集貨中 -> 已抵台 -> 已出貨
   Continuous connection from top right around to bottom left
   -------------------------------------------------------------------------- */
.steps-scurve-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding: 10px 14px;
}
.steps-scurve-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}
.scurve-bg-line {
  stroke: var(--line);
  stroke-width: 3px;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.scurve-active-line {
  stroke: var(--blue);
  stroke-width: 3.5px;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  position: relative;
  z-index: 2;
  margin: 0;
  padding: 0;
  list-style: none;
}
.steps .step { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.steps .step::before { display: none; }
.steps .step-node {
  position: relative; z-index: 2;
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--lavender-soft); color: var(--ink-2);
  border: 2px solid transparent; font-size: 0;
}
.steps .step.done .step-node { background: var(--blue); color: #fff; }
.steps .step.current .step-node { background: var(--blue); color: #fff; box-shadow: 0 0 0 4px var(--blue-soft); }
.steps .step-label { font-size: var(--fs-13); color: var(--ink-2); line-height: 1.35; word-break: keep-all; font-weight: 500; }
.steps .step.current .step-label { color: var(--ink); font-weight: 700; }
.steps .step.done .step-label { color: var(--ink-2); font-weight: 600; }
.steps .step-time { font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }


/* Track ordered products breakdown */
.track-products-block {
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  padding: 12px 14px;
}
.track-products-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.track-prod-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.track-prod-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.track-prod-row img.thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface-3);
  flex: none;
}
.track-prod-row .tp-info {
  flex: 1 1 auto;
  min-width: 0;
}
.track-prod-row .tp-name {
  font-size: var(--fs-13);
  font-weight: 600;
  line-height: 1.35;
}
.track-prod-row .tp-spec {
  margin-top: 2px;
}
.track-prod-row .tp-price {
  font-size: var(--fs-14);
  font-weight: 700;
  color: var(--blue-strong);
  font-variant-numeric: tabular-nums;
  flex: none;
}
.track-products-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid var(--line-2);
  font-size: var(--fs-13);
}

/* --------------------------------------------------------------------------
   Accordion
   -------------------------------------------------------------------------- */
.acc-item { border-bottom: 1px solid var(--line); }
.acc-item:last-child { border-bottom: 0; }
.acc-head {
  width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 15px 2px; text-align: left; font-size: var(--fs-15); color: var(--ink);
}
.acc-head .acc-chevron { margin-left: auto; color: var(--ink-2); transition: transform .22s var(--ease); flex: none; }
.acc-item.open > .acc-head .acc-chevron { transform: rotate(180deg); }
.acc-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .28s var(--ease);
  visibility: hidden;
  overflow: hidden;
}
.acc-item.open > .acc-panel,
.qorder-item.open > .acc-panel,
.acc-standalone.open > .acc-panel {
  grid-template-rows: 1fr;
  visibility: visible;
}
.acc-inner {
  overflow: hidden;
  min-height: 0;
}

/* --------------------------------------------------------------------------
   Overlay / sheet / dialog
   -------------------------------------------------------------------------- */
.overlay {
  position: fixed; inset: 0; z-index: var(--z-sheet);
  background: rgba(60, 42, 36, .44);
  opacity: 0; transition: opacity .24s var(--ease);
}
.overlay.show { opacity: 1; }
.overlay--drawer { z-index: calc(var(--z-drawer) - 1); }
.overlay--modal { z-index: calc(var(--z-modal) - 1); }

.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-sheet);
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  max-height: min(88dvh, 820px);
  display: flex; flex-direction: column;
  transform: translateY(103%);
  transition: transform .3s var(--ease);
  box-shadow: var(--shadow-pop);
}
.sheet.show { transform: none; }
.sheet-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--line); flex: none;
}
.sheet-title { font-size: var(--fs-17); font-weight: 600; }
.sheet-close { margin-left: auto; }
.sheet-body { padding: 16px; overflow: auto; -webkit-overflow-scrolling: touch; }
.sheet-foot {
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); background: #fff; flex: none;
}
.sheet-grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 8px auto 0; flex: none; }

@media (min-width: 768px) {
  .sheet {
    left: 50%; right: auto; bottom: auto; top: 50%;
    width: min(680px, 92vw);
    border-radius: 20px;
    transform: translate(-50%, calc(-50% + 14px)) scale(.985);
    opacity: 0;
    transition: transform .26s var(--ease), opacity .2s var(--ease);
    max-height: min(86vh, 780px);
  }
  .sheet.show { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  .sheet-grab { display: none; }
}

.dialog {
  position: fixed; z-index: var(--z-modal);
  left: 50%; top: 50%; width: min(420px, 92vw);
  background: var(--surface); border-radius: 18px;
  transform: translate(-50%, calc(-50% + 12px)) scale(.98); opacity: 0;
  transition: transform .22s var(--ease), opacity .18s var(--ease);
  box-shadow: var(--shadow-pop);
  max-height: min(84vh, 700px); display: flex; flex-direction: column;
}
.dialog.show { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.dialog-head { padding: 18px 20px 0; font-size: var(--fs-17); font-weight: 600; }
.dialog-body { padding: 12px 20px 4px; color: var(--ink-2); font-size: var(--fs-14); overflow: auto; }
.dialog-body strong { color: var(--ink); }
.dialog-foot { padding: 16px 20px 20px; display: flex; gap: 10px; justify-content: flex-end; }

/* --------------------------------------------------------------------------
   Toasts
   -------------------------------------------------------------------------- */
.toast-root {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(88px + env(safe-area-inset-bottom));
  z-index: var(--z-toast);
  display: grid; gap: 8px; width: min(92vw, 430px);
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex; align-items: flex-start; gap: 10px;
  background: #fff; border-radius: 14px; padding: 12px 14px;
  box-shadow: var(--shadow-pop);
  font-size: var(--fs-14); line-height: 1.5;
  animation: toast-in .26s var(--ease);
}
.toast .icon { flex: none; margin-top: 2px; }
.toast-success .icon { color: var(--green); }
.toast-error .icon { color: var(--red); }
.toast-info .icon { color: var(--blue-strong); }
.toast-warn .icon { color: var(--amber); }
.toast .toast-close { margin-left: auto; color: var(--ink-2); flex: none; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (min-width: 768px) {
  .toast-root { left: auto; right: 24px; transform: none; bottom: 24px; }
}

/* --------------------------------------------------------------------------
   Drawer
   -------------------------------------------------------------------------- */
.drawer {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: var(--z-drawer);
  width: min(86vw, 380px);
  background: var(--surface);
  transform: translateX(-103%);
  transition: transform .3s var(--ease);
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-pop);
}
.drawer.show { transform: none; }
.drawer-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--line); flex: none;
}
.drawer-title { font-size: var(--fs-17); font-weight: 600; }
.drawer-body { padding: 8px 16px 16px; overflow: auto; flex: 1 1 auto; }
.drawer-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); flex: none; }

/* desktop: category menu becomes 3 columns */
@media (min-width: 960px) {
  .drawer.drawer--wide { width: min(92vw, 920px); }
  .drawer--wide .menu-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 20px; }
  .drawer--wide .menu-group + .menu-group { margin-top: 0; }
}

/* --------------------------------------------------------------------------
   Tabs (pill)
   -------------------------------------------------------------------------- */
.tabs { display: flex; gap: 6px; background: var(--surface-3); padding: 4px; border-radius: var(--r-pill); }
.tabs .tab {
  flex: 1 1 auto; min-height: 40px; padding: 0 16px; border-radius: var(--r-pill);
  font-size: var(--fs-14); font-weight: 600; color: var(--ink-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.tabs .tab[aria-selected="true"] { background: #fff; color: var(--blue-deep); box-shadow: 0 1px 3px rgba(96,63,52,.14); }

/* --------------------------------------------------------------------------
   Table
   -------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; background: #fff; border-radius: var(--r-card); box-shadow: var(--shadow-card); }
.table { font-size: var(--fs-14); min-width: 640px; }
.table th {
  text-align: left; font-size: var(--fs-12); font-weight: 600; color: var(--ink-2);
  padding: 11px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { font-variant-numeric: tabular-nums; text-align: right; }
.table tbody tr.is-clickable { cursor: pointer; }
@media (hover: hover) { .table tbody tr.is-clickable:hover { background: var(--surface-2); } }

/* --------------------------------------------------------------------------
   Empty / loading / notes
   -------------------------------------------------------------------------- */
.empty { text-align: center; padding: var(--sp-10) var(--sp-4); }
.empty .empty-icon {
  width: 76px; height: 76px; margin: 0 auto 16px;
  border-radius: 26px; background: var(--pink-soft); color: var(--blue);
  display: grid; place-items: center;
}
.empty h3 { font-size: var(--fs-17); font-weight: 600; margin-bottom: 6px; }
.empty p { color: var(--ink-2); font-size: var(--fs-14); max-width: 42ch; margin: 0 auto 18px; line-height: 1.6; }

.skel {
  background: linear-gradient(90deg, #F3EAE4 25%, #FAF4EF 37%, #F3EAE4 63%);
  background-size: 400% 100%; animation: skel 1.4s ease infinite;
  border-radius: 10px;
}
@keyframes skel { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.skel-card { height: 120px; border-radius: var(--r-card); }

.note {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: 12px;
  font-size: var(--fs-13); line-height: 1.55;
}
.note .icon { flex: none; margin-top: 1px; }
.note-info { background: var(--blue-soft); color: var(--blue-deep); }
.note-soft { background: var(--surface-2); color: var(--ink-2); }
.note-warn { background: var(--amber-soft); color: var(--amber); }
.note-red { background: var(--red-soft); color: var(--red); }
.note-green { background: var(--green-soft); color: var(--green); }
.note strong { font-weight: 600; }

/* --------------------------------------------------------------------------
   Pager / load-more
   -------------------------------------------------------------------------- */
.pager { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: var(--sp-5); }
.pager .pager-info { font-size: var(--fs-13); color: var(--ink-2); font-variant-numeric: tabular-nums; }

.section-title {
  display: flex; align-items: center; gap: 10px;
  font-size: var(--fs-17); font-weight: 600; color: var(--ink);
}
.section-title .icon { color: var(--blue); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: var(--sp-3); }

/* skeleton for money */
.num-em { font-size: var(--fs-20); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
