:root {
  --primary: #1e3a5f;
  --primary-light: #eef3f9;
  --primary-dark: #142a47;
  --primary-50: #f4f7fc;
  --accent: #f5a623;
  --accent-light: #fef7e8;
  --accent-dark: #d48f1a;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --dark: #0f172a;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
  --shadow: 0 4px 16px rgba(0,0,0,.06);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.08);
  --shadow-xl: 0 16px 48px rgba(0,0,0,.1);
  --radius: 12px;
  --radius-lg: 20px;
}

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

body {
  font-family: var(--font);
  font-size: 1.25rem;
  color: var(--gray-700);
  padding-top: 80px;
  background: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }

/* ===== NAVBAR ===== */
.navbar {
  background: rgba(255,255,255,.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,.04);
  padding: 0;
  height: 80px;
  transition: all .3s;
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1055;
}
.navbar .container { height: 100%; }
.navbar .navbar-collapse { position: relative; z-index: 1050; }
.navbar .container { height: 100%; }
.navbar-brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 1.2rem; color: var(--primary) !important; }
.navbar-brand img { height: 42px; width: auto; }
.navbar .nav-link {
  color: var(--gray-600) !important;
  font-weight: 500;
  font-size: .875rem;
  padding: 8px 18px !important;
  border-radius: 8px;
  transition: all .2s;
  position: relative;
}
.navbar .nav-link:hover { color: var(--primary) !important; background: var(--primary-light); }
.navbar .nav-link::after {
  content: ''; position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%);
  width: 0; height: 2px; background: var(--accent); border-radius: 2px;
  transition: width .25s;
}
.navbar .nav-link:hover::after { width: 24px; }
.navbar .dropdown-menu {
  border: none; border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 8px; margin-top: 8px; border: 1px solid var(--gray-100);
  z-index: 1050;
}
.navbar .dropdown-menu .dropdown-item {
  border-radius: 8px; padding: 10px 14px; font-size: .875rem;
  transition: all .15s;
}
.navbar .dropdown-menu .dropdown-item:hover { background: var(--primary-light); color: var(--primary); }
.nav-item.dropdown { position: relative; }
.btn-nav {
  background: var(--primary); color: #fff !important; border-radius: 10px;
  padding: 10px 22px !important; font-weight: 600; font-size: .875rem;
  transition: all .25s; border: none;
}
.btn-nav:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(30,58,95,.3); }
.btn-outline-nav {
  border: 1.5px solid var(--gray-200); color: var(--gray-600) !important;
  border-radius: 10px; padding: 10px 20px !important; font-weight: 500; font-size: .875rem;
  transition: all .25s;
}
.btn-outline-nav:hover { border-color: var(--primary); color: var(--primary) !important; background: var(--primary-light); }

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, #0f1f3a 0%, #1e3a5f 50%, #2a5298 100%);
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  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='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: .5;
}
.hero-content { position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.85); padding: 8px 18px; border-radius: 50px;
  font-size: .8rem; font-weight: 500; margin-bottom: 24px; backdrop-filter: blur(4px);
}
.hero h1 {
  font-weight: 800; font-size: clamp(32px, 4.5vw, 56px);
  color: #fff; line-height: 1.15; margin-bottom: 16px;
}
.hero p {
  font-size: clamp(16px, 1.3vw, 19px);
  color: rgba(255,255,255,.7); max-width: 560px; line-height: 1.7;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.btn-hero-primary {
  background: var(--accent); color: var(--dark) !important;
  padding: 14px 32px; border-radius: 12px; font-weight: 700; font-size: .95rem;
  transition: all .3s; border: none; display: inline-flex; align-items: center; gap: 8px;
}
.btn-hero-primary:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(245,166,35,.35); }
.btn-hero-secondary {
  background: rgba(255,255,255,.1); color: #fff !important;
  padding: 14px 32px; border-radius: 12px; font-weight: 600; font-size: .95rem;
  transition: all .3s; border: 1px solid rgba(255,255,255,.15);
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-hero-secondary:hover { background: rgba(255,255,255,.18); transform: translateY(-2px); }
.hero-stats {
  display: flex; gap: 40px; margin-top: 48px; padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,.1);
}
.hero-stat-value { font-size: 1.8rem; font-weight: 800; color: #fff; }
.hero-stat-label { font-size: .85rem; color: rgba(255,255,255,.55); margin-top: 2px; }

/* Hero Social Icons */
.hero-social .social-icon-hero {
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.1rem; transition: all .3s; backdrop-filter: blur(4px);
}
.hero-social .social-icon-hero:hover {
  background: var(--accent); color: var(--dark); border-color: var(--accent);
  transform: translateY(-3px); box-shadow: 0 6px 20px rgba(245,166,35,.35);
}
/* Hero Search Input Placeholder */
.hero-search-input::placeholder { color: rgba(255,255,255,.55); }

/* ===== TRACKING BAR ===== */
.tracking-bar {
  background: #fff; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl); padding: 40px 48px;
  margin-top: -40px; position: relative; z-index: 2;
}
.tracking-bar h3 { font-weight: 700; font-size: 1.2rem; color: var(--dark); margin-bottom: 4px; }
.tracking-bar p { color: var(--gray-500); font-size: .9rem; margin-bottom: 20px; }
.tracking-bar .input-group { gap: 0; }
.tracking-bar .input-group input {
  border: 1.5px solid var(--gray-200); border-radius: 10px 0 0 10px;
  padding: 14px 18px; font-size: .95rem; flex: 1;
  transition: border-color .2s;
}
.tracking-bar .input-group input:focus { outline: none; border-color: var(--primary); }
.tracking-bar .input-group button {
  background: var(--primary); color: #fff; border: none;
  padding: 14px 28px; border-radius: 0 10px 10px 0; font-weight: 600;
  cursor: pointer; transition: background .2s;
}
.tracking-bar .input-group button:hover { background: var(--primary-dark); }

/* ===== SECTION ===== */
.section { padding: 80px 0; }
.section-alt { background: var(--gray-50); }
.section-header { text-align: center; margin-bottom: 48px; }
.section-tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent-light); color: var(--accent-dark);
  padding: 6px 16px; border-radius: 50px; font-size: .8rem; font-weight: 600;
  margin-bottom: 12px;
}
.section-header h2 {
  font-weight: 800; font-size: clamp(26px, 2.8vw, 38px);
  color: var(--dark); margin-bottom: 12px;
}
.section-header p {
  color: var(--gray-500); font-size: 1.05rem; max-width: 600px; margin: 0 auto;
}

/* ===== STATS CARDS (home) ===== */
.stats-grid .stat-item {
  background: #fff; border-radius: var(--radius); padding: 28px;
  box-shadow: var(--shadow); text-align: center;
  transition: transform .3s, box-shadow .3s;
  border: 1px solid var(--gray-100);
}
.stats-grid .stat-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.stat-item-icon {
  width: 56px; height: 56px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px; font-size: 1.5rem;
}
.stat-item-icon.blue { background: #eef2ff; color: #4f46e5; }
.stat-item-icon.amber { background: var(--accent-light); color: var(--accent-dark); }
.stat-item-icon.green { background: #ecfdf5; color: #059669; }
.stat-item-icon.purple { background: #f5f3ff; color: #7c3aed; }
.stat-item-icon.red { background: #fef2f2; color: #dc2626; }
.stat-item .number { font-size: 2rem; font-weight: 800; color: var(--dark); }
.stat-item .label { font-size: .85rem; color: var(--gray-500); margin-top: 4px; font-weight: 500; }

/* ===== CARDS ===== */
.card-report {
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  transition: transform .3s, box-shadow .3s;
  border: 1px solid var(--gray-100);
  height: 100%;
}
.card-report:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card-report-img {
  display: block; height: 200px; overflow: hidden; position: relative;
}
.card-report-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s;
}
.card-report:hover .card-report-img img { transform: scale(1.08); }
.card-report-badge {
  position: absolute; top: 12px; left: 12px;
  padding: 4px 12px; border-radius: 6px; font-size: .7rem; font-weight: 700;
}
.card-report .badge-status {
  position: absolute; top: 12px; right: 12px;
  padding: 4px 12px; border-radius: 6px; font-size: .72rem; font-weight: 600;
}
.card-report-body { padding: 20px; }
.card-report-body .meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.card-report-body .meta .tag {
  background: var(--primary-light); color: var(--primary);
  padding: 2px 10px; border-radius: 6px; font-size: .72rem; font-weight: 500;
}
.card-report-body h5 {
  font-weight: 700; font-size: 1rem; color: var(--dark); margin-bottom: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-report-body h5 a { color: inherit; }
.card-report-body h5 a:hover { color: var(--primary); }
.card-report-body .date { font-size: .78rem; color: var(--gray-400); margin-bottom: 8px; }
.card-report-body p {
  font-size: .85rem; color: var(--gray-500);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* ===== FORM ===== */
.form-card {
  background: #fff; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 48px; border: 1px solid var(--gray-100);
}
.form-card .form-label { font-weight: 600; font-size: .875rem; color: var(--gray-700); margin-bottom: 6px; }
.form-card .form-control, .form-card .form-select {
  border-radius: 10px; padding: 12px 16px;
  border: 1.5px solid var(--gray-200);
  transition: all .2s; font-size: .9rem;
}
.form-card .form-control:focus, .form-card .form-select:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(30,58,95,.1);
}
.form-card .form-check-label { font-size: .9rem; color: var(--gray-600); }
.btn-submit {
  background: var(--primary); color: #fff; border: none;
  border-radius: 10px; padding: 14px 40px; font-weight: 700; font-size: 1rem;
  transition: all .3s; cursor: pointer;
}
.btn-submit:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(30,58,95,.3); }

/* ===== PAGE HEADER ===== */
.page-hero {
  background: linear-gradient(135deg, #0f1f3a, #1e3a5f);
  padding: 60px 0; text-align: center;
  position: relative; overflow: hidden;
}
.page-hero::before {
  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='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.page-hero h1 { color: #fff; font-weight: 800; font-size: clamp(24px, 2.5vw, 36px); position: relative; }
.page-hero p { color: rgba(255,255,255,.65); font-size: 1rem; margin-top: 8px; position: relative; }

/* ===== DETAIL PAGE ===== */
.detail-main .card { border: none; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 24px; overflow: hidden; }
.detail-main .card-header {
  background: #fff; border-bottom: 1px solid var(--gray-100);
  font-weight: 700; padding: 16px 24px; color: var(--dark);
}
.detail-main .card-body { padding: 24px; }
.detail-table { width: 100%; }
.detail-table td { padding: 10px 6px; border-bottom: 1px solid var(--gray-100); font-size: .9rem; vertical-align: top; }
.detail-table td:first-child { color: var(--gray-500); font-weight: 500; width: 35%; }
.detail-gallery img { width: 100%; height: 300px; object-fit: cover; border-radius: 8px; }
.detail-thumbs { display: flex; gap: 8px; margin-top: 8px; }
.detail-thumbs img { width: 80px; height: 60px; object-fit: cover; border-radius: 6px; cursor: pointer; opacity: .6; transition: all .2s; }
.detail-thumbs img:hover, .detail-thumbs img.active { opacity: 1; outline: 2px solid var(--primary); }

/* ===== JELAJAH (EXPLORE) ===== */
.filter-bar {
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px; margin-bottom: 32px;
  border: 1px solid var(--gray-100);
}

/* ===== COMMENT BUBBLES ===== */
.discussion-timeline { padding: 0; }
.discussion-item {
  display: flex; gap: 12px; padding: 16px 0;
  border-bottom: 1px solid var(--gray-100);
}
.discussion-item:last-child { border-bottom: none; }
.discussion-avatar { flex-shrink: 0; }
.discussion-avatar i { font-size: 2rem; color: var(--gray-300); }
.discussion-body { flex: 1; }
.discussion-body strong { font-size: .9rem; color: var(--dark); }
.discussion-body .time { font-size: .78rem; color: var(--gray-400); }
.discussion-body p { margin-top: 6px; font-size: .9rem; color: var(--gray-600); line-height: 1.5; }

/* ===== AUTH CARDS ===== */
.auth-card {
  background: #fff; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 48px 36px;
  border: 1px solid var(--gray-100);
}
.auth-card h4 { font-weight: 800; color: var(--dark); margin-bottom: 4px; }
.auth-card p { color: var(--gray-500); font-size: .9rem; margin-bottom: 24px; }

/* ===== SEARCH BOX ===== */
.search-large {
  display: flex; max-width: 500px; margin: 0 auto;
  border-radius: 12px; overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,.15);
}
.search-large input {
  flex: 1; border: none; padding: 16px 20px; font-size: 1rem; outline: none;
}
.search-large button {
  background: var(--accent); color: var(--dark); border: none;
  padding: 16px 28px; font-weight: 700; cursor: pointer;
  transition: background .2s;
}
.search-large button:hover { background: var(--accent-dark); }

/* ===== FOOTER ===== */
.footer {
  background: var(--dark); color: rgba(255,255,255,.65);
  padding: 60px 0 0;
}
.footer h5 { color: #fff; font-weight: 700; font-size: 1rem; margin-bottom: 20px; }
.footer p, .footer li { font-size: .88rem; line-height: 1.8; }
.footer ul { list-style: none; padding: 0; }
.footer ul li { margin-bottom: 8px; }
.footer ul li a { color: rgba(255,255,255,.65); transition: color .2s; }
.footer ul li a:hover { color: var(--accent); }
.footer-brand { font-weight: 800; font-size: 1.3rem; color: #fff !important; margin-bottom: 12px; display: block; }
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social a {
  width: 38px; height: 38px; border-radius: 10px;
  background: rgba(255,255,255,.08); color: rgba(255,255,255,.6);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; transition: all .2s;
}
.footer-social a:hover { background: var(--accent); color: var(--dark); }
.footer-contact i { width: 20px; color: var(--accent); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 20px 0; margin-top: 40px;
  text-align: center; font-size: .82rem;
}

/* ===== SCROLL TOP ===== */
.scroll-top {
  position: fixed; right: 24px; bottom: 24px;
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--primary); color: #fff; border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; cursor: pointer;
  box-shadow: var(--shadow-lg); z-index: 999;
  opacity: 0; visibility: hidden; transform: translateY(20px);
  transition: all .3s;
}
.scroll-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.scroll-top:hover { background: var(--primary-dark); color: #fff; transform: translateY(-2px); }

/* ===== BUTTON VARIANTS ===== */
.btn-custom {
  background: var(--primary); color: #fff; border: none;
  border-radius: 10px; padding: 12px 28px; font-weight: 600;
  font-size: .9rem; transition: all .25s; display: inline-flex;
  align-items: center; gap: 8px; cursor: pointer;
}
.btn-custom:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(30,58,95,.25); }
.btn-outline-custom {
  border: 1.5px solid var(--gray-200); color: var(--gray-600); border-radius: 10px;
  padding: 12px 24px; font-weight: 600; font-size: .9rem;
  transition: all .2s; display: inline-flex; align-items: center; gap: 8px;
}
.btn-outline-custom:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-50); }

/* ===== PAGINATION ===== */
.pagination-custom { display: flex; gap: 6px; justify-content: center; }
.pagination-custom .page-item .page-link {
  border: 1px solid var(--gray-200); border-radius: 8px;
  padding: 8px 16px; color: var(--gray-600); font-weight: 500;
  transition: all .2s;
}
.pagination-custom .page-item.active .page-link {
  background: var(--primary); border-color: var(--primary); color: #fff;
}
.pagination-custom .page-item .page-link:hover {
  border-color: var(--primary); color: var(--primary);
}

/* ===== ACCESSIBILITY ===== */
.skip-link {
  position: absolute; top: -100%; left: 16px;
  background: var(--primary); color: #fff;
  padding: 10px 20px; border-radius: 0 0 8px 8px;
  font-weight: 600; z-index: 999999;
  transition: top .2s; text-decoration: none !important;
}
.skip-link:focus { top: 0; outline: 3px solid #fff; outline-offset: 2px; }

/* ── Reading Guide ── */
.a11y-reading-guide {
  position: fixed; left: 0; right: 0; height: 36px;
  background-color: rgba(13,110,253,.12);
  border-top: 2px solid rgba(13,110,253,.4);
  border-bottom: 2px solid rgba(13,110,253,.4);
  pointer-events: none; z-index: 99998;
  display: none; visibility: hidden; opacity: 0; top: -100px;
  transition: top .05s linear;
}
html[data-a11y-reading-guide="on"] .a11y-reading-guide {
  display: block; visibility: visible; opacity: 1; top: 0;
}

/* ── Keyboard Navigation Focus ── */
html[data-a11y-keyboard="on"] a:focus-visible,
html[data-a11y-keyboard="on"] button:focus-visible,
html[data-a11y-keyboard="on"] input:focus-visible,
html[data-a11y-keyboard="on"] select:focus-visible,
html[data-a11y-keyboard="on"] textarea:focus-visible,
html[data-a11y-keyboard="on"] [tabindex]:focus-visible {
  outline: 3px solid #0d6efd !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 5px rgba(13,110,253,.2) !important;
}

/* ── Highlight Focus/Hover ── */
html[data-a11y-highlight="on"] a:hover,
html[data-a11y-highlight="on"] button:hover,
html[data-a11y-highlight="on"] input:hover,
html[data-a11y-highlight="on"] select:hover,
html[data-a11y-highlight="on"] textarea:hover,
html[data-a11y-highlight="on"] .nav-link:hover,
html[data-a11y-highlight="on"] .dropdown-item:hover,
html[data-a11y-highlight="on"] .card:hover,
html[data-a11y-highlight="on"] [tabindex]:hover {
  outline: 2px solid #0d6efd !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 4px rgba(13,110,253,.15) !important;
}

/* ── Contrast Modes ── */
html[data-a11y-contrast="bright"] { filter: brightness(1.15) contrast(1.25); }
html[data-a11y-contrast="bright"] .a11y-panel,
html[data-a11y-contrast="bright"] .a11y-fab,
html[data-a11y-contrast="bright"] .a11y-reading-guide { filter: none !important; }

html[data-a11y-contrast="dark"] {
  background: #000 !important; color: #eee !important;
}
html[data-a11y-contrast="dark"] .navbar { background: #111 !important; border-bottom-color: #333 !important; }
html[data-a11y-contrast="dark"] .navbar .nav-link { color: #ccc !important; }
html[data-a11y-contrast="dark"] .navbar .nav-link:hover { color: #fff !important; background: #333 !important; }
html[data-a11y-contrast="dark"] .navbar-brand { color: #fff !important; }
html[data-a11y-contrast="dark"] .btn-outline-nav { border-color: #666 !important; color: #ccc !important; }
html[data-a11y-contrast="dark"] .btn-outline-nav:hover { border-color: #fff !important; color: #fff !important; background: #333 !important; }
html[data-a11y-contrast="dark"] .hero { background: #111 !important; }
html[data-a11y-contrast="dark"] .tracking-bar { background: #111 !important; box-shadow: 0 0 0 1px #333 !important; }
html[data-a11y-contrast="dark"] .tracking-bar h3, html[data-a11y-contrast="dark"] .section-header h2,
html[data-a11y-contrast="dark"] .stat-item .number, html[data-a11y-contrast="dark"] .card-report-body h5,
html[data-a11y-contrast="dark"] .auth-card h4, html[data-a11y-contrast="dark"] .detail-main .card-header,
html[data-a11y-contrast="dark"] .footer h5, html[data-a11y-contrast="dark"] .footer-brand { color: #fff !important; }
html[data-a11y-contrast="dark"] .tracking-bar p, html[data-a11y-contrast="dark"] .section-header p,
html[data-a11y-contrast="dark"] .stat-item .label, html[data-a11y-contrast="dark"] .card-report-body p,
html[data-a11y-contrast="dark"] .card-report-body .date, html[data-a11y-contrast="dark"] .auth-card p,
html[data-a11y-contrast="dark"] .discussion-body p, html[data-a11y-contrast="dark"] .detail-table td { color: #bbb !important; }
html[data-a11y-contrast="dark"] .card-report, html[data-a11y-contrast="dark"] .stat-item,
html[data-a11y-contrast="dark"] .form-card, html[data-a11y-contrast="dark"] .filter-bar,
html[data-a11y-contrast="dark"] .detail-main .card, html[data-a11y-contrast="dark"] .auth-card,
html[data-a11y-contrast="dark"] .section { background: #111 !important; border-color: #333 !important; }
html[data-a11y-contrast="dark"] .card-report-body .meta .tag { background: #222 !important; color: #f5a623 !important; }
html[data-a11y-contrast="dark"] .form-card .form-control, html[data-a11y-contrast="dark"] .form-card .form-select,
html[data-a11y-contrast="dark"] .tracking-bar .input-group input,
html[data-a11y-contrast="dark"] .search-large input { background: #222 !important; color: #fff !important; border-color: #555 !important; }
html[data-a11y-contrast="dark"] .detail-table td { border-color: #333 !important; }
html[data-a11y-contrast="dark"] .discussion-item { border-color: #333 !important; }
html[data-a11y-contrast="dark"] a { color: #f5a623 !important; }
html[data-a11y-contrast="dark"] .footer { background: #0a0a0a !important; }
html[data-a11y-contrast="dark"] .page-hero { background: #111 !important; }
html[data-a11y-contrast="dark"] .page-hero h1 { color: #fff !important; }
html[data-a11y-contrast="dark"] .pagination-custom .page-item .page-link { background: #111 !important; color: #ccc !important; border-color: #555 !important; }
html[data-a11y-contrast="dark"] .pagination-custom .page-item.active .page-link { background: #f5a623 !important; color: #000 !important; }

html[data-a11y-contrast="reverse"] { filter: invert(1) hue-rotate(180deg); }
html[data-a11y-contrast="reverse"] img, html[data-a11y-contrast="reverse"] video,
html[data-a11y-contrast="reverse"] iframe,
html[data-a11y-contrast="reverse"] .a11y-fab, html[data-a11y-contrast="reverse"] .a11y-panel {
  filter: invert(1) hue-rotate(180deg) !important;
}

html[data-a11y-contrast="grayscale"] { filter: grayscale(100%); }
html[data-a11y-contrast="grayscale"] .a11y-fab, html[data-a11y-contrast="grayscale"] .a11y-panel {
  filter: none !important;
}

/* ── Text Display Modes ── */
html[data-a11y-underline="on"] a { text-decoration: underline !important; text-underline-offset: 3px; }
html[data-a11y-underline-h="on"] h1, html[data-a11y-underline-h="on"] h2,
html[data-a11y-underline-h="on"] h3, html[data-a11y-underline-h="on"] h4,
html[data-a11y-underline-h="on"] h5, html[data-a11y-underline-h="on"] h6 {
  border-bottom: 2px solid currentColor; padding-bottom: 4px;
}
html[data-a11y-readable="on"] body, html[data-a11y-readable="on"] p,
html[data-a11y-readable="on"] li, html[data-a11y-readable="on"] td,
html[data-a11y-readable="on"] span, html[data-a11y-readable="on"] label,
html[data-a11y-readable="on"] input, html[data-a11y-readable="on"] textarea {
  font-family: Arial, Helvetica, sans-serif !important;
  letter-spacing: 0.04em; word-spacing: 0.1em;
}
html[data-a11y-spacing="on"] p, html[data-a11y-spacing="on"] li,
html[data-a11y-spacing="on"] td, html[data-a11y-spacing="on"] span,
html[data-a11y-spacing="on"] div {
  line-height: 2 !important; letter-spacing: 0.12em !important; word-spacing: 0.16em !important;
}
html[data-a11y-align="left"] p, html[data-a11y-align="left"] li,
html[data-a11y-align="left"] td, html[data-a11y-align="left"] th,
html[data-a11y-align="left"] h1, html[data-a11y-align="left"] h2,
html[data-a11y-align="left"] h3, html[data-a11y-align="left"] h4,
html[data-a11y-align="left"] h5, html[data-a11y-align="left"] h6,
html[data-a11y-align="left"] div, html[data-a11y-align="left"] span {
  text-align: left !important;
}

/* ── Hide Images ── */
html[data-a11y-hide-img="on"] img:not(.a11y-fab img):not(.a11y-panel img) { visibility: hidden !important; }

/* ── Stop Animations ── */
html[data-a11y-animations="off"] *, html[data-a11y-animations="off"] *::before,
html[data-a11y-animations="off"] *::after {
  animation-play-state: paused !important; transition-duration: 0.001ms !important;
}

/* ── Big Cursors ── */
html[data-a11y-cursor="white"] *, html[data-a11y-cursor="white"] a,
html[data-a11y-cursor="white"] button {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cpath d='M8 4 L8 32 L16 24 L22 36 L26 34 L20 22 L30 22 Z' fill='white' stroke='black' stroke-width='2'/%3E%3C/svg%3E") 8 4, auto !important;
}
html[data-a11y-cursor="black"] *, html[data-a11y-cursor="black"] a,
html[data-a11y-cursor="black"] button {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cpath d='M8 4 L8 32 L16 24 L22 36 L26 34 L20 22 L30 22 Z' fill='black' stroke='white' stroke-width='2'/%3E%3C/svg%3E") 8 4, auto !important;
}

/* ===== ACCESSIBILITY WIDGET UI ===== */
.a11y-toolbar { position: fixed; bottom: 24px; left: 24px; z-index: 99999; }
.a11y-fab {
  width: 52px; height: 52px; border-radius: 50%;
  background: #0d6efd; color: #fff; border: none;
  font-size: 22px; cursor: pointer;
  box-shadow: 0 2px 8px rgba(13,110,253,.25);
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.a11y-fab:hover { background: #0a58ca; transform: scale(1.08); box-shadow: 0 4px 16px rgba(13,110,253,.4); }
.a11y-fab:focus-visible { outline: 3px solid #0d6efd; outline-offset: 3px; }
.a11y-fab[aria-expanded="true"] { background: #0a58ca; }

.a11y-panel {
  position: fixed; bottom: 88px; left: 24px;
  width: 340px; max-height: calc(100vh - 120px);
  background: #fff; border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,.14);
  border: 1px solid #e2e8f0;
  display: flex; flex-direction: column; overflow: hidden;
  opacity: 0; visibility: hidden; transform: translateY(12px) scale(.97);
  transform-origin: bottom left;
  transition: opacity .22s, visibility .22s, transform .22s;
  color: #1a1a2e; font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}
.a11y-panel.show { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

.a11y-panel__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 12px; border-bottom: 1px solid #e2e8f0; flex-shrink: 0;
}
.a11y-panel__title { font-size: 15px; font-weight: 700; color: #1a1a2e; }
.a11y-panel__header-actions { display: flex; align-items: center; gap: 6px; }
.a11y-panel__reset, .a11y-panel__close {
  background: none; border: none; cursor: pointer;
  padding: 5px 8px; border-radius: 8px;
  font-size: 12px; color: #6c757d;
  transition: all .15s; display: flex; align-items: center; gap: 4px;
}
.a11y-panel__reset:hover { background: #fff3cd; color: #856404; }
.a11y-panel__close:hover { background: #fde8e8; color: #dc3545; }

.a11y-panel__body { overflow-y: auto; flex: 1; padding: 14px 14px 8px; }
.a11y-panel__body::-webkit-scrollbar { width: 4px; }
.a11y-panel__body::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 4px; }

.a11y-section { margin-bottom: 14px; }
.a11y-section__label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .6px; color: #6c757d; margin-bottom: 8px; padding: 0 2px;
}
.a11y-section__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.a11y-section__list { display: flex; flex-direction: column; gap: 4px; }
.a11y-divider { height: 1px; background: #e2e8f0; margin: 4px 0 14px; }

/* Option Button */
.a11y-opt {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; padding: 10px 4px; background: #fff;
  border: 1.5px solid #e2e8f0; border-radius: 10px;
  cursor: pointer; transition: all .15s;
  font-size: 11px; font-weight: 600; color: #1a1a2e;
  text-align: center; min-height: 60px;
}
.a11y-opt:hover { background: #f0f4ff; border-color: #0d6efd; color: #0d6efd; }
.a11y-opt.active { background: #0d6efd; border-color: #0d6efd; color: #fff; }
.a11y-opt__icon { font-size: 16px; }
.a11y-opt__label { font-size: 10px; line-height: 1.2; }

/* Toggle Row */
.a11y-toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px; background: #fff;
  border: 1.5px solid #e2e8f0; border-radius: 10px;
  cursor: pointer; transition: all .15s; gap: 10px; color: #1a1a2e;
}
.a11y-toggle-row:hover { background: #f0f4ff; border-color: #0d6efd; }
.a11y-toggle-row.active { background: #0d6efd; border-color: #0d6efd; color: #fff; }
.a11y-toggle-row__left { display: flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 600; }
.a11y-toggle-row__icon { font-size: 14px; width: 20px; text-align: center; }
.a11y-toggle-row__switch {
  width: 34px; height: 20px; background: #e2e8f0;
  border-radius: 10px; position: relative; flex-shrink: 0;
  transition: background .2s;
}
.a11y-toggle-row__switch::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 14px; height: 14px; background: #fff;
  border-radius: 50%; transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.a11y-toggle-row.active .a11y-toggle-row__switch { background: rgba(255,255,255,.35); }
.a11y-toggle-row.active .a11y-toggle-row__switch::after { transform: translateX(14px); }

/* Text Size */
.a11y-textsize {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; background: #fff;
  border: 1.5px solid #e2e8f0; border-radius: 10px;
}
.a11y-textsize__btn {
  width: 34px; height: 34px; border-radius: 8px;
  border: 1.5px solid #e2e8f0; background: none;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #1a1a2e; transition: all .15s;
}
.a11y-textsize__btn:hover { background: #0d6efd; border-color: #0d6efd; color: #fff; }
.a11y-textsize__display { flex: 1; text-align: center; font-size: 13px; font-weight: 700; }

@media (max-width: 480px) {
  .a11y-panel { width: calc(100vw - 32px); left: 16px; bottom: 84px; }
  .a11y-fab { bottom: 20px; left: 20px; width: 48px; height: 48px; font-size: 20px; }
}

/* ===== TTS — Text to Speech ===== */
.a11y-tts { display: flex; flex-direction: column; gap: 6px; }
.a11y-tts-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 14px; background: #fff;
  border: 1.5px solid #e2e8f0; border-radius: 10px;
  cursor: pointer; transition: all .15s;
  font-size: 13px; font-weight: 600; color: #1a1a2e;
}
.a11y-tts-btn:hover:not(:disabled) { background: #f0f4ff; border-color: #0d6efd; color: #0d6efd; }
.a11y-tts-btn:disabled { opacity: .45; cursor: not-allowed; }
.a11y-tts-btn.active { background: #0d6efd; border-color: #0d6efd; color: #fff; }
.a11y-tts-btn.active i { animation: ttsPulse 1s infinite; }
.a11y-tts-stop { color: #dc3545; border-color: #dc3545; }
.a11y-tts-stop:hover:not(:disabled) { background: #dc3545; color: #fff !important; }
.a11y-tts-status {
  font-size: 11px; color: #6c757d; text-align: center;
  min-height: 16px; padding-top: 4px; font-style: italic;
}
@keyframes ttsPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .5; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991px) {
  .navbar .navbar-collapse {
    background: #fff; position: absolute; top: 80px; left: 0; right: 0;
    padding: 16px; box-shadow: var(--shadow-lg); border-radius: 0 0 var(--radius) var(--radius);
    z-index: 1050; max-height: calc(100vh - 80px); overflow-y: auto;
  }
  .navbar .nav-link { padding: 12px 16px !important; }
  .navbar .nav-link::after { display: none; }
  .navbar .d-flex { flex-direction: row; margin-top: 8px; gap: 8px; }
  .navbar .dropdown { position: static !important; }
  .navbar .dropdown-menu {
    position: static !important; float: none; width: 100%;
    box-shadow: none; border: none; padding: 4px 0 4px 16px; margin-top: 0;
  }
  .navbar .dropdown-menu .dropdown-item { padding: 8px 16px; }
}
  .hero-stats { gap: 24px; flex-wrap: wrap; }
  .tracking-bar { padding: 24px; }
  .tracking-bar .input-group { flex-direction: column; gap: 8px; }
  .tracking-bar .input-group input { border-radius: 10px !important; }
  .tracking-bar .input-group button { border-radius: 10px !important; }
  .form-card { padding: 24px; }
  .stats-grid .col-lg-3 { margin-bottom: 16px; }
}

@media (max-width: 575px) {
  body { padding-top: 72px; }
  .navbar { height: 72px; }
  .hero { padding: 60px 0 40px; }
  .section { padding: 48px 0; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn-hero-primary, .hero-actions .btn-hero-secondary { width: 100%; justify-content: center; }
  .card-report-img { height: 160px; }
  .form-card { padding: 20px 16px; }
  .auth-card { padding: 32px 20px; }
  .detail-main .card-body { padding: 16px; }
}
