/* ============================================================
   QRTalkie — Design System
   Dark SaaS B2B theme with Inter + Noto Sans TC
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Noto+Sans+TC:wght@400;500;700;900&display=swap');

/* ── 1. Design Tokens ─────────────────────────────────────── */
:root {
  /* Brand colours */
  --primary:       #2563eb;
  --primary-light: #3b82f6;
  --primary-dark:  #1d4ed8;
  --primary-glow:  rgba(37, 99, 235, 0.32);

  /* Accent */
  --teal:          #06b6d4;
  --teal-light:    rgba(6, 182, 212, 0.15);
  --violet:        #7c3aed;
  --amber:         #f59e0b;
  --green:         #10b981;
  --green-light:   rgba(16, 185, 129, 0.15);
  --red:           #ef4444;

  /* Dark backgrounds */
  --navy-900:  #020b18;
  --navy-800:  #040f22;
  --navy-700:  #071428;
  --navy-600:  #0d1f3c;
  --navy-500:  #132540;

  /* Light surfaces */
  --surface:   #f0f5ff;
  --surface-2: #e8f0fe;
  --white:     #ffffff;

  /* Text */
  --ink:       #0f172a;
  --ink-2:     #1e293b;
  --muted:     #64748b;
  --muted-light: #94a3b8;

  /* Borders */
  --line:      #e2e8f0;
  --line-dark: rgba(255, 255, 255, 0.1);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.08);
  --shadow:    0 10px 40px rgba(2, 11, 24, 0.12);
  --shadow-lg: 0 24px 64px rgba(2, 11, 24, 0.18);
  --shadow-blue: 0 8px 24px rgba(37, 99, 235, 0.28);

  /* Shape */
  --radius:    10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Layout */
  --max: 1200px;
}

/* ── 2. Reset & Base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: 'Inter', 'Noto Sans TC', 'Microsoft JhengHei', 'PingFang TC', sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

button, input, textarea, select { font: inherit; }

h1, h2, h3, h4 { margin: 0; line-height: 1.18; letter-spacing: -0.01em; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

/* ── 3. Layout ────────────────────────────────────────────── */
.container {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
}
.narrow { max-width: 880px; }

/* ── 4. Header ────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  min-height: 74px;
  padding: 10px max(24px, calc((100vw - var(--max)) / 2));
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: background 200ms ease, box-shadow 200ms ease;
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 1px 0 var(--line), var(--shadow-sm);
}

.brand {
  display: flex;
  align-items: center;
  height: 52px;
  width: 180px;
  overflow: hidden;
  flex-shrink: 0;
}

.brand img {
  width: 200px;
  height: auto;
  object-fit: contain;
}

/* ── Navigation ── */
.site-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  font-size: 14.5px;
  font-weight: 600;
}

.site-nav a {
  position: relative;
  padding: 7px 12px;
  border-radius: 8px;
  color: var(--ink-2);
  transition: color 160ms ease, background 160ms ease;
}

.site-nav a:hover {
  color: var(--primary);
  background: rgba(37, 99, 235, 0.06);
}

.site-nav a.is-active {
  color: var(--primary);
  background: rgba(37, 99, 235, 0.09);
}

.site-nav a.demo-link {
  color: var(--teal);
}
.site-nav a.demo-link:hover {
  background: var(--teal-light);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.link-quiet {
  padding: 7px 12px;
  color: var(--ink-2);
  font-size: 14.5px;
  font-weight: 600;
  border-radius: 8px;
  transition: color 160ms, background 160ms;
  white-space: nowrap;
}
.link-quiet:hover {
  color: var(--primary);
  background: rgba(37, 99, 235, 0.06);
}

/* ── Mobile toggle ── */
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 200ms ease, opacity 200ms ease;
}

/* ── 5. Buttons ───────────────────────────────────────────── */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border: 1.5px solid transparent;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease,
              background 180ms ease, border-color 180ms ease, opacity 180ms;
}

.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }

.button-primary {
  color: #fff;
  background: var(--primary);
  box-shadow: var(--shadow-blue);
}
.button-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.38);
}

.button-light {
  color: var(--primary-dark);
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.button-light:hover {
  background: #fff;
}

.button-secondary {
  color: var(--primary);
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.2);
}
.button-secondary:hover {
  background: rgba(37, 99, 235, 0.14);
}

.button-outline {
  color: var(--ink-2);
  background: var(--white);
  border-color: var(--line);
}
.button-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.button-teal {
  color: #fff;
  background: var(--teal);
  box-shadow: 0 8px 20px rgba(6, 182, 212, 0.3);
}
.button-teal:hover {
  background: #0891b2;
}

/* ── 6. Hero Section ──────────────────────────────────────── */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 72svh;
  overflow: hidden;
  color: var(--white);
  background: var(--navy-800);
}

/* Animated grid background */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  animation: gridDrift 20s linear infinite;
}

@keyframes gridDrift {
  from { background-position: 0 0; }
  to   { background-position: 48px 48px; }
}

/* Gradient overlay */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 70% at 80% 40%, rgba(124, 58, 237, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 10% 80%, rgba(6, 182, 212, 0.1) 0%, transparent 55%),
    linear-gradient(160deg, rgba(37, 99, 235, 0.18) 0%, transparent 50%);
}

/* Colour accent bar at bottom */
.hero-color-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--teal), var(--violet));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  width: 100%;
  padding: 48px 0 56px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero .eyebrow {
  background: rgba(6, 182, 212, 0.18);
  color: var(--teal);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.section-kicker {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.hero h1 {
  max-width: 1100px;
  width: 100%;
  font-size: clamp(38px, 5.2vw, 66px);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: #fff;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, var(--primary-light), var(--teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-lede {
  max-width: 680px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(17px, 1.8vw, 21px);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

/* Hero badge strip */
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 36px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(8px);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
}

.hero-badge-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}
.hero-badge-icon.blue   { background: rgba(37,  99, 235, 0.35); color: #93c5fd; }
.hero-badge-icon.teal   { background: rgba(6,  182, 212, 0.35); color: #67e8f9; }
.hero-badge-icon.violet { background: rgba(124, 58, 237, 0.35); color: #c084fc; }
.hero-badge-icon.amber  { background: rgba(217,119,   6, 0.35); color: #fcd34d; }
.hero-badge-icon.green  { background: rgba(16, 185, 129, 0.35); color: #6ee7b7; }
.hero-badge-icon.rose   { background: rgba(225,  29,  72, 0.35); color: #fda4af; }

.hero-badge strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
}
.hero-badge span {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
}

/* ── 7. Sections ──────────────────────────────────────────── */
.section {
  padding: 96px 0;
}

.section-tight {
  padding: 56px 0;
}

.surface {
  background: var(--surface);
}

.surface-dark {
  background: var(--navy-600);
  color: var(--white);
}

/* Flow section — 掃碼到通話 */
.flow-section {
  padding: 80px 0;
  background: linear-gradient(180deg, var(--navy-800) 0%, var(--navy-700) 100%);
  color: var(--white);
}

.flow-heading {
  text-align: center;
  margin-bottom: 52px;
}

.flow-heading .section-kicker {
  background: rgba(6, 182, 212, 0.15);
  color: var(--teal);
  border-color: rgba(6, 182, 212, 0.25);
}

.flow-heading h2 {
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 800;
  color: #fff;
  margin-top: 8px;
}

.flow-steps {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 0;
  align-items: center;
  max-width: 860px;
  margin: 0 auto;
}

.flow-step {
  text-align: center;
  padding: 28px 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(4px);
  transition: background 200ms, border-color 200ms;
}

.flow-step:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(37, 99, 235, 0.4);
}

.flow-step-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin: 0 auto 14px;
}
.flow-step-icon.blue   { background: rgba(37, 99, 235, 0.25); }
.flow-step-icon.teal   { background: rgba(6, 182, 212, 0.25); }
.flow-step-icon.green  { background: rgba(16, 185, 129, 0.25); }

.flow-step h3 {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.flow-step p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

.flow-arrow {
  font-size: 22px;
  color: rgba(37, 99, 235, 0.6);
  text-align: center;
  padding: 0 8px;
}

/* ── 8. Section Headings ──────────────────────────────────── */
.section-heading {
  max-width: 800px;
  margin-bottom: 48px;
}

.section-heading.centered {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-heading.split {
  max-width: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.section-heading h2 {
  font-size: clamp(32px, 4.5vw, 54px);
  font-weight: 800;
  margin-top: 8px;
}

.section-heading p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 18px;
  max-width: 600px;
}

/* ── 9. Info Cards (Why QRTalkie) ────────────────────────── */
.card-grid { display: grid; gap: 20px; }
.card-grid.four  { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.info-card {
  position: relative;
  min-height: 230px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
  overflow: hidden;
}

.info-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
  opacity: 0;
  transition: opacity 200ms;
}

.info-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: rgba(37, 99, 235, 0.25);
}

.info-card:hover::after { opacity: 1; }

.info-card.accent-teal::after { background: var(--teal); }
.info-card.accent-green::after { background: var(--green); }
.info-card.accent-violet::after { background: var(--violet); }
.info-card.accent-amber::after { background: var(--amber); }

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 20px;
}
.card-icon.blue   { background: rgba(37, 99, 235, 0.1);  }
.card-icon.teal   { background: rgba(6, 182, 212, 0.12); }
.card-icon.green  { background: rgba(16, 185, 129, 0.12);}
.card-icon.violet { background: rgba(124, 58, 237, 0.1); }
.card-icon.amber  { background: rgba(245, 158, 11, 0.12);}

.info-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

.info-card p { color: var(--muted); margin: 0; }

/* ── 10. Scenario List (首頁) ─────────────────────────────── */
.scenario-list {
  display: grid;
  gap: 20px;
}

.scenario-item {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.scenario-item:hover {
  transform: translateX(4px);
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: var(--shadow-sm);
}

.scenario-media {
  position: relative;
  min-height: 168px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* SVG scene icons */
.scenario-icon {
  width: 72px;
  height: 72px;
  opacity: 0.85;
}

.callcenter-bg   { background: linear-gradient(135deg, #eff6ff, #dbeafe); }
.switchboard-bg  { background: linear-gradient(135deg, #f0fdf4, #dcfce7); }
.building-bg     { background: linear-gradient(135deg, #fef3c7, #fde68a); }
.ecard-bg        { background: linear-gradient(135deg, #f5f3ff, #ede9fe); }

.pill {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.pill-blue   { color: var(--primary); background: rgba(37, 99, 235, 0.1); }
.pill-green  { color: #047857; background: rgba(16, 185, 129, 0.12); }
.pill-amber  { color: #92400e; background: rgba(245, 158, 11, 0.12); }
.pill-violet { color: #5b21b6; background: rgba(124, 58, 237, 0.1); }

.scenario-item h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.scenario-item p { color: var(--muted); margin: 0; }

/* ── 11. Comparison Table ─────────────────────────────────── */
.comparison-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.comparison-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

.comparison-table th,
.comparison-table td {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 15px;
}

.comparison-table th {
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.comparison-table th:last-child {
  background: rgba(37, 99, 235, 0.06);
  color: var(--primary);
}

.comparison-table td:last-child {
  color: var(--ink);
  font-weight: 600;
}

.comparison-table td:nth-child(2) {
  color: var(--muted);
}

.comparison-table tr:last-child td { border-bottom: 0; }

.comparison-check {
  color: var(--green);
  font-weight: 700;
}

/* Comparison CTA */
.comparison-cta {
  margin-top: 36px;
  display: flex;
  justify-content: center;
  gap: 14px;
}

/* ── 12. Plan Teaser (首頁) ───────────────────────────────── */
.plan-teaser-section {
  padding: 96px 0;
  background: linear-gradient(135deg, var(--navy-800) 0%, var(--navy-600) 100%);
  color: var(--white);
}

.plan-teaser-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 56px;
  align-items: center;
}

.plan-teaser-inner h2 {
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 800;
  color: #fff;
  max-width: 640px;
  margin-top: 10px;
}

.plan-teaser-inner p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 17px;
  margin-top: 14px;
}

.plan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* ── 13. Page Hero (inner pages) ──────────────────────────── */
.page-hero {
  padding: 88px 0 72px;
  background: linear-gradient(160deg, var(--navy-900) 0%, var(--navy-600) 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
}

.page-hero .eyebrow {
  background: rgba(6, 182, 212, 0.15);
  color: var(--teal);
  border-color: rgba(6, 182, 212, 0.25);
}

.page-hero h1 {
  position: relative;
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 800;
  max-width: 900px;
  margin-top: 8px;
}

.page-hero p:not(.eyebrow) {
  position: relative;
  max-width: 680px;
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
  line-height: 1.75;
}

/* ── 14. Solutions (category strip) ──────────────────────── */
.category-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.category-strip a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 60px;
  padding: 12px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  transition: border-color 160ms, color 160ms, background 160ms, box-shadow 160ms;
}

.category-strip a:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(37, 99, 235, 0.04);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

/* ── 15. Solution Panel ───────────────────────────────────── */
.solution-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.85fr);
  gap: 64px;
  align-items: center;
}

.solution-panel.reversed {
  grid-template-columns: minmax(320px, 0.85fr) minmax(0, 1fr);
}

.solution-panel h2 {
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 800;
  margin: 10px 0 16px;
}

.lead {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
  margin-bottom: 0;
}

/* Scenario visual panels */
.workflow-panel {
  display: grid;
  gap: 12px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow);
}

.workflow-step {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 68px;
  padding: 14px 20px;
  border-radius: var(--radius);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: background 160ms, border-color 160ms;
}

.workflow-step:hover {
  background: rgba(37, 99, 235, 0.06);
  border-color: rgba(37, 99, 235, 0.2);
}

.workflow-step-num {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  background: rgba(37, 99, 235, 0.12);
  color: var(--primary);
  flex-shrink: 0;
}

.workflow-step.active {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.3);
  color: var(--primary);
}

.workflow-step.active .workflow-step-num {
  background: var(--primary);
  color: #fff;
}

.workflow-connector {
  width: 2px;
  height: 20px;
  background: linear-gradient(180deg, var(--primary), var(--teal));
  margin: 0 auto;
  border-radius: 2px;
}

/* Feature / capability panels */
.security-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow);
}

.security-stack span {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 110px;
  padding: 18px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-2);
  transition: background 160ms, border-color 160ms;
}

.security-stack span:hover {
  background: rgba(37, 99, 235, 0.06);
  border-color: rgba(37, 99, 235, 0.2);
}

/* ── 16. Check List ───────────────────────────────────────── */
.check-list {
  display: grid;
  gap: 14px;
  margin: 24px 0 32px;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 32px;
  color: var(--ink-2);
  font-size: 15.5px;
  line-height: 1.6;
}

.check-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--green-light);
  border: 1.5px solid var(--green);
}

.check-list li::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 0.68em;
  width: 8px;
  height: 5px;
  border-left: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
  transform: rotate(-45deg);
}

.check-list.roomy { margin-top: 0; }

/* ── 17. CTA Band ─────────────────────────────────────────── */
.cta-band {
  background: linear-gradient(135deg, var(--navy-700) 0%, var(--navy-600) 100%);
  color: var(--white);
  padding: 72px 0;
  position: relative;
  overflow: hidden;
}

.cta-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.08) 1px, transparent 1px);
  background-size: 40px 40px;
}

.cta-content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.cta-content h2 {
  max-width: 640px;
  font-size: clamp(26px, 3.5vw, 42px);
  font-weight: 800;
  color: #fff;
}

.cta-content p {
  max-width: 580px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 17px;
  margin-top: 12px;
}

/* ── 18. Features Page ────────────────────────────────────── */
.feature-matrix {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.feature-card {
  position: relative;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(37, 99, 235, 0.25);
}

.feature-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 18px;
}

.feature-card h2 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 10px;
}

.feature-card p {
  color: var(--muted);
  font-size: 14.5px;
  margin: 0;
  line-height: 1.65;
}

/* Architecture section */
.architecture-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 56px;
  align-items: center;
}

.architecture-grid h2 {
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 800;
  margin: 10px 0 16px;
}

.architecture-map {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  border: none;
  box-shadow: none;
}

.architecture-map span {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 110px;
  padding: 18px;
  border-radius: var(--radius);
  font-size: 14.5px;
  font-weight: 700;
  text-align: center;
  background: var(--surface);
  border: 1.5px solid var(--line);
  color: var(--ink-2);
  transition: background 160ms, border-color 160ms;
}

.architecture-map span:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(37, 99, 235, 0.05);
}

.arch-icon { font-size: 22px; }

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 56px;
  align-items: start;
}

.two-column h2 {
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 800;
}

/* ── 19. Pricing Page ─────────────────────────────────────── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

.pricing-card {
  display: flex;
  flex-direction: column;
  padding: 32px 28px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--white);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.pricing-card.featured {
  border-color: var(--primary);
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.03) 0%, #fff 100%);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1), var(--shadow);
}

.plan-label {
  display: inline-flex;
  width: fit-content;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 16px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
}

.featured .plan-label {
  background: var(--primary);
  color: #fff;
}

.featured-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.pricing-card h2 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 12px;
}

.pricing-card > p {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
  flex: 1;
}

.pricing-card .check-list {
  margin: 20px 0;
}

.pricing-card .check-list li {
  font-size: 14px;
}

.pricing-card .button {
  margin-top: auto;
  width: 100%;
}

.pricing-note {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted-light);
  text-align: center;
}

/* Guide grid (pricing page) */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.guide-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
}

.guide-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 16px;
  background: rgba(37, 99, 235, 0.1);
}

.guide-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.guide-card p { color: var(--muted); font-size: 14px; margin: 0; }

/* Pricing FAQ */
.faq-list {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-item:last-child { border-bottom: 0; }

.faq-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 26px;
  background: var(--white);
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  transition: background 160ms;
}

.faq-toggle:hover { background: var(--surface); }

.faq-toggle[aria-expanded='true'] { color: var(--primary); }

.faq-chevron {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
  transition: transform 200ms ease, background 200ms;
}

.faq-toggle[aria-expanded='true'] .faq-chevron {
  transform: rotate(180deg);
  background: rgba(37, 99, 235, 0.12);
}

.faq-body {
  display: none;
  padding: 0 26px 22px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.faq-body.is-open { display: block; }

/* ── 20. Resources Page ───────────────────────────────────── */
.resource-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 56px;
  align-items: start;
}

.resource-layout h2 {
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 800;
  margin: 10px 0 14px;
}

.download-list {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  overflow: hidden;
}

.download-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  transition: background 160ms;
}

.download-row:last-child { border-bottom: 0; }
.download-row:hover { background: var(--surface); }

.download-platform {
  display: flex;
  align-items: center;
  gap: 12px;
}

.download-platform-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: var(--surface);
  flex-shrink: 0;
}

.download-platform strong {
  font-weight: 700;
  font-size: 15px;
}

.download-status {
  font-size: 13px;
  color: var(--muted-light);
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface);
}

.ecard-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 56px;
  align-items: center;
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--surface) 0%, rgba(37, 99, 235, 0.04) 100%);
}

.ecard-panel h2 {
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 800;
  margin-bottom: 12px;
}

.ecard-panel p { color: var(--muted); }

.ecard-panel .button { justify-self: end; }

/* ── 21. Contact Page ─────────────────────────────────────── */
.form-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: 40px;
}

.form-aside {
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  height: fit-content;
}

.form-aside h2 {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 800;
  margin-bottom: 24px;
}

.contact-aside {
  background: linear-gradient(160deg, #f0fdf4 0%, #dcfce7 100%);
  border-color: rgba(16, 185, 129, 0.2);
}

.contact-topic {
  display: grid;
  gap: 4px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.contact-topic:first-of-type { padding-top: 0; }
.contact-topic:last-child { border-bottom: 0; padding-bottom: 0; }

.contact-topic strong {
  font-size: 15px;
  font-weight: 700;
}

.contact-topic span {
  color: var(--muted);
  font-size: 13.5px;
}

.contact-form {
  display: grid;
  gap: 20px;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow);
}

.form-row { display: grid; gap: 8px; }

.form-row label {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-2);
}

.form-row input,
.form-row textarea,
.form-row select {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  font-size: 15px;
  transition: border-color 160ms, box-shadow 160ms;
}

.form-row textarea { resize: vertical; min-height: 130px; }

.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.form-status {
  min-height: 24px;
  margin: 0;
  color: var(--green);
  font-size: 14px;
  font-weight: 600;
}

.link-inline {
  color: var(--primary);
  font-weight: 600;
  font-size: 14px;
  transition: color 160ms;
}
.link-inline:hover { color: var(--primary-dark); }

/* ── 22. Login Page ───────────────────────────────────────── */
.login-page-wrap {
  min-height: calc(100svh - 74px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}

.login-brand-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px 56px;
  background: linear-gradient(160deg, var(--navy-800) 0%, var(--navy-600) 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.login-brand-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.06) 1px, transparent 1px);
  background-size: 36px 36px;
}

.login-brand-logo {
  width: 180px;
  margin-bottom: 40px;
  position: relative;
}

.login-brand-panel h2 {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 800;
  color: #fff;
  position: relative;
  margin-bottom: 16px;
}

.login-brand-panel p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 16px;
  position: relative;
}

.login-brand-features {
  display: grid;
  gap: 14px;
  margin-top: 36px;
  position: relative;
}

.login-feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
}

.login-feature-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.login-form-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px 56px;
  background: var(--white);
}

.login-form-panel h1 {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
  margin-bottom: 8px;
}

.login-form-panel > p {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 32px;
}

.login-form {
  display: grid;
  gap: 20px;
  max-width: 400px;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0;
  color: var(--muted-light);
  font-size: 13px;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.register-link {
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  margin-top: 8px;
}

/* ── 23. Text utilities ───────────────────────────────────── */
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-weight: 700;
  font-size: 14.5px;
  transition: gap 160ms ease, color 160ms;
}

.text-link::after {
  content: '→';
  transition: transform 160ms ease;
}

.text-link:hover { color: var(--primary-dark); }
.text-link:hover::after { transform: translateX(3px); }

/* ── 24. Footer ───────────────────────────────────────────── */
.site-footer {
  padding: 64px 0 40px;
  background: var(--navy-900);
  color: var(--white);
}

.footer-top {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 32px;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.54);
  font-size: 14px;
  margin-top: 14px;
  max-width: 280px;
  line-height: 1.65;
}

.footer-logo {
  width: 180px;
  border-radius: 6px;
}

.site-footer h3 {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.45);
}

.site-footer a {
  display: block;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14.5px;
  transition: color 160ms;
}

.site-footer a:hover { color: #fff; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: rgba(255, 255, 255, 0.36);
  font-size: 13px;
}

/* ── 25. Backend / Dashboard ──────────────────────────────── */
.backend-main {
  min-height: calc(100svh - 190px);
  background: var(--surface);
}

.backend-heading {
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.backend-heading-row,
.backend-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.backend-heading h1 {
  margin-bottom: 6px;
  font-size: clamp(32px, 4.5vw, 50px);
}

.backend-heading p { margin: 0; color: var(--muted); }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #047857;
  background: rgba(16, 185, 129, 0.1);
}

.status-pill::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.dashboard-metrics article {
  display: grid;
  gap: 6px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
}

.dashboard-metrics span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dashboard-metrics strong {
  color: var(--ink);
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
}

.backend-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.backend-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  color: var(--ink);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.backend-card:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: var(--shadow);
}

.backend-card h2 { margin: 16px 0 10px; font-size: 20px; font-weight: 700; }
.backend-card p { margin: 0; color: var(--muted); font-size: 14.5px; }

.module-index {
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.backend-footer {
  padding: 28px 0;
  border-top: 1px solid var(--line);
  background: var(--white);
}

/* ── Admin Status Table & Dashboard Extensions (Full-Width, Ultra-Compact & Top Aligned) ── */
.admin-container {
  width: 100%;
  max-width: 100%;
  padding-left: clamp(12px, 2vw, 28px);
  padding-right: clamp(12px, 2vw, 28px);
  margin: 0 auto;
}

.backend-heading {
  padding: 12px 0 10px;
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.backend-heading h1 {
  margin-bottom: 2px;
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 800;
}

.backend-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
}

.backend-main {
  min-height: calc(100svh - 120px);
  background: var(--surface);
  padding-top: 10px;
  padding-bottom: 24px;
}

.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.dashboard-metrics article {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.dashboard-metrics span {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dashboard-metrics strong {
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.1;
}

.dashboard-metrics small {
  color: var(--muted);
  font-size: 11px;
}

.admin-list-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
  margin-top: 0;
}

.admin-list-heading {
  margin-bottom: 8px;
}

.admin-list-heading h2 {
  font-size: 18px;
  font-weight: 800;
  margin-top: 0;
}

.admin-list-heading p.section-kicker {
  font-size: 10.5px;
  margin-bottom: 0;
}

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  width: 100%;
}

.admin-status-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  table-layout: auto;
}

.admin-status-table th,
.admin-status-table td {
  padding: 6px 10px !important;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top !important; /* 所有欄位靠上對齊 */
  line-height: 1.35;
}

.admin-status-table th {
  background: #f8fafc !important;
  color: #475569 !important;
  font-size: 12px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
  border-bottom: 2px solid var(--line);
}

.account-cell {
  font-weight: 700;
  white-space: nowrap;
  color: var(--ink-2);
}

.role-cell {
  white-space: nowrap;
  font-weight: 600;
  color: var(--muted);
}

.date-cell {
  white-space: nowrap;
  font-size: 12px;
  color: var(--muted);
}

.plans-cell {
  max-width: 280px;
}

.actions-cell {
  white-space: nowrap;
}

.admin-contact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.contact-value {
  font-size: 12.5px;
}

/* 驗證標籤 (明確且醒目) */
.verify-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.verify-badge.ok {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.verify-badge.pending {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.admin-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

/* Badge 徽章風格超小型化按鈕與連結 (嚴格覆蓋全域 .button) */
.button-mini,
button.button-mini,
.admin-actions button,
.inline-action-form button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 0 !important;
  max-height: 22px !important;
  height: 22px !important;
  padding: 0 6px !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  border: 1px solid var(--line) !important;
  background: var(--white);
  line-height: 1 !important;
  white-space: nowrap !important;
  transition: all 140ms ease !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02) !important;
  box-sizing: border-box !important;
}

.button-mini:hover,
button.button-mini:hover {
  border-color: var(--primary) !important;
  color: var(--primary) !important;
  background: rgba(37, 99, 235, 0.05) !important;
}

.button-mini.button-danger,
button.button-mini.button-danger {
  background: #fef2f2 !important;
  color: #dc2626 !important;
  border: 1px solid #fecaca !important;
}

.button-mini.button-danger:hover,
button.button-mini.button-danger:hover {
  background: #fee2e2 !important;
  color: #991b1b !important;
}

.button-mini.button-muted,
button.button-mini.button-muted {
  background: #f8fafc !important;
  color: #94a3b8 !important;
  border: 1px solid #e2e8f0 !important;
  cursor: not-allowed !important;
}

.button-mini.button-approve,
button.button-mini.button-approve {
  background: #dcfce7 !important;
  color: #15803d !important;
  border: 1px solid #86efac !important;
}

.button-mini.button-approve:hover,
button.button-mini.button-approve:hover {
  background: #bbf7d0 !important;
  color: #14532d !important;
}

.compact-pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}

.compact-pill.ok {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.compact-pill.warn {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.compact-pill.danger {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.verify-icon {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.verify-icon.ok {
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.verify-icon.pending {
  background: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.verify-icon.empty {
  background: #cbd5e1;
}

.mini-plan {
  display: inline-block;
  padding: 1px 6px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary-dark);
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 700;
  margin: 1px 2px 1px 0;
  white-space: nowrap;
}

.plan-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.mini-link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 22px !important;
  padding: 0 6px !important;
  background: rgba(37, 99, 235, 0.08) !important;
  color: var(--primary-dark) !important;
  border: 1px solid rgba(37, 99, 235, 0.2) !important;
  border-radius: 4px !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
  text-decoration: none !important;
  line-height: 1 !important;
}

.mini-link:hover {
  background: rgba(37, 99, 235, 0.16) !important;
  text-decoration: none !important;
}

.muted-nowrap {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.order-history-row td {
  padding: 0 !important;
  background: #f8fafc;
}

.order-history-panel {
  padding: 10px 14px;
  border-left: 4px solid var(--primary);
  background: #f8fafc;
  margin: 2px 0;
}

.order-history-panel strong {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--ink-2);
}

.order-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  table-layout: auto;
}

.order-history-table th,
.order-history-table td {
  padding: 5px 8px !important;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top !important; /* 所有欄位靠上對齊 */
  line-height: 1.35;
}

.order-history-table th {
  background: #f1f5f9 !important;
  color: #475569 !important;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  border-bottom: 2px solid var(--line);
}

.order-renewal-row {
  background: #f0fdf4 !important;
}

.order-renewal-row td:first-child {
  padding-left: 24px !important; /* 第一欄退縮 24px 增加階層感 */
}

.order-primary-row {
  background: var(--white);
}

.renewal-order-number {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #047857;
  font-weight: 700;
  font-family: 'Inter', monospace;
}

.renewal-order-number::before {
  content: '↳';
  font-family: system-ui, sans-serif;
  font-weight: 800;
  font-size: 13px;
  color: #059669;
  margin-right: 2px;
}

.allocation-cell {
  font-size: 11px;
  min-width: 340px;
}

/* 分配帳號：每列固定顯示 2 個帳號 (2-Column Grid Layout) */
.allocation-list {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 4px !important;
  width: 100%;
  max-width: 560px;
}

.allocation-list span {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-family: 'Inter', monospace;
  color: #334155;
  border: 1px solid #cbd5e1;
  white-space: nowrap;
  box-sizing: border-box;
}

.disable-dialog {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  max-width: 420px;
  width: 90vw;
  box-shadow: var(--shadow-lg);
}

.disable-dialog::backdrop {
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
}

.disable-dialog-form {
  display: grid;
  gap: 10px;
}

.disable-dialog-form h3 {
  font-size: 16px;
  font-weight: 700;
}

.disable-dialog-form textarea {
  width: 100%;
  min-height: 80px;
  padding: 8px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  font-size: 13px;
}

.disable-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}


/* ── 26. Intro Grid ───────────────────────────────────────── */
.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 56px;
  align-items: start;
}

.intro-grid h2 {
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 800;
  margin-bottom: 0;
}

.intro-grid p { color: var(--muted); font-size: 17px; }

/* ── 27. Animations ───────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-ring {
  0%   { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4); }
  70%  { transform: scale(1);    box-shadow: 0 0 0 10px rgba(37, 99, 235, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

.animate-fade-up {
  animation: fadeUp 0.5s ease both;
}

/* ── 28. Responsive ───────────────────────────────────────── */
@media (max-width: 1080px) {
  .site-header {
    grid-template-columns: auto auto;
  }

  .nav-toggle {
    display: flex;
    justify-self: end;
  }

  .site-nav {
    grid-column: 1 / -1;
    display: none;
    flex-direction: column;
    align-items: stretch;
    justify-content: start;
    gap: 0;
    padding: 12px 0;
    border-top: 1px solid var(--line);
  }

  .site-nav.is-open { display: flex; }

  .site-nav a {
    border-radius: 0;
    padding: 12px 4px;
    border-bottom: 1px solid var(--line);
  }
  .site-nav a:last-child { border-bottom: 0; }

  .header-actions { display: none; }

  .card-grid.four,
  .feature-matrix {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pricing-grid,
  .guide-grid,
  .category-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .flow-steps {
    grid-template-columns: 1fr;
  }

  .flow-arrow { display: none; }
  .flow-step { padding: 20px; }

  .architecture-map {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .container {
    width: min(100% - 32px, var(--max));
  }

  .site-header {
    min-height: 66px;
    padding: 8px 16px;
  }

  .brand { width: 160px; height: 46px; }

  .hero { min-height: auto; }
  .hero-content { padding: 48px 0 56px; }
  .hero h1 { font-size: clamp(36px, 10vw, 54px); }

  .section,
  .page-hero { padding: 64px 0; }

  .intro-grid,
  .two-column,
  .architecture-grid,
  .resource-layout,
  .form-layout,
  .ecard-panel,
  .solution-panel,
  .solution-panel.reversed {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .section-heading.split,
  .cta-content {
    display: grid;
    align-items: start;
    gap: 20px;
  }

  .scenario-item {
    grid-template-columns: 1fr;
  }

  .scenario-media { min-height: 160px; }

  .card-grid.four,
  .feature-matrix,
  .pricing-grid,
  .architecture-map,
  .security-stack,
  .category-strip,
  .dashboard-metrics,
  .backend-grid,
  .footer-top {
    grid-template-columns: 1fr;
  }

  .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .ecard-panel { padding: 28px; }

  .plan-teaser-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .login-page-wrap {
    grid-template-columns: 1fr;
  }

  .login-brand-panel { display: none; }

  .login-form-panel {
    padding: 40px 28px;
    justify-content: flex-start;
    padding-top: 48px;
  }

  .backend-heading-row,
  .backend-footer-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .download-row { display: grid; gap: 8px; }
}

@media (max-width: 500px) {
  .button { width: 100%; }
  .hero-actions { width: 100%; }
  .hero-badges { flex-direction: column; }

  .contact-form,
  .form-aside { padding: 22px; }

  .guide-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   21. Dynamic NavLinks Active Highlighting & Header Fix
   ═══════════════════════════════════════════════════════════════════════════ */
.site-nav a.active {
  color: var(--primary) !important;
  font-weight: 700;
  position: relative;
}

.site-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   22. Central Hero Carousel (Full Bleed Edge-to-Edge)
   ═══════════════════════════════════════════════════════════════════════════ */
.hero-carousel-wrap {
  position: static;
  width: 100%;
}

.hero-carousel-slide {
  animation: fadeInSlide 400ms ease-out forwards;
  position: relative;
  border-radius: 0;
  min-height: 380px;
  display: flex;
  align-items: center;
  width: 100%;
}

/* 滿版背景圖：向上與向下延伸塞滿整座 .hero 容器 (紅色框區域) */
.hero-slide-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100vw;
  height: 2000px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
  pointer-events: none;
}

/* 滿版暗色遮罩確保文字可讀 */
.hero-slide-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(2, 8, 24, 0.82) 0%,
    rgba(4, 14, 40, 0.65) 55%,
    rgba(2, 8, 24, 0.48) 100%
  );
  z-index: 1;
}

.hero-carousel-slide .carousel-content-block {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 48px 24px;
  box-sizing: border-box;
}

/* 有背景圖時文字改白 */
.hero-carousel-slide.has-image .carousel-kicker {
  background: rgba(6, 182, 212, 0.18);
  color: #67e8f9;
  border-color: rgba(6, 182, 212, 0.3);
}
.hero-carousel-slide.has-image .carousel-title {
  color: #fff;
  text-shadow: 0 2px 16px rgba(0,0,0,0.35);
}
.hero-carousel-slide.has-image .carousel-subtitle {
  color: rgba(255,255,255,0.85);
}

@keyframes fadeInSlide {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.carousel-kicker {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
}

.carousel-title {
  font-size: clamp(36px, 5.2vw, 58px);
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 18px;
  max-width: 100%;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.carousel-subtitle {
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.6;
  color: var(--muted);
  max-width: 720px;
  margin-bottom: 32px;
}

.carousel-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.carousel-dots {
  display: flex;
  gap: 10px;
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  align-items: center;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.45);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 250ms ease;
}

.carousel-dot.active {
  width: 32px;
  background: #ffffff;
}

/* 有背景圖時導航點改白 */
.hero-carousel-slide.has-image ~ * .carousel-dot,
.hero-carousel-wrap:has(.has-image) .carousel-dot {
  background: rgba(255,255,255,0.45);
}
.hero-carousel-wrap:has(.has-image) .carousel-dot.active {
  background: #fff;
}

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  transition: all 200ms ease;
  z-index: 5;
}

.carousel-nav:hover {
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
  border-color: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  transform: translateY(-50%) scale(1.06);
}

.carousel-nav.prev { left: calc(50% - 50vw + 28px); }
.carousel-nav.next { right: calc(50% - 50vw + 28px); }

@media (max-width: 900px) {
  .carousel-nav { display: none; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   23. Floating AI Customer Service Widget
   ═══════════════════════════════════════════════════════════════════════════ */
.ai-chat-widget-root {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 99999;
  font-family: inherit;
}

.ai-chat-trigger {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  border: none;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.ai-chat-trigger:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.5);
}

.ai-trigger-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(37, 99, 235, 0.6);
  animation: pulseAnim 2.2s infinite;
}

@keyframes pulseAnim {
  0% { transform: scale(1); opacity: 0.8; }
  70% { transform: scale(1.35); opacity: 0; }
  100% { transform: scale(1.35); opacity: 0; }
}

.ai-chat-window {
  position: absolute;
  bottom: 72px;
  right: 0;
  width: 380px;
  height: 540px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: chatPopup 220ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes chatPopup {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.ai-chat-header {
  padding: 14px 18px;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ai-chat-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-avatar-ring {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  color: #fff;
}

.ai-online-status {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10b981;
  border: 2px solid #0f172a;
}

.ai-chat-header-info strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
}

.ai-chat-header-info small {
  display: block;
  font-size: 12px;
  color: #94a3b8;
}

.ai-chat-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}

.ai-chat-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.ai-chat-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f8fafc;
}

.ai-message-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.ai-message-row.user-msg {
  justify-content: flex-end;
}

.msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.msg-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.assistant-msg .msg-bubble {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}

.user-msg .msg-bubble {
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.msg-bubble p { margin: 0; }

.msg-time {
  display: block;
  font-size: 10px;
  margin-top: 4px;
  opacity: 0.7;
  text-align: right;
}

.ai-typing-indicator {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
}

.ai-typing-indicator span {
  width: 6px;
  height: 6px;
  background: #94a3b8;
  border-radius: 50%;
  animation: typingDot 1.4s infinite ease-in-out both;
}

.ai-typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.ai-typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingDot {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

.ai-chat-quick-tags {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  background: #fff;
  border-top: 1px solid var(--line);
  overflow-x: auto;
  white-space: nowrap;
}

.ai-chat-quick-tags button {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 99px;
  padding: 5px 10px;
  font-size: 12px;
  color: #475569;
  cursor: pointer;
  transition: all 160ms ease;
  flex-shrink: 0;
}

.ai-chat-quick-tags button:hover {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  border-color: rgba(37, 99, 235, 0.3);
}

.ai-chat-input-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #fff;
  border-top: 1px solid var(--line);
}

.ai-chat-input-bar input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 8px 14px;
  font-size: 14px;
  outline: none;
}

.ai-chat-input-bar input:focus {
  border-color: var(--primary);
}

.ai-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 160ms;
}

.ai-send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

@media (max-width: 480px) {
  .ai-chat-window {
    width: calc(100vw - 32px);
    height: 480px;
    right: -12px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   24. Flagship Call Center Showcase Page (/call-center)
   ═══════════════════════════════════════════════════════════════════════════ */
.callcenter-hero-section {
  padding: 48px 0 80px;
  background: radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.06) 0%, transparent 70%);
}

.callcenter-hero-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 48px;
}

.callcenter-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 99px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 16px;
}

.pulse-ring {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 rgba(37, 99, 235, 0.4);
  animation: liveRing 1.8s infinite;
}

@keyframes liveRing {
  0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(37, 99, 235, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

.callcenter-hero-header h1 {
  font-size: clamp(32px, 4.5vw, 48px);
  font-weight: 900;
  color: var(--ink);
  margin-bottom: 14px;
}

.callcenter-lead {
  font-size: 18px;
  color: var(--muted);
  line-height: 1.6;
}

.callcenter-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 32px;
  align-items: stretch;
  margin-bottom: 64px;
}

.callcenter-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  padding: 28px;
  display: flex;
  flex-direction: column;
}

.card-header-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.qr-experience-card {
  align-items: center;
  text-align: center;
}

.qr-visual-box {
  margin-bottom: 20px;
}

.qr-glow-border {
  position: relative;
  display: inline-block;
  padding: 12px;
  background: #fff;
  border-radius: 16px;
  border: 2px solid rgba(37, 99, 235, 0.3);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12);
}

.qr-code-img {
  width: 220px;
  height: 220px;
  display: block;
  border-radius: 8px;
}

.qr-center-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-weight: 900;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.qr-info-content {
  width: 100%;
}

.qr-status-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
}

.qr-description {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 18px;
}

.qr-link-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.qr-url-input {
  flex: 1;
  font-size: 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 10px;
  color: var(--muted);
}

.qr-steps-list {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f8fafc;
  border-radius: 12px;
  padding: 14px 16px;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--ink);
}

.step-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Voice Console Card */
.console-screen {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-radius: 16px;
  padding: 24px;
  color: #fff;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.console-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.session-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.agent-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
}

.session-meta strong {
  display: block;
  font-size: 15px;
}

.session-meta small {
  color: #94a3b8;
  font-size: 12px;
}

.call-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.1);
}

.call-status-badge.in_call {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.call-status-badge.dialing {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.status-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.audio-visualizer-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 0;
  text-align: center;
}

.waveform-bars {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 110px;
  margin-bottom: 20px;
}

.waveform-bars span {
  width: 6px;
  height: var(--h, 14px);
  background: linear-gradient(to top, #3b82f6, #60a5fa);
  border-radius: 99px;
  transition: height 120ms ease;
}

.audio-visualizer-stage.is-active .waveform-bars span {
  animation: waveBar 0.9s infinite ease-in-out alternate;
  animation-delay: var(--delay, 0s);
}

@keyframes waveBar {
  0% { height: 12px; }
  100% { height: var(--h, 80px); }
}

.live-subtitle-box {
  min-height: 54px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.5;
  color: #e2e8f0;
  max-width: 90%;
}

.voice-prompt-chips {
  margin-bottom: 20px;
}

.chips-title {
  display: block;
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 8px;
}

.chips-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chips-list button {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 99px;
  color: #f1f5f9;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: all 160ms;
}

.chips-list button:hover {
  background: rgba(37, 99, 235, 0.4);
  border-color: #60a5fa;
}

.console-control-dock {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.call-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 10px;
}

.call-action-btn.start {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: none;
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.call-action-btn.end {
  background: #ef4444;
  border: none;
}

/* Tech Highlights Grid */
.tech-highlights-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 64px;
}

.tech-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.tech-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 16px;
}

.tech-card h3 {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 8px;
}

.tech-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

.callcenter-cta-banner {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-radius: 20px;
  padding: 40px 48px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.callcenter-cta-banner h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
}

.callcenter-cta-banner p {
  font-size: 15px;
  color: #94a3b8;
  margin: 0;
}

.cta-banner-actions {
  display: flex;
  gap: 16px;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .callcenter-grid { grid-template-columns: 1fr; }
  .tech-highlights-grid { grid-template-columns: repeat(2, 1fr); }
  .callcenter-cta-banner { flex-direction: column; text-align: center; }
}

@media (max-width: 600px) {
  .tech-highlights-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   25. Member Directory & App Password Configuration (/account)
   ═══════════════════════════════════════════════════════════════════════════ */
.member-directory-panel {
  margin-top: 24px;
}

.notice-callout {
  display: flex;
  gap: 14px;
  padding: 16px 20px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  margin-bottom: 20px;
  color: #1e40af;
  font-size: 14px;
  line-height: 1.6;
}

.callout-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.directory-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.directory-table th {
  padding: 10px 14px;
  background: #f8fafc;
  color: var(--muted);
  font-weight: 700;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.directory-table td {
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.seat-badge {
  display: inline-block;
  font-weight: 800;
  color: var(--primary);
  background: rgba(37, 99, 235, 0.1);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 13px;
}

.table-input {
  width: 100%;
  padding: 6px 10px;
  font-size: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.table-input:focus {
  border-color: var(--primary);
}

.table-input.password-input {
  font-family: monospace;
}

.web-handle-tag {
  display: inline-block;
  padding: 2px 8px;
  background: #f1f5f9;
  border-radius: 4px;
  font-size: 12px;
  color: #64748b;
}

.directory-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0 0;
}

.directory-actions {
  display: flex;
  gap: 8px;
}

.plan-row-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.expire-date {
  font-size: 13px;
  color: var(--muted);
}

/* ═══════════════════════════════════════════════════════════════════════════
   26. Platform Admin Tabs & CMS Panels
   ═══════════════════════════════════════════════════════════════════════════ */
.admin-nav-tabs-bar {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 60px;
  z-index: 100;
}

.admin-tabs-container {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 6px 12px;
}

.admin-tab-btn {
  background: transparent;
  border: none;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 160ms ease;
}

.admin-tab-btn:hover {
  background: #f1f5f9;
  color: var(--ink);
}

.admin-tab-btn.active {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
}

/* Message Center Styles (圖 1 & 圖 2) */
.admin-message-center {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
}

.message-center-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.message-center-header h2 {
  font-size: 18px;
  font-weight: 800;
  margin: 0;
}

.message-center-header small {
  color: var(--muted);
  font-size: 13px;
}

.message-filter-group {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.filter-btn {
  background: #fff;
  border: none;
  border-right: 1px solid var(--line);
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.filter-btn:last-child { border-right: none; }

.filter-btn.active {
  background: var(--primary);
  color: #fff;
}

.message-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.message-table th {
  padding: 10px 14px;
  background: #f8fafc;
  color: var(--muted);
  font-weight: 700;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.message-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.message-summary-cell {
  max-width: 480px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
}

/* Message Detail & Forwarding Layout (圖 2) */
.message-detail-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.detail-top-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.back-link-btn {
  background: transparent;
  border: none;
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 8px;
}

.back-link-btn:hover {
  text-decoration: underline;
}

.detail-split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 20px;
}

.detail-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
}

.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.card-title-row h3 {
  font-size: 16px;
  font-weight: 800;
  margin: 0;
}

.detail-meta-list {
  display: grid;
  gap: 10px;
  font-size: 14px;
  margin-bottom: 18px;
}

.detail-meta-list div {
  display: flex;
  gap: 8px;
}

.detail-meta-list strong {
  color: var(--muted);
  width: 105px;
  flex-shrink: 0;
}

.detail-body-box {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  font-size: 14px;
  line-height: 1.6;
}

.detail-body-box strong {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
}

.detail-body-box p { margin: 0; color: var(--ink); }

.forward-info-tip {
  padding: 12px 16px;
  background: #ecfeff;
  border: 1px solid #a5f3fc;
  border-radius: 8px;
  color: #0e7490;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 16px;
}

.forward-textarea {
  font-family: inherit;
  font-size: 13px;
  line-height: 1.5;
}

.forward-action-bar {
  margin-top: 16px;
  text-align: right;
}

.send-logs-card h3 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 14px;
}

/* SMTP Settings Styles (圖 3) */
.smtp-config-container {
  display: grid;
  gap: 24px;
}

.smtp-main-card,
.smtp-test-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
}

.smtp-main-card h2 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.smtp-grid-form {
  max-width: 640px;
  display: grid;
  gap: 16px;
}

.form-row-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px;
  gap: 16px;
}

.port-row { width: 140px; }

.checkboxes-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 28px;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.password-hint {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.smtp-action-bar {
  margin-top: 12px;
}

.smtp-test-card h3 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 16px;
}

.test-send-form {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  max-width: 640px;
}

.test-send-form .form-row {
  flex: 1;
  margin: 0;
}

/* CMS Section Cards & Modals */
.cms-section-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
}

.toggle-btn {
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 99px;
  cursor: pointer;
  border: none;
}

.toggle-btn.on {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
}

.toggle-btn.off {
  background: #f1f5f9;
  color: #94a3b8;
}

.slides-grid-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.slide-admin-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  background: #fff;
  display: flex;
  flex-direction: column;
  transition: all 180ms ease;
}

.slide-admin-card.is-hidden {
  opacity: 0.6;
  background: #f8fafc;
}

.slide-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.slide-page-tag {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 6px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  border-radius: 4px;
}

.slide-sort-tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.slide-card-body {
  flex: 1;
}

.slide-card-kicker {
  color: var(--primary);
  font-weight: 700;
  font-size: 11px;
  display: block;
  margin-bottom: 4px;
}

.slide-card-body h4 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 6px;
}

.slide-card-body p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

.slide-card-cta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 14px;
}

.cta-pill {
  font-size: 11px;
  padding: 2px 8px;
  background: #f1f5f9;
  border-radius: 4px;
  color: #475569;
}

.slide-card-actions {
  display: flex;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.cms-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.cms-modal-card {
  background: #fff;
  border-radius: 16px;
  padding: 28px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.2);
}

.cms-modal-card.wide {
  max-width: 680px;
}

.cms-modal-card h3 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 20px;
}

.cms-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
}

.mini-link-btn {
  background: transparent;
  border: none;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 4px;
}

.mini-link-btn:hover {
  text-decoration: underline;
}

/* ══════════════════════════════════════════════════════════════════════════════
   28. SwanOne / QRTalkie UI 標準規範 (docs/ui.html stdUI)
   ══════════════════════════════════════════════════════════════════════════════ */
:root {
  --brand: #2c5282;
  --brand2: #2b6cb0;
  --ink: #1a202c;
  --muted: #718096;
  --line: #e2e8f0;
  --bg: #f4f6f9;
}

/* 版面骨架 */
.app { display: flex; min-height: 100vh; background: var(--bg); font-family: 'Helvetica Neue', Helvetica, Arial, 'Microsoft JhengHei', sans-serif; }
.sidebar { width: 250px; flex: 0 0 250px; background: linear-gradient(180deg, #052767 0%, #3a0647 70%); color: #cbd5e0; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 100; }
.sidebar .brand { background: rgba(0, 0, 0, 0.4); color: #fff; font-weight: 700; padding: 1rem 1.1rem; font-size: 1.05rem; display: flex; align-items: center; gap: 8px; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--bg); }
.topbar { height: 3.5rem; background: #f7f7f7; border-bottom: 1px solid #d6d5d5; display: flex; align-items: center; gap: 1rem; padding: 0 1.5rem; position: sticky; top: 0; z-index: 90; }
.topbar .company { font-weight: 700; color: var(--ink); }
.topbar .spacer { flex: 1; }
.topbar a { color: #006bb7; text-decoration: none; font-size: 0.88rem; display: inline-flex; align-items: center; gap: 4px; }
.topbar a:hover { text-decoration: underline; }
.content { padding: 1.1rem 1.5rem 2rem; width: 100%; box-sizing: border-box; }

/* 選單（三層 + 常用 + 搜尋） */
.nav-search { padding: .5rem .5rem .2rem; }
.nav-search input { width: 100%; padding: .4rem .6rem; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.08); color: #fff; border-radius: 8px; font-size: 0.85rem; box-sizing: border-box; }
.nav-search input::placeholder { color: rgba(255, 255, 255, 0.5); }
.nav-search input:focus { outline: none; border-color: rgba(255, 255, 255, 0.4); background: rgba(255, 255, 255, 0.14); }
.nav-body { flex: 1; overflow-y: auto; }
.nav-fav { padding: .3rem .5rem; margin: .2rem .3rem; border-bottom: 1px solid rgba(255,255,255,.12); }
.nav-fav-h { color: #f6e05e; font-size: .74rem; padding: .2rem .6rem; font-weight: 700; }
.nav-top { display: flex; align-items: center; gap: 8px; padding: .5rem .9rem; color: #fff; text-decoration: none; font-weight: 600; font-size: 0.88rem; transition: background 140ms; }
.nav-top:hover, .nav-top.active { background: rgba(255, 255, 255, 0.12); color: #fff; }
.nav-l1 > summary { list-style: none; cursor: pointer; padding: .55rem .9rem; color: #cbd5e0; display: flex; align-items: center; font-size: 0.88rem; font-weight: 600; }
.nav-l1 > summary::-webkit-details-marker { display: none; }
.nav-l1[open] > summary { color: #fff; }
.nav-l2 { margin-left: .5rem; }
.nav-l2 > summary { list-style: none; cursor: pointer; padding: .4rem .9rem; color: #a7b6c9; font-size: .82rem; }
.nav-l2 > summary::-webkit-details-marker { display: none; }
.nav-sub { display: flex; align-items: center; }
.nav-sub a { flex: 1; display: flex; align-items: center; gap: 6px; padding: .4rem .9rem .4rem 2.1rem; color: #d7d7d7; text-decoration: none; font-size: .85rem; transition: background 140ms; }
.nav-sub a:hover { color: #fff; background: rgba(255,255,255,.08); border-radius: 6px; }
.nav-sub a.active { background: rgba(255,255,255,.15); color: #fff; border-radius: 6px; font-weight: 700; }
.nav-star { color: #f6e05e; padding: 0 .5rem; cursor: pointer; font-size: 0.85rem; }

/* 頁首 */
.std-h { display: flex; align-items: center; gap: .6rem; margin: .2rem 0 .7rem; }
.std-h h1 { margin: 0; font-size: 1.5rem; font-weight: 800; color: var(--ink); }
.info { width: 1.1rem; height: 1.1rem; border-radius: 50%; border: 1px solid var(--brand2); color: var(--brand2); font-size: .75rem; display: inline-grid; place-items: center; font-style: normal; }

/* 可收合搜尋列 */
.stdbar { border: 1px solid var(--line); border-radius: 8px; background: #fff; margin-bottom: .5rem; box-shadow: 0 1px 2px rgba(0,0,0,0.02); }
.stdbar-head { display: flex; align-items: center; gap: .6rem; padding: .35rem .55rem; flex-wrap: wrap; }
.stdbar-toggle { border: 1px solid #cbd5e0; background: #f7fafc; border-radius: 6px; padding: .28rem .6rem; cursor: pointer; font-size: .82rem; font-weight: 600; color: #4a5568; }
.stdbar-toggle:hover { background: #edf2f7; }
.stdbar-quick { flex: 1 1 240px; }
.stdbar-quick input { width: 100%; padding: .32rem .5rem; border: 1px solid #cbd5e0; border-radius: 6px; font-size: 0.85rem; box-sizing: border-box; }
.stdbar-count { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.stdbar-actions { margin-left: auto; display: flex; gap: .4rem; }
.stdbar-body { padding: .5rem .55rem .6rem; border-top: 1px solid #edf2f7; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .45rem .8rem; }
.stdbar-body .f { display: flex; flex-direction: column; gap: .15rem; }
.stdbar-body .f label { font-size: .74rem; color: var(--muted); font-weight: 600; }
.stdbar-body .f input, .stdbar-body .f select { padding: .32rem .5rem; border: 1px solid #cbd5e0; border-radius: 6px; font-size: 0.85rem; box-sizing: border-box; }

/* 標準清單：滿版、不換行、緊湊、吸頂 */
.stdscroll { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.02); }
.stdgrid { width: 100%; border-collapse: collapse; font-size: .84rem; }
.stdgrid th, .stdgrid td { padding: .34rem .55rem; border-bottom: 1px solid #edf2f7; white-space: nowrap; text-align: left; vertical-align: middle; }
.stdgrid thead th { position: sticky; top: 0; background: #2b4a6b; color: #fff; font-weight: 600; font-size: .78rem; z-index: 10; }
.stdgrid tbody tr:hover { background: #f1f7ff; }
.stdgrid td.num, .stdgrid th.num { text-align: right; font-variant-numeric: tabular-nums; }
.exp { cursor: pointer; color: #4a5568; font-weight: bold; width: 24px; text-align: center; }
.subrow > td { background: #f7fafc; padding: 8px 12px; }

.btn, .btn-primary, .btn-secondary, .btn-danger { border: 1px solid #cbd5e0; background: #fff; border-radius: 6px; padding: .3rem .7rem; cursor: pointer; font-size: .82rem; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.btn-primary { background: #1b6ec2; color: #fff; border-color: #1861ac; }
.btn-primary:hover { background: #1861ac; color: #fff; }
.btn-secondary { background: #f8fafc; color: #475569; }
.btn-secondary:hover { background: #e2e8f0; }
.btn-danger { background: #dc2626; color: #fff; border-color: #b91c1c; }
.btn-danger:hover { background: #b91c1c; }
.iconbtn { border: 0; background: transparent; cursor: pointer; padding: .12rem .28rem; border-radius: 5px; font-size: .95rem; line-height: 1; transition: background 120ms; }
.iconbtn:hover { background: #e2e8f0; }

/* 抽屜 (Drawer) */
.drawer-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.4); z-index: 1000; backdrop-filter: blur(1px); }
.drawer, .drawer-panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(620px, 92vw); background: #fff; box-shadow: -8px 0 30px rgba(0,0,0,.15); display: flex; flex-direction: column; z-index: 1001; animation: slideInRight 200ms ease; }
@keyframes slideInRight { from { transform: translateX(100%); } to { transform: translateX(0); } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: .7rem 1rem; border-bottom: 1px solid var(--line); background: #fafbfc; }
.drawer-head h3 { margin: 0; font-size: 1.05rem; font-weight: 800; color: var(--ink); }
.drawer-close { background: transparent; border: 0; cursor: pointer; font-size: 1.1rem; color: #64748b; padding: 4px 8px; border-radius: 4px; }
.drawer-close:hover { background: #e2e8f0; color: #0f172a; }
.drawer-body { flex: 1; overflow-y: auto; padding: .9rem 1rem; }
.drawer-foot { padding: .65rem 1rem; border-top: 1px solid var(--line); display: flex; gap: .5rem; justify-content: flex-end; background: #fafbfc; }

.tabstrip { display: flex; gap: .2rem; border-bottom: 2px solid var(--line); margin-bottom: .8rem; }
.tabbtn { border: 0; background: transparent; padding: .4rem .8rem; cursor: pointer; font-size: .86rem; color: #4a5568; border-bottom: 2px solid transparent; margin-bottom: -2px; font-weight: 500; }
.tabbtn.on { color: var(--brand2); border-bottom-color: var(--brand2); font-weight: 700; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .55rem .9rem; }
.fgrid .f { display: flex; flex-direction: column; gap: .2rem; }
.fgrid .f.full { grid-column: 1 / -1; }
.fgrid .f label { font-size: .76rem; color: #4a5568; font-weight: 600; }
.fgrid .f input, .fgrid .f select, .fgrid .f textarea { padding: .36rem .5rem; border: 1px solid #cbd5e0; border-radius: 6px; font-size: 0.85rem; box-sizing: border-box; }
.fgrid .f input:focus, .fgrid .f select:focus, .fgrid .f textarea:focus { outline: none; border-color: var(--brand2); }

/* 說明標註框 */
.note { background: #fffbea; border: 1px solid #f6e6a0; border-left: 4px solid #d69e2e; border-radius: 8px; padding: .7rem 1rem; margin: .6rem 0 1.2rem; font-size: .88rem; line-height: 1.7; color: #4a5568; }
.note b { color: #7b5804; }
.subtabs { display: flex; gap: .4rem; margin: .5rem 0; }
.subtab { border: 1px solid #cbd5e0; background: #fff; border-radius: 14px; padding: .15rem .7rem; cursor: pointer; font-size: .78rem; font-weight: 600; color: #4a5568; }
.subtab.on { background: var(--brand2); color: #fff; border-color: var(--brand2); }

/* 滿版多欄表單卡片 */
.form-card.mdform { border: 1px solid var(--line); border-radius: 10px; padding: 1.1rem 1.3rem; background: #fff; width: 100%; box-sizing: border-box; }

/* 滿版 KPI 指標與卡片 */
.std-kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 1rem; }
.std-kpi-box { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; border-left: 4px solid var(--brand2); }
.std-kpi-box.ok { border-left-color: #38a169; }
.std-kpi-box.warn { border-left-color: #d69e2e; }
.std-kpi-box span { font-size: .75rem; color: var(--muted); font-weight: 700; text-transform: uppercase; }
.std-kpi-box strong { display: block; font-size: 1.6rem; font-weight: 800; color: var(--ink); line-height: 1.1; margin: 4px 0 2px; }
.std-kpi-box small { font-size: .75rem; color: var(--muted); }

/* ── 後台頁面容器與頁首 (admin-page-*) ────────────────── */
.admin-page-container {
  width: 100%;
  box-sizing: border-box;
}

.admin-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
  flex-wrap: wrap;
}

.admin-page-title {
  margin: 0 0 4px;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--ink);
}

.admin-page-subtitle {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
}

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

/* ── 後台卡片 (admin-card) ─────────────────────────────── */
.admin-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.admin-card-header {
  padding: 1rem 1.25rem 0.75rem;
  border-bottom: 1px solid var(--line);
  background: #fafbfc;
}

.admin-card-title {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.admin-card-subtitle {
  margin: 0;
  font-size: 0.83rem;
  color: var(--muted);
  line-height: 1.5;
}

.admin-card-body {
  padding: 1rem 1.25rem;
  flex: 1;
}

/* ── 後台載入卡片 (admin-loading-card) ────────────────── */
.admin-loading-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ── Slide 列表縮圖 ────────────────────────────────────── */
.slide-thumb {
  width: 40px;
  height: 28px;
  border-radius: 4px;
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.slide-row-hidden td {
  opacity: 0.45;
}

.slide-row-hidden td:nth-last-child(1),
.slide-row-hidden td:nth-last-child(2) {
  opacity: 1;
}
