/* ==========================================================================
   COPERSADA PRESS — Official Publisher & Reader Portal Stylesheet
   PT CIPTA OPTIMA PERSADA | https://penerbit.copersada.com
   ========================================================================== */

:root {
  --primary-navy: #0A2540;
  --primary-navy-dark: #061626;
  --accent-cyan: #00A8E8;
  --accent-cyan-light: #38BDF8;
  --accent-cyan-bg: rgba(0, 168, 232, 0.08);
  --text-dark: #0F172A;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  --bg-page: #F8FAFC;
  --bg-card: #FFFFFF;
  --border-light: #E2E8F0;
  --border-focus: #00A8E8;
  --shadow-sm: 0 1px 3px rgba(10, 37, 64, 0.05);
  --shadow-md: 0 4px 20px rgba(10, 37, 64, 0.08);
  --shadow-lg: 0 12px 36px rgba(10, 37, 64, 0.12);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Fira Code', monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-top: 102px; /* Offset pas untuk 2 baris header tetap */
}

/* =========================================================
   SPA View Architecture Rules
   ========================================================= */
.spa-view {
  display: none;
  width: 100%;
}

.spa-view.active-view {
  display: block;
}


a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: 1260px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------------------------------------------------------
   1. Fixed Top Header (Dua Baris Sesuai Referensi Visual)
   --------------------------------------------------------- */
.fixed-top-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: #FFFFFF;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
}

/* Baris 1: Top Bar (Latar Belakang Terang / Abu-abu Halus) */
.header-top-bar {
  background-color: #ECEFF1;
  border-bottom: 1px solid #CFD8DC;
  padding: 7px 0;
}

.header-top-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.header-logo-img {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.header-brand-name {
  font-size: 1.25rem;
  font-weight: 900;
  color: #001A72;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  font-family: var(--font-sans);
}

.header-top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Tombol Lonceng Notifikasi */
.notif-wrapper {
  position: relative;
}

.btn-icon-bell {
  background: transparent;
  border: none;
  cursor: pointer;
  color: #64748B;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 6px;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.btn-icon-bell:hover {
  color: #001A72;
  background-color: rgba(0, 0, 0, 0.05);
}

.notif-badge-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  background-color: #EF4444;
  border-radius: 50%;
  border: 1.5px solid #ECEFF1;
}

.notif-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 320px;
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 1100;
  overflow: hidden;
}

.notif-dropdown.active {
  display: block;
  animation: fadeInDown 0.2s ease;
}

.notif-header {
  padding: 12px 16px;
  background-color: #F8FAFC;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.85rem;
  color: var(--primary-navy);
}

.notif-item {
  padding: 12px 16px;
  border-bottom: 1px solid #F1F5F9;
  display: flex;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-dark);
}

.notif-item.unread {
  background-color: #F0F9FF;
}

.notif-bullet {
  width: 7px;
  height: 7px;
  background-color: #00A8E8;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

.notif-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
  display: block;
}

/* Tombol Login / Registrasi */
.btn-login-reg {
  background-color: #FFFFFF;
  color: #334155;
  border: 1.5px solid #CBD5E1;
  padding: 6px 18px;
  border-radius: 4px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-login-reg:hover {
  border-color: #001A72;
  color: #001A72;
  background-color: #F8FAFC;
}

/* Tombol Keranjang Belanja (Pink/Merah) */
.btn-cart-header {
  background-color: #FF1754;
  color: #FFFFFF;
  border: none;
  padding: 6px 16px;
  border-radius: 4px;
  font-size: 0.90rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(255, 23, 84, 0.35);
  transition: all 0.2s ease;
  user-select: none;
}

.btn-cart-header svg,
.btn-cart-header span {
  pointer-events: none;
}

.btn-cart-header:hover {
  background-color: #E0003E;
  transform: translateY(-1px);
}

/* User Profile Badge saat logged-in */
.user-profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #FFFFFF;
  border: 1.5px solid #00A8E8;
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 0.84rem;
  font-weight: 700;
  color: #001A72;
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-profile-badge:hover {
  background-color: #F0F9FF;
}

/* Baris 2: Main Navigation Bar (Background Biru Royal Navy) */
.header-nav-bar {
  background-color: #000088;
  padding: 0;
}

.header-nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 48px;
}

.nav-menu-group {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 100%;
}

/* Quick Console / Role Switcher Button on V-Bar (Left of HOME) */
.nav-role-switcher-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  color: #FFFFFF !important;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  margin-right: 8px;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.nav-role-switcher-btn:hover {
  background: rgba(255, 255, 255, 0.24);
  border-color: #38BDF8;
  transform: translateY(-1px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.nav-role-switcher-btn.active {
  background: linear-gradient(135deg, #0284C7 0%, #0369A1 100%);
  border-color: #38BDF8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.45);
}

.role-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34D399;
  box-shadow: 0 0 8px #34D399;
  animation: pulse-role 2s infinite;
}

@keyframes pulse-role {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.nav-item {
  color: #FFFFFF !important;
  font-size: 0.86rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0 14px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.3px;
  transition: background-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.nav-item:hover, .nav-item.active {
  background-color: rgba(255, 255, 255, 0.16);
}

.caret-arrow {
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

/* Dropdown Kategori */
.nav-dropdown-wrapper {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.nav-dropdown-wrapper:hover .dropdown-menu {
  display: flex;
}

.nav-dropdown-wrapper:hover .dropdown-menu.dropdown-menu-mega {
  display: grid;
}

.nav-dropdown-wrapper:hover .caret-arrow {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 290px;
  background: #FFFFFF;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 12px 32px rgba(0, 26, 114, 0.15);
  display: none;
  flex-direction: column;
  padding: 6px 0;
  border: 1px solid var(--border-light);
  border-top: none;
  z-index: 1050;
  animation: fadeInDown 0.15s ease;
}

/* Mega Dropdown Multi-Kolom (Katalog Terbitan) */
.dropdown-menu.dropdown-menu-mega {
  min-width: 630px;
  max-width: 680px;
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 16px 40px rgba(0, 26, 114, 0.20);
  background: #FFFFFF;
  border: 1.5px solid var(--border-light);
  border-top: none;
}

.dropdown-menu-mega .dropdown-item {
  border-radius: 8px;
  border: 1px solid #F1F5F9;
  padding: 9px 12px;
  background-color: #F8FAFC;
  transition: all 0.18s ease;
  border-bottom: 1px solid #F1F5F9;
}

.dropdown-menu-mega .dropdown-item:hover {
  background-color: #EFF6FF;
  border-color: #BAE6FD;
  color: #001A72 !important;
  transform: translateY(-1px);
  padding-left: 12px;
  box-shadow: 0 2px 8px rgba(0, 168, 232, 0.12);
}

.dropdown-item {
  color: var(--text-dark) !important;
  padding: 10px 16px;
  font-size: 0.84rem;
  font-weight: 600;
  text-transform: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: all 0.15s ease;
  border-bottom: 1px solid #F8FAFC;
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item:hover {
  background-color: #F1F5F9;
  color: #001A72 !important;
  padding-left: 20px;
}

/* Kolom Pencarian Kanan: 'Cari Sesuatu ...' */
.nav-search-box {
  display: flex;
  align-items: center;
  background-color: #FFFFFF;
  border-radius: 3px;
  padding: 0 10px;
  width: 270px;
  height: 32px;
}

.search-input {
  border: none;
  outline: none;
  width: 100%;
  font-size: 0.84rem;
  color: #1E293B;
  font-family: inherit;
  background: transparent;
}

.search-input::placeholder {
  color: #94A3B8;
  font-style: normal;
}

.search-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: #475569;
  display: flex;
  align-items: center;
  padding: 0;
  transition: color 0.2s ease;
}

.search-btn:hover {
  color: #001A72;
}

/* Tombol CTA Kirim Naskah di Navbar */
.nav-item-cta {
  background-color: rgba(255, 255, 255, 0.12);
}

.nav-item-cta:hover {
  background-color: #FF1754 !important;
  color: #FFFFFF !important;
}

/* ---------------------------------------------------------
   Auth Modal & Tabs
   --------------------------------------------------------- */
.auth-gate-banner {
  background-color: #FEF2F2;
  border-left: 4px solid #EF4444;
  color: #991B1B;
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 18px;
  display: none;
  line-height: 1.45;
}

.auth-tabs {
  display: flex;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 22px;
}

.auth-tab-btn {
  flex: 1;
  background: none;
  border: none;
  padding: 12px 16px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.auth-tab-btn.active {
  color: var(--primary-navy);
  border-bottom: 3px solid var(--accent-cyan);
  margin-bottom: -2px;
}

/* ---------------------------------------------------------
   User Profile Dropdown Menu & Google Chooser
   --------------------------------------------------------- */
.user-dropdown-container {
  position: relative;
  display: inline-block;
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: #FFFFFF;
  border: 1.5px solid rgba(0, 168, 232, 0.4);
  padding: 5px 12px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary-navy);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.user-profile-badge:hover,
.user-profile-badge.active {
  background-color: var(--accent-cyan-bg);
  border-color: var(--accent-cyan);
  box-shadow: 0 2px 8px rgba(0, 168, 232, 0.2);
}

.user-avatar-circle {
  background: linear-gradient(135deg, #001A72 0%, #00A8E8 100%);
  color: #FFFFFF;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
}

.user-dropdown-arrow {
  font-size: 0.65rem;
  color: #64748B;
  transition: transform 0.2s ease;
}

.user-profile-badge.active .user-dropdown-arrow {
  transform: rotate(180deg);
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 300px;
  background: #FFFFFF;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 26, 114, 0.15), 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--border-light);
  padding: 8px 0;
  z-index: 1050;
  display: none;
  animation: dropdownFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.user-dropdown-menu.active {
  display: block;
}

@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.user-dropdown-header {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #F8FAFC;
  border-bottom: 1px solid var(--border-light);
}

.user-dropdown-header .user-avatar-circle {
  width: 38px;
  height: 38px;
  font-size: 0.95rem;
}

.user-dropdown-info {
  overflow: hidden;
  flex: 1;
}

.user-dropdown-name {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--primary-navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-dropdown-email {
  font-size: 0.74rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.user-dropdown-role-badge {
  display: inline-block;
  background: rgba(0, 168, 232, 0.12);
  color: #0077A8;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
}

.user-dropdown-role-badge.badge-client {
  background: rgba(2, 132, 199, 0.12);
  color: #0284C7;
  border: 1px solid rgba(2, 132, 199, 0.25);
}

.user-dropdown-role-badge.badge-editor {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.user-dropdown-role-badge.badge-admin {
  background: rgba(217, 119, 6, 0.12);
  color: #D97706;
  border: 1px solid rgba(217, 119, 6, 0.25);
}

.user-dropdown-category {
  padding: 7px 16px 5px 16px;
  font-size: 0.67rem;
  font-weight: 800;
  color: #64748B;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: #F8FAFC;
  border-top: 1px solid #F1F5F9;
  border-bottom: 1px solid #F1F5F9;
  display: flex;
  align-items: center;
  gap: 6px;
}

.user-dropdown-category:first-of-type {
  border-top: none;
}

.user-dropdown-divider {
  height: 1px;
  background-color: var(--border-light);
  margin: 6px 0;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 16px;
  color: #334155;
  text-decoration: none;
  font-size: 0.82rem;
  transition: background 0.15s ease, color 0.15s ease;
  cursor: pointer;
}

.user-dropdown-item:hover {
  background-color: #F1F5F9;
  color: var(--primary-navy);
}

.user-dropdown-item.text-danger:hover {
  background-color: #FEF2F2;
  color: #DC2626;
}

.user-dropdown-item .dropdown-icon {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.user-dropdown-item strong {
  display: block;
  font-size: 0.82rem;
  color: inherit;
}

.user-dropdown-item small {
  display: block;
  font-size: 0.7rem;
  color: #94A3B8;
  margin-top: 1px;
}

/* User Profile Edit Modal Styles */
.profile-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2200;
  padding: 16px;
  animation: modalOverlayFade 0.2s ease-out;
}

.profile-modal-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  border: 1.5px solid #E2E8F0;
  display: flex;
  flex-direction: column;
  animation: modalScaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.profile-modal-header {
  padding: 18px 24px;
  background: linear-gradient(135deg, #001A72 0%, #0284C7 100%);
  color: #FFFFFF;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
}

.profile-modal-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.profile-section-box {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-md);
  padding: 16px 18px;
}

.profile-section-heading {
  font-size: 0.88rem;
  font-weight: 800;
  color: #001A72;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #E2E8F0;
}

.profile-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 620px) {
  .profile-grid-2 {
    grid-template-columns: 1fr;
  }
}

.profile-modal-footer {
  padding: 16px 24px;
  background: #F8FAFC;
  border-top: 1px solid #E2E8F0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  position: sticky;
  bottom: 0;
  z-index: 10;
}

/* Google Account Chooser Modal */
.google-account-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border: 1.5px solid #E2E8F0;
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #FFFFFF;
}

.google-account-card:hover {
  border-color: #00A8E8;
  background-color: #F0F9FF;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0, 168, 232, 0.12);
}

.google-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  color: #FFFFFF;
  flex-shrink: 0;
}

.btn-google-auth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: #FFFFFF;
  color: #1E293B;
  border: 1.5px solid #CBD5E1;
  border-radius: var(--radius-md);
  padding: 11px 16px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  margin-bottom: 12px;
}

.btn-google-auth:hover {
  background: #F8FAFC;
  border-color: #94A3B8;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: #94A3B8;
  font-size: 0.76rem;
  font-weight: 600;
  margin: 16px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-light);
}

.auth-divider span {
  padding: 0 12px;
}

/* ---------------------------------------------------------
   3. Hero Section
   --------------------------------------------------------- */
.hero {
  position: relative;
  background: linear-gradient(180deg, #FFFFFF 0%, #F1F5F9 100%);
  padding: 70px 0 80px;
  overflow: hidden;
  border-bottom: 1px solid var(--border-light);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--accent-cyan-bg);
  border: 1px solid rgba(0, 168, 232, 0.25);
  color: var(--primary-navy);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--primary-navy);
  margin-bottom: 18px;
  letter-spacing: -0.5px;
}

.hero-title .highlight {
  color: var(--accent-cyan);
  position: relative;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  max-width: 580px;
}

.hero-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, #0284C7 100%);
  color: #FFFFFF;
  font-weight: 700;
  padding: 13px 26px;
  border-radius: var(--radius-md);
  box-shadow: 0 6px 20px rgba(0, 168, 232, 0.3);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 168, 232, 0.4);
}

.btn-secondary {
  background-color: #FFFFFF;
  color: var(--primary-navy);
  border: 1.5px solid var(--border-light);
  font-weight: 700;
  padding: 13px 24px;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-secondary:hover {
  border-color: var(--primary-navy);
  background-color: #F8FAFC;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
}

.stat-num {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary-navy);
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.hero-card-preview {
  background-color: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.card-header-badge {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.badge-official {
  background-color: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
}

/* ---------------------------------------------------------
   4. Section Titles
   --------------------------------------------------------- */
.section {
  padding: 80px 0;
}

.section-head {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 48px;
}

.section-tag {
  color: var(--accent-cyan);
  font-weight: 800;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary-navy);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.section-desc {
  font-size: 0.98rem;
  color: var(--text-muted);
}

/* ---------------------------------------------------------
   5. Legalitas & Akreditasi Penerbit Grid
   --------------------------------------------------------- */
.legal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.legal-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: all 0.25s ease;
}

.legal-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-cyan);
}

.legal-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.legal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-navy);
  margin-bottom: 8px;
}

.legal-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ---------------------------------------------------------
   6. Katalog Terbitan & E-Commerce Grid
   --------------------------------------------------------- */
.catalog-filter {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.filter-btn {
  background-color: #FFFFFF;
  border: 1px solid var(--border-light);
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn.active, .filter-btn:hover {
  background-color: var(--primary-navy);
  color: #FFFFFF;
  border-color: var(--primary-navy);
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 28px;
  justify-content: start;
}

.book-card {
  background-color: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  width: 100%;
  max-width: 380px;
}

.book-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.book-cover-mock {
  background: linear-gradient(135deg, var(--primary-navy) 0%, #1E293B 100%);
  padding: 34px 22px 28px 26px;
  color: #FFFFFF;
  text-align: center;
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-left: 5px solid rgba(255, 255, 255, 0.25);
  box-shadow: inset 8px 0 12px rgba(0, 0, 0, 0.35), inset -1px 0 2px rgba(255, 255, 255, 0.1);
  border-radius: 8px 8px 0 0;
}

.book-cover-mock::before {
  content: '';
  position: absolute;
  top: 0;
  left: 6px;
  bottom: 0;
  width: 2px;
  background: rgba(0, 0, 0, 0.25);
}

.book-cover-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background-color: var(--accent-cyan);
  color: #FFFFFF;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  z-index: 2;
}

.book-cover-publisher-logo {
  position: absolute;
  bottom: 14px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  z-index: 2;
  transition: transform 0.25s ease;
}

.mock-publisher-logo-img {
  height: 38px;
  max-width: 130px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.92;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.book-card:hover .mock-publisher-logo-img {
  opacity: 1;
  transform: scale(1.05);
}

.book-cover-mock.has-image-cover {
  padding: 0;
  width: 100%;
  min-height: auto;
  overflow: hidden;
  position: relative;
  background: #020617;
  display: block;
  border-radius: 8px 8px 0 0;
}

.book-cover-img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.book-card:hover .book-cover-img {
  transform: scale(1.04);
}

.book-cover-spine-overlay {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 18px;
  background: linear-gradient(90deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.15) 60%, transparent 100%);
  pointer-events: none;
  z-index: 2;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.book-cover-title {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 8px;
}

.book-cover-author {
  font-size: 0.82rem;
  color: var(--accent-cyan-light);
}

.book-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.book-meta-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.book-tag {
  background-color: #F1F5F9;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
}

.book-synopsis {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 18px;
  flex: 1;
}

.book-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

.book-price {
  display: flex;
  flex-direction: column;
}

.price-print {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary-navy);
}

.price-pdf {
  font-size: 0.78rem;
  color: var(--accent-cyan);
  font-weight: 700;
}

.book-actions {
  display: flex;
  gap: 8px;
}

.btn-sm-buy {
  background-color: var(--primary-navy);
  color: #FFFFFF;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  transition: background-color 0.2s;
}

.btn-sm-buy:hover {
  background-color: var(--accent-cyan);
}

.btn-sm-read {
  background-color: #F1F5F9;
  color: var(--primary-navy);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  cursor: pointer;
}

/* ---------------------------------------------------------
   7. PWA Reader Simulator / Demo
   --------------------------------------------------------- */
.pwa-demo-box {
  background: linear-gradient(135deg, var(--primary-navy-dark) 0%, var(--primary-navy) 100%);
  color: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-lg);
}

.pwa-demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: center;
}

.reader-mockup {
  background-color: #FFFFFF;
  color: var(--text-dark);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  position: relative;
  min-height: 340px;
  display: flex;
  flex-direction: column;
}

.reader-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 10px;
  margin-bottom: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.reader-content {
  flex: 1;
  position: relative;
  font-size: 0.88rem;
  line-height: 1.6;
}

.watermark-overlay {
  position: absolute;
  top: 40%;
  left: 5%;
  right: 5%;
  transform: rotate(-25deg);
  color: rgba(10, 37, 64, 0.12);
  font-size: 0.95rem;
  font-weight: 800;
  text-align: center;
  pointer-events: none;
  user-select: none;
}

/* ---------------------------------------------------------
   8. Royalty Calculator
   --------------------------------------------------------- */
.calc-card {
  background-color: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-md);
  max-width: 800px;
  margin: 0 auto;
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary-navy);
  margin-bottom: 6px;
}

.form-input, .form-select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-input:focus, .form-select:focus {
  border-color: var(--accent-cyan);
}

.calc-result-box {
  background: var(--accent-cyan-bg);
  border: 1px solid rgba(0, 168, 232, 0.3);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.calc-result-val {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-navy);
  margin-top: 4px;
}

/* ---------------------------------------------------------
   9. Footer
   --------------------------------------------------------- */
.footer {
  background-color: var(--primary-navy-dark);
  color: #94A3B8;
  padding: 60px 0 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 36px;
  margin-bottom: 40px;
}

.footer-title {
  color: #FFFFFF;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a:hover {
  color: var(--accent-cyan);
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  font-size: 0.82rem;
}

/* ---------------------------------------------------------
   10. Modal Form
   --------------------------------------------------------- */
.modal,
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(6, 22, 38, 0.75);
  backdrop-filter: blur(5px);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal.active,
.modal-overlay.active {
  display: flex !important;
}

.modal-card {
  background-color: #FFFFFF;
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  padding: 32px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  animation: modalPopupScale 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPopupScale {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 20px;
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
}

/* ---------------------------------------------------------
   11. Cart Modal & Toast Styles
   --------------------------------------------------------- */
.cart-modal-card {
  max-width: 520px;
  width: 100%;
  margin: auto;
}

.cart-modal-body {
  margin-top: 16px;
}

.cart-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
  gap: 12px;
}


.cart-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
  gap: 12px;
}

.cart-item-info {
  flex: 1;
}

.cart-item-title {
  font-size: 0.90rem;
  font-weight: 700;
  color: var(--primary-navy);
  margin-bottom: 5px;
  line-height: 1.35;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.cart-format-select {
  padding: 4px 8px;
  font-size: 0.76rem;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid #CBD5E1;
  background-color: #F8FAFC;
  color: #1E293B;
  outline: none;
  cursor: pointer;
  max-width: 230px;
}

.cart-format-select:focus {
  border-color: #0284C7;
  background-color: #FFFFFF;
}

.cart-qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  background: #FFFFFF;
  overflow: hidden;
}

.btn-qty-step {
  background: #F1F5F9;
  border: none;
  width: 28px;
  height: 28px;
  font-size: 0.95rem;
  font-weight: 800;
  color: #1E293B;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  user-select: none;
}

.btn-qty-step:hover {
  background: #E2E8F0;
  color: #001A72;
}

.cart-qty-input {
  width: 40px;
  height: 28px;
  text-align: center;
  border: none;
  border-left: 1px solid #E2E8F0;
  border-right: 1px solid #E2E8F0;
  font-size: 0.84rem;
  font-weight: 700;
  color: #001A72;
  outline: none;
  -moz-appearance: textfield;
}

.cart-qty-input::-webkit-outer-spin-button,
.cart-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cart-item-info {
  flex: 1;
}

.cart-item-title {
  font-size: 0.90rem;
  font-weight: 700;
  color: var(--primary-navy);
  margin-bottom: 3px;
}

.cart-item-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.cart-item-price {
  font-size: 0.90rem;
  font-weight: 800;
  color: #001A72;
}

.btn-remove-cart {
  background: none;
  border: none;
  color: #EF4444;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px;
  transition: transform 0.2s;
}

.btn-remove-cart:hover {
  transform: scale(1.2);
}

.cart-empty-msg {
  text-align: center;
  padding: 30px 10px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.cart-summary-box {
  background-color: #F8FAFC;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 18px 0;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  margin-bottom: 6px;
  color: #475569;
}

.cart-summary-row.total {
  margin-bottom: 0;
  padding-top: 8px;
  border-top: 1px solid #E2E8F0;
  font-weight: 700;
  font-size: 1rem;
  color: #0F172A;
}

.cart-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: #001A72;
  color: #FFFFFF;
  padding: 12px 22px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  font-size: 0.88rem;
  font-weight: 600;
  z-index: 9999;
  display: none;
  animation: slideInUp 0.3s ease;
  border-left: 4px solid #FF1754;
}

/* ---------------------------------------------------------
   12. Payment Gateway Modal & QRIS Styles
   --------------------------------------------------------- */
.payment-method-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 8px;
}

.payment-tab-btn {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid var(--border-light);
  background: #F8FAFC;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.payment-tab-btn.active {
  background: #001A72;
  color: #FFFFFF;
  border-color: #001A72;
}

.qris-box {
  background: #FFFFFF;
  border: 2px solid #E2E8F0;
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  margin-bottom: 14px;
}

.qris-qr-code {
  width: 160px;
  height: 160px;
  margin: 0 auto 10px;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  padding: 8px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------------------------------------------------------
   13. User Library & Reader Modal Styles
   --------------------------------------------------------- */
.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.library-card {
  background: #FFFFFF;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.library-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.library-card-header {
  padding: 14px 16px;
  background: linear-gradient(135deg, #001A72 0%, #00A8E8 100%);
  color: #FFFFFF;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.library-card-body {
  padding: 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.library-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 6px;
  line-height: 1.35;
}

.library-card-meta {
  font-size: 0.82rem;
  color: #64748B;
  margin-bottom: 10px;
}

.library-badge-drm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #EFF6FF;
  color: #1D4ED8;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 600;
  margin-bottom: 14px;
  border: 1px solid #BFDBFE;
}

.library-card-actions {
  margin-top: auto;
  display: flex;
  gap: 8px;
}

.va-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 8px;
}

.va-item-bank {
  font-weight: 700;
  font-size: 0.88rem;
  color: #001A72;
}

.va-item-number {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.92rem;
  color: #0F172A;
}

.btn-copy-va {
  padding: 4px 10px;
  font-size: 0.75rem;
  border-radius: 4px;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  cursor: pointer;
  color: #334155;
  transition: all 0.2s;
  font-weight: 600;
}

.btn-copy-va:hover {
  background: #00A8E8;
  color: #FFFFFF;
  border-color: #00A8E8;
}

.ewallet-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.ewallet-card {
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  background: #F8FAFC;
  cursor: pointer;
  transition: all 0.2s;
}

.ewallet-card:hover, .ewallet-card.active {
  border-color: #00A8E8;
  background: #F0F9FF;
}

/* ---------------------------------------------------------
   14. Formal Document Generator (Invoice, Faktur Pajak, SPK)
   --------------------------------------------------------- */
.doc-tabs-container {
  display: flex;
  gap: 8px;
  background: #F1F5F9;
  padding: 6px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.doc-tab-btn {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background: transparent;
  font-weight: 700;
  font-size: 0.82rem;
  color: #475569;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.doc-tab-btn.active {
  background: #001A72;
  color: #FFFFFF;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.doc-paper {
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  border-radius: 6px;
  padding: 28px;
  font-family: Arial, Helvetica, sans-serif;
  color: #1E293B;
  line-height: 1.5;
  font-size: 0.86rem;
  position: relative;
}

.doc-header-kop {
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 3px double #001A72;
  padding-bottom: 14px;
  margin-bottom: 18px;
}

.doc-kop-logo {
  width: 52px;
  height: 52px;
  background: #001A72;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  border-radius: 8px;
  font-weight: 900;
}

.doc-kop-text h2 {
  font-size: 1.15rem;
  color: #001A72;
  margin: 0 0 2px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.doc-kop-text p {
  font-size: 0.75rem;
  color: #64748B;
  margin: 0;
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 0.82rem;
}

.doc-table th {
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  padding: 8px 10px;
  text-align: left;
  color: #0F172A;
  font-weight: 700;
}

.doc-table td {
  border: 1px solid #CBD5E1;
  padding: 8px 10px;
  color: #334155;
}

.doc-stamp-box {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 14px;
  font-size: 0.82rem;
}

.doc-stamp-seal {
  display: inline-block;
  border: 2px dashed #00A8E8;
  color: #001A72;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 0.75rem;
  text-transform: uppercase;
  margin-top: 6px;
  background: #F0F9FF;
}

/* ---------------------------------------------------------
   15. Editorial Workflow, Manuscript Tracker & Chat Styles
   --------------------------------------------------------- */
.timeline-workflow {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin: 24px 0 20px;
}

.timeline-workflow::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 40px;
  right: 40px;
  height: 4px;
  background: #E2E8F0;
  z-index: 1;
}

.timeline-step {
  position: relative;
  z-index: 2;
  text-align: center;
  flex: 1;
  padding: 0 4px;
}

.timeline-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 3px solid #CBD5E1;
  color: #64748B;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
  font-weight: 800;
  font-size: 0.95rem;
  transition: all 0.3s;
}

.timeline-step.completed .timeline-icon-box {
  background: #10B981;
  border-color: #10B981;
  color: #FFFFFF;
}

.timeline-step.active .timeline-icon-box {
  background: #001A72;
  border-color: #00A8E8;
  color: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(0, 168, 232, 0.25);
}

.timeline-step-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 2px;
}

.timeline-step-desc {
  font-size: 0.7rem;
  color: #64748B;
}

.editorial-chat-box {
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  height: 380px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.chat-header {
  background: linear-gradient(135deg, #001A72 0%, #00A8E8 100%);
  color: #FFFFFF;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-messages-body {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  background: #F8FAFC;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.82rem;
  line-height: 1.45;
}

.chat-bubble.author {
  align-self: flex-end;
  background: #001A72;
  color: #FFFFFF;
  border-bottom-right-radius: 2px;
}

.chat-bubble.editor {
  align-self: flex-start;
  background: #FFFFFF;
  color: #0F172A;
  border: 1px solid #CBD5E1;
  border-bottom-left-radius: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.chat-sender-name {
  font-size: 0.7rem;
  font-weight: 800;
  margin-bottom: 3px;
  color: #00A8E8;
}

.chat-bubble.author .chat-sender-name {
  color: #7DD3FC;
}

.chat-input-row {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  background: #FFFFFF;
  border-top: 1px solid var(--border-light);
}

/* ---------------------------------------------------------
   16. Digital Contract Signing & E-Meterai Styles
   --------------------------------------------------------- */
.contract-scroll-box {
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  padding: 20px;
  max-height: 280px;
  overflow-y: auto;
  font-size: 0.82rem;
  line-height: 1.6;
  color: #1E293B;
  margin-bottom: 16px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.03);
}

.signature-pad-box {
  background: #F8FAFC;
  border: 2px dashed #94A3B8;
  border-radius: 8px;
  padding: 14px;
  text-align: center;
  margin-bottom: 16px;
}

.signature-canvas {
  width: 100%;
  height: 110px;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  cursor: crosshair;
  touch-action: none;
}

.e-meterai-stamp {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #DB2777;
  background: #FFFFFF;
  padding: 8px 12px;
  border-radius: 8px;
  color: #9D174D;
  font-family: var(--font-sans);
  text-align: center;
  box-shadow: 0 2px 8px rgba(219, 39, 119, 0.12);
}

.e-meterai-badge {
  background: #BE185D;
  color: #FFFFFF;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}

@keyframes slideInUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes fadeInDown {
  from { transform: translateY(-10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 900px) {
  body {
    padding-top: 145px;
  }
  .hero-grid, .pwa-demo-grid, .calc-grid, .footer-grid {
    grid-template-columns: 1fr;
  }
  .header-nav-inner {
    flex-direction: column;
    height: auto;
    padding: 8px 0;
    gap: 8px;
  }
  .nav-menu-group {
    flex-wrap: wrap;
    justify-content: center;
  }
  .nav-item {
    height: 36px;
    padding: 0 8px;
    font-size: 0.78rem;
  }
  .nav-search-box {
    width: 100%;
    max-width: 320px;
  }
  .timeline-workflow {
    flex-direction: column;
    gap: 16px;
    margin: 10px 0;
  }
  .timeline-workflow::before {
    top: 0;
    bottom: 0;
    left: 20px;
    width: 4px;
    height: 100%;
  }
  .timeline-step {
    display: flex;
    text-align: left;
    gap: 12px;
    align-items: center;
  }
  .timeline-icon-box {
    margin: 0;
    min-width: 42px;
  }
}

/* ---------------------------------------------------------
   Author Private Dashboard & Gate Protection
   --------------------------------------------------------- */
.author-locked-gate-box {
  background: #FFFFFF;
  border: 2px dashed #94A3B8;
  border-radius: var(--radius-lg);
  padding: 56px 24px;
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
  box-shadow: 0 10px 25px rgba(0, 26, 114, 0.05);
}

.author-portal-header {
  background: #FFFFFF;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 18px 24px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.author-portal-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #001A72 0%, #00A8E8 100%);
  color: #FFFFFF;
  font-weight: 800;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 26, 114, 0.2);
}

.badge-author-verified {
  background: #ECFDF5;
  color: #065F46;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid #A7F3D0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ---------------------------------------------------------
   PWA E-Book Studio Reader (Flipbook, Two-Page, Themes, TOC)
   --------------------------------------------------------- */
.reader-studio-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 25, 47, 0.85);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 10px;
  cursor: pointer;
}

.reader-studio-overlay.active {
  display: flex;
}

.reader-studio-card {
  width: 98%;
  max-width: 1320px;
  height: 95vh;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
  cursor: default;
}

.reader-studio-overlay:fullscreen {
  padding: 0 !important;
  background: #000000 !important;
  border-radius: 0 !important;
}

.reader-studio-overlay:fullscreen .reader-studio-card {
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100vh !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Reader Themes */
.theme-light {
  background: #FFFFFF;
  color: #1E293B;
}
.theme-light .reader-top-bar,
.theme-light .reader-bottom-master-bar {
  background: #F8FAFC;
  border-color: #E2E8F0;
  color: #0F172A;
}
.theme-light .reader-side-pane {
  background: #F8FAFC;
  border-color: #E2E8F0;
  color: #0F172A;
}
.theme-light .book-page {
  background: #FFFFFF;
  color: #1E293B;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.theme-sepia {
  background: #F4ECD8;
  color: #433422;
}
.theme-sepia .reader-top-bar,
.theme-sepia .reader-bottom-master-bar {
  background: #EAE0C8;
  border-color: #D8CCA8;
  color: #382A1B;
}
.theme-sepia .reader-side-pane {
  background: #EFE6D0;
  border-color: #D8CCA8;
  color: #382A1B;
}
.theme-sepia .book-page {
  background: #FAF4E6;
  color: #433422;
  box-shadow: 0 4px 20px rgba(80, 50, 20, 0.07);
}

.theme-dark {
  background: #0F172A;
  color: #E2E8F0;
}
.theme-dark .reader-top-bar,
.theme-dark .reader-bottom-master-bar {
  background: #1E293B;
  border-color: #334155;
  color: #F8FAFC;
}
.theme-dark .reader-side-pane {
  background: #172338;
  border-color: #334155;
  color: #E2E8F0;
}
.theme-dark .book-page {
  background: #1E293B;
  color: #E2E8F0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* Minimalist Top Header Bar */
.reader-top-bar {
  padding: 8px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(100, 116, 139, 0.2);
  z-index: 10;
  gap: 12px;
}

.reader-tool-btn {
  background: transparent;
  border: 1px solid rgba(100, 116, 139, 0.3);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: inherit;
  transition: all 0.15s;
}
.reader-tool-btn:hover, .reader-tool-btn.active {
  background: rgba(0, 168, 232, 0.15);
  border-color: #00A8E8;
  color: #00A8E8;
}
select.reader-tool-btn,
select.btn-reader-action,
#reader-tts-rate,
#reader-tts-persona {
  color-scheme: dark;
}
select.reader-tool-btn option,
select.btn-reader-action option,
#reader-tts-rate option,
#reader-tts-persona option {
  background-color: #0F172A;
  color: #FFFFFF;
}

/* Reader Workspace Layout */
.reader-workspace {
  flex: 1;
  display: flex;
  position: relative;
  overflow: hidden;
}

/* Dedicated Left & Right Side Panes */
.reader-side-pane {
  width: 280px;
  padding: 16px;
  overflow-y: auto;
  position: relative;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  z-index: 15;
  flex-shrink: 0;
}

.reader-side-pane.pane-left {
  border-right: 1px solid rgba(100, 116, 139, 0.2);
}

.reader-side-pane.pane-right {
  width: 300px;
  border-left: 1px solid rgba(100, 116, 139, 0.2);
}

.reader-side-pane.collapsed {
  width: 0 !important;
  padding: 0 !important;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  border: none !important;
}

.pane-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(100, 116, 139, 0.2);
}

.pane-title {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-count {
  background: #0284C7;
  color: #FFF;
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 800;
}

.toc-item {
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 0.82rem;
  cursor: pointer;
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
  transition: background 0.15s;
}
.toc-item:hover, .toc-item.active {
  background: rgba(0, 168, 232, 0.2);
  font-weight: 700;
  color: #00A8E8;
}

/* Bookmark Item Cards in Right Pane */
.bookmark-item-card {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(100, 116, 139, 0.2);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
  transition: all 0.15s ease;
}

.theme-dark .bookmark-item-card {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.bookmark-item-card:hover {
  border-color: #00A8E8;
  background: rgba(0, 168, 232, 0.06);
}

.bookmark-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.bookmark-item-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: #0284C7;
}

.bookmark-item-snippet {
  font-size: 0.74rem;
  color: inherit;
  opacity: 0.8;
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bookmark-item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.68rem;
  opacity: 0.65;
}

.bookmark-btn-jump {
  background: #0284C7;
  color: #FFF;
  border: none;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
}

.bookmark-btn-del {
  background: transparent;
  color: #DC2626;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  font-size: 0.75rem;
}

/* Book Stage Container (Center Stage) */
.reader-stage {
  flex: 1;
  padding: 20px 24px;
  overflow-y: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.book-spread {
  display: flex;
  gap: 24px;
  width: 100%;
  max-width: 1000px;
  min-height: 520px;
  position: relative;
  transition: all 0.25s ease;
}

.book-page {
  flex: 1;
  border-radius: 8px;
  padding: 32px 36px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  line-height: 1.85;
  font-size: 0.95rem;
  user-select: text;
  border: 1px solid rgba(0,0,0,0.05);
  transition: all 0.2s ease;
}

.book-page-header {
  font-size: 0.72rem;
  opacity: 0.6;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px dashed rgba(100, 116, 139, 0.3);
  padding-bottom: 6px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
}

.book-page-body {
  flex: 1;
}

.book-page-footer {
  font-size: 0.75rem;
  opacity: 0.7;
  text-align: center;
  border-top: 1px dashed rgba(100, 116, 139, 0.3);
  padding-top: 6px;
  margin-top: 16px;
  font-weight: 700;
}

/* Book Gutter Shadow (Tengah Buku - Hanya Muncul Saat 2 Halaman) */
.book-spread::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 20px;
  transform: translateX(-50%);
  background: linear-gradient(to right, rgba(0,0,0,0.04), rgba(0,0,0,0.12), rgba(0,0,0,0.04));
  pointer-events: none;
}

/* Single Page Centered Mode: Tengah, Rapi & Tanpa Lipatan Buku */
.book-spread.mode-single {
  max-width: 700px !important;
  justify-content: center !important;
  gap: 0 !important;
}

.book-spread.mode-single::after {
  display: none !important;
  content: none !important;
}

.book-spread.mode-single .book-page {
  border-radius: 12px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
  width: 100% !important;
  max-width: 680px !important;
  margin: 0 auto !important;
}

/* Floating Frosted Glass Watermark */
.reader-dynamic-watermark {
  position: absolute;
  bottom: 12px;
  top: auto;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  z-index: 25;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 90%;
}

.book-page-footer {
  font-size: 0.74rem;
  opacity: 0.85;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px dashed rgba(100, 116, 139, 0.3);
  padding-top: 8px;
  margin-top: 16px;
  font-weight: 600;
  color: #475569;
}

.page-footer-drm-tag {
  font-size: 0.68rem;
  color: #0284C7;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.book-page-gutter-left {
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  font-size: 0.60rem;
  color: #94A3B8;
  letter-spacing: 1px;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  opacity: 0.6;
}

.book-page-gutter-right {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
  font-size: 0.60rem;
  color: #94A3B8;
  letter-spacing: 1px;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  opacity: 0.6;
}

.reader-dynamic-watermark .watermark-glass-pill {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.75) 0%, rgba(241, 245, 249, 0.85) 100%);
  border: 1px solid rgba(203, 213, 225, 0.8);
  border-top: 1.5px solid #FFFFFF;
  color: #0F172A;
  text-shadow: none;
  box-shadow: 
    inset 0 1px 2px rgba(255, 255, 255, 0.9),
    0 8px 24px rgba(0, 0, 0, 0.12);
}

.reader-dynamic-watermark .watermark-glass-name {
  color: #0F172A;
  background: none;
  -webkit-text-fill-color: initial;
  filter: none;
}

.reader-dynamic-watermark .watermark-glass-email {
  color: #475569;
}

/* Unified Bottom Master Control Bar */
.reader-bottom-master-bar {
  padding: 10px 18px;
  border-top: 1px solid rgba(100, 116, 139, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  z-index: 10;
}

.reader-control-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.reader-progress-slider {
  flex: 1;
  min-width: 140px;
  max-width: 240px;
  height: 6px;
  accent-color: #00A8E8;
  cursor: pointer;
}

/* Side Edge Navigation Rails (Left TOC + Prev & Right Bookmark + Next) */
.reader-edge-rail {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 20;
  pointer-events: auto;
}

.reader-edge-rail.left-edge {
  left: 0;
}

.reader-edge-rail.right-edge {
  right: 0;
}

.reader-edge-tab {
  background: linear-gradient(135deg, #001A72 0%, #00A8E8 100%);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 10px 7px;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  box-shadow: 0 4px 14px rgba(0, 26, 114, 0.3);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  user-select: none;
  letter-spacing: 0.5px;
}

.reader-edge-rail.left-edge .reader-edge-tab {
  border-radius: 0 10px 10px 0;
  border-left: none;
}

.reader-edge-rail.right-edge .reader-edge-tab {
  border-radius: 10px 0 0 10px;
  border-right: none;
  background: linear-gradient(135deg, #D97706 0%, #F59E0B 100%);
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.3);
}

.reader-edge-tab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(0, 168, 232, 0.5);
}

.reader-edge-rail.right-edge .reader-edge-tab:hover {
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

/* Specific styling for Nav Prev/Next Edge Buttons */
.reader-edge-tab.nav-edge-btn {
  background: linear-gradient(135deg, #0F172A 0%, #334155 100%);
  color: #F8FAFC;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  padding: 12px 7px;
}

.reader-edge-rail.right-edge .reader-edge-tab.nav-edge-btn {
  background: linear-gradient(135deg, #0F172A 0%, #334155 100%);
  color: #F8FAFC;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.reader-edge-tab.nav-edge-btn:hover {
  background: #0284C7;
  color: #FFFFFF;
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.45);
}

/* Themes adaptation */
.theme-sepia .reader-edge-rail.left-edge .reader-edge-tab:not(.nav-edge-btn) {
  background: linear-gradient(135deg, #4E342E 0%, #795548 100%);
  color: #FAF4E6;
}

.theme-sepia .reader-edge-rail.right-edge .reader-edge-tab:not(.nav-edge-btn) {
  background: linear-gradient(135deg, #B45309 0%, #D97706 100%);
  color: #FAF4E6;
}

.theme-sepia .reader-edge-tab.nav-edge-btn {
  background: linear-gradient(135deg, #5D4037 0%, #3E2723 100%);
  color: #FAF4E6;
}

.theme-sepia .reader-edge-tab.nav-edge-btn:hover {
  background: #8D6E63;
}

.theme-dark .reader-edge-rail.left-edge .reader-edge-tab:not(.nav-edge-btn) {
  background: linear-gradient(135deg, #0F172A 0%, #0284C7 100%);
  color: #F8FAFC;
}

.theme-dark .reader-edge-rail.right-edge .reader-edge-tab:not(.nav-edge-btn) {
  background: linear-gradient(135deg, #78350F 0%, #D97706 100%);
  color: #F8FAFC;
}

.theme-dark .reader-edge-tab.nav-edge-btn {
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
  color: #38BDF8;
  border-color: #334155;
}

.theme-dark .reader-edge-tab.nav-edge-btn:hover {
  background: #0284C7;
  color: #FFFFFF;
}

@media (max-width: 992px) {
  .reader-side-pane {
    position: absolute;
    top: 0;
    bottom: 0;
    background: inherit;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  }
  .reader-side-pane.pane-left {
    left: 0;
  }
  .reader-side-pane.pane-right {
    right: 0;
  }
  .reader-side-pane.collapsed.pane-left {
    left: -320px;
    width: 280px !important;
  }
  .reader-side-pane.collapsed.pane-right {
    right: -320px;
    width: 300px !important;
  }
}

@media (max-width: 820px) {
  .book-spread {
    flex-direction: column;
    gap: 16px;
  }
  .book-spread::after {
    display: none !important;
  }
  .book-page {
    padding: 20px;
  }
}

/* ---------------------------------------------------------
   17. PWA Video Course Studio Player (LMS, Modules, DRM, Resources)
   --------------------------------------------------------- */
.video-course-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 9, 20, 0.98);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.video-course-overlay.active {
  display: flex;
}

.video-course-card {
  width: 98vw;
  max-width: 1560px;
  height: 94vh;
  max-height: 94vh;
  border-radius: 12px;
  background: #0B132B;
  color: #F8FAFC;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.85);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
}

.video-top-bar {
  padding: 10px 20px;
  background: #111D4A;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  z-index: 10;
  flex-shrink: 0;
}

.video-workspace {
  flex: 1;
  display: flex;
  flex-direction: row;
  overflow: hidden;
  position: relative;
  min-height: 0;
  height: calc(100% - 56px);
}

/* LEFT STAGE: 100% Video Player (Sisi Kiri Full Video Player) */
.video-main-stage {
  flex: 1 1 65%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #000000;
  position: relative;
  overflow: hidden;
  height: 100%;
}

.video-player-container {
  width: 100%;
  height: 100%;
  max-width: 100%;
  background: #000000;
  border-radius: 0;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  border: none;
  user-select: none;
  -webkit-user-select: none;
  flex: 1;
}

.video-screen {
  flex: 1;
  width: 100%;
  min-height: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000000;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  isolation: isolate;
}

#video-r2-element {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
  display: block;
  position: absolute;
  inset: 0;
}

/* Hide native download and picture-in-picture buttons across Chromium/WebKit/Firefox */
#video-r2-element::-internal-media-controls-download-button,
#video-r2-element::-webkit-media-controls-download-button {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

#video-r2-element::-webkit-media-controls-overflow-button,
#video-r2-element::-webkit-media-controls-enclosure {
  overflow: hidden !important;
}

/* =========================================================
   PURE ETCHED GLASS WATERMARK (BENAR-BENAR TRANSPARAN SEPERTI KACA)
   ========================================================= */
@keyframes glassWatermarkOrbit {
  0% {
    top: 10%;
    left: 8%;
    transform: translate3d(0, 0, 0);
  }
  25% {
    top: 14%;
    left: 50%;
    transform: translate3d(-35%, 0, 0);
  }
  50% {
    top: 72%;
    left: 55%;
    transform: translate3d(-40%, 0, 0);
  }
  75% {
    top: 68%;
    left: 8%;
    transform: translate3d(0, 0, 0);
  }
  100% {
    top: 10%;
    left: 8%;
    transform: translate3d(0, 0, 0);
  }
}

.video-dynamic-watermark {
  position: absolute;
  top: 10%;
  left: 8%;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  z-index: 35;
  animation: glassWatermarkOrbit 32s infinite cubic-bezier(0.42, 0, 0.58, 1);
  will-change: transform, top, left;
  max-width: 90%;
  display: inline-flex;
  align-items: center;
}

/* Pure Etched Glass Pill Badge (Pilihan 3: 2-Row Compact Capsule) */
.watermark-glass-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.45);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  backdrop-filter: blur(8px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-top: 1.2px solid rgba(255, 255, 255, 0.45);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 2px 0 rgba(0, 0, 0, 0.4),
    0 6px 20px 0 rgba(0, 0, 0, 0.55);
  white-space: nowrap;
  font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 
    -1px -1px 0 rgba(255, 255, 255, 0.45),
    1px 1px 1px rgba(0, 0, 0, 0.95),
    0 0 6px rgba(56, 189, 248, 0.25);
  transition: all 0.3s ease;
}

.watermark-glass-pill.watermark-2row {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 8px 16px;
  border-radius: 12px;
}

.wm-row {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  line-height: 1.25;
}

.wm-row-top {
  font-size: 0.68rem;
  opacity: 0.95;
}

.wm-row-bottom {
  font-size: 0.78rem;
  padding-left: 2px;
}

.wm-sub-label {
  font-size: 0.70rem;
  font-weight: 600;
  color: rgba(203, 213, 225, 0.9);
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.8);
}

.watermark-glass-shield {
  font-size: 0.88rem;
  opacity: 0.9;
  filter: drop-shadow(0 0 4px #38BDF8);
  display: inline-flex;
  align-items: center;
}

.watermark-glass-label {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: rgba(224, 242, 254, 0.95);
  text-transform: uppercase;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.8);
}

.watermark-glass-name {
  font-weight: 800;
  font-size: 0.80rem;
  color: #FFFFFF;
  letter-spacing: 0.03em;
  text-shadow: 
    -1px -1px 0 rgba(255, 255, 255, 0.55),
    1px 1px 2px rgba(0, 0, 0, 0.95);
}

.watermark-glass-phone {
  font-size: 0.74rem;
  font-weight: 700;
  color: #38BDF8;
  letter-spacing: 0.02em;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.8);
}

.watermark-glass-divider {
  color: rgba(255, 255, 255, 0.3);
  font-weight: 700;
}

.watermark-glass-order {
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(252, 211, 77, 0.9);
  font-family: var(--font-mono, monospace);
  text-shadow: 
    -1px -1px 0 rgba(255, 255, 255, 0.3),
    1px 1px 1px rgba(0, 0, 0, 0.9);
}

.watermark-glass-badge {
  font-size: 0.60rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 1px 6px;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(52, 211, 153, 0.45);
  color: rgba(167, 243, 208, 0.95);
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.8);
}

.video-canvas-anim {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  position: relative;
}

.video-play-center-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00A8E8 0%, #001A72 100%);
  color: #FFFFFF;
  border: 2px solid rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  cursor: pointer;
  box-shadow: 0 0 30px rgba(0, 168, 232, 0.6);
  transition: all 0.25s ease;
  margin-bottom: 12px;
}

.video-play-center-btn:hover {
  transform: scale(1.12);
  box-shadow: 0 0 45px rgba(0, 168, 232, 0.9);
}

.video-controls-bar {
  background: #0B132B;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  flex-wrap: wrap;
  contain: layout style;
  transform: translateZ(0);
  flex-shrink: 0;
  z-index: 20;
}

.video-scrubber {
  flex: 1;
  height: 6px;
  accent-color: #00A8E8;
  cursor: pointer;
  min-width: 120px;
}

.video-ctrl-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #F8FAFC;
  padding: 5px 11px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
  white-space: nowrap;
}

.video-ctrl-btn:hover {
  background: #00A8E8;
  border-color: #00A8E8;
  color: #FFFFFF;
}

/* RIGHT SIDEBAR: Unified 5-Tab Studio Sidebar */
.video-sidebar {
  width: 440px;
  max-width: 440px;
  background: #0E1630;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  height: 100%;
  overflow: hidden;
}

.video-tab-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 12px;
  background: #111D4A;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

.video-tab-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94A3B8;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1 1 calc(33.333% - 6px);
  min-width: 85px;
}

.video-tab-btn:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

.video-tab-btn.active {
  background: #00A8E8;
  border-color: #00A8E8;
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(0, 168, 232, 0.4);
}

.video-tab-content-area {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 16px;
}

.video-tab-content-area::-webkit-scrollbar {
  width: 6px;
}

.video-tab-content-area::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 4px;
}

.video-tab-content-area::-webkit-scrollbar-thumb {
  background: #00A8E8;
  border-radius: 4px;
}

.video-tab-pane {
  animation: fadeInPane 0.2s ease-in;
}

@keyframes fadeInPane {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Syllabus & Progress Card inside Tab 1 */
.video-progress-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 12px;
}

.video-progress-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin: 6px 0;
}

.video-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #00A8E8, #10B981);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.video-syllabus-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.syllabus-module-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.syllabus-module-item:hover, .syllabus-module-item.active {
  background: rgba(0, 168, 232, 0.15);
  border-color: #00A8E8;
}

.syllabus-module-item.completed {
  border-color: rgba(16, 185, 129, 0.3);
}

.resource-item-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  gap: 8px;
}

.video-code-block {
  background: #080E21;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 0.80rem;
  color: #E2E8F0;
  line-height: 1.6;
  overflow-x: auto;
  position: relative;
  margin-top: 10px;
  white-space: pre;
}

.video-btn-copy-code {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #F8FAFC;
  padding: 4px 10px;
  font-size: 0.72rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.video-btn-copy-code:hover {
  background: #00A8E8;
  border-color: #00A8E8;
}

.video-note-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.video-note-timestamp {
  background: #00A8E8;
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

.video-note-timestamp:hover {
  background: #38BDF8;
}

/* Video Player Theater Mode Styles */
.video-workspace.theater-mode .video-sidebar {
  display: none !important;
}

@media (max-width: 768px) {
  .video-course-card {
    height: 98vh;
    max-height: 98vh;
    width: 98vw;
    border-radius: 8px;
  }
  .video-workspace {
    flex-direction: column;
    overflow-y: auto;
  }
  .video-main-stage {
    height: 38vh;
    min-height: 220px;
    flex: none;
  }
  .video-sidebar {
    width: 100%;
    max-width: 100%;
    flex: 1;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }
}

/* Fullscreen via Native Browser API (Standard, WebKit, and Pseudo-Fullscreen) */
.video-player-container:fullscreen {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  border-radius: 0 !important;
  aspect-ratio: auto !important;
  background: #000000 !important;
  z-index: 9999999 !important;
  margin: 0 !important;
  border: none !important;
  display: flex !important;
  flex-direction: column !important;
}

.video-player-container:fullscreen .video-screen {
  flex: 1 !important;
  width: 100vw !important;
  height: calc(100vh - 58px) !important;
  max-height: calc(100vh - 58px) !important;
  position: relative !important;
  background: #000000 !important;
  border-radius: 0 !important;
}

.video-player-container:fullscreen .video-screen video,
.video-player-container:fullscreen #video-r2-element {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  position: absolute !important;
  inset: 0 !important;
  background: #000000 !important;
}

.video-player-container:fullscreen .video-screen canvas {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

.video-player-container:fullscreen .video-controls-bar {
  padding: 12px 24px !important;
  background: rgba(11, 19, 43, 0.98) !important;
  z-index: 9999999 !important;
  position: relative !important;
  flex-shrink: 0 !important;
  width: 100vw !important;
  border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
}

/* WebKit Fullscreen (Chrome, Edge, Safari) */
.video-player-container:-webkit-full-screen {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  border-radius: 0 !important;
  aspect-ratio: auto !important;
  background: #000000 !important;
  z-index: 9999999 !important;
  margin: 0 !important;
  border: none !important;
  display: flex !important;
  flex-direction: column !important;
}

.video-player-container:-webkit-full-screen .video-screen {
  flex: 1 !important;
  width: 100vw !important;
  height: calc(100vh - 58px) !important;
  max-height: calc(100vh - 58px) !important;
  position: relative !important;
  background: #000000 !important;
  border-radius: 0 !important;
}

.video-player-container:-webkit-full-screen .video-screen video,
.video-player-container:-webkit-full-screen #video-r2-element {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  position: absolute !important;
  inset: 0 !important;
  background: #000000 !important;
}

.video-player-container:-webkit-full-screen .video-screen canvas {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

.video-player-container:-webkit-full-screen .video-controls-bar {
  padding: 12px 24px !important;
  background: rgba(11, 19, 43, 0.98) !important;
  z-index: 9999999 !important;
  position: relative !important;
  flex-shrink: 0 !important;
  width: 100vw !important;
  border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
}

/* Fallback Pseudo-Fullscreen Class */
.video-player-container.video-pseudo-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  border-radius: 0 !important;
  aspect-ratio: auto !important;
  background: #000000 !important;
  z-index: 9999999 !important;
  margin: 0 !important;
  border: none !important;
  display: flex !important;
  flex-direction: column !important;
}

.video-player-container.video-pseudo-fullscreen .video-screen {
  flex: 1 !important;
  width: 100vw !important;
  height: calc(100vh - 58px) !important;
  max-height: calc(100vh - 58px) !important;
  position: relative !important;
  background: #000000 !important;
  border-radius: 0 !important;
}

.video-player-container.video-pseudo-fullscreen .video-screen video,
.video-player-container.video-pseudo-fullscreen #video-r2-element {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  position: absolute !important;
  inset: 0 !important;
  background: #000000 !important;
}

.video-player-container.video-pseudo-fullscreen .video-screen canvas {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

.video-player-container.video-pseudo-fullscreen .video-controls-bar {
  padding: 12px 24px !important;
  background: rgba(11, 19, 43, 0.98) !important;
  z-index: 9999999 !important;
  position: relative !important;
  flex-shrink: 0 !important;
  width: 100vw !important;
  border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
}

/* ---------------------------------------------------------
   19. Admin Server Integration Settings Modal (YouTube & GitHub)
   --------------------------------------------------------- */
.admin-settings-card {
  max-width: 780px;
  width: 95%;
  background: #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}

.admin-settings-header {
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  color: #FFFFFF;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #00A8E8;
}

.admin-settings-tabs {
  display: flex;
  background: #F1F5F9;
  border-bottom: 1px solid #CBD5E1;
  padding: 0 20px;
  gap: 6px;
}

.admin-settings-tab-btn {
  padding: 12px 18px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 0.85rem;
  font-weight: 700;
  color: #64748B;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.admin-settings-tab-btn:hover {
  color: #001A72;
}

.admin-settings-tab-btn.active {
  color: #001A72;
  border-bottom-color: #00A8E8;
  background: #FFFFFF;
}

.admin-settings-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.admin-vault-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.74rem;
  font-weight: 700;
}

.github-resource-card {
  background: #0D1117;
  border: 1px solid #30363D;
  border-radius: 8px;
  padding: 16px;
  margin-top: 12px;
  color: #C9D1D9;
}

.github-resource-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.github-token-badge {
  background: rgba(56, 189, 248, 0.15);
  color: #38BDF8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
}

/* ---------------------------------------------------------
   20. Admin Discount & Promo Voucher Management Styles
   --------------------------------------------------------- */
.voucher-item-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-left: 4px solid #E11D48;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.voucher-item-card.inactive {
  opacity: 0.6;
  border-left-color: #94A3B8;
  background: #F8FAFC;
}

.voucher-code-badge {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.88rem;
  color: #E11D48;
  background: #FFE4E6;
  border: 1px dashed #FDA4AF;
  padding: 3px 10px;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 4px;
}

.cart-voucher-container {
  margin: 14px 0 6px;
  padding: 14px;
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
}

.cart-voucher-heading {
  margin-bottom: 10px;
}

.checkout-vouchers-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 10px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 2px;
}

.checkout-voucher-card {
  background: #FFFFFF;
  border: 1.5px dashed #CBD5E1;
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.checkout-voucher-card:hover:not(.disabled) {
  border-color: #E11D48;
  background: #FFF1F2;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.12);
}

.checkout-voucher-card.applied {
  background: #ECFDF5;
  border: 2px solid #10B981;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.15);
}

.checkout-voucher-card.disabled {
  opacity: 0.6;
  background: #F1F5F9;
  border-style: dotted;
  cursor: not-allowed;
}

.voucher-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.voucher-code-tag {
  font-family: var(--font-mono, monospace);
  font-size: 0.88rem;
  font-weight: 800;
  color: #001A72;
  letter-spacing: 0.5px;
}

.voucher-value-badge {
  background: linear-gradient(135deg, #E11D48 0%, #BE123C 100%);
  color: #FFFFFF;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(225, 29, 72, 0.25);
}

.checkout-voucher-card.applied .voucher-value-badge {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
}

.voucher-card-desc {
  font-size: 0.78rem;
  color: #475569;
  margin-bottom: 6px;
  line-height: 1.4;
}

.voucher-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: #64748B;
  border-top: 1px dashed #E2E8F0;
  padding-top: 6px;
  margin-top: 4px;
}

.btn-voucher-action {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-voucher-select {
  background: #001A72;
  color: #FFFFFF;
}

.btn-voucher-select:hover:not(:disabled) {
  background: #E11D48;
}

.btn-voucher-select:disabled {
  background: #94A3B8;
  color: #F1F5F9;
  cursor: not-allowed;
}

.btn-voucher-remove {
  background: #FEE2E2;
  color: #DC2626;
  border: 1px solid #FECACA;
}

.btn-voucher-remove:hover {
  background: #DC2626;
  color: #FFFFFF;
}

.cart-voucher-input-group {
  display: flex;
  gap: 8px;
}

.cart-voucher-applied-badge {
  background: #ECFDF5;
  border: 1.5px solid #10B981;
  color: #065F46;
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 8px;
}

/* Compact voucher chips for checkout payment gateway modal */
.checkout-modal-voucher-strip {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 14px;
}

.checkout-modal-voucher-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.btn-checkout-voucher-chip {
  background: #FFFFFF;
  border: 1.5px dashed #CBD5E1;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #001A72;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-checkout-voucher-chip:hover:not(.disabled) {
  border-color: #E11D48;
  background: #FFF1F2;
  color: #E11D48;
}

.btn-checkout-voucher-chip.active {
  background: #ECFDF5;
  border: 1.5px solid #10B981;
  color: #065F46;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.2);
}

.btn-checkout-voucher-chip.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #F1F5F9;
}

/* ---------------------------------------------------------
   21. Dynamic Flash Sale & Promo Ribbon (Home & Catalog)
   --------------------------------------------------------- */
.flash-sale-ribbon {
  background: linear-gradient(90deg, #881337 0%, #BE123C 50%, #E11D48 100%);
  color: #FFFFFF;
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 99;
  box-shadow: 0 2px 10px rgba(190, 18, 60, 0.3);
  animation: fadeInDown 0.4s ease;
  flex-wrap: wrap;
  text-align: center;
}

.flash-sale-tag {
  background: #FFE4E6;
  color: #9F1239;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.flash-sale-code-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px dashed #FFFFFF;
  color: #FFFFFF;
  padding: 3px 10px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.80rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.flash-sale-code-btn:hover {
  background: #FFFFFF;
  color: #BE123C;
  transform: scale(1.05);
}

.flash-sale-close {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #FECDD3;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.flash-sale-close:hover {
  color: #FFFFFF;
}

/* ---------------------------------------------------------
   22. Cloud Ingestion Mode Switcher (Studio 1-Klik)
   --------------------------------------------------------- */
.ingest-mode-box {
  border: 1.5px solid #CBD5E1;
  border-radius: 8px;
  padding: 12px 14px;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #F8FAFC;
  transition: all 0.2s;
}

.ingest-mode-box.active, .ingest-mode-box:hover {
  border-color: #059669;
  background: #ECFDF5;
}

.cloud-vault-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  margin-top: 4px;
}

/* ---------------------------------------------------------
   23. Executive Admin Navigation Bar & Dedicated V-Bar
   --------------------------------------------------------- */
.admin-nav-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #D97706 0%, #B45309 100%);
  color: #FFFFFF;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 6px;
  margin-right: 8px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.35);
  border: 1px solid #F59E0B;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: #10B981;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: adminPulse 1.8s infinite;
}

@keyframes adminPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Floating Docked Admin V-Bar (Vertical Control Bar) */
.admin-floating-vbar {
  position: fixed;
  left: 12px;
  top: 105px;
  z-index: 1040;
  background: #0B132B;
  border: 1px solid #1E293B;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  width: 220px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: var(--font-sans);
}

.admin-floating-vbar.minimized {
  width: 48px;
}

.admin-floating-vbar.minimized .vbar-title,
.admin-floating-vbar.minimized .vbar-item-text,
.admin-floating-vbar.minimized .vbar-badge {
  display: none !important;
}

.admin-floating-vbar.minimized .vbar-header {
  padding: 8px 6px;
  justify-content: center;
}

.admin-floating-vbar.minimized .vbar-item-btn {
  padding: 10px 0;
  justify-content: center;
}

.vbar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
}

.vbar-title {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #FCD34D;
  text-transform: uppercase;
}

.vbar-toggle-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #CBD5E1;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  transition: all 0.2s;
}

.vbar-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
}

.vbar-body {
  display: flex;
  flex-direction: column;
  padding: 6px;
  gap: 3px;
  max-height: calc(100vh - 160px);
  overflow-y: auto;
}

.vbar-item-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #E2E8F0;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.18s ease;
  position: relative;
  width: 100%;
}

.vbar-item-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateX(2px);
}

.vbar-item-btn.active {
  background: linear-gradient(135deg, #0284C7 0%, #0369A1 100%);
  color: #FFFFFF;
  border-color: #38BDF8;
}

.vbar-item-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  width: 22px;
  text-align: center;
}

.vbar-item-text {
  flex-grow: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vbar-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 999px;
  background: #EF4444;
  color: #FFFFFF;
  flex-shrink: 0;
}

/* ---------------------------------------------------------
   24. Admin Modal UI Framework & KPI Cards
   --------------------------------------------------------- */
.admin-card-wide {
  max-width: 960px !important;
  width: 95% !important;
}

.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.admin-kpi-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.admin-kpi-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: #64748B;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.admin-kpi-value {
  font-size: 1.28rem;
  font-weight: 800;
  color: #0F172A;
  font-family: var(--font-heading);
}

.admin-kpi-desc {
  font-size: 0.70rem;
  color: #94A3B8;
  margin-top: 2px;
}

.admin-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.admin-filter-btn {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s;
}

.admin-filter-btn.active, .admin-filter-btn:hover {
  background: #001A72;
  color: #FFFFFF;
  border-color: #001A72;
}

.admin-table-container {
  overflow-x: auto;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  background: #FFFFFF;
  margin-bottom: 20px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  text-align: left;
}

.admin-table th {
  background: #F8FAFC;
  padding: 10px 14px;
  font-weight: 700;
  color: #334155;
  border-bottom: 1px solid #E2E8F0;
  white-space: nowrap;
}

.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #F1F5F9;
  color: #334155;
  vertical-align: middle;
}

.admin-table tr:hover td {
  background: #F8FAFC;
}

.status-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.status-badge-pending {
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FDE68A;
}

.status-badge-verified {
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
}

.status-badge-review {
  background: #EFF6FF;
  color: #1E40AF;
  border: 1px solid #BFDBFE;
}

/* Dynamic Barcode Preview Box */
.barcode-preview-box {
  background: #FFFFFF;
  border: 2px dashed #CBD5E1;
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.barcode-svg-canvas {
  max-width: 260px;
  margin: 10px 0;
}

/* ---------------------------------------------------------
   25. Executive Admin Split-Workspace (Left V-Bar + Main Canvas)
   --------------------------------------------------------- */
#admin-workspace-layout {
  display: flex;
  min-height: calc(100vh - 80px);
  background: #F1F5F9;
  font-family: var(--font-sans);
}

/* Left Sidebar Pane (V-Bar) */
.admin-sidebar-pane {
  width: 310px;
  min-width: 310px;
  background: #0B132B;
  color: #F8FAFC;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #1E293B;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
  position: sticky;
  top: 80px;
  height: calc(100vh - 80px);
  overflow-y: auto;
  z-index: 990;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-sidebar-header {
  padding: 16px 14px;
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-profile-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  background: rgba(255, 255, 255, 0.06);
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-nav-list {
  display: flex;
  flex-direction: column;
  padding: 10px 8px;
  gap: 3px;
  flex-grow: 1;
}

.admin-sidebar-category {
  padding: 12px 10px 4px 10px;
  font-size: 0.68rem;
  font-weight: 800;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-nav-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  color: #CBD5E1;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  position: relative;
  text-align: left;
}

.admin-nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateX(3px);
}

.admin-nav-item.active {
  background: linear-gradient(135deg, #0284C7 0%, #0369A1 100%);
  color: #FFFFFF;
  border-color: #38BDF8;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

.admin-nav-item .nav-icon {
  font-size: 1.2rem;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.admin-nav-item .admin-nav-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
}

.admin-nav-item .admin-nav-title {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.3;
  color: #F1F5F9;
}

.admin-nav-item .admin-nav-sub {
  font-size: 0.70rem;
  color: #94A3B8;
  line-height: 1.25;
  white-space: normal;
}

.admin-nav-item.active .admin-nav-title {
  color: #FFFFFF;
  font-weight: 800;
}

.admin-nav-item.active .admin-nav-sub {
  color: #E0F2FE;
}

.admin-nav-item .nav-badge {
  margin-left: auto;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  background: #EF4444;
  color: #FFFFFF;
  align-self: center;
}

.admin-nav-item.active .nav-badge {
  background: #FFFFFF;
  color: #0284C7;
}

/* Middle Window Canvas Area */
.admin-main-canvas {
  flex-grow: 1;
  background: #F8FAFC;
  padding: 24px 30px;
  overflow-y: auto;
  min-height: calc(100vh - 80px);
}

.admin-canvas-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #E2E8F0;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-canvas-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0F172A;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-canvas-subtitle {
  font-size: 0.78rem;
  color: #64748B;
  margin-top: 4px;
}

/* ---------------------------------------------------------
   26. Pipeline Progress Steps & Table
   --------------------------------------------------------- */
.pipeline-step-container {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
}

.pipeline-step-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #CBD5E1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  font-weight: 800;
  color: #FFFFFF;
  transition: all 0.2s;
}

.pipeline-step-dot.done {
  background: #10B981;
}

.pipeline-step-dot.current {
  background: #0284C7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.25);
}

.pipeline-step-line {
  height: 2px;
  width: 12px;
  background: #CBD5E1;
}

.pipeline-step-line.done {
  background: #10B981;
}

/* Trial Testing Studio (Pre-Publish Inspection Room) */
.trial-studio-container {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  margin-top: 10px;
}

.trial-studio-header {
  padding: 16px 20px;
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  color: #FFFFFF;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.trial-studio-body {
  display: grid;
  grid-template-columns: 1.35fr 0.95fr;
  gap: 20px;
  padding: 24px;
}

.trial-preview-panel {
  background: #0F172A;
  border-radius: 10px;
  padding: 16px;
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
}

.trial-qa-panel {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.qa-checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #E2E8F0;
  font-size: 0.80rem;
  color: #334155;
}

.qa-checklist-item:last-child {
  border-bottom: none;
}

@media (max-width: 992px) {
  #admin-workspace-layout {
    flex-direction: column;
  }
  .admin-sidebar-pane {
    width: 100%;
    min-width: 100%;
    height: auto;
    position: static;
  }
  .trial-studio-body {
    grid-template-columns: 1fr;
  }
}

/* ---------------------------------------------------------
   27. Reviewer Workload & SLA Overdue Alert Badges
   --------------------------------------------------------- */
.badge-workload-light {
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
  font-weight: 700;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-workload-optimal {
  background: #EFF6FF;
  color: #1E40AF;
  border: 1px solid #BFDBFE;
  font-weight: 700;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-workload-heavy {
  background: #FEF2F2;
  color: #991B1B;
  border: 1px solid #FECACA;
  font-weight: 700;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.sla-badge-ontime {
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
  font-weight: 700;
  font-size: 0.70rem;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.sla-badge-overdue {
  background: #FEF2F2;
  color: #DC2626;
  border: 1px solid #FCA5A5;
  font-weight: 800;
  font-size: 0.70rem;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
  0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(220, 38, 38, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

.sla-row-overdue {
  background-color: rgba(254, 242, 242, 0.55) !important;
  border-left: 4px solid #DC2626 !important;
}

/* ---------------------------------------------------------
   28. Client Portal Full-Workspace Split-Layout (Far-Left Pane + Canvas)
   --------------------------------------------------------- */
.client-portal-layout {
  display: flex;
  width: 100%;
  min-height: calc(100vh - 80px);
  background: #F1F5F9;
  border-top: 1px solid #E2E8F0;
  border-bottom: 1px solid #E2E8F0;
}

.client-vbar-sidebar {
  width: 310px;
  min-width: 310px;
  background: #0B132B;
  color: #F8FAFC;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #1E293B;
  border-left: none;
  border-top: none;
  border-bottom: none;
  border-radius: 0;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
  position: sticky;
  top: 80px;
  height: calc(100vh - 80px);
  overflow-y: auto;
  z-index: 990;
  padding: 16px 12px;
  gap: 14px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.client-main-content {
  flex: 1;
  min-width: 0;
  background: #F8FAFC;
  padding: 28px 36px;
  overflow-y: auto;
  min-height: calc(100vh - 80px);
}

.client-vbar-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.client-vbar-group-title {
  font-size: 0.68rem;
  font-weight: 800;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  padding: 6px 10px 2px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.client-vbar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #CBD5E1;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.client-vbar-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateX(3px);
}

.client-vbar-link.active {
  background: linear-gradient(135deg, #0284C7 0%, #0369A1 100%) !important;
  color: #FFFFFF !important;
  font-weight: 700 !important;
  border-color: #38BDF8 !important;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

@media (max-width: 992px) {
  .client-portal-layout {
    flex-direction: column;
  }
  .client-vbar-sidebar {
    width: 100%;
    min-width: 100%;
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid #1E293B;
  }
  .client-main-content {
    padding: 20px 16px;
  }
}

/* ---------------------------------------------------------
   29. Publishing Fee Discount & Duration Badges
   --------------------------------------------------------- */
.pub-discount-card {
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 14px;
  transition: all 0.2s ease;
}

.pub-discount-card:hover {
  border-color: #0284C7;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.08);
}

.pub-discount-live-preview {
  background: #F8FAFC;
  border: 1px dashed #CBD5E1;
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 10px;
}

.price-strikethrough {
  text-decoration: line-through;
  color: #94A3B8;
  font-weight: 700;
}

.price-discounted-main {
  color: #E11D48;
  font-weight: 900;
}

.package-saving-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FFF1F2;
  border: 1px solid #FECDD3;
  color: #BE123C;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 12px;
}

/* ---------------------------------------------------------
   30. E-Meterai Official Service & Visual Stamping Canvas
   --------------------------------------------------------- */
.emtr-hero-banner {
  background: linear-gradient(135deg, #001A72 0%, #0F2B92 50%, #BE185D 100%);
  color: #FFFFFF;
  padding: 40px 20px;
  border-radius: 16px;
  margin: 24px 0 32px 0;
  box-shadow: 0 10px 30px rgba(0, 26, 114, 0.25);
  position: relative;
  overflow: hidden;
}
.emtr-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #FDF2F8;
  margin-bottom: 12px;
  backdrop-filter: blur(4px);
}
.emtr-step-card {
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  margin-bottom: 24px;
  transition: all 0.25s ease;
}
.emtr-step-card.active {
  border-color: #001A72;
  box-shadow: 0 8px 24px rgba(0, 26, 114, 0.08);
}
.emtr-step-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid #F1F5F9;
}
.emtr-step-num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #001A72;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  flex-shrink: 0;
}
.emtr-dropzone {
  border: 2px dashed #94A3B8;
  background: #F8FAFC;
  border-radius: 12px;
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.emtr-dropzone:hover, .emtr-dropzone.dragover {
  border-color: #BE185D;
  background: #FDF2F8;
}
.emtr-pdf-canvas-wrapper {
  position: relative;
  background: #475569;
  padding: 20px;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  overflow: hidden;
  min-height: 480px;
}
.emtr-pdf-mock-page {
  background: #FFFFFF;
  width: 100%;
  max-width: 440px;
  min-height: 580px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.35);
  border-radius: 4px;
  position: relative;
  padding: 30px 24px;
  box-sizing: border-box;
  user-select: none;
}
.emtr-stamp-draggable {
  position: absolute;
  width: 90px;
  height: 90px;
  border: 2px dashed #BE185D;
  background: rgba(253, 242, 248, 0.85);
  border-radius: 6px;
  cursor: move;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px;
  box-sizing: border-box;
  box-shadow: 0 4px 12px rgba(190, 24, 93, 0.2);
  transition: box-shadow 0.15s ease;
  touch-action: none;
}
.emtr-stamp-draggable:hover {
  box-shadow: 0 6px 18px rgba(190, 24, 93, 0.4);
}
.emtr-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 32px 0;
}
.emtr-feature-item {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 18px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}


/* =========================================================
   BOOK CARD TOGGLE BUTTON (COVER / SINOPSIS)
   ========================================================= */
.book-card-media-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #F1F5F9;
  border-radius: 8px 8px 0 0;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
}

.btn-cover-toggle {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  background: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  border-radius: 20px;
  color: #001A72;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 26, 114, 0.12);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-cover-toggle:hover {
  background: #001A72;
  border-color: #001A72;
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 26, 114, 0.25);
}

.book-cover-view, .book-synopsis-view {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: opacity 0.28s ease, transform 0.28s ease;
  opacity: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
}

.book-cover-view.active, .book-synopsis-view.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

.book-cover-view .book-cover-mock {
  height: 100%;
  width: 100%;
  border-radius: 0;
}

.synopsis-pane-content {
  padding: 22px 18px 52px 18px;
  color: #1E293B;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  background: linear-gradient(155deg, #F0F9FF 0%, #F8FAFC 100%);
  border: 1px solid #E2E8F0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #CBD5E1 transparent;
  scroll-behavior: smooth;
}

/* Custom Slim Scrollbar for Synopsis Pane */
.synopsis-pane-content::-webkit-scrollbar {
  width: 5px;
}

.synopsis-pane-content::-webkit-scrollbar-track {
  background: transparent;
}

.synopsis-pane-content::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 10px;
}

.synopsis-pane-content::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

.synopsis-badge-title {
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #001A72;
  background: rgba(2, 132, 199, 0.12);
  border: 1px solid rgba(2, 132, 199, 0.25);
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 6px;
}

.synopsis-full-text {
  font-size: 0.88rem;
  line-height: 1.65;
  color: #1E293B;
  font-weight: 500;
  margin: 0;
  flex: 1;
}

/* =========================================================
   PRIMARY EBOOK PRICING DISPLAY (LARGE & PROMINENT)
   ========================================================= */
.book-price {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.price-main {
  font-size: 1.32rem;
  font-weight: 800;
  color: #001A72;
  letter-spacing: -0.4px;
  line-height: 1.15;
  display: flex;
  align-items: center;
  gap: 6px;
}

.price-format-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(2, 132, 199, 0.12);
  color: #0284C7;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.3px;
}

.price-sub {
  font-size: 0.74rem;
  color: #64748B;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}


/* =========================================================
   MULTI-FORMAT PRICING & DIRECT-BUY BUTTONS
   ========================================================= */
.book-pricing-matrix {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 100%;
}

.pricing-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.pricing-row.primary-row {
  background: #F0F9FF;
  border: 1px solid #BAE6FD;
}

.pricing-row.secondary-row {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
}

.price-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.price-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: #001A72;
  letter-spacing: -0.3px;
  line-height: 1.1;
}

.price-val-sec {
  font-size: 0.94rem;
  font-weight: 700;
  color: #334155;
  line-height: 1.1;
}

.price-badge-pill {
  font-size: 0.65rem;
  font-weight: 700;
  color: #0284C7;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.price-sub-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: #64748B;
}

.btn-buy-format {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  font-family: inherit;
}

.btn-buy-ebook {
  background: #001A72;
  color: #FFFFFF;
  border: 1px solid #001A72;
  box-shadow: 0 2px 6px rgba(0, 26, 114, 0.2);
}

.btn-buy-ebook:hover {
  background: #0284C7;
  border-color: #0284C7;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.35);
}

.btn-buy-print {
  background: #FFFFFF;
  color: #334155;
  border: 1.5px solid #CBD5E1;
}

.btn-buy-print:hover {
  background: #F1F5F9;
  border-color: #94A3B8;
  color: #001A72;
  transform: translateY(-1px);
}

.full-width-btn {
  padding: 7px 16px;
}

/* =========================================================
   MATHEMATICAL EQUATIONS & SCIENTIFIC FORMULA STYLING
   ========================================================= */
.math-equation-block {
  background: rgba(0, 26, 114, 0.035);
  border-left: 3.5px solid #00A8E8;
  border-radius: 6px;
  padding: 12px 18px;
  margin: 16px 0;
  font-family: 'Cambria Math', 'Latin Modern Math', 'Times New Roman', serif;
  font-size: 1.05rem;
  color: #0F172A;
  overflow-x: auto;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  display: block;
}

.dark-mode .math-equation-block,
body.theme-dark .math-equation-block {
  background: rgba(255, 255, 255, 0.04);
  border-left-color: #38BDF8;
  color: #F1F5F9;
}

body.theme-sepia .math-equation-block {
  background: rgba(63, 51, 35, 0.05);
  border-left-color: #B45309;
  color: #3F3323;
}

.math-formula-text {
  font-style: italic;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Proper Subscript and Superscript vertical alignments */
sup {
  font-size: 0.75em;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
  top: -0.5em;
}

sub {
  font-size: 0.75em;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
  bottom: -0.25em;
}

/* =========================================================
   EQUATION IMAGE & DRM ANTI-EXTRACTION PROTECTION
   ========================================================= */
.math-equation-img-box {
  text-align: center;
  margin: 16px 0;
  background: rgba(0, 26, 114, 0.025);
  padding: 12px 18px;
  border-radius: 8px;
  border: 1px solid rgba(0, 168, 232, 0.22);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.equation-img {
  max-width: 92%;
  height: auto;
  vertical-align: middle;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  border-radius: 4px;
}


