/* Home-only stylesheet: professional, clean, minimal */
:root {
  --brand: #0b5ed7;
  --brand-2: #084298;
  --ink: #1a1d29;
  --muted: #6b7280;
  --bg: #f6f8fc;
  --card: #ffffff;
  --accent: #22c55e;
  --danger: #dc2626;
  --gold: #f0ad4e;
}
* { box-sizing: border-box; }
html, body { margin:0; padding:0; }
body { font-family: 'Sarabun', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; color: var(--ink); background: var(--bg); }

/* Header */
.site-header { position: sticky; top:0; z-index: 10; background: linear-gradient(90deg, var(--brand-2), var(--brand)); color:#fff; box-shadow: 0 2px 12px rgba(0,0,0,.08); }
.site-header__inner { max-width: 1080px; margin:0 auto; padding: 14px 16px; display:flex; align-items:center; justify-content: space-between; }
.brand { display:flex; align-items:center; gap:10px; font-weight:700; letter-spacing: .2px; }
.brand img { height: 28px; width: 28px; }
.brand span { font-size: 1.05rem; }
.nav a { color:#fff; text-decoration:none; padding:8px 12px; border-radius:8px; font-weight:600; opacity:.92; }
.nav a:hover { background: rgba(255,255,255,.12); opacity:1; }

/* Main container */
.container { max-width: 1080px; margin: 28px auto; padding: 0 16px; }

/* Hero */
.hero { background: linear-gradient(180deg, #ffffff, #f2f6ff); border-radius: 16px; padding: 28px 22px; box-shadow: 0 6px 24px rgba(0,0,0,.06); }
.hero h1 { margin:0 0 6px 0; font-size: 1.6rem; color: var(--ink); }
.hero p { margin:0; color: var(--muted); font-size: 1rem; }
.hero .cta-row { margin-top: 18px; display:flex; gap:12px; flex-wrap: wrap; }
.btn { display:inline-block; padding: 10px 18px; border-radius: 10px; text-decoration:none; font-weight:700; }
.btn--primary { background: var(--brand); color:#fff; }
.btn--primary:hover { background: var(--brand-2); }
.btn--ghost { background: #eaf1ff; color: var(--brand-2); }
.btn--ghost:hover { background: #d8e8ff; }

/* Subnav */
.subnav { position: sticky; top: 60px; z-index: 9; margin: 14px 0; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.04); }
.subnav .inner { display:flex; gap:10px; align-items:center; flex-wrap:wrap; justify-content: space-between; }
.subnav .links a { color: var(--brand-2); text-decoration:none; padding:8px 10px; border-radius:8px; }
.subnav .links a:hover { background:#eef2ff; }
.subnav .filters { margin:0; }
.subnav .filters .group { display:flex; gap:8px; align-items:center; }
.input, .select { padding: 8px 10px; border:1px solid #e5e7eb; border-radius: 8px; background:#fff; }

/* Toolbars */
.toolbar { display:flex; align-items:center; justify-content: space-between; gap:12px; flex-wrap:wrap; margin: 8px 0 12px; }
.toolbar .group { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.toolbar label { display:flex; gap:6px; align-items:center; color:#374151; font-size:.95rem; }
.toolbar input[type="search"],
.toolbar select { padding:8px 10px; border:1px solid #e5e7eb; border-radius:8px; background:#fff; min-width: 180px; }
.btn.btn--small { padding:6px 10px; font-size:.9rem; border-radius:8px; border:1px solid #e5e7eb; background:#fff; color:#111827; cursor:pointer; }
.btn.btn--small:hover { background:#f3f4f6; }
.btn.btn--export { background:#eef2ff; border-color:#c7d2fe; color:#3730a3; }
.btn.btn--export:hover { background:#e0e7ff; }

/* Tables (compact variants) */
.trades-table.compact td, .trades-table.compact th { padding: 8px 10px; }

/* Section header + tabs */
.pill-tabs { display:flex; gap:6px; background:#f1f5f9; padding:6px; border-radius:999px; border:1px solid #e5e7eb; }
.pill { background:#fff; border:1px solid #e5e7eb; padding:6px 10px; border-radius:999px; cursor:pointer; font-weight:700; color:#111827; }
.pill.active { background: #0b5ed7; color:#fff; border-color: #0b5ed7; }
.delta { display:inline-block; padding:2px 8px; border-radius:999px; background:#ecfdf5; color:#065f46; font-weight:700; }

/* Stats hero section */
.stats-hero { background: linear-gradient(180deg, #ffffff, #f7faff); border:1px solid #e5e7eb; border-radius:16px; padding:16px; box-shadow:0 6px 20px rgba(0,0,0,.05); }
.section-header { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:8px; }
.stat-card .star { color: var(--gold); margin-left:6px; }
.sparkline-box { margin-top:10px; background:#fff; border:1px solid #e5e7eb; border-radius:12px; padding:10px; box-shadow:0 2px 10px rgba(0,0,0,.04); }
.stat-card:hover { transform: translateY(-1px); transition: transform .2s ease, box-shadow .2s ease; box-shadow:0 10px 30px rgba(0,0,0,.08); }

/* KPI cards */
.kpis { display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:14px; margin-top:18px; }
.kpi { background: var(--card); border: 1px solid #e5e7eb; border-radius: 12px; padding: 16px; box-shadow: 0 4px 16px rgba(0,0,0,.04); }
.kpi .label { color: var(--muted); font-size:.92rem; font-weight:600; }
.kpi .value { font-size: 1.8rem; font-weight:800; margin-top: 8px; }
.kpi .note { margin-top:6px; font-size:.85rem; color: var(--muted); }
.kpi.highlight { outline: 2px solid rgba(240,173,78,.45); box-shadow: 0 6px 28px rgba(240,173,78,.25); }
.kpi .star { color: var(--gold); font-size: 1.6rem; margin-left: 6px; }

/* Trust row */
.trust-row { margin-top: 14px; background: #f8fafc; border:1px solid #eef2f7; border-radius: 12px; padding: 12px 14px; color: #0b4a82; font-size: .95rem; text-align:center; }
.trust-row a { color: var(--brand-2); font-weight:700; }

/* Services */
.section { margin-top: 28px; }
.section h2 { margin: 0 0 10px 0; font-size: 1.3rem; }
.cards { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:14px; }
.card { background: var(--card); border: 1px solid #e5e7eb; border-radius: 12px; padding: 16px; box-shadow: 0 4px 16px rgba(0,0,0,.04); }
.card .title { font-weight:800; color: var(--ink); }
.card .desc { margin-top: 6px; color: var(--ink); opacity: .9; }
.card ul { margin:10px 0 0 18px; padding:0; color:#334155; }
.card .cta { margin-top: 12px; }

/* SEO content */
.seo { margin-top: 28px; background: #ffffff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 18px; }
.seo h2, .seo h3 { margin-top: 12px; }
.seo a { color: var(--brand-2); font-weight:700; }

/* Tables and data sections */
.section h3 { margin: 0 0 10px 0; font-size: 1.15rem; }
.data-scroll { overflow-x: auto; }
.trades-table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.trades-table th, .trades-table td { padding: 10px 8px; text-align: center; white-space: nowrap; }
.trades-table thead th { position: sticky; top: 0; background: #f1f5f9; color: #0f172a; font-weight: 700; z-index: 1; }
.trades-table tr:nth-child(even) { background: #f8fafc; }
.profit { color: #1bb700; font-weight: 700; }
.loss { color: #dc2626; font-weight: 700; }

/* Highlight trades */
.highlight-cards { display:flex; flex-wrap:wrap; gap:14px; }
.highlight-card { background: var(--card); border: 1px solid #e5e7eb; border-radius: 12px; padding: 14px; min-width: 180px; flex: 1; text-align: center; box-shadow: 0 4px 16px rgba(0,0,0,.04); }
.highlight-card .card-label { font-size: .98rem; color: var(--muted); }
.highlight-card .card-value { font-size: 1.3rem; font-weight: 800; }
.highlight-card .card-detail { font-size: .92rem; color: #374151; margin-top: 6px; }

/* Filters */
.filters { display:flex; gap: 10px; align-items:center; justify-content: flex-end; margin: 10px 0; }
.filters select { padding: 8px 10px; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; color: var(--ink); }

/* Badges */
.badge { display:inline-block; padding: 2px 8px; border-radius: 999px; font-weight: 700; font-size: .85rem; }
.badge--buy { background: #e9fbe9; color: #166534; }
.badge--sell { background: #fee2e2; color: #991b1b; }

/* Empty state */
.empty { text-align:center; color: var(--muted); padding: 16px; }

/* Footer */
.site-footer { margin-top: 28px; background: var(--ink); color:#fff; border-radius: 12px; padding: 18px; }
.site-footer .row { display:flex; flex-wrap: wrap; align-items:center; justify-content: space-between; gap: 12px; }
.site-footer a { color:#cce0ff; text-decoration:none; }
.site-footer a:hover { text-decoration: underline; }

/* Responsive */
@media (max-width: 800px) {
  .kpis { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.3rem; }
}

/* --- Enhanced stat cards --- */
.stat-cards { display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:14px; margin-top:16px; }
.stat-card { display:flex; gap:12px; align-items:center; background: linear-gradient(180deg, #ffffff, #f9fbff); border:1px solid #e5e7eb; border-radius:14px; padding:16px; box-shadow:0 8px 28px rgba(0,0,0,.06); }
.stat-icon { width:44px; height:44px; border-radius:10px; display:flex; align-items:center; justify-content:center; font-size:1.2rem; font-weight:800; color:#fff; }
.icon--trades { background: linear-gradient(135deg, #22c55e, #16a34a); }
.icon--wins { background: linear-gradient(135deg, #60a5fa, #2563eb); }
.icon--winrate { background: linear-gradient(135deg, #f59e0b, #d97706); }
.icon--profit { background: linear-gradient(135deg, #10b981, #059669); }
.icon--time { background: linear-gradient(135deg, #a78bfa, #7c3aed); }
.stat-body { flex:1; }
.stat-title { font-weight:800; color:#111827; font-size:1rem; letter-spacing:.2px; }
.stat-value { font-size:1.6rem; font-weight:900; margin-top:4px; }
.stat-note { font-size:.85rem; color:#6b7280; margin-top:4px; }
.stat-card.highlight { outline: 2px solid rgba(240,173,78,.45); box-shadow: 0 6px 28px rgba(240,173,78,.25); }

/* --- Enhanced footer columns --- */
.site-footer .row { display:grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 18px; align-items:flex-start; }
.site-footer .brand { font-size:1.1rem; }
.site-footer h4 { margin:0 0 8px 0; font-size:1rem; color:#dbeafe; }
.site-footer ul { list-style:none; margin:0; padding:0; }
.site-footer li { margin:6px 0; }
.site-footer .copyright { margin-top:16px; opacity:.8; text-align:center; }

@media (max-width: 800px) {
  .stat-cards { grid-template-columns: 1fr; }
  .site-footer .row { grid-template-columns: 1fr; }
}
