/* ── HERO ── */
.hero {
  text-align: center;
  padding: 5.5rem 5% 4.5rem;
  max-width: 820px;
  margin: 0 auto;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #FFF;
  border: var(--border-thin);
  box-shadow: var(--shadow-sm);
  border-radius: 50px;
  padding: 0.35rem 1rem;
  font-size: 0.8rem;
  color: #000;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin-bottom: 1.8rem;
  animation: fadeUp 0.6s ease both;
}

.badge .dot {
  width: 6px;
  height: 6px;
  background: var(--yellow);
  border-radius: 50%;
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(0.75);
  }
}

.hero h1 {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 1.2rem;
  color: var(--orange);
  text-shadow: 3px 3px 0 #000;
  animation: fadeUp 0.6s 0.1s ease both;
}

.hero h1 .yellow {
  color: var(--orange);
}

.hero .sub {
  font-size: 1.1rem;
  color: #000;
  line-height: 1.75;
  max-width: 560px;
  margin: 0 auto 2.2rem;
  font-weight: 600;
  animation: fadeUp 0.6s 0.2s ease both;
}

/* ── CONVERTER BOX ── */
.converter-box {
  background: var(--surface);
  border: var(--border-thick);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius);
  padding: 1.8rem 2rem 2rem;
  max-width: 580px;
  margin: 0 auto 2.5rem;
  animation: fadeUp 0.6s 0.3s ease both;
  text-align: left;
}

.converter-box label {
  display: block;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #000;
  margin-bottom: 0.6rem;
}

.input-row {
  display: flex;
  gap: 0.6rem;
}

.input-container {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 0;
}

.link-input {
  width: 100%;
  background: #fff;
  border: var(--border-thin);
  border-radius: var(--radius-sm);
  padding: 0.8rem 4.6rem 0.8rem 1.1rem;
  color: #000;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  outline: none;
  transition: box-shadow 0.15s, transform 0.15s;
  min-width: 0;
}

.btn-paste {
  position: absolute;
  right: 8px;
  background: #fff;
  color: #000;
  border: var(--border-thin);
  box-shadow: 2px 2px 0 #000;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.1s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  z-index: 5;
}

.btn-paste:hover {
  background: var(--yellow);
  color: #000;
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 #000;
}

.btn-paste:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 #000;
}

.link-input::placeholder {
  color: rgba(60, 20, 10, 0.38);
}

.link-input:focus {
  box-shadow: var(--shadow-sm);
  transform: translate(-2px, -2px);
}

.link-input.error {
  border-color: #e53e3e;
  box-shadow: 4px 4px 0px rgba(229, 62, 62, 0.5);
}

.btn-convert {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--yellow);
  color: #000;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 800;
  border: var(--border-thin);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  flex-shrink: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.btn-convert:hover:not(:disabled) {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-lg);
  background: #FFE840;
}

.btn-convert:active:not(:disabled) {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 #000;
}

.btn-convert:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: var(--shadow-md);
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  background: #FFF;
  border: var(--border-thick);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius);
  padding: 0.85rem;
  margin-top: 1rem;
}

.auth-copy {
  min-width: 0;
}

.auth-title {
  color: #000;
  font-size: 0.88rem;
  font-weight: 800;
  margin-bottom: 0.18rem;
}

.auth-status {
  color: #444;
  font-size: 0.78rem;
  line-height: 1.35;
  word-break: break-word;
}

.auth-bonus-badge {
  display: inline-block;
  margin-top: 0.45rem;
  background: var(--yellow);
  border: var(--border-thin);
  box-shadow: var(--shadow-sm);
  border-radius: 20px;
  padding: 0.2rem 0.65rem;
  font-size: 0.73rem;
  color: #000;
  font-weight: 800;
  letter-spacing: 0.01em;
  animation: none;
}

.auth-bonus-badge strong {
  color: #000;
}

@keyframes bonusPulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(245, 166, 35, 0);
  }

  50% {
    box-shadow: 0 0 0 4px rgba(245, 166, 35, 0.18);
  }
}


.auth-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.btn-auth {
  border: var(--border-thin);
  background: #fff;
  color: #000;
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0.62rem 0.85rem;
  transition: all 0.1s;
  white-space: nowrap;
}

.btn-auth.secondary {
  background: #e2e8f0;
  color: #000;
}

.btn-auth:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 #000;
}

.btn-auth:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 #000;
}

/* Spinner */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(26, 10, 5, 0.3);
  border-top-color: #1A0A05;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── RESULT BOX ── */
.result-box {
  display: none;
  margin-top: 1rem;
  background: #fff;
  border: var(--border-thick);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
  color: #000;
  text-align: left;
}

.result-box.show {
  display: block;
  animation: fadeUp 0.35s ease both;
}

.result-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-open-shopee {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: #ee4d2d;
  color: #fff;
  text-decoration: none;
  padding: 1rem 1.5rem;
  border: var(--border-thick);
  border-radius: var(--radius);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 1.05rem;
  font-weight: 900;
  transition: all 0.15s;
  box-shadow: var(--shadow-md);
  letter-spacing: 0.01em;
  margin-bottom: 0.85rem;
}

.btn-open-shopee:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-lg);
  background: #f05d40;
}

.btn-open-shopee:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 #000;
}

.shopping-notes {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e2e8f0;
}

.notes-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: #334155;
  margin-bottom: 0.5rem;
}

.notes-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.notes-list li {
  font-size: 0.78rem;
  color: #475569;
  line-height: 1.4;
  position: relative;
  padding-left: 14px;
}

.notes-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--orange);
  font-weight: bold;
}

.result-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 1.25rem;
  margin-bottom: 0.7rem;
}

.result-divider::before,
.result-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(0, 0, 0, 0.1);
}

.result-divider span {
  font-size: 0.72rem;
  color: #999;
  white-space: nowrap;
}

.result-link-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.result-link {
  flex: 1;
  font-size: 0.75rem;
  color: #000;
  word-break: break-all;
  line-height: 1.4;
  font-family: monospace;
  background: #fff;
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-sm);
  border: var(--border-thin);
  min-width: 0;
  font-weight: 600;
}

.btn-copy {
  background: #fff;
  color: #000;
  border: var(--border-thin);
  box-shadow: 2px 2px 0 #000;
  padding: 0.6rem 1.5rem;
  min-width: 160px;
  text-align: center;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.1s;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  flex-shrink: 0;
}

.btn-copy:hover {
  background: var(--yellow);
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 #000;
}

.btn-copy:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 #000;
}

.btn-copy.copied {
  background: #86efac;
  color: #000;
}

.result-note {
  font-size: 0.78rem;
  color: #888;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #F0F0F0;
  line-height: 1.5;
}

.history-panel {
  display: block;
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.7rem;
}

.history-title {
  color: #000;
  font-size: 0.9rem;
  font-weight: 900;
}

.history-refresh {
  border: var(--border-thin);
  background: #fff;
  box-shadow: 2px 2px 0 #000;
  color: #000;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 0.4rem 0.65rem;
  transition: all 0.15s;
}

.history-refresh:hover {
  background: var(--yellow);
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 #000;
}

.history-refresh:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 #000;
}

.history-list {
  display: grid;
  gap: 0.7rem;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 4px;
}

.history-list::-webkit-scrollbar {
  width: 6px;
}

.history-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.history-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.history-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.history-empty {
  color: #444;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.45;
}

.history-item {
  background: #fff;
  border: var(--border-thin);
  border-radius: var(--radius-sm);
  color: #000;
  padding: 0.85rem;
  box-shadow: 2px 2px 0 #000;
}

.history-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  color: #777;
  font-size: 0.72rem;
  margin-bottom: 0.4rem;
}

.history-subid {
  color: var(--orange);
  font-family: monospace;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.history-link {
  display: block;
  color: #444;
  font-family: monospace;
  font-size: 0.72rem;
  line-height: 1.35;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.history-product {
  display: flex;
  gap: 0.75rem;
}

.history-product-img {
  border-radius: var(--radius-sm);
  border: var(--border-thin);
  flex: 0 0 54px;
  height: 54px;
  object-fit: cover;
  width: 54px;
}

.history-product-img-fallback {
  align-items: center;
  background: #ffe8dc;
  color: var(--orange);
  display: flex;
  font-size: 0.78rem;
  font-weight: 800;
  justify-content: center;
}

.history-product-main {
  flex: 1;
  min-width: 0;
}

.history-product-top {
  align-items: flex-start;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
}

.history-product-name {
  color: #334155;
  display: -webkit-box;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.35;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.history-short-url {
  color: #94a3b8;
  font-family: monospace;
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 0.5rem;
}

.history-action {
  border: var(--border-thin);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1;
  min-height: 34px;
  padding: 0.55rem 0.75rem;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 2px 2px 0 #000;
  transition: all 0.1s;
}

.history-action:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 #000;
}

.history-action:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 #000;
}

.history-copy {
  background: var(--yellow);
  color: #000;
}

.history-copy.copied {
  background: #16a34a;
}

.history-buy {
  background: #2563eb;
  color: #fff;
}

.history-commission {
  align-items: center;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.75rem;
  padding-top: 0.65rem;
}

.history-commission-text {
  color: #ea580c;
  font-size: 0.88rem;
  font-weight: 800;
}

.history-rate {
  background: #dcfce7;
  border-radius: 7px;
  color: #15803d;
  font-size: 0.84rem;
  font-weight: 900;
  padding: 0.25rem 0.5rem;
}

.history-orders-empty {
  border-top: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 0.7rem;
  padding-top: 0.65rem;
}

.history-orders {
  border-top: 1px solid #e2e8f0;
  display: grid;
  gap: 0.55rem;
  margin-top: 0.7rem;
  padding-top: 0.65rem;
}

.history-order {
  background: #fff;
  border: var(--border-thin);
  border-radius: var(--radius-sm);
  padding: 0.65rem;
}

.history-order-head {
  align-items: center;
  display: flex;
  gap: 0.5rem;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.history-order-id {
  color: #334155;
  font-family: monospace;
  font-size: 0.76rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.history-order-status {
  border-radius: 999px;
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 900;
  padding: 0.2rem 0.45rem;
}

.history-order-status.is-pending {
  background: #fef3c7;
  color: #92400e;
}

.history-order-status.is-approved {
  background: #dbeafe;
  color: #1d4ed8;
}

.history-order-status.is-paid {
  background: #dcfce7;
  color: #15803d;
}

.history-order-status.is-rejected {
  background: #fee2e2;
  color: #b91c1c;
}

.history-order-name {
  color: #475569;
  display: -webkit-box;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.history-order-grid {
  color: #64748b;
  display: grid;
  font-size: 0.72rem;
  gap: 0.25rem 0.65rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  line-height: 1.35;
  margin-top: 0.45rem;
}

.config-warning {
  display: none;
  background: var(--yellow);
  border: var(--border-thin);
  box-shadow: 3px 3px 0 #000;
  border-radius: var(--radius-sm);
  color: #000;
  font-weight: 800;
  font-size: 0.78rem;
  line-height: 1.45;
  margin-bottom: 0.85rem;
  padding: 0.7rem 0.8rem;
}

.config-warning.show {
  display: block;
}

.error-msg {
  display: none;
  color: #fff;
  font-weight: 800;
  font-size: 0.82rem;
  margin-top: 0.6rem;
  padding: 0.5rem 0.75rem;
  background: var(--orange);
  border-radius: var(--radius-sm);
  border: var(--border-thin);
  box-shadow: 3px 3px 0 #000;
}

.error-msg.show {
  display: block;
  animation: fadeUp 0.3s ease both;
}

/* ── STAT ROW ── */
.hero-stat-row {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin-top: 1rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  animation: fadeUp 0.6s 0.45s ease both;
  flex-wrap: wrap;
}

.hero-stat strong {
  display: block;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--yellow);
}

.hero-stat span {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 300;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── CONVERTER TABS ── */
.converter-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: var(--border-thick);
  padding-bottom: 0.75rem;
}

.tab-btn {
  background: #fff;
  border: var(--border-thin);
  box-shadow: 2px 2px 0 #000;
  color: #000;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.tab-btn:hover {
  background: var(--yellow);
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 #000;
}

.tab-btn.active {
  color: #000;
  background: var(--yellow);
  box-shadow: 4px 4px 0 #000;
  transform: translate(-2px, -2px);
}

/* Tab contents */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}