/* ============================================================
   Insight9 Shop — Clean Commercial Design System
   Inspired by Vercel / Stripe / Apple. Light, minimal, high-conversion.
   ============================================================ */

:root {
  /* === COLOR SYSTEM (3-5 colors) === */
  --bg: #ffffff;
  --bg-subtle: #f6f7f9;
  --surface: #ffffff;
  --border: #e6e8eb;
  --border-strong: #d4d8dd;

  --text: #0a0a0a;
  --text-muted: #5b6573;
  --text-soft: #8a93a0;

  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-soft: #eff4ff;

  --success: #16a34a;
  --success-soft: #ecfdf3;
  --warning: #b45309;
  --warning-soft: #fff7ed;
  --danger: #dc2626;

  /* === RADIUS === */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  /* === SHADOWS === */
  --shadow-sm: 0 1px 2px rgba(10, 10, 10, 0.04), 0 1px 3px rgba(10, 10, 10, 0.06);
  --shadow-md: 0 4px 16px rgba(10, 10, 10, 0.06);
  --shadow-lg: 0 18px 48px rgba(10, 10, 10, 0.10);

  /* === FONTS === */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Menlo, Consolas, monospace;

  /* === TRANSITIONS === */
  --t-fast: 140ms ease;
  --t-norm: 220ms cubic-bezier(0.4, 0, 0.2, 1);

  /* === LAYOUT === */
  --nav-height: 64px;
  --max-width: 1120px;
}

* , *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: var(--radius-full); border: 3px solid var(--bg); }

a { color: var(--brand); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--brand-dark); }

img { max-width: 100%; display: block; }
.hidden { display: none !important; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4 { color: var(--text); letter-spacing: -0.02em; line-height: 1.15; font-weight: 700; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }

.text-muted { color: var(--text-muted); }
.text-soft { color: var(--text-soft); }
.text-mono { font-family: var(--font-mono); }
.text-center { text-align: center; }
.text-balance { text-wrap: balance; }
.text-pretty { text-wrap: pretty; }

.lead { font-size: 1.15rem; color: var(--text-muted); line-height: 1.6; }

/* ============================================================
   LAYOUT PRIMITIVES
   ============================================================ */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; }
.section-sm { padding: 56px 0; }
.section-head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.section-head .lead { margin-top: 16px; }

.kicker {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 14px;
}

.divider { height: 1px; background: var(--border); border: 0; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast);
  white-space: nowrap;
  line-height: 1;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-dark); color: #fff; box-shadow: var(--shadow-md); }

.btn-dark { background: var(--text); color: #fff; }
.btn-dark:hover { background: #2a2a2a; color: #fff; }

.btn-outline { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-outline:hover { border-color: var(--text); background: var(--bg-subtle); color: var(--text); }

.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { color: var(--text); background: var(--bg-subtle); }

.btn-lg { padding: 14px 28px; font-size: 1.02rem; }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text-muted);
}
.badge-brand { background: var(--brand-soft); color: var(--brand-dark); border-color: transparent; }
.badge-success { background: var(--success-soft); color: var(--success); border-color: transparent; }
.badge-warning { background: var(--warning-soft); color: var(--warning); border-color: transparent; }
.badge-dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color var(--t-norm), box-shadow var(--t-norm), transform var(--t-norm);
}
.card-hover:hover { border-color: var(--border-strong); box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.card-flat { border-radius: var(--radius-md); padding: 22px; }

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  display: flex;
  align-items: center;
}
.nav-inner { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 24px; }

.nav-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; color: var(--text); }
.nav-logo-mark {
  width: 30px; height: 30px;
  background: var(--surface);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nav-menu { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav-link {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--t-fast);
}
.nav-link:hover { color: var(--text); background: var(--bg-subtle); }
.nav-link.active { color: var(--text); }

.nav-right { display: flex; align-items: center; gap: 10px; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; color: var(--text); }

/* ============================================================
   HERO
   ============================================================ */
.hero { padding: 96px 0 72px; text-align: center; position: relative; }
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(37, 99, 235, 0.06), transparent 70%);
}
.hero h1 { max-width: 880px; margin: 0 auto; }
.hero .lead { max-width: 620px; margin: 22px auto 0; font-size: 1.2rem; }
.hero-actions { margin-top: 36px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-meta { margin-top: 24px; display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; color: var(--text-soft); font-size: 0.88rem; }
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }

/* ============================================================
   TRUST STRIP
   ============================================================ */
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.trust-item {
  display: flex; flex-direction: column; gap: 8px;
  padding: 24px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.trust-item .ic { color: var(--brand); }
.trust-item strong { font-size: 1rem; }
.trust-item span { font-size: 0.86rem; color: var(--text-muted); }

/* ============================================================
   PRODUCT GRID
   ============================================================ */
.product-tabs { display: flex; gap: 8px; justify-content: center; margin-bottom: 36px; flex-wrap: wrap; }
.product-tab {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.88rem; font-weight: 600;
  cursor: pointer; transition: all var(--t-fast);
}
.product-tab:hover { color: var(--text); }
.product-tab.active { background: var(--text); color: #fff; border-color: var(--text); }

.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.product-card { display: flex; flex-direction: column; position: relative; }
.product-card .pc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.product-card .pc-name { font-size: 1.15rem; font-weight: 700; }
.product-card .pc-desc { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 20px; }
.product-card .pc-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.product-card .pc-meta span {
  padding: 5px 9px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
}
.product-card .pc-features { list-style: none; display: grid; gap: 8px; margin-bottom: 14px; }
.product-card .pc-features li {
  position: relative;
  padding-left: 16px;
  color: var(--text-muted);
  font-size: 0.86rem;
}
.product-card .pc-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--brand);
}
.product-card .pc-notice {
  margin-bottom: 18px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--warning-soft);
  color: var(--warning);
  font-size: 0.82rem;
  line-height: 1.6;
}
.product-card .pc-price { display: flex; align-items: baseline; gap: 8px; margin-top: auto; margin-bottom: 18px; }
.product-card .pc-price .now { font-size: 1.8rem; font-weight: 800; letter-spacing: -0.03em; }
.product-card .pc-price .was { font-size: 0.95rem; color: var(--text-soft); text-decoration: line-through; }
.product-card .pc-stock { font-size: 0.8rem; color: var(--text-soft); margin-bottom: 14px; display: flex; align-items: center; gap: 6px; }
.product-detail-actions {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ============================================================
   STEPS / TUTORIAL
   ============================================================ */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.step {
  position: relative;
  padding: 26px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.step .num {
  width: 34px; height: 34px; border-radius: var(--radius-full);
  background: var(--brand-soft); color: var(--brand-dark);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.95rem; margin-bottom: 14px;
}
.step h4 { margin-bottom: 6px; }
.step p { font-size: 0.86rem; color: var(--text-muted); }
.tutorial-guide { display: grid; gap: 32px; margin-top: 34px; }
.tutorial-section {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.tutorial-section-head { max-width: 720px; margin-bottom: 20px; }
.tutorial-section-head h3 { margin: 12px 0 8px; }
.tutorial-section-head p { color: var(--text-muted); font-size: 0.92rem; }
.tutorial-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.tutorial-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
}
.tutorial-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  background: #fff;
}
.tutorial-card figcaption {
  padding: 10px 12px;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
}

/* ============================================================
   DOCUMENT / TUTORIAL PAGES
   ============================================================ */
.doc-page {
  background: #fff;
  padding: 56px 0 88px;
}
.doc-container {
  width: min(100% - 48px, 900px);
  margin: 0 auto;
}
.doc-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 0.9rem;
}
.doc-breadcrumb a { color: var(--text-muted); font-weight: 700; }
.doc-breadcrumb a:hover { color: var(--text); }
.doc-hero {
  padding: 42px 0 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}
.doc-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: 0;
  margin-bottom: 14px;
}
.doc-hero p {
  color: var(--text-muted);
  font-size: 1.12rem;
  line-height: 1.75;
  max-width: 760px;
}
.doc-entry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.doc-entry-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  cursor: pointer;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}
.doc-entry-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.doc-entry-card h3 { margin: 14px 0 8px; }
.doc-entry-card p {
  min-height: 72px;
  color: var(--text-muted);
  font-size: 0.96rem;
  line-height: 1.65;
  margin-bottom: 18px;
}
.doc-note {
  margin-top: 28px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 0.95rem;
}
.doc-back { margin: 24px 0 0; }
.doc-article {
  font-size: 1.02rem;
  line-height: 1.8;
}
.doc-section {
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}
.doc-section h2 {
  font-size: 1.35rem;
  letter-spacing: 0;
  margin-bottom: 10px;
}
.doc-section p {
  color: var(--text-muted);
  font-size: 1.02rem;
  line-height: 1.85;
}
.doc-image-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 18px;
}
.doc-image {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
}
.doc-image img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  background: #fff;
}
.doc-image figcaption {
  padding: 10px 12px;
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 700;
}

/* ============================================================
   FAQ (accordion)
   ============================================================ */
.faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); overflow: hidden; }
.faq-q {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  padding: 20px 22px; font-size: 1.02rem; font-weight: 600; color: var(--text);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-family: inherit;
}
.faq-q .chev { transition: transform var(--t-norm); color: var(--text-soft); flex-shrink: 0; }
.faq-item.open .faq-q .chev { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height var(--t-norm); }
.faq-item.open .faq-a { max-height: 320px; }
.faq-a .inner { padding: 0 22px 20px; color: var(--text-muted); line-height: 1.65; }

/* ============================================================
   FEATURE / AFTER-SALES GRID
   ============================================================ */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature-card { padding: 24px; }
.feature-card .ic {
  width: 42px; height: 42px; border-radius: var(--radius-md);
  background: var(--brand-soft); color: var(--brand);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.feature-card h4 { margin-bottom: 6px; }
.feature-card p { font-size: 0.88rem; color: var(--text-muted); }

/* ============================================================
   CTA BANNER
   ============================================================ */
.cta {
  background: var(--text); color: #fff;
  border-radius: var(--radius-lg);
  padding: 56px 40px; text-align: center;
}
.cta h2 { color: #fff; }
.cta p { color: rgba(255, 255, 255, 0.7); margin-top: 12px; max-width: 480px; margin-left: auto; margin-right: auto; }
.cta .btn { margin-top: 28px; }

/* ============================================================
   FORMS
   ============================================================ */
.form-wrap { max-width: 520px; margin: 0 auto; }
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 7px; color: var(--text); }
.form-label .req { color: var(--danger); margin-left: 2px; }
.form-label .opt { color: var(--text-soft); font-weight: 400; margin-left: 6px; font-size: 0.82rem; }
.form-hint { margin-top: 7px; font-size: 0.82rem; color: var(--text-soft); }

.input, .textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  outline: none;
}
.input::placeholder, .textarea::placeholder { color: var(--text-soft); }
.input:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.textarea { min-height: 96px; resize: vertical; }

/* ============================================================
   ORDER SUMMARY / RESULT
   ============================================================ */
.summary-box { background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px 22px; }
.summary-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; font-size: 0.92rem; }
.summary-row + .summary-row { border-top: 1px solid var(--border); }
.summary-row .k { color: var(--text-muted); }
.summary-row .v { font-weight: 600; }
.summary-total { font-size: 1.05rem; }
.summary-total .v { font-size: 1.3rem; font-weight: 800; }

.result-card { max-width: 600px; margin: 0 auto; }
.key-box {
  font-family: var(--font-mono);
  background: var(--text); color: #fff;
  border-radius: var(--radius-sm);
  padding: 14px 16px; font-size: 0.95rem;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  word-break: break-all;
}

/* ============================================================
   NOTICE BOXES
   ============================================================ */
.notice {
  padding: 14px 16px; border-radius: var(--radius-sm); font-size: 0.88rem; line-height: 1.6;
  border: 1px solid var(--border);
}
.notice-info { background: var(--brand-soft); border-color: transparent; color: var(--brand-dark); }
.notice-warning { background: var(--warning-soft); border-color: transparent; color: var(--warning); }
.notice-success { background: var(--success-soft); border-color: transparent; color: var(--success); }

/* ============================================================
   PAGE HEADER (sub pages)
   ============================================================ */
.page-header { padding: 64px 0 40px; text-align: center; border-bottom: 1px solid var(--border); margin-bottom: 56px; }
.page-header .lead { margin-top: 14px; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--bg-subtle); border-top: 1px solid var(--border); padding: 64px 0 32px; margin-top: 96px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer-col h4 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-soft); margin-bottom: 16px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul a { color: var(--text-muted); font-size: 0.92rem; }
.footer-col ul a:hover { color: var(--text); }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-brand .nav-logo-mark { width: 32px; height: 32px; }
.footer-brand b { font-size: 1.05rem; }
.footer-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--text-soft); font-size: 0.85rem; }

/* ============================================================
   TOAST
   ============================================================ */
.toast-container { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  padding: 11px 18px; border-radius: var(--radius-full); font-size: 0.88rem; font-weight: 600;
  background: var(--text); color: #fff; box-shadow: var(--shadow-lg);
  animation: toastIn 0.25s ease, toastOut 0.3s ease 2.4s forwards;
}
.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-12px); } }

.confirm-trust-grid { grid-template-columns: repeat(3, 1fr); margin-bottom: 28px; }

.user-menu { position: relative; }
.user-avatar-btn {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: var(--radius-full);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.user-avatar-btn:hover { filter: brightness(0.95); }
.user-dropdown {
  position: absolute; right: 0; top: calc(100% + 10px); width: 220px; padding: 8px;
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow-lg); display: none; z-index: 20;
}
.user-menu:hover .user-dropdown, .user-menu:focus-within .user-dropdown { display: block; }
.user-dropdown-email {
  padding: 10px 12px 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.user-dropdown a { display: block; padding: 10px 12px; border-radius: var(--radius-sm); color: var(--text-muted); font-size: 0.9rem; }
.user-dropdown a:hover { background: var(--bg-subtle); color: var(--text); }

.auth-section { min-height: calc(100vh - var(--nav-height)); display: flex; align-items: center; padding: 44px 0; }
.auth-single-card { max-width: 460px; margin: 0 auto; }
.auth-card-head { text-align: center; margin-bottom: 22px; }
.auth-card-head h1 { font-size: 1.8rem; margin: 8px 0; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; margin-bottom: 22px; border-radius: var(--radius-full); background: var(--bg-subtle); }
.auth-tab { border: 0; border-radius: var(--radius-full); padding: 10px 12px; color: var(--text-muted); background: transparent; font-weight: 700; cursor: pointer; }
.auth-tab.active { color: #fff; background: var(--text); box-shadow: var(--shadow-sm); }
.auth-panel.hidden { display: none; }
.auth-switch-line { margin-top: 14px; text-align: center; color: var(--text-muted); font-size: 0.9rem; }
.auth-switch-line a { font-weight: 700; }
.auth-note { margin-top: 20px; }
.recharge-entry-card { max-width: 620px; margin: 0 auto; text-align: center; }
.recharge-entry-card h3 { font-size: 1.35rem; margin-bottom: 8px; }
.auth-card, .user-panel { height: 100%; }
.user-hero-card { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.user-hero-card h3 { font-size: 1.3rem; margin: 8px 0; word-break: break-word; }
.user-quick-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.balance-pill { display: inline-flex; margin-top: 14px; padding: 10px 14px; border-radius: var(--radius-full); background: var(--brand-soft); color: var(--brand-dark); font-weight: 800; }
.compact-head { text-align: left; margin-bottom: 20px; }
.compact-head h2 { font-size: 1.5rem; }
.security-form-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.order-list { display: grid; gap: 12px; }
.order-row {
  display: flex; justify-content: space-between; align-items: center; gap: 18px;
  padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--bg-subtle);
}
.order-row p { margin-top: 4px; font-size: 0.86rem; }
.order-row-rich { align-items: flex-start; }
.order-main { min-width: 180px; }
.order-detail-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(90px, 1fr));
  gap: 10px;
  font-size: 0.86rem;
  color: var(--text-muted);
}
.order-detail-grid span { display: grid; gap: 2px; }
.order-detail-grid b { color: var(--text); font-size: 0.78rem; }
.order-meta { display: flex; align-items: center; gap: 10px; font-weight: 700; white-space: nowrap; }
.empty-inline { text-align: center; padding: 28px; border: 1px dashed var(--border); border-radius: var(--radius-md); background: var(--bg-subtle); }
.modal-backdrop { position: fixed; inset: 0; z-index: 9998; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(15, 23, 42, 0.42); backdrop-filter: blur(8px); }
.modal-backdrop.hidden { display: none; }
.modal-card { position: relative; width: min(100%, 440px); padding: 28px; border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-lg); border: 1px solid var(--border); }
.modal-card-wide { width: min(100%, 560px); }
.modal-card h3 { font-size: 1.35rem; margin-bottom: 12px; }
.modal-close { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border: 1px solid var(--border); border-radius: var(--radius-full); background: var(--surface); color: var(--text-muted); cursor: pointer; font-size: 1.2rem; line-height: 1; }
.modal-close:hover { color: var(--text); background: var(--bg-subtle); }
.recharge-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  margin: 16px 0 20px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
}
.recharge-tab {
  border: 0;
  border-radius: var(--radius-full);
  padding: 10px 12px;
  background: transparent;
  color: var(--text-muted);
  font-weight: 800;
  cursor: pointer;
}
.recharge-tab.active { color: #fff; background: var(--text); box-shadow: var(--shadow-sm); }
.recharge-plan-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.recharge-plan {
  text-align: left;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  cursor: pointer;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}
.recharge-plan:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.recharge-plan.active { border-color: var(--brand); background: var(--brand-soft); }
.recharge-plan strong { display: block; font-size: 1.25rem; line-height: 1; margin-bottom: 8px; color: var(--text); }
.recharge-plan span, .recharge-plan em { display: block; font-size: 0.82rem; color: var(--text-muted); font-style: normal; }
.recharge-plan em { margin-top: 3px; color: var(--brand-dark); font-weight: 800; }
.recharge-footer-note {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .trust-grid, .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .tutorial-grid { grid-template-columns: repeat(2, 1fr); }
  .doc-entry-grid { grid-template-columns: 1fr; }
  .confirm-trust-grid { grid-template-columns: 1fr; }
  .user-hero-card { align-items: flex-start; flex-direction: column; }
  .user-quick-actions { justify-content: flex-start; }
  .security-form-row { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .section { padding: 56px 0; }
  .nav-menu { display: none; position: absolute; top: var(--nav-height); left: 0; right: 0; background: var(--surface); flex-direction: column; align-items: stretch; padding: 12px; gap: 2px; border-bottom: 1px solid var(--border); box-shadow: var(--shadow-md); }
  .nav-menu.open { display: flex; }
  .nav-link { padding: 12px; font-size: 0.95rem; }
  .nav-toggle { display: block; }
  .nav-menu { order: 3; }
  .trust-grid, .product-grid, .steps, .feature-grid, .footer-grid { grid-template-columns: 1fr; }
  .tutorial-grid { grid-template-columns: 1fr; }
  .doc-container { width: min(100% - 32px, 900px); }
  .doc-image-grid { grid-template-columns: 1fr; }
  .order-row, .order-meta { align-items: flex-start; flex-direction: column; }
  .order-detail-grid { grid-template-columns: 1fr 1fr; width: 100%; }
  .recharge-plan-grid { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 48px; }
}
