/* ============================================================
   TOGELPOOLS4D — Global Stylesheet v2
   Navy · White · Gold  |  Professional Data Portal
   ============================================================ */

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

/* ===== TOKENS ===== */
:root {
  --navy-950: #060e1f;
  --navy-900: #0a1628;
  --navy-800: #0d1f3c;
  --navy-700: #122548;
  --navy-600: #1a3260;
  --navy-500: #1e3a6e;
  --navy-400: #2a4d8a;
  --navy-300: #3b61a3;
  --gold-400: #c9a84c;
  --gold-300: #d4b96a;
  --gold-200: #e0cc8f;
  --gold-100: #f5edcc;
  --white:    #ffffff;
  --gray-50:  #f8f9fb;
  --gray-100: #f1f3f7;
  --gray-200: #e4e8ef;
  --gray-300: #cdd3de;
  --gray-400: #9ba5b7;
  --gray-500: #6b7589;
  --gray-600: #4a5568;
  --gray-700: #2d3748;
  --green-600: #1e8449;
  --green-500: #27ae60;
  --green-100: #d4edda;
  --red-600:   #c0392b;
  --red-500:   #e74c3c;
  --red-100:   #fde8e6;
  --blue-600:  #1e40af;
  --blue-100:  #dbeafe;
  --amber-600: #b45309;
  --amber-100: #fef3c7;
  --font: 'Inter', Arial, Helvetica, sans-serif;
  --shadow-sm: 0 1px 4px rgba(0,0,0,.08);
  --shadow-md: 0 4px 14px rgba(0,0,0,.11);
  --shadow-lg: 0 8px 28px rgba(0,0,0,.13);
  --r-sm: 5px; --r-md: 8px; --r-lg: 12px; --r-xl: 16px;
}

/* ===== BASE ===== */
html { scroll-behavior: smooth; }
body { font-family: var(--font); font-size: 15px; line-height: 1.6; color: var(--gray-700); background: var(--gray-50); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; }
h1 { font-size: 2rem;   font-weight: 800; line-height: 1.2; }
h2 { font-size: 1.45rem; font-weight: 700; line-height: 1.25; }
h3 { font-size: 1.15rem; font-weight: 700; line-height: 1.3; }
h4 { font-size: .95rem; font-weight: 600; }
p  { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ===== LAYOUT ===== */
.container  { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section    { padding: 52px 0; }
.section-sm { padding: 32px 0; }

/* ===== TOPBAR ===== */
.topbar {
  background: var(--navy-950);
  border-bottom: 1px solid rgba(255,255,255,.05);
  padding: 6px 0;
  font-size: .75rem;
  color: var(--gray-400);
}
.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 14px; }
.topbar-result { display: flex; align-items: center; gap: 4px; }
.topbar-result strong { color: var(--gold-300); }
.live-badge {
  background: var(--red-500); color: #fff;
  font-size: .63rem; font-weight: 800;
  padding: 2px 6px; border-radius: 3px;
  letter-spacing: .6px;
  animation: livepulse 1.5s infinite;
}
@keyframes livepulse { 0%,100%{opacity:1}50%{opacity:.6} }
.live-clock { color: var(--gray-400); font-size: .73rem; }

/* ===== HEADER ===== */
.header {
  background: var(--navy-800);
  position: sticky; top: 0; z-index: 1000;
  box-shadow: 0 2px 18px rgba(0,0,0,.35);
}
.header-inner {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 13px 0; gap: 20px;
}

/* LOGO */
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-mark {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--gold-400), var(--gold-200));
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; font-weight: 900; color: var(--navy-900);
  flex-shrink: 0;
}
.logo--footer .logo-mark { width: 34px; height: 34px; font-size: .78rem; }
.logo-text { line-height: 1.2; }
.logo-name { font-size: .98rem; font-weight: 800; color: var(--white); letter-spacing: -.3px; white-space: nowrap; }
.logo-sub  { font-size: .6rem; color: var(--gold-300); letter-spacing: .9px; text-transform: uppercase; }

/* NAV */
.nav { display: flex; align-items: center; }
.nav-list { display: flex; list-style: none; gap: 2px; align-items: center; }
.nav-item { position: relative; }
.nav-link {
  display: flex; align-items: center; gap: 3px;
  padding: 7px 11px; font-size: .78rem; font-weight: 600;
  color: var(--gray-300); border-radius: var(--r-sm);
  transition: color .15s, background .15s; white-space: nowrap; cursor: pointer;
}
.nav-link:hover, .nav-link.active { color: var(--white); background: rgba(255,255,255,.08); }
.nav-link.active { color: var(--gold-300); }
.nav-link--dropdown { cursor: default; }
.caret { font-size: .55rem; opacity: .5; transition: transform .2s; margin-left: 1px; }
.nav-item:hover > .nav-link .caret { transform: rotate(180deg); }

/* DROPDOWN MENU */
.dropdown-menu {
  position: absolute; top: calc(100% + 5px); left: 0;
  background: var(--navy-800);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: var(--r-lg); min-width: 185px; padding: 6px;
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .18s, transform .18s, visibility .18s;
  z-index: 300; list-style: none;
}
.nav-item:hover > .dropdown-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown-menu li a {
  display: block; padding: 8px 12px;
  font-size: .78rem; font-weight: 500; color: var(--gray-300);
  border-radius: var(--r-sm); transition: color .15s, background .15s;
}
.dropdown-menu li a:hover, .dropdown-menu li a.active {
  color: var(--white); background: rgba(255,255,255,.07);
}
.dropdown-menu li a.active { color: var(--gold-300); }

/* MOBILE TOGGLE */
.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 6px; border: none; background: none;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--white); border-radius: 2px;
  transition: transform .3s, opacity .3s;
}

/* ===== BREADCRUMB ===== */
.breadcrumb-bar { background: var(--white); border-bottom: 1px solid var(--gray-200); padding: 9px 0; }
.breadcrumb { display: flex; align-items: center; gap: 6px; list-style: none; font-size: .75rem; flex-wrap: wrap; }
.breadcrumb-item { display: flex; align-items: center; gap: 6px; color: var(--gray-500); }
.breadcrumb-item a { color: var(--navy-600); }
.breadcrumb-item a:hover { color: var(--navy-400); }
.breadcrumb-item + .breadcrumb-item::before { content: '/'; color: var(--gray-300); }
.breadcrumb-item.active { color: var(--gray-500); }

/* ===== PAGE TITLE BAR ===== */
.page-tb {
  background: linear-gradient(135deg, var(--navy-800), var(--navy-600));
  padding: 28px 0; color: var(--white);
}
.page-tb__title { font-size: 1.55rem; color: var(--white); margin-bottom: 5px; }
.page-tb__sub   { font-size: .85rem; color: var(--gray-300); }

/* ===== MAIN CONTENT ===== */
.main-content { padding: 36px 0 52px; }
.content-layout { display: grid; grid-template-columns: 1fr 284px; gap: 28px; align-items: start; }
.content-main { min-width: 0; }
.content-aside { display: flex; flex-direction: column; gap: 0; }

/* ===== FILTER BAR ===== */
.filter-bar {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--r-lg); padding: 13px 16px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.filter-label { font-size: .75rem; font-weight: 700; color: var(--gray-600); }
.filter-sel {
  padding: 6px 10px; font-size: .78rem;
  border: 1px solid var(--gray-200); border-radius: var(--r-sm);
  color: var(--gray-700); background: var(--white); outline: none; cursor: pointer;
  transition: border-color .15s;
}
.filter-sel:focus { border-color: var(--navy-600); }
.filter-btn {
  padding: 6px 14px; background: var(--navy-800); color: var(--white);
  border: none; border-radius: var(--r-sm); font-size: .78rem; font-weight: 600;
  cursor: pointer; transition: background .15s;
}
.filter-btn:hover { background: var(--navy-600); }

/* ===== WIDGET ===== */
.widget {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}
.widget--sidebar { margin-bottom: 18px; }
.widget-hd {
  background: var(--navy-800); padding: 12px 18px;
  display: flex; align-items: center; justify-content: space-between;
}
.widget-hd__title { font-size: .8rem; font-weight: 700; color: var(--white); text-transform: uppercase; letter-spacing: .6px; }
.widget-hd__badge {
  font-size: .65rem; font-weight: 700; color: var(--gold-300);
  background: rgba(201,168,76,.15); border: 1px solid rgba(201,168,76,.25);
  padding: 2px 8px; border-radius: 20px;
}
.widget-body       { padding: 18px; }
.widget-body-flush { padding: 0; }

/* ===== DATA TABLE ===== */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-tbl { width: 100%; border-collapse: collapse; }
.data-tbl th {
  background: var(--navy-700); color: var(--white);
  padding: 10px 13px; font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px; text-align: left; white-space: nowrap;
}
.data-tbl td {
  padding: 9px 13px; font-size: .82rem;
  border-bottom: 1px solid var(--gray-100); vertical-align: middle;
}
.data-tbl tr:last-child td { border-bottom: none; }
.data-tbl tr:hover td { background: var(--gray-50); }
.data-tbl tr:nth-child(even) td { background: rgba(241,243,247,.5); }
.data-tbl tr:nth-child(even):hover td { background: var(--gray-100); }
.data-tbl--mini td { padding: 7px 12px; font-size: .78rem; }
.td-num  { font-size: .75rem; color: var(--gray-400); }
.td-date { font-size: .78rem; color: var(--gray-600); white-space: nowrap; }
.td-res  { font-size: 1rem; font-weight: 800; color: var(--navy-900); letter-spacing: 2px; font-family: 'Courier New', monospace; }
.td-badge {
  display: inline-block; padding: 2px 7px; border-radius: 20px;
  font-size: .63rem; font-weight: 700; text-transform: uppercase; white-space: nowrap;
}
.bg-genap  { background: var(--green-100); color: var(--green-600); }
.bg-ganjil { background: var(--red-100);   color: var(--red-600); }
.bg-besar  { background: var(--blue-100);  color: var(--blue-600); }
.bg-kecil  { background: var(--amber-100); color: var(--amber-600); }

/* ===== PAGINATION ===== */
.pagination {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-top: 1px solid var(--gray-100); flex-wrap: wrap; gap: 8px;
}
.pg-btn {
  padding: 7px 16px; border: 1px solid var(--gray-200);
  border-radius: var(--r-sm); font-size: .78rem; font-weight: 600;
  color: var(--gray-600); background: var(--white); cursor: pointer;
  transition: all .15s;
}
.pg-btn:hover { border-color: var(--navy-600); color: var(--navy-600); }
.pg-btn.active { background: var(--navy-800); color: var(--white); border-color: var(--navy-800); }
.pg-info { font-size: .75rem; color: var(--gray-500); }

/* ===== SIDEBAR STATS ===== */
.stat-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--gray-100); font-size: .8rem;
}
.stat-row:last-child { border-bottom: none; }
.stat-label { color: var(--gray-600); }
.stat-val   { font-weight: 700; color: var(--navy-800); font-family: monospace; font-size: .88rem; }
.stat-val--highlight { color: var(--gold-400); font-size: 1rem; letter-spacing: 2px; }

/* SCHEDULE LIST */
.schedule-list { list-style: none; }
.schedule-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--gray-100); font-size: .8rem;
}
.schedule-item:last-child { border-bottom: none; }
.schedule-day  { color: var(--gray-600); }
.schedule-time { font-weight: 700; color: var(--navy-800); }

/* QUICK LINKS */
.quick-links { list-style: none; }
.quick-links li { border-bottom: 1px solid var(--gray-100); }
.quick-links li:last-child { border-bottom: none; }
.quick-links li a {
  display: block; padding: 8px 0;
  font-size: .8rem; color: var(--navy-600);
  transition: color .15s; padding-left: 10px;
}
.quick-links li a::before { content: '→ '; font-size: .7rem; }
.quick-links li a:hover { color: var(--navy-400); }

/* ===== ARTICLE ===== */
.content-article {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--r-xl); padding: 28px 32px;
  box-shadow: var(--shadow-sm); margin-top: 20px;
}
.content-article h2 { font-size: 1.15rem; color: var(--navy-800); margin: 20px 0 9px; }
.content-article h2:first-child { margin-top: 0; }
.content-article h3 { font-size: 1rem; color: var(--navy-700); margin: 16px 0 7px; }
.content-article p  { font-size: .88rem; color: var(--gray-600); line-height: 1.8; }
.content-article ul, .content-article ol { margin: 0 0 1rem 1.4rem; font-size: .88rem; color: var(--gray-600); line-height: 1.8; }
.content-article li { margin-bottom: 4px; }

/* ===== PREDIKSI ===== */
.pred-box {
  background: linear-gradient(135deg, var(--navy-800), var(--navy-600));
  border-radius: var(--r-xl); padding: 22px 24px;
  color: var(--white); position: relative; overflow: hidden;
}
.pred-box::before {
  content: ''; position: absolute; right: -18px; top: -18px;
  width: 110px; height: 110px; border-radius: 50%;
  background: rgba(201,168,76,.07);
}
.pred-label { font-size: .68rem; font-weight: 700; color: var(--gold-300); text-transform: uppercase; letter-spacing: .8px; margin-bottom: 10px; }
.pred-nums  { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.pred-num {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 900;
  background: linear-gradient(135deg, var(--gold-400), var(--gold-200));
  color: var(--navy-900); box-shadow: 0 2px 10px rgba(0,0,0,.25);
}
.pred-meta { font-size: .72rem; color: var(--gray-400); }
.pred-disclaimer {
  background: rgba(255,255,255,.08); border-radius: var(--r-md);
  padding: 10px 14px; font-size: .73rem; color: var(--gray-300);
  margin-top: 12px; line-height: 1.6;
}

/* FREQ CHART */
.freq-row   { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.freq-lbl   { width: 16px; font-size: .78rem; font-weight: 700; color: var(--navy-800); text-align: center; flex-shrink: 0; }
.freq-track { flex: 1; height: 10px; background: var(--gray-100); border-radius: 5px; overflow: hidden; }
.freq-fill  { height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--navy-600), var(--navy-400)); }
.freq-cnt   { font-size: .7rem; color: var(--gray-500); width: 26px; text-align: right; flex-shrink: 0; }

/* ===== PAITO ===== */
.paito-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.paito-tbl  { border-collapse: collapse; min-width: 580px; width: 100%; }
.paito-tbl th {
  background: var(--navy-800); color: var(--white);
  padding: 7px 8px; font-size: .66rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .4px; text-align: center; white-space: nowrap;
}
.paito-tbl td {
  padding: 4px 5px; text-align: center; font-size: .78rem; font-weight: 700;
  border: 1px solid rgba(0,0,0,.08); min-width: 30px;
}
.pn-0{background:#374151;color:#fff} .pn-1{background:#1d4ed8;color:#fff}
.pn-2{background:#dc2626;color:#fff} .pn-3{background:#16a34a;color:#fff}
.pn-4{background:#ea580c;color:#fff} .pn-5{background:#7c3aed;color:#fff}
.pn-6{background:#0891b2;color:#fff} .pn-7{background:#be185d;color:#fff}
.pn-8{background:#0d9488;color:#fff} .pn-9{background:#854d0e;color:#fff}
.pn-date{background:var(--navy-800);color:var(--white);font-size:.65rem;white-space:nowrap;padding:4px 8px !important}

/* ===== HERO (homepage) ===== */
.hero {
  background: linear-gradient(150deg, var(--navy-900) 0%, var(--navy-700) 55%, var(--navy-600) 100%);
  padding: 52px 0 40px; color: var(--white); position: relative; overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23fff' fill-opacity='.022' fill-rule='evenodd'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 340px; gap: 44px; align-items: start; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(201,168,76,.14); border: 1px solid rgba(201,168,76,.28);
  color: var(--gold-300); font-size: .68rem; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  padding: 5px 12px; border-radius: 20px; margin-bottom: 13px;
}
.hero h1 { font-size: 2rem; font-weight: 900; line-height: 1.15; margin-bottom: 12px; }
.hero h1 em { font-style: normal; color: var(--gold-300); }
.hero-lead { font-size: .88rem; color: var(--gray-300); line-height: 1.75; margin-bottom: 24px; max-width: 480px; }
.hero-kpi  { display: flex; gap: 24px; flex-wrap: wrap; }
.kpi-item  { text-align: center; }
.kpi-val   { font-size: 1.3rem; font-weight: 900; color: var(--gold-300); line-height: 1; }
.kpi-lbl   { font-size: .62rem; color: var(--gray-400); text-transform: uppercase; letter-spacing: .5px; margin-top: 3px; }

/* Live result card (homepage hero) */
.live-card {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--r-xl); padding: 20px;
}
.live-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.live-card-title { font-size: .72rem; font-weight: 700; color: var(--gray-300); text-transform: uppercase; letter-spacing: .7px; }
.live-pill { display: flex; align-items: center; gap: 4px; font-size: .65rem; color: var(--green-500); font-weight: 700; }
.live-dot  { width: 6px; height: 6px; background: var(--green-500); border-radius: 50%; animation: blink 1.2s infinite; }
@keyframes blink { 0%,100%{opacity:1}50%{opacity:.3} }
.live-card-date { font-size: .7rem; color: var(--gray-400); margin-bottom: 8px; }
.result-4d-big  { font-size: 2rem; font-weight: 900; color: var(--gold-300); letter-spacing: 4px; margin-bottom: 10px; line-height: 1; }
.result-subs    { display: flex; gap: 8px; flex-wrap: wrap; }
.result-sub     { background: rgba(255,255,255,.08); border-radius: var(--r-md); padding: 6px 10px; text-align: center; }
.result-sub-lbl { font-size: .58rem; color: var(--gray-400); text-transform: uppercase; }
.result-sub-val { font-size: .85rem; font-weight: 800; color: var(--white); }

/* Pasaran cards (homepage) */
.pasaran-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.pasaran-card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--r-xl); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .2s;
}
.pasaran-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.pc-head { padding: 13px 15px 10px; border-left: 4px solid transparent; }
.pc-hk    .pc-head { border-left-color: #1d4ed8; }
.pc-sgp   .pc-head { border-left-color: #dc2626; }
.pc-sdy   .pc-head { border-left-color: #16a34a; }
.pc-macau .pc-head { border-left-color: #ea580c; }
.pc-flag  { font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; margin-bottom: 3px; }
.pc-hk    .pc-flag { color: #1d4ed8; }
.pc-sgp   .pc-flag { color: #b91c1c; }
.pc-sdy   .pc-flag { color: #15803d; }
.pc-macau .pc-flag { color: #b45309; }
.pc-name  { font-size: .85rem; font-weight: 700; color: var(--navy-800); margin-bottom: 2px; }
.pc-date  { font-size: .66rem; color: var(--gray-500); }
.pc-body  { padding: 10px 15px 13px; }
.pc-result{ font-size: 1.5rem; font-weight: 900; letter-spacing: 3px; color: var(--navy-900); font-family: 'Courier New', monospace; }
.pc-subs  { display: flex; gap: 8px; margin-top: 5px; }
.pc-sub   { font-size: .7rem; color: var(--gray-500); }
.pc-sub strong { color: var(--gray-700); }
.pc-foot  { display: flex; border-top: 1px solid var(--gray-100); }
.pc-foot a {
  flex: 1; padding: 8px 6px; font-size: .68rem; font-weight: 600;
  color: var(--navy-600); text-align: center; transition: background .15s;
  border-right: 1px solid var(--gray-100);
}
.pc-foot a:last-child { border-right: none; }
.pc-foot a:hover { background: var(--gray-50); color: var(--navy-400); }

/* Section header */
.section-hd { margin-bottom: 24px; }
.section-hd.center { text-align: center; }
.section-tag {
  display: inline-block; font-size: .66rem; font-weight: 700;
  color: var(--gold-400); text-transform: uppercase; letter-spacing: 1.2px;
  margin-bottom: 6px; padding-left: 9px; border-left: 3px solid var(--gold-400);
}
.section-hd.center .section-tag { border-left: none; padding-left: 0; }
.section-title { font-size: 1.3rem; font-weight: 800; color: var(--navy-900); line-height: 1.3; }
.section-sub   { font-size: .83rem; color: var(--gray-500); margin-top: 5px; }

/* Notice */
.notice {
  background: #fffbeb; border: 1px solid #fcd34d; border-radius: var(--r-md);
  padding: 10px 14px; font-size: .77rem; color: var(--amber-600);
  display: flex; gap: 8px; align-items: flex-start; margin-bottom: 16px;
}

/* Countdown */
.countdown-wrap { text-align: center; }
.countdown-lbl  { font-size: .66rem; color: var(--gray-500); text-transform: uppercase; letter-spacing: .7px; margin-bottom: 9px; }
.countdown-timer{ display: flex; justify-content: center; align-items: center; gap: 8px; }
.cd-unit { text-align: center; }
.cd-num  { font-size: 1.6rem; font-weight: 900; color: var(--navy-800); background: var(--gray-100); border-radius: var(--r-md); padding: 6px 12px; min-width: 50px; display: inline-block; line-height: 1; }
.cd-lbl  { font-size: .58rem; color: var(--gray-500); text-transform: uppercase; margin-top: 4px; }
.cd-sep  { font-size: 1.3rem; color: var(--gray-400); line-height: 1; padding-bottom: 14px; }

/* ===== FOOTER ===== */
.footer { background: var(--navy-900); color: var(--gray-400); padding: 48px 0 0; margin-top: 60px; }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 32px;
  padding-bottom: 36px; border-bottom: 1px solid rgba(255,255,255,.06);
}
.footer-col--brand { }
.footer-brand-desc { font-size: .78rem; line-height: 1.7; color: var(--gray-500); margin-top: 12px; }
.footer-col__title {
  font-size: .7rem; font-weight: 700; color: var(--white);
  text-transform: uppercase; letter-spacing: .8px; margin-bottom: 12px;
}
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 7px; }
.footer-links a { font-size: .77rem; color: var(--gray-500); transition: color .15s; }
.footer-links a:hover { color: var(--gold-300); }
.footer-schedule { list-style: none; }
.footer-schedule li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,.05);
  font-size: .75rem;
}
.footer-schedule li:last-child { border-bottom: none; }
.footer-schedule li span:first-child { color: var(--gray-500); }
.footer-schedule li span:last-child  { color: var(--gold-300); font-weight: 700; }
.footer-bottom {
  padding: 16px 0;
  border-top: 1px solid rgba(255,255,255,.04);
}
.footer-disclaimer {
  font-size: .7rem; color: var(--gray-600); line-height: 1.65;
  margin-bottom: 10px;
}
.footer-disclaimer strong { color: var(--gray-500); }
.footer-copy { font-size: .7rem; color: var(--gray-600); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
  .pasaran-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid  { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .content-layout { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  h1 { font-size: 1.5rem; } h2 { font-size: 1.2rem; }
  .topbar { display: none; }
  .nav {
    display: none; position: fixed; inset: 0; top: 66px;
    background: var(--navy-900); flex-direction: column;
    align-items: stretch; padding: 14px; overflow-y: auto; z-index: 999;
  }
  .nav.open { display: flex; }
  .nav-list { flex-direction: column; gap: 2px; }
  .nav-link  { font-size: .88rem; padding: 10px 13px; }
  .dropdown-menu {
    position: static; background: rgba(255,255,255,.04);
    border: none; box-shadow: none; transform: none;
    opacity: 1; visibility: visible; display: none; padding-left: 10px;
  }
  .nav-item.open > .dropdown-menu { display: block; }
  .nav-toggle { display: flex; }
  .main-content { padding: 24px 0 36px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .content-article { padding: 20px 16px; }
}
@media (max-width: 520px) {
  .container { padding: 0 14px; }
  .pasaran-grid { grid-template-columns: 1fr; }
  .footer-grid  { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.35rem; }
}

/* ===== CLASS ALIASES & MISSING PATTERNS ===== */

/* filter-select = alias for filter-sel */
.filter-select {
  padding: 7px 11px; border: 1px solid var(--gray-300);
  border-radius: var(--r-sm); font-size: .8rem; color: var(--gray-700);
  background: var(--white); cursor: pointer; transition: border-color .15s;
  height: 36px;
}
.filter-select:focus { outline: none; border-color: var(--navy-500); }

/* filter-bar__inner */
.filter-bar__inner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}

/* filter-form */
.filter-form {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}

/* pagination: page-btn aliases */
.page-btn {
  padding: 7px 16px; border: 1px solid var(--gray-300);
  border-radius: var(--r-sm); font-size: .8rem; font-weight: 600;
  background: var(--white); color: var(--navy-700); cursor: pointer;
  transition: background .15s, border-color .15s;
}
.page-btn:hover:not(:disabled) { background: var(--gray-50); border-color: var(--navy-400); }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }
.page-btn--prev::before { content: '← '; }
.page-btn--next::after  { content: ' →'; }

/* page-info alias for pg-info */
.page-info {
  font-size: .8rem; color: var(--gray-600); padding: 0 8px;
}

/* tbl-scroll: horizontal scroll wrapper */
.tbl-scroll {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border-radius: var(--r-md);
}

/* tbl-empty: empty state cell */
.tbl-empty {
  text-align: center; padding: 24px; color: var(--gray-400);
  font-size: .82rem; font-style: italic;
}

/* result-subs breakdown (keluaran pages) */
.result-subs {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px;
}
.result-sub-item {
  background: rgba(255,255,255,.08); border-radius: var(--r-sm);
  padding: 5px 10px; display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.result-sub-label {
  font-size: .58rem; color: var(--gray-400); text-transform: uppercase; letter-spacing: .5px;
}
/* .result-sub-val already defined above as live-card sub-val; ensure it works in dark pred-box context */
.pred-box .result-sub-val { font-size: .85rem; font-weight: 800; color: var(--white); }

/* Ensure pagination wrapper stays flex on mobile */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; padding: 16px 0; flex-wrap: wrap;
}

/* ===== STAT CARDS GRID (used on data/keluaran/pengeluaran) ===== */
.stat-cards { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 20px; }
.stat-card  {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--r-lg); padding: 16px; text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat-card__val { font-size: 1.4rem; font-weight: 900; color: var(--navy-800); line-height: 1; }
.stat-card__lbl { font-size: .65rem; color: var(--gray-500); text-transform: uppercase; letter-spacing: .5px; margin-top: 4px; }
@media (max-width: 600px) { .stat-cards { grid-template-columns: repeat(2,1fr); } }

/* ===== INTERNAL LINK PILLS ===== */
.internal-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.internal-links a {
  padding: 7px 16px; border: 1px solid var(--navy-300); border-radius: 20px;
  font-size: .75rem; font-weight: 600; color: var(--navy-600);
  transition: background .15s, color .15s;
}
.internal-links a:hover { background: var(--navy-600); color: var(--white); }

/* ===== STATUS BAR ===== */
.status-bar {
  display: flex; align-items: center; gap: 10px;
  background: #f0fdf4; border: 1px solid #bbf7d0;
  border-radius: var(--r-md); padding: 10px 16px;
  margin-bottom: 20px; font-size: .875rem; color: var(--gray-700);
}
.status-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #22c55e; flex-shrink: 0;
  animation: statusPulse 1.5s infinite;
}
@keyframes statusPulse { 0%,100%{opacity:1}50%{opacity:.35} }

/* ===== SCHEDULE GRID CARDS (pengeluaran jadwal update) ===== */
.schedule-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-bottom: 20px; }
.schedule-card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--r-lg); padding: 16px; text-align: center;
  box-shadow: var(--shadow-sm);
}
.schedule-card__icon { font-size: 1.4rem; margin-bottom: 6px; }
.schedule-card__time { font-size: 1.3rem; font-weight: 900; color: var(--navy-800); line-height: 1; }
.schedule-card__lbl  { font-size: .68rem; color: var(--gray-500); text-transform: uppercase; letter-spacing: .4px; margin-top: 4px; }
@media (max-width: 600px) { .schedule-cards { grid-template-columns: 1fr; } }

/* ===== SECTION TABS ===== */
.section-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.stab {
  padding: 7px 16px; border-radius: var(--r-sm);
  border: 1.5px solid var(--navy-600); background: var(--white);
  color: var(--navy-600); font-size: .78rem; font-weight: 600;
  cursor: pointer; transition: background .15s, color .15s;
}
.stab.active, .stab:hover { background: var(--navy-800); color: var(--white); border-color: var(--navy-800); }

/* ===== HOLIDAY INFO NOTICE ===== */
.holiday-notice {
  background: #fff7ed; border: 1px solid #fed7aa;
  border-radius: var(--r-md); padding: 10px 16px;
  font-size: .82rem; color: #92400e; margin-bottom: 16px;
}

/* ===== LATEST RESULT CARD (keluaran/pengeluaran hero) ===== */
.result-hero {
  border-radius: var(--r-xl); padding: 24px;
  color: var(--white); margin-bottom: 20px; text-align: center;
}
.result-hero--hk    { background: linear-gradient(135deg,#0f2040 0%,#1a3a6e 100%); }
.result-hero--sgp   { background: linear-gradient(135deg,#7f1d1d 0%,#b91c1c 100%); }
.result-hero--sdy   { background: linear-gradient(135deg,#14532d 0%,#15803d 100%); }
.result-hero--macau { background: linear-gradient(135deg,#7c2d12 0%,#c2410c 100%); }
.result-hero__sub   { font-size: .8rem; opacity: .75; margin-bottom: 14px; }
.result-hero__balls { display: flex; justify-content: center; gap: 10px; margin-bottom: 14px; }
.result-hero__ball  {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--white); font-size: 1.4rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
}
.result-hero--hk    .result-hero__ball { color: #0f2040; }
.result-hero--sgp   .result-hero__ball { color: #7f1d1d; }
.result-hero--sdy   .result-hero__ball { color: #14532d; }
.result-hero--macau .result-hero__ball { color: #7c2d12; }
.result-hero__nums  { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.result-hero__num-item { text-align: center; }
.result-hero__num-val  { font-size: 1.2rem; font-weight: 800; }
.result-hero__num-lbl  { font-size: .65rem; opacity: .65; margin-top: 2px; text-transform: uppercase; letter-spacing: .5px; }

/* ===== BADGE NEW ===== */
.badge-new { display: inline-block; background: #22c55e; color: var(--white); font-size: .65rem; font-weight: 700; padding: 2px 7px; border-radius: 4px; }

/* ===== PAITO CARA BACA BOX ===== */
.cara-baca {
  border-radius: var(--r-lg); padding: 16px 18px; margin-bottom: 16px;
  font-size: .83rem; line-height: 1.75;
}
.cara-baca h3 { font-size: .9rem; font-weight: 700; margin-bottom: 8px; }
.cara-baca--hk    { background: #f0f9ff; border: 1px solid #bae6fd; }
.cara-baca--hk h3 { color: #0369a1; }
.cara-baca--sgp    { background: #fff1f2; border: 1px solid #fecdd3; }
.cara-baca--sgp h3 { color: #be123c; }
.cara-baca--sdy    { background: #f0fdf4; border: 1px solid #bbf7d0; }
.cara-baca--sdy h3 { color: #15803d; }
.cara-baca--macau    { background: #fff7ed; border: 1px solid #fed7aa; }
.cara-baca--macau h3 { color: #c2410c; }

/* ===== PAITO LEGEND ===== */
.paito-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.paito-legend__item { display: flex; align-items: center; gap: 4px; font-size: .7rem; font-weight: 600; }
.paito-legend__swatch { width: 18px; height: 18px; border-radius: 3px; }

/* ===== DISCLAIMER BANNER (prediksi) ===== */
.disclaimer-banner {
  background: #fffbeb; border: 1px solid #fcd34d;
  border-radius: var(--r-md); padding: 12px 16px;
  margin-bottom: 20px; display: flex; gap: 10px;
  align-items: flex-start; font-size: .82rem; color: var(--amber-600); line-height: 1.6;
}
.disclaimer-banner__icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }

/* ===== PREDIKSI HERO CARD ===== */
.pred-hero {
  border-radius: var(--r-xl); padding: 28px 24px 22px;
  text-align: center; margin-bottom: 4px;
}
.pred-hero--hk    { background: linear-gradient(135deg,#0f2040 0%,#1a3a6e 100%); }
.pred-hero--sgp   { background: linear-gradient(135deg,#7f1d1d 0%,#b91c1c 100%); }
.pred-hero--sdy   { background: linear-gradient(135deg,#14532d 0%,#15803d 100%); }
.pred-hero--macau { background: linear-gradient(135deg,#7c2d12 0%,#c2410c 100%); }
.pred-hero__label { color: var(--gray-400); font-size: .75rem; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 14px; }
.pred-hero__balls { display: flex; justify-content: center; gap: 12px; margin-bottom: 14px; }
.pred-hero__ball  {
  width: 54px; height: 54px; border-radius: 50%;
  background: linear-gradient(135deg,var(--gold-400),var(--gold-200));
  color: var(--navy-900); font-size: 1.4rem; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(201,168,76,.4);
}
.pred-hero__meta  { color: var(--gray-400); font-size: .78rem; margin-bottom: 8px; }
.pred-hero__note  { color: var(--gold-300); font-size: .72rem; font-style: italic; }

/* ===== ANALYSIS CARDS (prediksi) ===== */
.analysis-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-bottom: 20px; }
@media(max-width:600px){ .analysis-cards { grid-template-columns: 1fr; } }
.an-card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--r-lg); padding: 18px 14px; text-align: center;
}
.an-card__val { font-size: 2rem; font-weight: 900; color: var(--navy-800); line-height: 1; margin-bottom: 6px; }
.an-card__lbl { font-size: .72rem; color: var(--gray-500); text-transform: uppercase; letter-spacing: .05em; }
.an-card--hot  .an-card__val { color: var(--red-500); }
.an-card--even .an-card__val { color: var(--blue-600); }
.an-card--big  .an-card__val { color: var(--green-500); }

/* ===== FREQUENCY BAR CHART (prediksi) ===== */
.freq-grid { display: grid; grid-template-columns: repeat(10,1fr); gap: 6px; align-items: flex-end; padding: 0 4px; }
.freq-col  { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.freq-bar  { width: 100%; border-radius: 4px 4px 0 0; background: linear-gradient(180deg,var(--navy-500),var(--navy-800)); min-height: 4px; }
.freq-digit{ font-size: .75rem; font-weight: 700; color: var(--navy-800); }
.freq-count{ font-size: .63rem; color: var(--gray-500); }
.freq-axis { border-top: 2px solid var(--gray-200); margin-top: 4px; }

/* ===== PREDICTION TABLE ===== */
.pred-tbl-wrap { overflow-x: auto; }
.pred-tbl { width: 100%; border-collapse: collapse; font-size: .875rem; }
.pred-tbl th { background: var(--navy-700); color: var(--white); padding: 10px 12px; text-align: center; font-weight: 700; font-size: .7rem; text-transform: uppercase; letter-spacing: .4px; white-space: nowrap; }
.pred-tbl td { padding: 9px 12px; text-align: center; border-bottom: 1px solid var(--gray-100); }
.pred-tbl tr:last-child td { border-bottom: none; }
.pred-tbl tr:nth-child(even) td { background: var(--gray-50); }
.badge-hot  { background: var(--red-100);   color: var(--red-600);   font-size: .68rem; padding: 2px 8px; border-radius: 20px; font-weight: 700; }
.badge-warm { background: var(--amber-100); color: var(--amber-600); font-size: .68rem; padding: 2px 8px; border-radius: 20px; font-weight: 700; }
.badge-cold { background: var(--blue-100);  color: var(--blue-600);  font-size: .68rem; padding: 2px 8px; border-radius: 20px; font-weight: 700; }

/* ===== KELUARAN/PENGELUARAN TABLE ===== */
.kl-tbl { width: 100%; border-collapse: collapse; font-size: .82rem; }
.kl-tbl th { background: var(--navy-700); color: var(--white); padding: 9px 10px; text-align: center; font-weight: 700; font-size: .68rem; text-transform: uppercase; letter-spacing: .4px; white-space: nowrap; }
.kl-tbl td { padding: 8px 10px; text-align: center; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
.kl-tbl tr:last-child td { border-bottom: none; }
.kl-tbl tr:hover td { background: var(--gray-50); }
.kl-tbl tr:nth-child(even) td { background: rgba(241,243,247,.5); }
.kl-num-4d { font-weight: 800; color: var(--navy-900); font-family: 'Courier New', monospace; letter-spacing: 1.5px; font-size: .92rem; }
.kl-num-3d { color: var(--navy-600); font-weight: 600; }
.kl-num-2d { color: var(--navy-400); font-weight: 600; }

/* ===== PAGINATION BUTTONS (page number style) ===== */
.pg-pages { display: flex; gap: 4px; align-items: center; justify-content: center; flex-wrap: wrap; }
.pg-pages button {
  min-width: 34px; height: 34px; border-radius: var(--r-sm);
  border: 1px solid var(--gray-200); background: var(--white);
  color: var(--gray-600); font-size: .78rem; font-weight: 600;
  cursor: pointer; transition: all .15s;
}
.pg-pages button:hover { border-color: var(--navy-600); color: var(--navy-600); }
.pg-pages button.active { background: var(--navy-800); color: var(--white); border-color: var(--navy-800); }
