/* ============================================
   448 Wealth Management Plan - Red & White Theme
   ============================================ */

/* View Transitions API — smooth fade ระหว่าง page navigation
   ลด flicker ตอนกดเมนู (Chrome 126+/Safari 18+) */
@view-transition {
  navigation: auto;
}
::view-transition-old(root) {
  animation: 120ms cubic-bezier(0.4, 0, 1, 1) both fade-out;
}
::view-transition-new(root) {
  animation: 120ms cubic-bezier(0, 0, 0.2, 1) both fade-in;
}
@keyframes fade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes fade-in  { from { opacity: 0; } to { opacity: 1; } }

:root {
  /* AIA Prestige theme — navy + gold (variable names kept for compatibility) */
  --red-primary:   #1F2D4F;   /* deep navy */
  --red-dark:      #0F1A2F;   /* darker navy */
  --red-light:     #3A4F75;   /* lighter navy */
  --red-soft:      #F0F2F7;   /* very soft navy bg */
  --red-mid:       #D4DAE6;   /* mid navy */
  --gold-primary:  #C9A961;   /* champagne gold accent */
  --gold-dark:     #9C7F47;   /* warm bronze */
  --gold-soft:     #F5EDD9;
  --gold-light:    #D4BA82;   /* lighter gold for highlights */
  --white:         #FFFFFF;
  --gray-100:      #F8F9FA;
  --gray-200:      #E9ECEF;
  --gray-400:      #ADB5BD;
  --gray-600:      #6C757D;
  --gray-800:      #343A40;
  --shadow-sm:     0 2px 8px rgba(31,45,79,.12);
  --shadow-md:     0 4px 20px rgba(31,45,79,.18);
  --shadow-lg:     0 8px 40px rgba(31,45,79,.22);
  --radius:        16px;
  --radius-sm:     10px;
  --font:          'Sarabun', 'Prompt', sans-serif;
}

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

html { overflow-x: hidden; max-width: 100vw; }

/* Mini avatar in client picker (every page with client-select) */
.cp-mini-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255,255,255,.3);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
  font-size: .92rem; font-weight: 800; color: white;
}
.cp-mini-avatar img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
body {
  font-family: var(--font);
  background: var(--gray-100);
  color: var(--gray-800);
  min-height: 100vh;
  overflow-x: hidden; max-width: 100vw;
  /* กัน horizontal scroll ทั้งหน้า — element ใน element ยังเลื่อนได้ */
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* ─── TYPOGRAPHY ─── */
h1 { font-size: 2.4rem; font-weight: 700; line-height: 1.2; }
h2 { font-size: 1.8rem; font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }
p  { font-size: 1rem; line-height: 1.6; }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: 50px;
  font-size: 1rem; font-weight: 600; cursor: pointer;
  border: none; transition: all .25s;
}
.btn-primary {
  background: var(--red-primary); color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--red-dark); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-outline {
  background: transparent; color: var(--red-primary);
  border: 2px solid var(--red-primary);
}
.btn-outline:hover { background: var(--red-primary); color: var(--white); }
.btn-white {
  background: var(--white); color: var(--red-primary);
  box-shadow: var(--shadow-sm);
}
.btn-white:hover { background: var(--red-soft); transform: translateY(-2px); }

/* ─── NAVBAR ─── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--white);
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  height: 68px; display: flex; align-items: center;
}
.navbar-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  width: 100%; display: flex; align-items: center; justify-content: space-between;
}
.navbar-brand {
  display: flex; align-items: center; gap: 10px;
}
.navbar-logo {
  width: 42px; height: 42px; flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(208,2,27,.35));
}
.navbar-logo svg { width: 100%; height: 100%; display: block; }
.navbar-name {
  font-size: 1.05rem; font-weight: 800; color: var(--gray-800);
  letter-spacing: -.01em; line-height: 1.15;
}
.navbar-name span {
  display: inline-block; color: var(--red-primary); font-weight: 700;
  font-size: .9rem; letter-spacing: .08em; margin-left: 2px;
}
.navbar-menu {
  display: flex; align-items: center; gap: 4px; list-style: none;
}
.navbar-menu li a {
  padding: 8px 16px; border-radius: 8px; font-size: 0.95rem; font-weight: 500;
  color: var(--gray-600); transition: all .2s;
}
.navbar-menu li a:hover, .navbar-menu li a.active {
  background: var(--red-soft); color: var(--red-primary);
}
.navbar-actions { display: flex; align-items: center; gap: 10px; }

/* ─── PAGE WRAPPER ─── */
.page { padding-top: 68px; min-height: 100vh; }

/* ─── HERO ─── */
.hero {
  background: linear-gradient(135deg, var(--red-primary) 0%, var(--red-dark) 60%, #6B000D 100%);
  color: white; padding: 80px 24px 100px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -50%; right: -10%;
  width: 600px; height: 600px;
  background: rgba(255,255,255,.06); border-radius: 50%;
}
.hero::after {
  content: ''; position: absolute; bottom: -60%; left: -5%;
  width: 500px; height: 500px;
  background: rgba(255,255,255,.04); border-radius: 50%;
}
.hero-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
  position: relative; z-index: 1;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.2); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.3);
  padding: 6px 16px; border-radius: 50px;
  font-size: 0.85rem; margin-bottom: 20px;
}
.hero h1 { font-size: 2.8rem; margin-bottom: 16px; }
.hero p { font-size: 1.1rem; opacity: .85; margin-bottom: 36px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats {
  display: flex; gap: 32px; margin-top: 48px;
}
.hero-stat .num { font-size: 2rem; font-weight: 800; }
.hero-stat .lbl { font-size: 0.85rem; opacity: .7; }
.hero-visual {
  display: flex; justify-content: center; align-items: center;
}
.hero-card-float {
  background: white; border-radius: var(--radius); padding: 28px;
  box-shadow: var(--shadow-lg); min-width: 300px;
  animation: float 4s ease-in-out infinite;
}
@keyframes float {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}
.hero-card-float .card-title { color: var(--red-primary); font-weight: 700; margin-bottom: 12px; }
.hero-card-float .progress-bar { height: 8px; background: var(--red-soft); border-radius: 4px; overflow: hidden; margin-bottom: 8px; }
.hero-card-float .progress-fill { height: 100%; background: linear-gradient(90deg, var(--red-primary), var(--red-light)); border-radius: 4px; }

/* ─── SECTION ─── */
.section { padding: 72px 24px; }
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-head { text-align: center; margin-bottom: 48px; }
.section-head .tag {
  display: inline-block; background: var(--red-soft); color: var(--red-primary);
  font-size: 0.8rem; font-weight: 700; padding: 4px 14px;
  border-radius: 50px; margin-bottom: 12px; letter-spacing: 0.05em; text-transform: uppercase;
}
.section-head h2 { color: var(--gray-800); margin-bottom: 10px; }
.section-head p { color: var(--gray-600); }

/* ─── FEATURE CARDS GRID ─── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}
.feature-card {
  background: white; border-radius: var(--radius); padding: 28px 20px;
  text-align: center; cursor: pointer;
  box-shadow: var(--shadow-sm); transition: all .28s;
  border: 2px solid transparent;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.feature-card:hover {
  transform: translateY(-6px); box-shadow: var(--shadow-md);
  border-color: var(--red-primary);
}
.feature-card .icon {
  width: 68px; height: 68px; border-radius: 50%;
  background: var(--red-soft); display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; transition: all .28s;
}
.feature-card:hover .icon { background: var(--red-primary); }
.feature-card:hover .icon svg { filter: brightness(10); }
.feature-card .label { font-weight: 700; font-size: 1rem; color: var(--gray-800); }
.feature-card .sublabel { font-size: 0.82rem; color: var(--gray-600); }
.feature-card .badge {
  background: var(--red-soft); color: var(--red-primary);
  font-size: 0.75rem; padding: 2px 10px; border-radius: 50px; font-weight: 600;
}

/* ─── DASHBOARD LAYOUT ─── */
.dashboard-page { display: flex; min-height: calc(100vh - 68px); }
.sidebar {
  width: 260px; background: white; border-right: 1px solid var(--gray-200);
  padding: 24px 0; flex-shrink: 0; position: sticky; top: 68px; height: calc(100vh - 68px); overflow-y: auto;
}
.sidebar-section { padding: 0 16px; margin-bottom: 8px; }
.sidebar-label {
  font-size: 0.72rem; font-weight: 700; color: var(--gray-400);
  text-transform: uppercase; letter-spacing: .08em; padding: 12px 8px 6px;
}
.sidebar-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.95rem; font-weight: 500; cursor: pointer;
  color: var(--gray-600); transition: all .2s;
}
.sidebar-item:hover { background: var(--red-soft); color: var(--red-primary); }
.sidebar-item.active { background: var(--red-soft); color: var(--red-primary); font-weight: 700; }
.sidebar-item .ico { font-size: 1.2rem; width: 24px; text-align: center; }
.dashboard-content { flex: 1; padding: 32px; overflow-y: auto; }
.dashboard-header { margin-bottom: 28px; }
.dashboard-header h2 { font-size: 1.5rem; }
.dashboard-header p { color: var(--gray-600); font-size: 0.95rem; }

/* ─── STAT CARDS ─── */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.stat-card {
  background: white; border-radius: var(--radius-sm); padding: 20px;
  box-shadow: var(--shadow-sm); border-left: 4px solid var(--red-primary);
}
.stat-card .s-label { font-size: 0.82rem; color: var(--gray-600); margin-bottom: 6px; }
.stat-card .s-value { font-size: 1.6rem; font-weight: 800; color: var(--gray-800); }
.stat-card .s-change { font-size: 0.78rem; color: #28a745; margin-top: 4px; }

/* ─── ACCORDION ─── */
.accordion { border-radius: var(--radius); overflow: hidden; }
.acc-item { border-bottom: 1px solid var(--gray-200); }
.acc-item:last-child { border-bottom: none; }
.acc-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; cursor: pointer; background: white; transition: background .2s;
}
.acc-header:hover { background: var(--red-soft); }
.acc-header.open { background: var(--red-soft); color: var(--red-primary); }
.acc-header-left { display: flex; align-items: center; gap: 14px; font-weight: 600; }
.acc-header-ico { font-size: 1.3rem; }
.acc-arrow { font-size: 1rem; transition: transform .3s; }
.acc-header.open .acc-arrow { transform: rotate(180deg); }
.acc-body { display: none; padding: 16px 22px 22px 60px; background: white; }
.acc-body.open { display: block; }
.acc-body p { color: var(--gray-600); font-size: 0.95rem; margin-bottom: 12px; }
.acc-body ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.acc-body ul li {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.93rem; color: var(--gray-700);
}
.acc-body ul li::before { content: '✓'; color: var(--red-primary); font-weight: 700; }

/* ─── GUIDE PAGE ─── */
.guide-layout {
  max-width: 960px; margin: 0 auto; padding: 40px 24px;
}
.guide-top {
  background: linear-gradient(135deg, var(--red-primary), var(--red-dark));
  color: white; border-radius: var(--radius); padding: 36px;
  margin-bottom: 32px; text-align: center;
}
.guide-top h2 { font-size: 1.8rem; margin-bottom: 8px; }
.guide-top p { opacity: .85; }
.video-card {
  background: white; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); margin-bottom: 20px;
}
.video-thumb {
  width: 100%; height: 220px;
  background: linear-gradient(135deg, var(--red-soft), var(--red-mid));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; cursor: pointer; position: relative;
}
.video-thumb .play-btn {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--red-primary); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; transition: all .25s; box-shadow: var(--shadow-md);
}
.video-thumb:hover .play-btn { transform: scale(1.12); }
.video-thumb .vid-title { font-weight: 700; color: var(--red-dark); font-size: 1rem; }
.video-info { padding: 18px 22px; }
.video-info h4 { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.video-info p { font-size: 0.88rem; color: var(--gray-600); }
.video-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* ─── LOGIN PAGE ─── */
.login-page {
  min-height: 100vh; display: flex;
  background: linear-gradient(135deg, var(--red-primary) 0%, var(--red-dark) 100%);
}
.login-left {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: white; padding: 60px; gap: 24px;
}
.login-left h1 { font-size: 2.4rem; }
.login-left p { font-size: 1.1rem; opacity: .8; max-width: 380px; text-align: center; }
.login-right {
  width: 480px; background: white; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 60px 48px;
}
.login-right h2 { font-size: 1.6rem; font-weight: 800; margin-bottom: 6px; }
.login-right .sub { color: var(--gray-600); margin-bottom: 36px; }
.tabs { display: flex; border-radius: 10px; overflow: hidden; margin-bottom: 28px; background: var(--gray-100); padding: 4px; width: 100%; }
.tab-btn {
  flex: 1; padding: 10px; border: none; background: none; cursor: pointer;
  font-size: 0.95rem; font-weight: 600; border-radius: 8px; transition: all .2s;
  color: var(--gray-600);
}
.tab-btn.active { background: white; color: var(--red-primary); box-shadow: var(--shadow-sm); }
.form-group { width: 100%; margin-bottom: 18px; }
.form-group label { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 6px; color: var(--gray-700); }
.form-group input {
  width: 100%; padding: 12px 16px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--gray-200); font-size: 0.95rem; transition: all .2s;
  font-family: var(--font);
}
.form-group input:focus { outline: none; border-color: var(--red-primary); box-shadow: 0 0 0 3px var(--red-soft); }
.form-footer { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; font-size: 0.88rem; }
.form-footer a { color: var(--red-primary); font-weight: 600; }
.login-btn { width: 100%; padding: 14px; font-size: 1rem; }
.divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--gray-400); font-size: 0.85rem; width: 100%; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--gray-200); }

/* ─── FOOTER ─── */
footer {
  background: var(--gray-800); color: var(--gray-400); text-align: center;
  padding: 28px 24px; font-size: 0.88rem;
}
footer span { color: var(--red-primary); font-weight: 700; }

/* ─── UTILITIES ─── */
.red { color: var(--red-primary); }
.bg-red { background: var(--red-primary); color: white; }
.bg-soft { background: var(--red-soft); }
.rounded { border-radius: var(--radius); }
.shadow { box-shadow: var(--shadow-sm); }
.text-center { text-align: center; }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.gap-16 { gap: 16px; }

/* ════════════════════════════════════════════════
   APP SHELL — Mockup C layout
   (ใช้กับ dashboard.html, clients.html, etc.)
════════════════════════════════════════════════ */
.app-layout {
  display: flex; min-height: 100vh; background: #FAFAFA;
  overflow-x: hidden; max-width: 100vw;
}

/* Sidebar */
.app-sidebar {
  width: 240px; background: #fff;
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; height: 100vh;
  border-right: 1px solid #EFEFEF; z-index: 50;
  overflow-y: auto; overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #ddd transparent;
}
.app-sidebar::-webkit-scrollbar { width: 6px; }
.app-sidebar::-webkit-scrollbar-track { background: transparent; }
.app-sidebar::-webkit-scrollbar-thumb { background: #ddd; border-radius: 3px; }
.app-sidebar::-webkit-scrollbar-thumb:hover { background: var(--red-primary); }
.sb-top-accent {
  height: 4px;
  background: linear-gradient(90deg, var(--red-primary), #FF6B6B);
  flex-shrink: 0;
}
.sb-logo-area { padding: 14px 22px 10px; }
.sb-brand { font-size: 1.35rem; font-weight: 800; color: var(--red-primary); }
.sb-tagline {
  font-size: .66rem; color: #bbb;
  letter-spacing: .8px; text-transform: uppercase; margin-top: 2px;
}
.sb-divider { height: 1px; background: #F5F5F5; margin: 0 22px 8px; }
.app-sb-section { padding: 0 12px; margin-bottom: 6px; }
.app-sb-lbl {
  font-size: .62rem; color: #ccc; font-weight: 700;
  letter-spacing: .9px; text-transform: uppercase;
  padding: 0 10px; margin-bottom: 3px;
}
.app-sb-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: 8px;
  font-size: .85rem; font-weight: 600; color: #888;
  cursor: pointer; transition: all .15s; margin-bottom: 1px;
}
.app-sb-item:hover  { background: #FFF5F5; color: var(--red-primary); }
.app-sb-item.active { background: #FFF0F0; color: var(--red-primary); font-weight: 700; }
.app-sb-item .sb-ico { font-size: .95rem; width: 20px; text-align: center; flex-shrink: 0; }
.app-sb-item .sb-badge {
  margin-left: auto; background: var(--red-primary); color: #fff;
  font-size: .63rem; font-weight: 700; padding: 2px 7px; border-radius: 10px;
}
.sb-bottom-area {
  margin-top: auto; padding: 10px 14px;
  border-top: 1px solid #F5F5F5;
}
.sb-profile-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; border-radius: 10px; background: #FAFAFA;
  cursor: pointer; transition: background .15s;
}
.sb-profile-row:hover { background: #FFF5F5; }
.sb-avatar-box {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--red-primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .9rem; flex-shrink: 0;
}
.sb-avatar-box.has-photo {
  background-size: cover; background-position: center;
  background-repeat: no-repeat; color: transparent; font-size: 0;
}
.sb-profile-name { font-size: .82rem; font-weight: 700; color: #333; }
.sb-profile-role { font-size: .68rem; color: #bbb; }

/* Main area */
.app-main {
  margin-left: 240px;
  width: calc(100vw - 240px); /* ใช้ 100vw แทน 100% เพื่อ exact viewport (กัน parent padding คำนวณผิด) */
  max-width: calc(100vw - 240px);
  display: flex; flex-direction: column; min-height: 100vh;
  min-width: 0; overflow-x: hidden; /* clip ทุกอย่างที่ล้น */
  transition: margin-left .28s ease, width .28s ease, max-width .28s ease;
}

/* ════ Sidebar COLLAPSE (Option A — slide out fully) ════ */
.app-sidebar {
  transition: transform .28s ease;
}
.app-sidebar.collapsed { transform: translateX(-100%); }
.app-main.expanded {
  margin-left: 0;
  width: 100vw;
  max-width: 100vw;
}

/* Toggle button — inside sidebar header */
.sb-collapse-btn {
  position: absolute; top: 12px; right: 12px;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--red-soft); color: var(--red-primary);
  border: 1.5px solid var(--red-primary);
  cursor: pointer; font-size: .82rem; font-weight: 700; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .15s;
  font-family: var(--font);
}
.sb-collapse-btn:hover { background: var(--red-primary); color: white; transform: scale(1.05); }
.sb-logo-area { position: relative; }

/* Reopen handle — floating button at left edge when sidebar is hidden */
.sb-reopen-handle {
  position: fixed; top: 50%; left: 0;
  transform: translateY(-50%) translateX(-100%);
  width: 28px; height: 60px;
  border-radius: 0 12px 12px 0;
  background: var(--red-primary); color: white;
  border: none; cursor: pointer;
  font-size: .88rem; font-weight: 700; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 2px 4px 12px rgba(0,0,0,.18);
  transition: transform .28s ease, background .15s;
  z-index: 49;
  font-family: var(--font);
  opacity: 0;
  pointer-events: none;
}
.sb-reopen-handle.visible {
  transform: translateY(-50%) translateX(0);
  opacity: 1;
  pointer-events: auto;
}
.sb-reopen-handle:hover { background: var(--red-dark); width: 32px; }

/* ════════════════════════════════════════════
   SVG ICON LIBRARY — modern flat icons
   ใช้ผ่าน icons.js — เปลี่ยนสีด้วย color (currentColor)
═══════════════════════════════════════════ */
.svg-icon {
  display: inline-block; vertical-align: -3px;
  flex-shrink: 0;
}
/* sidebar icons — red filled, follows .app-sb-item color */
.app-sb-item .sb-ico.has-svg-icon { color: inherit; }
.app-sb-item .sb-ico .svg-icon { width: 18px; height: 18px; }

/* Circular badge version — สำหรับ page header icons */
.svg-icon-circle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--red-soft); color: var(--red-primary);
  flex-shrink: 0;
}
.svg-icon-circle .svg-icon { width: 30px; height: 30px; }
.svg-icon-circle.large {
  width: 76px; height: 76px;
}
.svg-icon-circle.large .svg-icon { width: 40px; height: 40px; }

/* Small inline icon (for row labels in tables/lists) */
.svg-icon-sm {
  width: 18px; height: 18px;
}
.svg-icon-inline {
  width: 16px; height: 16px; vertical-align: -2px; margin-right: 6px;
  color: var(--red-primary);
}

/* ════════════════════════════════════════════
   AIA PRESTIGE — GOLD ACCENTS
   เติม gold/bronze บน navy ให้ดูพรีเมียม + อบอุ่นขึ้น
═══════════════════════════════════════════ */

/* Hero gradient stripe — bottom diagonal gold accent (Prestige Handbook style) */
.feature-hero {
  position: relative;
  overflow: hidden;
}
.feature-hero::before {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 20px;
  background: linear-gradient(120deg,
    transparent 0%, transparent 25%,
    var(--gold-dark) 30%, var(--gold-primary) 55%,
    var(--gold-light) 75%, transparent 92%, transparent 100%);
  pointer-events: none;
}
.feature-hero::after {
  content: ''; position: absolute; bottom: 20px; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
  pointer-events: none;
}
.feature-hero > * { position: relative; z-index: 1; }

/* Primary CTA — gold gradient with navy text (premium pop) */
.btn-primary {
  background: linear-gradient(135deg, var(--gold-light), var(--gold-primary)) !important;
  color: var(--red-primary) !important;
  border: 1.5px solid var(--gold-primary) !important;
  text-shadow: 0 1px 0 rgba(255,255,255,.3);
  font-weight: 800 !important;
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark)) !important;
  color: white !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(156,127,71,.35) !important;
}

/* Active sidebar item — gold left border accent */
.app-sb-item.active {
  position: relative;
  background: var(--red-soft);
  color: var(--red-primary);
  font-weight: 700;
}
.app-sb-item.active::before {
  content: ''; position: absolute; left: -2px; top: 4px; bottom: 4px;
  width: 3px; border-radius: 2px;
  background: linear-gradient(180deg, var(--gold-primary), var(--gold-dark));
}

/* Flow next button (→) — gold gradient (sticky bottom bar CTA) */
.flow-nav-btn.next,
.flow-next-btn,
[class*="flow-btn"][class*="next"],
[class*="-next-btn"]:not([class*="prev"]) {
  background: linear-gradient(135deg, var(--gold-light), var(--gold-primary)) !important;
  color: var(--red-primary) !important;
  border-color: var(--gold-primary) !important;
  font-weight: 800 !important;
}
.flow-nav-btn.next:hover,
.flow-next-btn:hover {
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark)) !important;
  color: white !important;
  box-shadow: 0 4px 12px rgba(156,127,71,.35) !important;
}

/* Page header circles — luxury navy bg + gold border + gold icon (premium feel) */
.ast-section-icon,
.r2-section-icon,
.r3-head-icon,
.e2-head-icon,
.e3-head-icon,
.li2-head-icon,
.g2-head-icon,
.ps2-head-icon,
.p2-head-icon {
  background: linear-gradient(135deg, var(--red-primary), var(--red-dark)) !important;
  border: 2.5px solid var(--gold-primary) !important;
  color: var(--gold-primary) !important;
  box-shadow: 0 4px 12px rgba(31,45,79,.25), inset 0 0 0 2px rgba(201,169,97,.15);
}
/* health-insurance uses square icon — keep square but apply gold theme */
.hi2-head-icon {
  background: linear-gradient(135deg, var(--red-primary), var(--red-dark)) !important;
  border: 2.5px solid var(--gold-primary) !important;
  color: var(--gold-primary) !important;
}

/* Decorative gold underline for section titles (subtle) */
.app-sb-lbl {
  color: var(--gold-dark) !important;
  position: relative;
}

/* Sticky topbar */
.app-topbar {
  background: #fff; border-bottom: 1px solid #F0F0F0;
  padding: 14px 30px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 10;
}
.app-topbar-left .tb-title { font-size: .98rem; font-weight: 800; color: #1a1a1a; }
.app-topbar-left .tb-date  { font-size: .76rem; color: #bbb; margin-top: 1px; }
.app-topbar-right { display: flex; gap: 10px; }
.btn-app-primary {
  padding: 8px 18px; border-radius: 8px;
  font-family: var(--font); font-size: .82rem; font-weight: 700;
  cursor: pointer; border: none;
  background: var(--red-primary); color: #fff; transition: background .18s;
}
.btn-app-primary:hover { background: var(--red-dark); }
.btn-app-ghost {
  padding: 8px 18px; border-radius: 8px;
  font-family: var(--font); font-size: .82rem; font-weight: 700;
  cursor: pointer; background: transparent;
  color: var(--red-primary); border: 1.5px solid #FFCDD2; transition: all .18s;
}
.btn-app-ghost:hover { background: var(--red-soft); }

/* Scrollable content */
.app-content { padding: 22px 30px; flex: 1; }

/* Hide old navbar + reset page padding when app-layout is used */
body:has(.app-layout) .navbar { display: none !important; }
body:has(.app-layout) .page   { padding-top: 0; }

/* ─── STAT CARDS (Mockup C icon style) ─── */
.mc-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 14px; margin-bottom: 22px;
}
.mc-stat {
  background: #fff; border-radius: 12px;
  padding: 18px 20px; border: 1px solid #F5F5F5;
  display: flex; align-items: flex-start; gap: 14px;
  transition: box-shadow .18s;
}
.mc-stat:hover { box-shadow: 0 4px 16px rgba(208,2,27,.1); }
.mc-stat-ico { font-size: 1.35rem; margin-top: 2px; flex-shrink: 0; }
.mc-stat-lbl { font-size: .72rem; color: #bbb; font-weight: 600; margin-bottom: 5px; }
.mc-stat-val { font-size: 1.3rem; font-weight: 800; color: #1a1a1a; line-height: 1.1; }
.mc-stat-val.red { color: var(--red-primary); }
.mc-stat-tag {
  font-size: .68rem; font-weight: 700;
  padding: 2px 8px; border-radius: 6px;
  margin-top: 5px; display: inline-block;
}
.mc-stat-tag.green { color: #27AE60; background: #E8F8EE; }
.mc-stat-tag.gray  { color: #888;    background: #F0F0F0; }

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .sidebar { display: none; }
  .video-grid { grid-template-columns: 1fr; }
  .login-left { display: none; }
  .login-right { width: 100%; }
}
@media (max-width: 600px) {
  h1 { font-size: 1.8rem; }
  .stats-row { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}
