/* ============================================================
   AGI DeFi Platform — Component Library
   ============================================================ */


/* ============================
   BUTTONS
   ============================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: var(--text-base);
  font-weight: 600;
  font-family: var(--font-sans);
  border-radius: var(--r-full);
  padding: 13px 24px;
  cursor: pointer;
  transition: var(--t-base);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  border: none;
  min-height: 48px;
  letter-spacing: 0.01em;
}

/* Primary — Orange Gradient */
.btn-primary {
  background: var(--gradient-primary);
  color: #FFFFFF;
  box-shadow: var(--shadow-glow-xs);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-sm);
  filter: brightness(1.08);
}
.btn-primary:active {
  transform: translateY(0);
  filter: brightness(0.96);
}

/* Outline — Transparent + Orange Border */
.btn-outline {
  background: transparent;
  color: var(--c-primary);
  border: 1px solid var(--c-border-active);
}
.btn-outline:hover {
  background: rgba(255,107,43,0.08);
  transform: translateY(-1px);
}
.btn-outline:active {
  transform: translateY(0);
}

/* Ghost — Subtle Orange Fill */
.btn-ghost {
  background: rgba(255,107,43,0.10);
  color: var(--c-primary);
  border: 1px solid var(--c-border);
}
.btn-ghost:hover {
  background: rgba(255,107,43,0.18);
  border-color: var(--c-border-hover);
}

/* Danger */
.btn-danger {
  background: var(--c-danger-bg);
  color: var(--c-danger);
  border: 1px solid rgba(239,68,68,0.35);
}
.btn-danger:hover {
  background: rgba(239,68,68,0.20);
}

/* Secondary — Muted */
.btn-secondary {
  background: var(--c-bg-surface);
  color: var(--c-text-secondary);
  border: 1px solid var(--c-border-subtle);
}
.btn-secondary:hover {
  color: var(--c-text-primary);
  border-color: var(--c-border);
}

/* Sizes */
.btn-sm {
  font-size: var(--text-sm);
  padding: 9px 18px;
  min-height: 38px;
}
.btn-lg {
  font-size: var(--text-md);
  padding: 16px 32px;
  min-height: 54px;
}
.btn-full {
  width: 100%;
}

/* Disabled */
.btn:disabled,
.btn.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
  filter: none !important;
}

/* Loading state */
.btn.loading {
  pointer-events: none;
  color: transparent;
}
.btn.loading::after {
  content: '';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: auto;
}


/* ============================
   CARDS
   ============================ */

.card {
  background: var(--c-bg-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-card);
  transition: var(--t-base);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-card);
  pointer-events: none;
  border-radius: inherit;
}
.card:hover {
  border-color: var(--c-border-hover);
  box-shadow: var(--shadow-card), var(--shadow-glow-xs);
  transform: translateY(-2px);
}

.card--active {
  border-color: var(--c-border-active);
  background: rgba(255,107,43,0.08);
  box-shadow: var(--shadow-card), var(--shadow-glow-sm);
}
.card--active::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--gradient-primary);
  border-radius: var(--r-lg) 0 0 var(--r-lg);
}

.card--flat {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.card--flat:hover {
  transform: none;
}


/* ============================
   STAT CARD
   ============================ */

.stat-card {
  background: var(--c-bg-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: var(--t-base);
}

.stat-card:hover {
  border-color: var(--c-border-hover);
  box-shadow: var(--shadow-glow-xs);
}

.stat-card .stat-label {
  font-size: var(--text-xs);
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: var(--sp-2);
  display: flex;
  align-items: center;
  gap: 6px;
}

.stat-card .stat-value {
  font-family: var(--font-data);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--c-text-highlight);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: var(--sp-1);
}

.stat-card .stat-sub {
  font-size: var(--text-xs);
  color: var(--c-text-secondary);
}

/* ============================
   PLAN CARD (Buy / Staking)
   ============================ */

.plan-card {
  background: var(--c-bg-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  cursor: pointer;
  transition: var(--t-base);
  position: relative;
  overflow: hidden;
  text-align: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.plan-card:hover {
  border-color: var(--c-border-hover);
  box-shadow: var(--shadow-glow-xs);
  transform: translateY(-2px);
}
.plan-card.selected {
  border-color: var(--c-primary);
  background: rgba(255,107,43,0.10);
  box-shadow: var(--shadow-glow-sm);
}
.plan-card.selected::after {
  content: '✓';
  position: absolute;
  top: 8px; right: 10px;
  font-size: 11px;
  color: var(--c-primary);
  font-weight: 700;
}

.plan-card .plan-label {
  font-size: var(--text-xs);
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--sp-2);
  font-weight: 600;
}
.plan-card .plan-value {
  font-family: var(--font-data);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--c-text-highlight);
  font-variant-numeric: tabular-nums;
}
.plan-card .plan-sub {
  font-size: var(--text-sm);
  color: var(--c-text-secondary);
  margin-top: var(--sp-1);
}

/* HOT Badge */
.plan-card--hot {
  border-color: rgba(255,107,43,0.45);
}
.hot-badge {
  position: absolute;
  top: 0; right: 0;
  background: var(--gradient-primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 0 var(--r-lg) 0 var(--r-md);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}


/* ============================
   BADGES / STATUS LABELS
   ============================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--r-full);
  white-space: nowrap;
  letter-spacing: 0.03em;
}

.badge--success {
  background: var(--c-success-bg);
  color: var(--c-success);
  border: 1px solid rgba(16,185,129,0.25);
}
.badge--warning {
  background: var(--c-warning-bg);
  color: var(--c-warning);
  border: 1px solid rgba(245,158,11,0.25);
}
.badge--danger {
  background: var(--c-danger-bg);
  color: var(--c-danger);
  border: 1px solid rgba(239,68,68,0.25);
}
.badge--info {
  background: var(--c-info-bg);
  color: var(--c-info);
  border: 1px solid rgba(59,130,246,0.25);
}
.badge--orange {
  background: rgba(255,107,43,0.15);
  color: var(--c-primary);
  border: 1px solid var(--c-border);
}
.badge--muted {
  background: rgba(90,96,112,0.15);
  color: var(--c-text-muted);
  border: 1px solid rgba(90,96,112,0.25);
}

/* Level Badge (A1~A8) */
.level-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-data);
  font-weight: 800;
  font-size: var(--text-sm);
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  background: rgba(255,107,43,0.15);
  border: 1.5px solid var(--c-border-active);
  color: var(--c-primary);
  box-shadow: var(--shadow-glow-xs);
}
.level-badge.lg {
  width: 72px;
  height: 72px;
  font-size: var(--text-2xl);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-glow-sm), var(--shadow-glow-md);
  animation: pulseGlow 2.5s ease-in-out infinite;
}


/* ============================
   FORM ELEMENTS
   ============================ */

.input-wrapper {
  position: relative;
  width: 100%;
}

.input-field {
  width: 100%;
  background: var(--c-bg-input);
  border: 1px solid var(--c-border-subtle);
  border-radius: var(--r-md);
  padding: 14px 16px;
  font-size: var(--text-base);
  font-family: var(--font-sans);
  color: var(--c-text-primary);
  min-height: 52px;
  transition: var(--t-base);
}
.input-field::placeholder {
  color: var(--c-text-muted);
}
.input-field:focus {
  border-color: var(--c-border-hover);
  background: rgba(30,36,52,0.95);
  box-shadow: 0 0 0 3px rgba(255,107,43,0.12);
}
.input-field.error {
  border-color: var(--c-danger);
}
.input-field.success {
  border-color: var(--c-success);
}

.input-label {
  font-size: var(--text-sm);
  color: var(--c-text-secondary);
  font-weight: 500;
  margin-bottom: var(--sp-2);
  display: block;
}

.input-hint {
  font-size: var(--text-xs);
  color: var(--c-text-muted);
  margin-top: var(--sp-1);
}
.input-hint.error {
  color: var(--c-danger);
}

.input-suffix {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-max {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--c-primary);
  background: rgba(255,107,43,0.12);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  padding: 4px 10px;
  cursor: pointer;
  transition: var(--t-fast);
  letter-spacing: 0.04em;
  min-height: auto;
}
.btn-max:hover {
  background: rgba(255,107,43,0.22);
}

/* Input with suffix padding */
.input-field.has-suffix {
  padding-right: 80px;
}


/* ============================
   TABS
   ============================ */

.tab-group {
  display: flex;
  gap: 4px;
  background: var(--c-bg-surface);
  border-radius: var(--r-full);
  padding: 4px;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.tab-group::-webkit-scrollbar { display: none; }

.tab-item {
  flex-shrink: 0;
  padding: 8px 18px;
  border-radius: var(--r-full);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--c-text-secondary);
  cursor: pointer;
  transition: var(--t-base);
  white-space: nowrap;
}
.tab-item:hover {
  color: var(--c-text-primary);
}
.tab-item.active {
  background: var(--gradient-primary);
  color: #fff;
  font-weight: 600;
  box-shadow: var(--shadow-glow-xs);
}


/* ============================
   PROGRESS BAR
   ============================ */

.progress-wrap {
  width: 100%;
}
.progress-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--sp-2);
  font-size: var(--text-xs);
  color: var(--c-text-secondary);
}
.progress-track {
  width: 100%;
  height: 8px;
  background: rgba(255,255,255,0.08);
  border-radius: var(--r-full);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: var(--r-full);
  transition: width 1s ease;
  box-shadow: var(--shadow-glow-xs);
}
.progress-wrap.sm .progress-track { height: 5px; }
.progress-wrap.lg .progress-track { height: 12px; }


/* ============================
   ACCORDION / FAQ
   ============================ */

.accordion-item {
  border: 1px solid var(--c-border-subtle);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: var(--sp-2);
  transition: var(--t-base);
}
.accordion-item:hover {
  border-color: var(--c-border);
}
.accordion-item.open {
  border-color: var(--c-border);
}

.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  cursor: pointer;
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--c-text-primary);
  min-height: 54px;
  gap: var(--sp-3);
}
.accordion-header:hover {
  color: var(--c-primary);
}

.accordion-icon {
  color: var(--c-primary);
  font-size: var(--text-sm);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}
.accordion-item.open .accordion-icon {
  transform: rotate(180deg);
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.25s ease;
  padding: 0 var(--sp-5);
}
.accordion-body-inner {
  padding-bottom: var(--sp-5);
  font-size: var(--text-sm);
  color: var(--c-text-secondary);
  line-height: 1.7;
}
.accordion-item.open .accordion-body {
  max-height: 500px;
}


/* ============================
   MODAL
   ============================ */

.modal-wrapper {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  padding: var(--sp-4);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.modal-wrapper.active {
  pointer-events: all;
  opacity: 1;
}

.modal {
  background: var(--c-bg-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-2xl);
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-deep);
  /* animation triggered via JS each open — see wallet.js openModal() */
  transform: scale(0.92);
  opacity: 0;
  transition: transform 0.28s cubic-bezier(0.34, 1.2, 0.64, 1),
              opacity 0.22s ease;
  will-change: transform, opacity;
}
.modal-wrapper.active .modal {
  transform: scale(1);
  opacity: 1;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-5) var(--sp-6);
  border-bottom: 1px solid var(--c-border-subtle);
}
.modal-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--c-text-primary);
}
.modal-close {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-full);
  background: rgba(255,255,255,0.06);
  color: var(--c-text-secondary);
  cursor: pointer;
  transition: var(--t-fast);
  font-size: var(--text-md);
}
.modal-close:hover {
  background: rgba(255,255,255,0.12);
  color: var(--c-text-primary);
}

.modal-body {
  padding: var(--sp-6);
}

.modal-footer {
  padding: var(--sp-4) var(--sp-6) var(--sp-6);
  display: flex;
  gap: var(--sp-3);
}


/* ============================
   BOTTOM SHEET
   ============================ */

.bottom-sheet-wrapper {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: var(--z-bottom-sheet);
  pointer-events: none;
}

.bottom-sheet {
  background: var(--c-bg-surface);
  border: 1px solid var(--c-border);
  border-top-left-radius: var(--r-2xl);
  border-top-right-radius: var(--r-2xl);
  padding-bottom: calc(var(--sp-6) + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -8px 40px rgba(0,0,0,0.50), 0 -2px 12px rgba(255,107,43,0.08);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.34, 1.2, 0.64, 1);
  pointer-events: all;
  max-height: 90vh;
  overflow-y: auto;
}
.bottom-sheet-wrapper.active .bottom-sheet {
  transform: translateY(0);
}

.bottom-sheet-handle {
  display: flex;
  justify-content: center;
  padding: var(--sp-3) 0 var(--sp-2);
}
.bottom-sheet-handle::after {
  content: '';
  display: block;
  width: 40px;
  height: 4px;
  background: rgba(255,255,255,0.15);
  border-radius: var(--r-full);
}

.bottom-sheet-header {
  padding: var(--sp-2) var(--sp-5) var(--sp-4);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--c-text-primary);
  border-bottom: 1px solid var(--c-border-subtle);
}
.bottom-sheet-body {
  padding: var(--sp-5);
}


/* ============================
   ACTION BOTTOM SHEET (stake-sheet)
   共用於 buy.html / staking.html / flexible.html
   ============================ */

.stake-sheet-wrap {
  position: fixed;
  inset: 0;
  z-index: var(--z-bottom-sheet);
  pointer-events: none;
}
.stake-sheet-wrap.open {
  pointer-events: all;
}
.stake-sheet {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: var(--c-bg-surface);
  border-radius: var(--r-2xl) var(--r-2xl) 0 0;
  padding: var(--sp-3) var(--sp-5) calc(var(--sp-12) + env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform 0.38s cubic-bezier(0.32, 1, 0.58, 1);
  border-top: 1px solid var(--c-border);
  max-height: 85vh;
  overflow-y: auto;
}
.stake-sheet-wrap.open .stake-sheet {
  transform: translateY(0);
}
.stake-sheet-handle {
  width: 40px; height: 4px;
  background: var(--c-border);
  border-radius: 2px;
  margin: 0 auto var(--sp-5);
}
.stake-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-5);
}
.stake-sheet-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--c-text-primary);
}
.stake-sheet-close {
  width: 32px; height: 32px;
  background: var(--c-bg-card);
  border: 1px solid var(--c-border-subtle);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--c-text-secondary);
  font-size: 14px;
  transition: var(--t-fast);
}
.stake-sheet-close:hover { color: var(--c-text-primary); }

.stake-avail-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--c-bg-card);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-4);
  font-size: var(--text-sm);
}
.stake-avail-label { color: var(--c-text-muted); }
.stake-avail-val {
  font-weight: 700;
  color: var(--c-text-highlight);
  font-family: var(--font-data);
}

.stake-input-group {
  display: flex;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}
.stake-input-group .input-field { flex: 1; }

.stake-estimate-box {
  background: rgba(255,107,43,0.06);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  margin-bottom: var(--sp-4);
}
.stake-estimate-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
}
.stake-estimate-label {
  font-size: var(--text-sm);
  color: var(--c-text-muted);
}
.stake-estimate-val {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--c-text-primary);
  font-family: var(--font-data);
}
.stake-estimate-val.highlight {
  color: var(--c-text-highlight);
  font-size: var(--text-md);
}

.stake-bonus-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  background: rgba(16,185,129,0.12);
  border: 1px solid rgba(16,185,129,0.3);
  border-radius: var(--r-full);
  padding: 4px 12px;
  font-size: var(--text-xs);
  color: var(--c-success);
  font-weight: 600;
  margin-bottom: var(--sp-4);
}


/* ============================
   TOAST NOTIFICATIONS
   ============================ */

#toast-container {
  position: fixed;
  top: calc(var(--header-h) + 12px);
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: calc(100% - 32px);
  max-width: 380px;
}

@media (min-width: 768px) {
  #toast-container {
    left: auto;
    right: 20px;
    transform: none;
    top: calc(var(--header-h) + 16px);
  }
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  background: var(--c-bg-surface);
  border-radius: var(--r-md);
  border-left: 3px solid var(--c-primary);
  box-shadow: var(--shadow-deep);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--c-text-primary);
  pointer-events: all;
  animation: slideInTop 0.3s ease forwards;
}

.toast.success { border-left-color: var(--c-success); }
.toast.error   { border-left-color: var(--c-danger); }
.toast.warning { border-left-color: var(--c-warning); }
.toast.info    { border-left-color: var(--c-info); }

.toast-icon { font-size: var(--text-md); flex-shrink: 0; }
.toast.success .toast-icon { color: var(--c-success); }
.toast.error   .toast-icon { color: var(--c-danger); }
.toast.warning .toast-icon { color: var(--c-warning); }
.toast.info    .toast-icon { color: var(--c-info); }
.toast         .toast-icon { color: var(--c-primary); }

.toast.hiding {
  animation: fadeIn 0.25s ease reverse forwards;
}


/* ============================
   LIST ITEMS (Orders, Records)
   ============================ */

.list-item {
  background: var(--c-bg-card);
  border: 1px solid var(--c-border-subtle);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  margin-bottom: var(--sp-3);
  transition: var(--t-base);
}
.list-item:hover {
  border-color: var(--c-border);
}
.list-item:last-child {
  margin-bottom: 0;
}

.list-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-3);
}

.list-item-id {
  font-family: var(--font-data);
  font-size: var(--text-xs);
  color: var(--c-text-muted);
  font-weight: 600;
}

.list-item-meta {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.list-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-sm);
}

.list-item-label {
  color: var(--c-text-muted);
}

.list-item-value {
  color: var(--c-text-primary);
  font-weight: 500;
}

.list-item-actions {
  display: flex;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}


/* ============================
   COPY BUTTON
   ============================ */

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--c-text-muted);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--c-border-subtle);
  border-radius: var(--r-sm);
  padding: 5px 10px;
  cursor: pointer;
  transition: var(--t-fast);
  white-space: nowrap;
}
.copy-btn:hover {
  color: var(--c-primary);
  border-color: var(--c-border);
  background: rgba(255,107,43,0.08);
}
.copy-btn.copied {
  color: var(--c-success);
  border-color: rgba(16,185,129,0.30);
}


/* ============================
   ALERT BAR
   ============================ */

.alert-bar {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  font-size: var(--text-sm);
  border: 1px solid;
  margin-bottom: var(--sp-4);
}
.alert-bar i { flex-shrink: 0; font-size: var(--text-md); }

.alert-bar.orange {
  background: rgba(255,107,43,0.10);
  border-color: rgba(255,107,43,0.30);
  color: var(--c-primary-light);
}
.alert-bar.warning {
  background: var(--c-warning-bg);
  border-color: rgba(245,158,11,0.30);
  color: var(--c-warning);
}
.alert-bar.success {
  background: var(--c-success-bg);
  border-color: rgba(16,185,129,0.30);
  color: var(--c-success);
}
.alert-bar.danger {
  background: var(--c-danger-bg);
  border-color: rgba(239,68,68,0.30);
  color: var(--c-danger);
}


/* ============================
   EMPTY STATE
   ============================ */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--sp-12) var(--sp-6);
  gap: var(--sp-3);
}
.empty-state .empty-icon {
  font-size: 40px;
  color: var(--c-text-muted);
  opacity: 0.5;
}
.empty-state .empty-title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--c-text-secondary);
}
.empty-state .empty-desc {
  font-size: var(--text-sm);
  color: var(--c-text-muted);
  max-width: 240px;
  line-height: 1.6;
}


/* ============================
   COUNTDOWN TIMER
   ============================ */

.countdown {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-data);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--c-warning);
  font-variant-numeric: tabular-nums;
}
.countdown.urgent {
  color: var(--c-danger);
  animation: pulseGlow 1s ease-in-out infinite;
}


/* ============================
   STEP FLOW
   ============================ */

.step-flow {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
}

.step-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,107,43,0.15);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-full);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--c-primary);
}

.step-content .step-title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--c-text-primary);
  margin-bottom: 2px;
}
.step-content .step-desc {
  font-size: var(--text-sm);
  color: var(--c-text-secondary);
}

@media (min-width: 768px) {
  .step-flow {
    flex-direction: row;
    align-items: flex-start;
  }
  .step-item {
    flex: 1;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
  }
  .step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 17px;
    left: calc(50% + 24px);
    right: calc(-50% + 24px);
    height: 1.5px;
    background: var(--c-border);
    background-image: linear-gradient(90deg, var(--c-primary) 0%, var(--c-border) 100%);
  }
}


/* ============================
   QUICK GRID (Dashboard shortcuts)
   ============================ */

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-3);
}

.quick-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-3);
  background: var(--c-bg-card);
  border: 1px solid var(--c-border-subtle);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: var(--t-base);
  min-height: 68px;
  text-decoration: none;
}
.quick-item:hover {
  border-color: var(--c-border);
  background: rgba(255,107,43,0.06);
  transform: translateY(-2px);
}
.quick-item .qi-icon {
  font-size: var(--text-xl);
  color: var(--c-primary);
}
.quick-item .qi-label {
  font-size: var(--text-xs);
  color: var(--c-text-secondary);
  font-weight: 500;
  text-align: center;
}


/* ============================
   PAGE TITLE BANNER
   ============================ */

.page-banner {
  background: linear-gradient(135deg, rgba(255,107,43,0.12) 0%, rgba(255,184,0,0.06) 100%);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
  margin-bottom: var(--sp-6);
  position: relative;
  overflow: hidden;
}
.page-banner::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(255,107,43,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.page-banner .banner-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c-primary);
  font-weight: 700;
  margin-bottom: var(--sp-2);
}
.page-banner .banner-title {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--c-text-primary);
  margin-bottom: var(--sp-2);
  letter-spacing: -0.02em;
}
.page-banner .banner-sub {
  font-size: var(--text-sm);
  color: var(--c-text-secondary);
}
.page-banner .banner-stat {
  font-family: var(--font-data);
  font-size: var(--text-4xl);
  font-weight: 800;
  color: var(--c-text-highlight);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}


/* ============================
   INFO ROW (label : value pairs)
   ============================ */

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--c-border-subtle);
  font-size: var(--text-sm);
}
.info-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.info-row .ir-label {
  color: var(--c-text-muted);
}
.info-row .ir-value {
  color: var(--c-text-primary);
  font-weight: 500;
  text-align: right;
}
.info-row .ir-value.highlight {
  color: var(--c-text-highlight);
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
}
