
/* Priority 1.1: Font fallback for Monospace, Receipt and Audit Certificate */
.font-mono,
pre,
code,
.receipt-slip,
.audit-certificate-box {
  font-family: 'JetBrains Mono', 'IBM Plex Sans Thai', 'Sarabun', monospace !important;
}
/* ==========================================================================
   Preeya | Enterprise Systems & Full-Stack Engineering Showcase
   Design Standard: Precision SaaS & Studio Engineering (Linear / Stripe / Vercel Standard)
   ========================================================================== */

:root {
  /* Surfaces - LogisME Ice Slate Theme */
  --bg: #F4F7FC;
  --bg-subtle: #E8EEF5;
  --panel: #FFFFFF;
  --panel-2: #F8FAFC;
  --panel-3: #F1F5F9;
  --cream: #F4F7FC;
  --cream-card: #FFFFFF;
  --cream-subtle: #F8FAFC;
  --cream-dark: #E2E8F0;

  /* Typography - Crisp Enterprise Navy Slate */
  --charcoal: #0F172A;
  --charcoal-soft: #1E293B;
  --text: #0F172A;
  --text-muted: #64748B;
  --muted: #64748B;
  --muted-light: #94A3B8;

  /* Dividers & Borders */
  --line: #E2E8F0;
  --line-subtle: #F1F5F9;
  --line-strong: #CBD5E1;
  --border-thick: 1px solid var(--line-strong);
  --border-thin: 1px solid var(--line);

  /* LogisME Primary Electric Blue */
  --primary: #1677FF;
  --primary-hover: #0958D9;
  --primary-light: #E6F4FF;
  --primary-border: #BAE0FF;

  /* Semantic State Tokens */
  --brand: #1677FF;
  --brand-hover: #0958D9;
  --blue: #1677FF;
  --blue-hover: #0958D9;
  --blue-light: #E6F4FF;
  --blue-border: #BAE0FF;
  --coral: #1677FF;
  --coral-light: #E6F4FF;
  --coral-border: #BAE0FF;
  --brand-2: #0958D9;

  --amber: #F59E0B;
  --amber-hover: #D97706;
  --amber-light: #FFFBEB;
  --amber-border: #FDE68A;
  --amber-text: #B45309;

  --yellow: #F59E0B;
  --yellow-light: #FFFBEB;
  --yellow-border: #FDE68A;
  --warning: #D97706;

  --green: #10B981;
  --green-light: #ECFDF5;
  --green-border: #A7F3D0;
  --success: var(--green);

  --danger: #EF4444;
  --danger-light: #FEF2F2;
  --danger-border: #FECACA;

  /* LogisME Elevation Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 16px -2px rgba(22, 119, 255, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 28px -4px rgba(22, 119, 255, 0.12), 0 4px 10px -2px rgba(15, 23, 42, 0.05);
  --shadow-xl: 0 24px 48px -12px rgba(22, 119, 255, 0.18);
  --shadow-chunky: 0 4px 16px -2px rgba(22, 119, 255, 0.08);

  /* Geometry & Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-full: 9999px;
  --subtle: #F4F7FC;
}

html[data-theme="dark"] {
  --bg: #0B0F19;
  --bg-subtle: #111827;
  --panel: #111827;
  --panel-2: #161F30;
  --panel-3: #1E293B;
  --cream: #0B0F19;
  --cream-card: #111827;
  --cream-subtle: #161F30;
  --cream-dark: #1E293B;

  --charcoal: #F8FAFC;
  --charcoal-soft: #CBD5E1;
  --text: #F8FAFC;
  --text-muted: #94A3B8;
  --muted: #94A3B8;
  --muted-light: #64748B;

  --line: #1E293B;
  --line-subtle: #161F30;
  --line-strong: #334155;
  --border-thick: 1px solid #334155;
  --border-thin: 1px solid #1E293B;

  --primary: #1677FF;
  --primary-hover: #3B82F6;
  --primary-light: rgba(22, 119, 255, 0.18);
  --primary-border: rgba(22, 119, 255, 0.35);

  --brand: #1677FF;
  --brand-hover: #3B82F6;
  --blue: #1677FF;
  --blue-hover: #3B82F6;
  --blue-light: rgba(22, 119, 255, 0.18);
  --blue-border: rgba(22, 119, 255, 0.35);

  --coral: #1677FF;
  --coral-light: rgba(22, 119, 255, 0.18);
  --coral-border: rgba(22, 119, 255, 0.35);

  --amber: #FBBF24;
  --amber-hover: #F59E0B;
  --amber-light: rgba(251, 191, 36, 0.15);
  --amber-border: rgba(251, 191, 36, 0.35);
  --amber-text: #FDE68A;

  --yellow: #FBBF24;
  --yellow-light: rgba(251, 191, 36, 0.15);
  --yellow-border: rgba(251, 191, 36, 0.35);

  --green: #34D399;
  --green-light: rgba(52, 211, 153, 0.15);
  --green-border: rgba(52, 211, 153, 0.35);

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px -2px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 30px -4px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 24px 50px -10px rgba(0, 0, 0, 0.7);
  --shadow-chunky: 0 4px 16px -2px rgba(0, 0, 0, 0.5);
  --subtle: #111827;
}

/* ==========================================================================
   Base Reset, Atmosphere & Typography
   ========================================================================== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; overflow-x: hidden; }

body {
  min-width: 320px;
  max-width: 100%;
  overflow-x: hidden;
  background-color: var(--bg);
  background-image: radial-gradient(circle at 50% -10%, rgba(22, 119, 255, 0.08) 0%, transparent 60%);
  background-attachment: scroll;
  color: var(--text);
  font-family: 'Plus Jakarta Sans', 'Prompt', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html[data-theme="dark"] body {
  background-image: radial-gradient(circle at 50% -10%, rgba(22, 119, 255, 0.14) 0%, transparent 60%);
}

button, input, select, textarea { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; background: none; border: none; }
img { max-width: 100%; height: auto; display: block; }

:focus-visible {
  outline: 2px solid var(--charcoal);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Utility & Badges */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px rgba(22, 119, 255, 0.6);
}

.muted { color: var(--muted); }
.danger { color: var(--danger); }
.success { color: var(--success); }
.money { font-variant-numeric: tabular-nums; font-weight: 700; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 600;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  color: var(--charcoal-soft);
}
.badge.primary { background: var(--primary-light); color: var(--primary); border-color: var(--primary-border); }
.badge.coral { background: var(--bg-subtle); color: var(--charcoal); border-color: var(--line); }
.badge.yellow { background: #FEF3C7; color: #92400E; border-color: #FDE68A; }
.badge.success { background: var(--green-light); color: var(--green); border-color: var(--green-border); }
.badge.warning { background: #FEF3C7; color: #92400E; border-color: #FDE68A; }

.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text-muted);
}
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ==========================================================================
   Buttons — Tactile Executive Obsidian
   ========================================================================== */
.btn {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--panel);
  color: var(--charcoal);
  padding: 8px 18px;
  font-size: 13.5px;
  font-weight: 600;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  text-align: center;
  user-select: none;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
  background: var(--bg-subtle);
  border-color: #A1A1AA;
}
.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

/* Primary Electric Blue */
.btn.primary {
  background: var(--primary) !important;
  color: #FFFFFF !important;
  border: 1px solid var(--primary) !important;
  box-shadow: 0 4px 14px rgba(22, 119, 255, 0.28) !important;
  font-weight: 600;
}
.btn.primary:hover {
  background: var(--primary-hover) !important;
  border-color: var(--primary-hover) !important;
  color: #FFFFFF !important;
  box-shadow: 0 6px 18px rgba(22, 119, 255, 0.38) !important;
  transform: translateY(-1px);
}
.btn.primary:active {
  transform: translateY(0);
}

/* Secondary Clean Panel */
.btn.coral,
.btn.yellow,
.btn:not(.primary):not(.pill) {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-sm);
}
.btn.coral:hover,
.btn.yellow:hover,
.btn:not(.primary):not(.pill):hover {
  background: var(--panel-2);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

html[data-theme="dark"] .btn.primary {
  background: var(--primary) !important;
  color: #FFFFFF !important;
  border: 1px solid var(--primary) !important;
  box-shadow: 0 4px 14px rgba(22, 119, 255, 0.4) !important;
}
html[data-theme="dark"] .btn.primary:hover {
  background: #3B82F6 !important;
  border-color: #3B82F6 !important;
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5) !important;
}

html[data-theme="dark"] .btn.coral,
html[data-theme="dark"] .btn.yellow,
html[data-theme="dark"] .btn:not(.primary):not(.pill) {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line-strong);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
html[data-theme="dark"] .btn.coral:hover,
html[data-theme="dark"] .btn.yellow:hover,
html[data-theme="dark"] .btn:not(.primary):not(.pill):hover {
  background: var(--panel-2);
  border-color: var(--primary);
  color: var(--primary);
}

.btn.small {
  min-height: 32px;
  padding: 4px 12px;
  font-size: 12.5px;
  border-radius: var(--radius-sm);
}

.btn.danger {
  background: #FEF2F2;
  color: #DC2626;
  border-color: #FECACA;
}
.btn.danger:hover {
  background: #FEE2E2;
  border-color: #FCA5A5;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ==========================================================================
   General Portal Layout
   ========================================================================== */
.portal-root {
  min-height: 100vh;
}
.portal-wrap {
  width: min(1200px, calc(100% - 40px));
  max-width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
  padding-bottom: 80px;
}

/* Header & Nav */
.portal-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  height: 64px;
  min-height: 64px;
  max-height: 64px;
  background: rgba(244, 247, 252, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  box-sizing: border-box;
}
html[data-theme="dark"] .portal-nav {
  background: rgba(11, 15, 25, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 17px;
  color: var(--charcoal);
}
.brand-mark {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #18181B 0%, #09090B 100%);
  color: #F59E0B;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 17px;
  border: 1px solid #27272A;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transform: none;
  transition: transform 0.2s ease;
}
.brand:hover .brand-mark {
  transform: scale(1.05);
}
.brand-title {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.brand-title small {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.portal-nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.portal-nav-links a {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}
.portal-nav-links a:hover {
  background: var(--bg-subtle);
  color: var(--charcoal);
}
.portal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  padding: 64px 0 48px;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  transform: none;
}
.hero-tag::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
}

.hero-title {
  font-size: clamp(28px, 3.8vw, 46px);
  font-weight: 900;
  line-height: 1.22;
  margin-bottom: 20px;
  letter-spacing: -0.025em;
  color: var(--charcoal);
  word-break: break-word;
}
.hero-title .highlight-blue, .hero-title .highlight-amber {
  background: linear-gradient(135deg, #1677FF 0%, #38BDF8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}
html[data-theme="dark"] .hero-title .highlight-blue,
html[data-theme="dark"] .hero-title .highlight-amber {
  background: linear-gradient(135deg, #38BDF8 0%, #60A5FA 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 580px;
  margin-bottom: 32px;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

.hero-stats-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  width: 100%;
}
.hero-stat-item {
  display: flex;
  flex-direction: column;
}
.hero-stat-item strong {
  font-size: 24px;
  font-weight: 900;
  color: var(--charcoal);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.hero-stat-item span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

/* ==========================================================================
   Mock Window (macOS / Modern Browser Frame)
   ========================================================================== */
.hero-visual {
  position: relative;
  min-width: 0;
  max-width: 100%;
}

.mock-window {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.mock-window:hover {
  transform: translateY(-3px);
  box-shadow: 0 28px 50px -12px rgba(0, 0, 0, 0.14);
}

.mock-window-header {
  height: 38px;
  background: #F4F4F5;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  gap: 10px;
  overflow: hidden;
}
html[data-theme="dark"] .mock-window-header {
  background: #18181D;
}

.mock-dots {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.mock-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}
.mock-dot.mock-close { background: #EF4444; }
.mock-dot.mock-min { background: #F59E0B; }
.mock-dot.mock-expand { background: #10B981; }

.mock-url-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 10px;
  font-size: 11px;
  color: var(--muted);
  max-width: 260px;
  min-width: 0;
  width: 100%;
  justify-content: center;
  overflow: hidden;
  white-space: nowrap;
}
html[data-theme="dark"] .mock-url-bar {
  background: #141417;
}

.mock-ssl-lock {
  font-size: 9px;
  opacity: 0.7;
  flex-shrink: 0;
}
.mock-url-text {
  font-family: monospace;
  font-size: 11px;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mock-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 700;
  color: #065F46;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  padding: 2px 8px;
  border-radius: 9999px;
  white-space: nowrap;
  flex-shrink: 0;
}
html[data-theme="dark"] .mock-live-pill {
  color: #34D399;
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
}
.mock-live-pulse {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 6px #10B981;
  flex-shrink: 0;
}

.hero-featured-img-wrap {
  background: var(--bg-subtle);
  aspect-ratio: 16/10;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero-featured-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.mock-window:hover .hero-featured-img-wrap img {
  transform: scale(1.02);
}

.hero-featured-meta {
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--panel);
}
.hero-featured-meta h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--charcoal);
  margin-top: 2px;
}

/* Miniature Mock Bar for Featured Cards */
.mock-card-bar {
  height: 28px;
  background: #F4F4F5;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
}
html[data-theme="dark"] .mock-card-bar {
  background: #18181D;
}
.mock-card-dots {
  display: flex;
  gap: 4px;
}
.mock-card-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line-strong);
}
.mock-card-route {
  font-family: monospace;
  font-size: 10.5px;
  color: var(--muted-light);
}

/* ==========================================================================
   Section Common Headers
   ========================================================================== */
.section-header {
  margin: 76px 0 28px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.section-header h2 {
  font-size: clamp(24px, 2.8vw, 34px);
  font-weight: 800;
  line-height: 1.25;
  color: var(--charcoal);
  letter-spacing: -0.02em;
}
.section-header p {
  color: var(--muted);
  font-size: 14.5px;
  max-width: 640px;
}

/* ==========================================================================
   Featured Works (Top 3 Enterprise Systems)
   ========================================================================== */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feat-card {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 10px -2px rgba(0, 0, 0, 0.03);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
  position: relative;
}
.feat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px -6px rgba(0, 0, 0, 0.08);
  border-color: var(--line-strong);
}

.feat-img-wrap {
  width: 100%;
  aspect-ratio: 16/10;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  position: relative;
}
.feat-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.feat-card:hover .feat-img-wrap img {
  transform: scale(1.02);
}
.feat-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.feat-body .badge-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.feat-body h3 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 6px;
  line-height: 1.35;
  color: var(--charcoal);
}
.feat-body p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
}
.feat-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}
.feat-tech span {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  color: var(--muted);
  border: 1px solid var(--line);
}
.feat-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: auto;
}

/* ==========================================================================
   Filter Controls & All Works Grid
   ========================================================================== */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.filter-btn {
  padding: 6px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  background: var(--panel);
  color: var(--muted);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all 0.15s ease;
}
.filter-btn:hover {
  background: var(--bg-subtle);
  color: var(--charcoal);
  border-color: var(--line-strong);
}
.filter-btn.active {
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(22, 119, 255, 0.3);
}

.all-works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.work-item-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.work-item-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -4px rgba(0, 0, 0, 0.07);
  border-color: var(--line-strong);
}
.work-item-thumb {
  aspect-ratio: 16/10;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.work-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.work-item-card:hover .work-item-thumb img {
  transform: scale(1.02);
}
.work-item-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.work-item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.work-item-body h4 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 6px;
  line-height: 1.35;
  color: var(--charcoal);
}
.work-item-body p {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 14px;
  flex: 1;
}
.work-item-foot {
  display: flex;
  gap: 8px;
  margin-top: auto;
}
.work-item-foot .btn {
  flex: 1;
}

/* ==========================================================================
   Services Section (Distinct Character & High-Craft Icons)
   ========================================================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.service-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.service-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -4px rgba(0, 0, 0, 0.07);
  border-color: var(--line-strong);
}
/* Service Icon Box - LogisME Electric Blue */
.service-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  color: var(--primary);
  transition: all 0.25s ease;
}
.service-icon-box svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}
.service-card:hover .service-icon-box {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
  transform: scale(1.05);
}


.service-card h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--charcoal);
}
.service-card p {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.6;
}
.service-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}
.service-list li {
  font-size: 12.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 600;
}
.service-list li::before {
  content: '✓';
  color: #059669;
  font-weight: 800;
}

/* ==========================================================================
   Process Section (Connected Architectural Pipeline)
   ========================================================================== */
.process-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  position: relative;
}
.process-step {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.process-step:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px -2px rgba(0, 0, 0, 0.06);
  border-color: var(--line-strong);
}
.step-num {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13.5px;
  transition: all 0.2s ease;
}
.process-step:hover .step-num {
  background: var(--primary);
  color: #FFFFFF;
}
.process-step h4 {
  font-size: 15px;
  font-weight: 800;
  margin-top: 2px;
  color: var(--charcoal);
}
.process-step p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

/* ==========================================================================
   Contact Section (Executive Card)
   ========================================================================== */
.contact-section {
  margin-top: 76px;
  background: linear-gradient(135deg, #FFFFFF 0%, #FAFAFA 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 44px;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.07);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 36px;
  align-items: center;
}
.contact-info h2 {
  font-size: 26px;
  font-weight: 900;
  margin-bottom: 10px;
  color: var(--charcoal);
}
.contact-info p {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.65;
  margin-bottom: 18px;
}
.contact-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.contact-btn-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #FFFFFF;
  font-weight: 600;
  font-size: 14px;
  color: var(--charcoal);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}
.contact-btn-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px -2px rgba(0, 0, 0, 0.08);
  border-color: var(--line-strong);
}
.contact-btn-card.line {
  background: #06C755;
  color: #FFFFFF;
  border-color: #06C755;
}
.contact-btn-card.line:hover {
  background: #05B34C;
}
html[data-theme="dark"] .contact-section {
  background: linear-gradient(135deg, #18181D 0%, #121215 100%);
  border-color: #27272A;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
}
html[data-theme="dark"] .contact-btn-card:not(.line) {
  background: #18181D;
  border-color: #27272A;
  color: #FAFAFA;
}
html[data-theme="dark"] .contact-btn-card:not(.line):hover {
  background: #27272A;
  border-color: #3F3F46;
}

/* Footer */
.portal-footer {
  margin-top: 60px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: var(--muted);
}

/* ==========================================================================
   Project Detail Modal / Popups
   ========================================================================== */
.detail-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 9, 11, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.detail-modal-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  width: min(840px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  display: flex;
  flex-direction: column;
}
.detail-modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: sticky;
  top: 0;
  background: var(--panel);
  z-index: 10;
}
.detail-modal-close {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: all 0.15s ease;
}
.detail-modal-close:hover {
  background: var(--danger-light);
  color: var(--danger);
}
.detail-modal-content {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.detail-image-box {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.detail-grid-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.detail-info-block {
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px;
}
.detail-info-block strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
  color: var(--charcoal);
}
.detail-info-block p {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.55;
}
.detail-tech-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.detail-modal-actions {
  padding: 16px 22px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: var(--panel);
}

/* ==========================================================================
   Interactive Demo Modal System
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(9, 9, 11, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
  box-sizing: border-box;
}

.modal {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  width: min(640px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 22px 26px;
  margin: auto;
  position: relative;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  animation: modalScaleIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleIn {
  from { opacity: 0; transform: scale(0.97) translateY(6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal .card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.modal .card-head h2 {
  font-size: 17px;
  font-weight: 800;
  color: var(--charcoal);
  margin: 0;
  flex: 1;
  min-width: 0;
  line-height: 1.35;
  word-break: break-word;
}

.modal .card-head .icon-btn {
  flex-shrink: 0;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  color: var(--charcoal);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.icon-btn:hover {
  background: var(--danger-light);
  color: var(--danger);
  border-color: var(--danger-border);
}

.modal form {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.modal .field {
  margin-bottom: 12px;
}
.modal .field label {
  margin-bottom: 4px;
}
.modal .grid {
  margin-bottom: 12px;
}

.modal .modal-actions,
.modal .form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.textarea {
  min-height: 84px;
  padding: 8px 12px;
  resize: vertical;
  font-family: inherit;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--charcoal);
  font-size: 13px;
  font-weight: 500;
  width: 100%;
  box-sizing: border-box;
}
.textarea:focus {
  background: #FFFFFF;
  border-color: var(--charcoal);
  outline: none;
  box-shadow: 0 0 0 2px rgba(9, 9, 11, 0.1);
}

.receipt-slip {
  background: #FFFFFF;
  color: #111827;
  padding: 22px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.shipping-invoice{width:100%;min-width:0;overflow-wrap:anywhere}
.shipping-invoice table{min-width:0;table-layout:fixed;width:100%}
.shipping-invoice th,.shipping-invoice td{white-space:normal;overflow-wrap:anywhere}
.shipping-invoice th:last-child,.shipping-invoice td:last-child{width:90px;white-space:nowrap}

.signed-mark {
  display: grid;
  place-items: center;
  border: 1px solid var(--green-border);
  border-radius: var(--radius-md);
  background: var(--green-light);
  color: #065F46;
  padding: 22px;
  text-align: center;
}

.cart-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.qty {
  display: flex;
  align-items: center;
  gap: 6px;
}

.kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(260px, 1fr));
  gap: 16px;
  min-width: 1100px;
}
.kanban-column {
  min-height: 560px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}
.task-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  padding: 12px;
  box-shadow: var(--shadow-sm);
  cursor: grab;
  margin-bottom: 8px;
  transition: all 0.15s ease;
}
.task-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}
.task-card h4 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
  color: var(--charcoal);
}
.task-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

/* ==========================================================================
   Demo Shell (Header above individual interactive demos)
   ========================================================================== */
.demo-frame {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
.demo-shell {
  height: 56px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.shell-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  color: var(--charcoal);
  transition: all 0.15s ease;
}
.shell-back:hover {
  background: var(--panel);
  border-color: var(--line-strong);
}
.shell-project {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--charcoal);
}
.shell-project .status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.2);
}
.shell-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.demo-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.info-popover {
  position: absolute;
  top: 64px;
  right: 20px;
  width: min(440px, calc(100vw - 40px));
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  padding: 18px;
  z-index: 200;
}
.popover-close {
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
.popover-section {
  margin-bottom: 10px;
}

/* External Iframe Container */
.external-frame-wrap {
  flex: 1;
  position: relative;
  width: 100%;
  min-height: calc(100vh - 56px);
}
.external-frame {
  width: 100%;
  height: calc(100vh - 56px);
  border: none;
  display: block;
}
.external-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  gap: 12px;
  z-index: 1;
}

/* ==========================================================================
   App Topbar & Navigation (Internal Systems)
   ========================================================================== */
.app-shell {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 56px);
  background: var(--bg);
}

.app-topbar {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 25;
}

.app-topbar-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 28px;
  border-bottom: 1px solid var(--line-subtle);
}

.app-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.app-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.app-system-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--bg-subtle);
  color: var(--charcoal);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.app-title h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: var(--charcoal);
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.app-title p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

.app-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex-shrink: 0;
}

.app-topbar-nav {
  display: flex;
  align-items: center;
  padding: 6px 28px;
  background: var(--bg);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.app-topbar-nav::-webkit-scrollbar {
  display: none;
}

.tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
}

.tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 14px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  text-decoration: none;
  user-select: none;
}
.tab:hover {
  background: var(--bg-subtle);
  color: var(--charcoal);
}
.tab.active {
  background: var(--panel);
  color: var(--charcoal);
  border-color: var(--line);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  font-weight: 700;
}

.sub-tabs, .toolbar .tabs {
  background: var(--bg-subtle);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  gap: 4px;
}
.sub-tabs .tab, .toolbar .tabs .tab {
  height: 28px;
  padding: 0 10px;
  font-size: 11.5px;
  box-shadow: none;
  border: none;
  background: transparent;
  color: var(--muted);
}
.sub-tabs .tab:hover, .toolbar .tabs .tab:hover {
  color: var(--charcoal);
  background: rgba(255, 255, 255, 0.6);
}
.sub-tabs .tab.active, .toolbar .tabs .tab.active {
  background: var(--panel);
  color: var(--charcoal);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   Page Layout, Grids & Stat Cards
   ========================================================================== */
.page-pad {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 28px 44px;
  width: 100%;
}

.grid {
  display: grid;
  gap: 16px;
}
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.stat-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  min-height: 110px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.stat-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}
.stat-card small:first-child {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  display: block;
}
.stat-card strong {
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 800;
  color: var(--charcoal);
  line-height: 1.15;
  margin: 6px 0 3px;
  display: block;
}
.stat-card small:last-child {
  font-size: 11.5px;
  color: var(--muted-light);
  font-weight: 500;
  display: block;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.card-head h2, .card-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--charcoal);
  letter-spacing: -0.01em;
}

/* Toolbar & Filter Bars */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  margin-bottom: 16px;
}

.toolbar input.input, .input, .select, textarea {
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--charcoal);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s ease;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.select {
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
.toolbar input.input:focus, .input:focus, .select:focus, textarea:focus {
  background: #FFFFFF;
  border-color: var(--charcoal);
  outline: none;
  box-shadow: 0 0 0 2px rgba(9, 9, 11, 0.1);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}
.field label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--charcoal);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Notice & Alert Boxes */
.notice {
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.5;
}
.notice.danger {
  background: var(--danger-light);
  border-color: var(--danger-border);
  color: #991B1B;
}
.notice.danger strong { color: #DC2626; }
.notice.warning {
  background: #FEF3C7;
  border-color: #FDE68A;
  color: #92400E;
}
.notice.info {
  background: var(--bg-subtle);
  border-color: var(--line);
  color: var(--charcoal);
}

/* Data Tables */
.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow-x: auto;
  background: var(--panel);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  margin-top: 12px;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  font-size: 13px;
}
th {
  background: var(--bg-subtle);
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  text-align: left;
}
td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-subtle);
  vertical-align: middle;
}
tr:last-child td {
  border-bottom: none;
}
tbody tr:hover {
  background: var(--bg-subtle);
}

.summary-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13px;
}
.summary-line:last-child {
  border-bottom: none;
}
.summary-line.total {
  border-top: 1px solid var(--line-strong);
  border-bottom: none;
  margin-top: 6px;
  padding-top: 10px;
  font-size: 15px;
  font-weight: 800;
  color: var(--charcoal);
}

/* Timelines */
.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-left: 26px;
  margin: 14px 0;
}
.timeline::before {
  content: '';
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 7px;
  width: 2px;
  background: var(--line-strong);
}
.timeline-item {
  position: relative;
}
.timeline-item::before {
  content: '';
  position: absolute;
  top: 4px;
  left: -23px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid var(--panel);
  background: var(--line-strong);
}
.timeline-item.done::before {
  background: var(--green);
  box-shadow: 0 0 0 2px var(--green-light);
}
.timeline-item.current::before {
  background: var(--charcoal);
  box-shadow: 0 0 0 2px rgba(9, 9, 11, 0.15);
}
.timeline-item strong {
  display: block;
  font-size: 13px;
  color: var(--charcoal);
}
.timeline-item p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
}

/* ==========================================================================
   SMARTPOS (REGISTER, CART, KDS, TABLES)
   ========================================================================== */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  align-items: start;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
}
.product-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
  padding: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.15s ease;
  min-height: 140px;
}
.product-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);
  border-color: var(--line-strong);
}
.product-card h3 {
  margin: 0 0 3px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--charcoal);
}
.product-card p {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--muted);
}

.product-card .btn {
  background: #09090B;
  color: #FFFFFF;
  border-color: #09090B;
  font-size: 12px;
  min-height: 30px;
}
.product-card .btn:hover {
  background: #27272A;
}

.sidebar-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
  padding: 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  position: sticky;
  top: 20px;
}

.kds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.order-card {
  border: 1px solid var(--line);
  border-top: 3px solid var(--charcoal);
  border-radius: var(--radius-md);
  background: var(--panel);
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.order-card.ready {
  border-top-color: var(--green);
}

/* ==========================================================================
   THAI SHIPPING SUITE
   ========================================================================== */
.shipping-choice {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 200px);
  padding: 36px 20px;
}
.choice-wrap {
  max-width: 920px;
  width: 100%;
  text-align: center;
}
.choice-wrap h1 {
  font-size: clamp(24px, 3.2vw, 36px);
  font-weight: 800;
  color: var(--charcoal);
  margin: 10px 0 6px;
  letter-spacing: -0.02em;
}
.choice-wrap p.muted {
  font-size: 15px;
  max-width: 600px;
  margin: 0 auto 32px;
  line-height: 1.6;
}
.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  text-align: left;
}
.choice-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  padding: 28px 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  text-decoration: none;
  color: inherit;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 220px;
}
.choice-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -4px rgba(0, 0, 0, 0.08);
  border-color: var(--line-strong);
}
.choice-card .stat-icon {
  margin-bottom: 16px;
}
.choice-card h2 {
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 6px;
  color: var(--charcoal);
}
.choice-card p {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 16px;
}
.choice-card strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--charcoal);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  color: var(--charcoal);
  font-size: 22px;
}

.onboard-banner {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  padding: 16px 20px;
  margin-bottom: 20px;
}

/* ==========================================================================
   SALES FLOW CRM (PIPELINE, STAGES, CONTRACT, E-SIGN)
   ========================================================================== */
.pipeline-wrap {
  overflow-x: auto;
  padding-bottom: 16px;
  margin-top: 16px;
}
.pipeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(240px, 1fr));
  gap: 14px;
  min-width: 1240px;
}
.stage {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  padding: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  min-height: 460px;
  display: flex;
  flex-direction: column;
}
.stage.dragover {
  background: #FFFFFF;
  border-color: var(--charcoal);
}
.stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
  font-weight: 800;
  color: var(--charcoal);
}
.deal-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  padding: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  margin-bottom: 8px;
  cursor: grab;
  transition: all 0.15s ease;
}
.deal-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
  border-color: var(--line-strong);
}
.deal-card h4 {
  font-size: 13.5px;
  font-weight: 700;
  margin: 0 0 3px;
  color: var(--charcoal);
}
.deal-card p {
  font-size: 11.5px;
  color: var(--muted);
  margin: 0 0 6px;
}
.progress {
  height: 5px;
  background: var(--line);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 6px;
}
.progress span {
  display: block;
  height: 100%;
  background: var(--charcoal);
}

.contract {
  max-width: 860px;
  margin: 0 auto;
  padding: 16px 0;
}
.contract-paper {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #FFFFFF;
  padding: 40px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
}
.signature-pad {
  width: 100%;
  height: 160px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: #FAFAFA;
  margin: 14px 0;
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 18px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  color: var(--muted);
  text-align: center;
  font-size: 13.5px;
}

/* Toast */
.toast-msg {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--charcoal);
  color: #FFFFFF;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-xl);
  z-index: 9999;
  border: 1px solid #3F3F46;
  animation: toastIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes toastIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* 404 Page */
.not-found {
  min-height: calc(100vh - 70px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
}

/* ==========================================================================
   NEXUSWMS INTERACTIVE ENHANCEMENTS (OBSIDIAN & CRISP ALERTS)
   ========================================================================== */
.stat-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.stat-icon-box {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  color: var(--charcoal);
}

.quick-ops-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  margin-top: 16px;
  margin-bottom: 20px;
}
.quick-ops-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--charcoal);
  margin-right: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.quick-op-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  color: var(--charcoal);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.quick-op-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
  background: #FFFFFF;
  border-color: var(--line-strong);
}
.quick-op-btn.blue { background: #09090B; color: #FFFFFF; border-color: #09090B; }
.quick-op-btn.coral { background: #FFFFFF; color: #09090B; border-color: var(--line-strong); }
.quick-op-btn.yellow { background: var(--bg-subtle); color: var(--charcoal); border-color: var(--line); }
.quick-op-btn.green { background: var(--green-light); color: #065F46; border-color: var(--green-border); }

/* Warehouse Zone Grid */
.zone-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.zone-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 170px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.zone-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
  border-color: var(--line-strong);
}
.zone-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.zone-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  color: var(--charcoal-soft);
}

.zone-title {
  font-size: 15px;
  font-weight: 800;
  margin: 5px 0 2px;
  color: var(--charcoal);
}
.zone-desc {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.zone-bar-wrap {
  height: 5px;
  background: var(--bg-subtle);
  border-radius: 999px;
  overflow: hidden;
  margin: 8px 0 5px;
}
.zone-bar-fill {
  height: 100%;
  border-radius: inherit;
  transition: width 0.4s ease;
  background: var(--charcoal);
}
.zone-bar-fill.blue { background: var(--charcoal); }
.zone-bar-fill.green { background: var(--green); }
.zone-bar-fill.yellow { background: var(--amber); }
.zone-bar-fill.coral { background: #52525B; }

.zone-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--charcoal);
}

.cat-progress-wrap {
  height: 5px;
  background: var(--bg-subtle);
  border-radius: 999px;
  overflow: hidden;
  margin: 6px 0 8px;
}
.cat-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--charcoal);
}

/* Barcode Scanner Modal */
.scanner-screen {
  background: #09090B;
  color: #FAFAFA;
  border: 1px solid #27272A;
  border-radius: var(--radius-md);
  padding: 22px;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
}
.scanner-laser {
  position: absolute;
  left: 10%;
  right: 10%;
  height: 2px;
  background: #EF4444;
  box-shadow: 0 0 10px 1px #EF4444;
  animation: laserScan 2s ease-in-out infinite alternate;
}
@keyframes laserScan {
  0% { top: 20%; opacity: 0.6; }
  50% { opacity: 1; }
  100% { top: 80%; opacity: 0.6; }
}
.scanner-result-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
  padding: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  margin-bottom: 14px;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .zone-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-section { grid-template-columns: minmax(0, 1fr); gap: 32px; padding: 36px 0; }
  .featured-grid { grid-template-columns: minmax(0, 1fr); }
  .all-works-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .services-grid { grid-template-columns: minmax(0, 1fr); }
  .process-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .contact-section { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 768px) {
  .zone-grid { grid-template-columns: minmax(0, 1fr); }
  .quick-ops-bar { flex-direction: column; align-items: stretch; gap: 8px; }
  .quick-op-btn { justify-content: center; width: 100%; }

  .portal-wrap { width: calc(100% - 24px); }
  .portal-nav-links { display: none; }
  .brand-sub { display: none !important; }
  .brand { font-size: 15px; gap: 8px; flex-shrink: 0; }
  .brand-mark { width: 32px; height: 32px; font-size: 15px; }
  .hide-mobile { display: none !important; }
  .show-mobile { display: inline !important; }
  .portal-actions { flex-shrink: 0; }
  .portal-actions .btn.primary { font-size: 12px; padding: 5px 10px; min-height: 34px; }
  .portal-actions .btn.square { width: 34px; min-height: 34px; }

  .hero-section { padding: 22px 0; }
  .hero-featured-card { transform: none !important; }
  .mock-window-header { padding: 0 10px; gap: 8px; height: 34px; }
  .mock-url-bar { max-width: 160px; padding: 2px 8px; }
  .mock-url-text { font-size: 10px; }
  .mock-live-pill { font-size: 9.5px; padding: 2px 6px; }
  .hero-title { font-size: 26px; }
  .hero-desc { font-size: 14.5px; }
  .hero-ctas { flex-direction: column; width: 100%; }
  .hero-ctas .btn { width: 100%; }

  .all-works-grid { grid-template-columns: minmax(0, 1fr); }
  .process-grid { grid-template-columns: minmax(0, 1fr); }
  .split { grid-template-columns: minmax(0, 1fr); }
  .grid.cols-4, .grid.cols-3, .grid.cols-2 { grid-template-columns: minmax(0, 1fr); }

  .detail-grid-info { grid-template-columns: minmax(0, 1fr); }
  .detail-modal-card { width: calc(100vw - 24px); max-height: 94vh; }
  .detail-modal-header { padding: 12px 14px; gap: 8px; align-items: center; }
  .detail-modal-header > div:first-child { flex: 1; min-width: 0; }
  .detail-modal-header h2 { font-size: 16px !important; word-break: break-word; margin: 2px 0 0 !important; }
  .detail-modal-content { padding: 14px; gap: 14px; }
  .detail-modal-actions { flex-direction: column; padding: 14px; }
  .detail-modal-actions .btn { width: 100%; }

  .modal-backdrop {
    padding: 10px;
    align-items: center;
  }
  .modal {
    width: min(100%, calc(100vw - 20px)) !important;
    max-width: calc(100vw - 20px) !important;
    max-height: 92vh;
    padding: 16px 14px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    box-sizing: border-box;
    overflow-x: hidden;
  }
  .modal .card-head {
    margin-bottom: 12px;
    padding-bottom: 10px;
    gap: 10px;
    align-items: flex-start;
  }
  .modal .card-head h2 {
    font-size: 14.5px;
    line-height: 1.3;
  }
  .modal .card-head .icon-btn {
    padding: 4px 8px;
    font-size: 11.5px;
    flex-shrink: 0;
  }
  .modal .grid.cols-2,
  .modal .grid.cols-3,
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .modal .modal-actions,
  .modal .form-actions,
  .modal form > div:last-child {
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
    justify-content: stretch !important;
    padding-top: 10px;
    margin-top: 12px;
  }
  .modal .modal-actions .btn,
  .modal .form-actions .btn,
  .modal form > div:last-child .btn {
    width: 100% !important;
    justify-content: center;
  }

  .demo-shell {
    min-height: 46px;
    height: 46px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: nowrap;
  }
  .shell-back { font-size: 11px; padding: 4px 8px; white-space: nowrap; flex-shrink: 0; }
  .shell-project { display: none; }
  .shell-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
  .shell-actions .btn { font-size: 11px; padding: 4px 8px; min-height: 28px; white-space: nowrap; }
  .choice-wrap h1 { font-size: 22px; word-break: break-word; }

  .contact-section { padding: 20px; }
  .portal-footer { flex-direction: column; gap: 10px; text-align: center; }

  .app-topbar-main {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px 14px;
  }
  .app-title-row {
    gap: 8px;
  }
  .app-title h1 {
    font-size: 17px;
  }
  .app-actions {
    justify-content: flex-start;
    gap: 6px;
  }
  .app-topbar-nav {
    padding: 6px 14px 10px;
  }
  .tab {
    height: 32px;
    padding: 0 10px;
    font-size: 11.5px;
  }
  .page-pad {
    padding: 14px 14px 32px;
  }
  .toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
  }
  .toolbar input.input {
    max-width: 100% !important;
    margin-left: 0 !important;
  }
  .choice-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .choice-card {
    padding: 20px 16px;
    min-height: auto;
  }
  .pipeline {
    min-width: 960px;
  }
  .contract-paper {
    padding: 20px 14px;
  }
}


/* ==========================================================================
   LogisME Authentic Design System Rules
   ========================================================================== */

/* Background Atmosphere (Authentic LogisME Multi-Band Diagonal Stripes) */
body {
  min-width: 320px;
  max-width: 100%;
  overflow-x: hidden;
  background-color: #D4E4F1 !important;
  background-image: url('/assets/logis-bg-light.webp') !important;
  background-size: 960px 960px !important;
  background-repeat: repeat !important;
  background-attachment: scroll !important;
  color: var(--text);
  font-family: 'Plus Jakarta Sans', 'Prompt', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

html[data-theme="dark"] body {
  background-color: #0B111D !important;
  background-image: url('/assets/logis-bg-dark.webp') !important;
  background-size: 960px 960px !important;
  background-repeat: repeat !important;
  background-attachment: scroll !important;
  color: var(--text);
}

/* Enterprise Studio Topbar & Navigation (Bulletproof) */
.portal-nav {
  position: sticky !important;
  top: 0 !important;
  z-index: 1000 !important;
  width: 100% !important;
  height: 64px !important;
  min-height: 64px !important;
  max-height: 64px !important;
  background: rgba(244, 247, 252, 0.94) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border-bottom: 1px solid rgba(22, 119, 255, 0.12) !important;
  box-sizing: border-box !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
}
html[data-theme="dark"] .portal-nav {
  background: rgba(16, 25, 38, 0.94) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.portal-nav-container {
  max-width: 1240px;
  width: 100%;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-sizing: border-box;
}

.portal-nav-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.portal-brand-badge {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #1677FF;
  color: #FFFFFF;
  font-weight: 900;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(22, 119, 255, 0.35);
  flex-shrink: 0;
}
.portal-brand-info {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.portal-brand-name {
  font-size: 16px;
  font-weight: 800;
  color: #1677FF;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.portal-brand-tag {
  font-size: 9.5px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.portal-nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
}
.portal-nav-item {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--charcoal);
  opacity: 0.8;
  padding: 6px 10px;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.portal-nav-item:hover {
  opacity: 1;
  color: #1677FF;
  background: rgba(22, 119, 255, 0.08);
}

.portal-nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.portal-search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 150px;
  transition: width 0.2s ease;
}
.portal-search-box:focus-within {
  width: 190px;
}
.portal-search-box input {
  width: 100%;
  height: 34px;
  padding: 6px 26px 6px 30px;
  border-radius: 9999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-size: 12.5px;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}
.portal-search-box input:focus {
  border-color: #1677FF;
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.15);
}
.portal-search-box .search-icon-slot {
  position: absolute;
  left: 10px;
  color: var(--muted);
  pointer-events: none;
  display: flex;
  align-items: center;
}
.portal-search-box .clear-search-btn {
  position: absolute;
  right: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
  background: none;
  border: none;
  cursor: pointer;
}

.portal-nav-cta {
  height: 34px;
  padding: 0 14px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(22, 119, 255, 0.25);
  display: inline-flex;
  align-items: center;
}

.portal-mobile-toggle {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
}
.portal-mobile-toggle:hover {
  background: var(--bg-subtle);
  border-color: #1677FF;
}
.hamburger-bar {
  width: 18px;
  height: 2px;
  background: var(--charcoal);
  border-radius: 2px;
  transition: all 0.2s ease;
}
.portal-mobile-toggle.active .hamburger-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.portal-mobile-toggle.active .hamburger-bar:nth-child(2) {
  opacity: 0;
}
.portal-mobile-toggle.active .hamburger-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.portal-mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--panel);
  border-bottom: 2px solid var(--line);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.16);
  padding: 16px 20px;
  z-index: 999;
  animation: slideDownNav 0.2s ease-out;
}
@keyframes slideDownNav {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.mobile-menu-inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.mobile-menu-search {
  position: relative;
  width: 100%;
}
.mobile-menu-search input {
  width: 100%;
  height: 38px;
  padding: 8px 12px 8px 34px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-subtle);
  color: var(--text);
  font-size: 13.5px;
  box-sizing: border-box;
  outline: none;
}
.mobile-menu-search input:focus {
  border-color: #1677FF;
}
.mobile-menu-search .search-icon-slot {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}
.mobile-menu-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--charcoal);
  text-decoration: none;
  transition: background 0.15s ease;
}
.mobile-nav-link:hover, .mobile-nav-link:active {
  background: rgba(22, 119, 255, 0.08);
  color: #1677FF;
}
.mobile-nav-link.highlight {
  background: #1677FF;
  color: #FFFFFF !important;
}
.mobile-menu-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

@media (max-width: 1240px) {
  .portal-brand-tag {
    display: none !important;
  }
}

@media (max-width: 1120px) {
  .portal-nav-menu {
    display: none !important;
  }
  .portal-mobile-toggle {
    display: flex !important;
  }
}

@media (max-width: 768px) {
  .portal-search-box {
    display: none !important;
  }
  .portal-nav-container {
    padding: 0 16px !important;
  }
}

@media (max-width: 540px) {
  .portal-nav {
    height: 56px !important;
    min-height: 56px !important;
    max-height: 56px !important;
  }
  .portal-nav-container {
    padding: 0 12px !important;
    gap: 8px !important;
  }
  .portal-brand-name {
    font-size: 15px !important;
  }
  .portal-brand-badge {
    width: 30px !important;
    height: 30px !important;
    font-size: 15px !important;
  }
  .topbar-theme-pill {
    height: 30px !important;
  }
  .topbar-theme-pill .theme-opt {
    width: 24px !important;
    height: 24px !important;
  }
  .portal-nav-cta {
    font-size: 11.5px !important;
    padding: 0 10px !important;
    height: 30px !important;
  }
  .portal-mobile-toggle {
    width: 34px !important;
    height: 34px !important;
  }
}

.bell-btn {
  position: relative;
}
.bell-unread-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #1677FF;
  border: 1.5px solid var(--panel);
}

/* User Badge */
.topbar-user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 10px 3px 4px;
  border-radius: 9999px;
  background: var(--panel);
  border: 1px solid var(--line);
  cursor: pointer;
}
.user-avatar-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #1677FF;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.user-meta-lines {
  display: flex;
  flex-direction: column;
  text-align: left;
}
.user-name-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--charcoal);
  line-height: 1.2;
}
.user-role-text {
  font-size: 10px;
  color: var(--muted);
  line-height: 1;
}
.user-chevron-icon {
  color: var(--muted);
  margin-left: 2px;
}

/* Hero Section */
.hero-section {
  padding: 56px 0 40px !important;
  display: grid !important;
  grid-template-columns: 1.05fr 1fr !important;
  gap: 40px !important;
  align-items: center !important;
}

.hero-blue-lead {
  display: block;
  color: #1677FF;
  font-size: clamp(34px, 4.2vw, 54px);
  font-weight: 850;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.hero-desc {
  font-size: 16px;
  line-height: 1.65;
  color: #334155;
  margin: 18px 0 26px;
  max-width: 540px;
}
html[data-theme="dark"] .hero-desc {
  color: #94A3B8;
}

.hero-ctas {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}
.hero-btn {
  min-height: 44px;
  padding: 10px 22px;
  font-size: 14.5px;
  border-radius: 10px;
}
.btn.outline {
  background: var(--panel);
  border: 1px solid var(--line-strong);
  color: var(--text);
}
.btn.outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Tablet Device Frame */
.tablet-device-frame {
  background: #0B0F19;
  border-radius: 26px;
  padding: 12px 14px 14px;
  box-shadow: 
    0 28px 60px -15px rgba(22, 119, 255, 0.24),
    0 18px 36px -18px rgba(15, 23, 42, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  position: relative;
}
.tablet-lens {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #1E293B;
  border: 1px solid #334155;
  margin: 0 auto 8px;
}
.tablet-screen {
  background: var(--panel);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.tablet-screen-bar {
  background: #F1F5F9;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  font-size: 11.5px;
  font-weight: 600;
}
html[data-theme="dark"] .tablet-screen-bar {
  background: #141E2E;
}
.tablet-brand-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--charcoal);
}
.screen-blue-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1677FF;
}
.tablet-live-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 9999px;
  background: #ECFDF5;
  color: #059669;
  font-size: 10.5px;
  font-weight: 700;
}
.pulse-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 6px #10B981;
}
.tablet-screen-img img {
  width: 100%;
  height: auto;
  display: block;
}

/* Floating Badge on Tablet */
.tablet-card-badge {
  margin-top: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 6px 18px -4px rgba(22, 119, 255, 0.12);
}
.tablet-badge-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #EBF3FC;
  color: #1677FF;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
html[data-theme="dark"] .tablet-badge-icon {
  background: #16273C;
  color: #3B82F6;
}
.tablet-badge-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  text-align: left;
}
.tablet-badge-info strong {
  font-size: 13.5px;
  color: var(--charcoal);
}
.tablet-badge-info span {
  font-size: 11.5px;
  color: var(--muted);
}

/* Overview Dashboard Section ("Hello, Platform Administrator") */
.overview-section {
  margin-top: 10px;
}
.overview-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.overview-heading {
  font-size: 26px;
  font-weight: 800;
  color: var(--charcoal);
  line-height: 1.2;
  margin-bottom: 4px;
}
.overview-subtext {
  font-size: 14px;
  color: var(--muted);
}
.customize-btn {
  border-radius: 10px !important;
  min-height: 38px !important;
  padding: 6px 16px !important;
  font-size: 13px !important;
  gap: 6px !important;
}

.overview-group-title {
  margin-bottom: 14px;
}
.overview-group-title h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--charcoal);
}

.logis-metric-cards-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.logis-metric-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.logis-metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -4px rgba(22, 119, 255, 0.12);
  border-color: var(--primary);
}

.metric-card-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #EBF3FC;
  color: #1677FF;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
html[data-theme="dark"] .metric-card-icon-box {
  background: #16273C;
  color: #3B82F6;
}
.metric-card-title {
  font-size: 12.5px;
  font-weight: 500;
  color: #475569;
  line-height: 1.35;
  min-height: 34px;
  margin-bottom: 8px;
}
html[data-theme="dark"] .metric-card-title {
  color: #94A3B8;
}
.metric-card-val {
  font-size: 28px;
  font-weight: 750;
  color: var(--charcoal);
  line-height: 1;
  margin-bottom: 8px;
}
.metric-card-desc {
  font-size: 11px;
  color: var(--muted-light);
  line-height: 1.3;
}

/* Core Featured Cards (LogisME Style, NO Mac dots!) */
.logis-featured-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.logis-feat-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.logis-feat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px -6px rgba(22, 119, 255, 0.14);
  border-color: var(--primary);
}

.feat-card-header {
  padding: 16px 18px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.feat-card-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: #EBF3FC;
  color: #1677FF;
  display: flex;
  align-items: center;
  justify-content: center;
}
html[data-theme="dark"] .feat-card-icon-box {
  background: #16273C;
  color: #3B82F6;
}
.feat-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}
.feat-code {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
}

.feat-img-container {
  width: 100%;
  aspect-ratio: 16/10;
  background: var(--bg-subtle);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.feat-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.logis-feat-card:hover .feat-img-container img {
  transform: scale(1.02);
}

.feat-card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.feat-card-body h3 {
  font-size: 16.5px;
  font-weight: 750;
  color: var(--charcoal);
  margin-bottom: 6px;
}
.feat-card-body p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 14px;
  flex: 1;
}

.feat-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.feat-tag {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  font-size: 11.5px;
  font-weight: 500;
  color: #475569;
}
html[data-theme="dark"] .feat-tag {
  color: #94A3B8;
}

.feat-card-actions {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 8px;
  margin-top: auto;
}

/* Filter Controls (LogisME Segmented Pill) */
.logis-filter-bar {
  display: flex;
  margin-bottom: 24px;
}
.logis-segmented-filter {
  display: inline-flex;
  align-items: center;
  background: #E2E8F0;
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
}
html[data-theme="dark"] .logis-segmented-filter {
  background: #162436;
}
.filter-btn {
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #64748B;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}
.filter-btn:hover {
  color: var(--charcoal);
}
.filter-btn.active {
  background: #FFFFFF;
  color: #1677FF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
html[data-theme="dark"] .filter-btn.active {
  background: #0B111D;
  color: #3B82F6;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.work-item-card {
  border-radius: 14px !important;
  border: 1px solid var(--line) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}
.work-item-card:hover {
  border-color: var(--primary) !important;
  box-shadow: 0 10px 24px -4px rgba(22, 119, 255, 0.12) !important;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .logis-metric-cards-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .logis-featured-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 768px) {
  .topbar-breadcrumb, .topbar-search-wrap, .user-meta-lines {
    display: none;
  }
  .hero-section {
    grid-template-columns: minmax(0, 1fr) !important;
    padding: 32px 0 24px !important;
  }
  .logis-metric-cards-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-blue-lead {
    font-size: 32px;
  }
}


/* ==========================================================================
   Preeya Business Suite — Fix Spec Additions (P0, P1, P2)
   ========================================================================== */

/* Business Impact Badges */
.business-impact-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--blue-light);
  color: var(--primary-hover);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.4;
  margin: 8px 0 12px;
}
html[data-theme="dark"] .business-impact-badge {
  background: rgba(22, 119, 255, 0.12);
  color: #91CAFF;
  border-color: rgba(22, 119, 255, 0.28);
}

/* Topbar Status Badge & CTA Group */
.topbar-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: #065F46;
  background: #D1FAE5;
  border: 1px solid #A7F3D0;
  padding: 5px 12px;
  border-radius: 9999px;
  white-space: nowrap;
}
html[data-theme="dark"] .topbar-status-badge {
  background: rgba(16, 185, 129, 0.15);
  color: #6EE7B7;
  border-color: rgba(16, 185, 129, 0.35);
}
.topbar-cta-group {
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar-cta-btn {
  white-space: nowrap;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(22, 119, 255, 0.25);
}

/* Loading Skeleton */
.demo-loading-skeleton {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  opacity: 1;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.demo-loading-skeleton.hidden {
  opacity: 0;
  pointer-events: none;
}
.demo-skeleton-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid var(--line-strong);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: demoSpin 0.75s linear infinite;
}
@keyframes demoSpin {
  to { transform: rotate(360deg); }
}
.demo-skeleton-text {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
}
.demo-skeleton-shimmer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 80%;
  max-width: 440px;
}
.demo-skeleton-bar {
  height: 12px;
  background: linear-gradient(90deg, var(--line-subtle) 25%, var(--line) 50%, var(--line-subtle) 75%);
  background-size: 200% 100%;
  animation: demoShimmer 1.5s infinite;
  border-radius: 6px;
}
@keyframes demoShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Demo Floating Conversion Bar */
.demo-conversion-bar {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  background: var(--panel);
  border: 1px solid var(--primary-border);
  box-shadow: 0 12px 36px -4px rgba(22, 119, 255, 0.2), 0 4px 12px rgba(15, 23, 42, 0.08);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  max-width: 420px;
  width: calc(100vw - 48px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(8px);
}
.demo-conversion-bar.minimized {
  max-width: 280px;
  padding: 8px 12px;
}
.demo-conversion-bar.minimized .conversion-bar-body,
.demo-conversion-bar.minimized .conversion-bar-actions {
  display: none;
}
.conversion-bar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.conversion-bar-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.3;
}
.conversion-bar-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
  padding: 2px 6px;
  border-radius: 4px;
  min-width: 44px;
  min-height: 44px;
}
.conversion-bar-toggle:hover {
  background: var(--line-subtle);
  color: var(--text);
}
.conversion-bar-subtext {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  margin: 0;
}
.conversion-bar-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.conversion-bar-actions .btn {
  flex: 1;
  text-align: center;
  font-size: 12px;
  padding: 8px 12px;
  justify-content: center;
  white-space: nowrap;
}
@media (max-width: 768px) {
  .demo-conversion-bar {
    position: static;
    margin: 16px 12px 24px;
    width: auto;
    max-width: none !important;
    transition: none;
  }
}
body:has(.modal-backdrop) .demo-conversion-bar { display: none; }
body[data-page=crm] .demo-conversion-bar,
body[data-page=esign] .demo-conversion-bar { position:static; width:auto; max-width:650px; margin:24px auto; }
@media(max-width:768px){body[data-page=crm] .demo-conversion-bar,body[data-page=esign] .demo-conversion-bar{margin:16px 12px 24px}}

/* Pricing Grid */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
}
.pricing-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 32px 26px;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
}
.pricing-card:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.pricing-card.popular {
  border-color: var(--primary);
  box-shadow: 0 10px 32px -4px rgba(22, 119, 255, 0.18);
}
.popular-badge {
  position: absolute;
  top: -12px;
  right: 24px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.pricing-title {
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 8px;
}
.pricing-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 16px;
}
.pricing-price {
  font-size: 26px;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 6px;
}
.pricing-timeline {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pricing-features li {
  font-size: 13px;
  color: var(--text);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.4;
}
.pricing-features li span {
  color: var(--green);
  font-weight: bold;
}
.pricing-card .btn {
  width: 100%;
  justify-content: center;
  padding: 10px 16px;
  font-weight: 700;
}

/* SLA Guarantees Grid */
.guarantees-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 28px;
}
.guarantee-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.guarantee-card:hover {
  border-color: var(--primary-border);
}
.guarantee-num {
  font-size: 11px;
  font-weight: 800;
  color: var(--primary);
  background: var(--primary-light);
  width: fit-content;
  padding: 2px 8px;
  border-radius: 4px;
}
.guarantee-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
}
.guarantee-desc {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

/* About Architect Section */
.architect-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 36px;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 32px;
  align-items: start;
}
.architect-avatar-box {
  text-align: center;
}
.architect-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, #0958D9 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  font-weight: 900;
  box-shadow: 0 8px 24px rgba(22, 119, 255, 0.25);
  margin-bottom: 12px;
}
.architect-role-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 4px 10px;
  border-radius: 9999px;
}
.architect-bio h3 {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 12px;
}
.architect-bio p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 18px;
}
.tech-stack-groups {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0;
}
.tech-stack-group-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.tech-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tech-pill {
  font-size: 11.5px;
  font-weight: 600;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 9px;
  color: var(--text);
}
.architect-action-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

/* Estimator Form Section */
.estimator-section {
  padding: 64px 0 40px;
  background: var(--panel);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.estimator-card {
  max-width: 900px;
  margin: 0 auto;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-md);
}
.estimator-step {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px dashed var(--line-strong);
}
.estimator-step:last-of-type {
  border-bottom: none;
}
.estimator-step-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.estimator-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.estimator-grid-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}
.estimator-option-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.estimator-option-box:hover {
  border-color: var(--primary);
  background: var(--panel-2);
}
.estimator-option-box input {
  margin-top: 3px;
  accent-color: var(--primary);
}
.estimator-option-box.checked {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 1px var(--primary);
}
html[data-theme="dark"] .estimator-option-box.checked {
  background: rgba(22, 119, 255, 0.12);
  border-color: var(--primary);
}
.option-content small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
.estimator-calc-box {
  background: linear-gradient(135deg, rgba(22, 119, 255, 0.08) 0%, rgba(9, 88, 217, 0.04) 100%);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  margin: 20px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.calc-metric-item small {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.calc-metric-item strong {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
}
.estimator-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}
.estimator-actions .btn {
  flex: 1;
  min-width: 240px;
  padding: 12px 20px;
  font-size: 13.5px;
  font-weight: 700;
  justify-content: center;
}

/* Modals & Previews */
.barcode-sticker-box {
  background: #fff;
  color: #111;
  padding: 20px;
  border: 2px dashed #333;
  border-radius: 8px;
  max-width: 380px;
  margin: 0 auto;
  text-align: center;
  font-family: 'JetBrains Mono', 'IBM Plex Sans Thai', 'Sarabun', monospace;
}
.line-phone-frame {
  max-width: 360px;
  margin: 0 auto;
  background: #2D3748;
  border-radius: 28px;
  padding: 10px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.3);
  border: 3px solid #1A202C;
}
.line-chat-screen {
  background: #7994AA;
  border-radius: 20px;
  overflow: hidden;
  padding: 14px 10px;
}
.line-flex-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  color: #111;
}
.line-flex-header {
  background: #06C755;
  color: #fff;
  padding: 12px 14px;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.line-flex-body {
  padding: 14px;
  font-size: 12px;
  line-height: 1.5;
}
.line-flex-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 14px 14px;
  border-top: 1px solid #eee;
}
.line-flex-btn {
  background: #06C755;
  color: #fff !important;
  text-align: center;
  padding: 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
}
.line-flex-btn.secondary {
  background: #f0f0f0;
  color: #333 !important;
}

/* Tilt Signal Native Bar & Admin Desk */
.tilt-switch-bar {
  display: flex;
  background: #0D0F17;
  border-bottom: 1px solid #1E2333;
  padding: 10px 16px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 100;
}
.tilt-switch-tabs {
  display: flex;
  gap: 8px;
}
.tilt-tab-btn {
  background: #1A1F2C;
  color: #A0AEC0;
  border: 1px solid #2D3748;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.tilt-tab-btn.active {
  background: #00F0FF;
  color: #000;
  border-color: #00F0FF;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.4);
}
.tilt-booking-ticket {
  background: #0F131D;
  border: 1px solid #00F0FF;
  border-radius: 12px;
  padding: 20px;
  color: #fff;
  text-align: center;
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.2);
  max-width: 360px;
  margin: 0 auto;
}

/* Storefront Native Bar */
.storefront-native-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #111;
  color: #fff;
  padding: 10px 16px;
  border-bottom: 1px solid #333;
}

/* Section Smooth Scroll Margins (so sticky header never obscures content) */
#top, #overview, #featured, #projects, #architecture, #process, #pricing, #guarantees, #about-architect, #estimator-form, #contact {
  scroll-margin-top: 80px;
}
html {
  scroll-behavior: smooth;
}

/* Hero Status Pill */
.hero-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #065F46;
  background: #D1FAE5;
  border: 1px solid #A7F3D0;
  padding: 6px 14px;
  border-radius: 9999px;
  margin-bottom: 16px;
  white-space: nowrap;
  width: fit-content;
}
html[data-theme="dark"] .hero-status-pill {
  background: rgba(16, 185, 129, 0.15);
  color: #6EE7B7;
  border-color: rgba(16, 185, 129, 0.35);
}
.status-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseGreen 2s infinite;
}
@keyframes pulseGreen {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@media (max-width: 440px) {
  .portal-nav-cta {
    display: none !important;
  }
}
