/* SENMASTER 2026 Program Book Styles */

:root {
  --pb-primary: #003F8A;
  --pb-primary-dark: #002554;
  --pb-primary-light: #e6f0fa;
  --pb-accent: #F5C400;
  --pb-accent-dark: #b8860b;
  --pb-text: #1e293b;
  --pb-text-muted: #64748b;
  --pb-bg: #ffffff;
  --pb-bg-alt: #f8fafc;
  --pb-border: #e2e8f0;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: #0f172a;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: var(--pb-text);
  -webkit-font-smoothing: antialiased;
}

.flipbook-viewport {
  overflow: hidden;
  width: 100vw;
  height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flipbook-viewport .container {
  position: relative;
  margin: auto;
}

.flipbook {
  width: 922px;
  height: 600px;
}

/* Individual Page Styling */
.flipbook .page {
  width: 461px;
  height: 600px;
  background-color: #ffffff;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  position: relative;
  user-select: text;
}

.page-inner {
  width: 100%;
  height: 100%;
  padding: 24px 26px 20px 26px;
  display: flex;
  flex-direction: column;
  position: relative;
  background: #ffffff;
}

/* Page Header & Footer */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--pb-primary);
  padding-bottom: 6px;
  margin-bottom: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pb-primary);
}

.page-header .brand-tag {
  display: flex;
  align-items: center;
  gap: 5px;
}

.page-header .brand-tag img {
  height: 16px;
  width: auto;
}

.page-footer {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--pb-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--pb-text-muted);
}

.page-number {
  font-weight: 700;
  color: var(--pb-primary);
}

/* Cover Styling (Page 1) */
.page-cover-front {
  background: linear-gradient(135deg, #002554 0%, #003F8A 55%, #0056ba 100%);
  color: #ffffff;
  padding: 32px 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 4px solid var(--pb-accent);
}

.cover-header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.cover-header img {
  height: 48px;
  background: white;
  padding: 4px 8px;
  border-radius: 6px;
}

.cover-edition-badge {
  display: inline-block;
  background: var(--pb-accent);
  color: #002554;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 4px 14px;
  border-radius: 20px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 auto 14px;
}

.cover-title {
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 8px 0;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.cover-subtitle {
  font-size: 0.88rem;
  color: var(--pb-accent);
  font-weight: 700;
  margin: 0 0 16px 0;
  letter-spacing: 0.02em;
}

.cover-theme-box {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(245, 196, 0, 0.4);
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 20px;
  backdrop-filter: blur(4px);
}

.cover-theme-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  color: var(--pb-accent);
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.cover-theme-text {
  font-size: 0.84rem;
  font-style: italic;
  font-weight: 500;
  color: #f8fafc;
  line-height: 1.35;
}

.cover-meta {
  font-size: 0.78rem;
  line-height: 1.5;
  color: #e2e8f0;
  margin-top: auto;
}

.cover-meta strong {
  color: #ffffff;
}

.cover-meta .meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px 10px;
  border-radius: 12px;
  margin: 3px 2px;
}

/* Back Cover Styling (Page 12) */
.page-cover-back {
  background: linear-gradient(135deg, #001f45 0%, #00336e 60%, #002554 100%);
  color: #ffffff;
  padding: 28px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 4px solid var(--pb-accent);
}

.back-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 6px 0;
}

.back-sub {
  font-size: 0.78rem;
  color: var(--pb-accent);
  margin-bottom: 16px;
}

.back-contact-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 12px;
  text-align: left;
  font-size: 0.74rem;
  line-height: 1.5;
  margin-bottom: 12px;
}

.back-contact-card strong {
  color: var(--pb-accent);
  display: block;
  margin-bottom: 4px;
  font-size: 0.78rem;
}

.back-qr-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(0, 0, 0, 0.25);
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 12px;
}

.back-qr-placeholder {
  width: 64px;
  height: 64px;
  background: #ffffff;
  color: #002554;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 800;
  border-radius: 6px;
  text-align: center;
  padding: 4px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.back-qr-desc {
  font-size: 0.72rem;
  text-align: left;
  color: #e2e8f0;
}

/* Headings & Content Typography */
.section-headline {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--pb-primary);
  margin: 0 0 8px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-subhead {
  font-size: 0.76rem;
  color: var(--pb-text-muted);
  margin: 0 0 12px 0;
  font-weight: 500;
}

.speech-box {
  background: var(--pb-bg-alt);
  border-left: 3px solid var(--pb-primary);
  padding: 10px 12px;
  border-radius: 0 6px 6px 0;
  margin-bottom: 12px;
  font-size: 0.75rem;
  line-height: 1.45;
}

.speech-author {
  font-weight: 700;
  color: var(--pb-primary);
  margin-bottom: 3px;
  font-size: 0.78rem;
}

.speech-role {
  font-size: 0.68rem;
  color: var(--pb-text-muted);
  margin-bottom: 6px;
}

/* Table of Contents (Page 3) */
.toc-list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px 0;
  font-size: 0.75rem;
}

.toc-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px dotted var(--pb-border);
  cursor: pointer;
  transition: color 0.15s ease;
}

.toc-item:hover {
  color: var(--pb-primary);
  font-weight: 600;
}

.toc-item .dots {
  flex: 1;
  border-bottom: 1px dotted #cbd5e1;
  margin: 0 8px;
}

.toc-item .pg {
  font-weight: 700;
  color: var(--pb-primary);
}

/* Agenda / Rundown Table (Page 4) */
.agenda-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.72rem;
  margin-top: 4px;
}

.agenda-table th {
  background: var(--pb-primary);
  color: #ffffff;
  padding: 6px 8px;
  text-align: left;
  font-size: 0.7rem;
}

.agenda-table td {
  padding: 5px 8px;
  border-bottom: 1px solid var(--pb-border);
  vertical-align: top;
  line-height: 1.35;
}

.agenda-table tr:nth-child(even) td {
  background: var(--pb-bg-alt);
}

.agenda-time {
  white-space: nowrap;
  font-weight: 700;
  color: var(--pb-primary);
  width: 82px;
}

/* Speakers Page (Page 5) */
.keynote-mini-card {
  display: flex;
  gap: 12px;
  background: linear-gradient(135deg, rgba(0, 63, 138, 0.08), rgba(245, 196, 0, 0.12));
  border: 1px solid rgba(0, 63, 138, 0.2);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 10px;
  align-items: center;
}

.keynote-mini-img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--pb-primary);
  flex-shrink: 0;
  background: #ffffff;
}

.keynote-mini-info h4 {
  margin: 0 0 2px 0;
  font-size: 0.78rem;
  color: var(--pb-primary);
}

.keynote-mini-info p {
  margin: 0;
  font-size: 0.68rem;
  color: var(--pb-text-muted);
  line-height: 1.3;
}

.panelists-mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.panelist-mini-card {
  display: flex;
  gap: 8px;
  background: var(--pb-bg-alt);
  border: 1px solid var(--pb-border);
  border-radius: 6px;
  padding: 6px 8px;
  align-items: center;
}

.panelist-mini-img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #cbd5e1;
  flex-shrink: 0;
  background: #ffffff;
}

.panelist-mini-info h5 {
  margin: 0 0 2px 0;
  font-size: 0.7rem;
  color: var(--pb-text);
  line-height: 1.2;
}

.panelist-mini-info p {
  margin: 0;
  font-size: 0.62rem;
  color: var(--pb-text-muted);
  line-height: 1.2;
}

/* Parallel Rooms Grid (Page 6) */
.room-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 6px;
}

.room-card {
  background: var(--pb-bg-alt);
  border-left: 3px solid var(--pb-primary);
  border-radius: 0 6px 6px 0;
  padding: 7px 9px;
  font-size: 0.7rem;
}

.room-card.highlight {
  border-left-color: var(--pb-accent-dark);
  background: #fffbeb;
}

.room-name {
  font-weight: 800;
  color: var(--pb-primary);
  font-size: 0.74rem;
  margin-bottom: 2px;
}

.room-theme {
  font-weight: 600;
  color: var(--pb-text);
  margin-bottom: 3px;
  line-height: 1.25;
}

.room-detail {
  font-size: 0.64rem;
  color: var(--pb-text-muted);
}

/* Floor Plan Vector Map (Page 8) */
.floorplan-wrap {
  width: 100%;
  background: #f1f5f9;
  border: 1px solid var(--pb-border);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 10px;
  text-align: center;
}

.floorplan-svg {
  width: 100%;
  max-height: 220px;
  display: block;
  margin: 0 auto;
}

/* Guidelines Box (Page 9 & 10) */
.guide-step {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.72rem;
  line-height: 1.35;
}

.guide-step-num {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--pb-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

.guide-step-body strong {
  color: var(--pb-primary);
}

/* Committee List (Page 11) */
.committee-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 0.7rem;
}

.committee-group {
  background: var(--pb-bg-alt);
  padding: 7px 9px;
  border-radius: 6px;
  border: 1px solid var(--pb-border);
}

.committee-title {
  font-weight: 700;
  color: var(--pb-primary);
  font-size: 0.72rem;
  margin-bottom: 4px;
  border-bottom: 1px solid #cbd5e1;
  padding-bottom: 2px;
}

.committee-names {
  line-height: 1.35;
  color: var(--pb-text);
  font-size: 0.68rem;
}

/* Language Visibility Rules */
body.lang-id .lang-en {
  display: none !important;
}

body.lang-en .lang-id {
  display: none !important;
}

/* Print Rules */
@media print {
  body {
    background: transparent;
    overflow: visible;
  }

  .flipbook-viewport {
    height: auto;
    width: auto;
    display: block;
  }

  .flipbook {
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .flipbook .page {
    width: 100% !important;
    height: auto !important;
    page-break-after: always;
    box-shadow: none !important;
    border: 1px solid #ccc;
    margin-bottom: 20px;
  }
}